diff --git a/core/prelude/destroy.carbon b/core/prelude/destroy.carbon index e25f5601b0ed..33ecfc58a6e9 100644 --- a/core/prelude/destroy.carbon +++ b/core/prelude/destroy.carbon @@ -3,33 +3,37 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception package Core library "prelude/destroy"; -// TODO: uncomment when `require impls` adds a witness table entry. -// interface SubobjectDestroy { -// final fn Op(ref self) = "subobject.destroy"; -// } +import library "prelude/operators/as"; +import library "prelude/operators/bitwise"; -interface Destroy { +// TODO: uncomment when `require impls` adds a witness table entry. +interface SubobjectDestroy { + fn Op(ref self); +} + +// TODO: rename to `Destroy` when `require impls` adds a witness table entry. +interface DestroyImpl { // TODO: uncomment when `require impls` adds a witness table entry. // require impls SubobjectDestroy; // TODO: change `Self` to `partial Self`. fn Op(ref self); +} - // TODO: remove when `require impls` adds a witness table entry. - final fn SubobjectDestroy(unused ref self) { - // This function body is ignored by the toolchain. We can't use - // a built-in because the compiler treats it as an error. We - // should address this at some point, but it's not a high - // priority right now. - } +impl forall [T: SubobjectDestroy] T as DestroyImpl { + fn Op(ref self) = "no_op"; +} - final fn SelfDestruct(ref self) { - self.Op(); - self.SubobjectDestroy(); - } +constraint Destroy { + extend require impls SubobjectDestroy & DestroyImpl; } // TODO: uncomment when `require impls` adds a witness table entry. // impl forall [T: SubobjectDestroy] partial T as Destroy { // alias Op = T.Op; // } + +fn SelfDestruct[T: Destroy](ref t: T) { + t.(DestroyImpl.Op)(); + t.(SubobjectDestroy.Op)(); +} diff --git a/toolchain/check/core_identifier.def b/toolchain/check/core_identifier.def index 489b32d2696c..ff9314231464 100644 --- a/toolchain/check/core_identifier.def +++ b/toolchain/check/core_identifier.def @@ -39,7 +39,7 @@ CARBON_CORE_IDENTIFIER(CppUnsafeDeref) CARBON_CORE_IDENTIFIER(Dec) CARBON_CORE_IDENTIFIER(Default) CARBON_CORE_IDENTIFIER(DefaultOrUnformed) -CARBON_CORE_IDENTIFIER(Destroy) +CARBON_CORE_IDENTIFIER(DestroyImpl) CARBON_CORE_IDENTIFIER(DivAssignWith) CARBON_CORE_IDENTIFIER(DivWith) CARBON_CORE_IDENTIFIER(EqWith) diff --git a/toolchain/check/cpp/impl_lookup.cpp b/toolchain/check/cpp/impl_lookup.cpp index d1d86e785202..fc8922ec081b 100644 --- a/toolchain/check/cpp/impl_lookup.cpp +++ b/toolchain/check/cpp/impl_lookup.cpp @@ -248,7 +248,7 @@ static auto BuildDefaultWitness( query_specific_interface, {fn_id}); } -static auto BuildCppDestroyWitness( +static auto BuildCppSubobjectDestroyWitness( Context& context, SemIR::LocId loc_id, SemIR::ConstantId query_self_const_id, SemIR::SpecificInterface query_specific_interface) -> SemIR::InstId { @@ -260,8 +260,8 @@ static auto BuildCppDestroyWitness( } auto* class_decl = dyn_cast(tag_decl); if (!class_decl) { - return BuildTrivialDestroyWitness(context, loc_id, query_self_const_id, - query_specific_interface); + return BuildTrivialSubobjectDestroyWitness( + context, loc_id, query_self_const_id, query_specific_interface); } SemIR::ClangDeclSignatureId signature_id = MakeSignature(context, {}); @@ -271,11 +271,8 @@ static auto BuildCppDestroyWitness( if (fn_id == SemIR::ErrorInst::InstId || fn_id == SemIR::InstId::None) { return fn_id; } - return BuildDestroyWitness( - context, loc_id, - GetFacetAccessType( - context, context.constant_values().GetInstId(query_self_const_id)), - query_self_const_id, query_specific_interface, {fn_id}); + return BuildCustomWitness(context, loc_id, query_self_const_id, + query_specific_interface, {fn_id}); } // Attempts to build a witness table entry for a C++ unary operator. @@ -619,9 +616,9 @@ auto LookupCppImpl(Context& context, SemIR::LocId loc_id, case SemIR::CoreInterface::Default: return BuildDefaultWitness(context, loc_id, query_self_const_id, query_specific_interface); - case SemIR::CoreInterface::Destroy: - return BuildCppDestroyWitness(context, loc_id, query_self_const_id, - query_specific_interface); + case SemIR::CoreInterface::SubobjectDestroy: + return BuildCppSubobjectDestroyWitness( + context, loc_id, query_self_const_id, query_specific_interface); case SemIR::CoreInterface::CppRangeForIterate: return BuildCppRangeForIterateWitness( diff --git a/toolchain/check/cpp/operators.cpp b/toolchain/check/cpp/operators.cpp index 7af33f85b4de..daa8c5a54cd5 100644 --- a/toolchain/check/cpp/operators.cpp +++ b/toolchain/check/cpp/operators.cpp @@ -17,6 +17,7 @@ #include "toolchain/check/custom_witness.h" #include "toolchain/check/function.h" #include "toolchain/check/inst.h" +#include "toolchain/check/interface.h" #include "toolchain/check/literal.h" #include "toolchain/check/name_lookup.h" #include "toolchain/check/pattern.h" @@ -39,7 +40,7 @@ static auto GetClangOperatorKind(Context& context, SemIR::LocId loc_id, -> std::optional { switch (interface_name) { // Unary operators. - case CoreIdentifier::Destroy: + case CoreIdentifier::DestroyImpl: case CoreIdentifier::SubobjectDestroy: case CoreIdentifier::SelfDestruct: case CoreIdentifier::As: @@ -581,31 +582,6 @@ static auto GetBuiltinOperatorInfo(clang::OverloadedOperatorKind kind) return OpTable[kind]; } -static auto GetCoreInterfaceId(Context& context, SemIR::LocId loc_id, - CoreIdentifier interface_name) - -> SemIR::InterfaceId { - auto inst_id = LookupNameInCore(context, loc_id, interface_name); - - // Non-generic interfaces. - if (auto facet_type = context.insts().TryGetAs(inst_id)) { - const auto& declared = - context.declared_facet_types().Get(facet_type->declared_facet_type_id); - auto single = declared.TryAsSingleExtend(); - CARBON_KIND_SWITCH(*single) { - case CARBON_KIND(SemIR::SpecificInterface si): { - return si.interface_id; - } - case CARBON_KIND(SemIR::SpecificNamedConstraint _): { - CARBON_FATAL("Operators in named constraints are not yet needed"); - } - } - } - - auto type_id = context.insts().Get(inst_id).type_id(); - auto generic = context.types().GetAs(type_id); - return generic.interface_id; -} - // Builds a Carbon builtin function declaration corresponding to an overload // candidate that selected a C++ builtin operator. Returns None if no // corresponding builtin function could or should be built. diff --git a/toolchain/check/custom_witness.cpp b/toolchain/check/custom_witness.cpp index 6640b052ac2d..3384d149175c 100644 --- a/toolchain/check/custom_witness.cpp +++ b/toolchain/check/custom_witness.cpp @@ -18,6 +18,7 @@ #include "toolchain/check/impl_lookup.h" #include "toolchain/check/import_ref.h" #include "toolchain/check/inst.h" +#include "toolchain/check/interface.h" #include "toolchain/check/member_access.h" #include "toolchain/check/name_lookup.h" #include "toolchain/check/operator.h" @@ -119,9 +120,11 @@ auto MakeBuiltinOperatorFunction(Context& context, SemIR::LocId loc_id, .self_kind = ParamPatternKind::Value, .param_type_ids = param_types, .param_kinds = param_kinds, - .return_form = - ReturnExprAsForm(context, SemIR::LocId::None, - context.types().GetTypeInstId(return_type_id))}); + .return_form = return_type_id == SemIR::TypeId::None + ? Context::FormExpr::None + : ReturnExprAsForm(context, SemIR::LocId::None, + context.types().GetTypeInstId( + return_type_id))}); auto& function = context.functions().Get(function_id); function.SetGenerated(context.generated_functions().Add( {.canonical_key = canonical_key, @@ -537,45 +540,10 @@ static auto MakeSubobjectDestroyOpBody(Context& context, SemIR::LocId loc_id, } } -// Returns a manufactured `Destroy.Op` function with the `self` parameter typed -// to `self_type_id`. -static auto MakeDestroyOpFunction(Context& context, SemIR::LocId loc_id, - SemIR::TypeId self_type_id, - SemIR::InterfaceId interface_id) - -> SemIR::InstId { - auto name_id = context.core_identifiers().AddNameId(CoreIdentifier::Op); - - const auto& interface = context.interfaces().Get(interface_id); - auto specific_interface = MakeCoreSpecificInterface( - context, loc_id, interface_id, interface.generic_id, {}); - auto canonical_key = MakeGeneratedFunctionKey(context, specific_interface, - self_type_id, name_id); - auto [decl_id, function_id] = TryGetGeneratedFunction(context, canonical_key); - if (!decl_id.has_value()) { - std::tie(decl_id, function_id) = MakeGeneratedFunctionDecl( - context, loc_id, - {.parent_scope_id = interface.scope_with_self_id, - .name_id = name_id, - .self_type_id = self_type_id, - .self_kind = ParamPatternKind::Ref}); - auto& function = context.functions().Get(function_id); - function.SetGenerated(context.generated_functions().Add( - {.canonical_key = canonical_key, - .function_id = function_id, - .decl_id = decl_id, - .builtin_function_kind = SemIR::BuiltinFunctionKind::NoOp})); - } - - return decl_id; -} - static auto MakeSubobjectDestroyOpFunction( Context& context, SemIR::LocId loc_id, SemIR::TypeId self_type_id, SemIR::InterfaceId interface_id, DestroyFormat format) -> SemIR::InstId { - // TODO: replace with `CoreIdentifier::Op` when `require impls` adds a witness - // table entry. - auto name_id = - context.core_identifiers().AddNameId(CoreIdentifier::SubobjectDestroy); + auto name_id = context.core_identifiers().AddNameId(CoreIdentifier::Op); const auto& interface = context.interfaces().Get(interface_id); auto specific_interface = MakeCoreSpecificInterface( context, loc_id, interface_id, interface.generic_id, {}); @@ -627,54 +595,6 @@ static auto MakeSubobjectDestroyOpFunction( return decl_id; } -// Returns a manufactured `Destroy.SelfDestruct` function with the `self` -// parameter typed to `self_type_id`. -static auto MakeDestroySelfDestructFunction( - Context& context, SemIR::LocId loc_id, SemIR::TypeId self_type_id, - SemIR::InterfaceId interface_id, SemIR::InstId op_id, - [[maybe_unused]] SemIR::InstId subobject_destroy_id) -> SemIR::InstId { - auto name_id = - context.core_identifiers().AddNameId(CoreIdentifier::SelfDestruct); - const auto& interface = context.interfaces().Get(interface_id); - auto specific_interface = MakeCoreSpecificInterface( - context, loc_id, interface_id, interface.generic_id, {}); - auto canonical_key = MakeGeneratedFunctionKey(context, specific_interface, - self_type_id, name_id); - - auto [decl_id, function_id] = TryGetGeneratedFunction(context, canonical_key); - if (!decl_id.has_value()) { - std::tie(decl_id, function_id) = MakeGeneratedFunctionDecl( - context, loc_id, - {.parent_scope_id = interface.scope_with_self_id, - .name_id = name_id, - .self_type_id = self_type_id, - .self_kind = ParamPatternKind::Ref}); - - auto& function = context.functions().Get(function_id); - context.inst_block_stack().Push(); - StartFunctionDefinition(context, decl_id, function_id); - auto params = context.inst_blocks().Get(function.call_params_id); - CARBON_CHECK( - params.size() == 1, - "`Core.Destroy.SelfDestruct` should only have `ref self` as its " - "parameter"); - op_id = PerformCall(context, loc_id, op_id, {params[0]}, true); - DiscardExpr(context, op_id); - subobject_destroy_id = - PerformCall(context, loc_id, subobject_destroy_id, {params[0]}, true); - DiscardExpr(context, subobject_destroy_id); - BuildReturnWithNoExpr(context, loc_id); - FinishFunctionDefinition(context, function_id); - context.inst_block_stack().Pop(); - function.SetGenerated(context.generated_functions().Add( - {.canonical_key = canonical_key, - .function_id = function_id, - .decl_id = decl_id, - .builtin_function_kind = SemIR::BuiltinFunctionKind::None})); - } - return decl_id; -} - static auto MakeCustomWitnessConstantInst( Context& context, SemIR::LocId loc_id, SemIR::SpecificInterface query_specific_interface, @@ -902,36 +822,11 @@ auto BuildPrimitiveCopyWitness( query_specific_interface, {op_id}); } -auto BuildDestroyWitness(Context& context, SemIR::LocId loc_id, - SemIR::TypeId self_type_id, - SemIR::ConstantId query_self_const_id, - SemIR::SpecificInterface query_specific_interface, - SemIR::InstId subobject_destroy_fn_id) - -> SemIR::InstId { - auto interface = - context.interfaces().Get(query_specific_interface.interface_id); - auto assoc_entities = - context.inst_blocks().Get(interface.associated_entities_id); - CARBON_CHECK(assoc_entities.size() == 3, - "{} only has {} associated functions", - context.names().GetAsStringIfIdentifier(interface.name_id), - assoc_entities.size()); - - auto op_id = MakeDestroyOpFunction(context, loc_id, self_type_id, - query_specific_interface.interface_id); - - auto self_destruct_fn_id = MakeDestroySelfDestructFunction( - context, loc_id, self_type_id, query_specific_interface.interface_id, - op_id, subobject_destroy_fn_id); - - return BuildCustomWitness( - context, loc_id, query_self_const_id, query_specific_interface, - {op_id, subobject_destroy_fn_id, self_destruct_fn_id}); -} - -// Builds and returns a custom witness that performs the specified kind of -// destruction for the given type. -static auto BuildCarbonDestroyWitness( +// Builds a custom witness for the `SubobjectDestroy` interface. +// +// `op_id` refers to the synthesised `SubobjectDestroy.Op` and is generated +// differently based on whether the specific is a Carbon type or a C++ type. +static auto BuildSubobjectDestroyWitness( Context& context, SemIR::LocId loc_id, SemIR::ConstantId query_self_const_id, SemIR::SpecificInterface query_specific_interface, DestroyFormat format) @@ -940,16 +835,23 @@ static auto BuildCarbonDestroyWitness( auto self_type_id = GetFacetAccessType( context, context.constant_values().GetInstId(query_self_const_id)); - auto subobject_destroy_op_id = MakeSubobjectDestroyOpFunction( + auto op_id = MakeSubobjectDestroyOpFunction( context, loc_id, self_type_id, query_specific_interface.interface_id, format); - return BuildDestroyWitness(context, loc_id, self_type_id, query_self_const_id, - query_specific_interface, subobject_destroy_op_id); + return BuildCustomWitness(context, loc_id, query_self_const_id, + query_specific_interface, op_id); } -// Returns the custom witness to use for destruction of the given type. See -// `LookupCustomWitness`. -static auto LookupDestroyWitness( +auto BuildTrivialSubobjectDestroyWitness( + Context& context, SemIR::LocId loc_id, + SemIR::ConstantId query_self_const_id, + SemIR::SpecificInterface query_specific_interface) -> SemIR::InstId { + return BuildSubobjectDestroyWitness(context, loc_id, query_self_const_id, + query_specific_interface, + DestroyFormat::Trivial); +} + +static auto LookupSubobjectDestroyWitness( Context& context, SemIR::LocId loc_id, SemIR::ConstantId query_self_const_id, SemIR::SpecificInterface query_specific_interface, bool build_witness) @@ -961,21 +863,11 @@ static auto LookupDestroyWitness( } if (!build_witness || query_self_const_id.is_symbolic()) { - // The type can be destroyed, but we shouldn't make a witness right now. return SemIR::InstId::None; } - return BuildCarbonDestroyWitness(context, loc_id, query_self_const_id, - query_specific_interface, format); -} - -auto BuildTrivialDestroyWitness( - Context& context, SemIR::LocId loc_id, - SemIR::ConstantId query_self_const_id, - SemIR::SpecificInterface query_specific_interface) -> SemIR::InstId { - return BuildCarbonDestroyWitness(context, loc_id, query_self_const_id, - query_specific_interface, - DestroyFormat::Trivial); + return BuildSubobjectDestroyWitness(context, loc_id, query_self_const_id, + query_specific_interface, format); } static auto MakeIntFitsInWitness( @@ -1153,15 +1045,16 @@ auto LookupCustomWitness(Context& context, SemIR::LocId loc_id, SemIR::SpecificInterface query_specific_interface, bool build_witness) -> std::optional { switch (core_interface) { - case SemIR::CoreInterface::Destroy: - return LookupDestroyWitness(context, loc_id, query_self_const_id, - query_specific_interface, build_witness); case SemIR::CoreInterface::FloatFitsIn: return MakeFloatFitsInWitness(context, loc_id, query_self_const_id, query_specific_interface, build_witness); case SemIR::CoreInterface::IntFitsIn: return MakeIntFitsInWitness(context, loc_id, query_self_const_id, query_specific_interface, build_witness); + case SemIR::CoreInterface::SubobjectDestroy: + return LookupSubobjectDestroyWitness(context, loc_id, query_self_const_id, + query_specific_interface, + build_witness); case SemIR::CoreInterface::AddAssignWith: case SemIR::CoreInterface::AddWith: case SemIR::CoreInterface::Copy: diff --git a/toolchain/check/custom_witness.h b/toolchain/check/custom_witness.h index 0b046790ae33..15dcaacdd42d 100644 --- a/toolchain/check/custom_witness.h +++ b/toolchain/check/custom_witness.h @@ -41,7 +41,7 @@ auto MakeBuiltinOperatorFunction(Context& context, SemIR::LocId loc_id, -> SemIR::InstId; // Builds a witness that the given type is trivially destroyable. -auto BuildTrivialDestroyWitness( +auto BuildTrivialSubobjectDestroyWitness( Context& context, SemIR::LocId loc_id, SemIR::ConstantId query_self_const_id, SemIR::SpecificInterface query_specific_interface) -> SemIR::InstId; @@ -67,17 +67,6 @@ auto LookupCustomWitness(Context& context, SemIR::LocId loc_id, SemIR::SpecificInterface query_specific_interface, bool build_witness) -> std::optional; -// Builds a witness for the `Destroy` interface. -// -// `op_id` refers to the synthesised `Destroy.Op` and is generated differently -// based on whether the specific is a Carbon type or a C++ type. -auto BuildDestroyWitness(Context& context, SemIR::LocId loc_id, - SemIR::TypeId self_type_id, - SemIR::ConstantId query_self_const_id, - SemIR::SpecificInterface query_specific_interface, - SemIR::InstId subobject_destroy_fn_id) - -> SemIR::InstId; - } // namespace Carbon::Check #endif // CARBON_TOOLCHAIN_CHECK_CUSTOM_WITNESS_H_ diff --git a/toolchain/check/handle_interface.cpp b/toolchain/check/handle_interface.cpp index 0f03be572873..87c29af44118 100644 --- a/toolchain/check/handle_interface.cpp +++ b/toolchain/check/handle_interface.cpp @@ -95,14 +95,14 @@ static auto ValidateCoreInterfaceAssociatedFunction( return true; } -static auto ValidateCoreDestroy(Context& context, SemIR::LocId loc_id, - SemIR::InstBlockId associated_entities_id) - -> bool { +static auto ValidateCoreSubobjectDestroy( + Context& context, SemIR::LocId loc_id, + SemIR::InstBlockId associated_entities_id) -> bool { auto assoc_entities = context.inst_blocks().Get(associated_entities_id); - if (assoc_entities.size() != 3) { - context.TODO( - loc_id, - "interface `Core.Destroy` needs exactly 3 associated functions"); + if (assoc_entities.size() != 1) { + context.TODO(loc_id, + "interface `Core.SubobjectDestroy` needs exactly 1 associated " + "function"); return false; } @@ -111,18 +111,6 @@ static auto ValidateCoreDestroy(Context& context, SemIR::LocId loc_id, return false; } - if (!ValidateCoreInterfaceAssociatedFunction( - context, assoc_entities[1], 2, CoreIdentifier::SubobjectDestroy, - SemIR::Function::InterfaceModifier::Final)) { - return false; - } - - if (!ValidateCoreInterfaceAssociatedFunction( - context, assoc_entities[2], 3, CoreIdentifier::SelfDestruct, - SemIR::Function::InterfaceModifier::Final)) { - return false; - } - return true; } @@ -339,9 +327,9 @@ auto HandleParseNode(Context& context, Parse::InterfaceDefinitionId node_id) if (context.sem_ir().package_id() == PackageNameId::Core) { switch (interface_info.core_interface) { - case SemIR::CoreInterface::Destroy: - return ValidateCoreDestroy(context, node_id, - interface_info.associated_entities_id); + case SemIR::CoreInterface::SubobjectDestroy: + return ValidateCoreSubobjectDestroy( + context, node_id, interface_info.associated_entities_id); case SemIR::CoreInterface::AddAssignWith: case SemIR::CoreInterface::AddWith: case SemIR::CoreInterface::Copy: diff --git a/toolchain/check/interface.cpp b/toolchain/check/interface.cpp index c6efe442e231..3076abd9fb66 100644 --- a/toolchain/check/interface.cpp +++ b/toolchain/check/interface.cpp @@ -175,4 +175,27 @@ auto AddSelfSymbolicBindingToScope(Context& context, return self_param_inst_id; } +auto GetCoreInterfaceId(Context& context, SemIR::LocId loc_id, + CoreIdentifier interface_name) -> SemIR::InterfaceId { + auto inst_id = LookupNameInCore(context, loc_id, interface_name); + + // Non-generic interfaces. + if (auto facet_type = context.insts().TryGetAs(inst_id)) { + const auto& declared = + context.declared_facet_types().Get(facet_type->declared_facet_type_id); + auto single = declared.TryAsSingleExtend(); + CARBON_KIND_SWITCH(*single) { + case CARBON_KIND(SemIR::SpecificInterface si): { + return si.interface_id; + } + case CARBON_KIND(SemIR::SpecificNamedConstraint _): { + CARBON_FATAL("Operators in named constraints are not yet needed"); + } + } + } + + auto type_id = context.insts().Get(inst_id).type_id(); + auto generic = context.types().GetAs(type_id); + return generic.interface_id; +} } // namespace Carbon::Check diff --git a/toolchain/check/interface.h b/toolchain/check/interface.h index 6ed6869e3228..c168ac81ab1c 100644 --- a/toolchain/check/interface.h +++ b/toolchain/check/interface.h @@ -60,6 +60,8 @@ auto TryGetExistingDecl(Context& context, const NameComponent& name, const EntityT& entity, bool is_definition) -> std::optional; +auto GetCoreInterfaceId(Context& context, SemIR::LocId loc_id, + CoreIdentifier interface_name) -> SemIR::InterfaceId; } // namespace Carbon::Check #endif // CARBON_TOOLCHAIN_CHECK_INTERFACE_H_ diff --git a/toolchain/check/operator.cpp b/toolchain/check/operator.cpp index 9a448911a404..166b331e4b33 100644 --- a/toolchain/check/operator.cpp +++ b/toolchain/check/operator.cpp @@ -6,6 +6,7 @@ #include +#include "toolchain/base/kind_switch.h" #include "toolchain/check/call.h" #include "toolchain/check/context.h" #include "toolchain/check/convert.h" @@ -105,11 +106,11 @@ auto BuildUnaryOperator(Context& context, SemIR::LocId loc_id, Operator op, auto BuildSelfDestructCall(Context& context, SemIR::InstId object_id) -> SemIR::InstId { - return BuildUnaryOperator(context, - context.insts().GetLocIdForDesugaring(object_id), - {.interface_name = CoreIdentifier::Destroy, - .op_name = CoreIdentifier::SelfDestruct}, - object_id); + auto loc_id = context.insts().GetLocIdForDesugaring(object_id); + return PerformCall( + context, loc_id, + LookupNameInCore(context, loc_id, CoreIdentifier::SelfDestruct), + {object_id}, /*is_desugared=*/true); } auto BuildBinaryOperator(Context& context, SemIR::LocId loc_id, Operator op, diff --git a/toolchain/check/testdata/array/basics.carbon b/toolchain/check/testdata/array/basics.carbon index 5f37e42c4a87..70dcaa34486d 100644 --- a/toolchain/check/testdata/array/basics.carbon +++ b/toolchain/check/testdata/array/basics.carbon @@ -82,7 +82,7 @@ library "[[@TEST_NAME]]"; class Incomplete; // CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE+7]]:8-27: error: binding pattern has incomplete type `array(Incomplete, 1)` in name binding declaration [IncompleteTypeInBindingDecl] -// CHECK:STDERR: min_prelude/parts/array.carbon:12:3-24: note: `` evaluates to incomplete type `` [IncompleteTypeInMonomorphization] +// CHECK:STDERR: min_prelude/parts/array.carbon:13:3-24: note: `` evaluates to incomplete type `` [IncompleteTypeInMonomorphization] // CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE-4]]:1-17: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: // CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE+3]]:8-27: error: binding pattern has incomplete type `array(Incomplete, 1)` in name binding declaration [IncompleteTypeInBindingDecl] @@ -174,7 +174,6 @@ var a: array(1, 1); // CHECK:STDOUT: %tuple.type.531: type = tuple_type (type, type, type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.531 = tuple_value (%C, %C, %C) [concrete] // CHECK:STDOUT: %tuple.type.a8c: type = tuple_type (%C, %C, %C) [concrete] -// CHECK:STDOUT: %pattern_type.730: type = pattern_type %tuple.type.a8c [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] @@ -186,97 +185,34 @@ var a: array(1, 1); // CHECK:STDOUT: %tuple.type.8c7: type = tuple_type (%tuple.type.a8c, %tuple.type.a8c) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.bed: %pattern_type.730 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d67: %pattern_type.730 = wrapper_binding_pattern self, %self.param_patt.bed [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c69: %pattern_type.fc3 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1da: %pattern_type.fc3 = wrapper_binding_pattern self, %self.param_patt.c69 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_3.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c23: %SubobjectDestroy.type = facet_value %tuple.type.a8c, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1fd: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c23) [concrete] +// CHECK:STDOUT: %Destroy.facet.133: %Destroy.type = facet_value %tuple.type.a8c, (%DestroyImpl.impl_witness.1fd, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.71e: %SubobjectDestroy.type = facet_value %Array.a4f, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a42: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.71e) [concrete] +// CHECK:STDOUT: %Destroy.facet.023: %Destroy.type = facet_value %Array.a4f, (%DestroyImpl.impl_witness.a42, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.730 = ref_param_pattern [concrete = constants.%self.param_patt.bed] -// CHECK:STDOUT: %self.patt: %pattern_type.730 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d67] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.a8c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.a8c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.730 = ref_param_pattern [concrete = constants.%self.param_patt.bed] -// CHECK:STDOUT: %self.patt: %pattern_type.730 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d67] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.a8c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.a8c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fc3 = ref_param_pattern [concrete = constants.%self.param_patt.c69] -// CHECK:STDOUT: %self.patt: %pattern_type.fc3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1da] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.a4f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.a4f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10_3.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fc3 = ref_param_pattern [concrete = constants.%self.param_patt.c69] -// CHECK:STDOUT: %self.patt: %pattern_type.fc3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1da] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.a4f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.a4f = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -296,8 +232,8 @@ var a: array(1, 1); // CHECK:STDOUT: %F.call.loc10_47: init %tuple.type.a8c to %.loc10_48.2 = call %F.ref.loc10_45() // CHECK:STDOUT: %.loc10_48.3: %tuple.type.8c7 = tuple_literal (%F.call.loc10_42, %F.call.loc10_47) // CHECK:STDOUT: %.loc10_48.4: init %Array.a4f to %v.var = array_init (%F.call.loc10_42, %F.call.loc10_47) -// CHECK:STDOUT: %.loc10_3: init %Array.a4f = converted %.loc10_48.3, %.loc10_48.4 -// CHECK:STDOUT: assign %v.var, %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: init %Array.a4f = converted %.loc10_48.3, %.loc10_48.4 +// CHECK:STDOUT: assign %v.var, %.loc10_3.1 // CHECK:STDOUT: %.loc10_35: type = splice_block %Array [concrete = constants.%Array.a4f] { // CHECK:STDOUT: %C.ref.loc10_24: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %C.ref.loc10_27: type = name_ref C, file.%C.decl [concrete = constants.%C] @@ -312,78 +248,66 @@ var a: array(1, 1); // CHECK:STDOUT: %v.patt: %pattern_type.fc3 = ref_binding_pattern v [concrete = constants.%v.patt] // CHECK:STDOUT: %v.var_patt: %pattern_type.fc3 = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%Array.a4f, (constants.%DestroyImpl.impl_witness.a42, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.023] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%Array.a4f, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.023] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%Array.a4f, (constants.%DestroyImpl.impl_witness.a42, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.023] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%Array.a4f, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.023] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.3(%self.param: ref %tuple.type.a8c) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.3(%self.param: ref %tuple.type.a8c) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %tuple.elem2: ref %C = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.1: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %C = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc10_3.3: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.3 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_3.4: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.4: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.4 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %C = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.3(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc10_3.5: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.5 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_3.6: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.6 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.3(%self.param: ref %tuple.type.a8c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.3(%self.param: ref %tuple.type.a8c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.4(%self.param: ref %Array.a4f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.4(%self.param: ref %Array.a4f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %.loc10_3.1: ref %tuple.type.a8c = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.1: = bound_method %.loc10_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.1(%.loc10_3.1) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%tuple.type.a8c, (constants.%DestroyImpl.impl_witness.1fd, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.133] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%tuple.type.a8c, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.133] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%tuple.type.a8c, (constants.%DestroyImpl.impl_witness.1fd, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.133] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%tuple.type.a8c, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.133] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_3.1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc10_3.2: ref %tuple.type.a8c = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.2: = bound_method %.loc10_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.2(%.loc10_3.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.4(%self.param: ref %Array.a4f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.4(%self.param: ref %Array.a4f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) +// CHECK:STDOUT: %.loc10_3.4: ref %tuple.type.a8c = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc10_3.3: %Destroy.type = facet_value constants.%tuple.type.a8c, (constants.%DestroyImpl.impl_witness.1fd, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.133] +// CHECK:STDOUT: %.loc10_3.5: %Destroy.type = converted constants.%tuple.type.a8c, %Destroy.facet.loc10_3.3 [concrete = constants.%Destroy.facet.133] +// CHECK:STDOUT: %Destroy.facet.loc10_3.4: %Destroy.type = facet_value constants.%tuple.type.a8c, (constants.%DestroyImpl.impl_witness.1fd, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.133] +// CHECK:STDOUT: %.loc10_3.6: %Destroy.type = converted constants.%tuple.type.a8c, %Destroy.facet.loc10_3.4 [concrete = constants.%Destroy.facet.133] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -411,84 +335,39 @@ var a: array(1, 1); // CHECK:STDOUT: %b.var_patt: %pattern_type.8c1 = var_pattern %b.patt [concrete] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.72f: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.856, @T.as.DefaultOrUnformed.impl(%tuple.type) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet.e6a: %DefaultOrUnformed.type = facet_value %tuple.type, (%DefaultOrUnformed.impl_witness.72f) [concrete] -// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.327: %pattern_type.8c1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.570: %pattern_type.8c1 = wrapper_binding_pattern self, %self.param_patt.327 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet.939: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80ef6.1) [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.244: %pattern_type.bdf = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.110: %pattern_type.bdf = wrapper_binding_pattern self, %self.param_patt.244 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c0e: %SubobjectDestroy.type = facet_value %tuple.type, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.700: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c0e) [concrete] +// CHECK:STDOUT: %Destroy.facet.3f7: %Destroy.type = facet_value %tuple.type, (%DestroyImpl.impl_witness.700, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.091: %SubobjectDestroy.type = facet_value %Array.f23, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.70c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.091) [concrete] +// CHECK:STDOUT: %Destroy.facet.364: %Destroy.type = facet_value %Array.f23, (%DestroyImpl.impl_witness.70c, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8c1 = ref_param_pattern [concrete = constants.%self.param_patt.327] -// CHECK:STDOUT: %self.patt: %pattern_type.8c1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.570] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8c1 = ref_param_pattern [concrete = constants.%self.param_patt.327] -// CHECK:STDOUT: %self.patt: %pattern_type.8c1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.570] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bdf = ref_param_pattern [concrete = constants.%self.param_patt.244] -// CHECK:STDOUT: %self.patt: %pattern_type.bdf = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.110] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f23 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f23 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bdf = ref_param_pattern [concrete = constants.%self.param_patt.244] -// CHECK:STDOUT: %self.patt: %pattern_type.bdf = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.110] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f23 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f23 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -499,8 +378,8 @@ var a: array(1, 1); // CHECK:STDOUT: %as_type.loc7: type = facet_access_type %.loc7_29.1 [concrete = constants.%Array.f23] // CHECK:STDOUT: %.loc7_29.2: type = converted %.loc7_29.1, %as_type.loc7 [concrete = constants.%Array.f23] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc7_3: ref %Array.f23 = splice_block %a.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc7: init %Array.f23 to %.loc7_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.1() +// CHECK:STDOUT: %.loc7_3.1: ref %Array.f23 = splice_block %a.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc7: init %Array.f23 to %.loc7_3.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.1() // CHECK:STDOUT: assign %a.var, %T.as.DefaultOrUnformed.impl.Op.call.loc7 // CHECK:STDOUT: %.loc7_28: type = splice_block %Array [concrete = constants.%Array.f23] { // CHECK:STDOUT: %.loc7_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] @@ -519,8 +398,8 @@ var a: array(1, 1); // CHECK:STDOUT: %as_type.loc8: type = facet_access_type %.loc8_29.1 [concrete = constants.%tuple.type] // CHECK:STDOUT: %.loc8_29.2: type = converted %.loc8_29.1, %as_type.loc8 [concrete = constants.%tuple.type] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc8_3: ref %tuple.type = splice_block %b.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc8: init %tuple.type to %.loc8_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.2() +// CHECK:STDOUT: %.loc8_3.1: ref %tuple.type = splice_block %b.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc8: init %tuple.type to %.loc8_3.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.2() // CHECK:STDOUT: assign %b.var, %T.as.DefaultOrUnformed.impl.Op.call.loc8 // CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.6 [concrete = constants.%tuple.type] { // CHECK:STDOUT: %.loc8_19: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] @@ -537,73 +416,78 @@ var a: array(1, 1); // CHECK:STDOUT: %b.patt: %pattern_type.8c1 = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.8c1 = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%tuple.type, (constants.%DestroyImpl.impl_witness.700, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.3f7] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%tuple.type, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.3f7] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%tuple.type, (constants.%DestroyImpl.impl_witness.700, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.3f7] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%tuple.type, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.3f7] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Array.f23, (constants.%DestroyImpl.impl_witness.70c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.364] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Array.f23, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.364] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Array.f23, (constants.%DestroyImpl.impl_witness.70c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.364] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Array.f23, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.364] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %empty_tuple.type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %tuple.type) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %tuple.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %tuple.elem2: ref %empty_tuple.type = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_3.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_3.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc8_3.1: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_3.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_3.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc8_3.3: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.3 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc8_3.4: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc8_3.4: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.4 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_3.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_3.3(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc8_3.5: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc8_3.5: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.5 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc8_3.6: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc8_3.6: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.6 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %Array.f23) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7(%self.param: ref %Array.f23) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc7_3.1: ref %empty_tuple.type = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1: = bound_method %.loc7_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1(%.loc7_3.1) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc7_3.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc7_3.2: ref %empty_tuple.type = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2: = bound_method %.loc7_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2(%.loc7_3.2) +// CHECK:STDOUT: %.loc7_3.4: ref %empty_tuple.type = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc7_3.5: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc7_3.3 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc7_3.4: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc7_3.6: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc7_3.4 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc7_3.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc7_3.3: ref %empty_tuple.type = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.3: = bound_method %.loc7_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.3(%.loc7_3.3) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %Array.f23) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %Array.f23) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc7_3.7: ref %empty_tuple.type = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc7_3.5: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc7_3.8: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc7_3.5 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc7_3.6: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc7_3.9: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc7_3.6 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc7_3.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -614,86 +498,43 @@ var a: array(1, 1); // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type) [concrete] -// CHECK:STDOUT: %pattern_type.559: type = pattern_type %tuple.type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Array.b7c: type = class_type @Array, @Array(%empty_tuple.type, %int_1) [concrete] // CHECK:STDOUT: %pattern_type.f14: type = pattern_type %Array.b7c [concrete] -// CHECK:STDOUT: %t.patt: %pattern_type.f14 = ref_binding_pattern t [concrete] -// CHECK:STDOUT: %t.var_patt: %pattern_type.f14 = var_pattern %t.patt [concrete] +// CHECK:STDOUT: %t.patt.44c: %pattern_type.f14 = ref_binding_pattern t [concrete] +// CHECK:STDOUT: %t.var_patt: %pattern_type.f14 = var_pattern %t.patt.44c [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %array: %Array.b7c = tuple_value (%empty_tuple) [concrete] -// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_34.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_34.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_34.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.383: %pattern_type.559 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.363: %pattern_type.559 = wrapper_binding_pattern self, %self.param_patt.383 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_34.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_34.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_34.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.1c5: %pattern_type.f14 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f08: %pattern_type.f14 = wrapper_binding_pattern self, %self.param_patt.1c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc8_3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_34.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_34.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet.939: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ef2: %SubobjectDestroy.type = facet_value %tuple.type, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.540: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ef2) [concrete] +// CHECK:STDOUT: %Destroy.facet.5d8: %Destroy.type = facet_value %tuple.type, (%DestroyImpl.impl_witness.540, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e6f: %SubobjectDestroy.type = facet_value %Array.b7c, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a4c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e6f) [concrete] +// CHECK:STDOUT: %Destroy.facet.e6b: %Destroy.type = facet_value %Array.b7c, (%DestroyImpl.impl_witness.a4c, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_34.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_34.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_34.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.559 = ref_param_pattern [concrete = constants.%self.param_patt.383] -// CHECK:STDOUT: %self.patt: %pattern_type.559 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.363] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_34.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.559 = ref_param_pattern [concrete = constants.%self.param_patt.383] -// CHECK:STDOUT: %self.patt: %pattern_type.559 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.363] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f14 = ref_param_pattern [concrete = constants.%self.param_patt.1c5] -// CHECK:STDOUT: %self.patt: %pattern_type.f14 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f08] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.b7c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.b7c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc8_3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f14 = ref_param_pattern [concrete = constants.%self.param_patt.1c5] -// CHECK:STDOUT: %self.patt: %pattern_type.f14 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f08] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.b7c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.b7c = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -710,8 +551,8 @@ var a: array(1, 1); // CHECK:STDOUT: %.loc8_34.5: init %empty_tuple.type = converted %tuple.elem0, %.loc8_34.4 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_34.6: init %empty_tuple.type to %.loc8_34.3 = in_place_init %.loc8_34.5 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_34.7: init %Array.b7c to %t.var = array_init (%.loc8_34.6) [concrete = constants.%array] -// CHECK:STDOUT: %.loc8_3: init %Array.b7c = converted %F.call, %.loc8_34.7 [concrete = constants.%array] -// CHECK:STDOUT: assign %t.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Array.b7c = converted %F.call, %.loc8_34.7 [concrete = constants.%array] +// CHECK:STDOUT: assign %t.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_28: type = splice_block %Array [concrete = constants.%Array.b7c] { // CHECK:STDOUT: %.loc8_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] @@ -720,60 +561,49 @@ var a: array(1, 1); // CHECK:STDOUT: } // CHECK:STDOUT: %t: ref %Array.b7c = wrapper_binding t, %t.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %t.patt: %pattern_type.f14 = ref_binding_pattern t [concrete = constants.%t.patt] +// CHECK:STDOUT: %t.patt: %pattern_type.f14 = ref_binding_pattern t [concrete = constants.%t.patt.44c] // CHECK:STDOUT: %t.var_patt: %pattern_type.f14 = var_pattern %t.patt [concrete = constants.%t.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_34: = bound_method %.loc8_34.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_34: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_34(%.loc8_34.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_3: = bound_method %t.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_3(%t.var) +// CHECK:STDOUT: %Destroy.facet.loc8_34.1: %Destroy.type = facet_value constants.%tuple.type, (constants.%DestroyImpl.impl_witness.540, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.5d8] +// CHECK:STDOUT: %.loc8_34.8: %Destroy.type = converted constants.%tuple.type, %Destroy.facet.loc8_34.1 [concrete = constants.%Destroy.facet.5d8] +// CHECK:STDOUT: %Destroy.facet.loc8_34.2: %Destroy.type = facet_value constants.%tuple.type, (constants.%DestroyImpl.impl_witness.540, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.5d8] +// CHECK:STDOUT: %.loc8_34.9: %Destroy.type = converted constants.%tuple.type, %Destroy.facet.loc8_34.2 [concrete = constants.%Destroy.facet.5d8] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_34: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc8_34.2) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Array.b7c, (constants.%DestroyImpl.impl_witness.a4c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.e6b] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Array.b7c, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.e6b] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Array.b7c, (constants.%DestroyImpl.impl_witness.a4c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.e6b] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Array.b7c, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.e6b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_3: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%t.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_34.1(%self.param: ref %empty_tuple.type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_34.1(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_34.1(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_34.1(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_34.2(%self.param: ref %tuple.type) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_34.2(%self.param: ref %tuple.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc8_34.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc8_34.1: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_34.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc8_34.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc8_34.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_34.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_34.2(%self.param: ref %tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_34.2(%self.param: ref %tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3(%self.param: ref %Array.b7c) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3(%self.param: ref %Array.b7c) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc8: ref %empty_tuple.type = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3(%self.param: ref %Array.b7c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3(%self.param: ref %Array.b7c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc8_3.1: ref %empty_tuple.type = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/import.carbon b/toolchain/check/testdata/array/import.carbon index 65a6d034bce9..76983aac0633 100644 --- a/toolchain/check/testdata/array/import.carbon +++ b/toolchain/check/testdata/array/import.carbon @@ -58,12 +58,10 @@ fn F() -> i32 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %Array.3b5: type = class_type @Array, @Array(%i32, %int_42) [concrete] -// CHECK:STDOUT: %pattern_type.9c3: type = pattern_type %Array.3b5 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.3c1: %Int.as.Copy.impl.Op.type.a1d = struct_value () [symbolic] @@ -74,19 +72,20 @@ fn F() -> i32 { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6_12.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc6_12.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc6_12.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.421: %pattern_type.9c3 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt.421 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6_12.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc6_12.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc6_12.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete] // CHECK:STDOUT: %int_39: Core.IntLiteral = int_value 39 [concrete] // CHECK:STDOUT: %int_38: Core.IntLiteral = int_value 38 [concrete] @@ -127,47 +126,18 @@ fn F() -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc6_12.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc6_12.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.817: %SubobjectDestroy.type = facet_value %Array.3b5, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.be3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.817) [concrete] +// CHECK:STDOUT: %Destroy.facet.843: %Destroy.type = facet_value %Array.3b5, (%DestroyImpl.impl_witness.be3, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.F: %F.type = import_ref Main//library, F, loaded [concrete = constants.%F] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6_12.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc6_12.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6_12.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9c3 = ref_param_pattern [concrete = constants.%self.param_patt.421] -// CHECK:STDOUT: %self.patt: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.3b5 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.3b5 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc6_12.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9c3 = ref_param_pattern [concrete = constants.%self.param_patt.421] -// CHECK:STDOUT: %self.patt: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.3b5 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.3b5 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%n.param: %i32) -> out %return.param: %i32 { @@ -184,201 +154,355 @@ fn F() -> i32 { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_15.2: = bound_method %.loc6_15.2, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc6_15.2(%.loc6_15.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc6_12.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc6_12.2) +// CHECK:STDOUT: %Destroy.facet.loc6_12.1: %Destroy.type = facet_value constants.%Array.3b5, (constants.%DestroyImpl.impl_witness.be3, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.843] +// CHECK:STDOUT: %.loc6_12.3: %Destroy.type = converted constants.%Array.3b5, %Destroy.facet.loc6_12.1 [concrete = constants.%Destroy.facet.843] +// CHECK:STDOUT: %Destroy.facet.loc6_12.2: %Destroy.type = facet_value constants.%Array.3b5, (constants.%DestroyImpl.impl_witness.be3, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.843] +// CHECK:STDOUT: %.loc6_12.4: %Destroy.type = converted constants.%Array.3b5, %Destroy.facet.loc6_12.2 [concrete = constants.%Destroy.facet.843] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc6_12.2) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_12.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc6_12.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_12.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6_12.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_12.2(%self.param: ref %Array.3b5) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc6_12.2(%self.param: ref %Array.3b5) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete = constants.%int_41] // CHECK:STDOUT: %.loc6_12.1: ref %i32 = array_index %self.param, %int_41 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.1: = bound_method %.loc6_12.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.1(%.loc6_12.1) +// CHECK:STDOUT: %Destroy.facet.loc6_12.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc6_12.1) // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete = constants.%int_40] -// CHECK:STDOUT: %.loc6_12.2: ref %i32 = array_index %self.param, %int_40 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.2: = bound_method %.loc6_12.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.2(%.loc6_12.2) +// CHECK:STDOUT: %.loc6_12.4: ref %i32 = array_index %self.param, %int_40 +// CHECK:STDOUT: %Destroy.facet.loc6_12.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc6_12.4) // CHECK:STDOUT: %int_39: Core.IntLiteral = int_value 39 [concrete = constants.%int_39] -// CHECK:STDOUT: %.loc6_12.3: ref %i32 = array_index %self.param, %int_39 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.3: = bound_method %.loc6_12.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.3(%.loc6_12.3) +// CHECK:STDOUT: %.loc6_12.7: ref %i32 = array_index %self.param, %int_39 +// CHECK:STDOUT: %Destroy.facet.loc6_12.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.8: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.9: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc6_12.7) // CHECK:STDOUT: %int_38: Core.IntLiteral = int_value 38 [concrete = constants.%int_38] -// CHECK:STDOUT: %.loc6_12.4: ref %i32 = array_index %self.param, %int_38 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.4: = bound_method %.loc6_12.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.4(%.loc6_12.4) +// CHECK:STDOUT: %.loc6_12.10: ref %i32 = array_index %self.param, %int_38 +// CHECK:STDOUT: %Destroy.facet.loc6_12.7: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.11: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.7 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.8: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.12: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.8 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc6_12.10) // CHECK:STDOUT: %int_37: Core.IntLiteral = int_value 37 [concrete = constants.%int_37] -// CHECK:STDOUT: %.loc6_12.5: ref %i32 = array_index %self.param, %int_37 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.5: = bound_method %.loc6_12.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.5: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.5(%.loc6_12.5) +// CHECK:STDOUT: %.loc6_12.13: ref %i32 = array_index %self.param, %int_37 +// CHECK:STDOUT: %Destroy.facet.loc6_12.9: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.14: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.9 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.10: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.15: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.10 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.5: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc6_12.13) // CHECK:STDOUT: %int_36: Core.IntLiteral = int_value 36 [concrete = constants.%int_36] -// CHECK:STDOUT: %.loc6_12.6: ref %i32 = array_index %self.param, %int_36 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.6: = bound_method %.loc6_12.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.6: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.6(%.loc6_12.6) +// CHECK:STDOUT: %.loc6_12.16: ref %i32 = array_index %self.param, %int_36 +// CHECK:STDOUT: %Destroy.facet.loc6_12.11: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.17: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.11 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.12: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.18: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.12 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.6: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%.loc6_12.16) // CHECK:STDOUT: %int_35: Core.IntLiteral = int_value 35 [concrete = constants.%int_35] -// CHECK:STDOUT: %.loc6_12.7: ref %i32 = array_index %self.param, %int_35 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.7: = bound_method %.loc6_12.7, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.7(%.loc6_12.7) +// CHECK:STDOUT: %.loc6_12.19: ref %i32 = array_index %self.param, %int_35 +// CHECK:STDOUT: %Destroy.facet.loc6_12.13: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.20: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.13 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.14: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.21: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.14 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.7: init %empty_tuple.type = call %SelfDestruct.specific_fn.7(%.loc6_12.19) // CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [concrete = constants.%int_34] -// CHECK:STDOUT: %.loc6_12.8: ref %i32 = array_index %self.param, %int_34 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.8: = bound_method %.loc6_12.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.8(%.loc6_12.8) +// CHECK:STDOUT: %.loc6_12.22: ref %i32 = array_index %self.param, %int_34 +// CHECK:STDOUT: %Destroy.facet.loc6_12.15: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.23: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.15 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.16: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.24: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.16 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.8: init %empty_tuple.type = call %SelfDestruct.specific_fn.8(%.loc6_12.22) // CHECK:STDOUT: %int_33: Core.IntLiteral = int_value 33 [concrete = constants.%int_33] -// CHECK:STDOUT: %.loc6_12.9: ref %i32 = array_index %self.param, %int_33 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.9: = bound_method %.loc6_12.9, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.9(%.loc6_12.9) +// CHECK:STDOUT: %.loc6_12.25: ref %i32 = array_index %self.param, %int_33 +// CHECK:STDOUT: %Destroy.facet.loc6_12.17: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.26: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.17 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.18: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.27: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.18 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.9: init %empty_tuple.type = call %SelfDestruct.specific_fn.9(%.loc6_12.25) // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %.loc6_12.10: ref %i32 = array_index %self.param, %int_32 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.10: = bound_method %.loc6_12.10, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.10(%.loc6_12.10) +// CHECK:STDOUT: %.loc6_12.28: ref %i32 = array_index %self.param, %int_32 +// CHECK:STDOUT: %Destroy.facet.loc6_12.19: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.29: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.19 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.20: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.30: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.20 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.10: init %empty_tuple.type = call %SelfDestruct.specific_fn.10(%.loc6_12.28) // CHECK:STDOUT: %int_31: Core.IntLiteral = int_value 31 [concrete = constants.%int_31] -// CHECK:STDOUT: %.loc6_12.11: ref %i32 = array_index %self.param, %int_31 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.11: = bound_method %.loc6_12.11, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.11(%.loc6_12.11) +// CHECK:STDOUT: %.loc6_12.31: ref %i32 = array_index %self.param, %int_31 +// CHECK:STDOUT: %Destroy.facet.loc6_12.21: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.32: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.21 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.22: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.33: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.22 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.11: init %empty_tuple.type = call %SelfDestruct.specific_fn.11(%.loc6_12.31) // CHECK:STDOUT: %int_30: Core.IntLiteral = int_value 30 [concrete = constants.%int_30] -// CHECK:STDOUT: %.loc6_12.12: ref %i32 = array_index %self.param, %int_30 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.12: = bound_method %.loc6_12.12, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.12(%.loc6_12.12) +// CHECK:STDOUT: %.loc6_12.34: ref %i32 = array_index %self.param, %int_30 +// CHECK:STDOUT: %Destroy.facet.loc6_12.23: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.35: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.23 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.24: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.36: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.24 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.12: init %empty_tuple.type = call %SelfDestruct.specific_fn.12(%.loc6_12.34) // CHECK:STDOUT: %int_29: Core.IntLiteral = int_value 29 [concrete = constants.%int_29] -// CHECK:STDOUT: %.loc6_12.13: ref %i32 = array_index %self.param, %int_29 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.13: = bound_method %.loc6_12.13, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.13(%.loc6_12.13) +// CHECK:STDOUT: %.loc6_12.37: ref %i32 = array_index %self.param, %int_29 +// CHECK:STDOUT: %Destroy.facet.loc6_12.25: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.38: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.25 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.26: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.39: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.26 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.13: init %empty_tuple.type = call %SelfDestruct.specific_fn.13(%.loc6_12.37) // CHECK:STDOUT: %int_28: Core.IntLiteral = int_value 28 [concrete = constants.%int_28] -// CHECK:STDOUT: %.loc6_12.14: ref %i32 = array_index %self.param, %int_28 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.14: = bound_method %.loc6_12.14, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.14: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.14(%.loc6_12.14) +// CHECK:STDOUT: %.loc6_12.40: ref %i32 = array_index %self.param, %int_28 +// CHECK:STDOUT: %Destroy.facet.loc6_12.27: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.41: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.27 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.28: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.42: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.28 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.14: init %empty_tuple.type = call %SelfDestruct.specific_fn.14(%.loc6_12.40) // CHECK:STDOUT: %int_27: Core.IntLiteral = int_value 27 [concrete = constants.%int_27] -// CHECK:STDOUT: %.loc6_12.15: ref %i32 = array_index %self.param, %int_27 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.15: = bound_method %.loc6_12.15, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.15: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.15(%.loc6_12.15) +// CHECK:STDOUT: %.loc6_12.43: ref %i32 = array_index %self.param, %int_27 +// CHECK:STDOUT: %Destroy.facet.loc6_12.29: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.44: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.29 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.30: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.45: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.30 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.15: init %empty_tuple.type = call %SelfDestruct.specific_fn.15(%.loc6_12.43) // CHECK:STDOUT: %int_26: Core.IntLiteral = int_value 26 [concrete = constants.%int_26] -// CHECK:STDOUT: %.loc6_12.16: ref %i32 = array_index %self.param, %int_26 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.16: = bound_method %.loc6_12.16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.16(%.loc6_12.16) +// CHECK:STDOUT: %.loc6_12.46: ref %i32 = array_index %self.param, %int_26 +// CHECK:STDOUT: %Destroy.facet.loc6_12.31: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.47: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.31 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.32: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.48: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.32 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.16: init %empty_tuple.type = call %SelfDestruct.specific_fn.16(%.loc6_12.46) // CHECK:STDOUT: %int_25: Core.IntLiteral = int_value 25 [concrete = constants.%int_25] -// CHECK:STDOUT: %.loc6_12.17: ref %i32 = array_index %self.param, %int_25 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.17: = bound_method %.loc6_12.17, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.17: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.17(%.loc6_12.17) +// CHECK:STDOUT: %.loc6_12.49: ref %i32 = array_index %self.param, %int_25 +// CHECK:STDOUT: %Destroy.facet.loc6_12.33: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.50: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.33 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.34: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.51: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.34 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.17: init %empty_tuple.type = call %SelfDestruct.specific_fn.17(%.loc6_12.49) // CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [concrete = constants.%int_24] -// CHECK:STDOUT: %.loc6_12.18: ref %i32 = array_index %self.param, %int_24 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.18: = bound_method %.loc6_12.18, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.18: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.18(%.loc6_12.18) +// CHECK:STDOUT: %.loc6_12.52: ref %i32 = array_index %self.param, %int_24 +// CHECK:STDOUT: %Destroy.facet.loc6_12.35: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.53: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.35 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.36: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.54: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.36 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.18: init %empty_tuple.type = call %SelfDestruct.specific_fn.18(%.loc6_12.52) // CHECK:STDOUT: %int_23: Core.IntLiteral = int_value 23 [concrete = constants.%int_23] -// CHECK:STDOUT: %.loc6_12.19: ref %i32 = array_index %self.param, %int_23 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.19: = bound_method %.loc6_12.19, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.19(%.loc6_12.19) +// CHECK:STDOUT: %.loc6_12.55: ref %i32 = array_index %self.param, %int_23 +// CHECK:STDOUT: %Destroy.facet.loc6_12.37: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.56: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.37 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.38: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.57: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.38 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.19: init %empty_tuple.type = call %SelfDestruct.specific_fn.19(%.loc6_12.55) // CHECK:STDOUT: %int_22: Core.IntLiteral = int_value 22 [concrete = constants.%int_22] -// CHECK:STDOUT: %.loc6_12.20: ref %i32 = array_index %self.param, %int_22 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.20: = bound_method %.loc6_12.20, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.20: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.20(%.loc6_12.20) +// CHECK:STDOUT: %.loc6_12.58: ref %i32 = array_index %self.param, %int_22 +// CHECK:STDOUT: %Destroy.facet.loc6_12.39: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.59: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.39 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.40: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.60: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.40 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.20: init %empty_tuple.type = call %SelfDestruct.specific_fn.20(%.loc6_12.58) // CHECK:STDOUT: %int_21: Core.IntLiteral = int_value 21 [concrete = constants.%int_21] -// CHECK:STDOUT: %.loc6_12.21: ref %i32 = array_index %self.param, %int_21 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.21: = bound_method %.loc6_12.21, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.21(%.loc6_12.21) +// CHECK:STDOUT: %.loc6_12.61: ref %i32 = array_index %self.param, %int_21 +// CHECK:STDOUT: %Destroy.facet.loc6_12.41: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.62: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.41 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.42: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.63: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.42 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.21: init %empty_tuple.type = call %SelfDestruct.specific_fn.21(%.loc6_12.61) // CHECK:STDOUT: %int_20: Core.IntLiteral = int_value 20 [concrete = constants.%int_20] -// CHECK:STDOUT: %.loc6_12.22: ref %i32 = array_index %self.param, %int_20 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.22: = bound_method %.loc6_12.22, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.22(%.loc6_12.22) +// CHECK:STDOUT: %.loc6_12.64: ref %i32 = array_index %self.param, %int_20 +// CHECK:STDOUT: %Destroy.facet.loc6_12.43: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.65: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.43 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.44: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.66: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.44 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.22: init %empty_tuple.type = call %SelfDestruct.specific_fn.22(%.loc6_12.64) // CHECK:STDOUT: %int_19: Core.IntLiteral = int_value 19 [concrete = constants.%int_19] -// CHECK:STDOUT: %.loc6_12.23: ref %i32 = array_index %self.param, %int_19 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.23: = bound_method %.loc6_12.23, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.23(%.loc6_12.23) +// CHECK:STDOUT: %.loc6_12.67: ref %i32 = array_index %self.param, %int_19 +// CHECK:STDOUT: %Destroy.facet.loc6_12.45: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.68: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.45 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.46: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.69: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.46 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.23: init %empty_tuple.type = call %SelfDestruct.specific_fn.23(%.loc6_12.67) // CHECK:STDOUT: %int_18: Core.IntLiteral = int_value 18 [concrete = constants.%int_18] -// CHECK:STDOUT: %.loc6_12.24: ref %i32 = array_index %self.param, %int_18 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.24: = bound_method %.loc6_12.24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.24(%.loc6_12.24) +// CHECK:STDOUT: %.loc6_12.70: ref %i32 = array_index %self.param, %int_18 +// CHECK:STDOUT: %Destroy.facet.loc6_12.47: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.71: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.47 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.48: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.72: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.48 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.24: init %empty_tuple.type = call %SelfDestruct.specific_fn.24(%.loc6_12.70) // CHECK:STDOUT: %int_17: Core.IntLiteral = int_value 17 [concrete = constants.%int_17] -// CHECK:STDOUT: %.loc6_12.25: ref %i32 = array_index %self.param, %int_17 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.25: = bound_method %.loc6_12.25, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.25: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.25(%.loc6_12.25) +// CHECK:STDOUT: %.loc6_12.73: ref %i32 = array_index %self.param, %int_17 +// CHECK:STDOUT: %Destroy.facet.loc6_12.49: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.74: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.49 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.50: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.75: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.50 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.25: init %empty_tuple.type = call %SelfDestruct.specific_fn.25(%.loc6_12.73) // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] -// CHECK:STDOUT: %.loc6_12.26: ref %i32 = array_index %self.param, %int_16 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.26: = bound_method %.loc6_12.26, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.26: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.26(%.loc6_12.26) +// CHECK:STDOUT: %.loc6_12.76: ref %i32 = array_index %self.param, %int_16 +// CHECK:STDOUT: %Destroy.facet.loc6_12.51: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.77: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.51 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.52: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.78: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.52 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.26: init %empty_tuple.type = call %SelfDestruct.specific_fn.26(%.loc6_12.76) // CHECK:STDOUT: %int_15: Core.IntLiteral = int_value 15 [concrete = constants.%int_15] -// CHECK:STDOUT: %.loc6_12.27: ref %i32 = array_index %self.param, %int_15 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.27: = bound_method %.loc6_12.27, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.27: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.27(%.loc6_12.27) +// CHECK:STDOUT: %.loc6_12.79: ref %i32 = array_index %self.param, %int_15 +// CHECK:STDOUT: %Destroy.facet.loc6_12.53: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.80: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.53 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.54: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.81: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.54 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.27: init %empty_tuple.type = call %SelfDestruct.specific_fn.27(%.loc6_12.79) // CHECK:STDOUT: %int_14: Core.IntLiteral = int_value 14 [concrete = constants.%int_14] -// CHECK:STDOUT: %.loc6_12.28: ref %i32 = array_index %self.param, %int_14 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.28: = bound_method %.loc6_12.28, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.28: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.28(%.loc6_12.28) +// CHECK:STDOUT: %.loc6_12.82: ref %i32 = array_index %self.param, %int_14 +// CHECK:STDOUT: %Destroy.facet.loc6_12.55: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.83: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.55 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.56: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.84: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.56 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.28: init %empty_tuple.type = call %SelfDestruct.specific_fn.28(%.loc6_12.82) // CHECK:STDOUT: %int_13: Core.IntLiteral = int_value 13 [concrete = constants.%int_13] -// CHECK:STDOUT: %.loc6_12.29: ref %i32 = array_index %self.param, %int_13 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.29: = bound_method %.loc6_12.29, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.29: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.29(%.loc6_12.29) +// CHECK:STDOUT: %.loc6_12.85: ref %i32 = array_index %self.param, %int_13 +// CHECK:STDOUT: %Destroy.facet.loc6_12.57: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.86: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.57 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.58: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.87: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.58 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.29: init %empty_tuple.type = call %SelfDestruct.specific_fn.29(%.loc6_12.85) // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12] -// CHECK:STDOUT: %.loc6_12.30: ref %i32 = array_index %self.param, %int_12 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.30: = bound_method %.loc6_12.30, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.30: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.30(%.loc6_12.30) +// CHECK:STDOUT: %.loc6_12.88: ref %i32 = array_index %self.param, %int_12 +// CHECK:STDOUT: %Destroy.facet.loc6_12.59: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.89: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.59 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.60: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.90: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.60 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.30: init %empty_tuple.type = call %SelfDestruct.specific_fn.30(%.loc6_12.88) // CHECK:STDOUT: %int_11: Core.IntLiteral = int_value 11 [concrete = constants.%int_11] -// CHECK:STDOUT: %.loc6_12.31: ref %i32 = array_index %self.param, %int_11 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.31: = bound_method %.loc6_12.31, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.31: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.31(%.loc6_12.31) +// CHECK:STDOUT: %.loc6_12.91: ref %i32 = array_index %self.param, %int_11 +// CHECK:STDOUT: %Destroy.facet.loc6_12.61: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.92: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.61 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.62: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.93: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.62 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.31: init %empty_tuple.type = call %SelfDestruct.specific_fn.31(%.loc6_12.91) // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10] -// CHECK:STDOUT: %.loc6_12.32: ref %i32 = array_index %self.param, %int_10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.32: = bound_method %.loc6_12.32, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.32: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.32(%.loc6_12.32) +// CHECK:STDOUT: %.loc6_12.94: ref %i32 = array_index %self.param, %int_10 +// CHECK:STDOUT: %Destroy.facet.loc6_12.63: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.95: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.63 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.64: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.96: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.64 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.32: init %empty_tuple.type = call %SelfDestruct.specific_fn.32(%.loc6_12.94) // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9] -// CHECK:STDOUT: %.loc6_12.33: ref %i32 = array_index %self.param, %int_9 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.33: = bound_method %.loc6_12.33, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.33: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.33(%.loc6_12.33) +// CHECK:STDOUT: %.loc6_12.97: ref %i32 = array_index %self.param, %int_9 +// CHECK:STDOUT: %Destroy.facet.loc6_12.65: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.98: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.65 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.66: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.99: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.66 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.33: init %empty_tuple.type = call %SelfDestruct.specific_fn.33(%.loc6_12.97) // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8] -// CHECK:STDOUT: %.loc6_12.34: ref %i32 = array_index %self.param, %int_8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.34: = bound_method %.loc6_12.34, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.34: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.34(%.loc6_12.34) +// CHECK:STDOUT: %.loc6_12.100: ref %i32 = array_index %self.param, %int_8 +// CHECK:STDOUT: %Destroy.facet.loc6_12.67: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.101: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.67 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.68: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.102: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.68 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.34: init %empty_tuple.type = call %SelfDestruct.specific_fn.34(%.loc6_12.100) // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7] -// CHECK:STDOUT: %.loc6_12.35: ref %i32 = array_index %self.param, %int_7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.35: = bound_method %.loc6_12.35, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.35: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.35(%.loc6_12.35) +// CHECK:STDOUT: %.loc6_12.103: ref %i32 = array_index %self.param, %int_7 +// CHECK:STDOUT: %Destroy.facet.loc6_12.69: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.104: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.69 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.70: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.105: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.70 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.35: init %empty_tuple.type = call %SelfDestruct.specific_fn.35(%.loc6_12.103) // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6] -// CHECK:STDOUT: %.loc6_12.36: ref %i32 = array_index %self.param, %int_6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.36: = bound_method %.loc6_12.36, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.36: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.36(%.loc6_12.36) +// CHECK:STDOUT: %.loc6_12.106: ref %i32 = array_index %self.param, %int_6 +// CHECK:STDOUT: %Destroy.facet.loc6_12.71: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.107: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.71 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.72: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.108: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.72 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.36: init %empty_tuple.type = call %SelfDestruct.specific_fn.36(%.loc6_12.106) // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] -// CHECK:STDOUT: %.loc6_12.37: ref %i32 = array_index %self.param, %int_5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.37: = bound_method %.loc6_12.37, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.37: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.37(%.loc6_12.37) +// CHECK:STDOUT: %.loc6_12.109: ref %i32 = array_index %self.param, %int_5 +// CHECK:STDOUT: %Destroy.facet.loc6_12.73: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.110: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.73 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.74: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.111: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.74 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.37: init %empty_tuple.type = call %SelfDestruct.specific_fn.37(%.loc6_12.109) // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] -// CHECK:STDOUT: %.loc6_12.38: ref %i32 = array_index %self.param, %int_4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.38: = bound_method %.loc6_12.38, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.38: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.38(%.loc6_12.38) +// CHECK:STDOUT: %.loc6_12.112: ref %i32 = array_index %self.param, %int_4 +// CHECK:STDOUT: %Destroy.facet.loc6_12.75: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.113: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.75 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.76: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.114: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.76 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.38: init %empty_tuple.type = call %SelfDestruct.specific_fn.38(%.loc6_12.112) // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %.loc6_12.39: ref %i32 = array_index %self.param, %int_3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.39: = bound_method %.loc6_12.39, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.39: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.39(%.loc6_12.39) +// CHECK:STDOUT: %.loc6_12.115: ref %i32 = array_index %self.param, %int_3 +// CHECK:STDOUT: %Destroy.facet.loc6_12.77: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.116: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.77 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.78: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.117: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.78 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.39: init %empty_tuple.type = call %SelfDestruct.specific_fn.39(%.loc6_12.115) // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %.loc6_12.40: ref %i32 = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.40: = bound_method %.loc6_12.40, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.40: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.40(%.loc6_12.40) +// CHECK:STDOUT: %.loc6_12.118: ref %i32 = array_index %self.param, %int_2 +// CHECK:STDOUT: %Destroy.facet.loc6_12.79: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.119: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.79 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.80: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.120: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.80 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.40: init %empty_tuple.type = call %SelfDestruct.specific_fn.40(%.loc6_12.118) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc6_12.41: ref %i32 = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.41: = bound_method %.loc6_12.41, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.41: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.41(%.loc6_12.41) +// CHECK:STDOUT: %.loc6_12.121: ref %i32 = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc6_12.81: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.122: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.81 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.82: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.123: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.82 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.41: init %empty_tuple.type = call %SelfDestruct.specific_fn.41(%.loc6_12.121) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc6_12.42: ref %i32 = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_12.42: = bound_method %.loc6_12.42, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_12.42: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_12.42(%.loc6_12.42) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_12.2(%self.param: ref %Array.3b5) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6_12.2(%self.param: ref %Array.3b5) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc6_12.124: ref %i32 = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc6_12.83: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.125: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.83 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_12.84: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_12.126: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_12.84 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_12.42: init %empty_tuple.type = call %SelfDestruct.specific_fn.42(%.loc6_12.124) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index 5c98b51b13ef..4f5743cf0bc4 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -54,8 +54,6 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %Array.95c: type = class_type @Array, @Array(%i32, %int_3.1ba) [concrete] -// CHECK:STDOUT: %pattern_type.d4e: type = pattern_type %Array.95c [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] @@ -95,23 +93,23 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %int_3.9f3: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %array: %Array.95c = tuple_value (%int_1.68a, %int_2.2e0, %int_3.9f3) [concrete] // CHECK:STDOUT: %.c07: ref %Array.95c = temporary invalid, %array [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_20.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_20.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_20.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e31: %pattern_type.d4e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6c6: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt.e31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_20.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_20.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_20.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.c07, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_20.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_20.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.79c: %SubobjectDestroy.type = facet_value %Array.95c, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.90e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.79c) [concrete] +// CHECK:STDOUT: %Destroy.facet.416: %Destroy.type = facet_value %Array.95c, (%DestroyImpl.impl_witness.90e, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -119,37 +117,8 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_20.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_20.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_20.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d4e = ref_param_pattern [concrete = constants.%self.param_patt.e31] -// CHECK:STDOUT: %self.patt: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.95c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.95c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_20.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d4e = ref_param_pattern [concrete = constants.%self.param_patt.e31] -// CHECK:STDOUT: %self.patt: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.95c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.95c = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%arr.param: %Array.95c, %i.param: %i32) -> out %return.param: %i32 { @@ -215,44 +184,43 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_23 [concrete = constants.%int_1.68a] // CHECK:STDOUT: %.loc10_23.2: %i32 = converted %int_1.loc10_23, %.loc10_23.1 [concrete = constants.%int_1.68a] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc10_20.15, %.loc10_23.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c07) +// CHECK:STDOUT: %Destroy.facet.loc10_20.1: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc10_20.16: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc10_20.1 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %Destroy.facet.loc10_20.2: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc10_20.17: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc10_20.2 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc10_20.14) // CHECK:STDOUT: return %F.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_20.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_20.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_20.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_20.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_20.2(%self.param: ref %Array.95c) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_20.2(%self.param: ref %Array.95c) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc10_20.1: ref %i32 = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_20.1: = bound_method %.loc10_20.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_20.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_20.1(%.loc10_20.1) +// CHECK:STDOUT: %Destroy.facet.loc10_20.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc10_20.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_20.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc10_20.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc10_20.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_20.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_20.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_20.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %.loc10_20.2: ref %i32 = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_20.2: = bound_method %.loc10_20.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_20.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_20.2(%.loc10_20.2) +// CHECK:STDOUT: %.loc10_20.4: ref %i32 = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc10_20.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc10_20.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_20.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc10_20.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc10_20.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_20.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_20.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_20.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc10_20.3: ref %i32 = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_20.3: = bound_method %.loc10_20.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_20.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_20.3(%.loc10_20.3) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_20.2(%self.param: ref %Array.95c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_20.2(%self.param: ref %Array.95c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc10_20.7: ref %i32 = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc10_20.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc10_20.8: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_20.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc10_20.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc10_20.9: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_20.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_20.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc10_20.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/init_dependent_bound.carbon b/toolchain/check/testdata/array/init_dependent_bound.carbon index 6a2dea1e25b3..4f666b74e92f 100644 --- a/toolchain/check/testdata/array/init_dependent_bound.carbon +++ b/toolchain/check/testdata/array/init_dependent_bound.carbon @@ -67,25 +67,30 @@ fn H() { G(3); } // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Array.744: type = class_type @Array, @Array(%T, %int_0) [symbolic] +// CHECK:STDOUT: %Array.744: type = class_type @Array, @Array(%T.67d, %int_0) [symbolic] // CHECK:STDOUT: %require_complete.d2d: = require_complete_type %Array.744 [symbolic] // CHECK:STDOUT: %pattern_type.197: type = pattern_type %Array.744 [symbolic] // CHECK:STDOUT: %arr.patt.a3c: %pattern_type.197 = ref_binding_pattern arr [symbolic] // CHECK:STDOUT: %arr.var_patt.aeb: %pattern_type.197 = var_pattern %arr.patt.a3c [symbolic] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %array.3f3: %Array.744 = tuple_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.95f: = lookup_impl_witness %Array.744, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.047: %Destroy.type = facet_value %Array.744, (%Destroy.lookup_impl_witness.95f) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.41c: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.047) [symbolic] -// CHECK:STDOUT: %.094: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.41c, %Destroy.facet.047 [symbolic] -// CHECK:STDOUT: %impl.elem2: %.094 = impl_witness_access %Destroy.lookup_impl_witness.95f, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.06e: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.047) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.140: = lookup_impl_witness %Array.744, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.2ad: = lookup_impl_witness %Array.744, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.b3e: %SubobjectDestroy.type = facet_value %Array.744, (%SubobjectDestroy.lookup_impl_witness.2ad) [symbolic] +// CHECK:STDOUT: %.b07: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b3e) [symbolic] +// CHECK:STDOUT: %Destroy.facet.5cf: %Destroy.type = facet_value %Array.744, (%DestroyImpl.lookup_impl_witness.140, %SubobjectDestroy.lookup_impl_witness.2ad) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %Array.184: type = class_type @Array, @Array(%C, %int_0) [concrete] // CHECK:STDOUT: %array_type.988: type = array_type %int_0, %C [concrete] @@ -94,35 +99,19 @@ fn H() { G(3); } // CHECK:STDOUT: %arr.patt.081: %pattern_type.feb = ref_binding_pattern arr [concrete] // CHECK:STDOUT: %arr.var_patt.c85: %pattern_type.feb = var_pattern %arr.patt.081 [concrete] // CHECK:STDOUT: %array.27e: %Array.184 = tuple_value () [concrete] -// CHECK:STDOUT: %self.param_patt.519: %pattern_type.feb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3b3: %pattern_type.feb = wrapper_binding_pattern self, %self.param_patt.519 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f: = custom_witness (%Destroy.WithSelf.Op.403, %Destroy.WithSelf.SubobjectDestroy.d01, %Destroy.WithSelf.SelfDestruct.db3), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.bda: %Destroy.type = facet_value %Array.184, (%custom_witness.f8f) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.aa0: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.bda) [concrete] -// CHECK:STDOUT: %.072: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.aa0, %Destroy.facet.bda [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.466: %SubobjectDestroy.type = facet_value %Array.184, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.714: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.466) [concrete] +// CHECK:STDOUT: %.426: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.466) [concrete] +// CHECK:STDOUT: %Destroy.facet.29c: %Destroy.type = facet_value %Array.184, (%DestroyImpl.impl_witness.714, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.cac: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.29c) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.feb = ref_param_pattern [concrete = constants.%self.param_patt.519] -// CHECK:STDOUT: %self.patt: %pattern_type.feb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3b3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.184 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.184 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.feb = ref_param_pattern [concrete = constants.%self.param_patt.519] -// CHECK:STDOUT: %self.patt: %pattern_type.feb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3b3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.184 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.184 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G(%T.loc4_15.2: type) { @@ -135,12 +124,12 @@ fn H() { G(3); } // CHECK:STDOUT: %arr.patt.loc7_17.2: @G.%pattern_type (%pattern_type.197) = ref_binding_pattern arr [symbolic = %arr.patt.loc7_17.2 (constants.%arr.patt.a3c)] // CHECK:STDOUT: %arr.var_patt.loc7_3.2: @G.%pattern_type (%pattern_type.197) = var_pattern %arr.patt.loc7_17.2 [symbolic = %arr.var_patt.loc7_3.2 (constants.%arr.var_patt.aeb)] // CHECK:STDOUT: %array: @G.%Array.loc7_29.2 (%Array.744) = tuple_value () [symbolic = %array (constants.%array.3f3)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Array.loc7_29.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.95f)] -// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value %Array.loc7_29.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.047)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc7_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.41c)] -// CHECK:STDOUT: %.loc7_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc7_3.3 [symbolic = %.loc7_3.4 (constants.%.094)] -// CHECK:STDOUT: %impl.elem2.loc7_3.2: @G.%.loc7_3.4 (%.094) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem2.loc7_3.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc7_3.3) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.06e)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %Array.loc7_29.2, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.2ad)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %Array.loc7_29.2, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.b3e)] +// CHECK:STDOUT: %.loc7_3.4: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc7_3.4 (constants.%.b07)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %Array.loc7_29.2, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.140)] +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value %Array.loc7_29.2, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.5cf)] +// CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -150,46 +139,34 @@ fn H() { G(3); } // CHECK:STDOUT: %.loc7_3.1: init @G.%Array.loc7_29.2 (%Array.744) = converted %.loc7_34.1, %.loc7_34.2 [symbolic = %array (constants.%array.3f3)] // CHECK:STDOUT: assign %arr.var, %.loc7_3.1 // CHECK:STDOUT: %.loc7_29: type = splice_block %Array.loc7_29.1 [symbolic = %Array.loc7_29.2 (constants.%Array.744)] { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.67d)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %Array.loc7_29.1: type = class_type @Array, @Array(constants.%T, constants.%int_0) [symbolic = %Array.loc7_29.2 (constants.%Array.744)] +// CHECK:STDOUT: %Array.loc7_29.1: type = class_type @Array, @Array(constants.%T.67d, constants.%int_0) [symbolic = %Array.loc7_29.2 (constants.%Array.744)] // CHECK:STDOUT: } // CHECK:STDOUT: %arr: ref @G.%Array.loc7_29.2 (%Array.744) = wrapper_binding arr, %arr.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %arr.patt.loc7_17.1: @G.%pattern_type (%pattern_type.197) = ref_binding_pattern arr [symbolic = %arr.patt.loc7_17.2 (constants.%arr.patt.a3c)] // CHECK:STDOUT: %arr.var_patt.loc7_3.1: @G.%pattern_type (%pattern_type.197) = var_pattern %arr.patt.loc7_17.1 [symbolic = %arr.var_patt.loc7_3.2 (constants.%arr.var_patt.aeb)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem2.loc7_3.1: @G.%.loc7_3.4 (%.094) = impl_witness_access constants.%Destroy.lookup_impl_witness.95f, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %arr.var, %impl.elem2.loc7_3.1 -// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Array.744, (constants.%Destroy.lookup_impl_witness.95f) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.047)] -// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Array.744, %Destroy.facet.loc7_3.1 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.047)] -// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Array.744, (constants.%Destroy.lookup_impl_witness.95f) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.047)] -// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Array.744, %Destroy.facet.loc7_3.2 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.047)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem2.loc7_3.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.047) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.06e)] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %arr.var, %specific_impl_fn.loc7_3.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%arr.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Array.744, (constants.%DestroyImpl.lookup_impl_witness.140, constants.%SubobjectDestroy.lookup_impl_witness.2ad) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.5cf)] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Array.744, %Destroy.facet.loc7_3.1 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.5cf)] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Array.744, (constants.%DestroyImpl.lookup_impl_witness.140, constants.%SubobjectDestroy.lookup_impl_witness.2ad) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.5cf)] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Array.744, %Destroy.facet.loc7_3.2 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.5cf)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%arr.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %Array.184) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7(%self.param: ref %Array.184) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %Array.184) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %Array.184) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_15.1 => constants.%T +// CHECK:STDOUT: specific @G(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc4_15.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%C) { -// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc4_15.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -199,12 +176,12 @@ fn H() { G(3); } // CHECK:STDOUT: %arr.patt.loc7_17.2 => constants.%arr.patt.081 // CHECK:STDOUT: %arr.var_patt.loc7_3.2 => constants.%arr.var_patt.c85 // CHECK:STDOUT: %array => constants.%array.27e -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f -// CHECK:STDOUT: %Destroy.facet.loc7_3.3 => constants.%Destroy.facet.bda -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.aa0 -// CHECK:STDOUT: %.loc7_3.4 => constants.%.072 -// CHECK:STDOUT: %impl.elem2.loc7_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3 +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness => constants.%custom_witness.b80 +// CHECK:STDOUT: %SubobjectDestroy.facet => constants.%SubobjectDestroy.facet.466 +// CHECK:STDOUT: %.loc7_3.4 => constants.%.426 +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness => constants.%DestroyImpl.impl_witness.714 +// CHECK:STDOUT: %Destroy.facet.loc7_3.3 => constants.%Destroy.facet.29c +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.cac // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- init_template_dependent_bound.carbon @@ -234,16 +211,12 @@ fn H() { G(3); } // CHECK:STDOUT: %tuple.2d5: %tuple.type.37f = tuple_value (%int_1.5b8115.1, %int_2.ecc8af.1, %int_3.1ba) [concrete] // CHECK:STDOUT: %tuple.type.f7a: type = tuple_type () [concrete] // CHECK:STDOUT: %.5d6: %.537 = splice_inst @G.%tuple.elem0 [template] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.869: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self.0e7) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.c97: %Destroy.WithSelf.SelfDestruct.type.869 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.df0 [concrete] -// CHECK:STDOUT: %.8cb: type = type_of_inst @G.%.loc6_3.8 [template] -// CHECK:STDOUT: %.c23: %.8cb = splice_inst @G.%.loc6_3.8 [template] -// CHECK:STDOUT: %.57c: type = type_of_inst @G.%.loc6_3.11 [template] -// CHECK:STDOUT: %.e63: %.57c = splice_inst @G.%.loc6_3.11 [template] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %.8e2: type = type_of_inst @G.%.loc6_3.6 [template] +// CHECK:STDOUT: %.9bf: %.8e2 = splice_inst @G.%.loc6_3.6 [template] // CHECK:STDOUT: %ImplicitAs.type.6b0: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] @@ -338,75 +311,41 @@ fn H() { G(3); } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %tuple.242: %tuple.type.f7a = tuple_value (%inst.splice_block.426619.3) [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc6_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc6_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e31: %pattern_type.d4e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6c6: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt.e31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc6_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc6_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.2: = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01daf.2, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.9fc: %Destroy.type = facet_value %Array.95c1f3.1, (%custom_witness.f8f19d.2) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.2c0: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.9fc) [concrete] -// CHECK:STDOUT: %.d27: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.2c0, %Destroy.facet.9fc [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc6_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc6_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.79c: %SubobjectDestroy.type = facet_value %Array.95c1f3.1, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.90e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.79c) [concrete] +// CHECK:STDOUT: %Destroy.facet.4164cf.1: %Destroy.type = facet_value %Array.95c1f3.1, (%DestroyImpl.impl_witness.90e, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.4: = inst_value [concrete] { -// CHECK:STDOUT: %.e1c: = splice_block %bound_method.592 { +// CHECK:STDOUT: %.de2: init %empty_tuple.type = splice_block %SelfDestruct.call { // CHECK:STDOUT: %.202040.1: ref %Array.95c1f3.1 = specific_inst @G.%arr.var, @G(%int_3.9f3) -// CHECK:STDOUT: %impl.elem2: %.d27 = impl_witness_access %custom_witness.f8f19d.2, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.2] -// CHECK:STDOUT: %bound_method.592: = bound_method %.202040.1, %impl.elem2 +// CHECK:STDOUT: %Destroy.facet.4164cf.2: %Destroy.type = facet_value %Array.95c1f3.1, (%DestroyImpl.impl_witness.90e, %custom_witness.b80ef6.2) [concrete = %Destroy.facet.4164cf.1] +// CHECK:STDOUT: %.c19077.1: %Destroy.type = converted %Array.95c1f3.1, %Destroy.facet.4164cf.2 [concrete = %Destroy.facet.4164cf.1] +// CHECK:STDOUT: %Destroy.facet.4164cf.3: %Destroy.type = facet_value %Array.95c1f3.1, (%DestroyImpl.impl_witness.90e, %custom_witness.b80ef6.2) [concrete = %Destroy.facet.4164cf.1] +// CHECK:STDOUT: %.c19077.2: %Destroy.type = converted %Array.95c1f3.1, %Destroy.facet.4164cf.3 [concrete = %Destroy.facet.4164cf.1] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.cd831d.2(%.202040.1) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %.e1c(%.202040.1) -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.df0: @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct.type (%Destroy.WithSelf.SelfDestruct.type.869) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct (constants.%Destroy.WithSelf.SelfDestruct.c97)] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.ed0: @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert.type (%Int.as.ImplicitAs.impl.Convert.type.dfd) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert (constants.%Int.as.ImplicitAs.impl.Convert.914)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.b7c = impl_witness_table (%Core.import_ref.ed0), @Int.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc6_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d4e = ref_param_pattern [concrete = constants.%self.param_patt.e31] -// CHECK:STDOUT: %self.patt: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.95c1f3.1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.95c1f3.1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc6_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d4e = ref_param_pattern [concrete = constants.%self.param_patt.e31] -// CHECK:STDOUT: %self.patt: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.95c1f3.1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.95c1f3.1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G(%N.loc4_16.2: %i32) { @@ -424,15 +363,12 @@ fn H() { G(3); } // CHECK:STDOUT: %pattern_type: type = pattern_type %.loc6_31.9 [template = %pattern_type (constants.%pattern_type.fcb)] // CHECK:STDOUT: %arr.patt.loc6_17.2: @G.%pattern_type (%pattern_type.fcb) = ref_binding_pattern arr [template = %arr.patt.loc6_17.2 (constants.%arr.patt.c8d)] // CHECK:STDOUT: %arr.var_patt.loc6_3.2: @G.%pattern_type (%pattern_type.fcb) = var_pattern %arr.patt.loc6_17.2 [template = %arr.var_patt.loc6_3.2 (constants.%arr.var_patt.1e0)] -// CHECK:STDOUT: %.loc6_3.6: %tuple.type.f7a = initialize_action %.loc6_43, %.loc6_31.9, %arr.var, none, false [template] -// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc6_3.6, element0 [template] -// CHECK:STDOUT: %.loc6_3.7: @G.%.loc6_31.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc6_3.7 (constants.%.5d6)] -// CHECK:STDOUT: %.loc6_3.8: = compound_member_access_action %arr.var, constants.%assoc2 [template] -// CHECK:STDOUT: %.loc6_3.9: type = type_of_inst %.loc6_3.8 [template = %.loc6_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc6_3.10: @G.%.loc6_3.9 (%.8cb) = splice_inst %.loc6_3.8 [template = %.loc6_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc6_3.11: = call_action (%.loc6_3.3), true [template] -// CHECK:STDOUT: %.loc6_3.12: type = type_of_inst %.loc6_3.11 [template = %.loc6_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc6_3.13: @G.%.loc6_3.12 (%.57c) = splice_inst %.loc6_3.11 [template = %.loc6_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc6_3.4: %tuple.type.f7a = initialize_action %.loc6_43, %.loc6_31.9, %arr.var, none, false [template] +// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc6_3.4, element0 [template] +// CHECK:STDOUT: %.loc6_3.5: @G.%.loc6_31.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc6_3.5 (constants.%.5d6)] +// CHECK:STDOUT: %.loc6_3.6: = call_action (constants.%SelfDestruct, %arr.var), true [template] +// CHECK:STDOUT: %.loc6_3.7: type = type_of_inst %.loc6_3.6 [template = %.loc6_3.7 (constants.%.8e2)] +// CHECK:STDOUT: %.loc6_3.8: @G.%.loc6_3.7 (%.8e2) = splice_inst %.loc6_3.6 [template = %.loc6_3.8 (constants.%.9bf)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -441,7 +377,7 @@ fn H() { G(3); } // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc8af.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc6_43: %tuple.type.37f = tuple_literal (%int_1, %int_2, %int_3) [concrete = constants.%tuple.2d5] -// CHECK:STDOUT: %.loc6_3.1: @G.%.loc6_31.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc6_3.7 (constants.%.5d6)] +// CHECK:STDOUT: %.loc6_3.1: @G.%.loc6_31.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc6_3.5 (constants.%.5d6)] // CHECK:STDOUT: assign %arr.var, %.loc6_3.1 // CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.4 [template = %.loc6_31.9 (constants.%.537)] { // CHECK:STDOUT: %i32.loc6: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -456,48 +392,40 @@ fn H() { G(3); } // CHECK:STDOUT: %arr.patt.loc6_17.1: @G.%pattern_type (%pattern_type.fcb) = ref_binding_pattern arr [template = %arr.patt.loc6_17.2 (constants.%arr.patt.c8d)] // CHECK:STDOUT: %arr.var_patt.loc6_3.1: @G.%pattern_type (%pattern_type.fcb) = var_pattern %arr.patt.loc6_17.1 [template = %arr.var_patt.loc6_3.2 (constants.%arr.var_patt.1e0)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_3.2: type = type_of_inst %.loc6_3.8 [template = %.loc6_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc6_3.3: @G.%.loc6_3.9 (%.8cb) = splice_inst %.loc6_3.8 [template = %.loc6_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc6_3.4: type = type_of_inst %.loc6_3.11 [template = %.loc6_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc6_3.5: @G.%.loc6_3.12 (%.57c) = splice_inst %.loc6_3.11 [template = %.loc6_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc6_3.2: type = type_of_inst %.loc6_3.6 [template = %.loc6_3.7 (constants.%.8e2)] +// CHECK:STDOUT: %.loc6_3.3: @G.%.loc6_3.7 (%.8e2) = splice_inst %.loc6_3.6 [template = %.loc6_3.8 (constants.%.9bf)] // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc6_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.2(%self.param: ref %Array.95c1f3.1) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc6_3.2(%self.param: ref %Array.95c1f3.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc8af.1] // CHECK:STDOUT: %.loc6_3.1: ref %i32 = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_3.1: = bound_method %.loc6_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_3.1(%.loc6_3.1) +// CHECK:STDOUT: %Destroy.facet.loc6_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc6_3.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8115.1] -// CHECK:STDOUT: %.loc6_3.2: ref %i32 = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_3.2: = bound_method %.loc6_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_3.2(%.loc6_3.2) +// CHECK:STDOUT: %.loc6_3.4: ref %i32 = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc6_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc6_3.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c61a1.1] -// CHECK:STDOUT: %.loc6_3.3: ref %i32 = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6_3.3: = bound_method %.loc6_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6_3.3(%.loc6_3.3) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_3.2(%self.param: ref %Array.95c1f3.1) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6_3.2(%self.param: ref %Array.95c1f3.1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc6_3.7: ref %i32 = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc6_3.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_3.8: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_3.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_3.9: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc6_3.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -522,14 +450,11 @@ fn H() { G(3); } // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d4e // CHECK:STDOUT: %arr.patt.loc6_17.2 => constants.%arr.patt.403 // CHECK:STDOUT: %arr.var_patt.loc6_3.2 => constants.%arr.var_patt.074 -// CHECK:STDOUT: %.loc6_3.6 => constants.%tuple.242 +// CHECK:STDOUT: %.loc6_3.4 => constants.%tuple.242 // CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.3 -// CHECK:STDOUT: %.loc6_3.7 => constants.%array -// CHECK:STDOUT: %.loc6_3.8 => constants.%inst.splice_block.426619.4 -// CHECK:STDOUT: %.loc6_3.9 => -// CHECK:STDOUT: %.loc6_3.10 => -// CHECK:STDOUT: %.loc6_3.11 => constants.%inst.call -// CHECK:STDOUT: %.loc6_3.12 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc6_3.13 => +// CHECK:STDOUT: %.loc6_3.5 => constants.%array +// CHECK:STDOUT: %.loc6_3.6 => constants.%inst.splice_block.426619.4 +// CHECK:STDOUT: %.loc6_3.7 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc6_3.8 => // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/basics.carbon b/toolchain/check/testdata/as/basics.carbon index a550a89628b3..23b8b993c3ff 100644 --- a/toolchain/check/testdata/as/basics.carbon +++ b/toolchain/check/testdata/as/basics.carbon @@ -201,7 +201,6 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %pattern_type.6cb: type = pattern_type %X [concrete] // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] @@ -210,78 +209,32 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %tuple.type.359: type = tuple_type (%X, %X) [concrete] // CHECK:STDOUT: %pattern_type.3ee: type = pattern_type %tuple.type.359 [concrete] // CHECK:STDOUT: %a.patt: %pattern_type.3ee = value_binding_pattern a [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_40.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc13_40.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_40.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc13_40.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_40.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_40.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc5) [concrete] +// CHECK:STDOUT: %Destroy.facet.689: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.e12, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.3ee = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.3ee = var_pattern %b.patt [concrete] -// CHECK:STDOUT: %self.param_patt.bc5: %pattern_type.3ee = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.15e: %pattern_type.3ee = wrapper_binding_pattern self, %self.param_patt.bc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.8c9: %SubobjectDestroy.type = facet_value %tuple.type.359, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.543: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.8c9) [concrete] +// CHECK:STDOUT: %Destroy.facet.38d: %Destroy.type = facet_value %tuple.type.359, (%DestroyImpl.impl_witness.543, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_40.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc13_40.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_40.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc13_40.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3ee = ref_param_pattern [concrete = constants.%self.param_patt.bc5] -// CHECK:STDOUT: %self.patt: %pattern_type.3ee = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.15e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.359 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.359 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc20 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3ee = ref_param_pattern [concrete = constants.%self.param_patt.bc5] -// CHECK:STDOUT: %self.patt: %pattern_type.3ee = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.15e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.359 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.359 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Let() { @@ -313,34 +266,24 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %a.patt: %pattern_type.3ee = value_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13_40: = bound_method %.loc13_40.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_40: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13_40(%.loc13_40.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13_32: = bound_method %.loc13_32.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_32: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13_32(%.loc13_32.2) +// CHECK:STDOUT: %Destroy.facet.loc13_40.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc13_40.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc13_40.1 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc13_40.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc13_40.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc13_40.2 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13_40: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc13_40.2) +// CHECK:STDOUT: %Destroy.facet.loc13_32.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc13_32.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc13_32.1 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc13_32.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc13_32.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc13_32.2 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13_32: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc13_32.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_40.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_40.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_40.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_40.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_40.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_40.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Var() { // CHECK:STDOUT: !entry: @@ -357,8 +300,8 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %.loc20_51.1: %tuple.type.693 = tuple_literal (%X.ref.loc20_47, %X.ref.loc20_50) [concrete = constants.%tuple] // CHECK:STDOUT: %.loc20_51.2: type = converted %.loc20_51.1, constants.%tuple.type.359 [concrete = constants.%tuple.type.359] // CHECK:STDOUT: %.loc20_41.2: init %tuple.type.359 to %b.var = tuple_init (%Make.call.loc20_32, %Make.call.loc20_40) -// CHECK:STDOUT: %.loc20_3: init %tuple.type.359 = converted %.loc20_41.1, %.loc20_41.2 -// CHECK:STDOUT: assign %b.var, %.loc20_3 +// CHECK:STDOUT: %.loc20_3.1: init %tuple.type.359 = converted %.loc20_41.1, %.loc20_41.2 +// CHECK:STDOUT: assign %b.var, %.loc20_3.1 // CHECK:STDOUT: %.loc20_22.1: type = splice_block %.loc20_22.3 [concrete = constants.%tuple.type.359] { // CHECK:STDOUT: %X.ref.loc20_18: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %X.ref.loc20_21: type = name_ref X, file.%X.decl [concrete = constants.%X] @@ -370,30 +313,33 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %b.patt: %pattern_type.3ee = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.3ee = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc20_3.1: %Destroy.type = facet_value constants.%tuple.type.359, (constants.%DestroyImpl.impl_witness.543, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.38d] +// CHECK:STDOUT: %.loc20_3.2: %Destroy.type = converted constants.%tuple.type.359, %Destroy.facet.loc20_3.1 [concrete = constants.%Destroy.facet.38d] +// CHECK:STDOUT: %Destroy.facet.loc20_3.2: %Destroy.type = facet_value constants.%tuple.type.359, (constants.%DestroyImpl.impl_witness.543, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.38d] +// CHECK:STDOUT: %.loc20_3.3: %Destroy.type = converted constants.%tuple.type.359, %Destroy.facet.loc20_3.2 [concrete = constants.%Destroy.facet.38d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%b.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20(%self.param: ref %tuple.type.359) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20(%self.param: ref %tuple.type.359) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %X = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc20_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc20_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc20_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc20_3.1: %Destroy.type = converted constants.%X, %Destroy.facet.loc20_3.1 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc20_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc20_3.2: %Destroy.type = converted constants.%X, %Destroy.facet.loc20_3.2 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc20_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %X = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc20_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc20_3.2(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20(%self.param: ref %tuple.type.359) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20(%self.param: ref %tuple.type.359) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc20_3.3: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc20_3.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc20_3.3 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc20_3.4: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc20_3.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc20_3.4 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc20_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -413,52 +359,22 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] // CHECK:STDOUT: %x.patt: %pattern_type.6cb = ref_binding_pattern x [concrete] // CHECK:STDOUT: %x.var_patt: %pattern_type.6cb = var_pattern %x.patt [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc5) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.e12, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc24_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Value(%n.param: %X) { @@ -494,8 +410,8 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.var: ref %X = var_storage %x.var_patt // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] -// CHECK:STDOUT: %.loc24: ref %X = splice_block %x.var {} -// CHECK:STDOUT: %Make.call: init %X to %.loc24 = call %Make.ref() +// CHECK:STDOUT: %.loc24_3.1: ref %X = splice_block %x.var {} +// CHECK:STDOUT: %Make.call: init %X to %.loc24_3.1 = call %Make.ref() // CHECK:STDOUT: %X.ref.loc24_32: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: assign %x.var, %Make.call // CHECK:STDOUT: %X.ref.loc24_17: type = name_ref X, file.%X.decl [concrete = constants.%X] @@ -504,32 +420,18 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %x.patt: %pattern_type.6cb = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.6cb = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%X, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- overloaded.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/const.carbon b/toolchain/check/testdata/as/const.carbon index fc7d3604aee0..b1bbd3c316bf 100644 --- a/toolchain/check/testdata/as/const.carbon +++ b/toolchain/check/testdata/as/const.carbon @@ -90,7 +90,6 @@ fn Use() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %pattern_type.6cb: type = pattern_type %X [concrete] // CHECK:STDOUT: %Init.type: type = fn_type @Init [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Init: %Init.type = struct_value () [concrete] @@ -106,80 +105,30 @@ fn Use() { // CHECK:STDOUT: %reference.var: ref %const = var_storage file.%reference.var_patt [concrete] // CHECK:STDOUT: %addr.daa: %ptr.faf = addr_of %reference.var [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.7f7 = value_binding_pattern b [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b9b: %pattern_type.dfd = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a99: %pattern_type.dfd = wrapper_binding_pattern self, %self.param_patt.b9b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc14_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b0a: %SubobjectDestroy.type = facet_value %const, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cd3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b0a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %const, (%DestroyImpl.impl_witness.cd3, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc14_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc14_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dfd = ref_param_pattern [concrete = constants.%self.param_patt.b9b] -// CHECK:STDOUT: %self.patt: %pattern_type.dfd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a99] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %const = ref_param call_param0 -// CHECK:STDOUT: %self: ref %const = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc14_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dfd = ref_param_pattern [concrete = constants.%self.param_patt.b9b] -// CHECK:STDOUT: %self.patt: %pattern_type.dfd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a99] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %const = ref_param call_param0 -// CHECK:STDOUT: %self: ref %const = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Use() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %i.var: ref %const = var_storage %i.var_patt // CHECK:STDOUT: %Init.ref: %Init.type = name_ref Init, file.%Init.decl [concrete = constants.%Init] -// CHECK:STDOUT: %.loc14_3: ref %const = splice_block %i.var {} -// CHECK:STDOUT: %Init.call: init %X to %.loc14_3 = call %Init.ref() +// CHECK:STDOUT: %.loc14_3.1: ref %const = splice_block %i.var {} +// CHECK:STDOUT: %Init.call: init %X to %.loc14_3.1 = call %Init.ref() // CHECK:STDOUT: %X.ref.loc14_43: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %const.loc14_37: type = const_type %X.ref.loc14_43 [concrete = constants.%const] // CHECK:STDOUT: %.loc14_34.1: init %const = as_compatible %Init.call @@ -237,44 +186,21 @@ fn Use() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %b.patt: %pattern_type.7f7 = value_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %i.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%i.var) +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%const, (constants.%DestroyImpl.impl_witness.cd3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%const, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%const, (constants.%DestroyImpl.impl_witness.cd3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%const, %Destroy.facet.loc14_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%i.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_3.1(%self.param: ref %empty_struct_type) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_3.3(%self.param: ref %const) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.3(%self.param: ref %const) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.3(%self.param: ref %const) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_3.3(%self.param: ref %const) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -297,60 +223,30 @@ fn Use() { // CHECK:STDOUT: %i.patt: %pattern_type.6cb = ref_binding_pattern i [concrete] // CHECK:STDOUT: %i.var_patt: %pattern_type.6cb = var_pattern %i.patt [concrete] // CHECK:STDOUT: %v.patt: %pattern_type.6cb = value_binding_pattern v [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc12_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc5) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.e12, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc12_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc12_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Use() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %i.var: ref %X = var_storage %i.var_patt // CHECK:STDOUT: %Init.ref: %Init.type = name_ref Init, file.%Init.decl [concrete = constants.%Init] -// CHECK:STDOUT: %.loc12_3: ref %X = splice_block %i.var {} -// CHECK:STDOUT: %Init.call: init %const to %.loc12_3 = call %Init.ref() +// CHECK:STDOUT: %.loc12_3.1: ref %X = splice_block %i.var {} +// CHECK:STDOUT: %Init.call: init %const to %.loc12_3.1 = call %Init.ref() // CHECK:STDOUT: %X.ref.loc12_31: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %.loc12_28.1: init %X = as_compatible %Init.call // CHECK:STDOUT: %.loc12_28.2: init %X = converted %Init.call, %.loc12_28.1 @@ -370,32 +266,18 @@ fn Use() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: %pattern_type.6cb = value_binding_pattern v [concrete = constants.%v.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %i.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%i.var) +// CHECK:STDOUT: %Destroy.facet.loc12_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_3.2: %Destroy.type = converted constants.%X, %Destroy.facet.loc12_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc12_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_3.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc12_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%i.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/as/maybe_unformed.carbon b/toolchain/check/testdata/as/maybe_unformed.carbon index 112dca0807e0..efe301eb6d42 100644 --- a/toolchain/check/testdata/as/maybe_unformed.carbon +++ b/toolchain/check/testdata/as/maybe_unformed.carbon @@ -188,7 +188,6 @@ fn Use() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %pattern_type.6cb: type = pattern_type %X [concrete] // CHECK:STDOUT: %Init.type: type = fn_type @Init [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Init: %Init.type = struct_value () [concrete] @@ -202,107 +201,34 @@ fn Use() { // CHECK:STDOUT: %As.type.116: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.116 = struct_value () [concrete] // CHECK:STDOUT: %v.patt: %pattern_type.55d = value_binding_pattern v [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc15_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc15_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.b19: type = pattern_type %.f01 [concrete] -// CHECK:STDOUT: %self.param_patt.64e: %pattern_type.b19 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.00a: %pattern_type.b19 = wrapper_binding_pattern self, %self.param_patt.64e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc15_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0a9: %pattern_type.55d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.280: %pattern_type.55d = wrapper_binding_pattern self, %self.param_patt.0a9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc15_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.4df: %SubobjectDestroy.type = facet_value %MaybeUnformed.67f, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.8e6: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.4df) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %MaybeUnformed.67f, (%DestroyImpl.impl_witness.8e6, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .MaybeUnformed = %Core.MaybeUnformed // CHECK:STDOUT: .As = %Core.As -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.MaybeUnformed: %MaybeUnformed.type = import_ref Core//prelude/parts/maybe_unformed, MaybeUnformed, loaded [concrete = constants.%MaybeUnformed.generic] // CHECK:STDOUT: %Core.As: %As.type.116 = import_ref Core//prelude/parts/as, As, loaded [concrete = constants.%As.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc15_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc15_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b19 = ref_param_pattern [concrete = constants.%self.param_patt.64e] -// CHECK:STDOUT: %self.patt: %pattern_type.b19 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.00a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.f01 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.f01 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc15_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b19 = ref_param_pattern [concrete = constants.%self.param_patt.64e] -// CHECK:STDOUT: %self.patt: %pattern_type.b19 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.00a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.f01 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.f01 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.55d = ref_param_pattern [concrete = constants.%self.param_patt.0a9] -// CHECK:STDOUT: %self.patt: %pattern_type.55d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.280] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.67f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.67f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc15_3.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.55d = ref_param_pattern [concrete = constants.%self.param_patt.0a9] -// CHECK:STDOUT: %self.patt: %pattern_type.55d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.280] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.67f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.67f = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Use() { @@ -344,57 +270,25 @@ fn Use() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: %pattern_type.55d = value_binding_pattern v [concrete = constants.%v.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %i.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%i.var) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%MaybeUnformed.67f, (constants.%DestroyImpl.impl_witness.8e6, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_3.1: %Destroy.type = converted constants.%MaybeUnformed.67f, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%MaybeUnformed.67f, (constants.%DestroyImpl.impl_witness.8e6, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%MaybeUnformed.67f, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%i.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.2(%self.param: ref %X) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.2(%self.param: ref %X) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.3(%self.param: ref %.f01) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.3(%self.param: ref %.f01) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.3(%self.param: ref %.f01) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.3(%self.param: ref %.f01) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.4(%self.param: ref %MaybeUnformed.67f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.4(%self.param: ref %MaybeUnformed.67f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.4(%self.param: ref %MaybeUnformed.67f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.4(%self.param: ref %MaybeUnformed.67f) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/as/partial.carbon b/toolchain/check/testdata/as/partial.carbon index dae775968ff8..cdf302e9dd4d 100644 --- a/toolchain/check/testdata/as/partial.carbon +++ b/toolchain/check/testdata/as/partial.carbon @@ -115,60 +115,30 @@ fn Use() { // CHECK:STDOUT: %reference.var: ref %.d74 = var_storage file.%reference.var_patt [concrete] // CHECK:STDOUT: %addr.3a0: %ptr.44a = addr_of %reference.var [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.12c = value_binding_pattern b [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.9b7: %pattern_type.53b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.8cb: %pattern_type.53b = wrapper_binding_pattern self, %self.param_patt.9b7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d3b: %SubobjectDestroy.type = facet_value %.d74, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c96: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d3b) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %.d74, (%DestroyImpl.impl_witness.c96, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc14_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.53b = ref_param_pattern [concrete = constants.%self.param_patt.9b7] -// CHECK:STDOUT: %self.patt: %pattern_type.53b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8cb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.d74 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.d74 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc14_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.53b = ref_param_pattern [concrete = constants.%self.param_patt.9b7] -// CHECK:STDOUT: %self.patt: %pattern_type.53b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8cb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.d74 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.d74 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Use() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %i.var: ref %.d74 = var_storage %i.var_patt // CHECK:STDOUT: %Init.ref: %Init.type = name_ref Init, file.%Init.decl [concrete = constants.%Init] -// CHECK:STDOUT: %.loc14_3: ref %.d74 = splice_block %i.var {} -// CHECK:STDOUT: %Init.call: init %X to %.loc14_3 = call %Init.ref() +// CHECK:STDOUT: %.loc14_3.1: ref %.d74 = splice_block %i.var {} +// CHECK:STDOUT: %Init.call: init %X to %.loc14_3.1 = call %Init.ref() // CHECK:STDOUT: %X.ref.loc14_47: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %.loc14_39: type = partial_type %X.ref.loc14_47 [concrete = constants.%.d74] // CHECK:STDOUT: %.loc14_36.1: init %.d74 = as_compatible %Init.call @@ -226,32 +196,18 @@ fn Use() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %b.patt: %pattern_type.12c = value_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %i.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%i.var) +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%.d74, (constants.%DestroyImpl.impl_witness.c96, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%.d74, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%.d74, (constants.%DestroyImpl.impl_witness.c96, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%.d74, %Destroy.facet.loc14_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%i.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_3.2(%self.param: ref %.d74) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_3.2(%self.param: ref %.d74) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: @@ -275,52 +231,22 @@ fn Use() { // CHECK:STDOUT: %j.var_patt: %pattern_type.6cb = var_pattern %j.patt [concrete] // CHECK:STDOUT: %k.patt: %pattern_type.6cb = ref_binding_pattern k [concrete] // CHECK:STDOUT: %k.var_patt: %pattern_type.6cb = var_pattern %k.patt [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc12_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc5) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.e12, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc12_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc12_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Use() { @@ -340,8 +266,8 @@ fn Use() { // CHECK:STDOUT: } // CHECK:STDOUT: %j.var: ref %X = var_storage %j.var_patt // CHECK:STDOUT: %Init.ref.loc11: %Init.type = name_ref Init, file.%Init.decl [concrete = constants.%Init] -// CHECK:STDOUT: %.loc11_3: ref %X = splice_block %j.var {} -// CHECK:STDOUT: %Init.call.loc11: init %.d74 to %.loc11_3 = call %Init.ref.loc11() +// CHECK:STDOUT: %.loc11_3.1: ref %X = splice_block %j.var {} +// CHECK:STDOUT: %Init.call.loc11: init %.d74 to %.loc11_3.1 = call %Init.ref.loc11() // CHECK:STDOUT: %X.ref.loc11_31: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %.loc11_28.1: init %X = as_compatible %Init.call.loc11 // CHECK:STDOUT: %.loc11_28.2: init %X = converted %Init.call.loc11, %.loc11_28.1 @@ -354,8 +280,8 @@ fn Use() { // CHECK:STDOUT: } // CHECK:STDOUT: %k.var: ref %X = var_storage %k.var_patt // CHECK:STDOUT: %Init.ref.loc12: %Init.type = name_ref Init, file.%Init.decl [concrete = constants.%Init] -// CHECK:STDOUT: %.loc12_3: ref %X = splice_block %k.var {} -// CHECK:STDOUT: %Init.call.loc12: init %.d74 to %.loc12_3 = call %Init.ref.loc12() +// CHECK:STDOUT: %.loc12_3.1: ref %X = splice_block %k.var {} +// CHECK:STDOUT: %Init.call.loc12: init %.d74 to %.loc12_3.1 = call %Init.ref.loc12() // CHECK:STDOUT: %X.ref.loc12_38: type = name_ref X, file.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %.loc12_35.1: init %X = as_compatible %Init.call.loc12 // CHECK:STDOUT: %.loc12_35.2: init %X = converted %Init.call.loc12, %.loc12_35.1 @@ -366,36 +292,30 @@ fn Use() { // CHECK:STDOUT: %k.patt: %pattern_type.6cb = ref_binding_pattern k [concrete = constants.%k.patt] // CHECK:STDOUT: %k.var_patt: %pattern_type.6cb = var_pattern %k.patt [concrete = constants.%k.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: = bound_method %k.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%k.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %j.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%j.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %i.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%i.var) +// CHECK:STDOUT: %Destroy.facet.loc12_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_3.2: %Destroy.type = converted constants.%X, %Destroy.facet.loc12_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc12_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_3.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc12_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%k.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%X, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%j.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%i.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- unsafe_remove_partial.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/var_init.carbon b/toolchain/check/testdata/as/var_init.carbon index be8bdd6030d5..e22361b2bd04 100644 --- a/toolchain/check/testdata/as/var_init.carbon +++ b/toolchain/check/testdata/as/var_init.carbon @@ -46,52 +46,22 @@ fn Convert(unused t: ()) { // CHECK:STDOUT: %x.var_patt: %pattern_type.6cb = var_pattern %x.patt [concrete] // CHECK:STDOUT: %.8a9: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b95, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %empty_tuple.type.as.ImplicitAs.impl.Convert.bound: = bound_method %empty_tuple, %empty_tuple.type.as.ImplicitAs.impl.Convert [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc12_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc5) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.e12, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc12_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc12_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert(%t.param: %empty_tuple.type) { @@ -112,30 +82,16 @@ fn Convert(unused t: ()) { // CHECK:STDOUT: %x.patt: %pattern_type.6cb = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.6cb = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc12_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_3.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc12_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc12_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_3.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc12_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/dump_prelude.carbon b/toolchain/check/testdata/basics/dump_prelude.carbon index 5a587710b380..8c6e9cbec978 100644 --- a/toolchain/check/testdata/basics/dump_prelude.carbon +++ b/toolchain/check/testdata/basics/dump_prelude.carbon @@ -15,5 +15,5 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/dump_prelude.carbon // CHECK:STDOUT: interface @Copy { -// CHECK:STDOUT: interface @Destroy { +// CHECK:STDOUT: interface @SubobjectDestroy { // CHECK:STDOUT: fn @MakeInt(%size.param: Core.IntLiteral) -> out %return.param: type = "int.make_type_signed"; diff --git a/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon b/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon index a4777af3fe31..be230ca630d9 100644 --- a/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon +++ b/toolchain/check/testdata/basics/dump_sem_ir_ranges.carbon @@ -106,8 +106,17 @@ library "[[@TEST_NAME]]"; // CHECK:STDOUT: %A: %A.type = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] // CHECK:STDOUT: %.262: Core.Form = init_form %empty_tuple.type [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.cb1 = out_param_pattern [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern %return.param_patt, %empty_tuple.type [concrete] @@ -119,6 +128,11 @@ library "[[@TEST_NAME]]"; // CHECK:STDOUT: %c.var_patt: %pattern_type.cb1 = var_pattern %c.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [concrete = constants.%C] { // CHECK:STDOUT: %return.param_patt: %pattern_type.cb1 = out_param_pattern [concrete = constants.%return.param_patt] @@ -147,8 +161,8 @@ library "[[@TEST_NAME]]"; // CHECK:STDOUT: %c.var: ref %empty_tuple.type = var_storage %c.var_patt // CHECK:STDOUT: %.loc18_16.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc18_16.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc18_3: init %empty_tuple.type = converted %.loc18_16.1, %.loc18_16.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %c.var, %.loc18_3 +// CHECK:STDOUT: %.loc18_3.1: init %empty_tuple.type = converted %.loc18_16.1, %.loc18_16.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %c.var, %.loc18_3.1 // CHECK:STDOUT: %.loc18_11.1: type = splice_block %.loc18_11.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc18_11.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc18_11.3: type = converted %.loc18_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -165,8 +179,12 @@ library "[[@TEST_NAME]]"; // CHECK:STDOUT: %c.ref.loc20: ref %empty_tuple.type = name_ref c, %c // CHECK:STDOUT: %.loc20_10: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc20_11: init %empty_tuple.type = converted %c.ref.loc20, %.loc20_10 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%c.var) // CHECK:STDOUT: return %.loc20_11 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -219,36 +237,26 @@ library "[[@TEST_NAME]]"; // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %A.type: type = fn_type @A [concrete] // CHECK:STDOUT: %A: %A.type = struct_value () [concrete] // CHECK:STDOUT: %C.type: type = fn_type @C [concrete] // CHECK:STDOUT: %C: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc17 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc17 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -269,24 +277,23 @@ library "[[@TEST_NAME]]"; // CHECK:STDOUT: %empty_tuple.loc17: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc17_7.3: %empty_tuple.type = converted %C.call, %empty_tuple.loc17 [concrete = constants.%empty_tuple] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc17: = bound_method %.loc17_7.2, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc17: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc17(%.loc17_7.2) +// CHECK:STDOUT: %Destroy.facet.loc17_7.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_7.4: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc17_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc17_7.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_7.5: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc17_7.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13: = bound_method %.loc13_7.2, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13(%.loc13_7.2) +// CHECK:STDOUT: %SelfDestruct.call.loc17: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc17_7.2) +// CHECK:STDOUT: +// CHECK:STDOUT: %Destroy.facet.loc13_7.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_7.4: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc13_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc13_7.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_7.5: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc13_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc13_7.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- file_without_ranges.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/duplicate_name_same_line.carbon b/toolchain/check/testdata/basics/duplicate_name_same_line.carbon index c282fc5c87fa..9f0be32240fc 100644 --- a/toolchain/check/testdata/basics/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/basics/duplicate_name_same_line.carbon @@ -29,33 +29,24 @@ fn A() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %n.patt.785a0d.1: %pattern_type.cb1 = ref_binding_pattern n [concrete] // CHECK:STDOUT: %n.var_patt.961036.1: %pattern_type.cb1 = var_pattern %n.patt.785a0d.1 [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] // CHECK:STDOUT: %n.patt.785a0d.2: %pattern_type.cb1 = ref_binding_pattern n [concrete] // CHECK:STDOUT: %n.var_patt.961036.2: %pattern_type.cb1 = var_pattern %n.patt.785a0d.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc18 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A() { @@ -66,8 +57,8 @@ fn A() { // CHECK:STDOUT: %n.var.loc18_5: ref %empty_tuple.type = var_storage %n.var_patt.loc18_5 // CHECK:STDOUT: %.loc18_25.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc18_25.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc18_5: init %empty_tuple.type = converted %.loc18_25.1, %.loc18_25.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %n.var.loc18_5, %.loc18_5 +// CHECK:STDOUT: %.loc18_5.1: init %empty_tuple.type = converted %.loc18_25.1, %.loc18_25.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %n.var.loc18_5, %.loc18_5.1 // CHECK:STDOUT: %.loc18_20.1: type = splice_block %.loc18_20.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc18_20.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc18_20.3: type = converted %.loc18_20.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -77,16 +68,20 @@ fn A() { // CHECK:STDOUT: %n.patt.loc18_17: %pattern_type.cb1 = ref_binding_pattern n [concrete = constants.%n.patt.785a0d.1] // CHECK:STDOUT: %n.var_patt.loc18_5: %pattern_type.cb1 = var_pattern %n.patt.loc18_17 [concrete = constants.%n.var_patt.961036.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_5: = bound_method %n.var.loc18_5, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_5: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_5(%n.var.loc18_5) +// CHECK:STDOUT: %Destroy.facet.loc18_5.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_5.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_5.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc18_5.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_5.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_5.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc18_5: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%n.var.loc18_5) // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %n.var.loc18_37: ref %empty_tuple.type = var_storage %n.var_patt.loc18_37 // CHECK:STDOUT: %.loc18_57.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc18_57.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc18_37: init %empty_tuple.type = converted %.loc18_57.1, %.loc18_57.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %n.var.loc18_37, %.loc18_37 +// CHECK:STDOUT: %.loc18_37.1: init %empty_tuple.type = converted %.loc18_57.1, %.loc18_57.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %n.var.loc18_37, %.loc18_37.1 // CHECK:STDOUT: %.loc18_52.1: type = splice_block %.loc18_52.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc18_52.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc18_52.3: type = converted %.loc18_52.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -96,22 +91,17 @@ fn A() { // CHECK:STDOUT: %n.patt.loc18_49: %pattern_type.cb1 = ref_binding_pattern n [concrete = constants.%n.patt.785a0d.2] // CHECK:STDOUT: %n.var_patt.loc18_37: %pattern_type.cb1 = var_pattern %n.patt.loc18_49 [concrete = constants.%n.var_patt.961036.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_37: = bound_method %n.var.loc18_37, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_37: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_37(%n.var.loc18_37) +// CHECK:STDOUT: %Destroy.facet.loc18_37.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_37.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_37.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc18_37.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_37.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_37.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc18_37: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%n.var.loc18_37) // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !if.done: // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/raw_sem_ir/non_core_interfaces.carbon b/toolchain/check/testdata/basics/raw_sem_ir/non_core_interfaces.carbon index e8434c503215..13703b7d7bd7 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/non_core_interfaces.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/non_core_interfaces.carbon @@ -15,7 +15,7 @@ // --- non_core.carbon package NonCore; -interface Destroy { +interface SubobjectDestroy { let T1: type; let T2: type; } @@ -29,9 +29,9 @@ interface Copy { } //@dump-sem-ir-begin -fn UseNonCoreDestroy[T: NonCore.Destroy](_: T.T1, _: T.T2) {} +fn UseNonCoreSubobjectDestroy[T: NonCore.SubobjectDestroy](_: T.T1, _: T.T2) {} fn UseLocalCopy[T: Copy](_: T.T1, _: T.T2) {} -fn HasRewrites[T: Copy where .Self impls NonCore.Destroy and .T1 = ()](_: T.T1, _: T.T2) {} +fn HasRewrites[T: Copy where .Self impls NonCore.SubobjectDestroy and .T1 = ()](_: T.T1, _: T.T2) {} //@dump-sem-ir-end // CHECK:STDOUT: --- @@ -39,7 +39,7 @@ fn HasRewrites[T: Copy where .Self impls NonCore.Destroy and .T1 = ()](_: T.T1, // CHECK:STDOUT: sem_ir: // CHECK:STDOUT: names: // CHECK:STDOUT: name0: NonCore -// CHECK:STDOUT: name1: Destroy +// CHECK:STDOUT: name1: SubobjectDestroy // CHECK:STDOUT: name2: T1 // CHECK:STDOUT: name3: T2 // CHECK:STDOUT: import_irs: @@ -179,7 +179,7 @@ fn HasRewrites[T: Copy where .Self impls NonCore.Destroy and .T1 = ()](_: T.T1, // CHECK:STDOUT: floats: {} // CHECK:STDOUT: identifiers: // CHECK:STDOUT: identifier0: NonCore -// CHECK:STDOUT: identifier1: Destroy +// CHECK:STDOUT: identifier1: SubobjectDestroy // CHECK:STDOUT: identifier2: T1 // CHECK:STDOUT: identifier3: T2 // CHECK:STDOUT: strings: {} @@ -192,9 +192,9 @@ fn HasRewrites[T: Copy where .Self impls NonCore.Destroy and .T1 = ()](_: T.T1, // CHECK:STDOUT: name1: Copy // CHECK:STDOUT: name2: T1 // CHECK:STDOUT: name3: T2 -// CHECK:STDOUT: name4: UseNonCoreDestroy +// CHECK:STDOUT: name4: UseNonCoreSubobjectDestroy // CHECK:STDOUT: name5: T -// CHECK:STDOUT: name6: Destroy +// CHECK:STDOUT: name6: SubobjectDestroy // CHECK:STDOUT: name7: UseLocalCopy // CHECK:STDOUT: name8: HasRewrites // CHECK:STDOUT: import_irs: @@ -1299,9 +1299,9 @@ fn HasRewrites[T: Copy where .Self impls NonCore.Destroy and .T1 = ()](_: T.T1, // CHECK:STDOUT: identifier1: Copy // CHECK:STDOUT: identifier2: T1 // CHECK:STDOUT: identifier3: T2 -// CHECK:STDOUT: identifier4: UseNonCoreDestroy +// CHECK:STDOUT: identifier4: UseNonCoreSubobjectDestroy // CHECK:STDOUT: identifier5: T -// CHECK:STDOUT: identifier6: Destroy +// CHECK:STDOUT: identifier6: SubobjectDestroy // CHECK:STDOUT: identifier7: UseLocalCopy // CHECK:STDOUT: identifier8: HasRewrites // CHECK:STDOUT: strings: {} diff --git a/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon b/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon index 994abaf49f98..8082fa0bc2e3 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon @@ -39,257 +39,257 @@ fn Foo[T: type](p: T*) -> (T*, ()) { // CHECK:STDOUT: import_ir78000006: {decl_id: inst78000010, is_export: false} // CHECK:STDOUT: import_ir78000007: {decl_id: inst78000010, is_export: false} // CHECK:STDOUT: import_ir_insts: -// CHECK:STDOUT: import_ir_inst0: {ir_id: import_ir78000004, inst_id: inst70000010} -// CHECK:STDOUT: import_ir_inst1: {ir_id: import_ir78000004, inst_id: inst70000015} -// CHECK:STDOUT: import_ir_inst2: {ir_id: import_ir78000004, inst_id: inst7000003D} -// CHECK:STDOUT: import_ir_inst3: {ir_id: import_ir78000004, inst_id: inst70000035} -// CHECK:STDOUT: import_ir_inst4: {ir_id: import_ir78000004, inst_id: inst70000012} -// CHECK:STDOUT: import_ir_inst5: {ir_id: import_ir78000004, inst_id: inst7000002C} -// CHECK:STDOUT: import_ir_inst6: {ir_id: import_ir78000004, inst_id: inst7000001E} -// CHECK:STDOUT: import_ir_inst7: {ir_id: import_ir78000004, inst_id: inst7000001D} -// CHECK:STDOUT: import_ir_inst8: {ir_id: import_ir78000004, inst_id: inst7000002B} -// CHECK:STDOUT: import_ir_inst9: {ir_id: import_ir78000004, inst_id: inst70000021} -// CHECK:STDOUT: import_ir_instA: {ir_id: import_ir78000004, inst_id: inst70000027} -// CHECK:STDOUT: import_ir_instB: {ir_id: import_ir78000004, inst_id: inst70000028} -// CHECK:STDOUT: import_ir_instC: {ir_id: import_ir78000004, inst_id: inst7000002E} -// CHECK:STDOUT: import_ir_instD: {ir_id: import_ir78000004, inst_id: inst70000017} -// CHECK:STDOUT: import_ir_instE: {ir_id: import_ir78000004, inst_id: inst7000001A} -// CHECK:STDOUT: import_ir_instF: {ir_id: import_ir78000004, inst_id: inst7000001F} -// CHECK:STDOUT: import_ir_inst10: {ir_id: import_ir78000004, inst_id: inst70000020} -// CHECK:STDOUT: import_ir_inst11: {ir_id: import_ir78000004, inst_id: inst70000023} -// CHECK:STDOUT: import_ir_inst12: {ir_id: import_ir78000004, inst_id: inst7000002A} -// CHECK:STDOUT: import_ir_inst13: {ir_id: import_ir78000004, inst_id: inst7000002D} -// CHECK:STDOUT: import_ir_inst14: {ir_id: import_ir78000004, inst_id: inst70000030} -// CHECK:STDOUT: import_ir_inst15: {ir_id: import_ir78000004, inst_id: inst70000039} -// CHECK:STDOUT: import_ir_inst16: {ir_id: import_ir78000004, inst_id: inst7000003A} -// CHECK:STDOUT: import_ir_inst17: {ir_id: import_ir78000004, inst_id: inst7000003B} -// CHECK:STDOUT: import_ir_inst18: {ir_id: import_ir78000004, inst_id: inst70000094} -// CHECK:STDOUT: import_ir_inst19: {ir_id: import_ir78000004, inst_id: inst7000008F} -// CHECK:STDOUT: import_ir_inst1A: {ir_id: import_ir78000004, inst_id: inst700000B6} -// CHECK:STDOUT: import_ir_inst1B: {ir_id: import_ir78000004, inst_id: inst70000093} -// CHECK:STDOUT: import_ir_inst1C: {ir_id: import_ir78000004, inst_id: inst700000AD} -// CHECK:STDOUT: import_ir_inst1D: {ir_id: import_ir78000004, inst_id: inst700000A0} -// CHECK:STDOUT: import_ir_inst1E: {ir_id: import_ir78000004, inst_id: inst7000009F} -// CHECK:STDOUT: import_ir_inst1F: {ir_id: import_ir78000004, inst_id: inst700000AC} -// CHECK:STDOUT: import_ir_inst20: {ir_id: import_ir78000004, inst_id: inst700000A3} -// CHECK:STDOUT: import_ir_inst21: {ir_id: import_ir78000004, inst_id: inst700000A8} -// CHECK:STDOUT: import_ir_inst22: {ir_id: import_ir78000004, inst_id: inst700000A9} -// CHECK:STDOUT: import_ir_inst23: {ir_id: import_ir78000004, inst_id: inst700000AF} -// CHECK:STDOUT: import_ir_inst24: {ir_id: import_ir78000004, inst_id: inst70000082} -// CHECK:STDOUT: import_ir_inst25: {ir_id: import_ir78000004, inst_id: inst7000009A} -// CHECK:STDOUT: import_ir_inst26: {ir_id: import_ir78000004, inst_id: inst7000009B} -// CHECK:STDOUT: import_ir_inst27: {ir_id: import_ir78000004, inst_id: inst7000009C} -// CHECK:STDOUT: import_ir_inst28: {ir_id: import_ir78000004, inst_id: inst700000A1} -// CHECK:STDOUT: import_ir_inst29: {ir_id: import_ir78000004, inst_id: inst700000A2} -// CHECK:STDOUT: import_ir_inst2A: {ir_id: import_ir78000004, inst_id: inst700000A5} -// CHECK:STDOUT: import_ir_inst2B: {ir_id: import_ir78000004, inst_id: inst700000AB} -// CHECK:STDOUT: import_ir_inst2C: {ir_id: import_ir78000004, inst_id: inst700000AE} -// CHECK:STDOUT: import_ir_inst2D: {ir_id: import_ir78000004, inst_id: inst700000B1} -// CHECK:STDOUT: import_ir_inst2E: {ir_id: import_ir78000004, inst_id: inst700000C0} -// CHECK:STDOUT: import_ir_inst2F: {ir_id: import_ir78000004, inst_id: inst700000C8} -// CHECK:STDOUT: import_ir_inst30: {ir_id: import_ir78000004, inst_id: inst700000D4} -// CHECK:STDOUT: import_ir_inst31: {ir_id: import_ir78000004, inst_id: inst700000D5} -// CHECK:STDOUT: import_ir_inst32: {ir_id: import_ir78000004, inst_id: inst700000D6} -// CHECK:STDOUT: import_ir_inst33: {ir_id: import_ir78000004, inst_id: inst700000D7} -// CHECK:STDOUT: import_ir_inst34: {ir_id: import_ir78000004, inst_id: inst700000E3} -// CHECK:STDOUT: import_ir_inst35: {ir_id: import_ir78000004, inst_id: inst7000007F} -// CHECK:STDOUT: import_ir_inst36: {ir_id: import_ir78000004, inst_id: inst7000008A} -// CHECK:STDOUT: import_ir_inst37: {ir_id: import_ir78000004, inst_id: inst7000008D} -// CHECK:STDOUT: import_ir_inst38: {ir_id: import_ir78000004, inst_id: inst70000090} -// CHECK:STDOUT: import_ir_inst39: {ir_id: import_ir78000004, inst_id: inst70000081} -// CHECK:STDOUT: import_ir_inst3A: {ir_id: import_ir78000004, inst_id: inst70000084} -// CHECK:STDOUT: import_ir_inst3B: {ir_id: import_ir78000004, inst_id: inst70000088} -// CHECK:STDOUT: import_ir_inst3C: {ir_id: import_ir78000004, inst_id: inst7000008C} -// CHECK:STDOUT: import_ir_inst3D: {ir_id: import_ir78000004, inst_id: inst70000092} -// CHECK:STDOUT: import_ir_inst3E: {ir_id: import_ir78000004, inst_id: inst70000096} -// CHECK:STDOUT: import_ir_inst3F: {ir_id: import_ir78000004, inst_id: inst700000B9} -// CHECK:STDOUT: import_ir_inst40: {ir_id: import_ir78000004, inst_id: inst700000BA} -// CHECK:STDOUT: import_ir_inst41: {ir_id: import_ir78000004, inst_id: inst700000F6} -// CHECK:STDOUT: import_ir_inst42: {ir_id: import_ir78000004, inst_id: inst700000F2} -// CHECK:STDOUT: import_ir_inst43: {ir_id: import_ir78000004, inst_id: inst700000F0} -// CHECK:STDOUT: import_ir_inst44: {ir_id: import_ir78000004, inst_id: inst700000F1} -// CHECK:STDOUT: import_ir_inst45: {ir_id: import_ir78000004, inst_id: inst700000F3} -// CHECK:STDOUT: import_ir_inst46: {ir_id: import_ir78000004, inst_id: inst70000115} -// CHECK:STDOUT: import_ir_inst47: {ir_id: import_ir78000004, inst_id: inst70000111} -// CHECK:STDOUT: import_ir_inst48: {ir_id: import_ir78000004, inst_id: inst7000010F} -// CHECK:STDOUT: import_ir_inst49: {ir_id: import_ir78000004, inst_id: inst70000110} -// CHECK:STDOUT: import_ir_inst4A: {ir_id: import_ir78000004, inst_id: inst70000112} -// CHECK:STDOUT: import_ir_inst4B: {ir_id: import_ir78000004, inst_id: inst70000134} -// CHECK:STDOUT: import_ir_inst4C: {ir_id: import_ir78000004, inst_id: inst70000130} -// CHECK:STDOUT: import_ir_inst4D: {ir_id: import_ir78000004, inst_id: inst7000012E} -// CHECK:STDOUT: import_ir_inst4E: {ir_id: import_ir78000004, inst_id: inst7000012F} -// CHECK:STDOUT: import_ir_inst4F: {ir_id: import_ir78000004, inst_id: inst70000131} -// CHECK:STDOUT: import_ir_inst50: {ir_id: import_ir78000004, inst_id: inst70000153} -// CHECK:STDOUT: import_ir_inst51: {ir_id: import_ir78000004, inst_id: inst7000014F} -// CHECK:STDOUT: import_ir_inst52: {ir_id: import_ir78000004, inst_id: inst7000014D} -// CHECK:STDOUT: import_ir_inst53: {ir_id: import_ir78000004, inst_id: inst7000014E} -// CHECK:STDOUT: import_ir_inst54: {ir_id: import_ir78000004, inst_id: inst70000150} -// CHECK:STDOUT: import_ir_inst55: {ir_id: import_ir78000004, inst_id: inst7000017F} -// CHECK:STDOUT: import_ir_inst56: {ir_id: import_ir78000004, inst_id: inst7000017A} -// CHECK:STDOUT: import_ir_inst57: {ir_id: import_ir78000004, inst_id: inst7000019E} -// CHECK:STDOUT: import_ir_inst58: {ir_id: import_ir78000004, inst_id: inst7000017E} -// CHECK:STDOUT: import_ir_inst59: {ir_id: import_ir78000004, inst_id: inst7000016E} -// CHECK:STDOUT: import_ir_inst5A: {ir_id: import_ir78000004, inst_id: inst70000175} -// CHECK:STDOUT: import_ir_inst5B: {ir_id: import_ir78000004, inst_id: inst70000178} -// CHECK:STDOUT: import_ir_inst5C: {ir_id: import_ir78000004, inst_id: inst7000017B} -// CHECK:STDOUT: import_ir_inst5D: {ir_id: import_ir78000004, inst_id: inst70000171} -// CHECK:STDOUT: import_ir_inst5E: {ir_id: import_ir78000004, inst_id: inst70000170} -// CHECK:STDOUT: import_ir_inst5F: {ir_id: import_ir78000004, inst_id: inst70000173} -// CHECK:STDOUT: import_ir_inst60: {ir_id: import_ir78000004, inst_id: inst70000177} -// CHECK:STDOUT: import_ir_inst61: {ir_id: import_ir78000004, inst_id: inst7000017D} -// CHECK:STDOUT: import_ir_inst62: {ir_id: import_ir78000004, inst_id: inst70000181} -// CHECK:STDOUT: import_ir_inst63: {ir_id: import_ir78000004, inst_id: inst70000195} -// CHECK:STDOUT: import_ir_inst64: {ir_id: import_ir78000004, inst_id: inst70000188} -// CHECK:STDOUT: import_ir_inst65: {ir_id: import_ir78000004, inst_id: inst70000187} -// CHECK:STDOUT: import_ir_inst66: {ir_id: import_ir78000004, inst_id: inst70000194} -// CHECK:STDOUT: import_ir_inst67: {ir_id: import_ir78000004, inst_id: inst7000018B} -// CHECK:STDOUT: import_ir_inst68: {ir_id: import_ir78000004, inst_id: inst70000190} -// CHECK:STDOUT: import_ir_inst69: {ir_id: import_ir78000004, inst_id: inst70000191} -// CHECK:STDOUT: import_ir_inst6A: {ir_id: import_ir78000004, inst_id: inst70000197} -// CHECK:STDOUT: import_ir_inst6B: {ir_id: import_ir78000004, inst_id: inst70000183} -// CHECK:STDOUT: import_ir_inst6C: {ir_id: import_ir78000004, inst_id: inst70000184} -// CHECK:STDOUT: import_ir_inst6D: {ir_id: import_ir78000004, inst_id: inst70000189} -// CHECK:STDOUT: import_ir_inst6E: {ir_id: import_ir78000004, inst_id: inst7000018A} -// CHECK:STDOUT: import_ir_inst6F: {ir_id: import_ir78000004, inst_id: inst7000018D} -// CHECK:STDOUT: import_ir_inst70: {ir_id: import_ir78000004, inst_id: inst70000193} -// CHECK:STDOUT: import_ir_inst71: {ir_id: import_ir78000004, inst_id: inst70000196} -// CHECK:STDOUT: import_ir_inst72: {ir_id: import_ir78000004, inst_id: inst70000199} -// CHECK:STDOUT: import_ir_inst73: {ir_id: import_ir78000004, inst_id: inst700001A1} -// CHECK:STDOUT: import_ir_inst74: {ir_id: import_ir78000004, inst_id: inst700001A2} -// CHECK:STDOUT: import_ir_inst75: {ir_id: import_ir78000004, inst_id: inst700001A5} -// CHECK:STDOUT: import_ir_inst76: {ir_id: import_ir78000004, inst_id: inst700001AF} -// CHECK:STDOUT: import_ir_inst77: {ir_id: import_ir78000004, inst_id: inst700001AB} -// CHECK:STDOUT: import_ir_inst78: {ir_id: import_ir78000004, inst_id: inst700001A9} -// CHECK:STDOUT: import_ir_inst79: {ir_id: import_ir78000004, inst_id: inst700001AA} -// CHECK:STDOUT: import_ir_inst7A: {ir_id: import_ir78000004, inst_id: inst700001AC} -// CHECK:STDOUT: import_ir_inst7B: {ir_id: import_ir78000004, inst_id: inst700001CC} -// CHECK:STDOUT: import_ir_inst7C: {ir_id: import_ir78000004, inst_id: inst700001C8} -// CHECK:STDOUT: import_ir_inst7D: {ir_id: import_ir78000004, inst_id: inst700001C6} -// CHECK:STDOUT: import_ir_inst7E: {ir_id: import_ir78000004, inst_id: inst700001C7} -// CHECK:STDOUT: import_ir_inst7F: {ir_id: import_ir78000004, inst_id: inst700001C9} -// CHECK:STDOUT: import_ir_inst80: {ir_id: import_ir78000004, inst_id: inst7000020C} -// CHECK:STDOUT: import_ir_inst81: {ir_id: import_ir78000004, inst_id: inst70000207} -// CHECK:STDOUT: import_ir_inst82: {ir_id: import_ir78000004, inst_id: inst70000232} -// CHECK:STDOUT: import_ir_inst83: {ir_id: import_ir78000004, inst_id: inst7000020B} -// CHECK:STDOUT: import_ir_inst84: {ir_id: import_ir78000004, inst_id: inst70000229} -// CHECK:STDOUT: import_ir_inst85: {ir_id: import_ir78000004, inst_id: inst7000021C} -// CHECK:STDOUT: import_ir_inst86: {ir_id: import_ir78000004, inst_id: inst7000021B} -// CHECK:STDOUT: import_ir_inst87: {ir_id: import_ir78000004, inst_id: inst70000228} -// CHECK:STDOUT: import_ir_inst88: {ir_id: import_ir78000004, inst_id: inst7000021F} -// CHECK:STDOUT: import_ir_inst89: {ir_id: import_ir78000004, inst_id: inst70000224} -// CHECK:STDOUT: import_ir_inst8A: {ir_id: import_ir78000004, inst_id: inst70000225} -// CHECK:STDOUT: import_ir_inst8B: {ir_id: import_ir78000004, inst_id: inst7000022B} -// CHECK:STDOUT: import_ir_inst8C: {ir_id: import_ir78000004, inst_id: inst700001E9} -// CHECK:STDOUT: import_ir_inst8D: {ir_id: import_ir78000004, inst_id: inst700001F0} -// CHECK:STDOUT: import_ir_inst8E: {ir_id: import_ir78000004, inst_id: inst70000214} -// CHECK:STDOUT: import_ir_inst8F: {ir_id: import_ir78000004, inst_id: inst70000215} -// CHECK:STDOUT: import_ir_inst90: {ir_id: import_ir78000004, inst_id: inst70000216} -// CHECK:STDOUT: import_ir_inst91: {ir_id: import_ir78000004, inst_id: inst70000217} -// CHECK:STDOUT: import_ir_inst92: {ir_id: import_ir78000004, inst_id: inst70000218} -// CHECK:STDOUT: import_ir_inst93: {ir_id: import_ir78000004, inst_id: inst7000021D} -// CHECK:STDOUT: import_ir_inst94: {ir_id: import_ir78000004, inst_id: inst7000021E} -// CHECK:STDOUT: import_ir_inst95: {ir_id: import_ir78000004, inst_id: inst70000221} -// CHECK:STDOUT: import_ir_inst96: {ir_id: import_ir78000004, inst_id: inst70000227} -// CHECK:STDOUT: import_ir_inst97: {ir_id: import_ir78000004, inst_id: inst7000022A} -// CHECK:STDOUT: import_ir_inst98: {ir_id: import_ir78000004, inst_id: inst7000022D} -// CHECK:STDOUT: import_ir_inst99: {ir_id: import_ir78000004, inst_id: inst7000023D} -// CHECK:STDOUT: import_ir_inst9A: {ir_id: import_ir78000004, inst_id: inst70000243} -// CHECK:STDOUT: import_ir_inst9B: {ir_id: import_ir78000004, inst_id: inst70000247} -// CHECK:STDOUT: import_ir_inst9C: {ir_id: import_ir78000004, inst_id: inst70000248} -// CHECK:STDOUT: import_ir_inst9D: {ir_id: import_ir78000004, inst_id: inst70000249} -// CHECK:STDOUT: import_ir_inst9E: {ir_id: import_ir78000004, inst_id: inst7000024A} -// CHECK:STDOUT: import_ir_inst9F: {ir_id: import_ir78000004, inst_id: inst7000024F} -// CHECK:STDOUT: import_ir_instA0: {ir_id: import_ir78000004, inst_id: inst70000259} -// CHECK:STDOUT: import_ir_instA1: {ir_id: import_ir78000004, inst_id: inst70000262} -// CHECK:STDOUT: import_ir_instA2: {ir_id: import_ir78000004, inst_id: inst70000263} -// CHECK:STDOUT: import_ir_instA3: {ir_id: import_ir78000004, inst_id: inst70000264} -// CHECK:STDOUT: import_ir_instA4: {ir_id: import_ir78000004, inst_id: inst70000265} -// CHECK:STDOUT: import_ir_instA5: {ir_id: import_ir78000004, inst_id: inst70000271} -// CHECK:STDOUT: import_ir_instA6: {ir_id: import_ir78000004, inst_id: inst700001E7} -// CHECK:STDOUT: import_ir_instA7: {ir_id: import_ir78000004, inst_id: inst700001ED} -// CHECK:STDOUT: import_ir_instA8: {ir_id: import_ir78000004, inst_id: inst70000202} -// CHECK:STDOUT: import_ir_instA9: {ir_id: import_ir78000004, inst_id: inst70000204} -// CHECK:STDOUT: import_ir_instAA: {ir_id: import_ir78000004, inst_id: inst70000208} -// CHECK:STDOUT: import_ir_instAB: {ir_id: import_ir78000004, inst_id: inst700001E8} -// CHECK:STDOUT: import_ir_instAC: {ir_id: import_ir78000004, inst_id: inst700001EA} -// CHECK:STDOUT: import_ir_instAD: {ir_id: import_ir78000004, inst_id: inst700001EF} -// CHECK:STDOUT: import_ir_instAE: {ir_id: import_ir78000004, inst_id: inst700001F2} -// CHECK:STDOUT: import_ir_instAF: {ir_id: import_ir78000004, inst_id: inst700001F8} -// CHECK:STDOUT: import_ir_instB0: {ir_id: import_ir78000004, inst_id: inst700001FB} -// CHECK:STDOUT: import_ir_instB1: {ir_id: import_ir78000004, inst_id: inst700001FF} -// CHECK:STDOUT: import_ir_instB2: {ir_id: import_ir78000004, inst_id: inst70000203} -// CHECK:STDOUT: import_ir_instB3: {ir_id: import_ir78000004, inst_id: inst7000020A} -// CHECK:STDOUT: import_ir_instB4: {ir_id: import_ir78000004, inst_id: inst7000020E} -// CHECK:STDOUT: import_ir_instB5: {ir_id: import_ir78000004, inst_id: inst70000235} -// CHECK:STDOUT: import_ir_instB6: {ir_id: import_ir78000004, inst_id: inst70000236} -// CHECK:STDOUT: import_ir_instB7: {ir_id: import_ir78000004, inst_id: inst700002B2} -// CHECK:STDOUT: import_ir_instB8: {ir_id: import_ir78000004, inst_id: inst700002AD} -// CHECK:STDOUT: import_ir_instB9: {ir_id: import_ir78000004, inst_id: inst700002DC} -// CHECK:STDOUT: import_ir_instBA: {ir_id: import_ir78000004, inst_id: inst700002B1} -// CHECK:STDOUT: import_ir_instBB: {ir_id: import_ir78000004, inst_id: inst700002D3} -// CHECK:STDOUT: import_ir_instBC: {ir_id: import_ir78000004, inst_id: inst700002C6} -// CHECK:STDOUT: import_ir_instBD: {ir_id: import_ir78000004, inst_id: inst700002C5} -// CHECK:STDOUT: import_ir_instBE: {ir_id: import_ir78000004, inst_id: inst700002D2} -// CHECK:STDOUT: import_ir_instBF: {ir_id: import_ir78000004, inst_id: inst700002C9} -// CHECK:STDOUT: import_ir_instC0: {ir_id: import_ir78000004, inst_id: inst700002CE} -// CHECK:STDOUT: import_ir_instC1: {ir_id: import_ir78000004, inst_id: inst700002CF} -// CHECK:STDOUT: import_ir_instC2: {ir_id: import_ir78000004, inst_id: inst700002D5} -// CHECK:STDOUT: import_ir_instC3: {ir_id: import_ir78000004, inst_id: inst70000284} -// CHECK:STDOUT: import_ir_instC4: {ir_id: import_ir78000004, inst_id: inst7000028A} -// CHECK:STDOUT: import_ir_instC5: {ir_id: import_ir78000004, inst_id: inst70000291} -// CHECK:STDOUT: import_ir_instC6: {ir_id: import_ir78000004, inst_id: inst700002BC} -// CHECK:STDOUT: import_ir_instC7: {ir_id: import_ir78000004, inst_id: inst700002BD} -// CHECK:STDOUT: import_ir_instC8: {ir_id: import_ir78000004, inst_id: inst700002BE} -// CHECK:STDOUT: import_ir_instC9: {ir_id: import_ir78000004, inst_id: inst700002BF} -// CHECK:STDOUT: import_ir_instCA: {ir_id: import_ir78000004, inst_id: inst700002C0} -// CHECK:STDOUT: import_ir_instCB: {ir_id: import_ir78000004, inst_id: inst700002C1} -// CHECK:STDOUT: import_ir_instCC: {ir_id: import_ir78000004, inst_id: inst700002C2} -// CHECK:STDOUT: import_ir_instCD: {ir_id: import_ir78000004, inst_id: inst700002C7} -// CHECK:STDOUT: import_ir_instCE: {ir_id: import_ir78000004, inst_id: inst700002C8} -// CHECK:STDOUT: import_ir_instCF: {ir_id: import_ir78000004, inst_id: inst700002CB} -// CHECK:STDOUT: import_ir_instD0: {ir_id: import_ir78000004, inst_id: inst700002D1} -// CHECK:STDOUT: import_ir_instD1: {ir_id: import_ir78000004, inst_id: inst700002D4} -// CHECK:STDOUT: import_ir_instD2: {ir_id: import_ir78000004, inst_id: inst700002D7} -// CHECK:STDOUT: import_ir_instD3: {ir_id: import_ir78000004, inst_id: inst700002E7} -// CHECK:STDOUT: import_ir_instD4: {ir_id: import_ir78000004, inst_id: inst700002EC} -// CHECK:STDOUT: import_ir_instD5: {ir_id: import_ir78000004, inst_id: inst700002F0} -// CHECK:STDOUT: import_ir_instD6: {ir_id: import_ir78000004, inst_id: inst700002F1} -// CHECK:STDOUT: import_ir_instD7: {ir_id: import_ir78000004, inst_id: inst700002F2} -// CHECK:STDOUT: import_ir_instD8: {ir_id: import_ir78000004, inst_id: inst700002F3} -// CHECK:STDOUT: import_ir_instD9: {ir_id: import_ir78000004, inst_id: inst700002F8} -// CHECK:STDOUT: import_ir_instDA: {ir_id: import_ir78000004, inst_id: inst70000300} -// CHECK:STDOUT: import_ir_instDB: {ir_id: import_ir78000004, inst_id: inst70000304} -// CHECK:STDOUT: import_ir_instDC: {ir_id: import_ir78000004, inst_id: inst70000305} -// CHECK:STDOUT: import_ir_instDD: {ir_id: import_ir78000004, inst_id: inst70000306} -// CHECK:STDOUT: import_ir_instDE: {ir_id: import_ir78000004, inst_id: inst70000307} -// CHECK:STDOUT: import_ir_instDF: {ir_id: import_ir78000004, inst_id: inst7000030C} -// CHECK:STDOUT: import_ir_instE0: {ir_id: import_ir78000004, inst_id: inst70000316} -// CHECK:STDOUT: import_ir_instE1: {ir_id: import_ir78000004, inst_id: inst7000031F} -// CHECK:STDOUT: import_ir_instE2: {ir_id: import_ir78000004, inst_id: inst70000320} -// CHECK:STDOUT: import_ir_instE3: {ir_id: import_ir78000004, inst_id: inst70000321} -// CHECK:STDOUT: import_ir_instE4: {ir_id: import_ir78000004, inst_id: inst70000322} -// CHECK:STDOUT: import_ir_instE5: {ir_id: import_ir78000004, inst_id: inst7000032E} -// CHECK:STDOUT: import_ir_instE6: {ir_id: import_ir78000004, inst_id: inst70000282} -// CHECK:STDOUT: import_ir_instE7: {ir_id: import_ir78000004, inst_id: inst70000288} -// CHECK:STDOUT: import_ir_instE8: {ir_id: import_ir78000004, inst_id: inst7000028E} -// CHECK:STDOUT: import_ir_instE9: {ir_id: import_ir78000004, inst_id: inst700002A7} -// CHECK:STDOUT: import_ir_instEA: {ir_id: import_ir78000004, inst_id: inst700002A9} -// CHECK:STDOUT: import_ir_instEB: {ir_id: import_ir78000004, inst_id: inst700002AE} -// CHECK:STDOUT: import_ir_instEC: {ir_id: import_ir78000004, inst_id: inst70000283} -// CHECK:STDOUT: import_ir_instED: {ir_id: import_ir78000004, inst_id: inst70000285} -// CHECK:STDOUT: import_ir_instEE: {ir_id: import_ir78000004, inst_id: inst70000289} -// CHECK:STDOUT: import_ir_instEF: {ir_id: import_ir78000004, inst_id: inst7000028B} -// CHECK:STDOUT: import_ir_instF0: {ir_id: import_ir78000004, inst_id: inst70000290} -// CHECK:STDOUT: import_ir_instF1: {ir_id: import_ir78000004, inst_id: inst70000293} -// CHECK:STDOUT: import_ir_instF2: {ir_id: import_ir78000004, inst_id: inst7000029A} -// CHECK:STDOUT: import_ir_instF3: {ir_id: import_ir78000004, inst_id: inst7000029D} -// CHECK:STDOUT: import_ir_instF4: {ir_id: import_ir78000004, inst_id: inst700002A0} -// CHECK:STDOUT: import_ir_instF5: {ir_id: import_ir78000004, inst_id: inst700002A4} -// CHECK:STDOUT: import_ir_instF6: {ir_id: import_ir78000004, inst_id: inst700002A8} -// CHECK:STDOUT: import_ir_instF7: {ir_id: import_ir78000004, inst_id: inst700002B0} -// CHECK:STDOUT: import_ir_instF8: {ir_id: import_ir78000004, inst_id: inst700002B4} -// CHECK:STDOUT: import_ir_instF9: {ir_id: import_ir78000004, inst_id: inst700002DF} -// CHECK:STDOUT: import_ir_instFA: {ir_id: import_ir78000004, inst_id: inst700002E0} +// CHECK:STDOUT: import_ir_inst0: {ir_id: import_ir78000005, inst_id: inst48000010} +// CHECK:STDOUT: import_ir_inst1: {ir_id: import_ir78000005, inst_id: inst48000015} +// CHECK:STDOUT: import_ir_inst2: {ir_id: import_ir78000005, inst_id: inst4800003D} +// CHECK:STDOUT: import_ir_inst3: {ir_id: import_ir78000005, inst_id: inst48000035} +// CHECK:STDOUT: import_ir_inst4: {ir_id: import_ir78000005, inst_id: inst48000012} +// CHECK:STDOUT: import_ir_inst5: {ir_id: import_ir78000005, inst_id: inst4800002C} +// CHECK:STDOUT: import_ir_inst6: {ir_id: import_ir78000005, inst_id: inst4800001E} +// CHECK:STDOUT: import_ir_inst7: {ir_id: import_ir78000005, inst_id: inst4800001D} +// CHECK:STDOUT: import_ir_inst8: {ir_id: import_ir78000005, inst_id: inst4800002B} +// CHECK:STDOUT: import_ir_inst9: {ir_id: import_ir78000005, inst_id: inst48000021} +// CHECK:STDOUT: import_ir_instA: {ir_id: import_ir78000005, inst_id: inst48000027} +// CHECK:STDOUT: import_ir_instB: {ir_id: import_ir78000005, inst_id: inst48000028} +// CHECK:STDOUT: import_ir_instC: {ir_id: import_ir78000005, inst_id: inst4800002E} +// CHECK:STDOUT: import_ir_instD: {ir_id: import_ir78000005, inst_id: inst48000017} +// CHECK:STDOUT: import_ir_instE: {ir_id: import_ir78000005, inst_id: inst4800001A} +// CHECK:STDOUT: import_ir_instF: {ir_id: import_ir78000005, inst_id: inst4800001F} +// CHECK:STDOUT: import_ir_inst10: {ir_id: import_ir78000005, inst_id: inst48000020} +// CHECK:STDOUT: import_ir_inst11: {ir_id: import_ir78000005, inst_id: inst48000023} +// CHECK:STDOUT: import_ir_inst12: {ir_id: import_ir78000005, inst_id: inst4800002A} +// CHECK:STDOUT: import_ir_inst13: {ir_id: import_ir78000005, inst_id: inst4800002D} +// CHECK:STDOUT: import_ir_inst14: {ir_id: import_ir78000005, inst_id: inst48000030} +// CHECK:STDOUT: import_ir_inst15: {ir_id: import_ir78000005, inst_id: inst48000039} +// CHECK:STDOUT: import_ir_inst16: {ir_id: import_ir78000005, inst_id: inst4800003A} +// CHECK:STDOUT: import_ir_inst17: {ir_id: import_ir78000005, inst_id: inst4800003B} +// CHECK:STDOUT: import_ir_inst18: {ir_id: import_ir78000005, inst_id: inst48000094} +// CHECK:STDOUT: import_ir_inst19: {ir_id: import_ir78000005, inst_id: inst4800008F} +// CHECK:STDOUT: import_ir_inst1A: {ir_id: import_ir78000005, inst_id: inst480000B6} +// CHECK:STDOUT: import_ir_inst1B: {ir_id: import_ir78000005, inst_id: inst48000093} +// CHECK:STDOUT: import_ir_inst1C: {ir_id: import_ir78000005, inst_id: inst480000AD} +// CHECK:STDOUT: import_ir_inst1D: {ir_id: import_ir78000005, inst_id: inst480000A0} +// CHECK:STDOUT: import_ir_inst1E: {ir_id: import_ir78000005, inst_id: inst4800009F} +// CHECK:STDOUT: import_ir_inst1F: {ir_id: import_ir78000005, inst_id: inst480000AC} +// CHECK:STDOUT: import_ir_inst20: {ir_id: import_ir78000005, inst_id: inst480000A3} +// CHECK:STDOUT: import_ir_inst21: {ir_id: import_ir78000005, inst_id: inst480000A8} +// CHECK:STDOUT: import_ir_inst22: {ir_id: import_ir78000005, inst_id: inst480000A9} +// CHECK:STDOUT: import_ir_inst23: {ir_id: import_ir78000005, inst_id: inst480000AF} +// CHECK:STDOUT: import_ir_inst24: {ir_id: import_ir78000005, inst_id: inst48000082} +// CHECK:STDOUT: import_ir_inst25: {ir_id: import_ir78000005, inst_id: inst4800009A} +// CHECK:STDOUT: import_ir_inst26: {ir_id: import_ir78000005, inst_id: inst4800009B} +// CHECK:STDOUT: import_ir_inst27: {ir_id: import_ir78000005, inst_id: inst4800009C} +// CHECK:STDOUT: import_ir_inst28: {ir_id: import_ir78000005, inst_id: inst480000A1} +// CHECK:STDOUT: import_ir_inst29: {ir_id: import_ir78000005, inst_id: inst480000A2} +// CHECK:STDOUT: import_ir_inst2A: {ir_id: import_ir78000005, inst_id: inst480000A5} +// CHECK:STDOUT: import_ir_inst2B: {ir_id: import_ir78000005, inst_id: inst480000AB} +// CHECK:STDOUT: import_ir_inst2C: {ir_id: import_ir78000005, inst_id: inst480000AE} +// CHECK:STDOUT: import_ir_inst2D: {ir_id: import_ir78000005, inst_id: inst480000B1} +// CHECK:STDOUT: import_ir_inst2E: {ir_id: import_ir78000005, inst_id: inst480000C0} +// CHECK:STDOUT: import_ir_inst2F: {ir_id: import_ir78000005, inst_id: inst480000C8} +// CHECK:STDOUT: import_ir_inst30: {ir_id: import_ir78000005, inst_id: inst480000D4} +// CHECK:STDOUT: import_ir_inst31: {ir_id: import_ir78000005, inst_id: inst480000D5} +// CHECK:STDOUT: import_ir_inst32: {ir_id: import_ir78000005, inst_id: inst480000D6} +// CHECK:STDOUT: import_ir_inst33: {ir_id: import_ir78000005, inst_id: inst480000D7} +// CHECK:STDOUT: import_ir_inst34: {ir_id: import_ir78000005, inst_id: inst480000E3} +// CHECK:STDOUT: import_ir_inst35: {ir_id: import_ir78000005, inst_id: inst4800007F} +// CHECK:STDOUT: import_ir_inst36: {ir_id: import_ir78000005, inst_id: inst4800008A} +// CHECK:STDOUT: import_ir_inst37: {ir_id: import_ir78000005, inst_id: inst4800008D} +// CHECK:STDOUT: import_ir_inst38: {ir_id: import_ir78000005, inst_id: inst48000090} +// CHECK:STDOUT: import_ir_inst39: {ir_id: import_ir78000005, inst_id: inst48000081} +// CHECK:STDOUT: import_ir_inst3A: {ir_id: import_ir78000005, inst_id: inst48000084} +// CHECK:STDOUT: import_ir_inst3B: {ir_id: import_ir78000005, inst_id: inst48000088} +// CHECK:STDOUT: import_ir_inst3C: {ir_id: import_ir78000005, inst_id: inst4800008C} +// CHECK:STDOUT: import_ir_inst3D: {ir_id: import_ir78000005, inst_id: inst48000092} +// CHECK:STDOUT: import_ir_inst3E: {ir_id: import_ir78000005, inst_id: inst48000096} +// CHECK:STDOUT: import_ir_inst3F: {ir_id: import_ir78000005, inst_id: inst480000B9} +// CHECK:STDOUT: import_ir_inst40: {ir_id: import_ir78000005, inst_id: inst480000BA} +// CHECK:STDOUT: import_ir_inst41: {ir_id: import_ir78000005, inst_id: inst480000F6} +// CHECK:STDOUT: import_ir_inst42: {ir_id: import_ir78000005, inst_id: inst480000F2} +// CHECK:STDOUT: import_ir_inst43: {ir_id: import_ir78000005, inst_id: inst480000F0} +// CHECK:STDOUT: import_ir_inst44: {ir_id: import_ir78000005, inst_id: inst480000F1} +// CHECK:STDOUT: import_ir_inst45: {ir_id: import_ir78000005, inst_id: inst480000F3} +// CHECK:STDOUT: import_ir_inst46: {ir_id: import_ir78000005, inst_id: inst48000115} +// CHECK:STDOUT: import_ir_inst47: {ir_id: import_ir78000005, inst_id: inst48000111} +// CHECK:STDOUT: import_ir_inst48: {ir_id: import_ir78000005, inst_id: inst4800010F} +// CHECK:STDOUT: import_ir_inst49: {ir_id: import_ir78000005, inst_id: inst48000110} +// CHECK:STDOUT: import_ir_inst4A: {ir_id: import_ir78000005, inst_id: inst48000112} +// CHECK:STDOUT: import_ir_inst4B: {ir_id: import_ir78000005, inst_id: inst48000134} +// CHECK:STDOUT: import_ir_inst4C: {ir_id: import_ir78000005, inst_id: inst48000130} +// CHECK:STDOUT: import_ir_inst4D: {ir_id: import_ir78000005, inst_id: inst4800012E} +// CHECK:STDOUT: import_ir_inst4E: {ir_id: import_ir78000005, inst_id: inst4800012F} +// CHECK:STDOUT: import_ir_inst4F: {ir_id: import_ir78000005, inst_id: inst48000131} +// CHECK:STDOUT: import_ir_inst50: {ir_id: import_ir78000005, inst_id: inst48000153} +// CHECK:STDOUT: import_ir_inst51: {ir_id: import_ir78000005, inst_id: inst4800014F} +// CHECK:STDOUT: import_ir_inst52: {ir_id: import_ir78000005, inst_id: inst4800014D} +// CHECK:STDOUT: import_ir_inst53: {ir_id: import_ir78000005, inst_id: inst4800014E} +// CHECK:STDOUT: import_ir_inst54: {ir_id: import_ir78000005, inst_id: inst48000150} +// CHECK:STDOUT: import_ir_inst55: {ir_id: import_ir78000005, inst_id: inst4800017F} +// CHECK:STDOUT: import_ir_inst56: {ir_id: import_ir78000005, inst_id: inst4800017A} +// CHECK:STDOUT: import_ir_inst57: {ir_id: import_ir78000005, inst_id: inst4800019E} +// CHECK:STDOUT: import_ir_inst58: {ir_id: import_ir78000005, inst_id: inst4800017E} +// CHECK:STDOUT: import_ir_inst59: {ir_id: import_ir78000005, inst_id: inst4800016E} +// CHECK:STDOUT: import_ir_inst5A: {ir_id: import_ir78000005, inst_id: inst48000175} +// CHECK:STDOUT: import_ir_inst5B: {ir_id: import_ir78000005, inst_id: inst48000178} +// CHECK:STDOUT: import_ir_inst5C: {ir_id: import_ir78000005, inst_id: inst4800017B} +// CHECK:STDOUT: import_ir_inst5D: {ir_id: import_ir78000005, inst_id: inst48000171} +// CHECK:STDOUT: import_ir_inst5E: {ir_id: import_ir78000005, inst_id: inst48000170} +// CHECK:STDOUT: import_ir_inst5F: {ir_id: import_ir78000005, inst_id: inst48000173} +// CHECK:STDOUT: import_ir_inst60: {ir_id: import_ir78000005, inst_id: inst48000177} +// CHECK:STDOUT: import_ir_inst61: {ir_id: import_ir78000005, inst_id: inst4800017D} +// CHECK:STDOUT: import_ir_inst62: {ir_id: import_ir78000005, inst_id: inst48000181} +// CHECK:STDOUT: import_ir_inst63: {ir_id: import_ir78000005, inst_id: inst48000195} +// CHECK:STDOUT: import_ir_inst64: {ir_id: import_ir78000005, inst_id: inst48000188} +// CHECK:STDOUT: import_ir_inst65: {ir_id: import_ir78000005, inst_id: inst48000187} +// CHECK:STDOUT: import_ir_inst66: {ir_id: import_ir78000005, inst_id: inst48000194} +// CHECK:STDOUT: import_ir_inst67: {ir_id: import_ir78000005, inst_id: inst4800018B} +// CHECK:STDOUT: import_ir_inst68: {ir_id: import_ir78000005, inst_id: inst48000190} +// CHECK:STDOUT: import_ir_inst69: {ir_id: import_ir78000005, inst_id: inst48000191} +// CHECK:STDOUT: import_ir_inst6A: {ir_id: import_ir78000005, inst_id: inst48000197} +// CHECK:STDOUT: import_ir_inst6B: {ir_id: import_ir78000005, inst_id: inst48000183} +// CHECK:STDOUT: import_ir_inst6C: {ir_id: import_ir78000005, inst_id: inst48000184} +// CHECK:STDOUT: import_ir_inst6D: {ir_id: import_ir78000005, inst_id: inst48000189} +// CHECK:STDOUT: import_ir_inst6E: {ir_id: import_ir78000005, inst_id: inst4800018A} +// CHECK:STDOUT: import_ir_inst6F: {ir_id: import_ir78000005, inst_id: inst4800018D} +// CHECK:STDOUT: import_ir_inst70: {ir_id: import_ir78000005, inst_id: inst48000193} +// CHECK:STDOUT: import_ir_inst71: {ir_id: import_ir78000005, inst_id: inst48000196} +// CHECK:STDOUT: import_ir_inst72: {ir_id: import_ir78000005, inst_id: inst48000199} +// CHECK:STDOUT: import_ir_inst73: {ir_id: import_ir78000005, inst_id: inst480001A1} +// CHECK:STDOUT: import_ir_inst74: {ir_id: import_ir78000005, inst_id: inst480001A2} +// CHECK:STDOUT: import_ir_inst75: {ir_id: import_ir78000005, inst_id: inst480001A5} +// CHECK:STDOUT: import_ir_inst76: {ir_id: import_ir78000005, inst_id: inst480001AF} +// CHECK:STDOUT: import_ir_inst77: {ir_id: import_ir78000005, inst_id: inst480001AB} +// CHECK:STDOUT: import_ir_inst78: {ir_id: import_ir78000005, inst_id: inst480001A9} +// CHECK:STDOUT: import_ir_inst79: {ir_id: import_ir78000005, inst_id: inst480001AA} +// CHECK:STDOUT: import_ir_inst7A: {ir_id: import_ir78000005, inst_id: inst480001AC} +// CHECK:STDOUT: import_ir_inst7B: {ir_id: import_ir78000005, inst_id: inst480001CC} +// CHECK:STDOUT: import_ir_inst7C: {ir_id: import_ir78000005, inst_id: inst480001C8} +// CHECK:STDOUT: import_ir_inst7D: {ir_id: import_ir78000005, inst_id: inst480001C6} +// CHECK:STDOUT: import_ir_inst7E: {ir_id: import_ir78000005, inst_id: inst480001C7} +// CHECK:STDOUT: import_ir_inst7F: {ir_id: import_ir78000005, inst_id: inst480001C9} +// CHECK:STDOUT: import_ir_inst80: {ir_id: import_ir78000005, inst_id: inst4800020C} +// CHECK:STDOUT: import_ir_inst81: {ir_id: import_ir78000005, inst_id: inst48000207} +// CHECK:STDOUT: import_ir_inst82: {ir_id: import_ir78000005, inst_id: inst48000232} +// CHECK:STDOUT: import_ir_inst83: {ir_id: import_ir78000005, inst_id: inst4800020B} +// CHECK:STDOUT: import_ir_inst84: {ir_id: import_ir78000005, inst_id: inst48000229} +// CHECK:STDOUT: import_ir_inst85: {ir_id: import_ir78000005, inst_id: inst4800021C} +// CHECK:STDOUT: import_ir_inst86: {ir_id: import_ir78000005, inst_id: inst4800021B} +// CHECK:STDOUT: import_ir_inst87: {ir_id: import_ir78000005, inst_id: inst48000228} +// CHECK:STDOUT: import_ir_inst88: {ir_id: import_ir78000005, inst_id: inst4800021F} +// CHECK:STDOUT: import_ir_inst89: {ir_id: import_ir78000005, inst_id: inst48000224} +// CHECK:STDOUT: import_ir_inst8A: {ir_id: import_ir78000005, inst_id: inst48000225} +// CHECK:STDOUT: import_ir_inst8B: {ir_id: import_ir78000005, inst_id: inst4800022B} +// CHECK:STDOUT: import_ir_inst8C: {ir_id: import_ir78000005, inst_id: inst480001E9} +// CHECK:STDOUT: import_ir_inst8D: {ir_id: import_ir78000005, inst_id: inst480001F0} +// CHECK:STDOUT: import_ir_inst8E: {ir_id: import_ir78000005, inst_id: inst48000214} +// CHECK:STDOUT: import_ir_inst8F: {ir_id: import_ir78000005, inst_id: inst48000215} +// CHECK:STDOUT: import_ir_inst90: {ir_id: import_ir78000005, inst_id: inst48000216} +// CHECK:STDOUT: import_ir_inst91: {ir_id: import_ir78000005, inst_id: inst48000217} +// CHECK:STDOUT: import_ir_inst92: {ir_id: import_ir78000005, inst_id: inst48000218} +// CHECK:STDOUT: import_ir_inst93: {ir_id: import_ir78000005, inst_id: inst4800021D} +// CHECK:STDOUT: import_ir_inst94: {ir_id: import_ir78000005, inst_id: inst4800021E} +// CHECK:STDOUT: import_ir_inst95: {ir_id: import_ir78000005, inst_id: inst48000221} +// CHECK:STDOUT: import_ir_inst96: {ir_id: import_ir78000005, inst_id: inst48000227} +// CHECK:STDOUT: import_ir_inst97: {ir_id: import_ir78000005, inst_id: inst4800022A} +// CHECK:STDOUT: import_ir_inst98: {ir_id: import_ir78000005, inst_id: inst4800022D} +// CHECK:STDOUT: import_ir_inst99: {ir_id: import_ir78000005, inst_id: inst4800023D} +// CHECK:STDOUT: import_ir_inst9A: {ir_id: import_ir78000005, inst_id: inst48000243} +// CHECK:STDOUT: import_ir_inst9B: {ir_id: import_ir78000005, inst_id: inst48000247} +// CHECK:STDOUT: import_ir_inst9C: {ir_id: import_ir78000005, inst_id: inst48000248} +// CHECK:STDOUT: import_ir_inst9D: {ir_id: import_ir78000005, inst_id: inst48000249} +// CHECK:STDOUT: import_ir_inst9E: {ir_id: import_ir78000005, inst_id: inst4800024A} +// CHECK:STDOUT: import_ir_inst9F: {ir_id: import_ir78000005, inst_id: inst4800024F} +// CHECK:STDOUT: import_ir_instA0: {ir_id: import_ir78000005, inst_id: inst48000259} +// CHECK:STDOUT: import_ir_instA1: {ir_id: import_ir78000005, inst_id: inst48000262} +// CHECK:STDOUT: import_ir_instA2: {ir_id: import_ir78000005, inst_id: inst48000263} +// CHECK:STDOUT: import_ir_instA3: {ir_id: import_ir78000005, inst_id: inst48000264} +// CHECK:STDOUT: import_ir_instA4: {ir_id: import_ir78000005, inst_id: inst48000265} +// CHECK:STDOUT: import_ir_instA5: {ir_id: import_ir78000005, inst_id: inst48000271} +// CHECK:STDOUT: import_ir_instA6: {ir_id: import_ir78000005, inst_id: inst480001E7} +// CHECK:STDOUT: import_ir_instA7: {ir_id: import_ir78000005, inst_id: inst480001ED} +// CHECK:STDOUT: import_ir_instA8: {ir_id: import_ir78000005, inst_id: inst48000202} +// CHECK:STDOUT: import_ir_instA9: {ir_id: import_ir78000005, inst_id: inst48000204} +// CHECK:STDOUT: import_ir_instAA: {ir_id: import_ir78000005, inst_id: inst48000208} +// CHECK:STDOUT: import_ir_instAB: {ir_id: import_ir78000005, inst_id: inst480001E8} +// CHECK:STDOUT: import_ir_instAC: {ir_id: import_ir78000005, inst_id: inst480001EA} +// CHECK:STDOUT: import_ir_instAD: {ir_id: import_ir78000005, inst_id: inst480001EF} +// CHECK:STDOUT: import_ir_instAE: {ir_id: import_ir78000005, inst_id: inst480001F2} +// CHECK:STDOUT: import_ir_instAF: {ir_id: import_ir78000005, inst_id: inst480001F8} +// CHECK:STDOUT: import_ir_instB0: {ir_id: import_ir78000005, inst_id: inst480001FB} +// CHECK:STDOUT: import_ir_instB1: {ir_id: import_ir78000005, inst_id: inst480001FF} +// CHECK:STDOUT: import_ir_instB2: {ir_id: import_ir78000005, inst_id: inst48000203} +// CHECK:STDOUT: import_ir_instB3: {ir_id: import_ir78000005, inst_id: inst4800020A} +// CHECK:STDOUT: import_ir_instB4: {ir_id: import_ir78000005, inst_id: inst4800020E} +// CHECK:STDOUT: import_ir_instB5: {ir_id: import_ir78000005, inst_id: inst48000235} +// CHECK:STDOUT: import_ir_instB6: {ir_id: import_ir78000005, inst_id: inst48000236} +// CHECK:STDOUT: import_ir_instB7: {ir_id: import_ir78000005, inst_id: inst480002B2} +// CHECK:STDOUT: import_ir_instB8: {ir_id: import_ir78000005, inst_id: inst480002AD} +// CHECK:STDOUT: import_ir_instB9: {ir_id: import_ir78000005, inst_id: inst480002DC} +// CHECK:STDOUT: import_ir_instBA: {ir_id: import_ir78000005, inst_id: inst480002B1} +// CHECK:STDOUT: import_ir_instBB: {ir_id: import_ir78000005, inst_id: inst480002D3} +// CHECK:STDOUT: import_ir_instBC: {ir_id: import_ir78000005, inst_id: inst480002C6} +// CHECK:STDOUT: import_ir_instBD: {ir_id: import_ir78000005, inst_id: inst480002C5} +// CHECK:STDOUT: import_ir_instBE: {ir_id: import_ir78000005, inst_id: inst480002D2} +// CHECK:STDOUT: import_ir_instBF: {ir_id: import_ir78000005, inst_id: inst480002C9} +// CHECK:STDOUT: import_ir_instC0: {ir_id: import_ir78000005, inst_id: inst480002CE} +// CHECK:STDOUT: import_ir_instC1: {ir_id: import_ir78000005, inst_id: inst480002CF} +// CHECK:STDOUT: import_ir_instC2: {ir_id: import_ir78000005, inst_id: inst480002D5} +// CHECK:STDOUT: import_ir_instC3: {ir_id: import_ir78000005, inst_id: inst48000284} +// CHECK:STDOUT: import_ir_instC4: {ir_id: import_ir78000005, inst_id: inst4800028A} +// CHECK:STDOUT: import_ir_instC5: {ir_id: import_ir78000005, inst_id: inst48000291} +// CHECK:STDOUT: import_ir_instC6: {ir_id: import_ir78000005, inst_id: inst480002BC} +// CHECK:STDOUT: import_ir_instC7: {ir_id: import_ir78000005, inst_id: inst480002BD} +// CHECK:STDOUT: import_ir_instC8: {ir_id: import_ir78000005, inst_id: inst480002BE} +// CHECK:STDOUT: import_ir_instC9: {ir_id: import_ir78000005, inst_id: inst480002BF} +// CHECK:STDOUT: import_ir_instCA: {ir_id: import_ir78000005, inst_id: inst480002C0} +// CHECK:STDOUT: import_ir_instCB: {ir_id: import_ir78000005, inst_id: inst480002C1} +// CHECK:STDOUT: import_ir_instCC: {ir_id: import_ir78000005, inst_id: inst480002C2} +// CHECK:STDOUT: import_ir_instCD: {ir_id: import_ir78000005, inst_id: inst480002C7} +// CHECK:STDOUT: import_ir_instCE: {ir_id: import_ir78000005, inst_id: inst480002C8} +// CHECK:STDOUT: import_ir_instCF: {ir_id: import_ir78000005, inst_id: inst480002CB} +// CHECK:STDOUT: import_ir_instD0: {ir_id: import_ir78000005, inst_id: inst480002D1} +// CHECK:STDOUT: import_ir_instD1: {ir_id: import_ir78000005, inst_id: inst480002D4} +// CHECK:STDOUT: import_ir_instD2: {ir_id: import_ir78000005, inst_id: inst480002D7} +// CHECK:STDOUT: import_ir_instD3: {ir_id: import_ir78000005, inst_id: inst480002E7} +// CHECK:STDOUT: import_ir_instD4: {ir_id: import_ir78000005, inst_id: inst480002EC} +// CHECK:STDOUT: import_ir_instD5: {ir_id: import_ir78000005, inst_id: inst480002F0} +// CHECK:STDOUT: import_ir_instD6: {ir_id: import_ir78000005, inst_id: inst480002F1} +// CHECK:STDOUT: import_ir_instD7: {ir_id: import_ir78000005, inst_id: inst480002F2} +// CHECK:STDOUT: import_ir_instD8: {ir_id: import_ir78000005, inst_id: inst480002F3} +// CHECK:STDOUT: import_ir_instD9: {ir_id: import_ir78000005, inst_id: inst480002F8} +// CHECK:STDOUT: import_ir_instDA: {ir_id: import_ir78000005, inst_id: inst48000300} +// CHECK:STDOUT: import_ir_instDB: {ir_id: import_ir78000005, inst_id: inst48000304} +// CHECK:STDOUT: import_ir_instDC: {ir_id: import_ir78000005, inst_id: inst48000305} +// CHECK:STDOUT: import_ir_instDD: {ir_id: import_ir78000005, inst_id: inst48000306} +// CHECK:STDOUT: import_ir_instDE: {ir_id: import_ir78000005, inst_id: inst48000307} +// CHECK:STDOUT: import_ir_instDF: {ir_id: import_ir78000005, inst_id: inst4800030C} +// CHECK:STDOUT: import_ir_instE0: {ir_id: import_ir78000005, inst_id: inst48000316} +// CHECK:STDOUT: import_ir_instE1: {ir_id: import_ir78000005, inst_id: inst4800031F} +// CHECK:STDOUT: import_ir_instE2: {ir_id: import_ir78000005, inst_id: inst48000320} +// CHECK:STDOUT: import_ir_instE3: {ir_id: import_ir78000005, inst_id: inst48000321} +// CHECK:STDOUT: import_ir_instE4: {ir_id: import_ir78000005, inst_id: inst48000322} +// CHECK:STDOUT: import_ir_instE5: {ir_id: import_ir78000005, inst_id: inst4800032E} +// CHECK:STDOUT: import_ir_instE6: {ir_id: import_ir78000005, inst_id: inst48000282} +// CHECK:STDOUT: import_ir_instE7: {ir_id: import_ir78000005, inst_id: inst48000288} +// CHECK:STDOUT: import_ir_instE8: {ir_id: import_ir78000005, inst_id: inst4800028E} +// CHECK:STDOUT: import_ir_instE9: {ir_id: import_ir78000005, inst_id: inst480002A7} +// CHECK:STDOUT: import_ir_instEA: {ir_id: import_ir78000005, inst_id: inst480002A9} +// CHECK:STDOUT: import_ir_instEB: {ir_id: import_ir78000005, inst_id: inst480002AE} +// CHECK:STDOUT: import_ir_instEC: {ir_id: import_ir78000005, inst_id: inst48000283} +// CHECK:STDOUT: import_ir_instED: {ir_id: import_ir78000005, inst_id: inst48000285} +// CHECK:STDOUT: import_ir_instEE: {ir_id: import_ir78000005, inst_id: inst48000289} +// CHECK:STDOUT: import_ir_instEF: {ir_id: import_ir78000005, inst_id: inst4800028B} +// CHECK:STDOUT: import_ir_instF0: {ir_id: import_ir78000005, inst_id: inst48000290} +// CHECK:STDOUT: import_ir_instF1: {ir_id: import_ir78000005, inst_id: inst48000293} +// CHECK:STDOUT: import_ir_instF2: {ir_id: import_ir78000005, inst_id: inst4800029A} +// CHECK:STDOUT: import_ir_instF3: {ir_id: import_ir78000005, inst_id: inst4800029D} +// CHECK:STDOUT: import_ir_instF4: {ir_id: import_ir78000005, inst_id: inst480002A0} +// CHECK:STDOUT: import_ir_instF5: {ir_id: import_ir78000005, inst_id: inst480002A4} +// CHECK:STDOUT: import_ir_instF6: {ir_id: import_ir78000005, inst_id: inst480002A8} +// CHECK:STDOUT: import_ir_instF7: {ir_id: import_ir78000005, inst_id: inst480002B0} +// CHECK:STDOUT: import_ir_instF8: {ir_id: import_ir78000005, inst_id: inst480002B4} +// CHECK:STDOUT: import_ir_instF9: {ir_id: import_ir78000005, inst_id: inst480002DF} +// CHECK:STDOUT: import_ir_instFA: {ir_id: import_ir78000005, inst_id: inst480002E0} // CHECK:STDOUT: clang_decls: {} // CHECK:STDOUT: clang_decl_signatures: {} // CHECK:STDOUT: name_scopes: diff --git a/toolchain/check/testdata/builtins/float_literal/add.carbon b/toolchain/check/testdata/builtins/float_literal/add.carbon index 5215633ca945..8b306d1ffa28 100644 --- a/toolchain/check/testdata/builtins/float_literal/add.carbon +++ b/toolchain/check/testdata/builtins/float_literal/add.carbon @@ -66,7 +66,8 @@ fn F(){ // CHECK:STDOUT: %float.846: Core.FloatLiteral = float_literal_value 65536p6 [concrete] // CHECK:STDOUT: %float.333: Core.FloatLiteral = float_literal_value 16p6 [concrete] // CHECK:STDOUT: %float.283: Core.FloatLiteral = float_literal_value 65552p6 [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,14 +75,14 @@ fn F(){ // CHECK:STDOUT: .FloatLiteral = %Core.FloatLiteral // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.FloatLiteral: type = import_ref Core//prelude/parts/float_literal, FloatLiteral, loaded [concrete = Core.FloatLiteral] // CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/parts/float, Float, loaded [concrete = constants.%Float.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/builtins/float_literal/sub.carbon b/toolchain/check/testdata/builtins/float_literal/sub.carbon index 21d66de795ce..598bdfe223b6 100644 --- a/toolchain/check/testdata/builtins/float_literal/sub.carbon +++ b/toolchain/check/testdata/builtins/float_literal/sub.carbon @@ -67,7 +67,8 @@ let v1: Core.FloatLiteral = Sub(0x1.0p1024000000000, 0.0000000000000000001); // CHECK:STDOUT: %float.8466d5.1: Core.FloatLiteral = float_literal_value 65536p6 [concrete] // CHECK:STDOUT: %float.333a1f.1: Core.FloatLiteral = float_literal_value 16p6 [concrete] // CHECK:STDOUT: %float.bec4a4.1: Core.FloatLiteral = float_literal_value 65520p6 [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,14 +76,14 @@ let v1: Core.FloatLiteral = Sub(0x1.0p1024000000000, 0.0000000000000000001); // CHECK:STDOUT: .FloatLiteral = %Core.FloatLiteral // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.FloatLiteral: type = import_ref Core//prelude/parts/float_literal, FloatLiteral, loaded [concrete = Core.FloatLiteral] // CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/parts/float, Float, loaded [concrete = constants.%Float.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/abstract/abstract.carbon b/toolchain/check/testdata/class/abstract/abstract.carbon index 6607f4f89a96..bed6090ba93d 100644 --- a/toolchain/check/testdata/class/abstract/abstract.carbon +++ b/toolchain/check/testdata/class/abstract/abstract.carbon @@ -149,9 +149,10 @@ abstract class Abstract { } fn F() { - // CHECK:STDERR: fail_abstract_let_temporary_struct_literal.carbon:[[@LINE+4]]:28-29: error: initialization of abstract class `Abstract` [AbstractTypeInInit] + // CHECK:STDERR: fail_abstract_let_temporary_struct_literal.carbon:[[@LINE+5]]:28-29: error: initialization of abstract class `Abstract` [AbstractTypeInInit] // CHECK:STDERR: - // CHECK:STDERR: fail_abstract_let_temporary_struct_literal.carbon:[[@LINE+2]]:28-29: error: cannot access member of interface `Core.Destroy` in type `Abstract` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_abstract_let_temporary_struct_literal.carbon:[[@LINE+3]]:28-29: error: cannot convert type `Abstract` into type implementing `Core.Destroy` [ConversionFailureTypeToFacet] + // CHECK:STDERR: {{.*}}/prelude/destroy.carbon:36:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: let unused l: Abstract = {}; } @@ -169,7 +170,8 @@ class Derived { fn F() { // TODO: support destroying classes that derive from abstract types. // - // CHECK:STDERR: fail_todo_abstract_let_temporary.carbon:[[@LINE+2]]:28-50: error: cannot access member of interface `Core.Destroy` in type `Derived` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_todo_abstract_let_temporary.carbon:[[@LINE+3]]:28-50: error: cannot convert type `Derived` into type implementing `Core.Destroy` [ConversionFailureTypeToFacet] + // CHECK:STDERR: {{.*}}/prelude/destroy.carbon:36:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: let unused l: Abstract = {.base = {}} as Derived; } @@ -261,16 +263,17 @@ fn Assign(ref a: Abstract) { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Var.type: type = fn_type @Var [concrete] // CHECK:STDOUT: %Var: %Var.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -869,16 +872,17 @@ fn Assign(ref a: Abstract) { // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %Abstract.val: %Abstract = struct_value () [concrete] // CHECK:STDOUT: %.69a: ref %Abstract = temporary invalid, %Abstract.val [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -902,14 +906,14 @@ fn Assign(ref a: Abstract) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_29.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc11_29.2: ref %Abstract = temporary_storage -// CHECK:STDOUT: %.loc11_29.3: init %Abstract to %.loc11_29.2 = class_init () [concrete = constants.%Abstract.val] -// CHECK:STDOUT: %.loc11_29.4: init %Abstract = converted %.loc11_29.1, %.loc11_29.3 [concrete = constants.%Abstract.val] -// CHECK:STDOUT: %.loc11_29.5: ref %Abstract = temporary %.loc11_29.2, %.loc11_29.4 [concrete = constants.%.69a] -// CHECK:STDOUT: %.loc11_29.6: %Abstract = acquire_value %.loc11_29.5 [concrete = constants.%Abstract.val] +// CHECK:STDOUT: %.loc12_29.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc12_29.2: ref %Abstract = temporary_storage +// CHECK:STDOUT: %.loc12_29.3: init %Abstract to %.loc12_29.2 = class_init () [concrete = constants.%Abstract.val] +// CHECK:STDOUT: %.loc12_29.4: init %Abstract = converted %.loc12_29.1, %.loc12_29.3 [concrete = constants.%Abstract.val] +// CHECK:STDOUT: %.loc12_29.5: ref %Abstract = temporary %.loc12_29.2, %.loc12_29.4 [concrete = constants.%.69a] +// CHECK:STDOUT: %.loc12_29.6: %Abstract = acquire_value %.loc12_29.5 [concrete = constants.%Abstract.val] // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [concrete = constants.%Abstract] -// CHECK:STDOUT: %l: %Abstract = wrapper_binding l, %.loc11_29.6 +// CHECK:STDOUT: %l: %Abstract = wrapper_binding l, %.loc12_29.6 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %l.patt: %pattern_type.169 = value_binding_pattern l [concrete = constants.%l.patt] // CHECK:STDOUT: } @@ -940,16 +944,17 @@ fn Assign(ref a: Abstract) { // CHECK:STDOUT: %Derived.val: %Derived = struct_value (%Abstract.val) [concrete] // CHECK:STDOUT: %.521: ref %Derived = temporary invalid, %Derived.val [concrete] // CHECK:STDOUT: %.5d3: ref %Abstract = class_element_access %.521, element0 [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -988,22 +993,22 @@ fn Assign(ref a: Abstract) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_38.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct.a40] -// CHECK:STDOUT: %.loc15_39.1: %struct_type.base.f5e = struct_literal (%.loc15_38.1) [concrete = constants.%struct] +// CHECK:STDOUT: %.loc16_38.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct.a40] +// CHECK:STDOUT: %.loc16_39.1: %struct_type.base.f5e = struct_literal (%.loc16_38.1) [concrete = constants.%struct] // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived] -// CHECK:STDOUT: %.loc15_39.2: ref %Derived = temporary_storage -// CHECK:STDOUT: %.loc15_39.3: ref %.79f = class_element_access %.loc15_39.2, element0 -// CHECK:STDOUT: %.loc15_38.2: init %.79f to %.loc15_39.3 = class_init () [concrete = constants.%empty_struct.5e0] -// CHECK:STDOUT: %.loc15_39.4: init %.79f = converted %.loc15_38.1, %.loc15_38.2 [concrete = constants.%empty_struct.5e0] -// CHECK:STDOUT: %.loc15_39.5: init %Abstract = as_compatible %.loc15_39.4 [concrete = constants.%Abstract.val] -// CHECK:STDOUT: %.loc15_39.6: init %Derived to %.loc15_39.2 = class_init (%.loc15_39.5) [concrete = constants.%Derived.val] -// CHECK:STDOUT: %.loc15_41.1: init %Derived = converted %.loc15_39.1, %.loc15_39.6 [concrete = constants.%Derived.val] -// CHECK:STDOUT: %.loc15_41.2: ref %Derived = temporary %.loc15_39.2, %.loc15_41.1 [concrete = constants.%.521] -// CHECK:STDOUT: %.loc15_41.3: ref %Abstract = class_element_access %.loc15_41.2, element0 [concrete = constants.%.5d3] -// CHECK:STDOUT: %.loc15_41.4: ref %Abstract = converted %.loc15_41.1, %.loc15_41.3 [concrete = constants.%.5d3] -// CHECK:STDOUT: %.loc15_41.5: %Abstract = acquire_value %.loc15_41.4 +// CHECK:STDOUT: %.loc16_39.2: ref %Derived = temporary_storage +// CHECK:STDOUT: %.loc16_39.3: ref %.79f = class_element_access %.loc16_39.2, element0 +// CHECK:STDOUT: %.loc16_38.2: init %.79f to %.loc16_39.3 = class_init () [concrete = constants.%empty_struct.5e0] +// CHECK:STDOUT: %.loc16_39.4: init %.79f = converted %.loc16_38.1, %.loc16_38.2 [concrete = constants.%empty_struct.5e0] +// CHECK:STDOUT: %.loc16_39.5: init %Abstract = as_compatible %.loc16_39.4 [concrete = constants.%Abstract.val] +// CHECK:STDOUT: %.loc16_39.6: init %Derived to %.loc16_39.2 = class_init (%.loc16_39.5) [concrete = constants.%Derived.val] +// CHECK:STDOUT: %.loc16_41.1: init %Derived = converted %.loc16_39.1, %.loc16_39.6 [concrete = constants.%Derived.val] +// CHECK:STDOUT: %.loc16_41.2: ref %Derived = temporary %.loc16_39.2, %.loc16_41.1 [concrete = constants.%.521] +// CHECK:STDOUT: %.loc16_41.3: ref %Abstract = class_element_access %.loc16_41.2, element0 [concrete = constants.%.5d3] +// CHECK:STDOUT: %.loc16_41.4: ref %Abstract = converted %.loc16_41.1, %.loc16_41.3 [concrete = constants.%.5d3] +// CHECK:STDOUT: %.loc16_41.5: %Abstract = acquire_value %.loc16_41.4 // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [concrete = constants.%Abstract] -// CHECK:STDOUT: %l: %Abstract = wrapper_binding l, %.loc15_41.5 +// CHECK:STDOUT: %l: %Abstract = wrapper_binding l, %.loc16_41.5 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %l.patt: %pattern_type.169 = value_binding_pattern l [concrete = constants.%l.patt] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/abstract/fail_abstract_in_tuple.carbon b/toolchain/check/testdata/class/abstract/fail_abstract_in_tuple.carbon index 2e56736411c0..d4426d2b9635 100644 --- a/toolchain/check/testdata/class/abstract/fail_abstract_in_tuple.carbon +++ b/toolchain/check/testdata/class/abstract/fail_abstract_in_tuple.carbon @@ -167,16 +167,17 @@ fn Var5() { // CHECK:STDOUT: %tuple.type.135: type = tuple_type (type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.135 = tuple_value (%Abstract2) [concrete] // CHECK:STDOUT: %tuple.type.ea9: type = tuple_type (%Abstract2) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -298,16 +299,17 @@ fn Var5() { // CHECK:STDOUT: %tuple.type.693: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.693 = tuple_value (%Abstract4, %Abstract5) [concrete] // CHECK:STDOUT: %tuple.type.417: type = tuple_type (%Abstract4, %Abstract5) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -370,16 +372,17 @@ fn Var5() { // CHECK:STDOUT: %tuple.type.4d1: type = tuple_type (type, %empty_struct_type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.4d1 = tuple_value (%Abstract6, %empty_struct) [concrete] // CHECK:STDOUT: %tuple.type.427: type = tuple_type (%Abstract6, %empty_struct_type) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -433,16 +436,17 @@ fn Var5() { // CHECK:STDOUT: %tuple.type.12a: type = tuple_type (%empty_struct_type, type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.12a = tuple_value (%empty_struct, %Abstract7) [concrete] // CHECK:STDOUT: %tuple.type.9db: type = tuple_type (%empty_struct_type, %Abstract7) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -528,19 +532,20 @@ fn Var5() { // CHECK:STDOUT: %tuple.type.135: type = tuple_type (type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.135 = tuple_value (%Abstract) [concrete] // CHECK:STDOUT: %tuple.type.763: type = tuple_type (%Abstract) [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.Abstract: type = import_ref Main//lib, Abstract, loaded [concrete = constants.%Abstract] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//lib, loc3_26, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.fe1 = import_ref Main//lib, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/class/access/access_modifiers.carbon b/toolchain/check/testdata/class/access/access_modifiers.carbon index c83a8d5906a1..492aee2afab0 100644 --- a/toolchain/check/testdata/class/access/access_modifiers.carbon +++ b/toolchain/check/testdata/class/access/access_modifiers.carbon @@ -193,79 +193,30 @@ class A { // CHECK:STDOUT: %Circle.val: %Circle = struct_value (%int_5.708) [concrete] // CHECK:STDOUT: %circle.patt: %pattern_type.f70 = value_binding_pattern circle [concrete] // CHECK:STDOUT: %radius.patt: %pattern_type.d94 = value_binding_pattern radius [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_36.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc20_36.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20_36.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a41: type = pattern_type %struct_type.radius.082 [concrete] -// CHECK:STDOUT: %self.param_patt.8e9: %pattern_type.a41 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.856: %pattern_type.a41 = wrapper_binding_pattern self, %self.param_patt.8e9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_36.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc20_36.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2a8: %pattern_type.f70 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4be: %pattern_type.f70 = wrapper_binding_pattern self, %self.param_patt.2a8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_36.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc20_36.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20_36.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20_36.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20_36.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.cde: %SubobjectDestroy.type = facet_value %Circle, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.60b: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cde) [concrete] +// CHECK:STDOUT: %Destroy.facet.4b3: %Destroy.type = facet_value %Circle, (%DestroyImpl.impl_witness.60b, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_36.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc20_36.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_36.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a41 = ref_param_pattern [concrete = constants.%self.param_patt.8e9] -// CHECK:STDOUT: %self.patt: %pattern_type.a41 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.856] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.radius.082 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.radius.082 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc20_36.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a41 = ref_param_pattern [concrete = constants.%self.param_patt.8e9] -// CHECK:STDOUT: %self.patt: %pattern_type.a41 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.856] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.radius.082 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.radius.082 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_36.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f70 = ref_param_pattern [concrete = constants.%self.param_patt.2a8] -// CHECK:STDOUT: %self.patt: %pattern_type.f70 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4be] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Circle = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Circle = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc20_36.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f70 = ref_param_pattern [concrete = constants.%self.param_patt.2a8] -// CHECK:STDOUT: %self.patt: %pattern_type.f70 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4be] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Circle = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Circle = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Circle { @@ -325,54 +276,39 @@ class A { // CHECK:STDOUT: %SOME_INTERNAL_CONSTANT.ref: = name_ref SOME_INTERNAL_CONSTANT, [concrete = ] // CHECK:STDOUT: %circle.ref.loc37: %Circle = name_ref circle, %circle // CHECK:STDOUT: %SomeInternalFunction.ref: = name_ref SomeInternalFunction, [concrete = ] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc20_36.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc20_36.2) +// CHECK:STDOUT: %Destroy.facet.loc20_36.1: %Destroy.type = facet_value constants.%Circle, (constants.%DestroyImpl.impl_witness.60b, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.4b3] +// CHECK:STDOUT: %.loc20_36.4: %Destroy.type = converted constants.%Circle, %Destroy.facet.loc20_36.1 [concrete = constants.%Destroy.facet.4b3] +// CHECK:STDOUT: %Destroy.facet.loc20_36.2: %Destroy.type = facet_value constants.%Circle, (constants.%DestroyImpl.impl_witness.60b, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.4b3] +// CHECK:STDOUT: %.loc20_36.5: %Destroy.type = converted constants.%Circle, %Destroy.facet.loc20_36.2 [concrete = constants.%Destroy.facet.4b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc20_36.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_36.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_36.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_36.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_36.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_36.2(%self.param: ref %struct_type.radius.082) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc20_36.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc20_36.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_36.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_36.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc20_36.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_36.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_36.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc20_36.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_36.2(%self.param: ref %struct_type.radius.082) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc20, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc20) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_36.2(%self.param: ref %struct_type.radius.082) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_36.2(%self.param: ref %struct_type.radius.082) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_36.3(%self.param: ref %Circle) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_36.3(%self.param: ref %Circle) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %radius.ref: %Circle.elem = name_ref radius, @Circle.%field_decl [concrete = @Circle.%field_decl] -// CHECK:STDOUT: %.loc20: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc20, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc20) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_36.3(%self.param: ref %Circle) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_36.3(%self.param: ref %Circle) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc20_36.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc20_36.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_36.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_36.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc20_36.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_36.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_36.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc20_36.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/access/inheritance_access.carbon b/toolchain/check/testdata/class/access/inheritance_access.carbon index 656768f4d145..0d75ba4d181e 100644 --- a/toolchain/check/testdata/class/access/inheritance_access.carbon +++ b/toolchain/check/testdata/class/access/inheritance_access.carbon @@ -1656,13 +1656,13 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = parameterized_class_name_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.04a: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.04a: type = class_type @C, @C(%T.67d) [symbolic] // CHECK:STDOUT: %B: type = class_type @B [concrete] // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %A [concrete] @@ -1686,7 +1686,6 @@ fn G() { // CHECK:STDOUT: %d.var_patt: %pattern_type.b1b = var_pattern %d.patt [concrete] // CHECK:STDOUT: %B.B.cpp_overload_set.type: type = cpp_overload_set_type @B.B.cpp_overload_set [concrete] // CHECK:STDOUT: %B.B.cpp_overload_set.value: %B.B.cpp_overload_set.type = cpp_overload_set_value @B.B.cpp_overload_set [concrete] -// CHECK:STDOUT: %pattern_type.65a: type = pattern_type %B [concrete] // CHECK:STDOUT: %ptr.dc0: type = ptr_type %B [concrete] // CHECK:STDOUT: %pattern_type.733: type = pattern_type %ptr.dc0 [concrete] // CHECK:STDOUT: %return.param_patt.6fe: %pattern_type.733 = value_param_pattern [concrete] @@ -1698,34 +1697,31 @@ fn G() { // CHECK:STDOUT: %F.cpp_overload_set.value: %F.cpp_overload_set.type = cpp_overload_set_value @F.cpp_overload_set [concrete] // CHECK:STDOUT: %ptr.434: type = ptr_type %C.4da [concrete] // CHECK:STDOUT: %pattern_type.c84: type = pattern_type %ptr.434 [concrete] -// CHECK:STDOUT: %t.param_patt: %pattern_type.c84 = value_param_pattern [concrete] -// CHECK:STDOUT: %t.patt: %pattern_type.c84 = wrapper_binding_pattern t, %t.param_patt [concrete] +// CHECK:STDOUT: %t.param_patt.6a0: %pattern_type.c84 = value_param_pattern [concrete] +// CHECK:STDOUT: %t.patt.1a9: %pattern_type.c84 = wrapper_binding_pattern t, %t.param_patt.6a0 [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.4c2: %pattern_type.65a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1c9: %pattern_type.65a = wrapper_binding_pattern self, %self.param_patt.4c2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %B.cpp_destructor.type: type = fn_type @B.cpp_destructor [concrete] // CHECK:STDOUT: %B.cpp_destructor: %B.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc21_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc21_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.b67: type = pattern_type %struct_type.base.9aa [concrete] -// CHECK:STDOUT: %self.param_patt.de7: %pattern_type.b67 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.49d: %pattern_type.b67 = wrapper_binding_pattern self, %self.param_patt.de7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc21_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc21_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b39: %pattern_type.b1b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3b6: %pattern_type.b1b = wrapper_binding_pattern self, %self.param_patt.b39 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc21_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc21_5.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc21_5.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%B.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.2b7: %SubobjectDestroy.type = facet_value %B, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.fcb: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.2b7) [concrete] +// CHECK:STDOUT: %Destroy.facet.058: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.fcb, %custom_witness.fe1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.70a: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.058) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc21_5.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.918: %SubobjectDestroy.type = facet_value %C.4da, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.755: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.918) [concrete] +// CHECK:STDOUT: %Destroy.facet.412: %Destroy.type = facet_value %C.4da, (%DestroyImpl.impl_witness.755, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.666: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.412) [concrete] // CHECK:STDOUT: %B.X.cpp_overload_set.type: type = cpp_overload_set_type @B.X.cpp_overload_set [concrete] // CHECK:STDOUT: %B.X.cpp_overload_set.value: %B.X.cpp_overload_set.type = cpp_overload_set_value @B.X.cpp_overload_set [concrete] // CHECK:STDOUT: } @@ -1733,7 +1729,7 @@ fn G() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1755,61 +1751,18 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %F.cpp_overload_set.value: %F.cpp_overload_set.type = cpp_overload_set_value @F.cpp_overload_set [concrete = constants.%F.cpp_overload_set.value] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %t.param_patt: %pattern_type.c84 = value_param_pattern [concrete = constants.%t.param_patt] -// CHECK:STDOUT: %t.patt: %pattern_type.c84 = wrapper_binding_pattern t, %t.param_patt [concrete = constants.%t.patt] +// CHECK:STDOUT: %t.param_patt: %pattern_type.c84 = value_param_pattern [concrete = constants.%t.param_patt.6a0] +// CHECK:STDOUT: %t.patt: %pattern_type.c84 = wrapper_binding_pattern t, %t.param_patt [concrete = constants.%t.patt.1a9] // CHECK:STDOUT: } { // CHECK:STDOUT: %t.param: %ptr.434 = value_param call_param0 // CHECK:STDOUT: %t: %ptr.434 = wrapper_binding t, %t.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %B.cpp_destructor.decl: %B.cpp_destructor.type = fn_decl @B.cpp_destructor [concrete = constants.%B.cpp_destructor] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.65a = ref_param_pattern [concrete = constants.%self.param_patt.4c2] -// CHECK:STDOUT: %self.patt: %pattern_type.65a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1c9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %B.X.cpp_overload_set.value: %B.X.cpp_overload_set.type = cpp_overload_set_value @B.X.cpp_overload_set [concrete = constants.%B.X.cpp_overload_set.value] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc21_5.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.65a = ref_param_pattern [concrete = constants.%self.param_patt.4c2] -// CHECK:STDOUT: %self.patt: %pattern_type.65a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1c9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc21_5.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b67 = ref_param_pattern [concrete = constants.%self.param_patt.de7] -// CHECK:STDOUT: %self.patt: %pattern_type.b67 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.49d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.9aa = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.9aa = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc21_5.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b67 = ref_param_pattern [concrete = constants.%self.param_patt.de7] -// CHECK:STDOUT: %self.patt: %pattern_type.b67 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.49d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.9aa = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.9aa = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc21_5.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b1b = ref_param_pattern [concrete = constants.%self.param_patt.b39] -// CHECK:STDOUT: %self.patt: %pattern_type.b1b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3b6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.4da = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.4da = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc21_5.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b1b = ref_param_pattern [concrete = constants.%self.param_patt.b39] -// CHECK:STDOUT: %self.patt: %pattern_type.b1b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3b6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.4da = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.4da = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -1822,20 +1775,20 @@ fn G() { // CHECK:STDOUT: import Cpp inline // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { -// CHECK:STDOUT: %T.patt.loc16_10.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_10.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc16_10.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_10.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc16_12.1: type = splice_block %.loc16_12.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc16_12.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc16_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc16_10.1 (constants.%T)] +// CHECK:STDOUT: %T.loc16_10.2: type = symbolic_binding T, 0 [symbolic = %T.loc16_10.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc16_10.2: type) { -// CHECK:STDOUT: %T.patt.loc16_10.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_10.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc16_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc16_10.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc16_10.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc16_10.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc16_10.1: type = symbolic_binding T, 0 [symbolic = %T.loc16_10.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc16_10.1) [symbolic = %C (constants.%C.04a)] @@ -1892,8 +1845,8 @@ fn G() { // CHECK:STDOUT: %.loc23_5.4: init %.ab8 = converted %.loc22, %.loc23_5.3 // CHECK:STDOUT: %.loc23_5.5: init %B = as_compatible %.loc23_5.4 // CHECK:STDOUT: %.loc23_5.6: init %C.4da to %d.var = class_init (%.loc23_5.5) -// CHECK:STDOUT: %.loc21_5: init %C.4da = converted %.loc23_5.2, %.loc23_5.6 -// CHECK:STDOUT: assign %d.var, %.loc21_5 +// CHECK:STDOUT: %.loc21_5.1: init %C.4da = converted %.loc23_5.2, %.loc23_5.6 +// CHECK:STDOUT: assign %d.var, %.loc21_5.1 // CHECK:STDOUT: %.loc21_17: type = splice_block %C [concrete = constants.%C.4da] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -1909,8 +1862,12 @@ fn G() { // CHECK:STDOUT: %d.ref: ref %C.4da = name_ref d, %d // CHECK:STDOUT: %addr.loc32: %ptr.434 = addr_of %d.ref // CHECK:STDOUT: %F.call: init %empty_tuple.type = call imports.%F.decl(%addr.loc32) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %d.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%d.var) +// CHECK:STDOUT: %Destroy.facet.loc21_5.1: %Destroy.type = facet_value constants.%C.4da, (constants.%DestroyImpl.impl_witness.755, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: %.loc21_5.2: %Destroy.type = converted constants.%C.4da, %Destroy.facet.loc21_5.1 [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: %Destroy.facet.loc21_5.2: %Destroy.type = facet_value constants.%C.4da, (constants.%DestroyImpl.impl_witness.755, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: %.loc21_5.3: %Destroy.type = converted constants.%C.4da, %Destroy.facet.loc21_5.2 [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.412) [concrete = constants.%SelfDestruct.specific_fn.666] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%d.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1922,57 +1879,38 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @B.cpp_destructor(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc21_5.1(%self.param: ref %B) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc21_5.1(%self.param: ref %B) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc21_5.1(%self.param: ref %struct_type.base.9aa) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %B.cpp_destructor.call: init %empty_tuple.type = call imports.%B.cpp_destructor.decl(%self.param) +// CHECK:STDOUT: %.loc21_5.1: ref %B = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc21_5.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.fcb, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.058] +// CHECK:STDOUT: %.loc21_5.2: %Destroy.type = converted constants.%B, %Destroy.facet.loc21_5.1 [concrete = constants.%Destroy.facet.058] +// CHECK:STDOUT: %Destroy.facet.loc21_5.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.fcb, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.058] +// CHECK:STDOUT: %.loc21_5.3: %Destroy.type = converted constants.%B, %Destroy.facet.loc21_5.2 [concrete = constants.%Destroy.facet.058] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.058) [concrete = constants.%SelfDestruct.specific_fn.70a] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc21_5.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc21_5.1(%self.param: ref %struct_type.base.9aa) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21: ref %B = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc21, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc21) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc21_5.2(%self.param: ref %struct_type.base.9aa) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc21_5.2(%self.param: ref %struct_type.base.9aa) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc21_5.2(%self.param: ref %C.4da) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc21_5.2(%self.param: ref %C.4da) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %base.ref: %C.elem.79b = name_ref base, @C.%.loc17 [concrete = @C.%.loc17] -// CHECK:STDOUT: %.loc21: ref %B = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc21, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc21) +// CHECK:STDOUT: %.loc21_5.1: ref %B = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc21_5.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.fcb, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.058] +// CHECK:STDOUT: %.loc21_5.2: %Destroy.type = converted constants.%B, %Destroy.facet.loc21_5.1 [concrete = constants.%Destroy.facet.058] +// CHECK:STDOUT: %Destroy.facet.loc21_5.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.fcb, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.058] +// CHECK:STDOUT: %.loc21_5.3: %Destroy.type = converted constants.%B, %Destroy.facet.loc21_5.2 [concrete = constants.%Destroy.facet.058] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.058) [concrete = constants.%SelfDestruct.specific_fn.70a] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc21_5.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc21_5.3(%self.param: ref %C.4da) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc21_5.3(%self.param: ref %C.4da) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T) { -// CHECK:STDOUT: %T.patt.loc16_10.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc16_10.1 => constants.%T +// CHECK:STDOUT: specific @C(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc16_10.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc16_10.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { -// CHECK:STDOUT: %T.patt.loc16_10.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc16_10.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc16_10.1 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/class/adapter/adapt_copy.carbon b/toolchain/check/testdata/class/adapter/adapt_copy.carbon index 7dcfbdd7fc22..6947bf7d4ac1 100644 --- a/toolchain/check/testdata/class/adapter/adapt_copy.carbon +++ b/toolchain/check/testdata/class/adapter/adapt_copy.carbon @@ -152,22 +152,20 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %d.patt.467: %pattern_type.3b9 = ref_binding_pattern d [concrete] // CHECK:STDOUT: %d.var_patt.b13: %pattern_type.3b9 = var_pattern %d.patt.467 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.f36: %pattern_type.3b9 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.205: %pattern_type.3b9 = wrapper_binding_pattern self, %self.param_patt.f36 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc12_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f53: %SubobjectDestroy.type = facet_value %AdaptCopyable, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.da7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f53) [concrete] +// CHECK:STDOUT: %Destroy.facet.11a: %Destroy.type = facet_value %AdaptCopyable, (%DestroyImpl.impl_witness.da7, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.97c: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.11a) [concrete] // CHECK:STDOUT: %UInt.type: type = parameterized_class_name_type @UInt [concrete] // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete] @@ -184,101 +182,41 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %InTuple: %InTuple.type = struct_value () [concrete] // CHECK:STDOUT: %d.patt.883: %pattern_type.848 = ref_binding_pattern d [concrete] // CHECK:STDOUT: %d.var_patt.66d: %pattern_type.848 = var_pattern %d.patt.883 [concrete] -// CHECK:STDOUT: %pattern_type.129: type = pattern_type %u32 [concrete] -// CHECK:STDOUT: %self.param_patt.6f9: %pattern_type.129 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ddd: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt.6f9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc23_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.604: %pattern_type.848 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.094: %pattern_type.848 = wrapper_binding_pattern self, %self.param_patt.604 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.439: %SubobjectDestroy.type = facet_value %u32, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ee7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.439) [concrete] +// CHECK:STDOUT: %Destroy.facet.35c: %Destroy.type = facet_value %u32, (%DestroyImpl.impl_witness.ee7, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.a73: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.35c) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc23_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c16: %SubobjectDestroy.type = facet_value %tuple.type.c35, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.2ab: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c16) [concrete] +// CHECK:STDOUT: %Destroy.facet.aca: %Destroy.type = facet_value %tuple.type.c35, (%DestroyImpl.impl_witness.2ab, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.f48: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.aca) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .UInt = %Core.UInt // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/parts/uint, UInt, loaded [concrete = constants.%UInt.generic] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc12_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3b9 = ref_param_pattern [concrete = constants.%self.param_patt.f36] -// CHECK:STDOUT: %self.patt: %pattern_type.3b9 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.205] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AdaptCopyable = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AdaptCopyable = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc12_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3b9 = ref_param_pattern [concrete = constants.%self.param_patt.f36] -// CHECK:STDOUT: %self.patt: %pattern_type.3b9 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.205] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AdaptCopyable = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AdaptCopyable = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.129 = ref_param_pattern [concrete = constants.%self.param_patt.6f9] -// CHECK:STDOUT: %self.patt: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc23_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.129 = ref_param_pattern [concrete = constants.%self.param_patt.6f9] -// CHECK:STDOUT: %self.patt: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.848 = ref_param_pattern [concrete = constants.%self.param_patt.604] -// CHECK:STDOUT: %self.patt: %pattern_type.848 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.094] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.c35 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.c35 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc23_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.848 = ref_param_pattern [concrete = constants.%self.param_patt.604] -// CHECK:STDOUT: %self.patt: %pattern_type.848 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.094] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.c35 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.c35 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -349,32 +287,18 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: } // CHECK:STDOUT: %d.ref: ref %AdaptCopyable = name_ref d, %d // CHECK:STDOUT: %.loc16: %AdaptCopyable = acquire_value %d.ref -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %d.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%d.var) +// CHECK:STDOUT: %Destroy.facet.loc12_3.1: %Destroy.type = facet_value constants.%AdaptCopyable, (constants.%DestroyImpl.impl_witness.da7, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.11a] +// CHECK:STDOUT: %.loc12_3.1: %Destroy.type = converted constants.%AdaptCopyable, %Destroy.facet.loc12_3.1 [concrete = constants.%Destroy.facet.11a] +// CHECK:STDOUT: %Destroy.facet.loc12_3.2: %Destroy.type = facet_value constants.%AdaptCopyable, (constants.%DestroyImpl.impl_witness.da7, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.11a] +// CHECK:STDOUT: %.loc12_3.2: %Destroy.type = converted constants.%AdaptCopyable, %Destroy.facet.loc12_3.2 [concrete = constants.%Destroy.facet.11a] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.11a) [concrete = constants.%SelfDestruct.specific_fn.97c] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%d.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.2(%self.param: ref %AdaptCopyable) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.2(%self.param: ref %AdaptCopyable) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.2(%self.param: ref %AdaptCopyable) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.2(%self.param: ref %AdaptCopyable) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @InTuple(%c.param: %tuple.type.c35) -> out %return.param: %tuple.type.c35 { // CHECK:STDOUT: !entry: @@ -396,41 +320,35 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %d.ref: ref %tuple.type.c35 = name_ref d, %d // CHECK:STDOUT: %tuple.elem0.loc27: ref %AdaptCopyable = tuple_access %d.ref, element0 // CHECK:STDOUT: %.loc27: %AdaptCopyable = acquire_value %tuple.elem0.loc27 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %d.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%d.var) +// CHECK:STDOUT: %Destroy.facet.loc23_3.1: %Destroy.type = facet_value constants.%tuple.type.c35, (constants.%DestroyImpl.impl_witness.2ab, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.aca] +// CHECK:STDOUT: %.loc23_3.1: %Destroy.type = converted constants.%tuple.type.c35, %Destroy.facet.loc23_3.1 [concrete = constants.%Destroy.facet.aca] +// CHECK:STDOUT: %Destroy.facet.loc23_3.2: %Destroy.type = facet_value constants.%tuple.type.c35, (constants.%DestroyImpl.impl_witness.2ab, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.aca] +// CHECK:STDOUT: %.loc23_3.2: %Destroy.type = converted constants.%tuple.type.c35, %Destroy.facet.loc23_3.2 [concrete = constants.%Destroy.facet.aca] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.aca) [concrete = constants.%SelfDestruct.specific_fn.f48] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%d.var) // CHECK:STDOUT: return to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.1(%self.param: ref %u32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_3.1(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_3.1(%self.param: ref %u32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_3.1(%self.param: ref %u32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.2(%self.param: ref %tuple.type.c35) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_3.2(%self.param: ref %tuple.type.c35) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %u32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc23_3.1: %Destroy.type = facet_value constants.%u32, (constants.%DestroyImpl.impl_witness.ee7, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %.loc23_3.1: %Destroy.type = converted constants.%u32, %Destroy.facet.loc23_3.1 [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %Destroy.facet.loc23_3.2: %Destroy.type = facet_value constants.%u32, (constants.%DestroyImpl.impl_witness.ee7, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %.loc23_3.2: %Destroy.type = converted constants.%u32, %Destroy.facet.loc23_3.2 [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.35c) [concrete = constants.%SelfDestruct.specific_fn.a73] +// CHECK:STDOUT: %SelfDestruct.call.loc23_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %AdaptCopyable = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23_3.2(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_3.2(%self.param: ref %tuple.type.c35) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_3.2(%self.param: ref %tuple.type.c35) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc23_3.3: %Destroy.type = facet_value constants.%AdaptCopyable, (constants.%DestroyImpl.impl_witness.da7, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.11a] +// CHECK:STDOUT: %.loc23_3.3: %Destroy.type = converted constants.%AdaptCopyable, %Destroy.facet.loc23_3.3 [concrete = constants.%Destroy.facet.11a] +// CHECK:STDOUT: %Destroy.facet.loc23_3.4: %Destroy.type = facet_value constants.%AdaptCopyable, (constants.%DestroyImpl.impl_witness.da7, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.11a] +// CHECK:STDOUT: %.loc23_3.4: %Destroy.type = converted constants.%AdaptCopyable, %Destroy.facet.loc23_3.4 [concrete = constants.%Destroy.facet.11a] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.11a) [concrete = constants.%SelfDestruct.specific_fn.97c] +// CHECK:STDOUT: %SelfDestruct.call.loc23_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -468,34 +386,30 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Copy.facet.95d: %Copy.type = facet_value %i32, (%Copy.impl_witness.8af) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.95d) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.354: type = pattern_type %tuple.type.35f [concrete] -// CHECK:STDOUT: %self.param_patt.982: %pattern_type.354 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2d1: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt.982 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8a0: %pattern_type.ea1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.656: %pattern_type.ea1 = wrapper_binding_pattern self, %self.param_patt.8a0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.692: %SubobjectDestroy.type = facet_value %AdaptTuple, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d0e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.692) [concrete] +// CHECK:STDOUT: %Destroy.facet.ad9: %Destroy.type = facet_value %AdaptTuple, (%DestroyImpl.impl_witness.d0e, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8c1: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.ad9) [concrete] // CHECK:STDOUT: %UInt.type: type = parameterized_class_name_type @UInt [concrete] // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete] @@ -519,31 +433,28 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Copy.facet.862: %Copy.type = facet_value %u32, (%Copy.impl_witness.13a) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.7e5: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.862) [concrete] // CHECK:STDOUT: %.222: type = fn_type_with_self_type %Copy.WithSelf.Op.type.7e5, %Copy.facet.862 [concrete] -// CHECK:STDOUT: %pattern_type.129: type = pattern_type %u32 [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.specific_fn: = specific_function %UInt.as.Copy.impl.Op.852, @UInt.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %self.param_patt.6f9: %pattern_type.129 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ddd: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt.6f9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.22f: %pattern_type.8cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.66b: %pattern_type.8cb = wrapper_binding_pattern self, %self.param_patt.22f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.439: %SubobjectDestroy.type = facet_value %u32, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ee7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.439) [concrete] +// CHECK:STDOUT: %Destroy.facet.35c: %Destroy.type = facet_value %u32, (%DestroyImpl.impl_witness.ee7, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.a73: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.35c) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.3d7: %SubobjectDestroy.type = facet_value %tuple.type.133, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3fa: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.3d7) [concrete] +// CHECK:STDOUT: %Destroy.facet.d8d: %Destroy.type = facet_value %tuple.type.133, (%DestroyImpl.impl_witness.3fa, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.f61: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.d8d) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .UInt = %Core.UInt // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -552,85 +463,14 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/parts/uint, UInt, loaded [concrete = constants.%UInt.generic] // CHECK:STDOUT: %Core.import_ref.079: @UInt.as.Copy.impl.%UInt.as.Copy.impl.Op.type (%UInt.as.Copy.impl.Op.type.97a) = import_ref Core//prelude/parts/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.Copy.impl.%UInt.as.Copy.impl.Op (constants.%UInt.as.Copy.impl.Op.2a0)] // CHECK:STDOUT: %Copy.impl_witness_table.238 = impl_witness_table (%Core.import_ref.079), @UInt.as.Copy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.354 = ref_param_pattern [concrete = constants.%self.param_patt.982] -// CHECK:STDOUT: %self.patt: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2d1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.35f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.35f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.354 = ref_param_pattern [concrete = constants.%self.param_patt.982] -// CHECK:STDOUT: %self.patt: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2d1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.35f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.35f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ea1 = ref_param_pattern [concrete = constants.%self.param_patt.8a0] -// CHECK:STDOUT: %self.patt: %pattern_type.ea1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.656] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AdaptTuple = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AdaptTuple = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ea1 = ref_param_pattern [concrete = constants.%self.param_patt.8a0] -// CHECK:STDOUT: %self.patt: %pattern_type.ea1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.656] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AdaptTuple = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AdaptTuple = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.129 = ref_param_pattern [concrete = constants.%self.param_patt.6f9] -// CHECK:STDOUT: %self.patt: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc14_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.129 = ref_param_pattern [concrete = constants.%self.param_patt.6f9] -// CHECK:STDOUT: %self.patt: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8cb = ref_param_pattern [concrete = constants.%self.param_patt.22f] -// CHECK:STDOUT: %self.patt: %pattern_type.8cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.66b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.133 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.133 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc14_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8cb = ref_param_pattern [concrete = constants.%self.param_patt.22f] -// CHECK:STDOUT: %self.patt: %pattern_type.8cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.66b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.133 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.133 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -747,54 +587,39 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc10_11.7: init %tuple.type.35f to %.loc10_11.3 = tuple_init (%.loc10_11.4, %.loc10_11.6) // CHECK:STDOUT: %.loc10_11.8: init %AdaptTuple = as_compatible %.loc10_11.7 // CHECK:STDOUT: %.loc10_11.9: init %AdaptTuple = converted %d.ref, %.loc10_11.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %d.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%d.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%AdaptTuple, (constants.%DestroyImpl.impl_witness.d0e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.ad9] +// CHECK:STDOUT: %.loc9_3.8: %Destroy.type = converted constants.%AdaptTuple, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.ad9] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%AdaptTuple, (constants.%DestroyImpl.impl_witness.d0e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.ad9] +// CHECK:STDOUT: %.loc9_3.9: %Destroy.type = converted constants.%AdaptTuple, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.ad9] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.ad9) [concrete = constants.%SelfDestruct.specific_fn.8c1] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%d.var) // CHECK:STDOUT: return %.loc10_11.9 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %tuple.type.35f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %tuple.type.35f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.4: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %tuple.type.35f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %tuple.type.35f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %AdaptTuple) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %AdaptTuple) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %AdaptTuple) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.3(%self.param: ref %AdaptTuple) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @InTuple(%c.param: %tuple.type.133) -> out %return.param: %tuple.type.133 { // CHECK:STDOUT: !entry: @@ -832,8 +657,8 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %tuple.elem1.loc14_30.4: ref %u32 = tuple_access %d.var, element1 // CHECK:STDOUT: %.loc14_30.8: init %u32 to %tuple.elem1.loc14_30.4 = in_place_init %UInt.as.Copy.impl.Op.call.loc14 // CHECK:STDOUT: %.loc14_30.9: init %tuple.type.133 to %d.var = tuple_init (%.loc14_30.7, %.loc14_30.8) -// CHECK:STDOUT: %.loc14_3: init %tuple.type.133 = converted %c.ref, %.loc14_30.9 -// CHECK:STDOUT: assign %d.var, %.loc14_3 +// CHECK:STDOUT: %.loc14_3.1: init %tuple.type.133 = converted %c.ref, %.loc14_30.9 +// CHECK:STDOUT: assign %d.var, %.loc14_3.1 // CHECK:STDOUT: %.loc14_26.1: type = splice_block %.loc14_26.3 [concrete = constants.%tuple.type.133] { // CHECK:STDOUT: %AdaptTuple.ref.loc14: type = name_ref AdaptTuple, file.%AdaptTuple.decl [concrete = constants.%AdaptTuple] // CHECK:STDOUT: %u32.loc14: type = type_literal constants.%u32 [concrete = constants.%u32] @@ -882,41 +707,35 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.11: init %u32 to %tuple.elem1.loc15_10.4 = in_place_init %UInt.as.Copy.impl.Op.call.loc15 // CHECK:STDOUT: %.loc15_10.12: init %tuple.type.133 to %return.param = tuple_init (%.loc15_10.9, %.loc15_10.11) // CHECK:STDOUT: %.loc15_11: init %tuple.type.133 = converted %d.ref, %.loc15_10.12 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %d.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%d.var) +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%tuple.type.133, (constants.%DestroyImpl.impl_witness.3fa, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.d8d] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%tuple.type.133, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet.d8d] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%tuple.type.133, (constants.%DestroyImpl.impl_witness.3fa, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.d8d] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%tuple.type.133, %Destroy.facet.loc14_3.2 [concrete = constants.%Destroy.facet.d8d] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.d8d) [concrete = constants.%SelfDestruct.specific_fn.f61] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%d.var) // CHECK:STDOUT: return %.loc15_11 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.1(%self.param: ref %u32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_3.1(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.1(%self.param: ref %u32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_3.1(%self.param: ref %u32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.2(%self.param: ref %tuple.type.133) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_3.2(%self.param: ref %tuple.type.133) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %u32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%u32, (constants.%DestroyImpl.impl_witness.ee7, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %.loc14_3.1: %Destroy.type = converted constants.%u32, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%u32, (constants.%DestroyImpl.impl_witness.ee7, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%u32, %Destroy.facet.loc14_3.2 [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.35c) [concrete = constants.%SelfDestruct.specific_fn.a73] +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %AdaptTuple = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.2(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.2(%self.param: ref %tuple.type.133) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_3.2(%self.param: ref %tuple.type.133) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc14_3.3: %Destroy.type = facet_value constants.%AdaptTuple, (constants.%DestroyImpl.impl_witness.d0e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.ad9] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%AdaptTuple, %Destroy.facet.loc14_3.3 [concrete = constants.%Destroy.facet.ad9] +// CHECK:STDOUT: %Destroy.facet.loc14_3.4: %Destroy.type = facet_value constants.%AdaptTuple, (constants.%DestroyImpl.impl_witness.d0e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.ad9] +// CHECK:STDOUT: %.loc14_3.4: %Destroy.type = converted constants.%AdaptTuple, %Destroy.facet.loc14_3.4 [concrete = constants.%Destroy.facet.ad9] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.ad9) [concrete = constants.%SelfDestruct.specific_fn.8c1] +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -940,85 +759,33 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %b.patt: %pattern_type.d14 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.d14 = var_pattern %b.patt [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc16_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.944: type = pattern_type %Noncopyable [concrete] -// CHECK:STDOUT: %self.param_patt.648: %pattern_type.944 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e5a: %pattern_type.944 = wrapper_binding_pattern self, %self.param_patt.648 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc16_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.f20: %pattern_type.d14 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b09: %pattern_type.d14 = wrapper_binding_pattern self, %self.param_patt.f20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc16_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7fa: %SubobjectDestroy.type = facet_value %AdaptNoncopyable, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.9f4: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7fa) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AdaptNoncopyable, (%DestroyImpl.impl_witness.9f4, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc16_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.944 = ref_param_pattern [concrete = constants.%self.param_patt.648] -// CHECK:STDOUT: %self.patt: %pattern_type.944 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e5a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Noncopyable = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Noncopyable = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc16_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.944 = ref_param_pattern [concrete = constants.%self.param_patt.648] -// CHECK:STDOUT: %self.patt: %pattern_type.944 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e5a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Noncopyable = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Noncopyable = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d14 = ref_param_pattern [concrete = constants.%self.param_patt.f20] -// CHECK:STDOUT: %self.patt: %pattern_type.d14 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b09] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AdaptNoncopyable = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AdaptNoncopyable = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc16_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d14 = ref_param_pattern [concrete = constants.%self.param_patt.f20] -// CHECK:STDOUT: %self.patt: %pattern_type.d14 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b09] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AdaptNoncopyable = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AdaptNoncopyable = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1079,43 +846,20 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: } // CHECK:STDOUT: %b.ref: ref %AdaptNoncopyable = name_ref b, %b // CHECK:STDOUT: %.loc20: %AdaptNoncopyable = acquire_value %b.ref -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%AdaptNoncopyable, (constants.%DestroyImpl.impl_witness.9f4, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_3.1: %Destroy.type = converted constants.%AdaptNoncopyable, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%AdaptNoncopyable, (constants.%DestroyImpl.impl_witness.9f4, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%AdaptNoncopyable, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%b.var) // CHECK:STDOUT: return to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_3.2(%self.param: ref %Noncopyable) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %Noncopyable) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %Noncopyable) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.2(%self.param: ref %Noncopyable) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.3(%self.param: ref %AdaptNoncopyable) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.3(%self.param: ref %AdaptNoncopyable) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.3(%self.param: ref %AdaptNoncopyable) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_3.3(%self.param: ref %AdaptNoncopyable) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_adapt_not_copyable_indirect.carbon // CHECK:STDOUT: @@ -1154,58 +898,45 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.8af) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc17_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc17_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.944: type = pattern_type %Noncopyable [concrete] -// CHECK:STDOUT: %self.param_patt.648: %pattern_type.944 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e5a: %pattern_type.944 = wrapper_binding_pattern self, %self.param_patt.648 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc17_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.d28: type = pattern_type %tuple.type.71d [concrete] -// CHECK:STDOUT: %self.param_patt.c3d: %pattern_type.d28 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d63: %pattern_type.d28 = wrapper_binding_pattern self, %self.param_patt.c3d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc17_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc17_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.dd0: %SubobjectDestroy.type = facet_value %Noncopyable, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.59b: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.dd0) [concrete] +// CHECK:STDOUT: %Destroy.facet.6f5: %Destroy.type = facet_value %Noncopyable, (%DestroyImpl.impl_witness.59b, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.20b: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.6f5) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc17_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.f8a: %pattern_type.be3 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.021: %pattern_type.be3 = wrapper_binding_pattern self, %self.param_patt.f8a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc17_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc17_3.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e5e: %SubobjectDestroy.type = facet_value %AdaptNoncopyableIndirect, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.860: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e5e) [concrete] +// CHECK:STDOUT: %Destroy.facet.1f2: %Destroy.type = facet_value %AdaptNoncopyableIndirect, (%DestroyImpl.impl_witness.860, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.0b6: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.1f2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1213,80 +944,9 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc17_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc17_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.944 = ref_param_pattern [concrete = constants.%self.param_patt.648] -// CHECK:STDOUT: %self.patt: %pattern_type.944 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e5a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Noncopyable = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Noncopyable = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc17_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.944 = ref_param_pattern [concrete = constants.%self.param_patt.648] -// CHECK:STDOUT: %self.patt: %pattern_type.944 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e5a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Noncopyable = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Noncopyable = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d28 = ref_param_pattern [concrete = constants.%self.param_patt.c3d] -// CHECK:STDOUT: %self.patt: %pattern_type.d28 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d63] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.71d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.71d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc17_3.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d28 = ref_param_pattern [concrete = constants.%self.param_patt.c3d] -// CHECK:STDOUT: %self.patt: %pattern_type.d28 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d63] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.71d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.71d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17_3.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.be3 = ref_param_pattern [concrete = constants.%self.param_patt.f8a] -// CHECK:STDOUT: %self.patt: %pattern_type.be3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.021] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AdaptNoncopyableIndirect = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AdaptNoncopyableIndirect = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc17_3.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.be3 = ref_param_pattern [concrete = constants.%self.param_patt.f8a] -// CHECK:STDOUT: %self.patt: %pattern_type.be3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.021] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AdaptNoncopyableIndirect = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AdaptNoncopyableIndirect = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1374,80 +1034,51 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc22_11.4: init %i32 to %tuple.elem0.loc22_11.2 = in_place_init %Int.as.Copy.impl.Op.call.loc22 // CHECK:STDOUT: %tuple.elem1.loc22: ref %Noncopyable = tuple_access %.loc22_11.1, element1 // CHECK:STDOUT: %.loc22_11.5: %Noncopyable = acquire_value %tuple.elem1.loc22 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc17_3.1: %Destroy.type = facet_value constants.%AdaptNoncopyableIndirect, (constants.%DestroyImpl.impl_witness.860, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.1f2] +// CHECK:STDOUT: %.loc17_3.4: %Destroy.type = converted constants.%AdaptNoncopyableIndirect, %Destroy.facet.loc17_3.1 [concrete = constants.%Destroy.facet.1f2] +// CHECK:STDOUT: %Destroy.facet.loc17_3.2: %Destroy.type = facet_value constants.%AdaptNoncopyableIndirect, (constants.%DestroyImpl.impl_witness.860, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.1f2] +// CHECK:STDOUT: %.loc17_3.5: %Destroy.type = converted constants.%AdaptNoncopyableIndirect, %Destroy.facet.loc17_3.2 [concrete = constants.%Destroy.facet.1f2] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.1f2) [concrete = constants.%SelfDestruct.specific_fn.0b6] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%b.var) // CHECK:STDOUT: return to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17_3.2(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17_3.3(%self.param: ref %Noncopyable) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_3.2(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_3.2(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_3.2(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_3.3(%self.param: ref %Noncopyable) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_3.3(%self.param: ref %Noncopyable) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_3.3(%self.param: ref %Noncopyable) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_3.4(%self.param: ref %tuple.type.71d) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17_3.4(%self.param: ref %tuple.type.71d) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc17_3.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc17_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc17_3.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc17_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc17_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc17_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc17_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc17_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc17_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc17_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %Noncopyable = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc17_3.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc17_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc17_3.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc17_3.3: %Destroy.type = facet_value constants.%Noncopyable, (constants.%DestroyImpl.impl_witness.59b, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.6f5] +// CHECK:STDOUT: %.loc17_3.3: %Destroy.type = converted constants.%Noncopyable, %Destroy.facet.loc17_3.3 [concrete = constants.%Destroy.facet.6f5] +// CHECK:STDOUT: %Destroy.facet.loc17_3.4: %Destroy.type = facet_value constants.%Noncopyable, (constants.%DestroyImpl.impl_witness.59b, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.6f5] +// CHECK:STDOUT: %.loc17_3.4: %Destroy.type = converted constants.%Noncopyable, %Destroy.facet.loc17_3.4 [concrete = constants.%Destroy.facet.6f5] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.6f5) [concrete = constants.%SelfDestruct.specific_fn.20b] +// CHECK:STDOUT: %SelfDestruct.call.loc17_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc17_3.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc17_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc17_3.3(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc17_3.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc17_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc17_3.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc17_3.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc17_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc17_3.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc17_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_3.4(%self.param: ref %tuple.type.71d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_3.4(%self.param: ref %tuple.type.71d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_3.5(%self.param: ref %AdaptNoncopyableIndirect) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_3.5(%self.param: ref %AdaptNoncopyableIndirect) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_3.5(%self.param: ref %AdaptNoncopyableIndirect) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17_3.5(%self.param: ref %AdaptNoncopyableIndirect) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- adapt_copyable_struct.carbon // CHECK:STDOUT: @@ -1481,32 +1112,28 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Copy.facet.95d: %Copy.type = facet_value %i32, (%Copy.impl_witness.8af) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.95d) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.0b6: type = pattern_type %struct_type.e.f [concrete] -// CHECK:STDOUT: %self.param_patt.89a: %pattern_type.0b6 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.445: %pattern_type.0b6 = wrapper_binding_pattern self, %self.param_patt.89a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.58e: %pattern_type.27f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.682: %pattern_type.27f = wrapper_binding_pattern self, %self.param_patt.58e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d28: %SubobjectDestroy.type = facet_value %AdaptStruct, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c0a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d28) [concrete] +// CHECK:STDOUT: %Destroy.facet.f0b: %Destroy.type = facet_value %AdaptStruct, (%DestroyImpl.impl_witness.c0a, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.efe: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.f0b) [concrete] // CHECK:STDOUT: %UInt.type: type = parameterized_class_name_type @UInt [concrete] // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete] @@ -1531,33 +1158,30 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Copy.facet.862: %Copy.type = facet_value %u32, (%Copy.impl_witness.13a) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.7e5: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.862) [concrete] // CHECK:STDOUT: %.222: type = fn_type_with_self_type %Copy.WithSelf.Op.type.7e5, %Copy.facet.862 [concrete] -// CHECK:STDOUT: %pattern_type.129: type = pattern_type %u32 [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.specific_fn: = specific_function %UInt.as.Copy.impl.Op.852, @UInt.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %self.param_patt.6f9: %pattern_type.129 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ddd: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt.6f9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.145: %pattern_type.c91 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.626: %pattern_type.c91 = wrapper_binding_pattern self, %self.param_patt.145 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.439: %SubobjectDestroy.type = facet_value %u32, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ee7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.439) [concrete] +// CHECK:STDOUT: %Destroy.facet.35c: %Destroy.type = facet_value %u32, (%DestroyImpl.impl_witness.ee7, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.a73: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.35c) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.704: %SubobjectDestroy.type = facet_value %tuple.type.7fb, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.0db: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.704) [concrete] +// CHECK:STDOUT: %Destroy.facet.6f3: %Destroy.type = facet_value %tuple.type.7fb, (%DestroyImpl.impl_witness.0db, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3f5: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.6f3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .UInt = %Core.UInt // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -1566,85 +1190,14 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/parts/uint, UInt, loaded [concrete = constants.%UInt.generic] // CHECK:STDOUT: %Core.import_ref.079: @UInt.as.Copy.impl.%UInt.as.Copy.impl.Op.type (%UInt.as.Copy.impl.Op.type.97a) = import_ref Core//prelude/parts/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.Copy.impl.%UInt.as.Copy.impl.Op (constants.%UInt.as.Copy.impl.Op.2a0)] // CHECK:STDOUT: %Copy.impl_witness_table.238 = impl_witness_table (%Core.import_ref.079), @UInt.as.Copy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0b6 = ref_param_pattern [concrete = constants.%self.param_patt.89a] -// CHECK:STDOUT: %self.patt: %pattern_type.0b6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.445] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.e.f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.e.f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0b6 = ref_param_pattern [concrete = constants.%self.param_patt.89a] -// CHECK:STDOUT: %self.patt: %pattern_type.0b6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.445] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.e.f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.e.f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.27f = ref_param_pattern [concrete = constants.%self.param_patt.58e] -// CHECK:STDOUT: %self.patt: %pattern_type.27f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.682] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AdaptStruct = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AdaptStruct = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.27f = ref_param_pattern [concrete = constants.%self.param_patt.58e] -// CHECK:STDOUT: %self.patt: %pattern_type.27f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.682] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AdaptStruct = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AdaptStruct = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.129 = ref_param_pattern [concrete = constants.%self.param_patt.6f9] -// CHECK:STDOUT: %self.patt: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc14_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.129 = ref_param_pattern [concrete = constants.%self.param_patt.6f9] -// CHECK:STDOUT: %self.patt: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c91 = ref_param_pattern [concrete = constants.%self.param_patt.145] -// CHECK:STDOUT: %self.patt: %pattern_type.c91 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.626] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.7fb = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.7fb = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc14_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c91 = ref_param_pattern [concrete = constants.%self.param_patt.145] -// CHECK:STDOUT: %self.patt: %pattern_type.c91 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.626] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.7fb = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.7fb = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -1760,52 +1313,37 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc10_11.11: init %struct_type.e.f to %.loc10_11.4 = struct_init (%.loc10_11.6, %.loc10_11.10) // CHECK:STDOUT: %.loc10_11.12: init %AdaptStruct = as_compatible %.loc10_11.11 // CHECK:STDOUT: %.loc10_11.13: init %AdaptStruct = converted %h.ref, %.loc10_11.12 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %h.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%h.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%AdaptStruct, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.f0b] +// CHECK:STDOUT: %.loc9_3.12: %Destroy.type = converted constants.%AdaptStruct, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.f0b] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%AdaptStruct, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.f0b] +// CHECK:STDOUT: %.loc9_3.13: %Destroy.type = converted constants.%AdaptStruct, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.f0b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.f0b) [concrete = constants.%SelfDestruct.specific_fn.efe] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%h.var) // CHECK:STDOUT: return %.loc10_11.13 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %struct_type.e.f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %struct_type.e.f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc9_3.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %.loc9_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%.loc9_3.1) -// CHECK:STDOUT: %.loc9_3.2: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %.loc9_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%.loc9_3.2) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_3.1) +// CHECK:STDOUT: %.loc9_3.4: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %struct_type.e.f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %struct_type.e.f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %AdaptStruct) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %AdaptStruct) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %AdaptStruct) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.3(%self.param: ref %AdaptStruct) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @InTuple(%c.param: %tuple.type.7fb) -> out %return.param: %tuple.type.7fb { // CHECK:STDOUT: !entry: @@ -1843,8 +1381,8 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %tuple.elem1.loc14_31.2: ref %u32 = tuple_access %d.var, element1 // CHECK:STDOUT: %.loc14_31.12: init %u32 to %tuple.elem1.loc14_31.2 = in_place_init %UInt.as.Copy.impl.Op.call.loc14 // CHECK:STDOUT: %.loc14_31.13: init %tuple.type.7fb to %d.var = tuple_init (%.loc14_31.11, %.loc14_31.12) -// CHECK:STDOUT: %.loc14_3: init %tuple.type.7fb = converted %c.ref, %.loc14_31.13 -// CHECK:STDOUT: assign %d.var, %.loc14_3 +// CHECK:STDOUT: %.loc14_3.1: init %tuple.type.7fb = converted %c.ref, %.loc14_31.13 +// CHECK:STDOUT: assign %d.var, %.loc14_3.1 // CHECK:STDOUT: %.loc14_27.1: type = splice_block %.loc14_27.3 [concrete = constants.%tuple.type.7fb] { // CHECK:STDOUT: %AdaptStruct.ref.loc14: type = name_ref AdaptStruct, file.%AdaptStruct.decl [concrete = constants.%AdaptStruct] // CHECK:STDOUT: %u32.loc14: type = type_literal constants.%u32 [concrete = constants.%u32] @@ -1893,41 +1431,35 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.15: init %u32 to %tuple.elem1.loc15_10.2 = in_place_init %UInt.as.Copy.impl.Op.call.loc15 // CHECK:STDOUT: %.loc15_10.16: init %tuple.type.7fb to %return.param = tuple_init (%.loc15_10.13, %.loc15_10.15) // CHECK:STDOUT: %.loc15_11: init %tuple.type.7fb = converted %d.ref, %.loc15_10.16 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %d.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%d.var) +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%tuple.type.7fb, (constants.%DestroyImpl.impl_witness.0db, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.6f3] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%tuple.type.7fb, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet.6f3] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%tuple.type.7fb, (constants.%DestroyImpl.impl_witness.0db, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.6f3] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%tuple.type.7fb, %Destroy.facet.loc14_3.2 [concrete = constants.%Destroy.facet.6f3] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.6f3) [concrete = constants.%SelfDestruct.specific_fn.3f5] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%d.var) // CHECK:STDOUT: return %.loc15_11 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.1(%self.param: ref %u32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_3.1(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.1(%self.param: ref %u32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_3.1(%self.param: ref %u32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.2(%self.param: ref %tuple.type.7fb) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_3.2(%self.param: ref %tuple.type.7fb) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %u32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%u32, (constants.%DestroyImpl.impl_witness.ee7, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %.loc14_3.1: %Destroy.type = converted constants.%u32, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%u32, (constants.%DestroyImpl.impl_witness.ee7, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%u32, %Destroy.facet.loc14_3.2 [concrete = constants.%Destroy.facet.35c] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.35c) [concrete = constants.%SelfDestruct.specific_fn.a73] +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %AdaptStruct = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.2(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.2(%self.param: ref %tuple.type.7fb) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_3.2(%self.param: ref %tuple.type.7fb) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc14_3.3: %Destroy.type = facet_value constants.%AdaptStruct, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.f0b] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%AdaptStruct, %Destroy.facet.loc14_3.3 [concrete = constants.%Destroy.facet.f0b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.4: %Destroy.type = facet_value constants.%AdaptStruct, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.f0b] +// CHECK:STDOUT: %.loc14_3.4: %Destroy.type = converted constants.%AdaptStruct, %Destroy.facet.loc14_3.4 [concrete = constants.%Destroy.facet.f0b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.f0b) [concrete = constants.%SelfDestruct.specific_fn.efe] +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/destroy_calls.carbon b/toolchain/check/testdata/class/destroy_calls.carbon index 968b8f4db401..0ec5f75974c6 100644 --- a/toolchain/check/testdata/class/destroy_calls.carbon +++ b/toolchain/check/testdata/class/destroy_calls.carbon @@ -123,96 +123,34 @@ fn G() { F({}); } // CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete] // CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc12_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.92e: %SubobjectDestroy.type = facet_value %B, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.131: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.92e) [concrete] +// CHECK:STDOUT: %Destroy.facet.09e: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.131, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet.35e: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc12_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc12_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -224,8 +162,8 @@ fn G() { F({}); } // CHECK:STDOUT: %a.var: ref %A = var_storage %a.var_patt // CHECK:STDOUT: %.loc10_22.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_22.2: init %A to %a.var = class_init () [concrete = constants.%A.val] -// CHECK:STDOUT: %.loc10_3: init %A = converted %.loc10_22.1, %.loc10_22.2 [concrete = constants.%A.val] -// CHECK:STDOUT: assign %a.var, %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: init %A = converted %.loc10_22.1, %.loc10_22.2 [concrete = constants.%A.val] +// CHECK:STDOUT: assign %a.var, %.loc10_3.1 // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %a: ref %A = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -235,8 +173,8 @@ fn G() { F({}); } // CHECK:STDOUT: %b.var: ref %B = var_storage %b.var_patt // CHECK:STDOUT: %.loc11_22.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc11_22.2: init %B to %b.var = class_init () [concrete = constants.%B.val] -// CHECK:STDOUT: %.loc11_3: init %B = converted %.loc11_22.1, %.loc11_22.2 [concrete = constants.%B.val] -// CHECK:STDOUT: assign %b.var, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %B = converted %.loc11_22.1, %.loc11_22.2 [concrete = constants.%B.val] +// CHECK:STDOUT: assign %b.var, %.loc11_3.1 // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %b: ref %B = wrapper_binding b, %b.var // CHECK:STDOUT: name_binding_decl { @@ -246,66 +184,42 @@ fn G() { F({}); } // CHECK:STDOUT: %c.var: ref %C = var_storage %c.var_patt // CHECK:STDOUT: %.loc12_22.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc12_22.2: init %C to %c.var = class_init () [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc12_3: init %C = converted %.loc12_22.1, %.loc12_22.2 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %c.var, %.loc12_3 +// CHECK:STDOUT: %.loc12_3.1: init %C = converted %.loc12_22.1, %.loc12_22.2 [concrete = constants.%C.val] +// CHECK:STDOUT: assign %c.var, %.loc12_3.1 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = wrapper_binding c, %c.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete = constants.%c.patt] // CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete = constants.%c.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%c.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc12_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc12_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc12_3.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc12_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc12_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc12_3.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%B, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%B, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11(%self.param: ref %B) = "no_op"; // 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- nested_scope.carbon // CHECK:STDOUT: @@ -332,96 +246,34 @@ fn G() { F({}); } // CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete] // CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc13_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc13_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_5.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.92e: %SubobjectDestroy.type = facet_value %B, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.131: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.92e) [concrete] +// CHECK:STDOUT: %Destroy.facet.09e: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.131, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet.35e: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_5.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc13_5.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_5.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc13_5.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -433,8 +285,8 @@ fn G() { F({}); } // CHECK:STDOUT: %a.var: ref %A = var_storage %a.var_patt // CHECK:STDOUT: %.loc10_22.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_22.2: init %A to %a.var = class_init () [concrete = constants.%A.val] -// CHECK:STDOUT: %.loc10_3: init %A = converted %.loc10_22.1, %.loc10_22.2 [concrete = constants.%A.val] -// CHECK:STDOUT: assign %a.var, %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: init %A = converted %.loc10_22.1, %.loc10_22.2 [concrete = constants.%A.val] +// CHECK:STDOUT: assign %a.var, %.loc10_3.1 // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %a: ref %A = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -444,8 +296,8 @@ fn G() { F({}); } // CHECK:STDOUT: %b.var: ref %B = var_storage %b.var_patt // CHECK:STDOUT: %.loc11_22.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc11_22.2: init %B to %b.var = class_init () [concrete = constants.%B.val] -// CHECK:STDOUT: %.loc11_3: init %B = converted %.loc11_22.1, %.loc11_22.2 [concrete = constants.%B.val] -// CHECK:STDOUT: assign %b.var, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %B = converted %.loc11_22.1, %.loc11_22.2 [concrete = constants.%B.val] +// CHECK:STDOUT: assign %b.var, %.loc11_3.1 // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %b: ref %B = wrapper_binding b, %b.var // CHECK:STDOUT: name_binding_decl { @@ -459,180 +311,91 @@ fn G() { F({}); } // CHECK:STDOUT: %c.var: ref %C = var_storage %c.var_patt // CHECK:STDOUT: %.loc13_24.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc13_24.2: init %C to %c.var = class_init () [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc13_5: init %C = converted %.loc13_24.1, %.loc13_24.2 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %c.var, %.loc13_5 +// CHECK:STDOUT: %.loc13_5.1: init %C = converted %.loc13_24.1, %.loc13_24.2 [concrete = constants.%C.val] +// CHECK:STDOUT: assign %c.var, %.loc13_5.1 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = wrapper_binding c, %c.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete = constants.%c.patt] // CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete = constants.%c.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc13_5.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc13_5.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc13_5.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc13_5.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc13_5.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc13_5.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%c.var) // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%B, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%B, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_5.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_5.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_5.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_5.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_5.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11(%self.param: ref %B) = "no_op"; // 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_5.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- temp.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %A: type = class_type @A [concrete] -// CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete] // CHECK:STDOUT: %A.Make.type: type = fn_type @A.Make [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %A.Make: %A.Make.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %B: type = class_type @B [concrete] -// CHECK:STDOUT: %pattern_type.e39: type = pattern_type %B [concrete] // CHECK:STDOUT: %B.Make.type: type = fn_type @B.Make [concrete] // CHECK:STDOUT: %B.Make: %B.Make.type = struct_value () [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] -// CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] // CHECK:STDOUT: %C.Make.type: type = fn_type @C.Make [concrete] // CHECK:STDOUT: %C.Make: %C.Make.type = struct_value () [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_10.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_10.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_10.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_10.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_10.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_10.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet.35e: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.92e: %SubobjectDestroy.type = facet_value %B, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.131: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.92e) [concrete] +// CHECK:STDOUT: %Destroy.facet.09e: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.131, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc12 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_10.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_10.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_10.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_10.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc12 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -646,68 +409,44 @@ fn G() { F({}); } // CHECK:STDOUT: %.loc10_10.1: ref %A = temporary_storage // CHECK:STDOUT: %A.Make.call: init %A to %.loc10_10.1 = call %Make.ref.loc10() // CHECK:STDOUT: %.loc10_10.2: ref %A = temporary %.loc10_10.1, %A.Make.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_10.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_10.2) +// CHECK:STDOUT: %Destroy.facet.loc10_10.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc10_10.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_10.1 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %Destroy.facet.loc10_10.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc10_10.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_10.2 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_10.2) // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %Make.ref.loc11: %B.Make.type = name_ref Make, @B.%B.Make.decl [concrete = constants.%B.Make] // CHECK:STDOUT: %.loc11_10.1: ref %B = temporary_storage // CHECK:STDOUT: %B.Make.call: init %B to %.loc11_10.1 = call %Make.ref.loc11() // CHECK:STDOUT: %.loc11_10.2: ref %B = temporary %.loc11_10.1, %B.Make.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %.loc11_10.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%.loc11_10.2) +// CHECK:STDOUT: %Destroy.facet.loc11_10.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc11_10.3: %Destroy.type = converted constants.%B, %Destroy.facet.loc11_10.1 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %Destroy.facet.loc11_10.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc11_10.4: %Destroy.type = converted constants.%B, %Destroy.facet.loc11_10.2 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc11_10.2) // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Make.ref.loc12: %C.Make.type = name_ref Make, @C.%C.Make.decl [concrete = constants.%C.Make] // CHECK:STDOUT: %.loc12_10.1: ref %C = temporary_storage // CHECK:STDOUT: %C.Make.call: init %C to %.loc12_10.1 = call %Make.ref.loc12() // CHECK:STDOUT: %.loc12_10.2: ref %C = temporary %.loc12_10.1, %C.Make.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: = bound_method %.loc12_10.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%.loc12_10.2) +// CHECK:STDOUT: %Destroy.facet.loc12_10.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc12_10.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc12_10.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc12_10.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc12_10.4: %Destroy.type = converted constants.%C, %Destroy.facet.loc12_10.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc12_10.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_10.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_10.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_10.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_10.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_10.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11(%self.param: ref %B) = "no_op"; // 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_10.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- generic_class.carbon // CHECK:STDOUT: @@ -726,52 +465,22 @@ fn G() { F({}); } // CHECK:STDOUT: %a.var_patt: %pattern_type.874 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %D.val: %D.89e = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.852: %pattern_type.874 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f84: %pattern_type.874 = wrapper_binding_pattern self, %self.param_patt.852 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.12f: %SubobjectDestroy.type = facet_value %D.89e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c52: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.12f) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %D.89e, (%DestroyImpl.impl_witness.c52, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.874 = ref_param_pattern [concrete = constants.%self.param_patt.852] -// CHECK:STDOUT: %self.patt: %pattern_type.874 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f84] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D.89e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D.89e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.874 = ref_param_pattern [concrete = constants.%self.param_patt.852] -// CHECK:STDOUT: %self.patt: %pattern_type.874 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f84] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D.89e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D.89e = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -783,8 +492,8 @@ fn G() { F({}); } // CHECK:STDOUT: %a.var: ref %D.89e = var_storage %a.var_patt // CHECK:STDOUT: %.loc9_25.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_25.2: init %D.89e to %a.var = class_init () [concrete = constants.%D.val] -// CHECK:STDOUT: %.loc9_3: init %D.89e = converted %.loc9_25.1, %.loc9_25.2 [concrete = constants.%D.val] -// CHECK:STDOUT: assign %a.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %D.89e = converted %.loc9_25.1, %.loc9_25.2 [concrete = constants.%D.val] +// CHECK:STDOUT: assign %a.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_20: type = splice_block %D [concrete = constants.%D.89e] { // CHECK:STDOUT: %D.ref: %D.type = name_ref D, file.%D.decl [concrete = constants.%D.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] @@ -795,45 +504,31 @@ fn G() { F({}); } // CHECK:STDOUT: %a.patt: %pattern_type.874 = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.874 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%D.89e, (constants.%DestroyImpl.impl_witness.c52, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%D.89e, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%D.89e, (constants.%DestroyImpl.impl_witness.c52, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%D.89e, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %D.89e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %D.89e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %D.89e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %D.89e) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- generic_use_inside_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = parameterized_class_name_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.04a: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.04a: type = class_type @C, @C(%T.67d) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -844,85 +539,53 @@ fn G() { F({}); } // CHECK:STDOUT: %v.var_patt.783: %pattern_type.563 = var_pattern %v.patt.315 [symbolic] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %C.val.beb: %C.04a = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.011: = lookup_impl_witness %C.04a, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.89b: %Destroy.type = facet_value %C.04a, (%Destroy.lookup_impl_witness.011) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.346: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.89b) [symbolic] -// CHECK:STDOUT: %.cf2: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.346, %Destroy.facet.89b [symbolic] -// CHECK:STDOUT: %impl.elem2: %.cf2 = impl_witness_access %Destroy.lookup_impl_witness.011, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.ac0: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.89b) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.7cc: = lookup_impl_witness %C.04a, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.066: = lookup_impl_witness %C.04a, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.17b: %SubobjectDestroy.type = facet_value %C.04a, (%SubobjectDestroy.lookup_impl_witness.066) [symbolic] +// CHECK:STDOUT: %.98e: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.17b) [symbolic] +// CHECK:STDOUT: %Destroy.facet.d3d: %Destroy.type = facet_value %C.04a, (%DestroyImpl.lookup_impl_witness.7cc, %SubobjectDestroy.lookup_impl_witness.066) [symbolic] // CHECK:STDOUT: %C.664: type = class_type @C, @C(%empty_struct_type) [concrete] // CHECK:STDOUT: %pattern_type.917: type = pattern_type %C.664 [concrete] // CHECK:STDOUT: %v.patt.dcb: %pattern_type.917 = ref_binding_pattern v [concrete] // CHECK:STDOUT: %v.var_patt.afa: %pattern_type.917 = var_pattern %v.patt.dcb [concrete] // CHECK:STDOUT: %C.val.c26: %C.664 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c54: %pattern_type.917 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.8e3: %pattern_type.917 = wrapper_binding_pattern self, %self.param_patt.c54 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.2: = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01daf.2, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.05a: %Destroy.type = facet_value %C.664, (%custom_witness.f8f19d.2) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.f82: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.05a) [concrete] -// CHECK:STDOUT: %.29f: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.f82, %Destroy.facet.05a [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.cfd: %SubobjectDestroy.type = facet_value %C.664, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cdb: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cfd) [concrete] +// CHECK:STDOUT: %.08c: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cfd) [concrete] +// CHECK:STDOUT: %Destroy.facet.6b2: %Destroy.type = facet_value %C.664, (%DestroyImpl.impl_witness.cdb, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.055: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.6b2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.917 = ref_param_pattern [concrete = constants.%self.param_patt.c54] -// CHECK:STDOUT: %self.patt: %pattern_type.917 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8e3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.664 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.664 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.917 = ref_param_pattern [concrete = constants.%self.param_patt.c54] -// CHECK:STDOUT: %self.patt: %pattern_type.917 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8e3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.664 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.664 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc6_15.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc6_17.1: type = splice_block %.loc6_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc6_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] +// CHECK:STDOUT: %T.loc6_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_15.2: type) { -// CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc6_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc6_15.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_15.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc6_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_15.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %C.loc7_20.2: type = class_type @C, @C(%T.loc6_15.1) [symbolic = %C.loc7_20.2 (constants.%C.04a)] @@ -931,12 +594,12 @@ fn G() { F({}); } // CHECK:STDOUT: %v.patt.loc7_15.2: @F.%pattern_type (%pattern_type.563) = ref_binding_pattern v [symbolic = %v.patt.loc7_15.2 (constants.%v.patt.315)] // CHECK:STDOUT: %v.var_patt.loc7_3.2: @F.%pattern_type (%pattern_type.563) = var_pattern %v.patt.loc7_15.2 [symbolic = %v.var_patt.loc7_3.2 (constants.%v.var_patt.783)] // CHECK:STDOUT: %C.val: @F.%C.loc7_20.2 (%C.04a) = struct_value () [symbolic = %C.val (constants.%C.val.beb)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %C.loc7_20.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.011)] -// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value %C.loc7_20.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.89b)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc7_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.346)] -// CHECK:STDOUT: %.loc7_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc7_3.3 [symbolic = %.loc7_3.4 (constants.%.cf2)] -// CHECK:STDOUT: %impl.elem2.loc7_3.2: @F.%.loc7_3.4 (%.cf2) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem2.loc7_3.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc7_3.3) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.ac0)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %C.loc7_20.2, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.066)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %C.loc7_20.2, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.17b)] +// CHECK:STDOUT: %.loc7_3.4: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc7_3.4 (constants.%.98e)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %C.loc7_20.2, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.7cc)] +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value %C.loc7_20.2, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.d3d)] +// CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -947,56 +610,35 @@ fn G() { F({}); } // CHECK:STDOUT: assign %v.var, %.loc7_3.1 // CHECK:STDOUT: %.loc7_20: type = splice_block %C.loc7_20.1 [symbolic = %C.loc7_20.2 (constants.%C.04a)] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T)] -// CHECK:STDOUT: %C.loc7_20.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc7_20.2 (constants.%C.04a)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_15.2 [symbolic = %T.loc6_15.1 (constants.%T.67d)] +// CHECK:STDOUT: %C.loc7_20.1: type = class_type @C, @C(constants.%T.67d) [symbolic = %C.loc7_20.2 (constants.%C.04a)] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref @F.%C.loc7_20.2 (%C.04a) = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt.loc7_15.1: @F.%pattern_type (%pattern_type.563) = ref_binding_pattern v [symbolic = %v.patt.loc7_15.2 (constants.%v.patt.315)] // CHECK:STDOUT: %v.var_patt.loc7_3.1: @F.%pattern_type (%pattern_type.563) = var_pattern %v.patt.loc7_15.1 [symbolic = %v.var_patt.loc7_3.2 (constants.%v.var_patt.783)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem2.loc7_3.1: @F.%.loc7_3.4 (%.cf2) = impl_witness_access constants.%Destroy.lookup_impl_witness.011, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem2.loc7_3.1 -// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%C.04a, (constants.%Destroy.lookup_impl_witness.011) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.89b)] -// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%C.04a, %Destroy.facet.loc7_3.1 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.89b)] -// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%C.04a, (constants.%Destroy.lookup_impl_witness.011) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.89b)] -// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%C.04a, %Destroy.facet.loc7_3.2 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.89b)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem2.loc7_3.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.89b) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.ac0)] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_impl_fn.loc7_3.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%C.04a, (constants.%DestroyImpl.lookup_impl_witness.7cc, constants.%SubobjectDestroy.lookup_impl_witness.066) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.d3d)] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%C.04a, %Destroy.facet.loc7_3.1 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.d3d)] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%C.04a, (constants.%DestroyImpl.lookup_impl_witness.7cc, constants.%SubobjectDestroy.lookup_impl_witness.066) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.d3d)] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%C.04a, %Destroy.facet.loc7_3.2 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.d3d)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.2(%self.param: ref %C.664) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %C.664) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %C.664) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.2(%self.param: ref %C.664) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_15.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc6_15.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%empty_struct_type) { -// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc6_15.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc6_15.1 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1006,12 +648,12 @@ fn G() { F({}); } // CHECK:STDOUT: %v.patt.loc7_15.2 => constants.%v.patt.dcb // CHECK:STDOUT: %v.var_patt.loc7_3.2 => constants.%v.var_patt.afa // CHECK:STDOUT: %C.val => constants.%C.val.c26 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.2 -// CHECK:STDOUT: %Destroy.facet.loc7_3.3 => constants.%Destroy.facet.05a -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.f82 -// CHECK:STDOUT: %.loc7_3.4 => constants.%.29f -// CHECK:STDOUT: %impl.elem2.loc7_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness => constants.%custom_witness.b80ef6.2 +// CHECK:STDOUT: %SubobjectDestroy.facet => constants.%SubobjectDestroy.facet.cfd +// CHECK:STDOUT: %.loc7_3.4 => constants.%.08c +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness => constants.%DestroyImpl.impl_witness.cdb +// CHECK:STDOUT: %Destroy.facet.loc7_3.3 => constants.%Destroy.facet.6b2 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.055 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- generic_use_inside_template.carbon @@ -1019,9 +661,9 @@ fn G() { F({}); } // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0, template [template] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0, template [template] // CHECK:STDOUT: %C.type: type = parameterized_class_name_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] @@ -1039,16 +681,12 @@ fn G() { F({}); } // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.5d6: %.537 = splice_inst @F.%tuple.elem0 [template] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.869: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.c97: %Destroy.WithSelf.SelfDestruct.type.869 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.df0 [concrete] -// CHECK:STDOUT: %.8cb: type = type_of_inst @F.%.loc7_3.8 [template] -// CHECK:STDOUT: %.c23: %.8cb = splice_inst @F.%.loc7_3.8 [template] -// CHECK:STDOUT: %.57c: type = type_of_inst @F.%.loc7_3.11 [template] -// CHECK:STDOUT: %.e63: %.57c = splice_inst @F.%.loc7_3.11 [template] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %.5a2: type = type_of_inst @F.%.loc7_3.6 [template] +// CHECK:STDOUT: %.13c: %.5a2 = splice_inst @F.%.loc7_3.6 [template] // CHECK:STDOUT: %C.664bb6.1: type = class_type @C, @C(%empty_struct_type) [concrete] // CHECK:STDOUT: %inst.class_type: = inst_value [concrete] { // CHECK:STDOUT: %C.664bb6.2: type = class_type @C, @C(%empty_struct_type) [concrete = %C.664bb6.1] @@ -1067,87 +705,48 @@ fn G() { F({}); } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%inst.splice_block.426619.2) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c54: %pattern_type.917 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.8e3: %pattern_type.917 = wrapper_binding_pattern self, %self.param_patt.c54 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.2: = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01daf.2, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.05a: %Destroy.type = facet_value %C.664bb6.1, (%custom_witness.f8f19d.2) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.f82: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.05a) [concrete] -// CHECK:STDOUT: %.29f: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.f82, %Destroy.facet.05a [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.cfd: %SubobjectDestroy.type = facet_value %C.664bb6.1, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cdb: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cfd) [concrete] +// CHECK:STDOUT: %Destroy.facet.6b2a44.1: %Destroy.type = facet_value %C.664bb6.1, (%DestroyImpl.impl_witness.cdb, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.3: = inst_value [concrete] { -// CHECK:STDOUT: %.df0: = splice_block %bound_method { +// CHECK:STDOUT: %.5cf: init %empty_tuple.type = splice_block %SelfDestruct.call { // CHECK:STDOUT: %.ed1955.1: ref %C.664bb6.1 = specific_inst @F.%v.var, @F(%empty_struct_type) -// CHECK:STDOUT: %impl.elem2: %.29f = impl_witness_access %custom_witness.f8f19d.2, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.2] -// CHECK:STDOUT: %bound_method: = bound_method %.ed1955.1, %impl.elem2 +// CHECK:STDOUT: %Destroy.facet.6b2a44.2: %Destroy.type = facet_value %C.664bb6.1, (%DestroyImpl.impl_witness.cdb, %custom_witness.b80ef6.2) [concrete = %Destroy.facet.6b2a44.1] +// CHECK:STDOUT: %.03384d.1: %Destroy.type = converted %C.664bb6.1, %Destroy.facet.6b2a44.2 [concrete = %Destroy.facet.6b2a44.1] +// CHECK:STDOUT: %Destroy.facet.6b2a44.3: %Destroy.type = facet_value %C.664bb6.1, (%DestroyImpl.impl_witness.cdb, %custom_witness.b80ef6.2) [concrete = %Destroy.facet.6b2a44.1] +// CHECK:STDOUT: %.03384d.2: %Destroy.type = converted %C.664bb6.1, %Destroy.facet.6b2a44.3 [concrete = %Destroy.facet.6b2a44.1] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.055aa8.2(%.ed1955.1) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %.df0(%.ed1955.1) -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.df0: @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct.type (%Destroy.WithSelf.SelfDestruct.type.869) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct (constants.%Destroy.WithSelf.SelfDestruct.c97)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.917 = ref_param_pattern [concrete = constants.%self.param_patt.c54] -// CHECK:STDOUT: %self.patt: %pattern_type.917 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8e3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.664bb6.1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.664bb6.1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.917 = ref_param_pattern [concrete = constants.%self.param_patt.c54] -// CHECK:STDOUT: %self.patt: %pattern_type.917 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8e3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.664bb6.1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.664bb6.1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc6_16.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc6_16.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc6_16.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc6_16.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc6_18.1: type = splice_block %.loc6_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc6_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6_16.2: type = symbolic_binding T, 0, template [template = %T.loc6_16.1 (constants.%T)] +// CHECK:STDOUT: %T.loc6_16.2: type = symbolic_binding T, 0, template [template = %T.loc6_16.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_16.2: type) { -// CHECK:STDOUT: %T.patt.loc6_16.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc6_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc6_16.1: type = symbolic_binding T, 0, template [template = %T.loc6_16.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc6_16.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc6_16.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc6_16.1: type = symbolic_binding T, 0, template [template = %T.loc6_16.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc7_20.5: = call_action (%C.ref, %T.ref), false [template] @@ -1159,25 +758,22 @@ fn G() { F({}); } // CHECK:STDOUT: %pattern_type: type = pattern_type %.loc7_20.9 [template = %pattern_type (constants.%pattern_type.fcb)] // CHECK:STDOUT: %v.patt.loc7_15.2: @F.%pattern_type (%pattern_type.fcb) = ref_binding_pattern v [template = %v.patt.loc7_15.2 (constants.%v.patt.126)] // CHECK:STDOUT: %v.var_patt.loc7_3.2: @F.%pattern_type (%pattern_type.fcb) = var_pattern %v.patt.loc7_15.2 [template = %v.var_patt.loc7_3.2 (constants.%v.var_patt.768)] -// CHECK:STDOUT: %.loc7_3.6: %tuple.type = initialize_action %.loc7_25, %.loc7_20.9, %v.var, none, false [template] -// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc7_3.6, element0 [template] -// CHECK:STDOUT: %.loc7_3.7: @F.%.loc7_20.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc7_3.7 (constants.%.5d6)] -// CHECK:STDOUT: %.loc7_3.8: = compound_member_access_action %v.var, constants.%assoc2 [template] -// CHECK:STDOUT: %.loc7_3.9: type = type_of_inst %.loc7_3.8 [template = %.loc7_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc7_3.10: @F.%.loc7_3.9 (%.8cb) = splice_inst %.loc7_3.8 [template = %.loc7_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc7_3.11: = call_action (%.loc7_3.3), true [template] -// CHECK:STDOUT: %.loc7_3.12: type = type_of_inst %.loc7_3.11 [template = %.loc7_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc7_3.13: @F.%.loc7_3.12 (%.57c) = splice_inst %.loc7_3.11 [template = %.loc7_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc7_3.4: %tuple.type = initialize_action %.loc7_25, %.loc7_20.9, %v.var, none, false [template] +// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc7_3.4, element0 [template] +// CHECK:STDOUT: %.loc7_3.5: @F.%.loc7_20.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc7_3.5 (constants.%.5d6)] +// CHECK:STDOUT: %.loc7_3.6: = call_action (constants.%SelfDestruct, %v.var), true [template] +// CHECK:STDOUT: %.loc7_3.7: type = type_of_inst %.loc7_3.6 [template = %.loc7_3.7 (constants.%.5a2)] +// CHECK:STDOUT: %.loc7_3.8: @F.%.loc7_3.7 (%.5a2) = splice_inst %.loc7_3.6 [template = %.loc7_3.8 (constants.%.13c)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.var: ref @F.%.loc7_20.9 (%.537) = var_storage %v.var_patt.loc7_3.1 // CHECK:STDOUT: %.loc7_25: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc7_3.1: @F.%.loc7_20.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc7_3.7 (constants.%.5d6)] +// CHECK:STDOUT: %.loc7_3.1: @F.%.loc7_20.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc7_3.5 (constants.%.5d6)] // CHECK:STDOUT: assign %v.var, %.loc7_3.1 // CHECK:STDOUT: %.loc7_20.1: type = splice_block %.loc7_20.4 [template = %.loc7_20.9 (constants.%.537)] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_16.2 [template = %T.loc6_16.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_16.2 [template = %T.loc6_16.1 (constants.%T.67d)] // CHECK:STDOUT: %.loc7_20.2: type = type_of_inst %.loc7_20.5 [template = %.loc7_20.6 (constants.%.7a9)] // CHECK:STDOUT: %.loc7_20.3: @F.%.loc7_20.6 (%.7a9) = splice_inst %.loc7_20.5 [template = %.loc7_20.7 (constants.%.154)] // CHECK:STDOUT: %.loc7_20.4: type = splice_inst %.loc7_20.8 [template = %.loc7_20.9 (constants.%.537)] @@ -1187,43 +783,23 @@ fn G() { F({}); } // CHECK:STDOUT: %v.patt.loc7_15.1: @F.%pattern_type (%pattern_type.fcb) = ref_binding_pattern v [template = %v.patt.loc7_15.2 (constants.%v.patt.126)] // CHECK:STDOUT: %v.var_patt.loc7_3.1: @F.%pattern_type (%pattern_type.fcb) = var_pattern %v.patt.loc7_15.1 [template = %v.var_patt.loc7_3.2 (constants.%v.var_patt.768)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7_3.2: type = type_of_inst %.loc7_3.8 [template = %.loc7_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc7_3.3: @F.%.loc7_3.9 (%.8cb) = splice_inst %.loc7_3.8 [template = %.loc7_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc7_3.4: type = type_of_inst %.loc7_3.11 [template = %.loc7_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc7_3.5: @F.%.loc7_3.12 (%.57c) = splice_inst %.loc7_3.11 [template = %.loc7_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc7_3.2: type = type_of_inst %.loc7_3.6 [template = %.loc7_3.7 (constants.%.5a2)] +// CHECK:STDOUT: %.loc7_3.3: @F.%.loc7_3.7 (%.5a2) = splice_inst %.loc7_3.6 [template = %.loc7_3.8 (constants.%.13c)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.2(%self.param: ref %C.664bb6.1) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %C.664bb6.1) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %C.664bb6.1) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.2(%self.param: ref %C.664bb6.1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc6_16.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_16.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc6_16.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc6_16.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%empty_struct_type) { -// CHECK:STDOUT: %T.patt.loc6_16.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc6_16.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc6_16.1 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1236,14 +812,11 @@ fn G() { F({}); } // CHECK:STDOUT: %pattern_type => constants.%pattern_type.917 // CHECK:STDOUT: %v.patt.loc7_15.2 => constants.%v.patt.dcb // CHECK:STDOUT: %v.var_patt.loc7_3.2 => constants.%v.var_patt.afa -// CHECK:STDOUT: %.loc7_3.6 => constants.%tuple +// CHECK:STDOUT: %.loc7_3.4 => constants.%tuple // CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.2 -// CHECK:STDOUT: %.loc7_3.7 => constants.%C.val -// CHECK:STDOUT: %.loc7_3.8 => constants.%inst.splice_block.426619.3 -// CHECK:STDOUT: %.loc7_3.9 => -// CHECK:STDOUT: %.loc7_3.10 => -// CHECK:STDOUT: %.loc7_3.11 => constants.%inst.call -// CHECK:STDOUT: %.loc7_3.12 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc7_3.13 => +// CHECK:STDOUT: %.loc7_3.5 => constants.%C.val +// CHECK:STDOUT: %.loc7_3.6 => constants.%inst.splice_block.426619.3 +// CHECK:STDOUT: %.loc7_3.7 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc7_3.8 => // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/field/field_access.carbon b/toolchain/check/testdata/class/field/field_access.carbon index 847e448072f8..e1419f8a07d9 100644 --- a/toolchain/check/testdata/class/field/field_access.carbon +++ b/toolchain/check/testdata/class/field/field_access.carbon @@ -89,30 +89,27 @@ fn Run() { // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %ck.patt: %pattern_type.d94 = ref_binding_pattern ck [concrete] // CHECK:STDOUT: %ck.var_patt: %pattern_type.d94 = var_pattern %ck.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc25 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc25 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc25 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.ec5: type = pattern_type %struct_type.j.k [concrete] -// CHECK:STDOUT: %self.param_patt.fcf: %pattern_type.ec5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.304: %pattern_type.ec5 = wrapper_binding_pattern self, %self.param_patt.fcf [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc21_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc21_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b2b: %pattern_type.f15 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f19: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt.b2b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc21_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc21_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc21_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc25 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc21_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.3a1: %SubobjectDestroy.type = facet_value %Class, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.66c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.3a1) [concrete] +// CHECK:STDOUT: %Destroy.facet.728: %Destroy.type = facet_value %Class, (%DestroyImpl.impl_witness.66c, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.744: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.728) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -121,7 +118,7 @@ fn Run() { // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -135,52 +132,9 @@ fn Run() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc25 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc25 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc21_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ec5 = ref_param_pattern [concrete = constants.%self.param_patt.fcf] -// CHECK:STDOUT: %self.patt: %pattern_type.ec5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.304] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.j.k = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.j.k = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc21_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ec5 = ref_param_pattern [concrete = constants.%self.param_patt.fcf] -// CHECK:STDOUT: %self.patt: %pattern_type.ec5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.304] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.j.k = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.j.k = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc21_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc21_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -218,8 +172,8 @@ fn Run() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc21_15.1 [concrete = constants.%Class] // CHECK:STDOUT: %.loc21_15.2: type = converted %.loc21_15.1, %as_type [concrete = constants.%Class] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.c3e, @T.as.DefaultOrUnformed.impl.Op(constants.%Class) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] -// CHECK:STDOUT: %.loc21_3: ref %Class = splice_block %c.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Class to %.loc21_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc21_3.1: ref %Class = splice_block %c.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Class to %.loc21_3.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %c.var, %T.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: %c: ref %Class = wrapper_binding c, %c.var @@ -283,65 +237,66 @@ fn Run() { // CHECK:STDOUT: %ck.patt: %pattern_type.d94 = ref_binding_pattern ck [concrete = constants.%ck.patt] // CHECK:STDOUT: %ck.var_patt: %pattern_type.d94 = var_pattern %ck.patt [concrete = constants.%ck.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc25: = bound_method %ck.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc25: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc25(%ck.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %cj.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%cj.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc25_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc25_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc25_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc25_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc25_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc25_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc25: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%ck.var) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%cj.var) +// CHECK:STDOUT: %Destroy.facet.loc21_3.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc21_3.2: %Destroy.type = converted constants.%Class, %Destroy.facet.loc21_3.1 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %Destroy.facet.loc21_3.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc21_3.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc21_3.2 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.728) [concrete = constants.%SelfDestruct.specific_fn.744] +// CHECK:STDOUT: %SelfDestruct.call.loc21: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%c.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc25(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc25(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc25(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc21_3.1(%self.param: ref %struct_type.j.k) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc21_3.1(%self.param: ref %struct_type.j.k) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc21_3.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21_3.1: = bound_method %.loc21_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21_3.1(%.loc21_3.1) -// CHECK:STDOUT: %.loc21_3.2: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21_3.2: = bound_method %.loc21_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21_3.2(%.loc21_3.2) +// CHECK:STDOUT: %Destroy.facet.loc21_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc21_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc21_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc21_3.1) +// CHECK:STDOUT: %.loc21_3.4: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc21_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc21_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc21_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc21_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc21_3.1(%self.param: ref %struct_type.j.k) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc21_3.1(%self.param: ref %struct_type.j.k) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc21_3.2(%self.param: ref %Class) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc21_3.2(%self.param: ref %Class) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %k.ref: %Class.elem = name_ref k, @Class.%field_decl.loc17 [concrete = @Class.%field_decl.loc17] // CHECK:STDOUT: %.loc21_3.1: ref %i32 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21_3.1: = bound_method %.loc21_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21_3.1(%.loc21_3.1) +// CHECK:STDOUT: %Destroy.facet.loc21_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc21_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc21_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc21_3.1) // CHECK:STDOUT: %j.ref: %Class.elem = name_ref j, @Class.%field_decl.loc16 [concrete = @Class.%field_decl.loc16] -// CHECK:STDOUT: %.loc21_3.2: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21_3.2: = bound_method %.loc21_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21_3.2(%.loc21_3.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc21_3.2(%self.param: ref %Class) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc21_3.2(%self.param: ref %Class) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc21_3.4: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc21_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc21_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc21_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc21_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // 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 6210b33fbadf..4cfdd8b349e3 100644 --- a/toolchain/check/testdata/class/field/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field/field_access_in_value.carbon @@ -91,30 +91,27 @@ fn Test() { // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %ck.patt: %pattern_type.d94 = ref_binding_pattern ck [concrete] // CHECK:STDOUT: %ck.var_patt: %pattern_type.d94 = var_pattern %ck.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.ec5: type = pattern_type %struct_type.j.k [concrete] -// CHECK:STDOUT: %self.param_patt.fcf: %pattern_type.ec5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.304: %pattern_type.ec5 = wrapper_binding_pattern self, %self.param_patt.fcf [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc21_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc21_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b2b: %pattern_type.f15 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f19: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt.b2b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc21_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc21_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc21_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc21_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.3a1: %SubobjectDestroy.type = facet_value %Class, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.66c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.3a1) [concrete] +// CHECK:STDOUT: %Destroy.facet.728: %Destroy.type = facet_value %Class, (%DestroyImpl.impl_witness.66c, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.744: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.728) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -123,7 +120,7 @@ fn Test() { // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -137,52 +134,9 @@ fn Test() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc26 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc21_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ec5 = ref_param_pattern [concrete = constants.%self.param_patt.fcf] -// CHECK:STDOUT: %self.patt: %pattern_type.ec5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.304] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.j.k = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.j.k = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc21_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ec5 = ref_param_pattern [concrete = constants.%self.param_patt.fcf] -// CHECK:STDOUT: %self.patt: %pattern_type.ec5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.304] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.j.k = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.j.k = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc21_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc21_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -220,8 +174,8 @@ fn Test() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc21_16.1 [concrete = constants.%Class] // CHECK:STDOUT: %.loc21_16.2: type = converted %.loc21_16.1, %as_type [concrete = constants.%Class] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.c3e, @T.as.DefaultOrUnformed.impl.Op(constants.%Class) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] -// CHECK:STDOUT: %.loc21_3: ref %Class = splice_block %cv.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Class to %.loc21_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc21_3.1: ref %Class = splice_block %cv.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Class to %.loc21_3.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %cv.var, %T.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %Class.ref.loc21: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: %cv: ref %Class = wrapper_binding cv, %cv.var @@ -292,65 +246,66 @@ fn Test() { // CHECK:STDOUT: %ck.patt: %pattern_type.d94 = ref_binding_pattern ck [concrete = constants.%ck.patt] // CHECK:STDOUT: %ck.var_patt: %pattern_type.d94 = var_pattern %ck.patt [concrete = constants.%ck.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc26: = bound_method %ck.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc26: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc26(%ck.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc25: = bound_method %cj.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc25: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc25(%cj.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21: = bound_method %cv.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21(%cv.var) +// CHECK:STDOUT: %Destroy.facet.loc26_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc26_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc26_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc26_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc26: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%ck.var) +// CHECK:STDOUT: %Destroy.facet.loc25_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc25_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc25_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc25_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc25_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc25_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc25: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%cj.var) +// CHECK:STDOUT: %Destroy.facet.loc21_3.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc21_3.2: %Destroy.type = converted constants.%Class, %Destroy.facet.loc21_3.1 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %Destroy.facet.loc21_3.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc21_3.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc21_3.2 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.728) [concrete = constants.%SelfDestruct.specific_fn.744] +// CHECK:STDOUT: %SelfDestruct.call.loc21: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%cv.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc21_3.1(%self.param: ref %struct_type.j.k) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc21_3.1(%self.param: ref %struct_type.j.k) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc21_3.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21_3.1: = bound_method %.loc21_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21_3.1(%.loc21_3.1) -// CHECK:STDOUT: %.loc21_3.2: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21_3.2: = bound_method %.loc21_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21_3.2(%.loc21_3.2) +// CHECK:STDOUT: %Destroy.facet.loc21_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc21_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc21_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc21_3.1) +// CHECK:STDOUT: %.loc21_3.4: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc21_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc21_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc21_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc21_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc21_3.1(%self.param: ref %struct_type.j.k) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc21_3.1(%self.param: ref %struct_type.j.k) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc21_3.2(%self.param: ref %Class) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc21_3.2(%self.param: ref %Class) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %k.ref: %Class.elem = name_ref k, @Class.%field_decl.loc17 [concrete = @Class.%field_decl.loc17] // CHECK:STDOUT: %.loc21_3.1: ref %i32 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21_3.1: = bound_method %.loc21_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21_3.1(%.loc21_3.1) +// CHECK:STDOUT: %Destroy.facet.loc21_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc21_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc21_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc21_3.1) // CHECK:STDOUT: %j.ref: %Class.elem = name_ref j, @Class.%field_decl.loc16 [concrete = @Class.%field_decl.loc16] -// CHECK:STDOUT: %.loc21_3.2: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21_3.2: = bound_method %.loc21_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21_3.2(%.loc21_3.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc21_3.2(%self.param: ref %Class) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc21_3.2(%self.param: ref %Class) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc21_3.4: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc21_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc21_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc21_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc21_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc21_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 2b557a88b81c..a4643f7547ef 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -497,8 +497,8 @@ class Class(U: type) { // CHECK:STDOUT: %CompleteClass.F.type.356: type = fn_type @CompleteClass.F, @CompleteClass(%T.67d) [symbolic] // CHECK:STDOUT: %CompleteClass.F.bdf: %CompleteClass.F.type.356 = struct_value () [symbolic] // CHECK:STDOUT: %CompleteClass.elem.99d: type = unbound_element_type %CompleteClass.275, %i32 [symbolic] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %CompleteClass.09c: type = class_type @CompleteClass, @CompleteClass(%i32) [concrete] // CHECK:STDOUT: %CompleteClass.elem.1e9: type = unbound_element_type %CompleteClass.09c, %i32 [concrete] // CHECK:STDOUT: %CompleteClass.F.type.901: type = fn_type @CompleteClass.F, @CompleteClass(%i32) [concrete] @@ -509,30 +509,27 @@ class Class(U: type) { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %CompleteClass.F.specific_fn: = specific_function %CompleteClass.F.0d9, @CompleteClass.F(%i32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc6_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc6_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.5c4: type = pattern_type %struct_type.n [concrete] -// CHECK:STDOUT: %self.param_patt.d03: %pattern_type.5c4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3cd: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt.d03 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc6_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c88: %pattern_type.ad8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.287: %pattern_type.ad8 = wrapper_binding_pattern self, %self.param_patt.c88 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc6_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc6_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc6_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc6_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.baf: %SubobjectDestroy.type = facet_value %CompleteClass.09c, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4d3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.baf) [concrete] +// CHECK:STDOUT: %Destroy.facet.95d: %Destroy.type = facet_value %CompleteClass.09c, (%DestroyImpl.impl_witness.4d3, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.7c1: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.95d) [concrete] // CHECK:STDOUT: %UseField.type: type = fn_type @UseField [concrete] // CHECK:STDOUT: %UseField: %UseField.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] @@ -553,7 +550,7 @@ class Class(U: type) { // CHECK:STDOUT: %Main.F: %F.type = import_ref Main//foo, F, loaded [concrete = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -565,7 +562,9 @@ class Class(U: type) { // CHECK:STDOUT: %Main.import_ref.14b: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.99d) = import_ref Main//foo, loc7_8, loaded [concrete = %field_decl] // CHECK:STDOUT: %Main.import_ref.928: @CompleteClass.%CompleteClass.F.type (%CompleteClass.F.type.356) = import_ref Main//foo, loc8_17, loaded [symbolic = @CompleteClass.%CompleteClass.F (constants.%CompleteClass.F.bdf)] // CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//foo, loc6_22, loaded [symbolic = @CompleteClass.%T (constants.%T.67d)] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Main.import_ref.736 = import_ref Main//foo, loc7_10, unloaded // CHECK:STDOUT: %field_decl: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.99d) = field_decl n, element0, %Main.import_ref.736 in [concrete] {} // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] @@ -573,51 +572,6 @@ class Class(U: type) { // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc6_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc6_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ad8 = ref_param_pattern [concrete = constants.%self.param_patt.c88] -// CHECK:STDOUT: %self.patt: %pattern_type.ad8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.287] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %CompleteClass.09c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %CompleteClass.09c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc6_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ad8 = ref_param_pattern [concrete = constants.%self.param_patt.c88] -// CHECK:STDOUT: %self.patt: %pattern_type.ad8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.287] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %CompleteClass.09c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %CompleteClass.09c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Class = imports.%Main.Class @@ -650,7 +604,7 @@ class Class(U: type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @CompleteClass(imports.%Main.import_ref.b3bc94.2: type) [from "foo.carbon"] { -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -673,8 +627,8 @@ class Class(U: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.var: ref %CompleteClass.09c = var_storage %v.var_patt // CHECK:STDOUT: %F.ref.loc6: %F.type = name_ref F, imports.%Main.F [concrete = constants.%F] -// CHECK:STDOUT: %.loc6_3: ref %CompleteClass.09c = splice_block %v.var {} -// CHECK:STDOUT: %F.call: init %CompleteClass.09c to %.loc6_3 = call %F.ref.loc6() +// CHECK:STDOUT: %.loc6_3.1: ref %CompleteClass.09c = splice_block %v.var {} +// CHECK:STDOUT: %F.call: init %CompleteClass.09c to %.loc6_3.1 = call %F.ref.loc6() // CHECK:STDOUT: assign %v.var, %F.call // CHECK:STDOUT: %.loc6_27: type = splice_block %CompleteClass [concrete = constants.%CompleteClass.09c] { // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%Main.CompleteClass [concrete = constants.%CompleteClass.generic] @@ -691,8 +645,12 @@ class Class(U: type) { // CHECK:STDOUT: %F.ref.loc7: %CompleteClass.F.type.901 = name_ref F, %.loc7 [concrete = constants.%CompleteClass.F.0d9] // CHECK:STDOUT: %CompleteClass.F.specific_fn: = specific_function %F.ref.loc7, @CompleteClass.F(constants.%i32) [concrete = constants.%CompleteClass.F.specific_fn] // CHECK:STDOUT: %CompleteClass.F.call: init %i32 = call %CompleteClass.F.specific_fn() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc6_3.1: %Destroy.type = facet_value constants.%CompleteClass.09c, (constants.%DestroyImpl.impl_witness.4d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %.loc6_3.2: %Destroy.type = converted constants.%CompleteClass.09c, %Destroy.facet.loc6_3.1 [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %Destroy.facet.loc6_3.2: %Destroy.type = facet_value constants.%CompleteClass.09c, (constants.%DestroyImpl.impl_witness.4d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %.loc6_3.3: %Destroy.type = converted constants.%CompleteClass.09c, %Destroy.facet.loc6_3.2 [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.95d) [concrete = constants.%SelfDestruct.specific_fn.7c1] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: return %CompleteClass.F.call // CHECK:STDOUT: } // CHECK:STDOUT: @@ -704,49 +662,30 @@ class Class(U: type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F [from "foo.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc6_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6_3.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc6_3.2(%self.param: ref %struct_type.n) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc6_3.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc6_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc6_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.2(%self.param: ref %struct_type.n) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc6) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_3.2(%self.param: ref %struct_type.n) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6_3.2(%self.param: ref %struct_type.n) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6_3.3(%self.param: ref %CompleteClass.09c) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc6_3.3(%self.param: ref %CompleteClass.09c) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %CompleteClass.elem.1e9 = name_ref n, imports.%Main.import_ref.14b [concrete = imports.%field_decl] -// CHECK:STDOUT: %.loc6: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc6) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6_3.3(%self.param: ref %CompleteClass.09c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6_3.3(%self.param: ref %CompleteClass.09c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc6_3.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc6_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc6_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc6_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc6_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -754,8 +693,8 @@ class Class(U: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.var: ref %CompleteClass.09c = var_storage %v.var_patt // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%Main.F [concrete = constants.%F] -// CHECK:STDOUT: %.loc11_3: ref %CompleteClass.09c = splice_block %v.var {} -// CHECK:STDOUT: %F.call: init %CompleteClass.09c to %.loc11_3 = call %F.ref() +// CHECK:STDOUT: %.loc11_3.1: ref %CompleteClass.09c = splice_block %v.var {} +// CHECK:STDOUT: %F.call: init %CompleteClass.09c to %.loc11_3.1 = call %F.ref() // CHECK:STDOUT: assign %v.var, %F.call // CHECK:STDOUT: %.loc11_27: type = splice_block %CompleteClass [concrete = constants.%CompleteClass.09c] { // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%Main.CompleteClass [concrete = constants.%CompleteClass.generic] @@ -776,13 +715,17 @@ class Class(U: type) { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %.loc12_11.2, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc12_11.2(%.loc12_11.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%CompleteClass.09c, (constants.%DestroyImpl.impl_witness.4d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%CompleteClass.09c, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%CompleteClass.09c, (constants.%DestroyImpl.impl_witness.4d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%CompleteClass.09c, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.95d) [concrete = constants.%SelfDestruct.specific_fn.7c1] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%T.67d) { -// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -795,7 +738,7 @@ class Class(U: type) { // CHECK:STDOUT: specific @CompleteClass.F(constants.%T.67d) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%i32) { -// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -824,14 +767,13 @@ class Class(U: type) { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [concrete] // CHECK:STDOUT: %complete_type.31e: = complete_type_witness %struct_type.n [concrete] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %CompleteClass.275: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] -// CHECK:STDOUT: %CompleteClass.F.type.356: type = fn_type @CompleteClass.F, @CompleteClass(%T) [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %CompleteClass.275: type = class_type @CompleteClass, @CompleteClass(%T.67d) [symbolic] +// CHECK:STDOUT: %CompleteClass.F.type.356: type = fn_type @CompleteClass.F, @CompleteClass(%T.67d) [symbolic] // CHECK:STDOUT: %CompleteClass.F.bdf: %CompleteClass.F.type.356 = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %CompleteClass.elem.99d: type = unbound_element_type %CompleteClass.275, %i32 [symbolic] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %ptr.a17: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %CompleteClass.860: type = class_type @CompleteClass, @CompleteClass(%ptr.a17) [concrete] // CHECK:STDOUT: %CompleteClass.elem.609: type = unbound_element_type %CompleteClass.860, %i32 [concrete] @@ -848,30 +790,27 @@ class Class(U: type) { // CHECK:STDOUT: %CompleteClass.F.0d9: %CompleteClass.F.type.901 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.5c4: type = pattern_type %struct_type.n [concrete] -// CHECK:STDOUT: %self.param_patt.d03: %pattern_type.5c4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3cd: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt.d03 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.f3f: %pattern_type.c65 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d9d: %pattern_type.c65 = wrapper_binding_pattern self, %self.param_patt.f3f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e3b: %SubobjectDestroy.type = facet_value %CompleteClass.860, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.766: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e3b) [concrete] +// CHECK:STDOUT: %Destroy.facet.336: %Destroy.type = facet_value %CompleteClass.860, (%DestroyImpl.impl_witness.766, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.826: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.336) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -881,68 +820,25 @@ class Class(U: type) { // CHECK:STDOUT: %Core.048aa3.1: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//foo, loc6_22, loaded [symbolic = @CompleteClass.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//foo, loc6_22, loaded [symbolic = @CompleteClass.%T (constants.%T.67d)] // CHECK:STDOUT: %Main.import_ref.bfd: = import_ref Main//foo, loc9_1, loaded [concrete = constants.%complete_type.31e] // CHECK:STDOUT: %Main.import_ref.5a3 = import_ref Main//foo, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.14b: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.99d) = import_ref Main//foo, loc7_8, loaded [concrete = %field_decl] // CHECK:STDOUT: %Main.import_ref.cd2 = import_ref Main//foo, loc8_17, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//foo, loc6_22, loaded [symbolic = @CompleteClass.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//foo, loc6_22, loaded [symbolic = @CompleteClass.%T (constants.%T.67d)] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Main.import_ref.736 = import_ref Main//foo, loc7_10, unloaded // CHECK:STDOUT: %field_decl: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.99d) = field_decl n, element0, %Main.import_ref.736 in [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c65 = ref_param_pattern [concrete = constants.%self.param_patt.f3f] -// CHECK:STDOUT: %self.patt: %pattern_type.c65 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d9d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %CompleteClass.860 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %CompleteClass.860 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c65 = ref_param_pattern [concrete = constants.%self.param_patt.f3f] -// CHECK:STDOUT: %self.patt: %pattern_type.c65 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d9d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %CompleteClass.860 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %CompleteClass.860 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Class = imports.%Main.Class @@ -957,8 +853,8 @@ class Class(U: type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @CompleteClass(imports.%Main.import_ref.b3bc94.2: type) [from "foo.carbon"] { -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.275)] @@ -982,7 +878,7 @@ class Class(U: type) { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%Main.F [concrete = constants.%F] // CHECK:STDOUT: %.loc9_41: ref %CompleteClass.09c = temporary_storage // CHECK:STDOUT: %F.call: init %CompleteClass.09c to %.loc9_41 = call %F.ref() -// CHECK:STDOUT: %.loc9_3: %CompleteClass.860 = converted %F.call, [concrete = ] +// CHECK:STDOUT: %.loc9_3.1: %CompleteClass.860 = converted %F.call, [concrete = ] // CHECK:STDOUT: assign %v.var, // CHECK:STDOUT: %.loc9_35: type = splice_block %CompleteClass [concrete = constants.%CompleteClass.860] { // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%Main.CompleteClass [concrete = constants.%CompleteClass.generic] @@ -995,8 +891,12 @@ class Class(U: type) { // CHECK:STDOUT: %v.patt: %pattern_type.c65 = ref_binding_pattern v [concrete = constants.%v.patt] // CHECK:STDOUT: %v.var_patt: %pattern_type.c65 = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%CompleteClass.860, (constants.%DestroyImpl.impl_witness.766, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.336] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%CompleteClass.860, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.336] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%CompleteClass.860, (constants.%DestroyImpl.impl_witness.766, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.336] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%CompleteClass.860, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.336] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.336) [concrete = constants.%SelfDestruct.specific_fn.826] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1008,55 +908,36 @@ class Class(U: type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F [from "foo.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %struct_type.n) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc9_3.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc9_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %struct_type.n) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc9, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc9) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %struct_type.n) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %struct_type.n) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %CompleteClass.860) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.3(%self.param: ref %CompleteClass.860) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %CompleteClass.elem.609 = name_ref n, imports.%Main.import_ref.14b [concrete = imports.%field_decl] -// CHECK:STDOUT: %.loc9: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc9, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc9) +// CHECK:STDOUT: %.loc9_3.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc9_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %CompleteClass.860) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %CompleteClass.860) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @CompleteClass(constants.%T) { -// CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @CompleteClass(constants.%T.67d) { +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.275 @@ -1065,10 +946,10 @@ class Class(U: type) { // CHECK:STDOUT: %CompleteClass.F => constants.%CompleteClass.F.bdf // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CompleteClass.F(constants.%T) {} +// CHECK:STDOUT: specific @CompleteClass.F(constants.%T.67d) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%ptr.a17) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T => constants.%ptr.a17 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1079,7 +960,7 @@ class Class(U: type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CompleteClass(constants.%i32) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index 07f0c3ce6d36..ca481ec702f5 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -55,6 +55,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %Class.type: type = parameterized_class_name_type @Class [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete] @@ -69,41 +70,46 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %Copy.type, %type.as.BitAndWith.impl.Op [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@Destroy & @Copy> [concrete] -// CHECK:STDOUT: %pattern_type.709: type = pattern_type %facet_type [concrete] -// CHECK:STDOUT: %T.patt.478: %pattern_type.709 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T.283: %facet_type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.74b: type = facet_access_type %T.283 [symbolic] -// CHECK:STDOUT: %pattern_type.44a: type = pattern_type %T.as_type.74b [symbolic] -// CHECK:STDOUT: %x.param_patt.e3c: %pattern_type.44a = value_param_pattern [symbolic] -// CHECK:STDOUT: %x.patt.ecd: %pattern_type.44a = wrapper_binding_pattern x, %x.param_patt.e3c [symbolic] -// CHECK:STDOUT: %.2b95: Core.Form = init_form %T.as_type.74b [symbolic] -// CHECK:STDOUT: %return.param_patt.7e9: %pattern_type.44a = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.c4f: %pattern_type.44a = return_slot_pattern %return.param_patt.7e9, %T.as_type.74b [symbolic] +// CHECK:STDOUT: %facet_type.bd0: type = facet_type <@Copy & @Destroy> [concrete] +// CHECK:STDOUT: %pattern_type.e81def.1: type = pattern_type %facet_type.bd0 [concrete] +// CHECK:STDOUT: %T.patt.fe60cd.1: %pattern_type.e81def.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.f84392.1: %facet_type.bd0 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.c1cc3e.1: type = facet_access_type %T.f84392.1 [symbolic] +// CHECK:STDOUT: %pattern_type.2c66b4.2: type = pattern_type %T.as_type.c1cc3e.1 [symbolic] +// CHECK:STDOUT: %x.param_patt.1f4: %pattern_type.2c66b4.2 = value_param_pattern [symbolic] +// CHECK:STDOUT: %x.patt.cec: %pattern_type.2c66b4.2 = wrapper_binding_pattern x, %x.param_patt.1f4 [symbolic] +// CHECK:STDOUT: %.1ce700.2: Core.Form = init_form %T.as_type.c1cc3e.1 [symbolic] +// CHECK:STDOUT: %return.param_patt.bf4475.2: %pattern_type.2c66b4.2 = out_param_pattern [symbolic] +// CHECK:STDOUT: %return.patt.f44: %pattern_type.2c66b4.2 = return_slot_pattern %return.param_patt.bf4475.2, %T.as_type.c1cc3e.1 [symbolic] // CHECK:STDOUT: %InitFromStructGeneric.type: type = fn_type @InitFromStructGeneric [concrete] // CHECK:STDOUT: %InitFromStructGeneric: %InitFromStructGeneric.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.44d: = require_complete_type %T.as_type.74b [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.28a: = lookup_impl_witness %T.283, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.16e: %Destroy.type = facet_value %T.as_type.74b, (%Destroy.lookup_impl_witness.28a) [symbolic] -// CHECK:STDOUT: %Class.824: type = class_type @Class, @Class(%Destroy.facet.16e) [symbolic] -// CHECK:STDOUT: %Class.elem.8a5: type = unbound_element_type %Class.824, %T.as_type.74b [symbolic] -// CHECK:STDOUT: %struct_type.k.aa4: type = struct_type {.k: %T.as_type.74b} [symbolic] -// CHECK:STDOUT: %require_complete.51f: = require_complete_type %Class.824 [symbolic] -// CHECK:STDOUT: %pattern_type.d2e: type = pattern_type %Class.824 [symbolic] -// CHECK:STDOUT: %v.patt.07c: %pattern_type.d2e = ref_binding_pattern v [symbolic] -// CHECK:STDOUT: %v.var_patt.b24: %pattern_type.d2e = var_pattern %v.patt.07c [symbolic] -// CHECK:STDOUT: %Copy.lookup_impl_witness.4df: = lookup_impl_witness %T.283, @Copy [symbolic] -// CHECK:STDOUT: %Copy.facet.3f0: %Copy.type = facet_value %T.as_type.74b, (%Copy.lookup_impl_witness.4df) [symbolic] -// CHECK:STDOUT: %Copy.WithSelf.Op.type.9f3: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.3f0) [symbolic] -// CHECK:STDOUT: %.257: type = fn_type_with_self_type %Copy.WithSelf.Op.type.9f3, %Copy.facet.3f0 [symbolic] -// CHECK:STDOUT: %impl.elem0.5dc: %.257 = impl_witness_access %Copy.lookup_impl_witness.4df, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.572: = specific_impl_function %impl.elem0.5dc, @Copy.WithSelf.Op(%Copy.facet.3f0) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.f62: = lookup_impl_witness %Class.824, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.c4f: %Destroy.type = facet_value %Class.824, (%Destroy.lookup_impl_witness.f62) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.3b3: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.c4f) [symbolic] -// CHECK:STDOUT: %.6d4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.3b3, %Destroy.facet.c4f [symbolic] -// CHECK:STDOUT: %impl.elem2: %.6d4 = impl_witness_access %Destroy.lookup_impl_witness.f62, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2e4: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.c4f) [symbolic] +// CHECK:STDOUT: %require_complete.d83f06.1: = require_complete_type %T.as_type.c1cc3e.1 [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.bf2: = lookup_impl_witness %T.f84392.1, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.70f: = lookup_impl_witness %T.f84392.1, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.46f: %Destroy.type = facet_value %T.as_type.c1cc3e.1, (%DestroyImpl.lookup_impl_witness.bf2, %SubobjectDestroy.lookup_impl_witness.70f) [symbolic] +// CHECK:STDOUT: %Class.730: type = class_type @Class, @Class(%Destroy.facet.46f) [symbolic] +// CHECK:STDOUT: %Class.elem.daa: type = unbound_element_type %Class.730, %T.as_type.c1cc3e.1 [symbolic] +// CHECK:STDOUT: %struct_type.k.7a8: type = struct_type {.k: %T.as_type.c1cc3e.1} [symbolic] +// CHECK:STDOUT: %require_complete.69d: = require_complete_type %Class.730 [symbolic] +// CHECK:STDOUT: %pattern_type.3c1: type = pattern_type %Class.730 [symbolic] +// CHECK:STDOUT: %v.patt.1be: %pattern_type.3c1 = ref_binding_pattern v [symbolic] +// CHECK:STDOUT: %v.var_patt.9f4: %pattern_type.3c1 = var_pattern %v.patt.1be [symbolic] +// CHECK:STDOUT: %Copy.lookup_impl_witness.d9c332.2: = lookup_impl_witness %T.f84392.1, @Copy [symbolic] +// CHECK:STDOUT: %Copy.facet.d94: %Copy.type = facet_value %T.as_type.c1cc3e.1, (%Copy.lookup_impl_witness.d9c332.2) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.00c: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.d94) [symbolic] +// CHECK:STDOUT: %.970: type = fn_type_with_self_type %Copy.WithSelf.Op.type.00c, %Copy.facet.d94 [symbolic] +// CHECK:STDOUT: %impl.elem0.bec: %.970 = impl_witness_access %Copy.lookup_impl_witness.d9c332.2, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.32b: = specific_impl_function %impl.elem0.bec, @Copy.WithSelf.Op(%Copy.facet.d94) [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.49c: = lookup_impl_witness %Class.730, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.a32: = lookup_impl_witness %Class.730, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.93c: %SubobjectDestroy.type = facet_value %Class.730, (%SubobjectDestroy.lookup_impl_witness.a32) [symbolic] +// CHECK:STDOUT: %.b58: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.93c) [symbolic] +// CHECK:STDOUT: %Destroy.facet.b18: %Destroy.type = facet_value %Class.730, (%DestroyImpl.lookup_impl_witness.49c, %SubobjectDestroy.lookup_impl_witness.a32) [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = parameterized_class_name_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -117,22 +123,18 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %return.patt.6fa: %pattern_type.d94 = return_slot_pattern %return.param_patt.299, %i32 [concrete] // CHECK:STDOUT: %InitFromStructSpecific.type: type = fn_type @InitFromStructSpecific [concrete] // CHECK:STDOUT: %InitFromStructSpecific: %InitFromStructSpecific.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc15_19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15_19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.ed0: %Destroy.type = facet_value %i32, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %Class.9cf: type = class_type @Class, @Class(%Destroy.facet.ed0) [concrete] -// CHECK:STDOUT: %Class.elem.fab: type = unbound_element_type %Class.9cf, %i32 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_19 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %Class.268: type = class_type @Class, @Class(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %Class.elem.ed9: type = unbound_element_type %Class.268, %i32 [concrete] // CHECK:STDOUT: %struct_type.k.d7d: type = struct_type {.k: %i32} [concrete] -// CHECK:STDOUT: %pattern_type.ff0: type = pattern_type %Class.9cf [concrete] -// CHECK:STDOUT: %v.patt.7b9: %pattern_type.ff0 = ref_binding_pattern v [concrete] -// CHECK:STDOUT: %v.var_patt.812: %pattern_type.ff0 = var_pattern %v.patt.7b9 [concrete] +// CHECK:STDOUT: %pattern_type.461: type = pattern_type %Class.268 [concrete] +// CHECK:STDOUT: %v.patt.daf: %pattern_type.461 = ref_binding_pattern v [concrete] +// CHECK:STDOUT: %v.var_patt.667: %pattern_type.461 = var_pattern %v.patt.daf [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.3c1: %Int.as.Copy.impl.Op.type.a1d = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.8af: = impl_witness imports.%Copy.impl_witness_table.f44, @Int.as.Copy.impl(%int_32) [concrete] @@ -140,23 +142,14 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %Int.as.Copy.impl.Op.cae: %Int.as.Copy.impl.Op.type.648 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.95d: %Copy.type = facet_value %i32, (%Copy.impl_witness.8af) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.95d) [concrete] -// CHECK:STDOUT: %.2b93: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] +// CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.e7d: type = pattern_type %struct_type.k.d7d [concrete] -// CHECK:STDOUT: %self.param_patt.4e0: %pattern_type.e7d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.29c: %pattern_type.e7d = wrapper_binding_pattern self, %self.param_patt.4e0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc15_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.1cb: %pattern_type.ff0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.55a: %pattern_type.ff0 = wrapper_binding_pattern self, %self.param_patt.1cb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc15_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.88a: %SubobjectDestroy.type = facet_value %Class.268, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ad2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.88a) [concrete] +// CHECK:STDOUT: %Destroy.facet.362: %Destroy.type = facet_value %Class.268, (%DestroyImpl.impl_witness.ad2, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -164,6 +157,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -173,69 +167,27 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.a06 = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] // CHECK:STDOUT: %Core.import_ref.9c3: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.9c3), @type.as.BitAndWith.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_19 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc15_19 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e7d = ref_param_pattern [concrete = constants.%self.param_patt.4e0] -// CHECK:STDOUT: %self.patt: %pattern_type.e7d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.29c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.k.d7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.k.d7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc15_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e7d = ref_param_pattern [concrete = constants.%self.param_patt.4e0] -// CHECK:STDOUT: %self.patt: %pattern_type.e7d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.29c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.k.d7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.k.d7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ff0 = ref_param_pattern [concrete = constants.%self.param_patt.1cb] -// CHECK:STDOUT: %self.patt: %pattern_type.ff0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.55a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class.9cf = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class.9cf = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc15_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ff0 = ref_param_pattern [concrete = constants.%self.param_patt.1cb] -// CHECK:STDOUT: %self.patt: %pattern_type.ff0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.55a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class.9cf = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class.9cf = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %InitFromStructGeneric.decl: %InitFromStructGeneric.type = fn_decl @InitFromStructGeneric [concrete = constants.%InitFromStructGeneric] { -// CHECK:STDOUT: %T.patt.loc9_35.1: %pattern_type.709 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_35.2 (constants.%T.patt.478)] -// CHECK:STDOUT: %x.param_patt.loc9_64.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = value_param_pattern [symbolic = %x.param_patt.loc9_64.2 (constants.%x.param_patt.e3c)] -// CHECK:STDOUT: %x.patt.loc9_64.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = wrapper_binding_pattern x, %x.param_patt.loc9_64.1 [symbolic = %x.patt.loc9_64.2 (constants.%x.patt.ecd)] -// CHECK:STDOUT: %return.param_patt.loc9_72.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = out_param_pattern [symbolic = %return.param_patt.loc9_72.2 (constants.%return.param_patt.7e9)] -// CHECK:STDOUT: %return.patt.loc9_69.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = return_slot_pattern %return.param_patt.loc9_72.1, %.loc9_72.3 [symbolic = %return.patt.loc9_69.2 (constants.%return.patt.c4f)] +// CHECK:STDOUT: %T.patt.loc9_35.1: %pattern_type.e81def.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_35.2 (constants.%T.patt.fe60cd.1)] +// CHECK:STDOUT: %x.param_patt.loc9_64.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc9_64.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc9_64.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.2c66b4.2) = wrapper_binding_pattern x, %x.param_patt.loc9_64.1 [symbolic = %x.patt.loc9_64.2 (constants.%x.patt.cec)] +// CHECK:STDOUT: %return.param_patt.loc9_72.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc9_72.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc9_69.1: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc9_72.1, %.loc9_72.3 [symbolic = %return.patt.loc9_69.2 (constants.%return.patt.f44)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc9_72: %facet_type = name_ref T, %T.loc9_35.2 [symbolic = %T.loc9_35.1 (constants.%T.283)] -// CHECK:STDOUT: %T.as_type.loc9_72: type = facet_access_type %T.ref.loc9_72 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] -// CHECK:STDOUT: %.loc9_72.3: type = converted %T.ref.loc9_72, %T.as_type.loc9_72 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] -// CHECK:STDOUT: %.loc9_72.4: Core.Form = init_form %.loc9_72.3 [symbolic = %.loc9_72.2 (constants.%.2b95)] -// CHECK:STDOUT: %.loc9_47.1: type = splice_block %.loc9_47.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %T.ref.loc9_72: %facet_type.bd0 = name_ref T, %T.loc9_35.2 [symbolic = %T.loc9_35.1 (constants.%T.f84392.1)] +// CHECK:STDOUT: %T.as_type.loc9_72: type = facet_access_type %T.ref.loc9_72 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.c1cc3e.1)] +// CHECK:STDOUT: %.loc9_72.3: type = converted %T.ref.loc9_72, %T.as_type.loc9_72 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.c1cc3e.1)] +// CHECK:STDOUT: %.loc9_72.4: Core.Form = init_form %.loc9_72.3 [symbolic = %.loc9_72.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %.loc9_47.1: type = splice_block %.loc9_47.3 [concrete = constants.%facet_type.bd0] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref.loc9_37: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] @@ -243,20 +195,20 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %Destroy.ref: type = name_ref Destroy, imports.%Core.Destroy [concrete = constants.%Destroy.type] // CHECK:STDOUT: %impl.elem0.loc9: %.b4e = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc9: = bound_method %Copy.ref, %impl.elem0.loc9 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc9(%Copy.ref, %Destroy.ref) [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc9_47.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc9_47.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc9_47.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc9(%Copy.ref, %Destroy.ref) [concrete = constants.%facet_type.bd0] +// CHECK:STDOUT: %.loc9_47.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.bd0] +// CHECK:STDOUT: %.loc9_47.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc9_47.2 [concrete = constants.%facet_type.bd0] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc9_35.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc9_35.1 (constants.%T.283)] -// CHECK:STDOUT: %x.param: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = value_param call_param0 -// CHECK:STDOUT: %.loc9_66.1: type = splice_block %.loc9_66.2 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] { -// CHECK:STDOUT: %T.ref.loc9_66: %facet_type = name_ref T, %T.loc9_35.2 [symbolic = %T.loc9_35.1 (constants.%T.283)] -// CHECK:STDOUT: %T.as_type.loc9_66.2: type = facet_access_type %T.ref.loc9_66 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] -// CHECK:STDOUT: %.loc9_66.2: type = converted %T.ref.loc9_66, %T.as_type.loc9_66.2 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] +// CHECK:STDOUT: %T.loc9_35.2: %facet_type.bd0 = symbolic_binding T, 0 [symbolic = %T.loc9_35.1 (constants.%T.f84392.1)] +// CHECK:STDOUT: %x.param: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) = value_param call_param0 +// CHECK:STDOUT: %.loc9_66.1: type = splice_block %.loc9_66.2 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.c1cc3e.1)] { +// CHECK:STDOUT: %T.ref.loc9_66: %facet_type.bd0 = name_ref T, %T.loc9_35.2 [symbolic = %T.loc9_35.1 (constants.%T.f84392.1)] +// CHECK:STDOUT: %T.as_type.loc9_66.2: type = facet_access_type %T.ref.loc9_66 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.c1cc3e.1)] +// CHECK:STDOUT: %.loc9_66.2: type = converted %T.ref.loc9_66, %T.as_type.loc9_66.2 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.c1cc3e.1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = wrapper_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = out_param call_param1 -// CHECK:STDOUT: %return: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = return_slot %return.param +// CHECK:STDOUT: %x: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) = wrapper_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) = out_param call_param1 +// CHECK:STDOUT: %return: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %InitFromStructSpecific.decl: %InitFromStructSpecific.type = fn_decl @InitFromStructSpecific [concrete = constants.%InitFromStructSpecific] { // CHECK:STDOUT: %x.param_patt: %pattern_type.d94 = value_param_pattern [concrete = constants.%x.param_patt.051] @@ -274,197 +226,180 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @InitFromStructGeneric(%T.loc9_35.2: %facet_type) { -// CHECK:STDOUT: %T.patt.loc9_35.2: %pattern_type.709 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_35.2 (constants.%T.patt.478)] -// CHECK:STDOUT: %T.loc9_35.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc9_35.1 (constants.%T.283)] -// CHECK:STDOUT: %T.as_type.loc9_66.1: type = facet_access_type %T.loc9_35.1 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] -// CHECK:STDOUT: %pattern_type.loc9: type = pattern_type %T.as_type.loc9_66.1 [symbolic = %pattern_type.loc9 (constants.%pattern_type.44a)] -// CHECK:STDOUT: %x.param_patt.loc9_64.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = value_param_pattern [symbolic = %x.param_patt.loc9_64.2 (constants.%x.param_patt.e3c)] -// CHECK:STDOUT: %x.patt.loc9_64.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = wrapper_binding_pattern x, %x.param_patt.loc9_64.2 [symbolic = %x.patt.loc9_64.2 (constants.%x.patt.ecd)] -// CHECK:STDOUT: %.loc9_72.2: Core.Form = init_form %T.as_type.loc9_66.1 [symbolic = %.loc9_72.2 (constants.%.2b95)] -// CHECK:STDOUT: %return.param_patt.loc9_72.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = out_param_pattern [symbolic = %return.param_patt.loc9_72.2 (constants.%return.param_patt.7e9)] -// CHECK:STDOUT: %return.patt.loc9_69.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.44a) = return_slot_pattern %return.param_patt.loc9_72.2, %T.as_type.loc9_66.1 [symbolic = %return.patt.loc9_69.2 (constants.%return.patt.c4f)] +// CHECK:STDOUT: generic fn @InitFromStructGeneric(%T.loc9_35.2: %facet_type.bd0) { +// CHECK:STDOUT: %T.patt.loc9_35.2: %pattern_type.e81def.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_35.2 (constants.%T.patt.fe60cd.1)] +// CHECK:STDOUT: %T.loc9_35.1: %facet_type.bd0 = symbolic_binding T, 0 [symbolic = %T.loc9_35.1 (constants.%T.f84392.1)] +// CHECK:STDOUT: %T.as_type.loc9_66.1: type = facet_access_type %T.loc9_35.1 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.c1cc3e.1)] +// CHECK:STDOUT: %pattern_type.loc9: type = pattern_type %T.as_type.loc9_66.1 [symbolic = %pattern_type.loc9 (constants.%pattern_type.2c66b4.2)] +// CHECK:STDOUT: %x.param_patt.loc9_64.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %x.param_patt.loc9_64.2 (constants.%x.param_patt.1f4)] +// CHECK:STDOUT: %x.patt.loc9_64.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.2c66b4.2) = wrapper_binding_pattern x, %x.param_patt.loc9_64.2 [symbolic = %x.patt.loc9_64.2 (constants.%x.patt.cec)] +// CHECK:STDOUT: %.loc9_72.2: Core.Form = init_form %T.as_type.loc9_66.1 [symbolic = %.loc9_72.2 (constants.%.1ce700.2)] +// CHECK:STDOUT: %return.param_patt.loc9_72.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.2c66b4.2) = out_param_pattern [symbolic = %return.param_patt.loc9_72.2 (constants.%return.param_patt.bf4475.2)] +// CHECK:STDOUT: %return.patt.loc9_69.2: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.2c66b4.2) = return_slot_pattern %return.param_patt.loc9_72.2, %T.as_type.loc9_66.1 [symbolic = %return.patt.loc9_69.2 (constants.%return.patt.f44)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc9: = require_complete_type %T.as_type.loc9_66.1 [symbolic = %require_complete.loc9 (constants.%require_complete.44d)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.loc10_17: = lookup_impl_witness %T.loc9_35.1, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc10_17 (constants.%Destroy.lookup_impl_witness.28a)] -// CHECK:STDOUT: %Destroy.facet.loc10_17.2: %Destroy.type = facet_value %T.as_type.loc9_66.1, (%Destroy.lookup_impl_witness.loc10_17) [symbolic = %Destroy.facet.loc10_17.2 (constants.%Destroy.facet.16e)] -// CHECK:STDOUT: %Class.loc10_17.2: type = class_type @Class, @Class(%Destroy.facet.loc10_17.2) [symbolic = %Class.loc10_17.2 (constants.%Class.824)] -// CHECK:STDOUT: %require_complete.loc10: = require_complete_type %Class.loc10_17.2 [symbolic = %require_complete.loc10 (constants.%require_complete.51f)] -// CHECK:STDOUT: %pattern_type.loc10: type = pattern_type %Class.loc10_17.2 [symbolic = %pattern_type.loc10 (constants.%pattern_type.d2e)] -// CHECK:STDOUT: %v.patt.loc10_8.2: @InitFromStructGeneric.%pattern_type.loc10 (%pattern_type.d2e) = ref_binding_pattern v [symbolic = %v.patt.loc10_8.2 (constants.%v.patt.07c)] -// CHECK:STDOUT: %v.var_patt.loc10_3.2: @InitFromStructGeneric.%pattern_type.loc10 (%pattern_type.d2e) = var_pattern %v.patt.loc10_8.2 [symbolic = %v.var_patt.loc10_3.2 (constants.%v.var_patt.b24)] -// CHECK:STDOUT: %struct_type.k: type = struct_type {.k: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b)} [symbolic = %struct_type.k (constants.%struct_type.k.aa4)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc9_35.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.4df)] -// CHECK:STDOUT: %Copy.facet.loc10_27.3: %Copy.type = facet_value %T.as_type.loc9_66.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] -// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc10_27.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.9f3)] -// CHECK:STDOUT: %.loc10_27.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc10_27.3 [symbolic = %.loc10_27.3 (constants.%.257)] -// CHECK:STDOUT: %impl.elem0.loc10_27.2: @InitFromStructGeneric.%.loc10_27.3 (%.257) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.5dc)] -// CHECK:STDOUT: %specific_impl_fn.loc10_27.2: = specific_impl_function %impl.elem0.loc10_27.2, @Copy.WithSelf.Op(%Copy.facet.loc10_27.3) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.572)] -// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc10_17.2, %T.as_type.loc9_66.1 [symbolic = %Class.elem (constants.%Class.elem.8a5)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.loc10_3: = lookup_impl_witness %Class.loc10_17.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc10_3 (constants.%Destroy.lookup_impl_witness.f62)] -// CHECK:STDOUT: %Destroy.facet.loc10_3.3: %Destroy.type = facet_value %Class.loc10_17.2, (%Destroy.lookup_impl_witness.loc10_3) [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.c4f)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc10_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.3b3)] -// CHECK:STDOUT: %.loc10_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc10_3.3 [symbolic = %.loc10_3.4 (constants.%.6d4)] -// CHECK:STDOUT: %impl.elem2.loc10_3.2: @InitFromStructGeneric.%.loc10_3.4 (%.6d4) = impl_witness_access %Destroy.lookup_impl_witness.loc10_3, element2 [symbolic = %impl.elem2.loc10_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc10_3.2: = specific_impl_function %impl.elem2.loc10_3.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc10_3.3) [symbolic = %specific_impl_fn.loc10_3.2 (constants.%specific_impl_fn.2e4)] +// CHECK:STDOUT: %require_complete.loc9: = require_complete_type %T.as_type.loc9_66.1 [symbolic = %require_complete.loc9 (constants.%require_complete.d83f06.1)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.loc10_17: = lookup_impl_witness %T.loc9_35.1, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness.loc10_17 (constants.%DestroyImpl.lookup_impl_witness.bf2)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.loc10_17: = lookup_impl_witness %T.loc9_35.1, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness.loc10_17 (constants.%SubobjectDestroy.lookup_impl_witness.70f)] +// CHECK:STDOUT: %Destroy.facet.loc10_17.2: %Destroy.type = facet_value %T.as_type.loc9_66.1, (%DestroyImpl.lookup_impl_witness.loc10_17, %SubobjectDestroy.lookup_impl_witness.loc10_17) [symbolic = %Destroy.facet.loc10_17.2 (constants.%Destroy.facet.46f)] +// CHECK:STDOUT: %Class.loc10_17.2: type = class_type @Class, @Class(%Destroy.facet.loc10_17.2) [symbolic = %Class.loc10_17.2 (constants.%Class.730)] +// CHECK:STDOUT: %require_complete.loc10: = require_complete_type %Class.loc10_17.2 [symbolic = %require_complete.loc10 (constants.%require_complete.69d)] +// CHECK:STDOUT: %pattern_type.loc10: type = pattern_type %Class.loc10_17.2 [symbolic = %pattern_type.loc10 (constants.%pattern_type.3c1)] +// CHECK:STDOUT: %v.patt.loc10_8.2: @InitFromStructGeneric.%pattern_type.loc10 (%pattern_type.3c1) = ref_binding_pattern v [symbolic = %v.patt.loc10_8.2 (constants.%v.patt.1be)] +// CHECK:STDOUT: %v.var_patt.loc10_3.2: @InitFromStructGeneric.%pattern_type.loc10 (%pattern_type.3c1) = var_pattern %v.patt.loc10_8.2 [symbolic = %v.var_patt.loc10_3.2 (constants.%v.var_patt.9f4)] +// CHECK:STDOUT: %struct_type.k: type = struct_type {.k: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1)} [symbolic = %struct_type.k (constants.%struct_type.k.7a8)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc9_35.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c332.2)] +// CHECK:STDOUT: %Copy.facet.loc10_27.3: %Copy.type = facet_value %T.as_type.loc9_66.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.loc10_27.3) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.00c)] +// CHECK:STDOUT: %.loc10_27.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet.loc10_27.3 [symbolic = %.loc10_27.3 (constants.%.970)] +// CHECK:STDOUT: %impl.elem0.loc10_27.2: @InitFromStructGeneric.%.loc10_27.3 (%.970) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.bec)] +// CHECK:STDOUT: %specific_impl_fn.loc10_27.2: = specific_impl_function %impl.elem0.loc10_27.2, @Copy.WithSelf.Op(%Copy.facet.loc10_27.3) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.32b)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc10_17.2, %T.as_type.loc9_66.1 [symbolic = %Class.elem (constants.%Class.elem.daa)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.loc10_3: = lookup_impl_witness %Class.loc10_17.2, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness.loc10_3 (constants.%SubobjectDestroy.lookup_impl_witness.a32)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %Class.loc10_17.2, (%SubobjectDestroy.lookup_impl_witness.loc10_3) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.93c)] +// CHECK:STDOUT: %.loc10_3.4: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc10_3.4 (constants.%.b58)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.loc10_3: = lookup_impl_witness %Class.loc10_17.2, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness.loc10_3 (constants.%DestroyImpl.lookup_impl_witness.49c)] +// CHECK:STDOUT: %Destroy.facet.loc10_3.3: %Destroy.type = facet_value %Class.loc10_17.2, (%DestroyImpl.lookup_impl_witness.loc10_3, %SubobjectDestroy.lookup_impl_witness.loc10_3) [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.b18)] +// CHECK:STDOUT: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b)) -> out %return.param: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) { +// CHECK:STDOUT: fn(%x.param: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1)) -> out %return.param: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.loc10_17.2 (%Class.824) = var_storage %v.var_patt.loc10_3.1 -// CHECK:STDOUT: %x.ref: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = name_ref x, %x -// CHECK:STDOUT: %.loc10_28.1: @InitFromStructGeneric.%struct_type.k (%struct_type.k.aa4) = struct_literal (%x.ref) -// CHECK:STDOUT: %impl.elem0.loc10_27.1: @InitFromStructGeneric.%.loc10_27.3 (%.257) = impl_witness_access constants.%Copy.lookup_impl_witness.4df, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.5dc)] +// CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.loc10_17.2 (%Class.730) = var_storage %v.var_patt.loc10_3.1 +// CHECK:STDOUT: %x.ref: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) = name_ref x, %x +// CHECK:STDOUT: %.loc10_28.1: @InitFromStructGeneric.%struct_type.k (%struct_type.k.7a8) = struct_literal (%x.ref) +// CHECK:STDOUT: %impl.elem0.loc10_27.1: @InitFromStructGeneric.%.loc10_27.3 (%.970) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.2, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.bec)] // CHECK:STDOUT: %bound_method.loc10_27.1: = bound_method %x.ref, %impl.elem0.loc10_27.1 -// CHECK:STDOUT: %Copy.facet.loc10_27.1: %Copy.type = facet_value constants.%T.as_type.74b, (constants.%Copy.lookup_impl_witness.4df) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] -// CHECK:STDOUT: %.loc10_27.1: %Copy.type = converted constants.%T.as_type.74b, %Copy.facet.loc10_27.1 [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] -// CHECK:STDOUT: %Copy.facet.loc10_27.2: %Copy.type = facet_value constants.%T.as_type.74b, (constants.%Copy.lookup_impl_witness.4df) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] -// CHECK:STDOUT: %.loc10_27.2: %Copy.type = converted constants.%T.as_type.74b, %Copy.facet.loc10_27.2 [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] -// CHECK:STDOUT: %specific_impl_fn.loc10_27.1: = specific_impl_function %impl.elem0.loc10_27.1, @Copy.WithSelf.Op(constants.%Copy.facet.3f0) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.572)] +// CHECK:STDOUT: %Copy.facet.loc10_27.1: %Copy.type = facet_value constants.%T.as_type.c1cc3e.1, (constants.%Copy.lookup_impl_witness.d9c332.2) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %.loc10_27.1: %Copy.type = converted constants.%T.as_type.c1cc3e.1, %Copy.facet.loc10_27.1 [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %Copy.facet.loc10_27.2: %Copy.type = facet_value constants.%T.as_type.c1cc3e.1, (constants.%Copy.lookup_impl_witness.d9c332.2) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %.loc10_27.2: %Copy.type = converted constants.%T.as_type.c1cc3e.1, %Copy.facet.loc10_27.2 [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %specific_impl_fn.loc10_27.1: = specific_impl_function %impl.elem0.loc10_27.1, @Copy.WithSelf.Op(constants.%Copy.facet.d94) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.32b)] // CHECK:STDOUT: %bound_method.loc10_27.2: = bound_method %x.ref, %specific_impl_fn.loc10_27.1 -// CHECK:STDOUT: %.loc10_28.2: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = class_element_access %v.var, element0 -// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc10: init @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) to %.loc10_28.2 = call %bound_method.loc10_27.2(%x.ref) -// CHECK:STDOUT: %.loc10_28.3: init @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) to %.loc10_28.2 = in_place_init %Copy.WithSelf.Op.call.loc10 -// CHECK:STDOUT: %.loc10_28.4: init @InitFromStructGeneric.%Class.loc10_17.2 (%Class.824) to %v.var = class_init (%.loc10_28.3) -// CHECK:STDOUT: %.loc10_3.1: init @InitFromStructGeneric.%Class.loc10_17.2 (%Class.824) = converted %.loc10_28.1, %.loc10_28.4 +// CHECK:STDOUT: %.loc10_28.2: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) = class_element_access %v.var, element0 +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc10: init @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) to %.loc10_28.2 = call %bound_method.loc10_27.2(%x.ref) +// CHECK:STDOUT: %.loc10_28.3: init @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) to %.loc10_28.2 = in_place_init %Copy.WithSelf.Op.call.loc10 +// CHECK:STDOUT: %.loc10_28.4: init @InitFromStructGeneric.%Class.loc10_17.2 (%Class.730) to %v.var = class_init (%.loc10_28.3) +// CHECK:STDOUT: %.loc10_3.1: init @InitFromStructGeneric.%Class.loc10_17.2 (%Class.730) = converted %.loc10_28.1, %.loc10_28.4 // CHECK:STDOUT: assign %v.var, %.loc10_3.1 -// CHECK:STDOUT: %.loc10_17.1: type = splice_block %Class.loc10_17.1 [symbolic = %Class.loc10_17.2 (constants.%Class.824)] { +// CHECK:STDOUT: %.loc10_17.1: type = splice_block %Class.loc10_17.1 [symbolic = %Class.loc10_17.2 (constants.%Class.730)] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %T.ref.loc10: %facet_type = name_ref T, %T.loc9_35.2 [symbolic = %T.loc9_35.1 (constants.%T.283)] -// CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type %T.ref.loc10 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.74b)] -// CHECK:STDOUT: %Destroy.facet.loc10_17.1: %Destroy.type = facet_value %T.as_type.loc10, (constants.%Destroy.lookup_impl_witness.28a) [symbolic = %Destroy.facet.loc10_17.2 (constants.%Destroy.facet.16e)] -// CHECK:STDOUT: %.loc10_17.2: %Destroy.type = converted %T.ref.loc10, %Destroy.facet.loc10_17.1 [symbolic = %Destroy.facet.loc10_17.2 (constants.%Destroy.facet.16e)] -// CHECK:STDOUT: %Class.loc10_17.1: type = class_type @Class, @Class(constants.%Destroy.facet.16e) [symbolic = %Class.loc10_17.2 (constants.%Class.824)] +// CHECK:STDOUT: %T.ref.loc10: %facet_type.bd0 = name_ref T, %T.loc9_35.2 [symbolic = %T.loc9_35.1 (constants.%T.f84392.1)] +// CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type %T.ref.loc10 [symbolic = %T.as_type.loc9_66.1 (constants.%T.as_type.c1cc3e.1)] +// CHECK:STDOUT: %Destroy.facet.loc10_17.1: %Destroy.type = facet_value %T.as_type.loc10, (constants.%DestroyImpl.lookup_impl_witness.bf2, constants.%SubobjectDestroy.lookup_impl_witness.70f) [symbolic = %Destroy.facet.loc10_17.2 (constants.%Destroy.facet.46f)] +// CHECK:STDOUT: %.loc10_17.2: %Destroy.type = converted %T.ref.loc10, %Destroy.facet.loc10_17.1 [symbolic = %Destroy.facet.loc10_17.2 (constants.%Destroy.facet.46f)] +// CHECK:STDOUT: %Class.loc10_17.1: type = class_type @Class, @Class(constants.%Destroy.facet.46f) [symbolic = %Class.loc10_17.2 (constants.%Class.730)] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: ref @InitFromStructGeneric.%Class.loc10_17.2 (%Class.824) = wrapper_binding v, %v.var +// CHECK:STDOUT: %v: ref @InitFromStructGeneric.%Class.loc10_17.2 (%Class.730) = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %v.patt.loc10_8.1: @InitFromStructGeneric.%pattern_type.loc10 (%pattern_type.d2e) = ref_binding_pattern v [symbolic = %v.patt.loc10_8.2 (constants.%v.patt.07c)] -// CHECK:STDOUT: %v.var_patt.loc10_3.1: @InitFromStructGeneric.%pattern_type.loc10 (%pattern_type.d2e) = var_pattern %v.patt.loc10_8.1 [symbolic = %v.var_patt.loc10_3.2 (constants.%v.var_patt.b24)] +// CHECK:STDOUT: %v.patt.loc10_8.1: @InitFromStructGeneric.%pattern_type.loc10 (%pattern_type.3c1) = ref_binding_pattern v [symbolic = %v.patt.loc10_8.2 (constants.%v.patt.1be)] +// CHECK:STDOUT: %v.var_patt.loc10_3.1: @InitFromStructGeneric.%pattern_type.loc10 (%pattern_type.3c1) = var_pattern %v.patt.loc10_8.1 [symbolic = %v.var_patt.loc10_3.2 (constants.%v.var_patt.9f4)] // CHECK:STDOUT: } -// CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class.loc10_17.2 (%Class.824) = name_ref v, %v -// CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%Class.elem (%Class.elem.8a5) = name_ref k, @Class.%field_decl [concrete = @Class.%field_decl] -// CHECK:STDOUT: %.loc11_11.1: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = class_element_access %v.ref, element0 -// CHECK:STDOUT: %.loc11_11.2: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = acquire_value %.loc11_11.1 -// CHECK:STDOUT: %impl.elem0.loc11: @InitFromStructGeneric.%.loc10_27.3 (%.257) = impl_witness_access constants.%Copy.lookup_impl_witness.4df, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.5dc)] +// CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class.loc10_17.2 (%Class.730) = name_ref v, %v +// CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%Class.elem (%Class.elem.daa) = name_ref k, @Class.%field_decl [concrete = @Class.%field_decl] +// CHECK:STDOUT: %.loc11_11.1: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) = class_element_access %v.ref, element0 +// CHECK:STDOUT: %.loc11_11.2: @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) = acquire_value %.loc11_11.1 +// CHECK:STDOUT: %impl.elem0.loc11: @InitFromStructGeneric.%.loc10_27.3 (%.970) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c332.2, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.bec)] // CHECK:STDOUT: %bound_method.loc11_11.1: = bound_method %.loc11_11.2, %impl.elem0.loc11 -// CHECK:STDOUT: %Copy.facet.loc11_11.1: %Copy.type = facet_value constants.%T.as_type.74b, (constants.%Copy.lookup_impl_witness.4df) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] -// CHECK:STDOUT: %.loc11_11.3: %Copy.type = converted constants.%T.as_type.74b, %Copy.facet.loc11_11.1 [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] -// CHECK:STDOUT: %Copy.facet.loc11_11.2: %Copy.type = facet_value constants.%T.as_type.74b, (constants.%Copy.lookup_impl_witness.4df) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] -// CHECK:STDOUT: %.loc11_11.4: %Copy.type = converted constants.%T.as_type.74b, %Copy.facet.loc11_11.2 [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.3f0)] -// CHECK:STDOUT: %specific_impl_fn.loc11: = specific_impl_function %impl.elem0.loc11, @Copy.WithSelf.Op(constants.%Copy.facet.3f0) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.572)] +// CHECK:STDOUT: %Copy.facet.loc11_11.1: %Copy.type = facet_value constants.%T.as_type.c1cc3e.1, (constants.%Copy.lookup_impl_witness.d9c332.2) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %.loc11_11.3: %Copy.type = converted constants.%T.as_type.c1cc3e.1, %Copy.facet.loc11_11.1 [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %Copy.facet.loc11_11.2: %Copy.type = facet_value constants.%T.as_type.c1cc3e.1, (constants.%Copy.lookup_impl_witness.d9c332.2) [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %.loc11_11.4: %Copy.type = converted constants.%T.as_type.c1cc3e.1, %Copy.facet.loc11_11.2 [symbolic = %Copy.facet.loc10_27.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %specific_impl_fn.loc11: = specific_impl_function %impl.elem0.loc11, @Copy.WithSelf.Op(constants.%Copy.facet.d94) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.32b)] // CHECK:STDOUT: %bound_method.loc11_11.2: = bound_method %.loc11_11.2, %specific_impl_fn.loc11 -// CHECK:STDOUT: %.loc9_72.1: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc11: init @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.74b) to %.loc9_72.1 = call %bound_method.loc11_11.2(%.loc11_11.2) -// CHECK:STDOUT: %impl.elem2.loc10_3.1: @InitFromStructGeneric.%.loc10_3.4 (%.6d4) = impl_witness_access constants.%Destroy.lookup_impl_witness.f62, element2 [symbolic = %impl.elem2.loc10_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc10_3.1: = bound_method %v.var, %impl.elem2.loc10_3.1 -// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%Class.824, (constants.%Destroy.lookup_impl_witness.f62) [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.c4f)] -// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%Class.824, %Destroy.facet.loc10_3.1 [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.c4f)] -// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%Class.824, (constants.%Destroy.lookup_impl_witness.f62) [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.c4f)] -// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%Class.824, %Destroy.facet.loc10_3.2 [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.c4f)] -// CHECK:STDOUT: %specific_impl_fn.loc10_3.1: = specific_impl_function %impl.elem2.loc10_3.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.c4f) [symbolic = %specific_impl_fn.loc10_3.2 (constants.%specific_impl_fn.2e4)] -// CHECK:STDOUT: %bound_method.loc10_3.2: = bound_method %v.var, %specific_impl_fn.loc10_3.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc10_3.2(%v.var) +// CHECK:STDOUT: %.loc9_72.1: ref @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) = splice_block %return.param {} +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc11: init @InitFromStructGeneric.%T.as_type.loc9_66.1 (%T.as_type.c1cc3e.1) to %.loc9_72.1 = call %bound_method.loc11_11.2(%.loc11_11.2) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%Class.730, (constants.%DestroyImpl.lookup_impl_witness.49c, constants.%SubobjectDestroy.lookup_impl_witness.a32) [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.b18)] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%Class.730, %Destroy.facet.loc10_3.1 [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.b18)] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%Class.730, (constants.%DestroyImpl.lookup_impl_witness.49c, constants.%SubobjectDestroy.lookup_impl_witness.a32) [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.b18)] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%Class.730, %Destroy.facet.loc10_3.2 [symbolic = %Destroy.facet.loc10_3.3 (constants.%Destroy.facet.b18)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%v.var) // CHECK:STDOUT: return %Copy.WithSelf.Op.call.loc11 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @InitFromStructSpecific(%x.param: %i32) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.var: ref %Class.9cf = var_storage %v.var_patt +// CHECK:STDOUT: %v.var: ref %Class.268 = var_storage %v.var_patt // CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x // CHECK:STDOUT: %.loc15_30.1: %struct_type.k.d7d = struct_literal (%x.ref) -// CHECK:STDOUT: %impl.elem0.loc15: %.2b93 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] +// CHECK:STDOUT: %impl.elem0.loc15: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] // CHECK:STDOUT: %bound_method.loc15_29.1: = bound_method %x.ref, %impl.elem0.loc15 // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_29.2: = bound_method %x.ref, %specific_fn.loc15 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc15: init %i32 = call %bound_method.loc15_29.2(%x.ref) // CHECK:STDOUT: %.loc15_30.2: ref %i32 = class_element_access %v.var, element0 // CHECK:STDOUT: %.loc15_30.3: init %i32 to %.loc15_30.2 = in_place_init %Int.as.Copy.impl.Op.call.loc15 -// CHECK:STDOUT: %.loc15_30.4: init %Class.9cf to %v.var = class_init (%.loc15_30.3) -// CHECK:STDOUT: %.loc15_3: init %Class.9cf = converted %.loc15_30.1, %.loc15_30.4 -// CHECK:STDOUT: assign %v.var, %.loc15_3 -// CHECK:STDOUT: %.loc15_19.1: type = splice_block %Class [concrete = constants.%Class.9cf] { +// CHECK:STDOUT: %.loc15_30.4: init %Class.268 to %v.var = class_init (%.loc15_30.3) +// CHECK:STDOUT: %.loc15_3.1: init %Class.268 = converted %.loc15_30.1, %.loc15_30.4 +// CHECK:STDOUT: assign %v.var, %.loc15_3.1 +// CHECK:STDOUT: %.loc15_19.1: type = splice_block %Class [concrete = constants.%Class.268] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] // CHECK:STDOUT: %i32.loc15: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32.loc15, (constants.%custom_witness.f8f19d.1) [concrete = constants.%Destroy.facet.ed0] -// CHECK:STDOUT: %.loc15_19.2: %Destroy.type = converted %i32.loc15, %Destroy.facet [concrete = constants.%Destroy.facet.ed0] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%Destroy.facet.ed0) [concrete = constants.%Class.9cf] +// CHECK:STDOUT: %Destroy.facet.loc15_19: %Destroy.type = facet_value %i32.loc15, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_19.2: %Destroy.type = converted %i32.loc15, %Destroy.facet.loc15_19 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%Destroy.facet.c2b) [concrete = constants.%Class.268] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: ref %Class.9cf = wrapper_binding v, %v.var +// CHECK:STDOUT: %v: ref %Class.268 = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %v.patt: %pattern_type.ff0 = ref_binding_pattern v [concrete = constants.%v.patt.7b9] -// CHECK:STDOUT: %v.var_patt: %pattern_type.ff0 = var_pattern %v.patt [concrete = constants.%v.var_patt.812] +// CHECK:STDOUT: %v.patt: %pattern_type.461 = ref_binding_pattern v [concrete = constants.%v.patt.daf] +// CHECK:STDOUT: %v.var_patt: %pattern_type.461 = var_pattern %v.patt [concrete = constants.%v.var_patt.667] // CHECK:STDOUT: } -// CHECK:STDOUT: %v.ref: ref %Class.9cf = name_ref v, %v -// CHECK:STDOUT: %k.ref: %Class.elem.fab = name_ref k, @Class.%field_decl [concrete = @Class.%field_decl] +// CHECK:STDOUT: %v.ref: ref %Class.268 = name_ref v, %v +// CHECK:STDOUT: %k.ref: %Class.elem.ed9 = name_ref k, @Class.%field_decl [concrete = @Class.%field_decl] // CHECK:STDOUT: %.loc16_11.1: ref %i32 = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc16_11.2: %i32 = acquire_value %.loc16_11.1 -// CHECK:STDOUT: %impl.elem0.loc16: %.2b93 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] +// CHECK:STDOUT: %impl.elem0.loc16: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] // CHECK:STDOUT: %bound_method.loc16_11.1: = bound_method %.loc16_11.2, %impl.elem0.loc16 // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_11.2: = bound_method %.loc16_11.2, %specific_fn.loc16 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc16: init %i32 = call %bound_method.loc16_11.2(%.loc16_11.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%Class.268, (constants.%DestroyImpl.impl_witness.ad2, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.362] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%Class.268, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.362] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%Class.268, (constants.%DestroyImpl.impl_witness.ad2, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.362] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%Class.268, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.362] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_19(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_19(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_19(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_19(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.1(%self.param: ref %struct_type.k.d7d) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc15_3.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.1(%self.param: ref %struct_type.k.d7d) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.2(%self.param: ref %Class.268) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc15, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc15) +// CHECK:STDOUT: %k.ref: %Class.elem.ed9 = name_ref k, @Class.%field_decl [concrete = @Class.%field_decl] +// CHECK:STDOUT: %.loc15_3.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.1(%self.param: ref %struct_type.k.d7d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.1(%self.param: ref %struct_type.k.d7d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.2(%self.param: ref %Class.9cf) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %k.ref: %Class.elem.fab = name_ref k, @Class.%field_decl [concrete = @Class.%field_decl] -// CHECK:STDOUT: %.loc15: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc15, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc15) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.2(%self.param: ref %Class.9cf) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.2(%self.param: ref %Class.9cf) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @InitFromStructGeneric(constants.%T.283) { -// CHECK:STDOUT: %T.patt.loc9_35.2 => constants.%T.patt.478 -// CHECK:STDOUT: %T.loc9_35.1 => constants.%T.283 -// CHECK:STDOUT: %T.as_type.loc9_66.1 => constants.%T.as_type.74b -// CHECK:STDOUT: %pattern_type.loc9 => constants.%pattern_type.44a -// CHECK:STDOUT: %x.param_patt.loc9_64.2 => constants.%x.param_patt.e3c -// CHECK:STDOUT: %x.patt.loc9_64.2 => constants.%x.patt.ecd -// CHECK:STDOUT: %.loc9_72.2 => constants.%.2b95 -// CHECK:STDOUT: %return.param_patt.loc9_72.2 => constants.%return.param_patt.7e9 -// CHECK:STDOUT: %return.patt.loc9_69.2 => constants.%return.patt.c4f +// CHECK:STDOUT: specific @InitFromStructGeneric(constants.%T.f84392.1) { +// CHECK:STDOUT: %T.patt.loc9_35.2 => constants.%T.patt.fe60cd.1 +// CHECK:STDOUT: %T.loc9_35.1 => constants.%T.f84392.1 +// CHECK:STDOUT: %T.as_type.loc9_66.1 => constants.%T.as_type.c1cc3e.1 +// CHECK:STDOUT: %pattern_type.loc9 => constants.%pattern_type.2c66b4.2 +// CHECK:STDOUT: %x.param_patt.loc9_64.2 => constants.%x.param_patt.1f4 +// CHECK:STDOUT: %x.patt.loc9_64.2 => constants.%x.patt.cec +// CHECK:STDOUT: %.loc9_72.2 => constants.%.1ce700.2 +// CHECK:STDOUT: %return.param_patt.loc9_72.2 => constants.%return.param_patt.bf4475.2 +// CHECK:STDOUT: %return.patt.loc9_69.2 => constants.%return.patt.f44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- adapt.carbon diff --git a/toolchain/check/testdata/class/generic/member_type.carbon b/toolchain/check/testdata/class/generic/member_type.carbon index a3ba65e20cd7..65262df88561 100644 --- a/toolchain/check/testdata/class/generic/member_type.carbon +++ b/toolchain/check/testdata/class/generic/member_type.carbon @@ -71,11 +71,11 @@ fn Test() -> i32 { // CHECK:STDOUT: %Outer.generic: %Outer.type = struct_value () [concrete] // CHECK:STDOUT: %Outer.2eb: type = class_type @Outer, @Outer(%T.f84) [symbolic] // CHECK:STDOUT: %Inner.056: type = class_type @Inner, @Inner(%T.f84) [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.f84 [symbolic] -// CHECK:STDOUT: %require_complete.d83: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %pattern_type.2c66b4.2: type = pattern_type %T.as_type [symbolic] -// CHECK:STDOUT: %Inner.elem.649: type = unbound_element_type %Inner.056, %T.as_type [symbolic] -// CHECK:STDOUT: %struct_type.n.797: type = struct_type {.n: %T.as_type} [symbolic] +// CHECK:STDOUT: %T.as_type.c1c: type = facet_access_type %T.f84 [symbolic] +// CHECK:STDOUT: %require_complete.d83: = require_complete_type %T.as_type.c1c [symbolic] +// CHECK:STDOUT: %pattern_type.2c66b4.2: type = pattern_type %T.as_type.c1c [symbolic] +// CHECK:STDOUT: %Inner.elem.649: type = unbound_element_type %Inner.056, %T.as_type.c1c [symbolic] +// CHECK:STDOUT: %struct_type.n.797: type = struct_type {.n: %T.as_type.c1c} [symbolic] // CHECK:STDOUT: %complete_type.22c: = complete_type_witness %struct_type.n.797 [symbolic] // CHECK:STDOUT: %n.param_patt.18f: %pattern_type.2c66b4.2 = value_param_pattern [symbolic] // CHECK:STDOUT: %n.patt.364: %pattern_type.2c66b4.2 = wrapper_binding_pattern n, %n.param_patt.18f [symbolic] @@ -150,30 +150,27 @@ fn Test() -> i32 { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.95d) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc13_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.5c4: type = pattern_type %struct_type.n.4d4 [concrete] -// CHECK:STDOUT: %self.param_patt.d03: %pattern_type.5c4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3cd: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt.d03 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc13_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.bc5: %pattern_type.fc8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.94a: %pattern_type.fc8 = wrapper_binding_pattern self, %self.param_patt.bc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc13_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d1e: %SubobjectDestroy.type = facet_value %Inner.ea8, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.57f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d1e) [concrete] +// CHECK:STDOUT: %Destroy.facet.41e: %Destroy.type = facet_value %Inner.ea8, (%DestroyImpl.impl_witness.57f, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.a33: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.41e) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -181,7 +178,7 @@ fn Test() -> i32 { // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -194,52 +191,9 @@ fn Test() -> i32 { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc13_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n.4d4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n.4d4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc13_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n.4d4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n.4d4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fc8 = ref_param_pattern [concrete = constants.%self.param_patt.bc5] -// CHECK:STDOUT: %self.patt: %pattern_type.fc8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.94a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Inner.ea8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Inner.ea8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc13_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fc8 = ref_param_pattern [concrete = constants.%self.param_patt.bc5] -// CHECK:STDOUT: %self.patt: %pattern_type.fc8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.94a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Inner.ea8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Inner.ea8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -290,14 +244,14 @@ fn Test() -> i32 { // CHECK:STDOUT: %.loc9_17.2: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T.f84) [symbolic = %Inner (constants.%Inner.056)] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %.loc9_17.2 [symbolic = %Inner (constants.%Inner.056)] // CHECK:STDOUT: %.loc9_17.3: Core.Form = init_form %Inner.ref [symbolic = %.loc9_17.1 (constants.%.22d)] -// CHECK:STDOUT: %n.param: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.3 [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %n.param: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type.c1c) = value_param call_param0 +// CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.3 [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type.c1c)] { // CHECK:STDOUT: %.loc9_11.2: %Copy.type = specific_constant @Outer.%T.loc4_14.2, @Outer(constants.%T.f84) [symbolic = %T (constants.%T.f84)] // CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, %.loc9_11.2 [symbolic = %T (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc9_11.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_11.3: type = converted %T.ref, %T.as_type.loc9_11.2 [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc9_11.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type.c1c)] +// CHECK:STDOUT: %.loc9_11.3: type = converted %T.ref, %T.as_type.loc9_11.2 [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type.c1c)] // CHECK:STDOUT: } -// CHECK:STDOUT: %n: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type) = wrapper_binding n, %n.param +// CHECK:STDOUT: %n: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type.c1c) = wrapper_binding n, %n.param // CHECK:STDOUT: %return.param: ref @Outer.F.%Inner (%Inner.056) = out_param call_param1 // CHECK:STDOUT: %return: ref @Outer.F.%Inner (%Inner.056) = return_slot %return.param // CHECK:STDOUT: } @@ -315,19 +269,19 @@ fn Test() -> i32 { // CHECK:STDOUT: generic class @Inner(@Outer.%T.loc4_14.2: %Copy.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T: %Copy.type = symbolic_binding T, 0 [symbolic = %T (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc6_12.2: type = facet_access_type %T [symbolic = %T.as_type.loc6_12.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_12.2: type = facet_access_type %T [symbolic = %T.as_type.loc6_12.2 (constants.%T.as_type.c1c)] // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc6_12.2 [symbolic = %require_complete (constants.%require_complete.d83)] // CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(%T) [symbolic = %Inner (constants.%Inner.056)] // CHECK:STDOUT: %Inner.elem: type = unbound_element_type %Inner, %T.as_type.loc6_12.2 [symbolic = %Inner.elem (constants.%Inner.elem.649)] -// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @Inner.%T.as_type.loc6_12.2 (%T.as_type)} [symbolic = %struct_type.n (constants.%struct_type.n.797)] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @Inner.%T.as_type.loc6_12.2 (%T.as_type.c1c)} [symbolic = %struct_type.n (constants.%struct_type.n.797)] // CHECK:STDOUT: %complete_type.loc7_3.2: = complete_type_witness %struct_type.n [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.22c)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %field_decl: @Inner.%Inner.elem (%Inner.elem.649) = field_decl n, element0, %.loc6_12.2 in [concrete] { // CHECK:STDOUT: %.loc6_12.1: %Copy.type = specific_constant @Outer.%T.loc4_14.2, @Outer(constants.%T.f84) [symbolic = %T (constants.%T.f84)] // CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, %.loc6_12.1 [symbolic = %T (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc6_12.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_12.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc6_12.2: type = converted %T.ref, %T.as_type.loc6_12.1 [symbolic = %T.as_type.loc6_12.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc6_12.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc6_12.2 (constants.%T.as_type.c1c)] +// CHECK:STDOUT: %.loc6_12.2: type = converted %T.ref, %T.as_type.loc6_12.1 [symbolic = %T.as_type.loc6_12.2 (constants.%T.as_type.c1c)] // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type.loc7_3.1: = complete_type_witness constants.%struct_type.n.797 [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.22c)] // CHECK:STDOUT: complete_type_witness = %complete_type.loc7_3.1 @@ -341,7 +295,7 @@ fn Test() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Outer.F(@Outer.%T.loc4_14.2: %Copy.type) { // CHECK:STDOUT: %T: %Copy.type = symbolic_binding T, 0 [symbolic = %T (constants.%T.f84)] -// CHECK:STDOUT: %T.as_type.loc9_11.1: type = facet_access_type %T [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc9_11.1: type = facet_access_type %T [symbolic = %T.as_type.loc9_11.1 (constants.%T.as_type.c1c)] // CHECK:STDOUT: %pattern_type.loc9_9: type = pattern_type %T.as_type.loc9_11.1 [symbolic = %pattern_type.loc9_9 (constants.%pattern_type.2c66b4.2)] // CHECK:STDOUT: %n.param_patt.loc9_9.2: @Outer.F.%pattern_type.loc9_9 (%pattern_type.2c66b4.2) = value_param_pattern [symbolic = %n.param_patt.loc9_9.2 (constants.%n.param_patt.18f)] // CHECK:STDOUT: %n.patt.loc9_9.2: @Outer.F.%pattern_type.loc9_9 (%pattern_type.2c66b4.2) = wrapper_binding_pattern n, %n.param_patt.loc9_9.2 [symbolic = %n.patt.loc9_9.2 (constants.%n.patt.364)] @@ -354,26 +308,26 @@ fn Test() -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc9_9: = require_complete_type %T.as_type.loc9_11.1 [symbolic = %require_complete.loc9_9 (constants.%require_complete.d83)] // CHECK:STDOUT: %require_complete.loc9_14: = require_complete_type %Inner [symbolic = %require_complete.loc9_14 (constants.%require_complete.8cc)] -// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type)} [symbolic = %struct_type.n (constants.%struct_type.n.797)] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type.c1c)} [symbolic = %struct_type.n (constants.%struct_type.n.797)] // CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%T) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d2f9c3.2)] // CHECK:STDOUT: %.loc9_38.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T [symbolic = %.loc9_38.3 (constants.%.8bf)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c)] // CHECK:STDOUT: %impl.elem0.loc9_38.2: @Outer.F.%.loc9_38.3 (%.8bf) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_38.2 (constants.%impl.elem0.bb5)] // CHECK:STDOUT: %specific_impl_fn.loc9_38.2: = specific_impl_function %impl.elem0.loc9_38.2, @Copy.WithSelf.Op(%T) [symbolic = %specific_impl_fn.loc9_38.2 (constants.%specific_impl_fn.2ac)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%n.param: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type)) -> out %return.param: @Outer.F.%Inner (%Inner.056) { +// CHECK:STDOUT: fn(%n.param: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type.c1c)) -> out %return.param: @Outer.F.%Inner (%Inner.056) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %n.ref: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type) = name_ref n, %n +// CHECK:STDOUT: %n.ref: @Outer.F.%T.as_type.loc9_11.1 (%T.as_type.c1c) = name_ref n, %n // CHECK:STDOUT: %.loc9_39.1: @Outer.F.%struct_type.n (%struct_type.n.797) = struct_literal (%n.ref) // CHECK:STDOUT: %impl.elem0.loc9_38.1: @Outer.F.%.loc9_38.3 (%.8bf) = impl_witness_access constants.%Copy.lookup_impl_witness.d9c, element0 [symbolic = %impl.elem0.loc9_38.2 (constants.%impl.elem0.bb5)] // CHECK:STDOUT: %bound_method.loc9_38.1: = bound_method %n.ref, %impl.elem0.loc9_38.1 -// CHECK:STDOUT: %.loc9_38.1: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T (constants.%T.f84)] -// CHECK:STDOUT: %.loc9_38.2: %Copy.type = converted constants.%T.as_type, constants.%T.f84 [symbolic = %T (constants.%T.f84)] +// CHECK:STDOUT: %.loc9_38.1: %Copy.type = converted constants.%T.as_type.c1c, constants.%T.f84 [symbolic = %T (constants.%T.f84)] +// CHECK:STDOUT: %.loc9_38.2: %Copy.type = converted constants.%T.as_type.c1c, constants.%T.f84 [symbolic = %T (constants.%T.f84)] // CHECK:STDOUT: %specific_impl_fn.loc9_38.1: = specific_impl_function %impl.elem0.loc9_38.1, @Copy.WithSelf.Op(constants.%T.f84) [symbolic = %specific_impl_fn.loc9_38.2 (constants.%specific_impl_fn.2ac)] // CHECK:STDOUT: %bound_method.loc9_38.2: = bound_method %n.ref, %specific_impl_fn.loc9_38.1 -// CHECK:STDOUT: %.loc9_39.2: ref @Outer.F.%T.as_type.loc9_11.1 (%T.as_type) = class_element_access %return.param, element0 -// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Outer.F.%T.as_type.loc9_11.1 (%T.as_type) to %.loc9_39.2 = call %bound_method.loc9_38.2(%n.ref) -// CHECK:STDOUT: %.loc9_39.3: init @Outer.F.%T.as_type.loc9_11.1 (%T.as_type) to %.loc9_39.2 = in_place_init %Copy.WithSelf.Op.call +// CHECK:STDOUT: %.loc9_39.2: ref @Outer.F.%T.as_type.loc9_11.1 (%T.as_type.c1c) = class_element_access %return.param, element0 +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Outer.F.%T.as_type.loc9_11.1 (%T.as_type.c1c) to %.loc9_39.2 = call %bound_method.loc9_38.2(%n.ref) +// CHECK:STDOUT: %.loc9_39.3: init @Outer.F.%T.as_type.loc9_11.1 (%T.as_type.c1c) to %.loc9_39.2 = in_place_init %Copy.WithSelf.Op.call // CHECK:STDOUT: %.loc9_39.4: init @Outer.F.%Inner (%Inner.056) to %return.param = class_init (%.loc9_39.3) // CHECK:STDOUT: %.loc9_40: init @Outer.F.%Inner (%Inner.056) = converted %.loc9_39.1, %.loc9_39.4 // CHECK:STDOUT: return %.loc9_40 to %return.param @@ -396,7 +350,7 @@ fn Test() -> i32 { // CHECK:STDOUT: %Copy.facet.loc13_43.2: %Copy.type = facet_value Core.IntLiteral, (constants.%Copy.impl_witness.0b3) [concrete = constants.%Copy.facet.d66] // CHECK:STDOUT: %.loc13_43.2: %Copy.type = converted Core.IntLiteral, %Copy.facet.loc13_43.2 [concrete = constants.%Copy.facet.d66] // CHECK:STDOUT: %Outer.F.specific_fn: = specific_function %F.ref, @Outer.F(constants.%Copy.facet.95d) [concrete = constants.%Outer.F.specific_fn] -// CHECK:STDOUT: %.loc13_3: ref %Inner.ea8 = splice_block %c.var {} +// CHECK:STDOUT: %.loc13_3.1: ref %Inner.ea8 = splice_block %c.var {} // CHECK:STDOUT: %impl.elem0.loc13: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60] // CHECK:STDOUT: %bound_method.loc13_42.1: = bound_method %int_1, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] @@ -404,7 +358,7 @@ fn Test() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc13_42.2(%int_1) [concrete = constants.%int_1.68a] // CHECK:STDOUT: %.loc13_42.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a] // CHECK:STDOUT: %.loc13_42.2: %i32 = converted %int_1, %.loc13_42.1 [concrete = constants.%int_1.68a] -// CHECK:STDOUT: %Outer.F.call: init %Inner.ea8 to %.loc13_3 = call %Outer.F.specific_fn(%.loc13_42.2) +// CHECK:STDOUT: %Outer.F.call: init %Inner.ea8 to %.loc13_3.1 = call %Outer.F.specific_fn(%.loc13_42.2) // CHECK:STDOUT: assign %c.var, %Outer.F.call // CHECK:STDOUT: %.loc13_20.1: type = splice_block %Inner.ref [concrete = constants.%Inner.ea8] { // CHECK:STDOUT: %Outer.ref.loc13_10: %Outer.type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer.generic] @@ -429,54 +383,39 @@ fn Test() -> i32 { // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_11.2: = bound_method %.loc14_11.2, %specific_fn.loc14 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc14_11.2(%.loc14_11.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc13_3.1: %Destroy.type = facet_value constants.%Inner.ea8, (constants.%DestroyImpl.impl_witness.57f, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.41e] +// CHECK:STDOUT: %.loc13_3.2: %Destroy.type = converted constants.%Inner.ea8, %Destroy.facet.loc13_3.1 [concrete = constants.%Destroy.facet.41e] +// CHECK:STDOUT: %Destroy.facet.loc13_3.2: %Destroy.type = facet_value constants.%Inner.ea8, (constants.%DestroyImpl.impl_witness.57f, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.41e] +// CHECK:STDOUT: %.loc13_3.3: %Destroy.type = converted constants.%Inner.ea8, %Destroy.facet.loc13_3.2 [concrete = constants.%Destroy.facet.41e] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.41e) [concrete = constants.%SelfDestruct.specific_fn.a33] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%c.var) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_3.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_3.2(%self.param: ref %struct_type.n.4d4) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc13_3.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc13_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc13_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc13_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.2(%self.param: ref %struct_type.n.4d4) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc13, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc13) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_3.2(%self.param: ref %struct_type.n.4d4) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_3.2(%self.param: ref %struct_type.n.4d4) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.3(%self.param: ref %Inner.ea8) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_3.3(%self.param: ref %Inner.ea8) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %Inner.elem.1de = name_ref n, @Inner.%field_decl [concrete = @Inner.%field_decl] -// CHECK:STDOUT: %.loc13: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc13, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc13) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_3.3(%self.param: ref %Inner.ea8) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_3.3(%self.param: ref %Inner.ea8) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc13_3.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc13_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc13_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc13_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -493,7 +432,7 @@ fn Test() -> i32 { // CHECK:STDOUT: specific @Inner(constants.%T.f84) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T => constants.%T.f84 -// CHECK:STDOUT: %T.as_type.loc6_12.2 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc6_12.2 => constants.%T.as_type.c1c // CHECK:STDOUT: %require_complete => constants.%require_complete.d83 // CHECK:STDOUT: %Inner => constants.%Inner.056 // CHECK:STDOUT: %Inner.elem => constants.%Inner.elem.649 @@ -503,7 +442,7 @@ fn Test() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer.F(constants.%T.f84) { // CHECK:STDOUT: %T => constants.%T.f84 -// CHECK:STDOUT: %T.as_type.loc9_11.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc9_11.1 => constants.%T.as_type.c1c // CHECK:STDOUT: %pattern_type.loc9_9 => constants.%pattern_type.2c66b4.2 // CHECK:STDOUT: %n.param_patt.loc9_9.2 => constants.%n.param_patt.18f // CHECK:STDOUT: %n.patt.loc9_9.2 => constants.%n.patt.364 @@ -563,51 +502,51 @@ fn Test() -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Outer.type: type = parameterized_class_name_type @Outer [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Outer.generic: %Outer.type = struct_value () [concrete] -// CHECK:STDOUT: %Outer.651: type = class_type @Outer, @Outer(%T) [symbolic] -// CHECK:STDOUT: %Inner.type.ebc: type = facet_type <@Inner, @Inner(%T)> [symbolic] +// CHECK:STDOUT: %Outer.651: type = class_type @Outer, @Outer(%T.67d) [symbolic] +// CHECK:STDOUT: %Inner.type.ebc: type = facet_type <@Inner, @Inner(%T.67d)> [symbolic] // CHECK:STDOUT: %Self.6a1: %Inner.type.ebc = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Self.as_type.ef4: type = facet_access_type %Self.6a1 [symbolic] // CHECK:STDOUT: %pattern_type.44a: type = pattern_type %Self.as_type.ef4 [symbolic] // CHECK:STDOUT: %self.param_patt.ac7: %pattern_type.44a = value_param_pattern [symbolic] // CHECK:STDOUT: %self.patt.d58: %pattern_type.44a = wrapper_binding_pattern self, %self.param_patt.ac7 [symbolic] -// CHECK:STDOUT: %.184: Core.Form = init_form %T [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %.184: Core.Form = init_form %T.67d [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %return.param_patt.41d: %pattern_type.51d = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.b39: %pattern_type.51d = return_slot_pattern %return.param_patt.41d, %T [symbolic] -// CHECK:STDOUT: %Inner.WithSelf.F.type.d13: type = fn_type @Inner.WithSelf.F, @Inner.WithSelf(%T, %Self.6a1) [symbolic] +// CHECK:STDOUT: %return.patt.b39: %pattern_type.51d = return_slot_pattern %return.param_patt.41d, %T.67d [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.type.d13: type = fn_type @Inner.WithSelf.F, @Inner.WithSelf(%T.67d, %Self.6a1) [symbolic] // CHECK:STDOUT: %Inner.WithSelf.F.98c: %Inner.WithSelf.F.type.d13 = struct_value () [symbolic] -// CHECK:STDOUT: %Inner.assoc_type.feb: type = assoc_entity_type @Inner, @Inner(%T) [symbolic] +// CHECK:STDOUT: %Inner.assoc_type.feb: type = assoc_entity_type @Inner, @Inner(%T.67d) [symbolic] // CHECK:STDOUT: %assoc0.3e8: %Inner.assoc_type.feb = assoc_entity element0, @Inner.WithSelf.%Inner.WithSelf.F.decl [symbolic] -// CHECK:STDOUT: %C.128: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %.1cb: = impl_self_witness %C.128, @Inner, @Inner(%T) [symbolic] -// CHECK:STDOUT: %Inner.impl_witness.19c: = impl_witness @C.as.Inner.impl.%Inner.impl_witness_table, @C.as.Inner.impl(%T) [symbolic] +// CHECK:STDOUT: %C.128: type = class_type @C, @C(%T.67d) [symbolic] +// CHECK:STDOUT: %.1cb: = impl_self_witness %C.128, @Inner, @Inner(%T.67d) [symbolic] +// CHECK:STDOUT: %Inner.impl_witness.19c: = impl_witness @C.as.Inner.impl.%Inner.impl_witness_table, @C.as.Inner.impl(%T.67d) [symbolic] // CHECK:STDOUT: %require_complete.074: = require_complete_type %Inner.type.ebc [symbolic] // CHECK:STDOUT: %pattern_type.dc7: type = pattern_type %C.128 [symbolic] // CHECK:STDOUT: %self.param_patt.385: %pattern_type.dc7 = value_param_pattern [symbolic] // CHECK:STDOUT: %self.patt.f31: %pattern_type.dc7 = wrapper_binding_pattern self, %self.param_patt.385 [symbolic] -// CHECK:STDOUT: %C.as.Inner.impl.F.type.70c: type = fn_type @C.as.Inner.impl.F, @C.as.Inner.impl(%T) [symbolic] +// CHECK:STDOUT: %C.as.Inner.impl.F.type.70c: type = fn_type @C.as.Inner.impl.F, @C.as.Inner.impl(%T.67d) [symbolic] // CHECK:STDOUT: %C.as.Inner.impl.F.7b0: %C.as.Inner.impl.F.type.70c = struct_value () [symbolic] // CHECK:STDOUT: %Inner.facet.04b: %Inner.type.ebc = facet_value %C.128, (%Inner.impl_witness.19c) [symbolic] -// CHECK:STDOUT: %Inner.WithSelf.F.type.dc2: type = fn_type @Inner.WithSelf.F, @Inner.WithSelf(%T, %Inner.facet.04b) [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.type.dc2: type = fn_type @Inner.WithSelf.F, @Inner.WithSelf(%T.67d, %Inner.facet.04b) [symbolic] // CHECK:STDOUT: %Inner.WithSelf.F.600: %Inner.WithSelf.F.type.dc2 = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %require_complete.e45: = require_complete_type %C.128 [symbolic] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %Inner.lookup_impl_witness: = lookup_impl_witness %C.128, @Inner, @Inner(%T) [symbolic] -// CHECK:STDOUT: %.f55: require_specific_def_type = require_specific_def @C.as.Inner.impl(%T) [symbolic] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [symbolic] +// CHECK:STDOUT: %Inner.lookup_impl_witness: = lookup_impl_witness %C.128, @Inner, @Inner(%T.67d) [symbolic] +// CHECK:STDOUT: %.f55: require_specific_def_type = require_specific_def @C.as.Inner.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Inner.facet.d73: %Inner.type.ebc = facet_value %C.128, (%Inner.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %Inner.WithSelf.F.type.001: type = fn_type @Inner.WithSelf.F, @Inner.WithSelf(%T, %Inner.facet.d73) [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.type.001: type = fn_type @Inner.WithSelf.F, @Inner.WithSelf(%T.67d, %Inner.facet.d73) [symbolic] // CHECK:STDOUT: %Inner.WithSelf.F.5d3: %Inner.WithSelf.F.type.001 = struct_value () [symbolic] // CHECK:STDOUT: %.bab: type = fn_type_with_self_type %Inner.WithSelf.F.type.001, %Inner.facet.d73 [symbolic] // CHECK:STDOUT: %impl.elem0.eb0: %.bab = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.eef: = specific_impl_function %impl.elem0.eb0, @Inner.WithSelf.F(%T, %Inner.facet.d73) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.eef: = specific_impl_function %impl.elem0.eb0, @Inner.WithSelf.F(%T.67d, %Inner.facet.d73) [symbolic] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = parameterized_class_name_type @Int [concrete] @@ -657,64 +596,33 @@ fn Test() -> i32 { // CHECK:STDOUT: %self.param_patt.17c: %pattern_type.e4b = value_param_pattern [concrete] // CHECK:STDOUT: %self.patt.894: %pattern_type.e4b = wrapper_binding_pattern self, %self.param_patt.17c [concrete] // CHECK:STDOUT: %C.as.Inner.impl.F.specific_fn: = specific_function %C.as.Inner.impl.F.e15, @C.as.Inner.impl.F(%i32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc23_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0bf: %pattern_type.e4b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.de5: %pattern_type.e4b = wrapper_binding_pattern self, %self.param_patt.0bf [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc23_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.905: %SubobjectDestroy.type = facet_value %C.785, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ad6: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.905) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C.785, (%DestroyImpl.impl_witness.ad6, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc23_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e4b = ref_param_pattern [concrete = constants.%self.param_patt.0bf] -// CHECK:STDOUT: %self.patt: %pattern_type.e4b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.de5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.785 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.785 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc23_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e4b = ref_param_pattern [concrete = constants.%self.param_patt.0bf] -// CHECK:STDOUT: %self.patt: %pattern_type.e4b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.de5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.785 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.785 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -726,13 +634,13 @@ fn Test() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Outer.decl: %Outer.type = class_decl @Outer [concrete = constants.%Outer.generic] { -// CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc4_14.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_16.1: type = splice_block %.loc4_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc4_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] +// CHECK:STDOUT: %T.loc4_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: type = class_decl @D [concrete = constants.%D] {} {} // CHECK:STDOUT: %Test.decl: %Test.type = fn_decl @Test [concrete = constants.%Test] { @@ -748,7 +656,7 @@ fn Test() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: generic interface @Inner(@Outer.%T.loc4_14.2: type) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%T)> [symbolic = %Inner.type (constants.%Inner.type.ebc)] // CHECK:STDOUT: %Self.loc5_19.2: @Inner.%Inner.type (%Inner.type.ebc) = symbolic_binding Self, 1 [symbolic = %Self.loc5_19.2 (constants.%Self.6a1)] // CHECK:STDOUT: @@ -763,19 +671,19 @@ fn Test() -> i32 { // CHECK:STDOUT: %return.param_patt.loc6_19.1: @Inner.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_19.2 (constants.%return.param_patt.41d)] // CHECK:STDOUT: %return.patt.loc6_16.1: @Inner.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_19.1, %T.ref [symbolic = %return.patt.loc6_16.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_19.2: type = specific_constant @Outer.%T.loc4_14.2, @Outer(constants.%T) [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc6_19.2 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %.loc6_19.2: type = specific_constant @Outer.%T.loc4_14.2, @Outer(constants.%T.67d) [symbolic = %T (constants.%T.67d)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc6_19.2 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %.loc6_19.3: Core.Form = init_form %T.ref [symbolic = %.loc6_19.1 (constants.%.184)] // CHECK:STDOUT: %self.param: @Inner.WithSelf.F.%Self.as_type.loc6_10.1 (%Self.as_type.ef4) = value_param call_param0 // CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.3 [symbolic = %Self.as_type.loc6_10.1 (constants.%Self.as_type.ef4)] { -// CHECK:STDOUT: %.loc6_10.2: @Inner.WithSelf.F.%Inner.type (%Inner.type.ebc) = specific_constant @Inner.%Self.loc5_19.1, @Inner(constants.%T) [symbolic = %Self (constants.%Self.6a1)] +// CHECK:STDOUT: %.loc6_10.2: @Inner.WithSelf.F.%Inner.type (%Inner.type.ebc) = specific_constant @Inner.%Self.loc5_19.1, @Inner(constants.%T.67d) [symbolic = %Self (constants.%Self.6a1)] // CHECK:STDOUT: %Self.ref: @Inner.WithSelf.F.%Inner.type (%Inner.type.ebc) = name_ref Self, %.loc6_10.2 [symbolic = %Self (constants.%Self.6a1)] // CHECK:STDOUT: %Self.as_type.loc6_10.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_10.1 (constants.%Self.as_type.ef4)] // CHECK:STDOUT: %.loc6_10.3: type = converted %Self.ref, %Self.as_type.loc6_10.2 [symbolic = %Self.as_type.loc6_10.1 (constants.%Self.as_type.ef4)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @Inner.WithSelf.F.%Self.as_type.loc6_10.1 (%Self.as_type.ef4) = wrapper_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @Inner.WithSelf.F.%T (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @Inner.WithSelf.F.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @Inner.WithSelf.F.%T (%T.67d) = out_param call_param1 +// CHECK:STDOUT: %return: ref @Inner.WithSelf.F.%T (%T.67d) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0.loc6_20.1: @Inner.WithSelf.%Inner.assoc_type (%Inner.assoc_type.feb) = assoc_entity element0, %Inner.WithSelf.F.decl [symbolic = %assoc0.loc6_20.2 (constants.%assoc0.3e8)] // CHECK:STDOUT: @@ -794,7 +702,7 @@ fn Test() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @C.as.Inner.impl(@Outer.%T.loc4_14.2: type) { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.128)] // CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%T)> [symbolic = %Inner.type (constants.%Inner.type.ebc)] // CHECK:STDOUT: %.loc10_19: = impl_self_witness %C, @Inner, @Inner(%T) [symbolic = %.loc10_19 (constants.%.1cb)] @@ -812,20 +720,20 @@ fn Test() -> i32 { // CHECK:STDOUT: %return.param_patt.loc11_24.1: @C.as.Inner.impl.F.%pattern_type.loc11_24 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc11_24.2 (constants.%return.param_patt.41d)] // CHECK:STDOUT: %return.patt.loc11_21.1: @C.as.Inner.impl.F.%pattern_type.loc11_24 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc11_24.1, %T.ref [symbolic = %return.patt.loc11_21.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_24.3: type = specific_constant @Outer.%T.loc4_14.2, @Outer(constants.%T) [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc11_24.3 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %.loc11_24.3: type = specific_constant @Outer.%T.loc4_14.2, @Outer(constants.%T.67d) [symbolic = %T (constants.%T.67d)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc11_24.3 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %.loc11_24.4: Core.Form = init_form %T.ref [symbolic = %.loc11_24.2 (constants.%.184)] // CHECK:STDOUT: %self.param: @C.as.Inner.impl.F.%C (%C.128) = value_param call_param0 // CHECK:STDOUT: %.loc11_18.1: type = splice_block %C.ref [symbolic = %C (constants.%C.128)] { -// CHECK:STDOUT: %.loc11_18.2: type = specific_constant @Outer.%C.decl, @Outer(constants.%T) [symbolic = %C (constants.%C.128)] +// CHECK:STDOUT: %.loc11_18.2: type = specific_constant @Outer.%C.decl, @Outer(constants.%T.67d) [symbolic = %C (constants.%C.128)] // CHECK:STDOUT: %C.ref: type = name_ref C, %.loc11_18.2 [symbolic = %C (constants.%C.128)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @C.as.Inner.impl.F.%C (%C.128) = wrapper_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @C.as.Inner.impl.F.%T (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @C.as.Inner.impl.F.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @C.as.Inner.impl.F.%T (%T.67d) = out_param call_param1 +// CHECK:STDOUT: %return: ref @C.as.Inner.impl.F.%T (%T.67d) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Inner.impl_witness_table = impl_witness_table (%C.as.Inner.impl.F.decl), @C.as.Inner.impl [concrete] -// CHECK:STDOUT: %Inner.impl_witness.loc10_19.1: = impl_witness %Inner.impl_witness_table, @C.as.Inner.impl(constants.%T) [symbolic = %Inner.impl_witness.loc10_19.2 (constants.%Inner.impl_witness.19c)] +// CHECK:STDOUT: %Inner.impl_witness.loc10_19.1: = impl_witness %Inner.impl_witness_table, @C.as.Inner.impl(constants.%T.67d) [symbolic = %Inner.impl_witness.loc10_19.2 (constants.%Inner.impl_witness.19c)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .C = @@ -863,8 +771,8 @@ fn Test() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Outer(%T.loc4_14.2: type) { -// CHECK:STDOUT: %T.patt.loc4_14.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc4_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc4_14.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_14.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc4_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_14.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%T.loc4_14.1)> [symbolic = %Inner.type (constants.%Inner.type.ebc)] @@ -890,10 +798,10 @@ fn Test() -> i32 { // CHECK:STDOUT: class { // CHECK:STDOUT: impl_decl @C.as.Inner.impl [concrete] {} { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C.128 [symbolic = %C (constants.%C.128)] -// CHECK:STDOUT: %.loc10_13: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.type (constants.%Inner.type.ebc)] +// CHECK:STDOUT: %.loc10_13: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T.67d) [symbolic = %Inner.type (constants.%Inner.type.ebc)] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %.loc10_13 [symbolic = %Inner.type (constants.%Inner.type.ebc)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10: = impl_self_witness @C.as.Inner.impl.%Self.ref, @Inner, @Inner(constants.%T) [symbolic = @C.as.Inner.impl.%.loc10_19 (constants.%.1cb)] +// CHECK:STDOUT: %.loc10: = impl_self_witness @C.as.Inner.impl.%Self.ref, @Inner, @Inner(constants.%T.67d) [symbolic = @C.as.Inner.impl.%.loc10_19 (constants.%.1cb)] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: @@ -925,7 +833,7 @@ fn Test() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Inner.WithSelf.F(@Outer.%T.loc4_14.2: type, @Inner.%Self.loc5_19.1: @Inner.%Inner.type (%Inner.type.ebc)) { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%T)> [symbolic = %Inner.type (constants.%Inner.type.ebc)] // CHECK:STDOUT: %Self: @Inner.WithSelf.F.%Inner.type (%Inner.type.ebc) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.6a1)] // CHECK:STDOUT: %Self.as_type.loc6_10.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_10.1 (constants.%Self.as_type.ef4)] @@ -937,11 +845,11 @@ fn Test() -> i32 { // CHECK:STDOUT: %return.param_patt.loc6_19.2: @Inner.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_19.2 (constants.%return.param_patt.41d)] // CHECK:STDOUT: %return.patt.loc6_16.2: @Inner.WithSelf.F.%pattern_type.loc6_19 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_19.2, %T [symbolic = %return.patt.loc6_16.2 (constants.%return.patt.b39)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Inner.WithSelf.F.%Self.as_type.loc6_10.1 (%Self.as_type.ef4)) -> out %return.param: @Inner.WithSelf.F.%T (%T); +// CHECK:STDOUT: fn(%self.param: @Inner.WithSelf.F.%Self.as_type.loc6_10.1 (%Self.as_type.ef4)) -> out %return.param: @Inner.WithSelf.F.%T (%T.67d); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @C.as.Inner.impl.F(@Outer.%T.loc4_14.2: type) { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.128)] // CHECK:STDOUT: %pattern_type.loc11_16: type = pattern_type %C [symbolic = %pattern_type.loc11_16 (constants.%pattern_type.dc7)] // CHECK:STDOUT: %self.param_patt.loc11_16.2: @C.as.Inner.impl.F.%pattern_type.loc11_16 (%pattern_type.dc7) = value_param_pattern [symbolic = %self.param_patt.loc11_16.2 (constants.%self.param_patt.385)] @@ -966,19 +874,19 @@ fn Test() -> i32 { // CHECK:STDOUT: %impl.elem0.loc11_39.2: @C.as.Inner.impl.F.%.loc11_39.2 (%.bab) = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_39.2 (constants.%impl.elem0.eb0)] // CHECK:STDOUT: %specific_impl_fn.loc11_39.2: = specific_impl_function %impl.elem0.loc11_39.2, @Inner.WithSelf.F(%T, %Inner.facet) [symbolic = %specific_impl_fn.loc11_39.2 (constants.%specific_impl_fn.eef)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @C.as.Inner.impl.F.%C (%C.128)) -> out %return.param: @C.as.Inner.impl.F.%T (%T) { +// CHECK:STDOUT: fn(%self.param: @C.as.Inner.impl.F.%C (%C.128)) -> out %return.param: @C.as.Inner.impl.F.%T (%T.67d) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @C.as.Inner.impl.F.%C (%C.128) = name_ref self, %self -// CHECK:STDOUT: %.loc11_41: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.type (constants.%Inner.type.ebc)] +// CHECK:STDOUT: %.loc11_41: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T.67d) [symbolic = %Inner.type (constants.%Inner.type.ebc)] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %.loc11_41 [symbolic = %Inner.type (constants.%Inner.type.ebc)] -// CHECK:STDOUT: %.loc11_46: @C.as.Inner.impl.F.%Inner.assoc_type (%Inner.assoc_type.feb) = specific_constant @Inner.WithSelf.%assoc0.loc6_20.1, @Inner.WithSelf(constants.%T, constants.%Self.6a1) [symbolic = %assoc0 (constants.%assoc0.3e8)] +// CHECK:STDOUT: %.loc11_46: @C.as.Inner.impl.F.%Inner.assoc_type (%Inner.assoc_type.feb) = specific_constant @Inner.WithSelf.%assoc0.loc6_20.1, @Inner.WithSelf(constants.%T.67d, constants.%Self.6a1) [symbolic = %assoc0 (constants.%assoc0.3e8)] // CHECK:STDOUT: %F.ref: @C.as.Inner.impl.F.%Inner.assoc_type (%Inner.assoc_type.feb) = name_ref F, %.loc11_46 [symbolic = %assoc0 (constants.%assoc0.3e8)] // CHECK:STDOUT: %impl.elem0.loc11_39.1: @C.as.Inner.impl.F.%.loc11_39.2 (%.bab) = impl_witness_access constants.%Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_39.2 (constants.%impl.elem0.eb0)] // CHECK:STDOUT: %bound_method.loc11_39: = bound_method %self.ref, %impl.elem0.loc11_39.1 -// CHECK:STDOUT: %specific_impl_fn.loc11_39.1: = specific_impl_function %impl.elem0.loc11_39.1, @Inner.WithSelf.F(constants.%T, constants.%Inner.facet.d73) [symbolic = %specific_impl_fn.loc11_39.2 (constants.%specific_impl_fn.eef)] +// CHECK:STDOUT: %specific_impl_fn.loc11_39.1: = specific_impl_function %impl.elem0.loc11_39.1, @Inner.WithSelf.F(constants.%T.67d, constants.%Inner.facet.d73) [symbolic = %specific_impl_fn.loc11_39.2 (constants.%specific_impl_fn.eef)] // CHECK:STDOUT: %bound_method.loc11_50: = bound_method %self.ref, %specific_impl_fn.loc11_39.1 -// CHECK:STDOUT: %.loc11_24.1: ref @C.as.Inner.impl.F.%T (%T) = splice_block %return.param {} -// CHECK:STDOUT: %Inner.WithSelf.F.call: init @C.as.Inner.impl.F.%T (%T) to %.loc11_24.1 = call %bound_method.loc11_50(%self.ref) +// CHECK:STDOUT: %.loc11_24.1: ref @C.as.Inner.impl.F.%T (%T.67d) = splice_block %return.param {} +// CHECK:STDOUT: %Inner.WithSelf.F.call: init @C.as.Inner.impl.F.%T (%T.67d) to %.loc11_24.1 = call %bound_method.loc11_50(%self.ref) // CHECK:STDOUT: return %Inner.WithSelf.F.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -990,8 +898,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %c.var: ref %C.785 = var_storage %c.var_patt // CHECK:STDOUT: %.loc23_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc23_26.2: init %C.785 to %c.var = class_init () [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc23_3: init %C.785 = converted %.loc23_26.1, %.loc23_26.2 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %c.var, %.loc23_3 +// CHECK:STDOUT: %.loc23_3.1: init %C.785 = converted %.loc23_26.1, %.loc23_26.2 [concrete = constants.%C.val] +// CHECK:STDOUT: assign %c.var, %.loc23_3.1 // CHECK:STDOUT: %.loc23_20.1: type = splice_block %C.ref [concrete = constants.%C.785] { // CHECK:STDOUT: %Outer.ref.loc23: %Outer.type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer.generic] // CHECK:STDOUT: %i32.loc23: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -1018,52 +926,38 @@ fn Test() -> i32 { // CHECK:STDOUT: %bound_method.loc24_33: = bound_method %c.ref, %specific_fn // CHECK:STDOUT: %.loc24_10: %C.785 = acquire_value %c.ref // CHECK:STDOUT: %C.as.Inner.impl.F.call: init %i32 = call %bound_method.loc24_33(%.loc24_10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc23_3.1: %Destroy.type = facet_value constants.%C.785, (constants.%DestroyImpl.impl_witness.ad6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_3.2: %Destroy.type = converted constants.%C.785, %Destroy.facet.loc23_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc23_3.2: %Destroy.type = facet_value constants.%C.785, (constants.%DestroyImpl.impl_witness.ad6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_3.3: %Destroy.type = converted constants.%C.785, %Destroy.facet.loc23_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%c.var) // CHECK:STDOUT: return %C.as.Inner.impl.F.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_3.2(%self.param: ref %C.785) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.2(%self.param: ref %C.785) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_3.2(%self.param: ref %C.785) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_3.2(%self.param: ref %C.785) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Outer(constants.%T) { -// CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_14.1 => constants.%T +// CHECK:STDOUT: specific @Outer(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc4_14.1 => constants.%T.67d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.type => constants.%Inner.type.ebc // CHECK:STDOUT: %C => constants.%C.128 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner(constants.%T) { +// CHECK:STDOUT: specific @Inner(constants.%T.67d) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %Inner.type => constants.%Inner.type.ebc // CHECK:STDOUT: %Self.loc5_19.2 => constants.%Self.6a1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.WithSelf(constants.%T, constants.%Self.6a1) { +// CHECK:STDOUT: specific @Inner.WithSelf(constants.%T.67d, constants.%Self.6a1) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %Inner.type => constants.%Inner.type.ebc // CHECK:STDOUT: %Self => constants.%Self.6a1 // CHECK:STDOUT: %Inner.WithSelf.F.type => constants.%Inner.WithSelf.F.type.d13 @@ -1072,8 +966,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %assoc0.loc6_20.2 => constants.%assoc0.3e8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.WithSelf.F(constants.%T, constants.%Self.6a1) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @Inner.WithSelf.F(constants.%T.67d, constants.%Self.6a1) { +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %Inner.type => constants.%Inner.type.ebc // CHECK:STDOUT: %Self => constants.%Self.6a1 // CHECK:STDOUT: %Self.as_type.loc6_10.1 => constants.%Self.as_type.ef4 @@ -1086,12 +980,12 @@ fn Test() -> i32 { // CHECK:STDOUT: %return.patt.loc6_16.2 => constants.%return.patt.b39 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T) { +// CHECK:STDOUT: specific @C(constants.%T.67d) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C.as.Inner.impl(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @C.as.Inner.impl(constants.%T.67d) { +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %C => constants.%C.128 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.ebc // CHECK:STDOUT: %.loc10_19 => constants.%.1cb @@ -1103,8 +997,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %C.as.Inner.impl.F => constants.%C.as.Inner.impl.F.7b0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C.as.Inner.impl.F(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @C.as.Inner.impl.F(constants.%T.67d) { +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %C => constants.%C.128 // CHECK:STDOUT: %pattern_type.loc11_16 => constants.%pattern_type.dc7 // CHECK:STDOUT: %self.param_patt.loc11_16.2 => constants.%self.param_patt.385 @@ -1115,9 +1009,9 @@ fn Test() -> i32 { // CHECK:STDOUT: %return.patt.loc11_21.2 => constants.%return.patt.b39 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.WithSelf(constants.%T, constants.%Inner.facet.04b) { +// CHECK:STDOUT: specific @Inner.WithSelf(constants.%T.67d, constants.%Inner.facet.04b) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %Inner.type => constants.%Inner.type.ebc // CHECK:STDOUT: %Self => constants.%Inner.facet.04b // CHECK:STDOUT: %Inner.WithSelf.F.type => constants.%Inner.WithSelf.F.type.dc2 @@ -1126,8 +1020,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %assoc0.loc6_20.2 => constants.%assoc0.3e8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.WithSelf.F(constants.%T, constants.%Inner.facet.04b) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @Inner.WithSelf.F(constants.%T.67d, constants.%Inner.facet.04b) { +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %Inner.type => constants.%Inner.type.ebc // CHECK:STDOUT: %Self => constants.%Inner.facet.04b // CHECK:STDOUT: %Self.as_type.loc6_10.1 => constants.%C.128 @@ -1140,9 +1034,9 @@ fn Test() -> i32 { // CHECK:STDOUT: %return.patt.loc6_16.2 => constants.%return.patt.b39 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.WithSelf(constants.%T, constants.%Inner.facet.d73) { +// CHECK:STDOUT: specific @Inner.WithSelf(constants.%T.67d, constants.%Inner.facet.d73) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %Inner.type => constants.%Inner.type.ebc // CHECK:STDOUT: %Self => constants.%Inner.facet.d73 // CHECK:STDOUT: %Inner.WithSelf.F.type => constants.%Inner.WithSelf.F.type.001 @@ -1151,8 +1045,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %assoc0.loc6_20.2 => constants.%assoc0.3e8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.WithSelf.F(constants.%T, constants.%Inner.facet.d73) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @Inner.WithSelf.F(constants.%T.67d, constants.%Inner.facet.d73) { +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %Inner.type => constants.%Inner.type.ebc // CHECK:STDOUT: %Self => constants.%Inner.facet.d73 // CHECK:STDOUT: %Self.as_type.loc6_10.1 => constants.%C.128 @@ -1166,7 +1060,7 @@ fn Test() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%i32) { -// CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc4_14.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc4_14.1 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/class/generic/method_deduce.carbon b/toolchain/check/testdata/class/generic/method_deduce.carbon index cf8c97984ae8..ffb3b24bc779 100644 --- a/toolchain/check/testdata/class/generic/method_deduce.carbon +++ b/toolchain/check/testdata/class/generic/method_deduce.carbon @@ -43,28 +43,28 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %B: type = class_type @B [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = parameterized_class_name_type @Class [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete] -// CHECK:STDOUT: %Class.d96: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %U.patt: %pattern_type.9a5 = symbolic_binding_pattern U, 1 [symbolic] +// CHECK:STDOUT: %Class.d96: type = class_type @Class, @Class(%T.67d) [symbolic] +// CHECK:STDOUT: %U.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %U: type = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %tuple.type.693: type = tuple_type (type, type) [concrete] -// CHECK:STDOUT: %tuple.fa2: %tuple.type.693 = tuple_value (%T, %U) [symbolic] -// CHECK:STDOUT: %tuple.type.a5e: type = tuple_type (%T, %U) [symbolic] +// CHECK:STDOUT: %tuple.fa2: %tuple.type.693 = tuple_value (%T.67d, %U) [symbolic] +// CHECK:STDOUT: %tuple.type.a5e: type = tuple_type (%T.67d, %U) [symbolic] // CHECK:STDOUT: %.f18: Core.Form = init_form %tuple.type.a5e [symbolic] // CHECK:STDOUT: %pattern_type.eee: type = pattern_type %tuple.type.a5e [symbolic] // CHECK:STDOUT: %return.param_patt.a41: %pattern_type.eee = out_param_pattern [symbolic] // CHECK:STDOUT: %return.patt.453: %pattern_type.eee = return_slot_pattern %return.param_patt.a41, %tuple.type.a5e [symbolic] -// CHECK:STDOUT: %Class.Get.type.864: type = fn_type @Class.Get, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.Get.type.864: type = fn_type @Class.Get, @Class(%T.67d) [symbolic] // CHECK:STDOUT: %Class.Get.459: %Class.Get.type.864 = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %x.param_patt.91d: %pattern_type.51d = value_param_pattern [symbolic] // CHECK:STDOUT: %x.patt.260: %pattern_type.51d = wrapper_binding_pattern x, %x.param_patt.91d [symbolic] -// CHECK:STDOUT: %Class.GetNoDeduce.type.068: type = fn_type @Class.GetNoDeduce, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.GetNoDeduce.type.068: type = fn_type @Class.GetNoDeduce, @Class(%T.67d) [symbolic] // CHECK:STDOUT: %Class.GetNoDeduce.4c4: %Class.GetNoDeduce.type.068 = struct_value () [symbolic] // CHECK:STDOUT: %Class.9fc: type = class_type @Class, @Class(%U) [symbolic] // CHECK:STDOUT: %pattern_type.42e: type = pattern_type %Class.9fc [symbolic] @@ -74,12 +74,12 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %pattern_type.946: type = pattern_type %U [symbolic] // CHECK:STDOUT: %return.param_patt.6dd: %pattern_type.946 = out_param_pattern [symbolic] // CHECK:STDOUT: %return.patt.4dd: %pattern_type.946 = return_slot_pattern %return.param_patt.6dd, %U [symbolic] -// CHECK:STDOUT: %Class.F.type.30a: type = fn_type @Class.F, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.F.type.30a: type = fn_type @Class.F, @Class(%T.67d) [symbolic] // CHECK:STDOUT: %Class.F.488: %Class.F.type.30a = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.220: = require_complete_type %tuple.type.a5e [symbolic] -// CHECK:STDOUT: %Class.Get.specific_fn.dd8: = specific_function %Class.Get.459, @Class.Get(%T, %U) [symbolic] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.e34: = specific_function %Class.GetNoDeduce.4c4, @Class.GetNoDeduce(%T, %U) [symbolic] +// CHECK:STDOUT: %Class.Get.specific_fn.dd8: = specific_function %Class.Get.459, @Class.Get(%T.67d, %U) [symbolic] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [symbolic] +// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.e34: = specific_function %Class.GetNoDeduce.4c4, @Class.GetNoDeduce(%T.67d, %U) [symbolic] // CHECK:STDOUT: %Class.Get.type.057: type = fn_type @Class.Get, @Class(%U) [symbolic] // CHECK:STDOUT: %Class.Get.5d8: %Class.Get.type.057 = struct_value () [symbolic] // CHECK:STDOUT: %Class.GetNoDeduce.type.a95: type = fn_type @Class.GetNoDeduce, @Class(%U) [symbolic] @@ -116,23 +116,20 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.775: = specific_function %Class.GetNoDeduce.d7a, @Class.GetNoDeduce(%A, %B) [concrete] // CHECK:STDOUT: %A.val: %A = struct_value () [concrete] // CHECK:STDOUT: %.367: ref %A = temporary invalid, %A.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc29_25.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc29_25.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc29_25.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc29_25.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc29_25.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.367, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc29_25.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %.cbf: Core.Form = init_form %A [concrete] // CHECK:STDOUT: %return.param_patt.f0c: %pattern_type.9ef = out_param_pattern [concrete] // CHECK:STDOUT: %return.patt.a6d: %pattern_type.9ef = return_slot_pattern %return.param_patt.f0c, %A [concrete] @@ -146,42 +143,13 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc29_25.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc29_25.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc29_25.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc29_25.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -198,13 +166,13 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { -// CHECK:STDOUT: %T.patt.loc18_14.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_14.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc18_14.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_14.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc18_16.1: type = splice_block %.loc18_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc18_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc18_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc18_14.1 (constants.%T)] +// CHECK:STDOUT: %T.loc18_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc18_14.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { // CHECK:STDOUT: %c.param_patt: %pattern_type.e83 = value_param_pattern [concrete = constants.%c.param_patt] @@ -285,8 +253,8 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Class(%T.loc18_14.2: type) { -// CHECK:STDOUT: %T.patt.loc18_14.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc18_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc18_14.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc18_14.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_14.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc18_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc18_14.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class.Get.type: type = fn_type @Class.Get, @Class(%T.loc18_14.1) [symbolic = %Class.Get.type (constants.%Class.Get.type.864)] @@ -298,12 +266,12 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Class.Get.decl: @Class.%Class.Get.type (%Class.Get.type.864) = fn_decl @Class.Get [symbolic = @Class.%Class.Get (constants.%Class.Get.459)] { -// CHECK:STDOUT: %U.patt.loc19_19.1: %pattern_type.9a5 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc19_19.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc19_19.1: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc19_19.2 (constants.%U.patt)] // CHECK:STDOUT: %return.param_patt.loc19_35.1: @Class.Get.%pattern_type (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc19_35.2 (constants.%return.param_patt.a41)] // CHECK:STDOUT: %return.patt.loc19_27.1: @Class.Get.%pattern_type (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc19_35.1, %.loc19_35.4 [symbolic = %return.patt.loc19_27.2 (constants.%return.patt.453)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_31: type = specific_constant @Class.%T.loc18_14.2, @Class(constants.%T) [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc19_31 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %.loc19_31: type = specific_constant @Class.%T.loc18_14.2, @Class(constants.%T.67d) [symbolic = %T (constants.%T.67d)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc19_31 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %U.ref.loc19_34: type = name_ref U, %U.loc19_19.2 [symbolic = %U.loc19_19.1 (constants.%U)] // CHECK:STDOUT: %.loc19_35.3: %tuple.type.693 = tuple_literal (%T.ref, %U.ref.loc19_34) [symbolic = %tuple (constants.%tuple.fa2)] // CHECK:STDOUT: %.loc19_35.4: type = converted %.loc19_35.3, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] @@ -319,22 +287,22 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %Class.GetNoDeduce.decl: @Class.%Class.GetNoDeduce.type (%Class.GetNoDeduce.type.068) = fn_decl @Class.GetNoDeduce [symbolic = @Class.%Class.GetNoDeduce (constants.%Class.GetNoDeduce.4c4)] { // CHECK:STDOUT: %x.param_patt.loc20_19.1: @Class.GetNoDeduce.%pattern_type.loc20_19 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc20_19.2 (constants.%x.param_patt.91d)] // CHECK:STDOUT: %x.patt.loc20_19.1: @Class.GetNoDeduce.%pattern_type.loc20_19 (%pattern_type.51d) = wrapper_binding_pattern x, %x.param_patt.loc20_19.1 [symbolic = %x.patt.loc20_19.2 (constants.%x.patt.260)] -// CHECK:STDOUT: %U.patt.loc20_33.1: %pattern_type.9a5 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_33.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc20_33.1: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_33.2 (constants.%U.patt)] // CHECK:STDOUT: %return.param_patt.loc20_49.1: @Class.GetNoDeduce.%pattern_type.loc20_49 (%pattern_type.eee) = out_param_pattern [symbolic = %return.param_patt.loc20_49.2 (constants.%return.param_patt.a41)] // CHECK:STDOUT: %return.patt.loc20_41.1: @Class.GetNoDeduce.%pattern_type.loc20_49 (%pattern_type.eee) = return_slot_pattern %return.param_patt.loc20_49.1, %.loc20_49.4 [symbolic = %return.patt.loc20_41.2 (constants.%return.patt.453)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_45: type = specific_constant @Class.%T.loc18_14.2, @Class(constants.%T) [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.ref.loc20_45: type = name_ref T, %.loc20_45 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %.loc20_45: type = specific_constant @Class.%T.loc18_14.2, @Class(constants.%T.67d) [symbolic = %T (constants.%T.67d)] +// CHECK:STDOUT: %T.ref.loc20_45: type = name_ref T, %.loc20_45 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %U.ref.loc20_48: type = name_ref U, %U.loc20_33.2 [symbolic = %U.loc20_33.1 (constants.%U)] // CHECK:STDOUT: %.loc20_49.3: %tuple.type.693 = tuple_literal (%T.ref.loc20_45, %U.ref.loc20_48) [symbolic = %tuple (constants.%tuple.fa2)] // CHECK:STDOUT: %.loc20_49.4: type = converted %.loc20_49.3, constants.%tuple.type.a5e [symbolic = %tuple.type (constants.%tuple.type.a5e)] // CHECK:STDOUT: %.loc20_49.5: Core.Form = init_form %.loc20_49.4 [symbolic = %.loc20_49.2 (constants.%.f18)] -// CHECK:STDOUT: %x.param: @Class.GetNoDeduce.%T (%T) = value_param call_param0 -// CHECK:STDOUT: %.loc20_21.1: type = splice_block %T.ref.loc20_21 [symbolic = %T (constants.%T)] { -// CHECK:STDOUT: %.loc20_21.2: type = specific_constant @Class.%T.loc18_14.2, @Class(constants.%T) [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.ref.loc20_21: type = name_ref T, %.loc20_21.2 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %x.param: @Class.GetNoDeduce.%T (%T.67d) = value_param call_param0 +// CHECK:STDOUT: %.loc20_21.1: type = splice_block %T.ref.loc20_21 [symbolic = %T (constants.%T.67d)] { +// CHECK:STDOUT: %.loc20_21.2: type = specific_constant @Class.%T.loc18_14.2, @Class(constants.%T.67d) [symbolic = %T (constants.%T.67d)] +// CHECK:STDOUT: %T.ref.loc20_21: type = name_ref T, %.loc20_21.2 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @Class.GetNoDeduce.%T (%T) = wrapper_binding x, %x.param +// CHECK:STDOUT: %x: @Class.GetNoDeduce.%T (%T.67d) = wrapper_binding x, %x.param // CHECK:STDOUT: %.loc20_35.1: type = splice_block %.loc20_35.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc20_35.2: type = type_literal type [concrete = type] @@ -344,7 +312,7 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %return: ref @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Class.F.decl: @Class.%Class.F.type (%Class.F.type.30a) = fn_decl @Class.F [symbolic = @Class.%Class.F (constants.%Class.F.488)] { -// CHECK:STDOUT: %U.patt.loc21_9.1: %pattern_type.9a5 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc21_9.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc21_9.1: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc21_9.2 (constants.%U.patt)] // CHECK:STDOUT: %self.param_patt.loc21_21.1: @Class.F.%pattern_type.loc21_21 (%pattern_type.42e) = value_param_pattern [symbolic = %self.param_patt.loc21_21.2 (constants.%self.param_patt.e76)] // CHECK:STDOUT: %self.patt.loc21_21.1: @Class.F.%pattern_type.loc21_21 (%pattern_type.42e) = wrapper_binding_pattern self, %self.param_patt.loc21_21.1 [symbolic = %self.patt.loc21_21.2 (constants.%self.patt.d8c)] // CHECK:STDOUT: %return.param_patt.loc21_36.1: @Class.F.%pattern_type.loc21_36 (%pattern_type.946) = out_param_pattern [symbolic = %return.param_patt.loc21_36.2 (constants.%return.param_patt.6dd)] @@ -381,9 +349,9 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Class.Get(@Class.%T.loc18_14.2: type, %U.loc19_19.2: type) { -// CHECK:STDOUT: %U.patt.loc19_19.2: %pattern_type.9a5 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc19_19.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc19_19.2: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc19_19.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc19_19.1: type = symbolic_binding U, 1 [symbolic = %U.loc19_19.1 (constants.%U)] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %tuple: %tuple.type.693 = tuple_value (%T, %U.loc19_19.1) [symbolic = %tuple (constants.%tuple.fa2)] // CHECK:STDOUT: %tuple.type: type = tuple_type (%T, %U.loc19_19.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] // CHECK:STDOUT: %.loc19_35.2: Core.Form = init_form %tuple.type [symbolic = %.loc19_35.2 (constants.%.f18)] @@ -399,10 +367,10 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: @Class.Get.%tuple.type (%tuple.type.a5e) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_46: @Class.Get.%Class.Get.type (%Class.Get.type.864) = specific_constant @Class.%Class.Get.decl, @Class(constants.%T) [symbolic = %Class.Get (constants.%Class.Get.459)] +// CHECK:STDOUT: %.loc19_46: @Class.Get.%Class.Get.type (%Class.Get.type.864) = specific_constant @Class.%Class.Get.decl, @Class(constants.%T.67d) [symbolic = %Class.Get (constants.%Class.Get.459)] // CHECK:STDOUT: %Get.ref: @Class.Get.%Class.Get.type (%Class.Get.type.864) = name_ref Get, %.loc19_46 [symbolic = %Class.Get (constants.%Class.Get.459)] // CHECK:STDOUT: %U.ref.loc19_50: type = name_ref U, %U.loc19_19.2 [symbolic = %U.loc19_19.1 (constants.%U)] -// CHECK:STDOUT: %Class.Get.specific_fn.loc19_46.1: = specific_function %Get.ref, @Class.Get(constants.%T, constants.%U) [symbolic = %Class.Get.specific_fn.loc19_46.2 (constants.%Class.Get.specific_fn.dd8)] +// CHECK:STDOUT: %Class.Get.specific_fn.loc19_46.1: = specific_function %Get.ref, @Class.Get(constants.%T.67d, constants.%U) [symbolic = %Class.Get.specific_fn.loc19_46.2 (constants.%Class.Get.specific_fn.dd8)] // CHECK:STDOUT: %.loc19_35.1: ref @Class.Get.%tuple.type (%tuple.type.a5e) = splice_block %return.param {} // CHECK:STDOUT: %Class.Get.call: init @Class.Get.%tuple.type (%tuple.type.a5e) to %.loc19_35.1 = call %Class.Get.specific_fn.loc19_46.1() // CHECK:STDOUT: return %Class.Get.call to %return.param @@ -410,11 +378,11 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Class.GetNoDeduce(@Class.%T.loc18_14.2: type, %U.loc20_33.2: type) { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %pattern_type.loc20_19: type = pattern_type %T [symbolic = %pattern_type.loc20_19 (constants.%pattern_type.51d)] // CHECK:STDOUT: %x.param_patt.loc20_19.2: @Class.GetNoDeduce.%pattern_type.loc20_19 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc20_19.2 (constants.%x.param_patt.91d)] // CHECK:STDOUT: %x.patt.loc20_19.2: @Class.GetNoDeduce.%pattern_type.loc20_19 (%pattern_type.51d) = wrapper_binding_pattern x, %x.param_patt.loc20_19.2 [symbolic = %x.patt.loc20_19.2 (constants.%x.patt.260)] -// CHECK:STDOUT: %U.patt.loc20_33.2: %pattern_type.9a5 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_33.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc20_33.2: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc20_33.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc20_33.1: type = symbolic_binding U, 1 [symbolic = %U.loc20_33.1 (constants.%U)] // CHECK:STDOUT: %tuple: %tuple.type.693 = tuple_value (%T, %U.loc20_33.1) [symbolic = %tuple (constants.%tuple.fa2)] // CHECK:STDOUT: %tuple.type: type = tuple_type (%T, %U.loc20_33.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] @@ -429,13 +397,13 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %Class.GetNoDeduce: @Class.GetNoDeduce.%Class.GetNoDeduce.type (%Class.GetNoDeduce.type.068) = struct_value () [symbolic = %Class.GetNoDeduce (constants.%Class.GetNoDeduce.4c4)] // CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.loc20_60.2: = specific_function %Class.GetNoDeduce, @Class.GetNoDeduce(%T, %U.loc20_33.1) [symbolic = %Class.GetNoDeduce.specific_fn.loc20_60.2 (constants.%Class.GetNoDeduce.specific_fn.e34)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @Class.GetNoDeduce.%T (%T)) -> out %return.param: @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) { +// CHECK:STDOUT: fn(%x.param: @Class.GetNoDeduce.%T (%T.67d)) -> out %return.param: @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20_60: @Class.GetNoDeduce.%Class.GetNoDeduce.type (%Class.GetNoDeduce.type.068) = specific_constant @Class.%Class.GetNoDeduce.decl, @Class(constants.%T) [symbolic = %Class.GetNoDeduce (constants.%Class.GetNoDeduce.4c4)] +// CHECK:STDOUT: %.loc20_60: @Class.GetNoDeduce.%Class.GetNoDeduce.type (%Class.GetNoDeduce.type.068) = specific_constant @Class.%Class.GetNoDeduce.decl, @Class(constants.%T.67d) [symbolic = %Class.GetNoDeduce (constants.%Class.GetNoDeduce.4c4)] // CHECK:STDOUT: %GetNoDeduce.ref: @Class.GetNoDeduce.%Class.GetNoDeduce.type (%Class.GetNoDeduce.type.068) = name_ref GetNoDeduce, %.loc20_60 [symbolic = %Class.GetNoDeduce (constants.%Class.GetNoDeduce.4c4)] -// CHECK:STDOUT: %x.ref: @Class.GetNoDeduce.%T (%T) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @Class.GetNoDeduce.%T (%T.67d) = name_ref x, %x // CHECK:STDOUT: %U.ref.loc20_75: type = name_ref U, %U.loc20_33.2 [symbolic = %U.loc20_33.1 (constants.%U)] -// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.loc20_60.1: = specific_function %GetNoDeduce.ref, @Class.GetNoDeduce(constants.%T, constants.%U) [symbolic = %Class.GetNoDeduce.specific_fn.loc20_60.2 (constants.%Class.GetNoDeduce.specific_fn.e34)] +// CHECK:STDOUT: %Class.GetNoDeduce.specific_fn.loc20_60.1: = specific_function %GetNoDeduce.ref, @Class.GetNoDeduce(constants.%T.67d, constants.%U) [symbolic = %Class.GetNoDeduce.specific_fn.loc20_60.2 (constants.%Class.GetNoDeduce.specific_fn.e34)] // CHECK:STDOUT: %.loc20_49.1: ref @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) = splice_block %return.param {} // CHECK:STDOUT: %Class.GetNoDeduce.call: init @Class.GetNoDeduce.%tuple.type (%tuple.type.a5e) to %.loc20_49.1 = call %Class.GetNoDeduce.specific_fn.loc20_60.1(%x.ref) // CHECK:STDOUT: return %Class.GetNoDeduce.call to %return.param @@ -443,7 +411,7 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Class.F(@Class.%T.loc18_14.2: type, %U.loc21_9.2: type) { -// CHECK:STDOUT: %U.patt.loc21_9.2: %pattern_type.9a5 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc21_9.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc21_9.2: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc21_9.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc21_9.1: type = symbolic_binding U, 1 [symbolic = %U.loc21_9.1 (constants.%U)] // CHECK:STDOUT: %Class.loc21_30.1: type = class_type @Class, @Class(%U.loc21_9.1) [symbolic = %Class.loc21_30.1 (constants.%Class.9fc)] // CHECK:STDOUT: %pattern_type.loc21_21: type = pattern_type %Class.loc21_30.1 [symbolic = %pattern_type.loc21_21 (constants.%pattern_type.42e)] @@ -501,31 +469,18 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %.loc29_25.5: ref %A = temporary %.loc29_25.2, %.loc29_25.4 [concrete = constants.%.367] // CHECK:STDOUT: %.loc29_25.6: %A = acquire_value %.loc29_25.5 [concrete = constants.%A.val] // CHECK:STDOUT: %Class.GetNoDeduce.call: init %tuple.type.1e7 to %.loc28_62.1 = call %Class.GetNoDeduce.specific_fn(%.loc29_25.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.367) +// CHECK:STDOUT: %Destroy.facet.loc29_25.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc29_25.7: %Destroy.type = converted constants.%A, %Destroy.facet.loc29_25.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc29_25.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc29_25.8: %Destroy.type = converted constants.%A, %Destroy.facet.loc29_25.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc29_25.5) // CHECK:STDOUT: return %Class.GetNoDeduce.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc29_25.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc29_25.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc29_25.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc29_25.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc29_25.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc29_25.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @CallMethodSelfDeduce(%c.param: %Class.f8f) -> out %return.param: %A { // CHECK:STDOUT: !entry: @@ -540,9 +495,9 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: return %Class.F.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%T) { -// CHECK:STDOUT: %T.patt.loc18_14.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc18_14.1 => constants.%T +// CHECK:STDOUT: specific @Class(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc18_14.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc18_14.1 => constants.%T.67d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class.Get.type => constants.%Class.Get.type.864 @@ -553,10 +508,10 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %Class.F => constants.%Class.F.488 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class.Get(constants.%T, constants.%U) { +// CHECK:STDOUT: specific @Class.Get(constants.%T.67d, constants.%U) { // CHECK:STDOUT: %U.patt.loc19_19.2 => constants.%U.patt // CHECK:STDOUT: %U.loc19_19.1 => constants.%U -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %tuple => constants.%tuple.fa2 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.a5e // CHECK:STDOUT: %.loc19_35.2 => constants.%.f18 @@ -571,8 +526,8 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %Class.Get.specific_fn.loc19_46.2 => constants.%Class.Get.specific_fn.dd8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class.GetNoDeduce(constants.%T, constants.%U) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @Class.GetNoDeduce(constants.%T.67d, constants.%U) { +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %pattern_type.loc20_19 => constants.%pattern_type.51d // CHECK:STDOUT: %x.param_patt.loc20_19.2 => constants.%x.param_patt.91d // CHECK:STDOUT: %x.patt.loc20_19.2 => constants.%x.patt.260 @@ -593,7 +548,7 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%U) { -// CHECK:STDOUT: %T.patt.loc18_14.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc18_14.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc18_14.1 => constants.%U // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -605,7 +560,7 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: %Class.F => constants.%Class.F.9b4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class.F(constants.%T, constants.%U) { +// CHECK:STDOUT: specific @Class.F(constants.%T.67d, constants.%U) { // CHECK:STDOUT: %U.patt.loc21_9.2 => constants.%U.patt // CHECK:STDOUT: %U.loc21_9.1 => constants.%U // CHECK:STDOUT: %Class.loc21_30.1 => constants.%Class.9fc @@ -638,7 +593,7 @@ fn CallMethodSelfDeduce(c: Class(A)) -> A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%A) { -// CHECK:STDOUT: %T.patt.loc18_14.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc18_14.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc18_14.1 => constants.%A // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/class/generic/self.carbon b/toolchain/check/testdata/class/generic/self.carbon index 25cc6e9996a4..b0cc779993c7 100644 --- a/toolchain/check/testdata/class/generic/self.carbon +++ b/toolchain/check/testdata/class/generic/self.carbon @@ -29,22 +29,22 @@ class Class(T: type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = parameterized_class_name_type @Class [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.67d) [symbolic] // CHECK:STDOUT: %.917: Core.Form = init_form %Class [symbolic] // CHECK:STDOUT: %pattern_type.28f: type = pattern_type %Class [symbolic] // CHECK:STDOUT: %return.param_patt: %pattern_type.28f = out_param_pattern [symbolic] // CHECK:STDOUT: %return.patt: %pattern_type.28f = return_slot_pattern %return.param_patt, %Class [symbolic] -// CHECK:STDOUT: %Class.MakeSelf.type: type = fn_type @Class.MakeSelf, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.MakeSelf.type: type = fn_type @Class.MakeSelf, @Class(%T.67d) [symbolic] // CHECK:STDOUT: %Class.MakeSelf: %Class.MakeSelf.type = struct_value () [symbolic] -// CHECK:STDOUT: %Class.MakeClass.type: type = fn_type @Class.MakeClass, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.MakeClass.type: type = fn_type @Class.MakeClass, @Class(%T.67d) [symbolic] // CHECK:STDOUT: %Class.MakeClass: %Class.MakeClass.type = struct_value () [symbolic] -// CHECK:STDOUT: %Class.F.type: type = fn_type @Class.F, @Class(%T) [symbolic] +// CHECK:STDOUT: %Class.F.type: type = fn_type @Class.F, @Class(%T.67d) [symbolic] // CHECK:STDOUT: %Class.F: %Class.F.type = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -53,50 +53,29 @@ class Class(T: type) { // CHECK:STDOUT: %Class.val: %Class = struct_value () [symbolic] // CHECK:STDOUT: %c.patt: %pattern_type.28f = ref_binding_pattern c [symbolic] // CHECK:STDOUT: %c.var_patt: %pattern_type.28f = var_pattern %c.patt [symbolic] -// CHECK:STDOUT: %Class.MakeSelf.specific_fn: = specific_function %Class.MakeSelf, @Class.MakeSelf(%T) [symbolic] +// CHECK:STDOUT: %Class.MakeSelf.specific_fn: = specific_function %Class.MakeSelf, @Class.MakeSelf(%T.67d) [symbolic] // CHECK:STDOUT: %s.patt: %pattern_type.28f = ref_binding_pattern s [symbolic] // CHECK:STDOUT: %s.var_patt: %pattern_type.28f = var_pattern %s.patt [symbolic] -// CHECK:STDOUT: %Class.MakeClass.specific_fn: = specific_function %Class.MakeClass, @Class.MakeClass(%T) [symbolic] +// CHECK:STDOUT: %Class.MakeClass.specific_fn: = specific_function %Class.MakeClass, @Class.MakeClass(%T.67d) [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.2e8: = lookup_impl_witness %Class, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.8c8: %Destroy.type = facet_value %Class, (%Destroy.lookup_impl_witness.2e8) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.819: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.8c8) [symbolic] -// CHECK:STDOUT: %.ed3: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.819, %Destroy.facet.8c8 [symbolic] -// CHECK:STDOUT: %impl.elem2: %.ed3 = impl_witness_access %Destroy.lookup_impl_witness.2e8, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.08e: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.8c8) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.cc4: = lookup_impl_witness %Class, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.bb5: = lookup_impl_witness %Class, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.b2a: %SubobjectDestroy.type = facet_value %Class, (%SubobjectDestroy.lookup_impl_witness.bb5) [symbolic] +// CHECK:STDOUT: %.6e3: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b2a) [symbolic] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class, (%DestroyImpl.lookup_impl_witness.cc4, %SubobjectDestroy.lookup_impl_witness.bb5) [symbolic] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -106,19 +85,19 @@ class Class(T: type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Class.decl: %Class.type = class_decl @Class [concrete = constants.%Class.generic] { -// CHECK:STDOUT: %T.patt.loc15_14.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc15_14.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc15_16.1: type = splice_block %.loc15_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc15_16.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc15_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.1 (constants.%T)] +// CHECK:STDOUT: %T.loc15_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Class(%T.loc15_14.2: type) { -// CHECK:STDOUT: %T.patt.loc15_14.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc15_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc15_14.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_14.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc15_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_14.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class.MakeSelf.type: type = fn_type @Class.MakeSelf, @Class(%T.loc15_14.1) [symbolic = %Class.MakeSelf.type (constants.%Class.MakeSelf.type)] @@ -133,7 +112,7 @@ class Class(T: type) { // CHECK:STDOUT: %return.param_patt.loc18_20.1: @Class.MakeSelf.%pattern_type (%pattern_type.28f) = out_param_pattern [symbolic = %return.param_patt.loc18_20.2 (constants.%return.param_patt)] // CHECK:STDOUT: %return.patt.loc18_17.1: @Class.MakeSelf.%pattern_type (%pattern_type.28f) = return_slot_pattern %return.param_patt.loc18_20.1, %Self.ref [symbolic = %return.patt.loc18_17.2 (constants.%return.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_20.2: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %.loc18_20.2: type = specific_constant constants.%Class, @Class(constants.%T.67d) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc18_20.2 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %.loc18_20.3: Core.Form = init_form %Self.ref [symbolic = %.loc18_20.1 (constants.%.917)] // CHECK:STDOUT: %return.param: ref @Class.MakeSelf.%Class (%Class) = out_param call_param0 @@ -144,9 +123,9 @@ class Class(T: type) { // CHECK:STDOUT: %return.patt.loc19_18.1: @Class.MakeClass.%pattern_type (%pattern_type.28f) = return_slot_pattern %return.param_patt.loc19_28.1, %Class.loc19_28.2 [symbolic = %return.patt.loc19_18.2 (constants.%return.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %.loc19_27: type = specific_constant @Class.%T.loc15_14.2, @Class(constants.%T) [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc19_27 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc19_28.2: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc19_28.1 (constants.%Class)] +// CHECK:STDOUT: %.loc19_27: type = specific_constant @Class.%T.loc15_14.2, @Class(constants.%T.67d) [symbolic = %T (constants.%T.67d)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc19_27 [symbolic = %T (constants.%T.67d)] +// CHECK:STDOUT: %Class.loc19_28.2: type = class_type @Class, @Class(constants.%T.67d) [symbolic = %Class.loc19_28.1 (constants.%Class)] // CHECK:STDOUT: %.loc19_28.2: Core.Form = init_form %Class.loc19_28.2 [symbolic = %.loc19_28.1 (constants.%.917)] // CHECK:STDOUT: %return.param: ref @Class.MakeClass.%Class.loc19_28.1 (%Class) = out_param call_param0 // CHECK:STDOUT: %return: ref @Class.MakeClass.%Class.loc19_28.1 (%Class) = return_slot %return.param @@ -166,7 +145,7 @@ class Class(T: type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Class.MakeSelf(@Class.%T.loc15_14.2: type) { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %.loc18_20.1: Core.Form = init_form %Class [symbolic = %.loc18_20.1 (constants.%.917)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Class [symbolic = %pattern_type (constants.%pattern_type.28f)] @@ -187,7 +166,7 @@ class Class(T: type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Class.MakeClass(@Class.%T.loc15_14.2: type) { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %Class.loc19_28.1: type = class_type @Class, @Class(%T) [symbolic = %Class.loc19_28.1 (constants.%Class)] // CHECK:STDOUT: %.loc19_28.1: Core.Form = init_form %Class.loc19_28.1 [symbolic = %.loc19_28.1 (constants.%.917)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Class.loc19_28.1 [symbolic = %pattern_type (constants.%pattern_type.28f)] @@ -209,7 +188,7 @@ class Class(T: type) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Class.F(@Class.%T.loc15_14.2: type) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %Class.loc21_26.2: type = class_type @Class, @Class(%T) [symbolic = %Class.loc21_26.2 (constants.%Class)] // CHECK:STDOUT: %require_complete: = require_complete_type %Class.loc21_26.2 [symbolic = %require_complete (constants.%require_complete.ac0)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Class.loc21_26.2 [symbolic = %pattern_type (constants.%pattern_type.28f)] @@ -223,27 +202,27 @@ class Class(T: type) { // CHECK:STDOUT: %Class.MakeClass.type: type = fn_type @Class.MakeClass, @Class(%T) [symbolic = %Class.MakeClass.type (constants.%Class.MakeClass.type)] // CHECK:STDOUT: %Class.MakeClass: @Class.F.%Class.MakeClass.type (%Class.MakeClass.type) = struct_value () [symbolic = %Class.MakeClass (constants.%Class.MakeClass)] // CHECK:STDOUT: %Class.MakeClass.specific_fn.loc22_26.2: = specific_function %Class.MakeClass, @Class.MakeClass(%T) [symbolic = %Class.MakeClass.specific_fn.loc22_26.2 (constants.%Class.MakeClass.specific_fn)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Class.loc21_26.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.2e8)] -// CHECK:STDOUT: %Destroy.facet.loc22_5.3: %Destroy.type = facet_value %Class.loc21_26.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet.8c8)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc22_5.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.819)] -// CHECK:STDOUT: %.loc22_5.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc22_5.3 [symbolic = %.loc22_5.4 (constants.%.ed3)] -// CHECK:STDOUT: %impl.elem2.loc22_5.2: @Class.F.%.loc22_5.4 (%.ed3) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc22_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc22_5.2: = specific_impl_function %impl.elem2.loc22_5.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc22_5.3) [symbolic = %specific_impl_fn.loc22_5.2 (constants.%specific_impl_fn.08e)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %Class.loc21_26.2, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.bb5)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %Class.loc21_26.2, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.b2a)] +// CHECK:STDOUT: %.loc22_5.4: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc22_5.4 (constants.%.6e3)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %Class.loc21_26.2, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.cc4)] +// CHECK:STDOUT: %Destroy.facet.loc22_5.3: %Destroy.type = facet_value %Class.loc21_26.2, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(%Destroy.facet.loc22_5.3) [symbolic = %SelfDestruct.specific_fn.3 (constants.%SelfDestruct.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.var: ref @Class.F.%Class.loc21_26.2 (%Class) = var_storage %c.var_patt.loc21_5.1 -// CHECK:STDOUT: %.loc21_30: @Class.F.%Class.MakeSelf.type (%Class.MakeSelf.type) = specific_constant @Class.%Class.MakeSelf.decl, @Class(constants.%T) [symbolic = %Class.MakeSelf (constants.%Class.MakeSelf)] +// CHECK:STDOUT: %.loc21_30: @Class.F.%Class.MakeSelf.type (%Class.MakeSelf.type) = specific_constant @Class.%Class.MakeSelf.decl, @Class(constants.%T.67d) [symbolic = %Class.MakeSelf (constants.%Class.MakeSelf)] // CHECK:STDOUT: %MakeSelf.ref: @Class.F.%Class.MakeSelf.type (%Class.MakeSelf.type) = name_ref MakeSelf, %.loc21_30 [symbolic = %Class.MakeSelf (constants.%Class.MakeSelf)] -// CHECK:STDOUT: %Class.MakeSelf.specific_fn.loc21_30.1: = specific_function %MakeSelf.ref, @Class.MakeSelf(constants.%T) [symbolic = %Class.MakeSelf.specific_fn.loc21_30.2 (constants.%Class.MakeSelf.specific_fn)] +// CHECK:STDOUT: %Class.MakeSelf.specific_fn.loc21_30.1: = specific_function %MakeSelf.ref, @Class.MakeSelf(constants.%T.67d) [symbolic = %Class.MakeSelf.specific_fn.loc21_30.2 (constants.%Class.MakeSelf.specific_fn)] // CHECK:STDOUT: %.loc21_5.1: ref @Class.F.%Class.loc21_26.2 (%Class) = splice_block %c.var {} // CHECK:STDOUT: %Class.MakeSelf.call: init @Class.F.%Class.loc21_26.2 (%Class) to %.loc21_5.1 = call %Class.MakeSelf.specific_fn.loc21_30.1() // CHECK:STDOUT: assign %c.var, %Class.MakeSelf.call // CHECK:STDOUT: %.loc21_26: type = splice_block %Class.loc21_26.1 [symbolic = %Class.loc21_26.2 (constants.%Class)] { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic] -// CHECK:STDOUT: %.loc21_25: type = specific_constant @Class.%T.loc15_14.2, @Class(constants.%T) [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc21_25 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc21_26.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc21_26.2 (constants.%Class)] +// CHECK:STDOUT: %.loc21_25: type = specific_constant @Class.%T.loc15_14.2, @Class(constants.%T.67d) [symbolic = %T (constants.%T.67d)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc21_25 [symbolic = %T (constants.%T.67d)] +// CHECK:STDOUT: %Class.loc21_26.1: type = class_type @Class, @Class(constants.%T.67d) [symbolic = %Class.loc21_26.2 (constants.%Class)] // CHECK:STDOUT: } // CHECK:STDOUT: %c: ref @Class.F.%Class.loc21_26.2 (%Class) = wrapper_binding c, %c.var // CHECK:STDOUT: name_binding_decl { @@ -251,14 +230,14 @@ class Class(T: type) { // CHECK:STDOUT: %c.var_patt.loc21_5.1: @Class.F.%pattern_type (%pattern_type.28f) = var_pattern %c.patt.loc21_17.1 [symbolic = %c.var_patt.loc21_5.2 (constants.%c.var_patt)] // CHECK:STDOUT: } // CHECK:STDOUT: %s.var: ref @Class.F.%Class.loc21_26.2 (%Class) = var_storage %s.var_patt.loc22_5.1 -// CHECK:STDOUT: %.loc22_26: @Class.F.%Class.MakeClass.type (%Class.MakeClass.type) = specific_constant @Class.%Class.MakeClass.decl, @Class(constants.%T) [symbolic = %Class.MakeClass (constants.%Class.MakeClass)] +// CHECK:STDOUT: %.loc22_26: @Class.F.%Class.MakeClass.type (%Class.MakeClass.type) = specific_constant @Class.%Class.MakeClass.decl, @Class(constants.%T.67d) [symbolic = %Class.MakeClass (constants.%Class.MakeClass)] // CHECK:STDOUT: %MakeClass.ref: @Class.F.%Class.MakeClass.type (%Class.MakeClass.type) = name_ref MakeClass, %.loc22_26 [symbolic = %Class.MakeClass (constants.%Class.MakeClass)] -// CHECK:STDOUT: %Class.MakeClass.specific_fn.loc22_26.1: = specific_function %MakeClass.ref, @Class.MakeClass(constants.%T) [symbolic = %Class.MakeClass.specific_fn.loc22_26.2 (constants.%Class.MakeClass.specific_fn)] +// CHECK:STDOUT: %Class.MakeClass.specific_fn.loc22_26.1: = specific_function %MakeClass.ref, @Class.MakeClass(constants.%T.67d) [symbolic = %Class.MakeClass.specific_fn.loc22_26.2 (constants.%Class.MakeClass.specific_fn)] // CHECK:STDOUT: %.loc22_5.1: ref @Class.F.%Class.loc21_26.2 (%Class) = splice_block %s.var {} // CHECK:STDOUT: %Class.MakeClass.call: init @Class.F.%Class.loc21_26.2 (%Class) to %.loc22_5.1 = call %Class.MakeClass.specific_fn.loc22_26.1() // CHECK:STDOUT: assign %s.var, %Class.MakeClass.call // CHECK:STDOUT: %.loc22_19.1: type = splice_block %Self.ref [symbolic = %Class.loc21_26.2 (constants.%Class)] { -// CHECK:STDOUT: %.loc22_19.2: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class.loc21_26.2 (constants.%Class)] +// CHECK:STDOUT: %.loc22_19.2: type = specific_constant constants.%Class, @Class(constants.%T.67d) [symbolic = %Class.loc21_26.2 (constants.%Class)] // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc22_19.2 [symbolic = %Class.loc21_26.2 (constants.%Class)] // CHECK:STDOUT: } // CHECK:STDOUT: %s: ref @Class.F.%Class.loc21_26.2 (%Class) = wrapper_binding s, %s.var @@ -266,42 +245,27 @@ class Class(T: type) { // CHECK:STDOUT: %s.patt.loc22_17.1: @Class.F.%pattern_type (%pattern_type.28f) = ref_binding_pattern s [symbolic = %s.patt.loc22_17.2 (constants.%s.patt)] // CHECK:STDOUT: %s.var_patt.loc22_5.1: @Class.F.%pattern_type (%pattern_type.28f) = var_pattern %s.patt.loc22_17.1 [symbolic = %s.var_patt.loc22_5.2 (constants.%s.var_patt)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem2.loc22_5.1: @Class.F.%.loc22_5.4 (%.ed3) = impl_witness_access constants.%Destroy.lookup_impl_witness.2e8, element2 [symbolic = %impl.elem2.loc22_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc22_5.1: = bound_method %s.var, %impl.elem2.loc22_5.1 -// CHECK:STDOUT: %Destroy.facet.loc22_5.1: %Destroy.type = facet_value constants.%Class, (constants.%Destroy.lookup_impl_witness.2e8) [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet.8c8)] -// CHECK:STDOUT: %.loc22_5.2: %Destroy.type = converted constants.%Class, %Destroy.facet.loc22_5.1 [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet.8c8)] -// CHECK:STDOUT: %Destroy.facet.loc22_5.2: %Destroy.type = facet_value constants.%Class, (constants.%Destroy.lookup_impl_witness.2e8) [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet.8c8)] -// CHECK:STDOUT: %.loc22_5.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc22_5.2 [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet.8c8)] -// CHECK:STDOUT: %specific_impl_fn.loc22_5.1: = specific_impl_function %impl.elem2.loc22_5.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.8c8) [symbolic = %specific_impl_fn.loc22_5.2 (constants.%specific_impl_fn.08e)] -// CHECK:STDOUT: %bound_method.loc22_5.2: = bound_method %s.var, %specific_impl_fn.loc22_5.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %bound_method.loc22_5.2(%s.var) -// CHECK:STDOUT: %impl.elem2.loc21: @Class.F.%.loc22_5.4 (%.ed3) = impl_witness_access constants.%Destroy.lookup_impl_witness.2e8, element2 [symbolic = %impl.elem2.loc22_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc21_5.1: = bound_method %c.var, %impl.elem2.loc21 -// CHECK:STDOUT: %Destroy.facet.loc21_5.1: %Destroy.type = facet_value constants.%Class, (constants.%Destroy.lookup_impl_witness.2e8) [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet.8c8)] -// CHECK:STDOUT: %.loc21_5.2: %Destroy.type = converted constants.%Class, %Destroy.facet.loc21_5.1 [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet.8c8)] -// CHECK:STDOUT: %Destroy.facet.loc21_5.2: %Destroy.type = facet_value constants.%Class, (constants.%Destroy.lookup_impl_witness.2e8) [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet.8c8)] -// CHECK:STDOUT: %.loc21_5.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc21_5.2 [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet.8c8)] -// CHECK:STDOUT: %specific_impl_fn.loc21: = specific_impl_function %impl.elem2.loc21, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.8c8) [symbolic = %specific_impl_fn.loc22_5.2 (constants.%specific_impl_fn.08e)] -// CHECK:STDOUT: %bound_method.loc21_5.2: = bound_method %c.var, %specific_impl_fn.loc21 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21: init %empty_tuple.type = call %bound_method.loc21_5.2(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc22_5.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.lookup_impl_witness.cc4, constants.%SubobjectDestroy.lookup_impl_witness.bb5) [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %.loc22_5.2: %Destroy.type = converted constants.%Class, %Destroy.facet.loc22_5.1 [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %Destroy.facet.loc22_5.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.lookup_impl_witness.cc4, constants.%SubobjectDestroy.lookup_impl_witness.bb5) [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %.loc22_5.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc22_5.2 [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [symbolic = %SelfDestruct.specific_fn.3 (constants.%SelfDestruct.specific_fn)] +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc21_5.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.lookup_impl_witness.cc4, constants.%SubobjectDestroy.lookup_impl_witness.bb5) [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %.loc21_5.2: %Destroy.type = converted constants.%Class, %Destroy.facet.loc21_5.1 [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %Destroy.facet.loc21_5.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.lookup_impl_witness.cc4, constants.%SubobjectDestroy.lookup_impl_witness.bb5) [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %.loc21_5.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc21_5.2 [symbolic = %Destroy.facet.loc22_5.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [symbolic = %SelfDestruct.specific_fn.3 (constants.%SelfDestruct.specific_fn)] +// CHECK:STDOUT: %SelfDestruct.call.loc21: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%c.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%T) { -// CHECK:STDOUT: %T.patt.loc15_14.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc15_14.1 => constants.%T +// CHECK:STDOUT: specific @Class(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc15_14.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc15_14.1 => constants.%T.67d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class.MakeSelf.type => constants.%Class.MakeSelf.type @@ -312,8 +276,8 @@ class Class(T: type) { // CHECK:STDOUT: %Class.F => constants.%Class.F // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class.MakeSelf(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @Class.MakeSelf(constants.%T.67d) { +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: %.loc18_20.1 => constants.%.917 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.28f @@ -325,8 +289,8 @@ class Class(T: type) { // CHECK:STDOUT: %Class.val => constants.%Class.val // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class.MakeClass(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @Class.MakeClass(constants.%T.67d) { +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %Class.loc19_28.1 => constants.%Class // CHECK:STDOUT: %.loc19_28.1 => constants.%.917 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.28f @@ -338,5 +302,5 @@ class Class(T: type) { // CHECK:STDOUT: %Class.val => constants.%Class.val // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class.F(constants.%T) {} +// CHECK:STDOUT: specific @Class.F(constants.%T.67d) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index 101fd753feea..a2244a0c9352 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -198,7 +198,6 @@ fn Run() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3bd: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] @@ -217,8 +216,6 @@ fn Run() { // CHECK:STDOUT: %ForwardDeclared.F: %ForwardDeclared.F.type = struct_value () [concrete] // CHECK:STDOUT: %ForwardDeclared.G.type: type = fn_type @ForwardDeclared.G [concrete] // CHECK:STDOUT: %ForwardDeclared.G: %ForwardDeclared.G.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a42: %pattern_type.bdf = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d7c: %pattern_type.bdf = wrapper_binding_pattern self, %self.param_patt.a42 [concrete] // CHECK:STDOUT: %ptr.11e: type = ptr_type %ForwardDeclared.08bd4c.1 [concrete] // CHECK:STDOUT: %pattern_type.8cd: type = pattern_type %ptr.11e [concrete] // CHECK:STDOUT: %d.patt: %pattern_type.8cd = ref_binding_pattern d [concrete] @@ -247,67 +244,55 @@ fn Run() { // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.e2d: %T.as.DefaultOrUnformed.impl.Op.type.4bb = struct_value () [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %ptr.06d, (%DefaultOrUnformed.impl_witness.c74) [concrete] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function %T.as.DefaultOrUnformed.impl.Op.e2d, @T.as.DefaultOrUnformed.impl.Op(%ptr.06d) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.5cd: %pattern_type.bae = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.71b: %pattern_type.bae = wrapper_binding_pattern self, %self.param_patt.5cd [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.4bc: %pattern_type.8cd = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.872: %pattern_type.8cd = wrapper_binding_pattern self, %self.param_patt.4bc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc12_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.38e: type = pattern_type %struct_type.x.991 [concrete] -// CHECK:STDOUT: %self.param_patt.eec: %pattern_type.38e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0ef: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt.eec [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.80c: %pattern_type.f17 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.c40: %pattern_type.f17 = wrapper_binding_pattern self, %self.param_patt.80c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.7: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.14f: %pattern_type.47a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.97c: %pattern_type.47a = wrapper_binding_pattern self, %self.param_patt.14f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.8: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.704: %SubobjectDestroy.type = facet_value %ptr.06d, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.737: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.704) [concrete] +// CHECK:STDOUT: %Destroy.facet.835: %Destroy.type = facet_value %ptr.06d, (%DestroyImpl.impl_witness.737, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.f9a: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.835) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a83: %SubobjectDestroy.type = facet_value %ptr.11e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.169: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a83) [concrete] +// CHECK:STDOUT: %Destroy.facet.8ec: %Destroy.type = facet_value %ptr.11e, (%DestroyImpl.impl_witness.169, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c04: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.8ec) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc12_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b3d: %SubobjectDestroy.type = facet_value %ForwardDeclared.08bd4c.1, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.8f4: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b3d) [concrete] +// CHECK:STDOUT: %Destroy.facet.508: %Destroy.type = facet_value %ForwardDeclared.08bd4c.1, (%DestroyImpl.impl_witness.8f4, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c45: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.508) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b25: %SubobjectDestroy.type = facet_value %Field, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.fa9: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b25) [concrete] +// CHECK:STDOUT: %Destroy.facet.a02: %Destroy.type = facet_value %Field, (%DestroyImpl.impl_witness.fa9, %custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.244: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.a02) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.8: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.8: %SubobjectDestroy.WithSelf.Op.type.6870fd.8 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.8: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.8), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.1cc: %SubobjectDestroy.type = facet_value %Empty, (%custom_witness.b80ef6.8) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.2b2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.1cc) [concrete] +// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %Empty, (%DestroyImpl.impl_witness.2b2, %custom_witness.b80ef6.8) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.ed7: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.e46) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -319,7 +304,7 @@ fn Run() { // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -347,122 +332,9 @@ fn Run() { // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] // CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bae = ref_param_pattern [concrete = constants.%self.param_patt.5cd] -// CHECK:STDOUT: %self.patt: %pattern_type.bae = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.71b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.06d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.06d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc18 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bae = ref_param_pattern [concrete = constants.%self.param_patt.5cd] -// CHECK:STDOUT: %self.patt: %pattern_type.bae = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.71b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.06d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.06d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8cd = ref_param_pattern [concrete = constants.%self.param_patt.4bc] -// CHECK:STDOUT: %self.patt: %pattern_type.8cd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.872] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.11e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.11e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8cd = ref_param_pattern [concrete = constants.%self.param_patt.4bc] -// CHECK:STDOUT: %self.patt: %pattern_type.8cd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.872] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.11e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.11e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc12_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bdf = ref_param_pattern [concrete = constants.%self.param_patt.a42] -// CHECK:STDOUT: %self.patt: %pattern_type.bdf = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d7c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ForwardDeclared.08bd4c.1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ForwardDeclared.08bd4c.1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc12_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bdf = ref_param_pattern [concrete = constants.%self.param_patt.a42] -// CHECK:STDOUT: %self.patt: %pattern_type.bdf = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d7c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ForwardDeclared.08bd4c.1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ForwardDeclared.08bd4c.1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.38e = ref_param_pattern [concrete = constants.%self.param_patt.eec] -// CHECK:STDOUT: %self.patt: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0ef] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.x.991 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.x.991 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.38e = ref_param_pattern [concrete = constants.%self.param_patt.eec] -// CHECK:STDOUT: %self.patt: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0ef] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.x.991 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.x.991 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f17 = ref_param_pattern [concrete = constants.%self.param_patt.80c] -// CHECK:STDOUT: %self.patt: %pattern_type.f17 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c40] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Field = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Field = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f17 = ref_param_pattern [concrete = constants.%self.param_patt.80c] -// CHECK:STDOUT: %self.patt: %pattern_type.f17 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c40] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Field = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Field = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.47a = ref_param_pattern [concrete = constants.%self.param_patt.14f] -// CHECK:STDOUT: %self.patt: %pattern_type.47a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.97c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Empty = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Empty = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.8: %Destroy.WithSelf.Op.type.ef016f.8 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403171.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.47a = ref_param_pattern [concrete = constants.%self.param_patt.14f] -// CHECK:STDOUT: %self.patt: %pattern_type.47a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.97c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Empty = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Empty = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -519,8 +391,8 @@ fn Run() { // CHECK:STDOUT: %a.var: ref %Empty = var_storage %a.var_patt // CHECK:STDOUT: %.loc7_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_26.2: init %Empty to %a.var = class_init () [concrete = constants.%Empty.val] -// CHECK:STDOUT: %.loc7_3: init %Empty = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Empty.val] -// CHECK:STDOUT: assign %a.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %Empty = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Empty.val] +// CHECK:STDOUT: assign %a.var, %.loc7_3.1 // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, imports.%Main.Empty [concrete = constants.%Empty] // CHECK:STDOUT: %a: ref %Empty = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -539,8 +411,8 @@ fn Run() { // CHECK:STDOUT: %.loc9_25.3: ref %i32 = class_element_access %b.var, element0 // CHECK:STDOUT: %.loc9_25.4: init %i32 to %.loc9_25.3 = in_place_init %.loc9_25.2 [concrete = constants.%int_1.68a] // CHECK:STDOUT: %.loc9_25.5: init %Field to %b.var = class_init (%.loc9_25.4) [concrete = constants.%Field.val] -// CHECK:STDOUT: %.loc9_3: init %Field = converted %.loc9_25.1, %.loc9_25.5 [concrete = constants.%Field.val] -// CHECK:STDOUT: assign %b.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %Field = converted %.loc9_25.1, %.loc9_25.5 [concrete = constants.%Field.val] +// CHECK:STDOUT: assign %b.var, %.loc9_3.1 // CHECK:STDOUT: %Field.ref: type = name_ref Field, imports.%Main.Field [concrete = constants.%Field] // CHECK:STDOUT: %b: ref %Field = wrapper_binding b, %b.var // CHECK:STDOUT: name_binding_decl { @@ -561,8 +433,8 @@ fn Run() { // CHECK:STDOUT: %c.var: ref %ForwardDeclared.08bd4c.1 = var_storage %c.var_patt // CHECK:STDOUT: %.loc12_29.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc12_29.2: init %ForwardDeclared.08bd4c.1 to %c.var = class_init () [concrete = constants.%ForwardDeclared.val] -// CHECK:STDOUT: %.loc12_3: init %ForwardDeclared.08bd4c.1 = converted %.loc12_29.1, %.loc12_29.2 [concrete = constants.%ForwardDeclared.val] -// CHECK:STDOUT: assign %c.var, %.loc12_3 +// CHECK:STDOUT: %.loc12_3.1: init %ForwardDeclared.08bd4c.1 = converted %.loc12_29.1, %.loc12_29.2 [concrete = constants.%ForwardDeclared.val] +// CHECK:STDOUT: assign %c.var, %.loc12_3.1 // CHECK:STDOUT: %ForwardDeclared.ref.loc12: type = name_ref ForwardDeclared, imports.%Main.ForwardDeclared [concrete = constants.%ForwardDeclared.08bd4c.1] // CHECK:STDOUT: %c: ref %ForwardDeclared.08bd4c.1 = wrapper_binding c, %c.var // CHECK:STDOUT: name_binding_decl { @@ -587,7 +459,7 @@ fn Run() { // CHECK:STDOUT: %bound_method.loc16_36.2: = bound_method %addr, %specific_fn.loc16 // CHECK:STDOUT: %ptr.as.Copy.impl.Op.call: init %ptr.11e = call %bound_method.loc16_36.2(%addr) // CHECK:STDOUT: assign %d.var, %ptr.as.Copy.impl.Op.call -// CHECK:STDOUT: %.loc16: type = splice_block %ptr.loc16 [concrete = constants.%ptr.11e] { +// CHECK:STDOUT: %.loc16_32: type = splice_block %ptr.loc16 [concrete = constants.%ptr.11e] { // CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, imports.%Main.ForwardDeclared [concrete = constants.%ForwardDeclared.08bd4c.1] // CHECK:STDOUT: %ptr.loc16: type = ptr_type %ForwardDeclared.ref.loc16 [concrete = constants.%ptr.11e] // CHECK:STDOUT: } @@ -613,16 +485,36 @@ fn Run() { // CHECK:STDOUT: %e.patt: %pattern_type.bae = ref_binding_pattern e [concrete = constants.%e.patt] // CHECK:STDOUT: %e.var_patt: %pattern_type.bae = var_pattern %e.patt [concrete = constants.%e.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18: = bound_method %e.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18(%e.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %d.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%d.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%c.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%ptr.06d, (constants.%DestroyImpl.impl_witness.737, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.835] +// CHECK:STDOUT: %.loc18_3.1: %Destroy.type = converted constants.%ptr.06d, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.835] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%ptr.06d, (constants.%DestroyImpl.impl_witness.737, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.835] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%ptr.06d, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.835] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.835) [concrete = constants.%SelfDestruct.specific_fn.f9a] +// CHECK:STDOUT: %SelfDestruct.call.loc18: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%e.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%ptr.11e, (constants.%DestroyImpl.impl_witness.169, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.8ec] +// CHECK:STDOUT: %.loc16_3.1: %Destroy.type = converted constants.%ptr.11e, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.8ec] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%ptr.11e, (constants.%DestroyImpl.impl_witness.169, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.8ec] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%ptr.11e, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.8ec] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.8ec) [concrete = constants.%SelfDestruct.specific_fn.c04] +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%d.var) +// CHECK:STDOUT: %Destroy.facet.loc12_3.1: %Destroy.type = facet_value constants.%ForwardDeclared.08bd4c.1, (constants.%DestroyImpl.impl_witness.8f4, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.508] +// CHECK:STDOUT: %.loc12_3.2: %Destroy.type = converted constants.%ForwardDeclared.08bd4c.1, %Destroy.facet.loc12_3.1 [concrete = constants.%Destroy.facet.508] +// CHECK:STDOUT: %Destroy.facet.loc12_3.2: %Destroy.type = facet_value constants.%ForwardDeclared.08bd4c.1, (constants.%DestroyImpl.impl_witness.8f4, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.508] +// CHECK:STDOUT: %.loc12_3.3: %Destroy.type = converted constants.%ForwardDeclared.08bd4c.1, %Destroy.facet.loc12_3.2 [concrete = constants.%Destroy.facet.508] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.508) [concrete = constants.%SelfDestruct.specific_fn.c45] +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Field, (constants.%DestroyImpl.impl_witness.fa9, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.a02] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Field, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.a02] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Field, (constants.%DestroyImpl.impl_witness.fa9, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.a02] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Field, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.a02] +// CHECK:STDOUT: %SelfDestruct.specific_fn.4: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.a02) [concrete = constants.%SelfDestruct.specific_fn.244] +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Empty, (constants.%DestroyImpl.impl_witness.2b2, constants.%custom_witness.b80ef6.8) [concrete = constants.%Destroy.facet.e46] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Empty, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.e46] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Empty, (constants.%DestroyImpl.impl_witness.2b2, constants.%custom_witness.b80ef6.8) [concrete = constants.%Destroy.facet.e46] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Empty, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.e46] +// CHECK:STDOUT: %SelfDestruct.specific_fn.5: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.e46) [concrete = constants.%SelfDestruct.specific_fn.ed7] +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -630,104 +522,40 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @ForwardDeclared.G [from "a.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18(%self.param: ref %ptr.06d) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18(%self.param: ref %ptr.06d) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18(%self.param: ref %ptr.06d) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16(%self.param: ref %ptr.11e) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18(%self.param: ref %ptr.06d) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_3.2(%self.param: ref %ForwardDeclared.08bd4c.1) = "no_op"; +// CHECK:STDOUT: +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %struct_type.x.991) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc9_3.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc9_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16(%self.param: ref %ptr.11e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref %ptr.11e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref %ptr.11e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_3.2(%self.param: ref %ForwardDeclared.08bd4c.1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %struct_type.x.991) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc9, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc9) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %struct_type.x.991) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %struct_type.x.991) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Field) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.3(%self.param: ref %Field) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %Field.elem = name_ref x, imports.%Main.import_ref.371 [concrete = imports.%field_decl] -// CHECK:STDOUT: %.loc9: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc9, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc9) +// CHECK:STDOUT: %.loc9_3.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc9_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Field) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %Field) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.7(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %Empty) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.8(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.8(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7(%self.param: ref %Empty) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_member_cycle.carbon b/toolchain/check/testdata/class/import_member_cycle.carbon index d7091cd6d5d5..ca6c742c22d0 100644 --- a/toolchain/check/testdata/class/import_member_cycle.carbon +++ b/toolchain/check/testdata/class/import_member_cycle.carbon @@ -94,22 +94,27 @@ fn Run() { // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.95c: %T.as.DefaultOrUnformed.impl.Op.type.63b = struct_value () [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %ptr, (%DefaultOrUnformed.impl_witness.1b4) [concrete] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function %T.as.DefaultOrUnformed.impl.Op.95c, @T.as.DefaultOrUnformed.impl.Op(%ptr) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.33b: %pattern_type.c3e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.219: %pattern_type.c3e = wrapper_binding_pattern self, %self.param_patt.33b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b36: %SubobjectDestroy.type = facet_value %ptr, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.bf8: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b36) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr, (%DestroyImpl.impl_witness.bf8, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.Cycle: type = import_ref Main//a, Cycle, loaded [concrete = constants.%Cycle] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -119,24 +124,9 @@ fn Run() { // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] // CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c3e = ref_param_pattern [concrete = constants.%self.param_patt.33b] -// CHECK:STDOUT: %self.patt: %pattern_type.c3e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.219] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c3e = ref_param_pattern [concrete = constants.%self.param_patt.33b] -// CHECK:STDOUT: %self.patt: %pattern_type.c3e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.219] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -177,19 +167,14 @@ fn Run() { // CHECK:STDOUT: %a.patt: %pattern_type.c3e = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.c3e = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%ptr, (constants.%DestroyImpl.impl_witness.bf8, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.1: %Destroy.type = converted constants.%ptr, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%ptr, (constants.%DestroyImpl.impl_witness.bf8, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%ptr, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %ptr) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %ptr) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %ptr) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7(%self.param: ref %ptr) = "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 cd27e921bc6a..5c690c7e0334 100644 --- a/toolchain/check/testdata/class/inheritance/derived_to_base.carbon +++ b/toolchain/check/testdata/class/inheritance/derived_to_base.carbon @@ -129,7 +129,6 @@ fn PassPartialB(b: partial B) { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %i32 [concrete] // CHECK:STDOUT: %struct_type.a.15e: type = struct_type {.a: %i32} [concrete] // CHECK:STDOUT: %B: type = class_type @B [concrete] @@ -233,61 +232,35 @@ fn PassPartialB(b: partial B) { // CHECK:STDOUT: %.639: ref %C = temporary invalid, %C.val [concrete] // CHECK:STDOUT: %.cc0: ref %B = class_element_access %.639, element0 [concrete] // CHECK:STDOUT: %.b61: ref %A = class_element_access %.cc0, element0 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc32_66.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc32_66.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc32_66.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.243: type = pattern_type %struct_type.a.15e [concrete] -// CHECK:STDOUT: %self.param_patt.6cd: %pattern_type.243 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.bd2: %pattern_type.243 = wrapper_binding_pattern self, %self.param_patt.6cd [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc32_66.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc32_66.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc32_66.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc32_66.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc32_66.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.1da: type = pattern_type %struct_type.base.b.2d7 [concrete] -// CHECK:STDOUT: %self.param_patt.31d: %pattern_type.1da = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3d5: %pattern_type.1da = wrapper_binding_pattern self, %self.param_patt.31d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc32_66.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc32_66.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.e39: type = pattern_type %B [concrete] -// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc32_66.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc32_66.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc32_66.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.273: type = pattern_type %struct_type.base.c.36a [concrete] -// CHECK:STDOUT: %self.param_patt.682: %pattern_type.273 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.278: %pattern_type.273 = wrapper_binding_pattern self, %self.param_patt.682 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc32_66.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc32_66.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc32_66.7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc32_66.7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7: type = fn_type @Destroy.WithSelf.SelfDestruct.loc32_66.7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.7: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.639, %Destroy.WithSelf.SelfDestruct.db3fdb.7 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc32_66.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc32_66.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet.35e: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc32_66.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.92e: %SubobjectDestroy.type = facet_value %B, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.131: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.92e) [concrete] +// CHECK:STDOUT: %Destroy.facet.09e: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.131, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc32_66.7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.7) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -295,107 +268,8 @@ fn PassPartialB(b: partial B) { // CHECK:STDOUT: %Copy.impl_witness_table.fb0 = impl_witness_table (%Core.import_ref.06a), @ptr.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.e474: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e474), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc32_66.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc32_66.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc32_66.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.243 = ref_param_pattern [concrete = constants.%self.param_patt.6cd] -// CHECK:STDOUT: %self.patt: %pattern_type.243 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bd2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.15e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.15e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc32_66.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.243 = ref_param_pattern [concrete = constants.%self.param_patt.6cd] -// CHECK:STDOUT: %self.patt: %pattern_type.243 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bd2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.15e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.15e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc32_66.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc32_66.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc32_66.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1da = ref_param_pattern [concrete = constants.%self.param_patt.31d] -// CHECK:STDOUT: %self.patt: %pattern_type.1da = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3d5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.b.2d7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.b.2d7 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc32_66.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1da = ref_param_pattern [concrete = constants.%self.param_patt.31d] -// CHECK:STDOUT: %self.patt: %pattern_type.1da = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3d5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.b.2d7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.b.2d7 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc32_66.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc32_66.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc32_66.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.273 = ref_param_pattern [concrete = constants.%self.param_patt.682] -// CHECK:STDOUT: %self.patt: %pattern_type.273 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.278] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.c.36a = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.c.36a = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc32_66.6 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.273 = ref_param_pattern [concrete = constants.%self.param_patt.682] -// CHECK:STDOUT: %self.patt: %pattern_type.273 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.278] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.c.36a = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.c.36a = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc32_66.7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc32_66.7 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -614,137 +488,119 @@ fn PassPartialB(b: partial B) { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %a.patt: %pattern_type.9ef = value_binding_pattern a [concrete = constants.%a.patt.bb7b23.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.639) +// CHECK:STDOUT: %Destroy.facet.loc32_66.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc32_66.7: %Destroy.type = converted constants.%C, %Destroy.facet.loc32_66.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc32_66.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc32_66.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc32_66.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc32_66.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32_66.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc32_66.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32_66.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc32_66.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc32_66.2(%self.param: ref %struct_type.a.15e) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc32_66.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc32_66.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc32_66.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc32_66.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32_66.2(%self.param: ref %struct_type.a.15e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc32: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc32, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc32) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32_66.2(%self.param: ref %struct_type.a.15e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc32_66.2(%self.param: ref %struct_type.a.15e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32_66.3(%self.param: ref %A) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc32_66.3(%self.param: ref %A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A.elem = name_ref a, @A.%field_decl [concrete = @A.%field_decl] -// CHECK:STDOUT: %.loc32: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc32, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc32) +// CHECK:STDOUT: %.loc32_66.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc32_66.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc32_66.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc32_66.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32_66.3(%self.param: ref %A) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc32_66.3(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32_66.4(%self.param: ref %struct_type.base.b.2d7) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc32_66.4(%self.param: ref %struct_type.base.b.2d7) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc32_66.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc32_66.1: = bound_method %.loc32_66.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc32_66.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc32_66.1(%.loc32_66.1) -// CHECK:STDOUT: %.loc32_66.2: ref %A = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc32_66.2: = bound_method %.loc32_66.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc32_66.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc32_66.2(%.loc32_66.2) +// CHECK:STDOUT: %Destroy.facet.loc32_66.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc32_66.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc32_66.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc32_66.1) +// CHECK:STDOUT: %.loc32_66.4: ref %A = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc32_66.3: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc32_66.5: %Destroy.type = converted constants.%A, %Destroy.facet.loc32_66.3 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %Destroy.facet.loc32_66.4: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc32_66.6: %Destroy.type = converted constants.%A, %Destroy.facet.loc32_66.4 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc32_66.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc32_66.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32_66.4(%self.param: ref %struct_type.base.b.2d7) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc32_66.4(%self.param: ref %struct_type.base.b.2d7) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32_66.5(%self.param: ref %B) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc32_66.5(%self.param: ref %B) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %b.ref: %B.elem.b29 = name_ref b, @B.%field_decl [concrete = @B.%field_decl] // CHECK:STDOUT: %.loc32_66.1: ref %i32 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc32_66.1: = bound_method %.loc32_66.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc32_66.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc32_66.1(%.loc32_66.1) +// CHECK:STDOUT: %Destroy.facet.loc32_66.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc32_66.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc32_66.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc32_66.1) // CHECK:STDOUT: %base.ref: %B.elem.405 = name_ref base, @B.%.loc9 [concrete = @B.%.loc9] -// CHECK:STDOUT: %.loc32_66.2: ref %A = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc32_66.2: = bound_method %.loc32_66.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc32_66.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc32_66.2(%.loc32_66.2) +// CHECK:STDOUT: %.loc32_66.4: ref %A = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc32_66.3: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc32_66.5: %Destroy.type = converted constants.%A, %Destroy.facet.loc32_66.3 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %Destroy.facet.loc32_66.4: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc32_66.6: %Destroy.type = converted constants.%A, %Destroy.facet.loc32_66.4 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc32_66.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc32_66.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32_66.5(%self.param: ref %B) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc32_66.5(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32_66.6(%self.param: ref %struct_type.base.c.36a) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc32_66.6(%self.param: ref %struct_type.base.c.36a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc32_66.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc32_66.1: = bound_method %.loc32_66.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc32_66.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc32_66.1(%.loc32_66.1) -// CHECK:STDOUT: %.loc32_66.2: ref %B = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc32_66.2: = bound_method %.loc32_66.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc32_66.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc32_66.2(%.loc32_66.2) +// CHECK:STDOUT: %Destroy.facet.loc32_66.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc32_66.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc32_66.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc32_66.1) +// CHECK:STDOUT: %.loc32_66.4: ref %B = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc32_66.3: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc32_66.5: %Destroy.type = converted constants.%B, %Destroy.facet.loc32_66.3 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %Destroy.facet.loc32_66.4: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc32_66.6: %Destroy.type = converted constants.%B, %Destroy.facet.loc32_66.4 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc32_66.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc32_66.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32_66.6(%self.param: ref %struct_type.base.c.36a) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc32_66.6(%self.param: ref %struct_type.base.c.36a) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32_66.7(%self.param: ref %C) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc32_66.7(%self.param: ref %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C.elem.a32 = name_ref c, @C.%field_decl [concrete = @C.%field_decl] // CHECK:STDOUT: %.loc32_66.1: ref %i32 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc32_66.1: = bound_method %.loc32_66.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc32_66.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc32_66.1(%.loc32_66.1) +// CHECK:STDOUT: %Destroy.facet.loc32_66.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc32_66.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc32_66.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc32_66.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc32_66.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc32_66.1) // CHECK:STDOUT: %base.ref: %C.elem.c7c = name_ref base, @C.%.loc14 [concrete = @C.%.loc14] -// CHECK:STDOUT: %.loc32_66.2: ref %B = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc32_66.2: = bound_method %.loc32_66.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc32_66.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc32_66.2(%.loc32_66.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32_66.7(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc32_66.7(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.7(%self.param) +// CHECK:STDOUT: %.loc32_66.4: ref %B = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc32_66.3: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc32_66.5: %Destroy.type = converted constants.%B, %Destroy.facet.loc32_66.3 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %Destroy.facet.loc32_66.4: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc32_66.6: %Destroy.type = converted constants.%B, %Destroy.facet.loc32_66.4 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc32_66.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc32_66.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/inheritance/import_base.carbon b/toolchain/check/testdata/class/inheritance/import_base.carbon index 5851d3c28aa0..b1b38da5566f 100644 --- a/toolchain/check/testdata/class/inheritance/import_base.carbon +++ b/toolchain/check/testdata/class/inheritance/import_base.carbon @@ -176,7 +176,6 @@ fn Run() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.762: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.036: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.753: %i32 = int_value 0 [concrete] @@ -193,46 +192,34 @@ fn Run() { // CHECK:STDOUT: %int_2.2e0: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %Base.F.type: type = fn_type @Base.F [concrete] // CHECK:STDOUT: %Base.F: %Base.F.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.912: type = pattern_type %Base [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.ba8: type = pattern_type %struct_type.x.unused_y.214 [concrete] -// CHECK:STDOUT: %self.param_patt.4f5: %pattern_type.ba8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ddb: %pattern_type.ba8 = wrapper_binding_pattern self, %self.param_patt.4f5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.21c: %pattern_type.912 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.26b: %pattern_type.912 = wrapper_binding_pattern self, %self.param_patt.21c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc7_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.cca: type = pattern_type %struct_type.base.cae [concrete] -// CHECK:STDOUT: %self.param_patt.b3a: %pattern_type.cca = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.66f: %pattern_type.cca = wrapper_binding_pattern self, %self.param_patt.b3a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc7_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ff3: %pattern_type.860 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.c08: %pattern_type.860 = wrapper_binding_pattern self, %self.param_patt.ff3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc7_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0c7: %SubobjectDestroy.type = facet_value %Base, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d83: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0c7) [concrete] +// CHECK:STDOUT: %Destroy.facet.9fe: %Destroy.type = facet_value %Base, (%DestroyImpl.impl_witness.d83, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8d5: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.9fe) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9ab: %SubobjectDestroy.type = facet_value %Child, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e8a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9ab) [concrete] +// CHECK:STDOUT: %Destroy.facet.9ec: %Destroy.type = facet_value %Child, (%DestroyImpl.impl_witness.e8a, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.57a: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.9ec) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -240,7 +227,7 @@ fn Run() { // CHECK:STDOUT: %Main.Child: type = import_ref Main//a, Child, loaded [concrete = constants.%Child] // CHECK:STDOUT: %Core.048aa3.1: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -261,84 +248,13 @@ fn Run() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Main.import_ref.736582.1 = import_ref Main//a, loc8_10, unloaded // CHECK:STDOUT: %field_decl.973: %Base.elem = field_decl x, element0, %Main.import_ref.736582.1 in [concrete] {} -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Main.import_ref.736582.2 = import_ref Main//a, loc9_17, unloaded // CHECK:STDOUT: %field_decl.921: %Base.elem = field_decl unused_y, element1, %Main.import_ref.736582.2 in [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ba8 = ref_param_pattern [concrete = constants.%self.param_patt.4f5] -// CHECK:STDOUT: %self.patt: %pattern_type.ba8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.x.unused_y.214 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.x.unused_y.214 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ba8 = ref_param_pattern [concrete = constants.%self.param_patt.4f5] -// CHECK:STDOUT: %self.patt: %pattern_type.ba8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.x.unused_y.214 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.x.unused_y.214 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.912 = ref_param_pattern [concrete = constants.%self.param_patt.21c] -// CHECK:STDOUT: %self.patt: %pattern_type.912 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.26b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Base = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Base = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc7_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.912 = ref_param_pattern [concrete = constants.%self.param_patt.21c] -// CHECK:STDOUT: %self.patt: %pattern_type.912 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.26b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Base = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Base = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cca = ref_param_pattern [concrete = constants.%self.param_patt.b3a] -// CHECK:STDOUT: %self.patt: %pattern_type.cca = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.66f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.cae = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.cae = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc7_3.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cca = ref_param_pattern [concrete = constants.%self.param_patt.b3a] -// CHECK:STDOUT: %self.patt: %pattern_type.cca = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.66f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.cae = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.cae = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.860 = ref_param_pattern [concrete = constants.%self.param_patt.ff3] -// CHECK:STDOUT: %self.patt: %pattern_type.860 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c08] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Child = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Child = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc7_3.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.860 = ref_param_pattern [concrete = constants.%self.param_patt.ff3] -// CHECK:STDOUT: %self.patt: %pattern_type.860 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c08] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Child = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Child = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Base = imports.%Main.Base @@ -401,8 +317,8 @@ fn Run() { // CHECK:STDOUT: %.loc7_50.3: init %.edf = converted %.loc7_49.1, %.loc7_49.8 [concrete = constants.%struct.bbc] // CHECK:STDOUT: %.loc7_50.4: init %Base = as_compatible %.loc7_50.3 [concrete = constants.%Base.val] // CHECK:STDOUT: %.loc7_50.5: init %Child to %a.var = class_init (%.loc7_50.4) [concrete = constants.%Child.val] -// CHECK:STDOUT: %.loc7_3: init %Child = converted %.loc7_50.1, %.loc7_50.5 [concrete = constants.%Child.val] -// CHECK:STDOUT: assign %a.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %Child = converted %.loc7_50.1, %.loc7_50.5 [concrete = constants.%Child.val] +// CHECK:STDOUT: assign %a.var, %.loc7_3.1 // CHECK:STDOUT: %Child.ref: type = name_ref Child, imports.%Main.Child [concrete = constants.%Child] // CHECK:STDOUT: %a: ref %Child = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -429,98 +345,81 @@ fn Run() { // CHECK:STDOUT: %.loc9_3.2: ref %Base = converted %a.ref.loc9, %.loc9_3.1 // CHECK:STDOUT: %.loc9_3.3: %Base = acquire_value %.loc9_3.2 // CHECK:STDOUT: %Base.F.call: init %empty_tuple.type = call %Base.F.bound(%.loc9_3.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Child, (constants.%DestroyImpl.impl_witness.e8a, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Child, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Child, (constants.%DestroyImpl.impl_witness.e8a, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Child, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.9ec) [concrete = constants.%SelfDestruct.specific_fn.57a] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Base.F [from "a.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %struct_type.x.unused_y.214) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.2(%self.param: ref %struct_type.x.unused_y.214) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_3.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1: = bound_method %.loc7_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1(%.loc7_3.1) -// CHECK:STDOUT: %.loc7_3.2: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2: = bound_method %.loc7_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2(%.loc7_3.2) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc7_3.1) +// CHECK:STDOUT: %.loc7_3.4: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc7_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %struct_type.x.unused_y.214) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.2(%self.param: ref %struct_type.x.unused_y.214) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.3(%self.param: ref %Base) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.3(%self.param: ref %Base) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %unused_y.ref: %Base.elem = name_ref unused_y, imports.%Main.import_ref.a65 [concrete = imports.%field_decl.921] // CHECK:STDOUT: %.loc7_3.1: ref %i32 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1: = bound_method %.loc7_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1(%.loc7_3.1) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc7_3.1) // CHECK:STDOUT: %x.ref: %Base.elem = name_ref x, imports.%Main.import_ref.877 [concrete = imports.%field_decl.973] -// CHECK:STDOUT: %.loc7_3.2: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2: = bound_method %.loc7_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2(%.loc7_3.2) +// CHECK:STDOUT: %.loc7_3.4: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc7_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.3(%self.param: ref %Base) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.3(%self.param: ref %Base) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.4(%self.param: ref %struct_type.base.cae) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc7_3.1: ref %Base = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.9fe) [concrete = constants.%SelfDestruct.specific_fn.8d5] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc7_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.4(%self.param: ref %struct_type.base.cae) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc7: ref %Base = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc7, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc7) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.4(%self.param: ref %struct_type.base.cae) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.4(%self.param: ref %struct_type.base.cae) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.5(%self.param: ref %Child) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.5(%self.param: ref %Child) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %base.ref: %Child.elem = name_ref base, imports.%Main.import_ref.d51 [concrete = imports.%.754] -// CHECK:STDOUT: %.loc7: ref %Base = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc7, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc7) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.5(%self.param: ref %Child) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.5(%self.param: ref %Child) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) +// CHECK:STDOUT: %.loc7_3.1: ref %Base = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.9fe) [concrete = constants.%SelfDestruct.specific_fn.8d5] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc7_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index 490a616cb9ae..6af12cf44ce6 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -37,7 +37,6 @@ fn G() -> i32 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [concrete] // CHECK:STDOUT: %struct_type.a.b.250: type = struct_type {.a: %i32, .b: %i32} [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] @@ -62,8 +61,8 @@ fn G() -> i32 { // CHECK:STDOUT: %bound_method.a55: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.2e0: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.68a, %int_2.2e0) [concrete] -// CHECK:STDOUT: %.d2d3: ref %Class = temporary invalid, %Class.val [concrete] -// CHECK:STDOUT: %.a2c: ref %i32 = class_element_access %.d2d3, element0 [concrete] +// CHECK:STDOUT: %.d2d: ref %Class = temporary invalid, %Class.val [concrete] +// CHECK:STDOUT: %.a2c: ref %i32 = class_element_access %.d2d, element0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.3c1: %Int.as.Copy.impl.Op.type.a1d = struct_value () [symbolic] @@ -74,31 +73,24 @@ fn G() -> i32 { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_28.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc20_28.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20_28.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.290: type = pattern_type %struct_type.a.b.250 [concrete] -// CHECK:STDOUT: %self.param_patt.490: %pattern_type.290 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a39: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt.490 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_28.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc20_28.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20_28.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] // CHECK:STDOUT: %pattern_type.f15: type = pattern_type %Class [concrete] -// CHECK:STDOUT: %self.param_patt.b2b: %pattern_type.f15 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f19: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt.b2b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_28.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc20_28.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20_28.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.d2d3, %Destroy.WithSelf.SelfDestruct.db3fdb.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20_28.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.3a1: %SubobjectDestroy.type = facet_value %Class, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.66c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.3a1) [concrete] +// CHECK:STDOUT: %Destroy.facet.728: %Destroy.type = facet_value %Class, (%DestroyImpl.impl_witness.66c, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: %v.patt: %pattern_type.f15 = ref_binding_pattern v [concrete] // CHECK:STDOUT: %v.var_patt: %pattern_type.f15 = var_pattern %v.patt [concrete] // CHECK:STDOUT: } @@ -108,51 +100,8 @@ fn G() -> i32 { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_28.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc20_28.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_28.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.290 = ref_param_pattern [concrete = constants.%self.param_patt.490] -// CHECK:STDOUT: %self.patt: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a39] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.250 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.250 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc20_28.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.290 = ref_param_pattern [concrete = constants.%self.param_patt.490] -// CHECK:STDOUT: %self.patt: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a39] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.250 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.250 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_28.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc20_28.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> out %return.param: %i32 { @@ -180,7 +129,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc20_26.8: init %i32 to %.loc20_26.7 = in_place_init %.loc20_26.6 [concrete = constants.%int_2.2e0] // CHECK:STDOUT: %.loc20_26.9: init %Class to %.loc20_26.3 = class_init (%.loc20_26.5, %.loc20_26.8) [concrete = constants.%Class.val] // CHECK:STDOUT: %.loc20_28.1: init %Class = converted %.loc20_26.1, %.loc20_26.9 [concrete = constants.%Class.val] -// CHECK:STDOUT: %.loc20_28.2: ref %Class = temporary %.loc20_26.3, %.loc20_28.1 [concrete = constants.%.d2d3] +// CHECK:STDOUT: %.loc20_28.2: ref %Class = temporary %.loc20_26.3, %.loc20_28.1 [concrete = constants.%.d2d] // CHECK:STDOUT: %a.ref: %Class.elem = name_ref a, @Class.%field_decl.loc14 [concrete = @Class.%field_decl.loc14] // CHECK:STDOUT: %.loc20_37.1: ref %i32 = class_element_access %.loc20_28.2, element0 [concrete = constants.%.a2c] // CHECK:STDOUT: %.loc20_37.2: %i32 = acquire_value %.loc20_37.1 @@ -189,60 +138,54 @@ fn G() -> i32 { // CHECK:STDOUT: %specific_fn.loc20_37: = specific_function %impl.elem0.loc20_37, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc20_37.2: = bound_method %.loc20_37.2, %specific_fn.loc20_37 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc20_37.2(%.loc20_37.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.d2d3) +// CHECK:STDOUT: %Destroy.facet.loc20_28.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc20_28.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc20_28.1 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %Destroy.facet.loc20_28.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc20_28.4: %Destroy.type = converted constants.%Class, %Destroy.facet.loc20_28.2 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc20_28.2) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_28.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_28.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_28.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_28.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_28.2(%self.param: ref %struct_type.a.b.250) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_28.2(%self.param: ref %struct_type.a.b.250) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc20_28.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc20_28.1: = bound_method %.loc20_28.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20_28.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc20_28.1(%.loc20_28.1) -// CHECK:STDOUT: %.loc20_28.2: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc20_28.2: = bound_method %.loc20_28.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20_28.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc20_28.2(%.loc20_28.2) +// CHECK:STDOUT: %Destroy.facet.loc20_28.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_28.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_28.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc20_28.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_28.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_28.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc20_28.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc20_28.1) +// CHECK:STDOUT: %.loc20_28.4: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc20_28.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_28.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_28.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc20_28.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_28.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_28.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc20_28.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc20_28.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_28.2(%self.param: ref %struct_type.a.b.250) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_28.2(%self.param: ref %struct_type.a.b.250) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_28.3(%self.param: ref %Class) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_28.3(%self.param: ref %Class) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %b.ref: %Class.elem = name_ref b, @Class.%field_decl.loc15 [concrete = @Class.%field_decl.loc15] // CHECK:STDOUT: %.loc20_28.1: ref %i32 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc20_28.1: = bound_method %.loc20_28.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20_28.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc20_28.1(%.loc20_28.1) +// CHECK:STDOUT: %Destroy.facet.loc20_28.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_28.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_28.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc20_28.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_28.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_28.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc20_28.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc20_28.1) // CHECK:STDOUT: %a.ref: %Class.elem = name_ref a, @Class.%field_decl.loc14 [concrete = @Class.%field_decl.loc14] -// CHECK:STDOUT: %.loc20_28.2: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc20_28.2: = bound_method %.loc20_28.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20_28.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc20_28.2(%.loc20_28.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_28.3(%self.param: ref %Class) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_28.3(%self.param: ref %Class) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc20_28.4: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc20_28.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_28.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_28.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc20_28.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc20_28.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_28.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc20_28.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc20_28.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -259,8 +202,8 @@ fn G() -> i32 { // CHECK:STDOUT: %bound_method.loc26_33.2: = bound_method %int_1, %specific_fn.loc26_33.1 [concrete = constants.%bound_method.3bd] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc26_33.1: init %i32 = call %bound_method.loc26_33.2(%int_1) [concrete = constants.%int_1.68a] // CHECK:STDOUT: %.loc26_33.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc26_33.1 [concrete = constants.%int_1.68a] -// CHECK:STDOUT: %.loc26_3: ref %Class = splice_block %v.var {} -// CHECK:STDOUT: %.loc26_33.3: ref %i32 = class_element_access %.loc26_3, element0 +// CHECK:STDOUT: %.loc26_3.1: ref %Class = splice_block %v.var {} +// CHECK:STDOUT: %.loc26_33.3: ref %i32 = class_element_access %.loc26_3.1, element0 // CHECK:STDOUT: %.loc26_33.4: init %i32 to %.loc26_33.3 = in_place_init %.loc26_33.2 [concrete = constants.%int_1.68a] // CHECK:STDOUT: %impl.elem0.loc26_33.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60] // CHECK:STDOUT: %bound_method.loc26_33.3: = bound_method %int_2, %impl.elem0.loc26_33.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6] @@ -268,9 +211,9 @@ fn G() -> i32 { // CHECK:STDOUT: %bound_method.loc26_33.4: = bound_method %int_2, %specific_fn.loc26_33.2 [concrete = constants.%bound_method.a55] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc26_33.2: init %i32 = call %bound_method.loc26_33.4(%int_2) [concrete = constants.%int_2.2e0] // CHECK:STDOUT: %.loc26_33.5: init %i32 = converted %int_2, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc26_33.2 [concrete = constants.%int_2.2e0] -// CHECK:STDOUT: %.loc26_33.6: ref %i32 = class_element_access %.loc26_3, element1 +// CHECK:STDOUT: %.loc26_33.6: ref %i32 = class_element_access %.loc26_3.1, element1 // CHECK:STDOUT: %.loc26_33.7: init %i32 to %.loc26_33.6 = in_place_init %.loc26_33.5 [concrete = constants.%int_2.2e0] -// CHECK:STDOUT: %.loc26_33.8: init %Class to %.loc26_3 = class_init (%.loc26_33.4, %.loc26_33.7) [concrete = constants.%Class.val] +// CHECK:STDOUT: %.loc26_33.8: init %Class to %.loc26_3.1 = class_init (%.loc26_33.4, %.loc26_33.7) [concrete = constants.%Class.val] // CHECK:STDOUT: %.loc26_35: init %Class = converted %.loc26_33.1, %.loc26_33.8 [concrete = constants.%Class.val] // CHECK:STDOUT: assign %v.var, %.loc26_35 // CHECK:STDOUT: %Class.ref.loc26_10: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] @@ -280,8 +223,12 @@ fn G() -> i32 { // CHECK:STDOUT: %v.var_patt: %pattern_type.f15 = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc26_3.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc26_3.2: %Destroy.type = converted constants.%Class, %Destroy.facet.loc26_3.1 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %Destroy.facet.loc26_3.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc26_3.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc26_3.2 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/local.carbon b/toolchain/check/testdata/class/local.carbon index 6bcccdb98aa9..61410362adf6 100644 --- a/toolchain/check/testdata/class/local.carbon +++ b/toolchain/check/testdata/class/local.carbon @@ -88,30 +88,27 @@ class A { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc26_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.5c4: type = pattern_type %struct_type.n.4d4 [concrete] -// CHECK:STDOUT: %self.param_patt.d03: %pattern_type.5c4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3cd: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt.d03 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc26_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ddc: %pattern_type.6f2 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.78f: %pattern_type.6f2 = wrapper_binding_pattern self, %self.param_patt.ddc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc26_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26_19.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26_19.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.be1: %SubobjectDestroy.type = facet_value %B, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.424: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.be1) [concrete] +// CHECK:STDOUT: %Destroy.facet.7d6: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.424, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.f3e: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.7d6) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -119,7 +116,7 @@ class A { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -130,52 +127,9 @@ class A { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26_19.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc26_19.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26_19.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n.4d4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n.4d4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc26_19.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n.4d4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n.4d4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26_19.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6f2 = ref_param_pattern [concrete = constants.%self.param_patt.ddc] -// CHECK:STDOUT: %self.patt: %pattern_type.6f2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.78f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc26_19.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6f2 = ref_param_pattern [concrete = constants.%self.param_patt.ddc] -// CHECK:STDOUT: %self.patt: %pattern_type.6f2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.78f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -243,8 +197,12 @@ class A { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc26_20.2: = bound_method %.loc26_20.2, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc26_20.2(%.loc26_20.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc26_19.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc26_19.2) +// CHECK:STDOUT: %Destroy.facet.loc26_19.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.424, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.7d6] +// CHECK:STDOUT: %.loc26_19.3: %Destroy.type = converted constants.%B, %Destroy.facet.loc26_19.1 [concrete = constants.%Destroy.facet.7d6] +// CHECK:STDOUT: %Destroy.facet.loc26_19.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.424, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.7d6] +// CHECK:STDOUT: %.loc26_19.4: %Destroy.type = converted constants.%B, %Destroy.facet.loc26_19.2 [concrete = constants.%Destroy.facet.7d6] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.7d6) [concrete = constants.%SelfDestruct.specific_fn.f3e] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc26_19.2) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: @@ -273,49 +231,30 @@ class A { // CHECK:STDOUT: return %.loc19_23 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_19.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26_19.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_19.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_19.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26_19.2(%self.param: ref %struct_type.n.4d4) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc26_19.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc26_19.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc26_19.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_19.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc26_19.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc26_19.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_19.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc26_19.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_19.2(%self.param: ref %struct_type.n.4d4) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc26: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc26, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc26) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_19.2(%self.param: ref %struct_type.n.4d4) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_19.2(%self.param: ref %struct_type.n.4d4) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_19.3(%self.param: ref %B) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26_19.3(%self.param: ref %B) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %B.elem = name_ref n, @B.%field_decl [concrete = @B.%field_decl] -// CHECK:STDOUT: %.loc26: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc26, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc26) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_19.3(%self.param: ref %B) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_19.3(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc26_19.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc26_19.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc26_19.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_19.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc26_19.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc26_19.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_19.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc26_19.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/method/method.carbon b/toolchain/check/testdata/class/method/method.carbon index 10a7392afffe..3b238bc12f44 100644 --- a/toolchain/check/testdata/class/method/method.carbon +++ b/toolchain/check/testdata/class/method/method.carbon @@ -130,29 +130,27 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.68a) [concrete] // CHECK:STDOUT: %.d5a: ref %Class = temporary invalid, %Class.val [concrete] // CHECK:STDOUT: %Class.F.bound: = bound_method %.d5a, %Class.F [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc39_20.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc39_20.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc39_20.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.e7d: type = pattern_type %struct_type.k.d7d [concrete] -// CHECK:STDOUT: %self.param_patt.4e0: %pattern_type.e7d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.29c: %pattern_type.e7d = wrapper_binding_pattern self, %self.param_patt.4e0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc39_20.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc39_20.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc39_20.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc39_20.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc39_20.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.d5a, %Destroy.WithSelf.SelfDestruct.db3fdb.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc39_20.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc39_20.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.3a1: %SubobjectDestroy.type = facet_value %Class, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.66c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.3a1) [concrete] +// CHECK:STDOUT: %Destroy.facet.728: %Destroy.type = facet_value %Class, (%DestroyImpl.impl_witness.66c, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.744: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.728) [concrete] // CHECK:STDOUT: %CallWithRef.type: type = fn_type @CallWithRef [concrete] // CHECK:STDOUT: %CallWithRef: %CallWithRef.type = struct_value () [concrete] // CHECK:STDOUT: %c.patt.345: %pattern_type.f15 = ref_binding_pattern c [concrete] @@ -189,7 +187,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -201,57 +199,14 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] // CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc39_20.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc39_20.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc39_20.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e7d = ref_param_pattern [concrete = constants.%self.param_patt.4e0] -// CHECK:STDOUT: %self.patt: %pattern_type.e7d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.29c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.k.d7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.k.d7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc39_20.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e7d = ref_param_pattern [concrete = constants.%self.param_patt.4e0] -// CHECK:STDOUT: %self.patt: %pattern_type.e7d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.29c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.k.d7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.k.d7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc39_20.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc39_20.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -491,53 +446,39 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Class.F.bound: = bound_method %.loc39_20.2, %F.ref [concrete = constants.%Class.F.bound] // CHECK:STDOUT: %.loc39_20.3: %Class = acquire_value %.loc39_20.2 [concrete = constants.%Class.val] // CHECK:STDOUT: %Class.F.call: init %i32 = call %Class.F.bound(%.loc39_20.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.d5a) +// CHECK:STDOUT: %Destroy.facet.loc39_20.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc39_20.4: %Destroy.type = converted constants.%Class, %Destroy.facet.loc39_20.1 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %Destroy.facet.loc39_20.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc39_20.5: %Destroy.type = converted constants.%Class, %Destroy.facet.loc39_20.2 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.728) [concrete = constants.%SelfDestruct.specific_fn.744] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc39_20.2) // CHECK:STDOUT: return %Class.F.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc39_20.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc39_20.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc39_20.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc39_20.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc39_20.2(%self.param: ref %struct_type.k.d7d) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc39_20.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc39_20.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc39_20.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc39_20.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc39_20.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc39_20.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc39_20.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc39_20.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc39_20.2(%self.param: ref %struct_type.k.d7d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc39: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc39, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc39) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc39_20.2(%self.param: ref %struct_type.k.d7d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc39_20.2(%self.param: ref %struct_type.k.d7d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc39_20.3(%self.param: ref %Class) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc39_20.3(%self.param: ref %Class) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %k.ref: %Class.elem = name_ref k, @Class.%field_decl [concrete = @Class.%field_decl] -// CHECK:STDOUT: %.loc39: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc39, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc39) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc39_20.3(%self.param: ref %Class) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc39_20.3(%self.param: ref %Class) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc39_20.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc39_20.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc39_20.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc39_20.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc39_20.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc39_20.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc39_20.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc39_20.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -549,8 +490,8 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc43_15.1 [concrete = constants.%Class] // CHECK:STDOUT: %.loc43_15.2: type = converted %.loc43_15.1, %as_type [concrete = constants.%Class] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.c3e, @T.as.DefaultOrUnformed.impl.Op(constants.%Class) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] -// CHECK:STDOUT: %.loc43_3: ref %Class = splice_block %c.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Class to %.loc43_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc43_3.1: ref %Class = splice_block %c.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Class to %.loc43_3.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %c.var, %T.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: %c: ref %Class = wrapper_binding c, %c.var @@ -562,8 +503,12 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %G.ref: %Class.G.type = name_ref G, @Class.%Class.G.decl [concrete = constants.%Class.G] // CHECK:STDOUT: %Class.G.bound: = bound_method %c.ref, %G.ref // CHECK:STDOUT: %Class.G.call: init %i32 = call %Class.G.bound(%c.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc43_3.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc43_3.2: %Destroy.type = converted constants.%Class, %Destroy.facet.loc43_3.1 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %Destroy.facet.loc43_3.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc43_3.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc43_3.2 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.728) [concrete = constants.%SelfDestruct.specific_fn.744] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%c.var) // CHECK:STDOUT: return %Class.G.call // CHECK:STDOUT: } // CHECK:STDOUT: @@ -600,8 +545,12 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Class.F.bound: = bound_method %.loc58_15.2, %F.ref // CHECK:STDOUT: %.loc58_15.3: %Class = acquire_value %.loc58_15.2 // CHECK:STDOUT: %Class.F.call: init %i32 = call %Class.F.bound(%.loc58_15.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc58_15.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc58_15.2) +// CHECK:STDOUT: %Destroy.facet.loc58_15.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc58_15.4: %Destroy.type = converted constants.%Class, %Destroy.facet.loc58_15.1 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %Destroy.facet.loc58_15.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc58_15.5: %Destroy.type = converted constants.%Class, %Destroy.facet.loc58_15.2 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.728) [concrete = constants.%SelfDestruct.specific_fn.744] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc58_15.2) // CHECK:STDOUT: return %Class.F.call // CHECK:STDOUT: } // CHECK:STDOUT: @@ -614,8 +563,12 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %G.ref: %Class.G.type = name_ref G, @Class.%Class.G.decl [concrete = constants.%Class.G] // CHECK:STDOUT: %Class.G.bound: = bound_method %.loc62_15.2, %G.ref // CHECK:STDOUT: %Class.G.call: init %i32 = call %Class.G.bound(%.loc62_15.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc62_15.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc62_15.2) +// CHECK:STDOUT: %Destroy.facet.loc62_15.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc62_15.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc62_15.1 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %Destroy.facet.loc62_15.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc62_15.4: %Destroy.type = converted constants.%Class, %Destroy.facet.loc62_15.2 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.728) [concrete = constants.%SelfDestruct.specific_fn.744] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc62_15.2) // CHECK:STDOUT: return %Class.G.call // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/method/static_method.carbon b/toolchain/check/testdata/class/method/static_method.carbon index 2c7e2cac8ae5..b5e2ee5074e8 100644 --- a/toolchain/check/testdata/class/method/static_method.carbon +++ b/toolchain/check/testdata/class/method/static_method.carbon @@ -53,29 +53,27 @@ fn Run() -> i32 { // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.c3e: %T.as.DefaultOrUnformed.impl.Op.type.1a9 = struct_value () [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %Class, (%DefaultOrUnformed.impl_witness.0e1) [concrete] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function %T.as.DefaultOrUnformed.impl.Op.c3e, @T.as.DefaultOrUnformed.impl.Op(%Class) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc20_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b2b: %pattern_type.f15 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f19: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt.b2b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc20_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.3a1: %SubobjectDestroy.type = facet_value %Class, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.66c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.3a1) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class, (%DestroyImpl.impl_witness.66c, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -83,38 +81,9 @@ fn Run() -> i32 { // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] // CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc20_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc20_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -164,8 +133,8 @@ fn Run() -> i32 { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc20_15.1 [concrete = constants.%Class] // CHECK:STDOUT: %.loc20_15.2: type = converted %.loc20_15.1, %as_type [concrete = constants.%Class] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.c3e, @T.as.DefaultOrUnformed.impl.Op(constants.%Class) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] -// CHECK:STDOUT: %.loc20_3: ref %Class = splice_block %c.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Class to %.loc20_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc20_3.1: ref %Class = splice_block %c.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Class to %.loc20_3.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %c.var, %T.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: %c: ref %Class = wrapper_binding c, %c.var @@ -176,30 +145,16 @@ fn Run() -> i32 { // CHECK:STDOUT: %c.ref: ref %Class = name_ref c, %c // CHECK:STDOUT: %F.ref: %Class.F.type = name_ref F, @Class.%Class.F.decl [concrete = constants.%Class.F] // CHECK:STDOUT: %Class.F.call: init %i32 = call %F.ref() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc20_3.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_3.2: %Destroy.type = converted constants.%Class, %Destroy.facet.loc20_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc20_3.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_3.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc20_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%c.var) // CHECK:STDOUT: return %Class.F.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_3.2(%self.param: ref %Class) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.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 a76a5eb38b6d..b00008eb7f13 100644 --- a/toolchain/check/testdata/class/method/virtual.carbon +++ b/toolchain/check/testdata/class/method/virtual.carbon @@ -615,7 +615,6 @@ class T2(G2: type) { // CHECK:STDOUT: %Derived.H.a6796b.1: %Derived.H.type.1f42d4.1 = struct_value () [concrete] // CHECK:STDOUT: %Base.H.type: type = fn_type @Base.H [concrete] // CHECK:STDOUT: %Base.H: %Base.H.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.b8d: type = pattern_type %Base [concrete] // CHECK:STDOUT: %Derived.H.type.1f42d4.2: type = fn_type @Derived.H.loc9_22.2 [concrete] // CHECK:STDOUT: %Derived.H.a6796b.2: %Derived.H.type.1f42d4.2 = struct_value () [concrete] // CHECK:STDOUT: %Derived.vtable_decl: ref %ptr.454 = vtable_decl @Derived.vtable [concrete] @@ -633,45 +632,29 @@ class T2(G2: type) { // CHECK:STDOUT: %Base.val: %Base = struct_value (%uninit) [concrete] // CHECK:STDOUT: %Derived.val: %Derived = struct_value (%Base.val) [concrete] // CHECK:STDOUT: %Derived.vtable_ptr: ref %ptr.454 = vtable_ptr @Derived.vtable [concrete] -// CHECK:STDOUT: %pattern_type.258: type = pattern_type %ptr.454 [concrete] -// CHECK:STDOUT: %self.param_patt.2f4: %pattern_type.258 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cf4: %pattern_type.258 = wrapper_binding_pattern self, %self.param_patt.2f4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc15_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.f1a: type = pattern_type %struct_type.vptr [concrete] -// CHECK:STDOUT: %self.param_patt.783: %pattern_type.f1a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.8ea: %pattern_type.f1a = wrapper_binding_pattern self, %self.param_patt.783 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc15_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.9d9: %pattern_type.b8d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1ac: %pattern_type.b8d = wrapper_binding_pattern self, %self.param_patt.9d9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc15_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.6ed: type = pattern_type %struct_type.base.507 [concrete] -// CHECK:STDOUT: %self.param_patt.70b: %pattern_type.6ed = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2b0: %pattern_type.6ed = wrapper_binding_pattern self, %self.param_patt.70b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc15_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a2b: %pattern_type.746 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d8a: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt.a2b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc15_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c1a: %SubobjectDestroy.type = facet_value %ptr.454, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cad: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c1a) [concrete] +// CHECK:STDOUT: %Destroy.facet.194: %Destroy.type = facet_value %ptr.454, (%DestroyImpl.impl_witness.cad, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.611: %SubobjectDestroy.type = facet_value %Base, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.5d3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.611) [concrete] +// CHECK:STDOUT: %Destroy.facet.d21: %Destroy.type = facet_value %Base, (%DestroyImpl.impl_witness.5d3, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.1fc: %SubobjectDestroy.type = facet_value %Derived, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.660: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.1fc) [concrete] +// CHECK:STDOUT: %Destroy.facet.35d: %Destroy.type = facet_value %Derived, (%DestroyImpl.impl_witness.660, %custom_witness.b80ef6.5) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -681,79 +664,8 @@ class T2(G2: type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base] // CHECK:STDOUT: %Base.H.decl: %Base.H.type = fn_decl @Base.H [concrete = constants.%Base.H] {} {} -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.258 = ref_param_pattern [concrete = constants.%self.param_patt.2f4] -// CHECK:STDOUT: %self.patt: %pattern_type.258 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cf4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.454 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.454 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc15_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.258 = ref_param_pattern [concrete = constants.%self.param_patt.2f4] -// CHECK:STDOUT: %self.patt: %pattern_type.258 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cf4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.454 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.454 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f1a = ref_param_pattern [concrete = constants.%self.param_patt.783] -// CHECK:STDOUT: %self.patt: %pattern_type.f1a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8ea] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.vptr = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.vptr = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc15_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f1a = ref_param_pattern [concrete = constants.%self.param_patt.783] -// CHECK:STDOUT: %self.patt: %pattern_type.f1a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8ea] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.vptr = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.vptr = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b8d = ref_param_pattern [concrete = constants.%self.param_patt.9d9] -// CHECK:STDOUT: %self.patt: %pattern_type.b8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1ac] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Base = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Base = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc15_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b8d = ref_param_pattern [concrete = constants.%self.param_patt.9d9] -// CHECK:STDOUT: %self.patt: %pattern_type.b8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1ac] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Base = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Base = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6ed = ref_param_pattern [concrete = constants.%self.param_patt.70b] -// CHECK:STDOUT: %self.patt: %pattern_type.6ed = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2b0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.507 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.507 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc15_3.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6ed = ref_param_pattern [concrete = constants.%self.param_patt.70b] -// CHECK:STDOUT: %self.patt: %pattern_type.6ed = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2b0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.507 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.507 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.746 = ref_param_pattern [concrete = constants.%self.param_patt.a2b] -// CHECK:STDOUT: %self.patt: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d8a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Derived = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Derived = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc15_3.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.746 = ref_param_pattern [concrete = constants.%self.param_patt.a2b] -// CHECK:STDOUT: %self.patt: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d8a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Derived = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Derived = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -829,93 +741,64 @@ class T2(G2: type) { // CHECK:STDOUT: %.loc15_38.7: ref %ptr.454 = class_element_access %.loc15_38.6, element0 // CHECK:STDOUT: %.loc15_38.8: init %ptr.454 to %.loc15_38.7 = in_place_init %Derived.vtable_ptr [concrete = constants.%Derived.vtable_ptr] // CHECK:STDOUT: %.loc15_38.9: init %Derived = update_init %.loc15_38.5, %.loc15_38.8 -// CHECK:STDOUT: %.loc15_3: init %Derived = converted %.loc15_38.1, %.loc15_38.9 -// CHECK:STDOUT: assign %d.var, %.loc15_3 +// CHECK:STDOUT: %.loc15_3.1: init %Derived = converted %.loc15_38.1, %.loc15_38.9 +// CHECK:STDOUT: assign %d.var, %.loc15_3.1 // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived] // CHECK:STDOUT: %d: ref %Derived = wrapper_binding d, %d.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %d.patt: %pattern_type.746 = ref_binding_pattern d [concrete = constants.%d.patt] // CHECK:STDOUT: %d.var_patt: %pattern_type.746 = var_pattern %d.patt [concrete = constants.%d.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %d.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%d.var) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%Derived, (constants.%DestroyImpl.impl_witness.660, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%Derived, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%Derived, (constants.%DestroyImpl.impl_witness.660, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%Derived, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%d.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.1(%self.param: ref %ptr.454) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.1(%self.param: ref %ptr.454) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.1(%self.param: ref %ptr.454) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.1(%self.param: ref %ptr.454) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.2(%self.param: ref %struct_type.vptr) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc15_3.1: ref %ptr.454 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.2(%self.param: ref %struct_type.vptr) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15: ref %ptr.454 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc15, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc15) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.2(%self.param: ref %struct_type.vptr) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.2(%self.param: ref %struct_type.vptr) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.3(%self.param: ref %Base) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.3(%self.param: ref %Base) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.3(%self.param: ref %Base) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.3(%self.param: ref %Base) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.4(%self.param: ref %struct_type.base.507) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc15_3.1: ref %Base = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.4(%self.param: ref %struct_type.base.507) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15: ref %Base = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc15, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc15) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.4(%self.param: ref %struct_type.base.507) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.4(%self.param: ref %struct_type.base.507) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.5(%self.param: ref %Derived) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.5(%self.param: ref %Derived) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %base.ref: %Derived.elem = name_ref base, @Derived.%.loc8 [concrete = @Derived.%.loc8] -// CHECK:STDOUT: %.loc15: ref %Base = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc15, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc15) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.5(%self.param: ref %Derived) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.5(%self.param: ref %Derived) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) +// CHECK:STDOUT: %.loc15_3.1: ref %Base = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -936,30 +819,23 @@ class T2(G2: type) { // CHECK:STDOUT: %Base.H: %Base.H.type = struct_value () [concrete] // CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete] // CHECK:STDOUT: %Base.val: %Base = struct_value (%Base.vtable_ptr) [concrete] -// CHECK:STDOUT: %pattern_type.258: type = pattern_type %ptr.454 [concrete] -// CHECK:STDOUT: %self.param_patt.2f4: %pattern_type.258 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cf4: %pattern_type.258 = wrapper_binding_pattern self, %self.param_patt.2f4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.f1a: type = pattern_type %struct_type.vptr [concrete] -// CHECK:STDOUT: %self.param_patt.783: %pattern_type.f1a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.8ea: %pattern_type.f1a = wrapper_binding_pattern self, %self.param_patt.783 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.9d9: %pattern_type.b8d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1ac: %pattern_type.b8d = wrapper_binding_pattern self, %self.param_patt.9d9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc8_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c1a: %SubobjectDestroy.type = facet_value %ptr.454, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cad: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c1a) [concrete] +// CHECK:STDOUT: %Destroy.facet.194: %Destroy.type = facet_value %ptr.454, (%DestroyImpl.impl_witness.cad, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.611: %SubobjectDestroy.type = facet_value %Base, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.5d3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.611) [concrete] +// CHECK:STDOUT: %Destroy.facet.d21: %Destroy.type = facet_value %Base, (%DestroyImpl.impl_witness.5d3, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -968,51 +844,8 @@ class T2(G2: type) { // CHECK:STDOUT: import Modifiers//default // CHECK:STDOUT: } // CHECK:STDOUT: %Modifiers.Base: type = import_ref Modifiers//default, Base, loaded [concrete = constants.%Base] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.258 = ref_param_pattern [concrete = constants.%self.param_patt.2f4] -// CHECK:STDOUT: %self.patt: %pattern_type.258 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cf4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.454 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.454 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.258 = ref_param_pattern [concrete = constants.%self.param_patt.2f4] -// CHECK:STDOUT: %self.patt: %pattern_type.258 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cf4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.454 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.454 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f1a = ref_param_pattern [concrete = constants.%self.param_patt.783] -// CHECK:STDOUT: %self.patt: %pattern_type.f1a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8ea] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.vptr = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.vptr = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f1a = ref_param_pattern [concrete = constants.%self.param_patt.783] -// CHECK:STDOUT: %self.patt: %pattern_type.f1a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8ea] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.vptr = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.vptr = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b8d = ref_param_pattern [concrete = constants.%self.param_patt.9d9] -// CHECK:STDOUT: %self.patt: %pattern_type.b8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1ac] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Base = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Base = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc8_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b8d = ref_param_pattern [concrete = constants.%self.param_patt.9d9] -// CHECK:STDOUT: %self.patt: %pattern_type.b8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1ac] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Base = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Base = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: vtable @Base.vtable { @@ -1027,8 +860,8 @@ class T2(G2: type) { // CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %.loc8_35.3: init %ptr.454 to %.loc8_35.2 = in_place_init %Base.vtable_ptr [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %.loc8_35.4: init %Base to %v.var = class_init (%.loc8_35.3) [concrete = constants.%Base.val] -// CHECK:STDOUT: %.loc8_3: init %Base = converted %.loc8_35.1, %.loc8_35.4 [concrete = constants.%Base.val] -// CHECK:STDOUT: assign %v.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Base = converted %.loc8_35.1, %.loc8_35.4 [concrete = constants.%Base.val] +// CHECK:STDOUT: assign %v.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_26: type = splice_block %Base.ref [concrete = constants.%Base] { // CHECK:STDOUT: %Modifiers.ref: = name_ref Modifiers, imports.%Modifiers [concrete = imports.%Modifiers] // CHECK:STDOUT: %Base.ref: type = name_ref Base, imports.%Modifiers.Base [concrete = constants.%Base] @@ -1038,50 +871,31 @@ class T2(G2: type) { // CHECK:STDOUT: %v.patt: %pattern_type.b8d = ref_binding_pattern v [concrete = constants.%v.patt] // CHECK:STDOUT: %v.var_patt: %pattern_type.b8d = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.5d3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.d21] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %ptr.454) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %ptr.454) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %ptr.454) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %ptr.454) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %struct_type.vptr) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc8_3.1: ref %ptr.454 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %struct_type.vptr) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.3(%self.param: ref %Base) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8: ref %ptr.454 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %struct_type.vptr) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %struct_type.vptr) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %Base) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.3(%self.param: ref %Base) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.3(%self.param: ref %Base) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1094,7 +908,6 @@ class T2(G2: type) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [concrete] // CHECK:STDOUT: %pattern_type.912: type = pattern_type %Base [concrete] // CHECK:STDOUT: %ptr.454: type = ptr_type [concrete] @@ -1137,38 +950,29 @@ class T2(G2: type) { // CHECK:STDOUT: %bound_method.ab2: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_5.708: %i32 = int_value 5 [concrete] // CHECK:STDOUT: %Base.val: %Base = struct_value (%Base.vtable_ptr, %int_5.708, %int_3.9f3) [concrete] -// CHECK:STDOUT: %pattern_type.258: type = pattern_type %ptr.454 [concrete] -// CHECK:STDOUT: %self.param_patt.2f4: %pattern_type.258 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cf4: %pattern_type.258 = wrapper_binding_pattern self, %self.param_patt.2f4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc15_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc15_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.c18: type = pattern_type %struct_type.vptr.m1.m2 [concrete] -// CHECK:STDOUT: %self.param_patt.418: %pattern_type.c18 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.31a: %pattern_type.c18 = wrapper_binding_pattern self, %self.param_patt.418 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc15_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.21c: %pattern_type.912 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.26b: %pattern_type.912 = wrapper_binding_pattern self, %self.param_patt.21c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc15_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c1a: %SubobjectDestroy.type = facet_value %ptr.454, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cad: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c1a) [concrete] +// CHECK:STDOUT: %Destroy.facet.194: %Destroy.type = facet_value %ptr.454, (%DestroyImpl.impl_witness.cad, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_3.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0c7: %SubobjectDestroy.type = facet_value %Base, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d83: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0c7) [concrete] +// CHECK:STDOUT: %Destroy.facet.9fe: %Destroy.type = facet_value %Base, (%DestroyImpl.impl_witness.d83, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1176,65 +980,8 @@ class T2(G2: type) { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.258 = ref_param_pattern [concrete = constants.%self.param_patt.2f4] -// CHECK:STDOUT: %self.patt: %pattern_type.258 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cf4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.454 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.454 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc15_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.258 = ref_param_pattern [concrete = constants.%self.param_patt.2f4] -// CHECK:STDOUT: %self.patt: %pattern_type.258 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cf4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.454 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.454 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc15_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c18 = ref_param_pattern [concrete = constants.%self.param_patt.418] -// CHECK:STDOUT: %self.patt: %pattern_type.c18 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.31a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.vptr.m1.m2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.vptr.m1.m2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc15_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c18 = ref_param_pattern [concrete = constants.%self.param_patt.418] -// CHECK:STDOUT: %self.patt: %pattern_type.c18 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.31a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.vptr.m1.m2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.vptr.m1.m2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.912 = ref_param_pattern [concrete = constants.%self.param_patt.21c] -// CHECK:STDOUT: %self.patt: %pattern_type.912 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.26b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Base = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Base = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc15_3.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.912 = ref_param_pattern [concrete = constants.%self.param_patt.21c] -// CHECK:STDOUT: %self.patt: %pattern_type.912 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.26b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Base = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Base = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: vtable @Base.vtable { @@ -1268,8 +1015,8 @@ class T2(G2: type) { // CHECK:STDOUT: %.loc14_35.6: ref %i32 = class_element_access %b1.var, element1 // CHECK:STDOUT: %.loc14_35.7: init %i32 to %.loc14_35.6 = in_place_init %Int.as.Copy.impl.Op.call.loc14_25 // CHECK:STDOUT: %.loc14_35.8: init %Base to %b1.var = class_init (%.loc14_35.3, %.loc14_35.5, %.loc14_35.7) -// CHECK:STDOUT: %.loc14_3: init %Base = converted %.loc14_35.1, %.loc14_35.8 -// CHECK:STDOUT: assign %b1.var, %.loc14_3 +// CHECK:STDOUT: %.loc14_3.1: init %Base = converted %.loc14_35.1, %.loc14_35.8 +// CHECK:STDOUT: assign %b1.var, %.loc14_3.1 // CHECK:STDOUT: %Base.ref.loc14: type = name_ref Base, file.%Base.decl [concrete = constants.%Base] // CHECK:STDOUT: %b1: ref %Base = wrapper_binding b1, %b1.var // CHECK:STDOUT: name_binding_decl { @@ -1300,8 +1047,8 @@ class T2(G2: type) { // CHECK:STDOUT: %.loc15_42.8: ref %i32 = class_element_access %b2.var, element1 // CHECK:STDOUT: %.loc15_42.9: init %i32 to %.loc15_42.8 = in_place_init %.loc15_42.7 [concrete = constants.%int_3.9f3] // CHECK:STDOUT: %.loc15_42.10: init %Base to %b2.var = class_init (%.loc15_42.3, %.loc15_42.6, %.loc15_42.9) [concrete = constants.%Base.val] -// CHECK:STDOUT: %.loc15_3: init %Base = converted %.loc15_42.1, %.loc15_42.10 [concrete = constants.%Base.val] -// CHECK:STDOUT: assign %b2.var, %.loc15_3 +// CHECK:STDOUT: %.loc15_3.1: init %Base = converted %.loc15_42.1, %.loc15_42.10 [concrete = constants.%Base.val] +// CHECK:STDOUT: assign %b2.var, %.loc15_3.1 // CHECK:STDOUT: %Base.ref.loc15: type = name_ref Base, file.%Base.decl [concrete = constants.%Base] // CHECK:STDOUT: %b2: ref %Base = wrapper_binding b2, %b2.var // CHECK:STDOUT: name_binding_decl { @@ -1309,77 +1056,69 @@ class T2(G2: type) { // CHECK:STDOUT: %b2.var_patt: %pattern_type.912 = var_pattern %b2.patt [concrete = constants.%b2.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15: = bound_method %b2.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15(%b2.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14: = bound_method %b1.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14(%b1.var) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b2.var) +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%Base, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%Base, (constants.%DestroyImpl.impl_witness.d83, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%Base, %Destroy.facet.loc14_3.2 [concrete = constants.%Destroy.facet.9fe] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%b1.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.1(%self.param: ref %ptr.454) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.1(%self.param: ref %ptr.454) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.1(%self.param: ref %ptr.454) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.1(%self.param: ref %ptr.454) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.2(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.2(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.3(%self.param: ref %struct_type.vptr.m1.m2) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.3(%self.param: ref %struct_type.vptr.m1.m2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc15_3.1: ref %i32 = struct_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15_3.1: = bound_method %.loc15_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15_3.1(%.loc15_3.1) -// CHECK:STDOUT: %.loc15_3.2: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15_3.2: = bound_method %.loc15_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15_3.2(%.loc15_3.2) -// CHECK:STDOUT: %.loc15_3.3: ref %ptr.454 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15_3.3: = bound_method %.loc15_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15_3.3(%.loc15_3.3) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc15_3.1) +// CHECK:STDOUT: %.loc15_3.4: ref %i32 = struct_access %self.param, element1 +// CHECK:STDOUT: %Destroy.facet.loc15_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc15_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc15_3.4) +// CHECK:STDOUT: %.loc15_3.7: ref %ptr.454 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc15_3.5: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: %.loc15_3.8: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc15_3.5 [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: %Destroy.facet.loc15_3.6: %Destroy.type = facet_value constants.%ptr.454, (constants.%DestroyImpl.impl_witness.cad, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: %.loc15_3.9: %Destroy.type = converted constants.%ptr.454, %Destroy.facet.loc15_3.6 [concrete = constants.%Destroy.facet.194] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc15_3.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.3(%self.param: ref %struct_type.vptr.m1.m2) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.3(%self.param: ref %struct_type.vptr.m1.m2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_3.4(%self.param: ref %Base) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_3.4(%self.param: ref %Base) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %m2.ref: %Base.elem = name_ref m2, @Base.%field_decl.loc6 [concrete = @Base.%field_decl.loc6] // CHECK:STDOUT: %.loc15_3.1: ref %i32 = class_element_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15_3.1: = bound_method %.loc15_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15_3.1(%.loc15_3.1) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc15_3.1) // CHECK:STDOUT: %m1.ref: %Base.elem = name_ref m1, @Base.%field_decl.loc5 [concrete = @Base.%field_decl.loc5] -// CHECK:STDOUT: %.loc15_3.2: ref %i32 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15_3.2: = bound_method %.loc15_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15_3.2(%.loc15_3.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_3.4(%self.param: ref %Base) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_3.4(%self.param: ref %Base) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) +// CHECK:STDOUT: %.loc15_3.4: ref %i32 = class_element_access %self.param, element1 +// CHECK:STDOUT: %Destroy.facet.loc15_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc15_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc15_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1537,7 +1276,6 @@ class T2(G2: type) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %ImplicitAs.type.f55: type = facet_type <@ImplicitAs, @ImplicitAs(%T1)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness @T2.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.7a3: type = pattern_type %T2 [concrete] // CHECK:STDOUT: %T2.as.ImplicitAs.impl.Convert.type: type = fn_type @T2.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %T2.as.ImplicitAs.impl.Convert: %T2.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.f55 = facet_value %T2, (%ImplicitAs.impl_witness) [concrete] @@ -1550,52 +1288,22 @@ class T2(G2: type) { // CHECK:STDOUT: %Derived.F.type.48cdab.2: type = fn_type @Derived.F.loc23 [concrete] // CHECK:STDOUT: %Derived.F.bd5be1.2: %Derived.F.type.48cdab.2 = struct_value () [concrete] // CHECK:STDOUT: %.321: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.430, %ImplicitAs.facet [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_28.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc23_28.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.995: %pattern_type.7a3 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.bbf: %pattern_type.7a3 = wrapper_binding_pattern self, %self.param_patt.995 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_28.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc23_28.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_28.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_28.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.69e: %SubobjectDestroy.type = facet_value %T2, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.69e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %T2, (%DestroyImpl.impl_witness.4d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_28.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc23_28.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_28.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7a3 = ref_param_pattern [concrete = constants.%self.param_patt.995] -// CHECK:STDOUT: %self.patt: %pattern_type.7a3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bbf] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %T2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %T2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc23_28.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7a3 = ref_param_pattern [concrete = constants.%self.param_patt.995] -// CHECK:STDOUT: %self.patt: %pattern_type.7a3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bbf] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %T2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %T2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { @@ -1654,32 +1362,18 @@ class T2(G2: type) { // CHECK:STDOUT: %.loc23_28.6: %T2 = acquire_value %.loc23_28.5 // CHECK:STDOUT: %T2.as.ImplicitAs.impl.Convert.call: init %T1 to %.3 = call %bound_method(%.loc23_28.6) // CHECK:STDOUT: %.loc23_28.7: init %T1 = converted %Derived.F.call, %T2.as.ImplicitAs.impl.Convert.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc23_28.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc23_28.5) +// CHECK:STDOUT: %Destroy.facet.loc23_28.1: %Destroy.type = facet_value constants.%T2, (constants.%DestroyImpl.impl_witness.4d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_28.8: %Destroy.type = converted constants.%T2, %Destroy.facet.loc23_28.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc23_28.2: %Destroy.type = facet_value constants.%T2, (constants.%DestroyImpl.impl_witness.4d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_28.9: %Destroy.type = converted constants.%T2, %Destroy.facet.loc23_28.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc23_28.5) // CHECK:STDOUT: return %.loc23_28.7 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_28.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_28.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_28.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_28.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_28.2(%self.param: ref %T2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_28.2(%self.param: ref %T2) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- generic_with_virtual.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/nested.carbon b/toolchain/check/testdata/class/nested.carbon index c6e8527e655f..0f95da98397a 100644 --- a/toolchain/check/testdata/class/nested.carbon +++ b/toolchain/check/testdata/class/nested.carbon @@ -98,53 +98,41 @@ fn F(a: Outer*) { // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.eee: %T.as.DefaultOrUnformed.impl.Op.type.5c5 = struct_value () [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet.cc7: %DefaultOrUnformed.type = facet_value %Inner, (%DefaultOrUnformed.impl_witness.20a) [concrete] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn.d68: = specific_function %T.as.DefaultOrUnformed.impl.Op.eee, @T.as.DefaultOrUnformed.impl.Op(%Inner) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.4dd: %pattern_type.36a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.52a: %pattern_type.36a = wrapper_binding_pattern self, %self.param_patt.4dd [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc19_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc19_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a6e: %pattern_type.647 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b68: %pattern_type.647 = wrapper_binding_pattern self, %self.param_patt.a6e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc19_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc19_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.643: type = pattern_type %struct_type.pi.po.qi [concrete] -// CHECK:STDOUT: %self.param_patt.2c8: %pattern_type.643 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f02: %pattern_type.643 = wrapper_binding_pattern self, %self.param_patt.2c8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc19_5.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc19_5.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c59: %pattern_type.dc4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7d9: %pattern_type.dc4 = wrapper_binding_pattern self, %self.param_patt.c59 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc19_5.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc19_5.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19_5.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.15c: type = pattern_type %struct_type.po.qo.pi [concrete] -// CHECK:STDOUT: %self.param_patt.d58: %pattern_type.15c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.116: %pattern_type.15c = wrapper_binding_pattern self, %self.param_patt.d58 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc18_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0a9: %pattern_type.d6c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.da1: %pattern_type.d6c = wrapper_binding_pattern self, %self.param_patt.0a9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc18_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc19_5.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc19_5.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.96d: %SubobjectDestroy.type = facet_value %ptr.001, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.391: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.96d) [concrete] +// CHECK:STDOUT: %Destroy.facet.00b: %Destroy.type = facet_value %ptr.001, (%DestroyImpl.impl_witness.391, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.177: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.00b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b07: %SubobjectDestroy.type = facet_value %ptr.286, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.8db: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b07) [concrete] +// CHECK:STDOUT: %Destroy.facet.319: %Destroy.type = facet_value %ptr.286, (%DestroyImpl.impl_witness.8db, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.a82: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.319) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc19_5.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.015: %SubobjectDestroy.type = facet_value %Inner, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4e0: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.015) [concrete] +// CHECK:STDOUT: %Destroy.facet.a73: %Destroy.type = facet_value %Inner, (%DestroyImpl.impl_witness.4e0, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.69c: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.a73) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.6: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_5.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.6: %SubobjectDestroy.WithSelf.Op.type.6870fd.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.6: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.6), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.5bd: %SubobjectDestroy.type = facet_value %Outer, (%custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e99: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.5bd) [concrete] +// CHECK:STDOUT: %Destroy.facet.5f0: %Destroy.type = facet_value %Outer, (%DestroyImpl.impl_witness.e99, %custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.984: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.5f0) [concrete] // CHECK:STDOUT: %o.patt.a05f50.2: %pattern_type.d6c = ref_binding_pattern o [concrete] // CHECK:STDOUT: %o.var_patt.6496fb.2: %pattern_type.d6c = var_pattern %o.patt.a05f50.2 [concrete] // CHECK:STDOUT: %i.patt.539460.2: %pattern_type.dc4 = ref_binding_pattern i [concrete] @@ -180,7 +168,7 @@ fn F(a: Outer*) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -188,99 +176,14 @@ fn F(a: Outer*) { // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] // CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.06a: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.20f) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.f12)] // CHECK:STDOUT: %Copy.impl_witness_table.fb0 = impl_witness_table (%Core.import_ref.06a), @ptr.as.Copy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc19_5.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.36a = ref_param_pattern [concrete = constants.%self.param_patt.4dd] -// CHECK:STDOUT: %self.patt: %pattern_type.36a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.52a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.001 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.001 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc19_5.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.36a = ref_param_pattern [concrete = constants.%self.param_patt.4dd] -// CHECK:STDOUT: %self.patt: %pattern_type.36a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.52a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.001 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.001 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc19_5.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.647 = ref_param_pattern [concrete = constants.%self.param_patt.a6e] -// CHECK:STDOUT: %self.patt: %pattern_type.647 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b68] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.286 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.286 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc19_5.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.647 = ref_param_pattern [concrete = constants.%self.param_patt.a6e] -// CHECK:STDOUT: %self.patt: %pattern_type.647 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b68] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.286 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.286 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc19_5.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.643 = ref_param_pattern [concrete = constants.%self.param_patt.2c8] -// CHECK:STDOUT: %self.patt: %pattern_type.643 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f02] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.pi.po.qi = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.pi.po.qi = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc19_5.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.643 = ref_param_pattern [concrete = constants.%self.param_patt.2c8] -// CHECK:STDOUT: %self.patt: %pattern_type.643 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f02] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.pi.po.qi = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.pi.po.qi = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc19_5.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc4 = ref_param_pattern [concrete = constants.%self.param_patt.c59] -// CHECK:STDOUT: %self.patt: %pattern_type.dc4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7d9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Inner = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Inner = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc19_5.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc4 = ref_param_pattern [concrete = constants.%self.param_patt.c59] -// CHECK:STDOUT: %self.patt: %pattern_type.dc4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7d9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Inner = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Inner = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_5.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.15c = ref_param_pattern [concrete = constants.%self.param_patt.d58] -// CHECK:STDOUT: %self.patt: %pattern_type.15c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.116] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.po.qo.pi = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.po.qo.pi = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc18_5.1 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.15c = ref_param_pattern [concrete = constants.%self.param_patt.d58] -// CHECK:STDOUT: %self.patt: %pattern_type.15c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.116] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.po.qo.pi = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.po.qo.pi = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_5.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d6c = ref_param_pattern [concrete = constants.%self.param_patt.0a9] -// CHECK:STDOUT: %self.patt: %pattern_type.d6c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.da1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Outer = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Outer = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc18_5.2 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d6c = ref_param_pattern [concrete = constants.%self.param_patt.0a9] -// CHECK:STDOUT: %self.patt: %pattern_type.d6c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.da1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Outer = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Outer = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -367,8 +270,8 @@ fn F(a: Outer*) { // CHECK:STDOUT: %as_type.loc18: type = facet_access_type %.loc18_24.1 [concrete = constants.%Outer] // CHECK:STDOUT: %.loc18_24.2: type = converted %.loc18_24.1, %as_type.loc18 [concrete = constants.%Outer] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn.1: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.f80, @T.as.DefaultOrUnformed.impl.Op(constants.%Outer) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn.a77] -// CHECK:STDOUT: %.loc18_5: ref %Outer = splice_block %o.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc18: init %Outer to %.loc18_5 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.1() +// CHECK:STDOUT: %.loc18_5.1: ref %Outer = splice_block %o.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc18: init %Outer to %.loc18_5.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.1() // CHECK:STDOUT: assign %o.var, %T.as.DefaultOrUnformed.impl.Op.call.loc18 // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer] // CHECK:STDOUT: %o: ref %Outer = wrapper_binding o, %o.var @@ -382,8 +285,8 @@ fn F(a: Outer*) { // CHECK:STDOUT: %as_type.loc19: type = facet_access_type %.loc19_24.1 [concrete = constants.%Inner] // CHECK:STDOUT: %.loc19_24.2: type = converted %.loc19_24.1, %as_type.loc19 [concrete = constants.%Inner] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn.2: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.eee, @T.as.DefaultOrUnformed.impl.Op(constants.%Inner) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn.d68] -// CHECK:STDOUT: %.loc19_5: ref %Inner = splice_block %i.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc19: init %Inner to %.loc19_5 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.2() +// CHECK:STDOUT: %.loc19_5.1: ref %Inner = splice_block %i.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc19: init %Inner to %.loc19_5.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.2() // CHECK:STDOUT: assign %i.var, %T.as.DefaultOrUnformed.impl.Op.call.loc19 // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [concrete = constants.%Inner] // CHECK:STDOUT: %i: ref %Inner = wrapper_binding i, %i.var @@ -391,10 +294,18 @@ fn F(a: Outer*) { // CHECK:STDOUT: %i.patt: %pattern_type.dc4 = ref_binding_pattern i [concrete = constants.%i.patt.539460.1] // CHECK:STDOUT: %i.var_patt: %pattern_type.dc4 = var_pattern %i.patt [concrete = constants.%i.var_patt.15311d.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %i.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%i.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18: = bound_method %o.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18(%o.var) +// CHECK:STDOUT: %Destroy.facet.loc19_5.1: %Destroy.type = facet_value constants.%Inner, (constants.%DestroyImpl.impl_witness.4e0, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %.loc19_5.2: %Destroy.type = converted constants.%Inner, %Destroy.facet.loc19_5.1 [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %Destroy.facet.loc19_5.2: %Destroy.type = facet_value constants.%Inner, (constants.%DestroyImpl.impl_witness.4e0, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %.loc19_5.3: %Destroy.type = converted constants.%Inner, %Destroy.facet.loc19_5.2 [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.a73) [concrete = constants.%SelfDestruct.specific_fn.69c] +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%i.var) +// CHECK:STDOUT: %Destroy.facet.loc18_5.1: %Destroy.type = facet_value constants.%Outer, (constants.%DestroyImpl.impl_witness.e99, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %.loc18_5.2: %Destroy.type = converted constants.%Outer, %Destroy.facet.loc18_5.1 [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %Destroy.facet.loc18_5.2: %Destroy.type = facet_value constants.%Outer, (constants.%DestroyImpl.impl_witness.e99, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %.loc18_5.3: %Destroy.type = converted constants.%Outer, %Destroy.facet.loc18_5.2 [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.5f0) [concrete = constants.%SelfDestruct.specific_fn.984] +// CHECK:STDOUT: %SelfDestruct.call.loc18: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%o.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -406,8 +317,8 @@ fn F(a: Outer*) { // CHECK:STDOUT: %as_type.loc29: type = facet_access_type %.loc29_26.1 [concrete = constants.%Outer] // CHECK:STDOUT: %.loc29_26.2: type = converted %.loc29_26.1, %as_type.loc29 [concrete = constants.%Outer] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn.1: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.f80, @T.as.DefaultOrUnformed.impl.Op(constants.%Outer) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn.a77] -// CHECK:STDOUT: %.loc29_7: ref %Outer = splice_block %o.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc29: init %Outer to %.loc29_7 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.1() +// CHECK:STDOUT: %.loc29_7.1: ref %Outer = splice_block %o.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc29: init %Outer to %.loc29_7.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.1() // CHECK:STDOUT: assign %o.var, %T.as.DefaultOrUnformed.impl.Op.call.loc29 // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer] // CHECK:STDOUT: %o: ref %Outer = wrapper_binding o, %o.var @@ -421,8 +332,8 @@ fn F(a: Outer*) { // CHECK:STDOUT: %as_type.loc30: type = facet_access_type %.loc30_26.1 [concrete = constants.%Inner] // CHECK:STDOUT: %.loc30_26.2: type = converted %.loc30_26.1, %as_type.loc30 [concrete = constants.%Inner] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn.2: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.eee, @T.as.DefaultOrUnformed.impl.Op(constants.%Inner) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn.d68] -// CHECK:STDOUT: %.loc30_7: ref %Inner = splice_block %i.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc30: init %Inner to %.loc30_7 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.2() +// CHECK:STDOUT: %.loc30_7.1: ref %Inner = splice_block %i.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc30: init %Inner to %.loc30_7.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.2() // CHECK:STDOUT: assign %i.var, %T.as.DefaultOrUnformed.impl.Op.call.loc30 // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [concrete = constants.%Inner] // CHECK:STDOUT: %i: ref %Inner = wrapper_binding i, %i.var @@ -430,10 +341,18 @@ fn F(a: Outer*) { // CHECK:STDOUT: %i.patt: %pattern_type.dc4 = ref_binding_pattern i [concrete = constants.%i.patt.539460.2] // CHECK:STDOUT: %i.var_patt: %pattern_type.dc4 = var_pattern %i.patt [concrete = constants.%i.var_patt.15311d.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc30: = bound_method %i.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc30: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc30(%i.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc29: = bound_method %o.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc29: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc29(%o.var) +// CHECK:STDOUT: %Destroy.facet.loc30_7.1: %Destroy.type = facet_value constants.%Inner, (constants.%DestroyImpl.impl_witness.4e0, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %.loc30_7.2: %Destroy.type = converted constants.%Inner, %Destroy.facet.loc30_7.1 [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %Destroy.facet.loc30_7.2: %Destroy.type = facet_value constants.%Inner, (constants.%DestroyImpl.impl_witness.4e0, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %.loc30_7.3: %Destroy.type = converted constants.%Inner, %Destroy.facet.loc30_7.2 [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.a73) [concrete = constants.%SelfDestruct.specific_fn.69c] +// CHECK:STDOUT: %SelfDestruct.call.loc30: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%i.var) +// CHECK:STDOUT: %Destroy.facet.loc29_7.1: %Destroy.type = facet_value constants.%Outer, (constants.%DestroyImpl.impl_witness.e99, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %.loc29_7.2: %Destroy.type = converted constants.%Outer, %Destroy.facet.loc29_7.1 [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %Destroy.facet.loc29_7.2: %Destroy.type = facet_value constants.%Outer, (constants.%DestroyImpl.impl_witness.e99, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %.loc29_7.3: %Destroy.type = converted constants.%Outer, %Destroy.facet.loc29_7.2 [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.5f0) [concrete = constants.%SelfDestruct.specific_fn.984] +// CHECK:STDOUT: %SelfDestruct.call.loc29: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%o.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -445,8 +364,8 @@ fn F(a: Outer*) { // CHECK:STDOUT: %as_type.loc36: type = facet_access_type %.loc36_24.1 [concrete = constants.%Outer] // CHECK:STDOUT: %.loc36_24.2: type = converted %.loc36_24.1, %as_type.loc36 [concrete = constants.%Outer] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn.1: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.f80, @T.as.DefaultOrUnformed.impl.Op(constants.%Outer) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn.a77] -// CHECK:STDOUT: %.loc36_5: ref %Outer = splice_block %o.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc36: init %Outer to %.loc36_5 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.1() +// CHECK:STDOUT: %.loc36_5.1: ref %Outer = splice_block %o.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc36: init %Outer to %.loc36_5.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.1() // CHECK:STDOUT: assign %o.var, %T.as.DefaultOrUnformed.impl.Op.call.loc36 // CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [concrete = constants.%Outer] // CHECK:STDOUT: %o: ref %Outer = wrapper_binding o, %o.var @@ -460,8 +379,8 @@ fn F(a: Outer*) { // CHECK:STDOUT: %as_type.loc37: type = facet_access_type %.loc37_24.1 [concrete = constants.%Inner] // CHECK:STDOUT: %.loc37_24.2: type = converted %.loc37_24.1, %as_type.loc37 [concrete = constants.%Inner] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn.2: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.eee, @T.as.DefaultOrUnformed.impl.Op(constants.%Inner) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn.d68] -// CHECK:STDOUT: %.loc37_5: ref %Inner = splice_block %i.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc37: init %Inner to %.loc37_5 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.2() +// CHECK:STDOUT: %.loc37_5.1: ref %Inner = splice_block %i.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call.loc37: init %Inner to %.loc37_5.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn.2() // CHECK:STDOUT: assign %i.var, %T.as.DefaultOrUnformed.impl.Op.call.loc37 // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [concrete = constants.%Inner] // CHECK:STDOUT: %i: ref %Inner = wrapper_binding i, %i.var @@ -469,130 +388,132 @@ fn F(a: Outer*) { // CHECK:STDOUT: %i.patt: %pattern_type.dc4 = ref_binding_pattern i [concrete = constants.%i.patt.539460.3] // CHECK:STDOUT: %i.var_patt: %pattern_type.dc4 = var_pattern %i.patt [concrete = constants.%i.var_patt.15311d.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc37: = bound_method %i.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc37: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc37(%i.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc36: = bound_method %o.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc36: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc36(%o.var) +// CHECK:STDOUT: %Destroy.facet.loc37_5.1: %Destroy.type = facet_value constants.%Inner, (constants.%DestroyImpl.impl_witness.4e0, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %.loc37_5.2: %Destroy.type = converted constants.%Inner, %Destroy.facet.loc37_5.1 [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %Destroy.facet.loc37_5.2: %Destroy.type = facet_value constants.%Inner, (constants.%DestroyImpl.impl_witness.4e0, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %.loc37_5.3: %Destroy.type = converted constants.%Inner, %Destroy.facet.loc37_5.2 [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.a73) [concrete = constants.%SelfDestruct.specific_fn.69c] +// CHECK:STDOUT: %SelfDestruct.call.loc37: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%i.var) +// CHECK:STDOUT: %Destroy.facet.loc36_5.1: %Destroy.type = facet_value constants.%Outer, (constants.%DestroyImpl.impl_witness.e99, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %.loc36_5.2: %Destroy.type = converted constants.%Outer, %Destroy.facet.loc36_5.1 [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %Destroy.facet.loc36_5.2: %Destroy.type = facet_value constants.%Outer, (constants.%DestroyImpl.impl_witness.e99, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %.loc36_5.3: %Destroy.type = converted constants.%Outer, %Destroy.facet.loc36_5.2 [concrete = constants.%Destroy.facet.5f0] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.5f0) [concrete = constants.%SelfDestruct.specific_fn.984] +// CHECK:STDOUT: %SelfDestruct.call.loc36: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%o.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19_5.1(%self.param: ref %ptr.001) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc19_5.1(%self.param: ref %ptr.001) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19_5.1(%self.param: ref %ptr.001) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc19_5.2(%self.param: ref %ptr.286) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19_5.1(%self.param: ref %ptr.001) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19_5.2(%self.param: ref %ptr.286) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19_5.2(%self.param: ref %ptr.286) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19_5.2(%self.param: ref %ptr.286) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19_5.3(%self.param: ref %struct_type.pi.po.qi) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc19_5.3(%self.param: ref %struct_type.pi.po.qi) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc19_5.1: ref %ptr.001 = struct_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19_5.1: = bound_method %.loc19_5.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19_5.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19_5.1(%.loc19_5.1) -// CHECK:STDOUT: %.loc19_5.2: ref %ptr.286 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19_5.2: = bound_method %.loc19_5.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19_5.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19_5.2(%.loc19_5.2) -// CHECK:STDOUT: %.loc19_5.3: ref %ptr.001 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19_5.3: = bound_method %.loc19_5.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19_5.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19_5.3(%.loc19_5.3) +// CHECK:STDOUT: %Destroy.facet.loc19_5.1: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc19_5.2: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc19_5.1 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %Destroy.facet.loc19_5.2: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc19_5.3: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc19_5.2 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.00b) [concrete = constants.%SelfDestruct.specific_fn.177] +// CHECK:STDOUT: %SelfDestruct.call.loc19_5.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc19_5.1) +// CHECK:STDOUT: %.loc19_5.4: ref %ptr.286 = struct_access %self.param, element1 +// CHECK:STDOUT: %Destroy.facet.loc19_5.3: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc19_5.5: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc19_5.3 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %Destroy.facet.loc19_5.4: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc19_5.6: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc19_5.4 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.319) [concrete = constants.%SelfDestruct.specific_fn.a82] +// CHECK:STDOUT: %SelfDestruct.call.loc19_5.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc19_5.4) +// CHECK:STDOUT: %.loc19_5.7: ref %ptr.001 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc19_5.5: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc19_5.8: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc19_5.5 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %Destroy.facet.loc19_5.6: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc19_5.9: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc19_5.6 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.00b) [concrete = constants.%SelfDestruct.specific_fn.177] +// CHECK:STDOUT: %SelfDestruct.call.loc19_5.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc19_5.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19_5.3(%self.param: ref %struct_type.pi.po.qi) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19_5.3(%self.param: ref %struct_type.pi.po.qi) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19_5.4(%self.param: ref %Inner) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc19_5.4(%self.param: ref %Inner) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %qi.ref: %Inner.elem.df9 = name_ref qi, @Inner.%field_decl.loc25 [concrete = @Inner.%field_decl.loc25] // CHECK:STDOUT: %.loc19_5.1: ref %ptr.001 = class_element_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19_5.1: = bound_method %.loc19_5.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19_5.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19_5.1(%.loc19_5.1) +// CHECK:STDOUT: %Destroy.facet.loc19_5.1: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc19_5.2: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc19_5.1 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %Destroy.facet.loc19_5.2: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc19_5.3: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc19_5.2 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.00b) [concrete = constants.%SelfDestruct.specific_fn.177] +// CHECK:STDOUT: %SelfDestruct.call.loc19_5.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc19_5.1) // CHECK:STDOUT: %po.ref: %Inner.elem.2a2 = name_ref po, @Inner.%field_decl.loc24 [concrete = @Inner.%field_decl.loc24] -// CHECK:STDOUT: %.loc19_5.2: ref %ptr.286 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19_5.2: = bound_method %.loc19_5.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19_5.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19_5.2(%.loc19_5.2) +// CHECK:STDOUT: %.loc19_5.4: ref %ptr.286 = class_element_access %self.param, element1 +// CHECK:STDOUT: %Destroy.facet.loc19_5.3: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc19_5.5: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc19_5.3 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %Destroy.facet.loc19_5.4: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc19_5.6: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc19_5.4 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.319) [concrete = constants.%SelfDestruct.specific_fn.a82] +// CHECK:STDOUT: %SelfDestruct.call.loc19_5.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc19_5.4) // CHECK:STDOUT: %pi.ref: %Inner.elem.df9 = name_ref pi, @Inner.%field_decl.loc23 [concrete = @Inner.%field_decl.loc23] -// CHECK:STDOUT: %.loc19_5.3: ref %ptr.001 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19_5.3: = bound_method %.loc19_5.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19_5.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19_5.3(%.loc19_5.3) +// CHECK:STDOUT: %.loc19_5.7: ref %ptr.001 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc19_5.5: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc19_5.8: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc19_5.5 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %Destroy.facet.loc19_5.6: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc19_5.9: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc19_5.6 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.00b) [concrete = constants.%SelfDestruct.specific_fn.177] +// CHECK:STDOUT: %SelfDestruct.call.loc19_5.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc19_5.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19_5.4(%self.param: ref %Inner) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19_5.4(%self.param: ref %Inner) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_5.1(%self.param: ref %struct_type.po.qo.pi) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_5.1(%self.param: ref %struct_type.po.qo.pi) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18_5.1: ref %ptr.001 = struct_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_5.1: = bound_method %.loc18_5.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_5.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_5.1(%.loc18_5.1) -// CHECK:STDOUT: %.loc18_5.2: ref %ptr.286 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_5.2: = bound_method %.loc18_5.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_5.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_5.2(%.loc18_5.2) -// CHECK:STDOUT: %.loc18_5.3: ref %ptr.286 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_5.3: = bound_method %.loc18_5.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_5.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_5.3(%.loc18_5.3) +// CHECK:STDOUT: %Destroy.facet.loc18_5.1: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc18_5.2: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc18_5.1 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %Destroy.facet.loc18_5.2: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc18_5.3: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc18_5.2 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.00b) [concrete = constants.%SelfDestruct.specific_fn.177] +// CHECK:STDOUT: %SelfDestruct.call.loc18_5.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc18_5.1) +// CHECK:STDOUT: %.loc18_5.4: ref %ptr.286 = struct_access %self.param, element1 +// CHECK:STDOUT: %Destroy.facet.loc18_5.3: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc18_5.5: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc18_5.3 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %Destroy.facet.loc18_5.4: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc18_5.6: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc18_5.4 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.319) [concrete = constants.%SelfDestruct.specific_fn.a82] +// CHECK:STDOUT: %SelfDestruct.call.loc18_5.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc18_5.4) +// CHECK:STDOUT: %.loc18_5.7: ref %ptr.286 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc18_5.5: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc18_5.8: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc18_5.5 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %Destroy.facet.loc18_5.6: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc18_5.9: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc18_5.6 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.319) [concrete = constants.%SelfDestruct.specific_fn.a82] +// CHECK:STDOUT: %SelfDestruct.call.loc18_5.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc18_5.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_5.1(%self.param: ref %struct_type.po.qo.pi) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_5.1(%self.param: ref %struct_type.po.qo.pi) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_5.2(%self.param: ref %Outer) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_5.2(%self.param: ref %Outer) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %pi.ref: %Outer.elem.fe3 = name_ref pi, @Outer.%field_decl.loc42 [concrete = @Outer.%field_decl.loc42] // CHECK:STDOUT: %.loc18_5.1: ref %ptr.001 = class_element_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_5.1: = bound_method %.loc18_5.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_5.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_5.1(%.loc18_5.1) +// CHECK:STDOUT: %Destroy.facet.loc18_5.1: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc18_5.2: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc18_5.1 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %Destroy.facet.loc18_5.2: %Destroy.type = facet_value constants.%ptr.001, (constants.%DestroyImpl.impl_witness.391, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %.loc18_5.3: %Destroy.type = converted constants.%ptr.001, %Destroy.facet.loc18_5.2 [concrete = constants.%Destroy.facet.00b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.00b) [concrete = constants.%SelfDestruct.specific_fn.177] +// CHECK:STDOUT: %SelfDestruct.call.loc18_5.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc18_5.1) // CHECK:STDOUT: %qo.ref: %Outer.elem.3ef = name_ref qo, @Outer.%field_decl.loc41 [concrete = @Outer.%field_decl.loc41] -// CHECK:STDOUT: %.loc18_5.2: ref %ptr.286 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_5.2: = bound_method %.loc18_5.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_5.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_5.2(%.loc18_5.2) +// CHECK:STDOUT: %.loc18_5.4: ref %ptr.286 = class_element_access %self.param, element1 +// CHECK:STDOUT: %Destroy.facet.loc18_5.3: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc18_5.5: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc18_5.3 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %Destroy.facet.loc18_5.4: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc18_5.6: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc18_5.4 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.319) [concrete = constants.%SelfDestruct.specific_fn.a82] +// CHECK:STDOUT: %SelfDestruct.call.loc18_5.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc18_5.4) // CHECK:STDOUT: %po.ref: %Outer.elem.3ef = name_ref po, @Outer.%field_decl.loc40 [concrete = @Outer.%field_decl.loc40] -// CHECK:STDOUT: %.loc18_5.3: ref %ptr.286 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_5.3: = bound_method %.loc18_5.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_5.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_5.3(%.loc18_5.3) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_5.2(%self.param: ref %Outer) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_5.2(%self.param: ref %Outer) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) +// CHECK:STDOUT: %.loc18_5.7: ref %ptr.286 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc18_5.5: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc18_5.8: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc18_5.5 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %Destroy.facet.loc18_5.6: %Destroy.type = facet_value constants.%ptr.286, (constants.%DestroyImpl.impl_witness.8db, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %.loc18_5.9: %Destroy.type = converted constants.%ptr.286, %Destroy.facet.loc18_5.6 [concrete = constants.%Destroy.facet.319] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.319) [concrete = constants.%SelfDestruct.specific_fn.a82] +// CHECK:STDOUT: %SelfDestruct.call.loc18_5.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc18_5.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/nested_name.carbon b/toolchain/check/testdata/class/nested_name.carbon index 292036ac6fdb..7c1bb83f7c5a 100644 --- a/toolchain/check/testdata/class/nested_name.carbon +++ b/toolchain/check/testdata/class/nested_name.carbon @@ -78,30 +78,27 @@ fn G(o: Outer) { // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.eee: %T.as.DefaultOrUnformed.impl.Op.type.5c5 = struct_value () [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %Inner, (%DefaultOrUnformed.impl_witness.20a) [concrete] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function %T.as.DefaultOrUnformed.impl.Op.eee, @T.as.DefaultOrUnformed.impl.Op(%Inner) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc26_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.5c4: type = pattern_type %struct_type.n [concrete] -// CHECK:STDOUT: %self.param_patt.d03: %pattern_type.5c4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3cd: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt.d03 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc26_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c59: %pattern_type.dc4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7d9: %pattern_type.dc4 = wrapper_binding_pattern self, %self.param_patt.c59 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc26_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.015: %SubobjectDestroy.type = facet_value %Inner, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4e0: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.015) [concrete] +// CHECK:STDOUT: %Destroy.facet.a73: %Destroy.type = facet_value %Inner, (%DestroyImpl.impl_witness.4e0, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.69c: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.a73) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -109,7 +106,7 @@ fn G(o: Outer) { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -120,52 +117,9 @@ fn G(o: Outer) { // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] // CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc26_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc26_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc4 = ref_param_pattern [concrete = constants.%self.param_patt.c59] -// CHECK:STDOUT: %self.patt: %pattern_type.dc4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7d9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Inner = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Inner = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc26_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc4 = ref_param_pattern [concrete = constants.%self.param_patt.c59] -// CHECK:STDOUT: %self.patt: %pattern_type.dc4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7d9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Inner = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Inner = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -248,8 +202,8 @@ fn G(o: Outer) { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc26_24.1 [concrete = constants.%Inner] // CHECK:STDOUT: %.loc26_24.2: type = converted %.loc26_24.1, %as_type [concrete = constants.%Inner] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.eee, @T.as.DefaultOrUnformed.impl.Op(constants.%Inner) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] -// CHECK:STDOUT: %.loc26_3: ref %Inner = splice_block %i.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Inner to %.loc26_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc26_3.1: ref %Inner = splice_block %i.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Inner to %.loc26_3.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %i.var, %T.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc26_18: type = splice_block %Inner.ref [concrete = constants.%Inner] { // CHECK:STDOUT: %o.ref: %Outer = name_ref o, %o @@ -260,54 +214,39 @@ fn G(o: Outer) { // CHECK:STDOUT: %i.patt: %pattern_type.dc4 = ref_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: %i.var_patt: %pattern_type.dc4 = var_pattern %i.patt [concrete = constants.%i.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %i.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%i.var) +// CHECK:STDOUT: %Destroy.facet.loc26_3.1: %Destroy.type = facet_value constants.%Inner, (constants.%DestroyImpl.impl_witness.4e0, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %.loc26_3.2: %Destroy.type = converted constants.%Inner, %Destroy.facet.loc26_3.1 [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %Destroy.facet.loc26_3.2: %Destroy.type = facet_value constants.%Inner, (constants.%DestroyImpl.impl_witness.4e0, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %.loc26_3.3: %Destroy.type = converted constants.%Inner, %Destroy.facet.loc26_3.2 [concrete = constants.%Destroy.facet.a73] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.a73) [concrete = constants.%SelfDestruct.specific_fn.69c] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%i.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_3.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26_3.2(%self.param: ref %struct_type.n) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc26_3.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc26_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc26_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc26_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc26_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc26_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.2(%self.param: ref %struct_type.n) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc26: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc26, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc26) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_3.2(%self.param: ref %struct_type.n) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_3.2(%self.param: ref %struct_type.n) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.3(%self.param: ref %Inner) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26_3.3(%self.param: ref %Inner) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %Inner.elem = name_ref n, @Inner.%field_decl [concrete = @Inner.%field_decl] -// CHECK:STDOUT: %.loc26: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc26, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc26) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_3.3(%self.param: ref %Inner) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_3.3(%self.param: ref %Inner) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc26_3.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc26_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc26_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc26_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc26_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc26_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index cba511bedbea..3656f3c2e2d8 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -64,7 +64,6 @@ class A { // CHECK:STDOUT: %Int.type: type = parameterized_class_name_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %B.elem: type = unbound_element_type %B, %i32 [concrete] // CHECK:STDOUT: %struct_type.b.5bf: type = struct_type {.b: %i32} [concrete] // CHECK:STDOUT: %complete_type.62d: = complete_type_witness %struct_type.b.5bf [concrete] @@ -139,82 +138,55 @@ class A { // CHECK:STDOUT: %bound_method.7fa: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.6bf: %i32 = int_value 4 [concrete] // CHECK:STDOUT: %D.val: %D = struct_value (%int_4.6bf) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc36_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc36_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc36_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.f3f: type = pattern_type %struct_type.d.06c [concrete] -// CHECK:STDOUT: %self.param_patt.8ba: %pattern_type.f3f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.63f: %pattern_type.f3f = wrapper_binding_pattern self, %self.param_patt.8ba [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc36_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc36_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.fa6: %pattern_type.a0b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.078: %pattern_type.a0b = wrapper_binding_pattern self, %self.param_patt.fa6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc36_7.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc36_7.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc36_7.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.51a: type = pattern_type %struct_type.c.de0 [concrete] -// CHECK:STDOUT: %self.param_patt.fcf: %pattern_type.51a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.71d: %pattern_type.51a = wrapper_binding_pattern self, %self.param_patt.fcf [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc35_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc35_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.648: %pattern_type.ca8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f03: %pattern_type.ca8 = wrapper_binding_pattern self, %self.param_patt.648 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc35_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc35_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc35_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.e3e: type = pattern_type %struct_type.b.5bf [concrete] -// CHECK:STDOUT: %self.param_patt.826: %pattern_type.e3e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9c6: %pattern_type.e3e = wrapper_binding_pattern self, %self.param_patt.826 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc34_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.1a8: %pattern_type.e78 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.5fa: %pattern_type.e78 = wrapper_binding_pattern self, %self.param_patt.1a8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc34_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7: type = fn_type @Destroy.WithSelf.SelfDestruct.loc34_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.7: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.243: type = pattern_type %struct_type.a.15e [concrete] -// CHECK:STDOUT: %self.param_patt.6cd: %pattern_type.243 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.bd2: %pattern_type.243 = wrapper_binding_pattern self, %self.param_patt.6cd [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc33_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc33_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc33_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.9: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.9: type = fn_type @Destroy.WithSelf.Op.loc33_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.9: %Destroy.WithSelf.Op.type.ef016f.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9: type = fn_type @Destroy.WithSelf.SelfDestruct.loc33_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.9: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc36_7.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc36_7.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ab9: %SubobjectDestroy.type = facet_value %D, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.316: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ab9) [concrete] +// CHECK:STDOUT: %Destroy.facet.07e: %Destroy.type = facet_value %D, (%DestroyImpl.impl_witness.316, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.332: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.07e) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc35_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.544: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dcd: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.544) [concrete] +// CHECK:STDOUT: %Destroy.facet.54f: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.dcd, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.4cb: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.54f) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc34_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b88: %SubobjectDestroy.type = facet_value %B, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.569: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b88) [concrete] +// CHECK:STDOUT: %Destroy.facet.8e4: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.569, %custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.a05: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.8e4) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.9: type = fn_type @SubobjectDestroy.WithSelf.Op.loc33_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.9: %SubobjectDestroy.WithSelf.Op.type.6870fd.9 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.9: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.9), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.9) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet.35e: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.9) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.270: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.35e) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -222,136 +194,9 @@ class A { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc36_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc36_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc36_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f3f = ref_param_pattern [concrete = constants.%self.param_patt.8ba] -// CHECK:STDOUT: %self.patt: %pattern_type.f3f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.63f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.d.06c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.d.06c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc36_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f3f = ref_param_pattern [concrete = constants.%self.param_patt.8ba] -// CHECK:STDOUT: %self.patt: %pattern_type.f3f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.63f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.d.06c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.d.06c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc36_7.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a0b = ref_param_pattern [concrete = constants.%self.param_patt.fa6] -// CHECK:STDOUT: %self.patt: %pattern_type.a0b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.078] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc36_7.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a0b = ref_param_pattern [concrete = constants.%self.param_patt.fa6] -// CHECK:STDOUT: %self.patt: %pattern_type.a0b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.078] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc35_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.51a = ref_param_pattern [concrete = constants.%self.param_patt.fcf] -// CHECK:STDOUT: %self.patt: %pattern_type.51a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.71d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.c.de0 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.c.de0 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc35_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.51a = ref_param_pattern [concrete = constants.%self.param_patt.fcf] -// CHECK:STDOUT: %self.patt: %pattern_type.51a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.71d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.c.de0 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.c.de0 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc35_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ca8 = ref_param_pattern [concrete = constants.%self.param_patt.648] -// CHECK:STDOUT: %self.patt: %pattern_type.ca8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f03] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc35_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ca8 = ref_param_pattern [concrete = constants.%self.param_patt.648] -// CHECK:STDOUT: %self.patt: %pattern_type.ca8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f03] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e3e = ref_param_pattern [concrete = constants.%self.param_patt.826] -// CHECK:STDOUT: %self.patt: %pattern_type.e3e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.b.5bf = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.b.5bf = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc34_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e3e = ref_param_pattern [concrete = constants.%self.param_patt.826] -// CHECK:STDOUT: %self.patt: %pattern_type.e3e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.b.5bf = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.b.5bf = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e78 = ref_param_pattern [concrete = constants.%self.param_patt.1a8] -// CHECK:STDOUT: %self.patt: %pattern_type.e78 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5fa] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc34_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e78 = ref_param_pattern [concrete = constants.%self.param_patt.1a8] -// CHECK:STDOUT: %self.patt: %pattern_type.e78 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5fa] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc33_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.243 = ref_param_pattern [concrete = constants.%self.param_patt.6cd] -// CHECK:STDOUT: %self.patt: %pattern_type.243 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bd2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.15e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.15e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.8: %Destroy.WithSelf.Op.type.ef016f.8 = fn_decl @Destroy.WithSelf.Op.loc33_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.243 = ref_param_pattern [concrete = constants.%self.param_patt.6cd] -// CHECK:STDOUT: %self.patt: %pattern_type.243 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bd2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.15e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.15e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.9: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc33_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.9] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.9: %Destroy.WithSelf.Op.type.ef016f.9 = fn_decl @Destroy.WithSelf.Op.loc33_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.9] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -463,8 +308,8 @@ class A { // CHECK:STDOUT: %.loc33_32.3: ref %i32 = class_element_access %a.var, element0 // CHECK:STDOUT: %.loc33_32.4: init %i32 to %.loc33_32.3 = in_place_init %.loc33_32.2 [concrete = constants.%int_1.68a] // CHECK:STDOUT: %.loc33_32.5: init %A to %a.var = class_init (%.loc33_32.4) [concrete = constants.%A.val] -// CHECK:STDOUT: %.loc33_7: init %A = converted %.loc33_32.1, %.loc33_32.5 [concrete = constants.%A.val] -// CHECK:STDOUT: assign %a.var, %.loc33_7 +// CHECK:STDOUT: %.loc33_7.1: init %A = converted %.loc33_32.1, %.loc33_32.5 [concrete = constants.%A.val] +// CHECK:STDOUT: assign %a.var, %.loc33_7.1 // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %a: ref %A = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -483,8 +328,8 @@ class A { // CHECK:STDOUT: %.loc34_32.3: ref %i32 = class_element_access %b.var, element0 // CHECK:STDOUT: %.loc34_32.4: init %i32 to %.loc34_32.3 = in_place_init %.loc34_32.2 [concrete = constants.%int_2.2e0] // CHECK:STDOUT: %.loc34_32.5: init %B to %b.var = class_init (%.loc34_32.4) [concrete = constants.%B.val] -// CHECK:STDOUT: %.loc34_7: init %B = converted %.loc34_32.1, %.loc34_32.5 [concrete = constants.%B.val] -// CHECK:STDOUT: assign %b.var, %.loc34_7 +// CHECK:STDOUT: %.loc34_7.1: init %B = converted %.loc34_32.1, %.loc34_32.5 [concrete = constants.%B.val] +// CHECK:STDOUT: assign %b.var, %.loc34_7.1 // CHECK:STDOUT: %B.ref: type = name_ref B, @A.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %b: ref %B = wrapper_binding b, %b.var // CHECK:STDOUT: name_binding_decl { @@ -503,8 +348,8 @@ class A { // CHECK:STDOUT: %.loc35_32.3: ref %i32 = class_element_access %c.var, element0 // CHECK:STDOUT: %.loc35_32.4: init %i32 to %.loc35_32.3 = in_place_init %.loc35_32.2 [concrete = constants.%int_3.9f3] // CHECK:STDOUT: %.loc35_32.5: init %C to %c.var = class_init (%.loc35_32.4) [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc35_7: init %C = converted %.loc35_32.1, %.loc35_32.5 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %c.var, %.loc35_7 +// CHECK:STDOUT: %.loc35_7.1: init %C = converted %.loc35_32.1, %.loc35_32.5 [concrete = constants.%C.val] +// CHECK:STDOUT: assign %c.var, %.loc35_7.1 // CHECK:STDOUT: %C.ref: type = name_ref C, @B.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = wrapper_binding c, %c.var // CHECK:STDOUT: name_binding_decl { @@ -523,8 +368,8 @@ class A { // CHECK:STDOUT: %.loc36_32.3: ref %i32 = class_element_access %d.var, element0 // CHECK:STDOUT: %.loc36_32.4: init %i32 to %.loc36_32.3 = in_place_init %.loc36_32.2 [concrete = constants.%int_4.6bf] // CHECK:STDOUT: %.loc36_32.5: init %D to %d.var = class_init (%.loc36_32.4) [concrete = constants.%D.val] -// CHECK:STDOUT: %.loc36_7: init %D = converted %.loc36_32.1, %.loc36_32.5 [concrete = constants.%D.val] -// CHECK:STDOUT: assign %d.var, %.loc36_7 +// CHECK:STDOUT: %.loc36_7.1: init %D = converted %.loc36_32.1, %.loc36_32.5 [concrete = constants.%D.val] +// CHECK:STDOUT: assign %d.var, %.loc36_7.1 // CHECK:STDOUT: %D.ref: type = name_ref D, @C.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %d: ref %D = wrapper_binding d, %d.var // CHECK:STDOUT: name_binding_decl { @@ -539,14 +384,30 @@ class A { // CHECK:STDOUT: %C.CF.call: init %empty_tuple.type = call %CF.ref() // CHECK:STDOUT: %DF.ref: %D.DF.type = name_ref DF, @D.%D.DF.decl [concrete = constants.%D.DF] // CHECK:STDOUT: %D.DF.call: init %empty_tuple.type = call %DF.ref() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc36: = bound_method %d.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc36: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc36(%d.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc35: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc35: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc35(%c.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc34: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc34: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc34(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc33: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.9 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc33: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc33(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc36_7.1: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.316, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %.loc36_7.2: %Destroy.type = converted constants.%D, %Destroy.facet.loc36_7.1 [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %Destroy.facet.loc36_7.2: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.316, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %.loc36_7.3: %Destroy.type = converted constants.%D, %Destroy.facet.loc36_7.2 [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.07e) [concrete = constants.%SelfDestruct.specific_fn.332] +// CHECK:STDOUT: %SelfDestruct.call.loc36: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%d.var) +// CHECK:STDOUT: %Destroy.facet.loc35_7.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.dcd, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.54f] +// CHECK:STDOUT: %.loc35_7.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc35_7.1 [concrete = constants.%Destroy.facet.54f] +// CHECK:STDOUT: %Destroy.facet.loc35_7.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.dcd, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.54f] +// CHECK:STDOUT: %.loc35_7.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc35_7.2 [concrete = constants.%Destroy.facet.54f] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.54f) [concrete = constants.%SelfDestruct.specific_fn.4cb] +// CHECK:STDOUT: %SelfDestruct.call.loc35: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc34_7.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.8e4] +// CHECK:STDOUT: %.loc34_7.2: %Destroy.type = converted constants.%B, %Destroy.facet.loc34_7.1 [concrete = constants.%Destroy.facet.8e4] +// CHECK:STDOUT: %Destroy.facet.loc34_7.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.8e4] +// CHECK:STDOUT: %.loc34_7.3: %Destroy.type = converted constants.%B, %Destroy.facet.loc34_7.2 [concrete = constants.%Destroy.facet.8e4] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.8e4) [concrete = constants.%SelfDestruct.specific_fn.a05] +// CHECK:STDOUT: %SelfDestruct.call.loc34: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc33_7.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.9) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc33_7.2: %Destroy.type = converted constants.%A, %Destroy.facet.loc33_7.1 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %Destroy.facet.loc33_7.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.9) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc33_7.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc33_7.2 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %SelfDestruct.specific_fn.4: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.35e) [concrete = constants.%SelfDestruct.specific_fn.270] +// CHECK:STDOUT: %SelfDestruct.call.loc33: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -554,154 +415,105 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: fn @A.AF(); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_7.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc36_7.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc36_7.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc36_7.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc36_7.2(%self.param: ref %struct_type.d.06c) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc36_7.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc36_7.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc36_7.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc36_7.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc36_7.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc36_7.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc36_7.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc36_7.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_7.2(%self.param: ref %struct_type.d.06c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc36: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc36, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc36) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc36_7.2(%self.param: ref %struct_type.d.06c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc36_7.2(%self.param: ref %struct_type.d.06c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_7.3(%self.param: ref %D) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc36_7.3(%self.param: ref %D) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref: %D.elem = name_ref d, @D.%field_decl [concrete = @D.%field_decl] -// CHECK:STDOUT: %.loc36: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc36, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc36) +// CHECK:STDOUT: %.loc36_7.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc36_7.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc36_7.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc36_7.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc36_7.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc36_7.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc36_7.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc36_7.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc36_7.3(%self.param: ref %D) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc36_7.3(%self.param: ref %D) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc35_7.1(%self.param: ref %struct_type.c.de0) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc35_7.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc35_7.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc35_7.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc35_7.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc35_7.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc35_7.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc35_7.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc35_7.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc35_7.1(%self.param: ref %struct_type.c.de0) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc35: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc35, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc35) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc35_7.1(%self.param: ref %struct_type.c.de0) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc35_7.1(%self.param: ref %struct_type.c.de0) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc35_7.2(%self.param: ref %C) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc35_7.2(%self.param: ref %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C.elem = name_ref c, @C.%field_decl [concrete = @C.%field_decl] -// CHECK:STDOUT: %.loc35: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc35, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc35) +// CHECK:STDOUT: %.loc35_7.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc35_7.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc35_7.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc35_7.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc35_7.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc35_7.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc35_7.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc35_7.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc35_7.2(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc35_7.2(%self.param: ref %C) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_7.1(%self.param: ref %struct_type.b.5bf) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) +// CHECK:STDOUT: %.loc34_7.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc34_7.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc34_7.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc34_7.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc34_7.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc34_7.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc34_7.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc34_7.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_7.1(%self.param: ref %struct_type.b.5bf) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc34: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc34, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc34) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_7.1(%self.param: ref %struct_type.b.5bf) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_7.1(%self.param: ref %struct_type.b.5bf) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_7.2(%self.param: ref %B) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_7.2(%self.param: ref %B) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %b.ref: %B.elem = name_ref b, @B.%field_decl [concrete = @B.%field_decl] -// CHECK:STDOUT: %.loc34: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc34, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc34) +// CHECK:STDOUT: %.loc34_7.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc34_7.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc34_7.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc34_7.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc34_7.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc34_7.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc34_7.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc34_7.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_7.2(%self.param: ref %B) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_7.2(%self.param: ref %B) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc33_7.1(%self.param: ref %struct_type.a.15e) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.7(%self.param) +// CHECK:STDOUT: %.loc33_7.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc33_7.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_7.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_7.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc33_7.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_7.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_7.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc33_7.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc33_7.1(%self.param: ref %struct_type.a.15e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc33: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc33, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc33) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc33_7.1(%self.param: ref %struct_type.a.15e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc33_7.1(%self.param: ref %struct_type.a.15e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.8(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.8(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc33_7.2(%self.param: ref %A) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc33_7.2(%self.param: ref %A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A.elem = name_ref a, @A.%field_decl [concrete = @A.%field_decl] -// CHECK:STDOUT: %.loc33: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc33, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc33) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc33_7.2(%self.param: ref %A) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc33_7.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.9(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.9(%self.param) +// CHECK:STDOUT: %.loc33_7.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc33_7.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_7.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_7.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc33_7.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_7.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_7.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc33_7.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index 4a1e5fe88085..9758c83f03f9 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -80,22 +80,27 @@ fn Run() { // CHECK:STDOUT: %a.var_patt: %pattern_type.d94 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.d94 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.d94 = var_pattern %b.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc31 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -103,24 +108,9 @@ fn Run() { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc31 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc31 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -226,21 +216,20 @@ fn Run() { // CHECK:STDOUT: %b.patt: %pattern_type.d94 = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.d94 = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc31: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc31: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc31(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc30: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc30: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc30(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc31_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc31_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc31_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc31_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc31_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc31_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc31: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc30_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc30_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc30_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc30_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc30_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc30_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc30: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc31(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc31(%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 d387c668f832..aff49d71b87f 100644 --- a/toolchain/check/testdata/class/self/fail_ref_self.carbon +++ b/toolchain/check/testdata/class/self/fail_ref_self.carbon @@ -57,60 +57,31 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %p.patt: %pattern_type.8c5 = wrapper_binding_pattern p, %p.param_patt [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc31_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc31_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc31_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc31_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc31_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc31_8.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.3a1: %SubobjectDestroy.type = facet_value %Class, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.66c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.3a1) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class, (%DestroyImpl.impl_witness.66c, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc31_8.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc31_8.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc31_8.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc31_8.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -188,30 +159,16 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %F.ref.loc31: %Class.F.type = name_ref F, @Class.%Class.F.decl [concrete = constants.%Class.F] // CHECK:STDOUT: %Class.F.bound.loc31: = bound_method %.loc31_8.2, %F.ref.loc31 // CHECK:STDOUT: %Class.F.call.loc31: init %empty_tuple.type = call %Class.F.bound.loc31(%.loc31_8.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc31_8.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc31_8.2) +// CHECK:STDOUT: %Destroy.facet.loc31_8.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc31_8.3: %Destroy.type = converted constants.%Class, %Destroy.facet.loc31_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc31_8.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc31_8.4: %Destroy.type = converted constants.%Class, %Destroy.facet.loc31_8.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc31_8.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_8.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc31_8.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_8.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc31_8.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_8.2(%self.param: ref %Class) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_8.2(%self.param: ref %Class) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc31_8.2(%self.param: ref %Class) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc31_8.2(%self.param: ref %Class) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/self/raw_self_type.carbon b/toolchain/check/testdata/class/self/raw_self_type.carbon index 5c5880bcc1c2..90697b95f8e6 100644 --- a/toolchain/check/testdata/class/self/raw_self_type.carbon +++ b/toolchain/check/testdata/class/self/raw_self_type.carbon @@ -62,15 +62,20 @@ fn MemberNamedSelf.F(unused x: Self, unused y: r#Self) {} // CHECK:STDOUT: %Copy.WithSelf.Op.type.6cc: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.884: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6cc, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.842, @ptr.as.Copy.impl.Op(%Class) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.fb6: %pattern_type.8c5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0e3: %pattern_type.8c5 = wrapper_binding_pattern self, %self.param_patt.fb6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.029: %SubobjectDestroy.type = facet_value %ptr.7ee, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.14e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.029) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.7ee, (%DestroyImpl.impl_witness.14e, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %MemberNamedSelf: type = class_type @MemberNamedSelf [concrete] // CHECK:STDOUT: %Self.7fc: type = class_type @Self [concrete] // CHECK:STDOUT: %pattern_type.bb1: type = pattern_type %MemberNamedSelf [concrete] @@ -87,7 +92,7 @@ fn MemberNamedSelf.F(unused x: Self, unused y: r#Self) {} // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -97,24 +102,9 @@ fn MemberNamedSelf.F(unused x: Self, unused y: r#Self) {} // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.06a: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.20f) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.f12)] // CHECK:STDOUT: %Copy.impl_witness_table.fb0 = impl_witness_table (%Core.import_ref.06a), @ptr.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8c5 = ref_param_pattern [concrete = constants.%self.param_patt.fb6] -// CHECK:STDOUT: %self.patt: %pattern_type.8c5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0e3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.7ee = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.7ee = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc18 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8c5 = ref_param_pattern [concrete = constants.%self.param_patt.fb6] -// CHECK:STDOUT: %self.patt: %pattern_type.8c5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0e3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.7ee = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.7ee = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -220,23 +210,22 @@ fn MemberNamedSelf.F(unused x: Self, unused y: r#Self) {} // CHECK:STDOUT: %p.patt: %pattern_type.8c5 = ref_binding_pattern p [concrete = constants.%p.patt] // CHECK:STDOUT: %p.var_patt: %pattern_type.8c5 = var_pattern %p.patt [concrete = constants.%p.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18: = bound_method %p.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18(%p.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc17: = bound_method %Self.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc17: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc17(%Self.var) +// CHECK:STDOUT: %Destroy.facet.loc18_5.1: %Destroy.type = facet_value constants.%ptr.7ee, (constants.%DestroyImpl.impl_witness.14e, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_5.1: %Destroy.type = converted constants.%ptr.7ee, %Destroy.facet.loc18_5.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc18_5.2: %Destroy.type = facet_value constants.%ptr.7ee, (constants.%DestroyImpl.impl_witness.14e, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_5.2: %Destroy.type = converted constants.%ptr.7ee, %Destroy.facet.loc18_5.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc18: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%p.var) +// CHECK:STDOUT: %Destroy.facet.loc17_5.1: %Destroy.type = facet_value constants.%ptr.7ee, (constants.%DestroyImpl.impl_witness.14e, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_5.1: %Destroy.type = converted constants.%ptr.7ee, %Destroy.facet.loc17_5.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc17_5.2: %Destroy.type = facet_value constants.%ptr.7ee, (constants.%DestroyImpl.impl_witness.14e, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_5.2: %Destroy.type = converted constants.%ptr.7ee, %Destroy.facet.loc17_5.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc17: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%Self.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18(%self.param: ref %ptr.7ee) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18(%self.param: ref %ptr.7ee) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18(%self.param: ref %ptr.7ee) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18(%self.param: ref %ptr.7ee) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @MemberNamedSelf.F(%x.param.loc28: %MemberNamedSelf, %y.param.loc28: %Self.7fc) { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index 414597affeb7..e783fba8912d 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -133,25 +133,25 @@ fn G() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %Array.type: type = parameterized_class_name_type @Array [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] -// CHECK:STDOUT: %Array.2bf: type = class_type @Array, @Array(%T, %int_3) [symbolic] +// CHECK:STDOUT: %Array.2bf: type = class_type @Array, @Array(%T.67d, %int_3) [symbolic] // CHECK:STDOUT: %pattern_type.273: type = pattern_type %Array.2bf [symbolic] // CHECK:STDOUT: %a.param_patt.3bc: %pattern_type.273 = value_param_pattern [symbolic] // CHECK:STDOUT: %a.patt.fa6: %pattern_type.273 = wrapper_binding_pattern a, %a.param_patt.3bc [symbolic] -// CHECK:STDOUT: %.184: Core.Form = init_form %T [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %.184: Core.Form = init_form %T.67d [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %return.param_patt.41d: %pattern_type.51d = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.b39: %pattern_type.51d = return_slot_pattern %return.param_patt.41d, %T [symbolic] +// CHECK:STDOUT: %return.patt.b39: %pattern_type.51d = return_slot_pattern %return.param_patt.41d, %T.67d [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.ef5: = require_complete_type %Array.2bf [symbolic] -// CHECK:STDOUT: %F.specific_fn.c05: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %F.specific_fn.c05: = specific_function %F, @F(%T.67d) [symbolic] // CHECK:STDOUT: %.a44: Core.Form = init_form %C [concrete] // CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] // CHECK:STDOUT: %return.param_patt.89a: %pattern_type.98b = out_param_pattern [concrete] @@ -175,86 +175,40 @@ fn G() { // CHECK:STDOUT: %a.param_patt.ebb: %pattern_type.5f0 = value_param_pattern [concrete] // CHECK:STDOUT: %a.patt.683: %pattern_type.5f0 = wrapper_binding_pattern a, %a.param_patt.ebb [concrete] // CHECK:STDOUT: %F.specific_fn.c73: = specific_function %F, @F(%C) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.14e: %pattern_type.5f0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7cc: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt.14e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8ca: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.eb2) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6a9: %SubobjectDestroy.type = facet_value %Array.96f, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f0d: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6a9) [concrete] +// CHECK:STDOUT: %Destroy.facet.3c2: %Destroy.type = facet_value %Array.96f, (%DestroyImpl.impl_witness.f0d, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.807: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.3c2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Array = %Core.Array -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f0 = ref_param_pattern [concrete = constants.%self.param_patt.14e] -// CHECK:STDOUT: %self.patt: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7cc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.96f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.96f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f0 = ref_param_pattern [concrete = constants.%self.param_patt.14e] -// CHECK:STDOUT: %self.patt: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7cc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.96f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.96f = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -267,28 +221,28 @@ fn G() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %a.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.273) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.3bc)] // CHECK:STDOUT: %a.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.273) = wrapper_binding_pattern a, %a.param_patt.loc6_16.1 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.fa6)] // CHECK:STDOUT: %return.param_patt.loc6_34.1: @F.%pattern_type.loc6_34 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc6_34.2 (constants.%return.param_patt.41d)] // CHECK:STDOUT: %return.patt.loc6_31.1: @F.%pattern_type.loc6_34 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc6_34.1, %T.ref.loc6_34 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_34: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc6_34: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T.67d)] // CHECK:STDOUT: %.loc6_34.3: Core.Form = init_form %T.ref.loc6_34 [symbolic = %.loc6_34.2 (constants.%.184)] // CHECK:STDOUT: %.loc6_9.1: type = splice_block %.loc6_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T.67d)] // CHECK:STDOUT: %a.param: @F.%Array.loc6_28.1 (%Array.2bf) = value_param call_param0 // CHECK:STDOUT: %.loc6_28: type = splice_block %Array.loc6_28.2 [symbolic = %Array.loc6_28.1 (constants.%Array.2bf)] { -// CHECK:STDOUT: %T.ref.loc6_24: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc6_24: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T.67d)] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %Array.loc6_28.2: type = class_type @Array, @Array(constants.%T, constants.%int_3) [symbolic = %Array.loc6_28.1 (constants.%Array.2bf)] +// CHECK:STDOUT: %Array.loc6_28.2: type = class_type @Array, @Array(constants.%T.67d, constants.%int_3) [symbolic = %Array.loc6_28.1 (constants.%Array.2bf)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%Array.loc6_28.1 (%Array.2bf) = wrapper_binding a, %a.param -// CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T.67d) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T.67d) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %return.param_patt: %pattern_type.98b = out_param_pattern [concrete = constants.%return.param_patt.89a] @@ -310,8 +264,8 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { -// CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T.67d)] // CHECK:STDOUT: %Array.loc6_28.1: type = class_type @Array, @Array(%T.loc6_7.1, constants.%int_3) [symbolic = %Array.loc6_28.1 (constants.%Array.2bf)] // CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %Array.loc6_28.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.273)] // CHECK:STDOUT: %a.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.273) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.3bc)] @@ -325,13 +279,13 @@ fn G() { // CHECK:STDOUT: %require_complete: = require_complete_type %Array.loc6_28.1 [symbolic = %require_complete (constants.%require_complete.ef5)] // CHECK:STDOUT: %F.specific_fn.loc6_45.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.c05)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%Array.loc6_28.1 (%Array.2bf)) -> out %return.param: @F.%T.loc6_7.1 (%T) { +// CHECK:STDOUT: fn(%a.param: @F.%Array.loc6_28.1 (%Array.2bf)) -> out %return.param: @F.%T.loc6_7.1 (%T.67d) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %a.ref: @F.%Array.loc6_28.1 (%Array.2bf) = name_ref a, %a -// CHECK:STDOUT: %F.specific_fn.loc6_45.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.c05)] -// CHECK:STDOUT: %.loc6_34.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_34.1 = call %F.specific_fn.loc6_45.1(%a.ref) +// CHECK:STDOUT: %F.specific_fn.loc6_45.1: = specific_function %F.ref, @F(constants.%T.67d) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.c05)] +// CHECK:STDOUT: %.loc6_34.1: ref @F.%T.loc6_7.1 (%T.67d) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T.67d) to %.loc6_34.1 = call %F.specific_fn.loc6_45.1(%a.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -356,8 +310,8 @@ fn G() { // CHECK:STDOUT: %.loc9_34.2: init %C to %.loc9_35.6 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.8: init %Array.96f to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %Array.96f = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %Array.96f = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_20: type = splice_block %Array [concrete = constants.%Array.96f] { // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] @@ -374,62 +328,51 @@ fn G() { // CHECK:STDOUT: %.loc8_11.1: ref %C = splice_block %return.param {} // CHECK:STDOUT: %.loc10: %Array.96f = acquire_value %a.ref // CHECK:STDOUT: %F.call: init %C to %.loc8_11.1 = call %F.specific_fn(%.loc10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Array.96f, (constants.%DestroyImpl.impl_witness.f0d, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Array.96f, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Array.96f, (constants.%DestroyImpl.impl_witness.f0d, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Array.96f, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.3c2) [concrete = constants.%SelfDestruct.specific_fn.807] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Array.96f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.96f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc9_3.1: ref %C = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %.loc9_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%.loc9_3.1) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_3.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc9_3.2: ref %C = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %.loc9_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%.loc9_3.2) +// CHECK:STDOUT: %.loc9_3.4: ref %C = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_3.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc9_3.3: ref %C = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3: = bound_method %.loc9_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3(%.loc9_3.3) +// CHECK:STDOUT: %.loc9_3.7: ref %C = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.5: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.5 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.6: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.9: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.6 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc9_3.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.96f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %Array.96f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_7.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc6_7.1 => constants.%T.67d // CHECK:STDOUT: %Array.loc6_28.1 => constants.%Array.2bf // CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.273 // CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.3bc @@ -445,7 +388,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { -// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc6_7.1 => constants.%C // CHECK:STDOUT: %Array.loc6_28.1 => constants.%Array.96f // CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.5f0 @@ -526,31 +469,27 @@ fn G() { // CHECK:STDOUT: %a.param_patt.ebb: %pattern_type.5f0 = value_param_pattern [concrete] // CHECK:STDOUT: %a.patt.683: %pattern_type.5f0 = wrapper_binding_pattern a, %a.param_patt.ebb [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_3.1ba) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.14e: %pattern_type.5f0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7cc: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt.14e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8ca: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.eb2) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6a9: %SubobjectDestroy.type = facet_value %Array.96f, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f0d: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6a9) [concrete] +// CHECK:STDOUT: %Destroy.facet.3c2: %Destroy.type = facet_value %Array.96f, (%DestroyImpl.impl_witness.f0d, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.807: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.3c2) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.fb0: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.9f3: %i32 = int_value 3 [concrete] @@ -562,7 +501,7 @@ fn G() { // CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -572,52 +511,9 @@ fn G() { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f0 = ref_param_pattern [concrete = constants.%self.param_patt.14e] -// CHECK:STDOUT: %self.patt: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7cc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.96f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.96f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f0 = ref_param_pattern [concrete = constants.%self.param_patt.14e] -// CHECK:STDOUT: %self.patt: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7cc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.96f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.96f = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -720,8 +616,8 @@ fn G() { // CHECK:STDOUT: %.loc9_34.2: init %C to %.loc9_35.6 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.8: init %Array.96f to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %Array.96f = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %Array.96f = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_20: type = splice_block %Array [concrete = constants.%Array.96f] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -737,56 +633,45 @@ fn G() { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%int_3.1ba) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %.loc10: %Array.96f = acquire_value %a.ref // CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn(%.loc10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Array.96f, (constants.%DestroyImpl.impl_witness.f0d, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Array.96f, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Array.96f, (constants.%DestroyImpl.impl_witness.f0d, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Array.96f, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.3c2) [concrete = constants.%SelfDestruct.specific_fn.807] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return %F.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Array.96f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.96f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc9_3.1: ref %C = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %.loc9_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%.loc9_3.1) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_3.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc9_3.2: ref %C = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %.loc9_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%.loc9_3.2) +// CHECK:STDOUT: %.loc9_3.4: ref %C = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_3.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc9_3.3: ref %C = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3: = bound_method %.loc9_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3(%.loc9_3.3) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.96f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %Array.96f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc9_3.7: ref %C = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.5: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.5 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.6: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.9: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.6 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc9_3.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -822,16 +707,16 @@ fn G() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete] // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 1 [symbolic] // CHECK:STDOUT: %Array.type: type = parameterized_class_name_type @Array [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] -// CHECK:STDOUT: %Array.bd1: type = class_type @Array, @Array(%T, %N) [symbolic] +// CHECK:STDOUT: %Array.bd1: type = class_type @Array, @Array(%T.67d, %N) [symbolic] // CHECK:STDOUT: %pattern_type.9fc: type = pattern_type %Array.bd1 [symbolic] // CHECK:STDOUT: %a.param_patt.c25: %pattern_type.9fc = value_param_pattern [symbolic] // CHECK:STDOUT: %a.patt.e89: %pattern_type.9fc = wrapper_binding_pattern a, %a.param_patt.c25 [symbolic] @@ -858,89 +743,42 @@ fn G() { // CHECK:STDOUT: %a.param_patt.ebb: %pattern_type.5f0 = value_param_pattern [concrete] // CHECK:STDOUT: %a.patt.683: %pattern_type.5f0 = wrapper_binding_pattern a, %a.param_patt.ebb [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%C, %int_3) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.14e: %pattern_type.5f0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7cc: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt.14e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8ca: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.eb2) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6a9: %SubobjectDestroy.type = facet_value %Array.96f, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f0d: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6a9) [concrete] +// CHECK:STDOUT: %Destroy.facet.3c2: %Destroy.type = facet_value %Array.96f, (%DestroyImpl.impl_witness.f0d, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.807: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.3c2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .IntLiteral = %Core.IntLiteral // CHECK:STDOUT: .Array = %Core.Array -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IntLiteral: type = import_ref Core//prelude/parts/int_literal, IntLiteral, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f0 = ref_param_pattern [concrete = constants.%self.param_patt.14e] -// CHECK:STDOUT: %self.patt: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7cc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.96f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.96f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f0 = ref_param_pattern [concrete = constants.%self.param_patt.14e] -// CHECK:STDOUT: %self.patt: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7cc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.96f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.96f = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -953,7 +791,7 @@ fn G() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %N.patt.loc6_16.1: %pattern_type.dc0 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_16.2 (constants.%N.patt)] // CHECK:STDOUT: %a.param_patt.loc6_43.1: @F.%pattern_type (%pattern_type.9fc) = value_param_pattern [symbolic = %a.param_patt.loc6_43.2 (constants.%a.param_patt.c25)] // CHECK:STDOUT: %a.patt.loc6_43.1: @F.%pattern_type (%pattern_type.9fc) = wrapper_binding_pattern a, %a.param_patt.loc6_43.1 [symbolic = %a.patt.loc6_43.2 (constants.%a.patt.e89)] @@ -962,7 +800,7 @@ fn G() { // CHECK:STDOUT: %.Self.frozen.loc6_7: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T.67d)] // CHECK:STDOUT: %.loc6_22: type = splice_block %IntLiteral.ref [concrete = Core.IntLiteral] { // CHECK:STDOUT: %.Self.frozen.loc6_16: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] @@ -971,9 +809,9 @@ fn G() { // CHECK:STDOUT: %N.loc6_16.2: Core.IntLiteral = symbolic_binding N, 1 [symbolic = %N.loc6_16.1 (constants.%N)] // CHECK:STDOUT: %a.param: @F.%Array.loc6_55.1 (%Array.bd1) = value_param call_param0 // CHECK:STDOUT: %.loc6_55: type = splice_block %Array.loc6_55.2 [symbolic = %Array.loc6_55.1 (constants.%Array.bd1)] { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T.67d)] // CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc6_16.2 [symbolic = %N.loc6_16.1 (constants.%N)] -// CHECK:STDOUT: %Array.loc6_55.2: type = class_type @Array, @Array(constants.%T, constants.%N) [symbolic = %Array.loc6_55.1 (constants.%Array.bd1)] +// CHECK:STDOUT: %Array.loc6_55.2: type = class_type @Array, @Array(constants.%T.67d, constants.%N) [symbolic = %Array.loc6_55.1 (constants.%Array.bd1)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%Array.loc6_55.1 (%Array.bd1) = wrapper_binding a, %a.param // CHECK:STDOUT: } @@ -989,8 +827,8 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type, %N.loc6_16.2: Core.IntLiteral) { -// CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T.67d)] // CHECK:STDOUT: %N.patt.loc6_16.2: %pattern_type.dc0 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc6_16.2 (constants.%N.patt)] // CHECK:STDOUT: %N.loc6_16.1: Core.IntLiteral = symbolic_binding N, 1 [symbolic = %N.loc6_16.1 (constants.%N)] // CHECK:STDOUT: %Array.loc6_55.1: type = class_type @Array, @Array(%T.loc6_7.1, %N.loc6_16.1) [symbolic = %Array.loc6_55.1 (constants.%Array.bd1)] @@ -1027,8 +865,8 @@ fn G() { // CHECK:STDOUT: %.loc9_34.2: init %C to %.loc9_35.6 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.8: init %Array.96f to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %Array.96f = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %Array.96f = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_20: type = splice_block %Array [concrete = constants.%Array.96f] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] @@ -1044,62 +882,51 @@ fn G() { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C, constants.%int_3) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %.loc10: %Array.96f = acquire_value %a.ref // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Array.96f, (constants.%DestroyImpl.impl_witness.f0d, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Array.96f, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Array.96f, (constants.%DestroyImpl.impl_witness.f0d, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Array.96f, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.3c2) [concrete = constants.%SelfDestruct.specific_fn.807] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Array.96f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.96f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc9_3.1: ref %C = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %.loc9_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%.loc9_3.1) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_3.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc9_3.2: ref %C = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %.loc9_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%.loc9_3.2) +// CHECK:STDOUT: %.loc9_3.4: ref %C = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_3.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc9_3.3: ref %C = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3: = bound_method %.loc9_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3(%.loc9_3.3) +// CHECK:STDOUT: %.loc9_3.7: ref %C = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.5: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.5 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.6: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.9: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.6 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc9_3.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.96f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %Array.96f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T, constants.%N) { -// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_7.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.67d, constants.%N) { +// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc6_7.1 => constants.%T.67d // CHECK:STDOUT: %N.patt.loc6_16.2 => constants.%N.patt // CHECK:STDOUT: %N.loc6_16.1 => constants.%N // CHECK:STDOUT: %Array.loc6_55.1 => constants.%Array.bd1 @@ -1109,7 +936,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C, constants.%int_3) { -// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc6_7.1 => constants.%C // CHECK:STDOUT: %N.patt.loc6_16.2 => constants.%N.patt // CHECK:STDOUT: %N.loc6_16.1 => constants.%int_3 @@ -1130,25 +957,25 @@ fn G() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %Array.type: type = parameterized_class_name_type @Array [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Array.generic: %Array.type = struct_value () [concrete] -// CHECK:STDOUT: %Array.c93: type = class_type @Array, @Array(%T, %int_2) [symbolic] +// CHECK:STDOUT: %Array.c93: type = class_type @Array, @Array(%T.67d, %int_2) [symbolic] // CHECK:STDOUT: %pattern_type.ff2: type = pattern_type %Array.c93 [symbolic] // CHECK:STDOUT: %a.param_patt.af0: %pattern_type.ff2 = value_param_pattern [symbolic] // CHECK:STDOUT: %a.patt.61b: %pattern_type.ff2 = wrapper_binding_pattern a, %a.param_patt.af0 [symbolic] -// CHECK:STDOUT: %.184347.1: Core.Form = init_form %T [symbolic] -// CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %.184347.1: Core.Form = init_form %T.67d [symbolic] +// CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %return.param_patt.41d2d9.1: %pattern_type.51d1c4.1 = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.b39: %pattern_type.51d1c4.1 = return_slot_pattern %return.param_patt.41d2d9.1, %T [symbolic] +// CHECK:STDOUT: %return.patt.b39: %pattern_type.51d1c4.1 = return_slot_pattern %return.param_patt.41d2d9.1, %T.67d [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.3be: = require_complete_type %Array.c93 [symbolic] -// CHECK:STDOUT: %F.specific_fn.c05: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %F.specific_fn.c05: = specific_function %F, @F(%T.67d) [symbolic] // CHECK:STDOUT: %.a44: Core.Form = init_form %C [concrete] // CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] // CHECK:STDOUT: %return.param_patt.89a: %pattern_type.98b = out_param_pattern [concrete] @@ -1176,88 +1003,42 @@ fn G() { // CHECK:STDOUT: %complete_type.d6a: = complete_type_witness %array_type.cc9 [concrete] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.14e: %pattern_type.5f0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7cc: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt.14e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8ca: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.eb2) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6a9: %SubobjectDestroy.type = facet_value %Array.96f, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f0d: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6a9) [concrete] +// CHECK:STDOUT: %Destroy.facet.3c2: %Destroy.type = facet_value %Array.96f, (%DestroyImpl.impl_witness.f0d, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.807: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.3c2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f0 = ref_param_pattern [concrete = constants.%self.param_patt.14e] -// CHECK:STDOUT: %self.patt: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7cc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.96f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.96f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f0 = ref_param_pattern [concrete = constants.%self.param_patt.14e] -// CHECK:STDOUT: %self.patt: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7cc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.96f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.96f = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1270,28 +1051,28 @@ fn G() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc6_7.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %a.param_patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.ff2) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.af0)] // CHECK:STDOUT: %a.patt.loc6_16.1: @F.%pattern_type.loc6_16 (%pattern_type.ff2) = wrapper_binding_pattern a, %a.param_patt.loc6_16.1 [symbolic = %a.patt.loc6_16.2 (constants.%a.patt.61b)] // CHECK:STDOUT: %return.param_patt.loc6_34.1: @F.%pattern_type.loc6_34 (%pattern_type.51d1c4.1) = out_param_pattern [symbolic = %return.param_patt.loc6_34.2 (constants.%return.param_patt.41d2d9.1)] // CHECK:STDOUT: %return.patt.loc6_31.1: @F.%pattern_type.loc6_34 (%pattern_type.51d1c4.1) = return_slot_pattern %return.param_patt.loc6_34.1, %T.ref.loc6_34 [symbolic = %return.patt.loc6_31.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_34: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc6_34: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T.67d)] // CHECK:STDOUT: %.loc6_34.3: Core.Form = init_form %T.ref.loc6_34 [symbolic = %.loc6_34.2 (constants.%.184347.1)] // CHECK:STDOUT: %.loc6_9.1: type = splice_block %.loc6_9.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc6_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc6_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T.67d)] // CHECK:STDOUT: %a.param: @F.%Array.loc6_28.1 (%Array.c93) = value_param call_param0 // CHECK:STDOUT: %.loc6_28: type = splice_block %Array.loc6_28.2 [symbolic = %Array.loc6_28.1 (constants.%Array.c93)] { -// CHECK:STDOUT: %T.ref.loc6_24: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc6_24: type = name_ref T, %T.loc6_7.2 [symbolic = %T.loc6_7.1 (constants.%T.67d)] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %Array.loc6_28.2: type = class_type @Array, @Array(constants.%T, constants.%int_2) [symbolic = %Array.loc6_28.1 (constants.%Array.c93)] +// CHECK:STDOUT: %Array.loc6_28.2: type = class_type @Array, @Array(constants.%T.67d, constants.%int_2) [symbolic = %Array.loc6_28.1 (constants.%Array.c93)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%Array.loc6_28.1 (%Array.c93) = wrapper_binding a, %a.param -// CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.%T.loc6_7.1 (%T.67d) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%T.loc6_7.1 (%T.67d) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { // CHECK:STDOUT: %return.param_patt: %pattern_type.98b = out_param_pattern [concrete = constants.%return.param_patt.89a] @@ -1313,8 +1094,8 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc6_7.2: type) { -// CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc6_7.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_7.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc6_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_7.1 (constants.%T.67d)] // CHECK:STDOUT: %Array.loc6_28.1: type = class_type @Array, @Array(%T.loc6_7.1, constants.%int_2) [symbolic = %Array.loc6_28.1 (constants.%Array.c93)] // CHECK:STDOUT: %pattern_type.loc6_16: type = pattern_type %Array.loc6_28.1 [symbolic = %pattern_type.loc6_16 (constants.%pattern_type.ff2)] // CHECK:STDOUT: %a.param_patt.loc6_16.2: @F.%pattern_type.loc6_16 (%pattern_type.ff2) = value_param_pattern [symbolic = %a.param_patt.loc6_16.2 (constants.%a.param_patt.af0)] @@ -1328,13 +1109,13 @@ fn G() { // CHECK:STDOUT: %require_complete: = require_complete_type %Array.loc6_28.1 [symbolic = %require_complete (constants.%require_complete.3be)] // CHECK:STDOUT: %F.specific_fn.loc6_45.2: = specific_function constants.%F, @F(%T.loc6_7.1) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.c05)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @F.%Array.loc6_28.1 (%Array.c93)) -> out %return.param: @F.%T.loc6_7.1 (%T) { +// CHECK:STDOUT: fn(%a.param: @F.%Array.loc6_28.1 (%Array.c93)) -> out %return.param: @F.%T.loc6_7.1 (%T.67d) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %a.ref: @F.%Array.loc6_28.1 (%Array.c93) = name_ref a, %a -// CHECK:STDOUT: %F.specific_fn.loc6_45.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.c05)] -// CHECK:STDOUT: %.loc6_34.1: ref @F.%T.loc6_7.1 (%T) = splice_block %return.param {} -// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T) to %.loc6_34.1 = call %F.specific_fn.loc6_45.1(%a.ref) +// CHECK:STDOUT: %F.specific_fn.loc6_45.1: = specific_function %F.ref, @F(constants.%T.67d) [symbolic = %F.specific_fn.loc6_45.2 (constants.%F.specific_fn.c05)] +// CHECK:STDOUT: %.loc6_34.1: ref @F.%T.loc6_7.1 (%T.67d) = splice_block %return.param {} +// CHECK:STDOUT: %F.call: init @F.%T.loc6_7.1 (%T.67d) to %.loc6_34.1 = call %F.specific_fn.loc6_45.1(%a.ref) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1359,8 +1140,8 @@ fn G() { // CHECK:STDOUT: %.loc10_34.2: init %C to %.loc10_35.6 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc10_35.7: init %C = converted %.loc10_34.1, %.loc10_34.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc10_35.8: init %Array.96f to %a.var = array_init (%.loc10_35.3, %.loc10_35.5, %.loc10_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc10_3: init %Array.96f = converted %.loc10_35.1, %.loc10_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: init %Array.96f = converted %.loc10_35.1, %.loc10_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc10_3.1 // CHECK:STDOUT: %.loc10_20: type = splice_block %Array [concrete = constants.%Array.96f] { // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] @@ -1377,62 +1158,51 @@ fn G() { // CHECK:STDOUT: %.loc8_11.1: ref %C = splice_block %return.param {} // CHECK:STDOUT: %.loc15: %Array.ee7 = converted %a.ref, [concrete = ] // CHECK:STDOUT: %F.call: init %C to %.loc8_11.1 = call %F.specific_fn() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%Array.96f, (constants.%DestroyImpl.impl_witness.f0d, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%Array.96f, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%Array.96f, (constants.%DestroyImpl.impl_witness.f0d, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%Array.96f, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.3c2) [concrete = constants.%SelfDestruct.specific_fn.807] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return %F.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.3(%self.param: ref %Array.96f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.3(%self.param: ref %Array.96f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc10_3.1: ref %C = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.1: = bound_method %.loc10_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.1(%.loc10_3.1) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_3.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc10_3.2: ref %C = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.2: = bound_method %.loc10_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.2(%.loc10_3.2) +// CHECK:STDOUT: %.loc10_3.4: ref %C = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc10_3.3: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.3 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_3.4: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.4 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_3.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc10_3.3: ref %C = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.3: = bound_method %.loc10_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.3(%.loc10_3.3) +// CHECK:STDOUT: %.loc10_3.7: ref %C = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc10_3.5: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.5 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_3.6: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_3.9: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.6 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc10_3.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.3(%self.param: ref %Array.96f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.3(%self.param: ref %Array.96f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_7.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc6_7.1 => constants.%T.67d // CHECK:STDOUT: %Array.loc6_28.1 => constants.%Array.c93 // CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.ff2 // CHECK:STDOUT: %a.param_patt.loc6_16.2 => constants.%a.param_patt.af0 @@ -1448,7 +1218,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { -// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc6_7.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc6_7.1 => constants.%C // CHECK:STDOUT: %Array.loc6_28.1 => constants.%Array.ee7 // CHECK:STDOUT: %pattern_type.loc6_16 => constants.%pattern_type.3c2 @@ -1532,31 +1302,27 @@ fn G() { // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_3.1ba) [concrete] // CHECK:STDOUT: %array_type.9a3: type = array_type %int_3.1ba, %C [concrete] // CHECK:STDOUT: %complete_type.1a4: = complete_type_witness %array_type.9a3 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.d8d: type = pattern_type %D [concrete] -// CHECK:STDOUT: %self.param_patt.b8e: %pattern_type.d8d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.86b: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt.b8e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.be8: %pattern_type.432 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.dd7: %pattern_type.432 = wrapper_binding_pattern self, %self.param_patt.be8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f61: %SubobjectDestroy.type = facet_value %D, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.30f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f61) [concrete] +// CHECK:STDOUT: %Destroy.facet.448: %Destroy.type = facet_value %D, (%DestroyImpl.impl_witness.30f, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.43e: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.448) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ede: %SubobjectDestroy.type = facet_value %Array.f94, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b21: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ede) [concrete] +// CHECK:STDOUT: %Destroy.facet.2c1: %Destroy.type = facet_value %Array.f94, (%DestroyImpl.impl_witness.b21, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.f7f: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.2c1) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.fb0: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.9f3: %i32 = int_value 3 [concrete] @@ -1568,7 +1334,7 @@ fn G() { // CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1578,52 +1344,9 @@ fn G() { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8d = ref_param_pattern [concrete = constants.%self.param_patt.b8e] -// CHECK:STDOUT: %self.patt: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.86b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8d = ref_param_pattern [concrete = constants.%self.param_patt.b8e] -// CHECK:STDOUT: %self.patt: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.86b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.432 = ref_param_pattern [concrete = constants.%self.param_patt.be8] -// CHECK:STDOUT: %self.patt: %pattern_type.432 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.dd7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f94 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f94 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.432 = ref_param_pattern [concrete = constants.%self.param_patt.be8] -// CHECK:STDOUT: %self.patt: %pattern_type.432 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.dd7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f94 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f94 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1736,8 +1459,8 @@ fn G() { // CHECK:STDOUT: %.loc11_34.2: init %D to %.loc11_35.6 = class_init () [concrete = constants.%D.val] // CHECK:STDOUT: %.loc11_35.7: init %D = converted %.loc11_34.1, %.loc11_34.2 [concrete = constants.%D.val] // CHECK:STDOUT: %.loc11_35.8: init %Array.f94 to %a.var = array_init (%.loc11_35.3, %.loc11_35.5, %.loc11_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %Array.f94 = converted %.loc11_35.1, %.loc11_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %Array.f94 = converted %.loc11_35.1, %.loc11_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc11_3.1 // CHECK:STDOUT: %.loc11_20: type = splice_block %Array [concrete = constants.%Array.f94] { // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -1753,56 +1476,45 @@ fn G() { // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%int_3.1ba) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %.loc16: %Array.96f = converted %a.ref, [concrete = ] // CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%Array.f94, (constants.%DestroyImpl.impl_witness.b21, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.2c1] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%Array.f94, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.2c1] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%Array.f94, (constants.%DestroyImpl.impl_witness.b21, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.2c1] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%Array.f94, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.2c1] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.2c1) [concrete = constants.%SelfDestruct.specific_fn.f7f] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return %F.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.2(%self.param: ref %D) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %D) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.3(%self.param: ref %Array.f94) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.3(%self.param: ref %Array.f94) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc11_3.1: ref %D = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11_3.1: = bound_method %.loc11_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11_3.1(%.loc11_3.1) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%D, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%D, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.448) [concrete = constants.%SelfDestruct.specific_fn.43e] +// CHECK:STDOUT: %SelfDestruct.call.loc11_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc11_3.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc11_3.2: ref %D = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11_3.2: = bound_method %.loc11_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11_3.2(%.loc11_3.2) +// CHECK:STDOUT: %.loc11_3.4: ref %D = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc11_3.3: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %.loc11_3.5: %Destroy.type = converted constants.%D, %Destroy.facet.loc11_3.3 [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %Destroy.facet.loc11_3.4: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %.loc11_3.6: %Destroy.type = converted constants.%D, %Destroy.facet.loc11_3.4 [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.448) [concrete = constants.%SelfDestruct.specific_fn.43e] +// CHECK:STDOUT: %SelfDestruct.call.loc11_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc11_3.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc11_3.3: ref %D = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11_3.3: = bound_method %.loc11_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11_3.3(%.loc11_3.3) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.3(%self.param: ref %Array.f94) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.3(%self.param: ref %Array.f94) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc11_3.7: ref %D = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc11_3.5: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %.loc11_3.8: %Destroy.type = converted constants.%D, %Destroy.facet.loc11_3.5 [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %Destroy.facet.loc11_3.6: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %.loc11_3.9: %Destroy.type = converted constants.%D, %Destroy.facet.loc11_3.6 [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.448) [concrete = constants.%SelfDestruct.specific_fn.43e] +// CHECK:STDOUT: %SelfDestruct.call.loc11_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc11_3.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1902,31 +1614,27 @@ fn G() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %array: %Array.96f = tuple_value (%C.val, %C.val, %C.val) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.14e: %pattern_type.5f0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7cc: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt.14e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8ca: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.eb2) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6a9: %SubobjectDestroy.type = facet_value %Array.96f, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f0d: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6a9) [concrete] +// CHECK:STDOUT: %Destroy.facet.3c2: %Destroy.type = facet_value %Array.96f, (%DestroyImpl.impl_witness.f0d, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.807: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.3c2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1935,7 +1643,7 @@ fn G() { // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1947,52 +1655,9 @@ fn G() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f0 = ref_param_pattern [concrete = constants.%self.param_patt.14e] -// CHECK:STDOUT: %self.patt: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7cc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.96f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.96f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f0 = ref_param_pattern [concrete = constants.%self.param_patt.14e] -// CHECK:STDOUT: %self.patt: %pattern_type.5f0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7cc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.96f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.96f = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -2102,8 +1767,8 @@ fn G() { // CHECK:STDOUT: %.loc9_34.2: init %C to %.loc9_35.6 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.7: init %C = converted %.loc9_34.1, %.loc9_34.2 [concrete = constants.%C.val] // CHECK:STDOUT: %.loc9_35.8: init %Array.96f to %a.var = array_init (%.loc9_35.3, %.loc9_35.5, %.loc9_35.7) [concrete = constants.%array] -// CHECK:STDOUT: %.loc9_3: init %Array.96f = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %Array.96f = converted %.loc9_35.1, %.loc9_35.8 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_20: type = splice_block %Array [concrete = constants.%Array.96f] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] @@ -2116,56 +1781,45 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %a.ref: ref %Array.96f = name_ref a, %a -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Array.96f, (constants.%DestroyImpl.impl_witness.f0d, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Array.96f, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Array.96f, (constants.%DestroyImpl.impl_witness.f0d, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Array.96f, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.3c2] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.3c2) [concrete = constants.%SelfDestruct.specific_fn.807] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %Array.96f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.96f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc9_3.1: ref %C = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %.loc9_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%.loc9_3.1) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_3.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc9_3.2: ref %C = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %.loc9_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%.loc9_3.2) +// CHECK:STDOUT: %.loc9_3.4: ref %C = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_3.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc9_3.3: ref %C = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3: = bound_method %.loc9_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3(%.loc9_3.3) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %Array.96f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %Array.96f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc9_3.7: ref %C = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.5: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.5 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc9_3.6: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc9_3.9: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_3.6 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc9_3.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/conversion.carbon b/toolchain/check/testdata/deduce/conversion.carbon index a43b3ae9976d..3e3b994acd7a 100644 --- a/toolchain/check/testdata/deduce/conversion.carbon +++ b/toolchain/check/testdata/deduce/conversion.carbon @@ -104,7 +104,6 @@ fn G(a: A) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %ImplicitAs.type.a78: type = facet_type <@ImplicitAs, @ImplicitAs(type)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness @A.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete] // CHECK:STDOUT: %A.as.ImplicitAs.impl.Convert.type.572c06.1: type = fn_type @A.as.ImplicitAs.impl.Convert.loc7_40.1 [concrete] // CHECK:STDOUT: %A.as.ImplicitAs.impl.Convert.dbe75c.1: %A.as.ImplicitAs.impl.Convert.type.572c06.1 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.a78 = facet_value %A, (%ImplicitAs.impl_witness) [concrete] @@ -120,53 +119,22 @@ fn G(a: A) { // CHECK:STDOUT: %.367: ref %A = temporary invalid, %A.val [concrete] // CHECK:STDOUT: %A.as.ImplicitAs.impl.Convert.bound.5ecf75.2: = bound_method %A.val, %A.as.ImplicitAs.impl.Convert.dbe75c.1 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%B) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc16_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc16_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.367, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16_8.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_8.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc16_8.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_8.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc16_8.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -188,31 +156,18 @@ fn G(a: A) { // CHECK:STDOUT: %.loc16_12.2: type = converted %.loc16_8.1, %.loc16_12.1 [concrete = constants.%B] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%B) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.367) +// CHECK:STDOUT: %Destroy.facet.loc16_8.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_8.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc16_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_8.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_8.5: %Destroy.type = converted constants.%A, %Destroy.facet.loc16_8.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc16_8.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_8.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_8.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_8.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_8.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_8.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_8.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- no_conversion_during_deduction.carbon // CHECK:STDOUT: @@ -224,7 +179,6 @@ fn G(a: A) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %ImplicitAs.type.c44: type = facet_type <@ImplicitAs, @ImplicitAs(%B)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness @A.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.e39: type = pattern_type %B [concrete] // CHECK:STDOUT: %A.as.ImplicitAs.impl.Convert.type: type = fn_type @A.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %A.as.ImplicitAs.impl.Convert: %A.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.c44 = facet_value %A, (%ImplicitAs.impl_witness) [concrete] @@ -234,52 +188,22 @@ fn G(a: A) { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%empty_tuple.type) [concrete] // CHECK:STDOUT: %.d9f: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.262, %ImplicitAs.facet [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_9.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc16_9.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_9.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc16_9.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16_9.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16_9.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.92e: %SubobjectDestroy.type = facet_value %B, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.131: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.92e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.131, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_9.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc16_9.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_9.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc16_9.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%a.param: %A) { @@ -297,30 +221,16 @@ fn G(a: A) { // CHECK:STDOUT: %.loc16_9.3: ref %B = temporary %.loc16_9.1, %.loc16_9.2 // CHECK:STDOUT: %.loc16_9.4: %B = acquire_value %.loc16_9.3 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc16_9.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc16_9.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc16_9.3) +// CHECK:STDOUT: %Destroy.facet.loc16_9.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_9.5: %Destroy.type = converted constants.%B, %Destroy.facet.loc16_9.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_9.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_9.6: %Destroy.type = converted constants.%B, %Destroy.facet.loc16_9.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc16_9.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_9.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_9.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_9.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_9.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_9.2(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.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 5a5cd3b5ccc6..59de2a6f7865 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -891,23 +891,20 @@ fn G() -> i32 { // CHECK:STDOUT: %x.patt.c6a: %pattern_type.832 = wrapper_binding_pattern x, %x.param_patt.b39 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%int_0.753) [concrete] // CHECK:STDOUT: %.f5e: ref %WithNontype.e5d = temporary invalid, %WithNontype.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_15.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_15.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b89: %pattern_type.832 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.530: %pattern_type.832 = wrapper_binding_pattern self, %self.param_patt.b89 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.f5e, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_15.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7f6: %SubobjectDestroy.type = facet_value %WithNontype.e5d, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.405: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7f6) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %WithNontype.e5d, (%DestroyImpl.impl_witness.405, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.4fb: = bound_method %int_0.753, %Int.as.Copy.impl.Op.cae [concrete] // CHECK:STDOUT: %bound_method.149: = bound_method %int_0.753, %Int.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: } @@ -917,7 +914,7 @@ fn G() -> i32 { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -928,38 +925,9 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_15.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_15.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_15.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.832 = ref_param_pattern [concrete = constants.%self.param_patt.b89] -// CHECK:STDOUT: %self.patt: %pattern_type.832 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.530] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %WithNontype.e5d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %WithNontype.e5d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_15.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.832 = ref_param_pattern [concrete = constants.%self.param_patt.b89] -// CHECK:STDOUT: %self.patt: %pattern_type.832 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.530] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %WithNontype.e5d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %WithNontype.e5d = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1075,31 +1043,18 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_15.2: ref %WithNontype.e5d = temporary %.loc9_13.2, %.loc9_15.1 [concrete = constants.%.f5e] // CHECK:STDOUT: %.loc9_15.3: %WithNontype.e5d = acquire_value %.loc9_15.2 [concrete = constants.%WithNontype.val] // CHECK:STDOUT: %F.call: init %i32 = call %F.specific_fn(%.loc9_15.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.f5e) +// CHECK:STDOUT: %Destroy.facet.loc9_15.1: %Destroy.type = facet_value constants.%WithNontype.e5d, (constants.%DestroyImpl.impl_witness.405, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_15.4: %Destroy.type = converted constants.%WithNontype.e5d, %Destroy.facet.loc9_15.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_15.2: %Destroy.type = facet_value constants.%WithNontype.e5d, (constants.%DestroyImpl.impl_witness.405, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_15.5: %Destroy.type = converted constants.%WithNontype.e5d, %Destroy.facet.loc9_15.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc9_15.2) // CHECK:STDOUT: return %F.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_15.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_15.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_15.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_15.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_15.2(%self.param: ref %WithNontype.e5d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_15.2(%self.param: ref %WithNontype.e5d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_15.2(%self.param: ref %WithNontype.e5d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_15.2(%self.param: ref %WithNontype.e5d) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @WithNontype(constants.%N.c34) { // CHECK:STDOUT: %N.patt.loc4_20.2 => constants.%N.patt.d64 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 1caac9fd9fa3..712ecde84503 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -103,19 +103,19 @@ fn G() { // CHECK:STDOUT: %tuple.type: type = tuple_type (type) [concrete] // CHECK:STDOUT: %tuple.ad8: %tuple.type = tuple_value (type) [concrete] // CHECK:STDOUT: %pattern_type.ddf: type = pattern_type %tuple.type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: %tuple.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.d26: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.198: %tuple.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %HoldsType.type: type = parameterized_class_name_type @HoldsType [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %HoldsType.generic: %HoldsType.type = struct_value () [concrete] -// CHECK:STDOUT: %HoldsType.7c6: type = class_type @HoldsType, @HoldsType(%T) [symbolic] +// CHECK:STDOUT: %HoldsType.7c6: type = class_type @HoldsType, @HoldsType(%T.198) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.831: type = pattern_type %HoldsType.7c6 [symbolic] // CHECK:STDOUT: %x.param_patt.c68: %pattern_type.831 = value_param_pattern [symbolic] // CHECK:STDOUT: %x.patt.efd: %pattern_type.831 = wrapper_binding_pattern x, %x.param_patt.c68 [symbolic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %tuple.elem0: type = tuple_access %T, element0 [symbolic] +// CHECK:STDOUT: %tuple.elem0: type = tuple_access %T.198, element0 [symbolic] // CHECK:STDOUT: %pattern_type.251: type = pattern_type %tuple.elem0 [symbolic] // CHECK:STDOUT: %a.param_patt.46f: %pattern_type.251 = value_param_pattern [symbolic] // CHECK:STDOUT: %a.patt.634: %pattern_type.251 = wrapper_binding_pattern a, %a.param_patt.46f [symbolic] @@ -140,86 +140,38 @@ fn G() { // CHECK:STDOUT: %.f6a: ref %HoldsType.f9f = temporary invalid, %HoldsType.val [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %.115: ref %C = temporary invalid, %C.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_30.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc13_30.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_30.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc13_30.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_30.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.e45: = bound_method %.115, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] -// CHECK:STDOUT: %self.param_patt.bdf: %pattern_type.6d1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e95: %pattern_type.6d1 = wrapper_binding_pattern self, %self.param_patt.bdf [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc13_8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.abc: = bound_method %.f6a, %Destroy.WithSelf.SelfDestruct.db3fdb.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_30.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8ca: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.eb2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.61c: %SubobjectDestroy.type = facet_value %HoldsType.f9f, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.5a7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.61c) [concrete] +// CHECK:STDOUT: %Destroy.facet.642: %Destroy.type = facet_value %HoldsType.f9f, (%DestroyImpl.impl_witness.5a7, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.205: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.642) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_30.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc13_30.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_30.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc13_30.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6d1 = ref_param_pattern [concrete = constants.%self.param_patt.bdf] -// CHECK:STDOUT: %self.patt: %pattern_type.6d1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e95] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %HoldsType.f9f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %HoldsType.f9f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc13_8 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6d1 = ref_param_pattern [concrete = constants.%self.param_patt.bdf] -// CHECK:STDOUT: %self.patt: %pattern_type.6d1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e95] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %HoldsType.f9f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %HoldsType.f9f = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -232,7 +184,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HoldsType.decl: %HoldsType.type = class_decl @HoldsType [concrete = constants.%HoldsType.generic] { -// CHECK:STDOUT: %T.patt.loc4_18.1: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc4_18.1: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.d26)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_27.1: type = splice_block %.loc4_27.3 [concrete = constants.%tuple.type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -240,10 +192,10 @@ fn G() { // CHECK:STDOUT: %.loc4_27.2: %tuple.type = tuple_literal (%.loc4_21) [concrete = constants.%tuple.ad8] // CHECK:STDOUT: %.loc4_27.3: type = converted %.loc4_27.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_18.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T)] +// CHECK:STDOUT: %T.loc4_18.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T.198)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.d26)] // CHECK:STDOUT: %x.param_patt.loc8_27.1: @F.%pattern_type.loc8_27 (%pattern_type.831) = value_param_pattern [symbolic = %x.param_patt.loc8_27.2 (constants.%x.param_patt.c68)] // CHECK:STDOUT: %x.patt.loc8_27.1: @F.%pattern_type.loc8_27 (%pattern_type.831) = wrapper_binding_pattern x, %x.param_patt.loc8_27.1 [symbolic = %x.patt.loc8_27.2 (constants.%x.patt.efd)] // CHECK:STDOUT: %a.param_patt.loc8_51.1: @F.%pattern_type.loc8_51 (%pattern_type.251) = value_param_pattern [symbolic = %a.param_patt.loc8_51.2 (constants.%a.param_patt.46f)] @@ -255,17 +207,17 @@ fn G() { // CHECK:STDOUT: %.loc8_16.2: %tuple.type = tuple_literal (%.loc8_10) [concrete = constants.%tuple.ad8] // CHECK:STDOUT: %.loc8_16.3: type = converted %.loc8_16.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_7.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc8_7.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.198)] // CHECK:STDOUT: %x.param: @F.%HoldsType.loc8_40.1 (%HoldsType.7c6) = value_param call_param0 // CHECK:STDOUT: %.loc8_40: type = splice_block %HoldsType.loc8_40.2 [symbolic = %HoldsType.loc8_40.1 (constants.%HoldsType.7c6)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc8_39: %tuple.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %HoldsType.loc8_40.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc8_40.1 (constants.%HoldsType.7c6)] +// CHECK:STDOUT: %T.ref.loc8_39: %tuple.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T.198)] +// CHECK:STDOUT: %HoldsType.loc8_40.2: type = class_type @HoldsType, @HoldsType(constants.%T.198) [symbolic = %HoldsType.loc8_40.1 (constants.%HoldsType.7c6)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.%HoldsType.loc8_40.1 (%HoldsType.7c6) = wrapper_binding x, %x.param // CHECK:STDOUT: %a.param: @F.%tuple.elem0.loc8_54.1 (%tuple.elem0) = value_param call_param1 // CHECK:STDOUT: %.loc8_54: type = splice_block %tuple.elem0.loc8_54.2 [symbolic = %tuple.elem0.loc8_54.1 (constants.%tuple.elem0)] { -// CHECK:STDOUT: %T.ref.loc8_53: %tuple.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc8_53: %tuple.type = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T.198)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0.loc8_54.2: type = tuple_access %T.ref.loc8_53, element0 [symbolic = %tuple.elem0.loc8_54.1 (constants.%tuple.elem0)] // CHECK:STDOUT: } @@ -276,8 +228,8 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @HoldsType(%T.loc4_18.2: %tuple.type) { -// CHECK:STDOUT: %T.patt.loc4_18.2: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc4_18.1: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc4_18.2: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.d26)] +// CHECK:STDOUT: %T.loc4_18.1: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T.198)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -299,8 +251,8 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc8_7.2: %tuple.type) { -// CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_7.1: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.d26)] +// CHECK:STDOUT: %T.loc8_7.1: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.198)] // CHECK:STDOUT: %HoldsType.loc8_40.1: type = class_type @HoldsType, @HoldsType(%T.loc8_7.1) [symbolic = %HoldsType.loc8_40.1 (constants.%HoldsType.7c6)] // CHECK:STDOUT: %pattern_type.loc8_27: type = pattern_type %HoldsType.loc8_40.1 [symbolic = %pattern_type.loc8_27 (constants.%pattern_type.831)] // CHECK:STDOUT: %x.param_patt.loc8_27.2: @F.%pattern_type.loc8_27 (%pattern_type.831) = value_param_pattern [symbolic = %x.param_patt.loc8_27.2 (constants.%x.param_patt.c68)] @@ -343,54 +295,37 @@ fn G() { // CHECK:STDOUT: %.loc13_30.5: ref %C = temporary %.loc13_30.2, %.loc13_30.4 [concrete = constants.%.115] // CHECK:STDOUT: %.loc13_30.6: %C = acquire_value %.loc13_30.5 [concrete = constants.%C.val] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc13_8.3, %.loc13_30.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_30: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.e45(constants.%.115) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_8: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.abc(constants.%.f6a) +// CHECK:STDOUT: %Destroy.facet.loc13_30.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc13_30.7: %Destroy.type = converted constants.%C, %Destroy.facet.loc13_30.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc13_30.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc13_30.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc13_30.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc13_30: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc13_30.5) +// CHECK:STDOUT: %Destroy.facet.loc13_8.1: %Destroy.type = facet_value constants.%HoldsType.f9f, (constants.%DestroyImpl.impl_witness.5a7, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.642] +// CHECK:STDOUT: %.loc13_8.4: %Destroy.type = converted constants.%HoldsType.f9f, %Destroy.facet.loc13_8.1 [concrete = constants.%Destroy.facet.642] +// CHECK:STDOUT: %Destroy.facet.loc13_8.2: %Destroy.type = facet_value constants.%HoldsType.f9f, (constants.%DestroyImpl.impl_witness.5a7, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.642] +// CHECK:STDOUT: %.loc13_8.5: %Destroy.type = converted constants.%HoldsType.f9f, %Destroy.facet.loc13_8.2 [concrete = constants.%Destroy.facet.642] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.642) [concrete = constants.%SelfDestruct.specific_fn.205] +// CHECK:STDOUT: %SelfDestruct.call.loc13_8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc13_8.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_30.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_30.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_30.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_30.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_30.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_8(%self.param: ref %HoldsType.f9f) = "no_op"; // 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_30.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_8(%self.param: ref %HoldsType.f9f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_8(%self.param: ref %HoldsType.f9f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_8(%self.param: ref %HoldsType.f9f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(constants.%T) { -// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_18.1 => constants.%T +// CHECK:STDOUT: specific @HoldsType(constants.%T.198) { +// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt.d26 +// CHECK:STDOUT: %T.loc4_18.1 => constants.%T.198 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_7.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.198) { +// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt.d26 +// CHECK:STDOUT: %T.loc8_7.1 => constants.%T.198 // CHECK:STDOUT: %HoldsType.loc8_40.1 => constants.%HoldsType.7c6 // CHECK:STDOUT: %pattern_type.loc8_27 => constants.%pattern_type.831 // CHECK:STDOUT: %x.param_patt.loc8_27.2 => constants.%x.param_patt.c68 @@ -402,14 +337,14 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%tuple.9e1) { -// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt.d26 // CHECK:STDOUT: %T.loc4_18.1 => constants.%tuple.9e1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%tuple.9e1) { -// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt.d26 // CHECK:STDOUT: %T.loc8_7.1 => constants.%tuple.9e1 // CHECK:STDOUT: %HoldsType.loc8_40.1 => constants.%HoldsType.f9f // CHECK:STDOUT: %pattern_type.loc8_27 => constants.%pattern_type.6d1 @@ -432,18 +367,18 @@ fn G() { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete] // CHECK:STDOUT: %pattern_type.136: type = pattern_type %struct_type.t [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.136 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: %struct_type.t = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.b23: %pattern_type.136 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.6cb: %struct_type.t = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %HoldsType.type: type = parameterized_class_name_type @HoldsType [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %HoldsType.generic: %HoldsType.type = struct_value () [concrete] -// CHECK:STDOUT: %HoldsType.73d: type = class_type @HoldsType, @HoldsType(%T) [symbolic] +// CHECK:STDOUT: %HoldsType.73d: type = class_type @HoldsType, @HoldsType(%T.6cb) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.92c: type = pattern_type %HoldsType.73d [symbolic] // CHECK:STDOUT: %x.param_patt.601: %pattern_type.92c = value_param_pattern [symbolic] // CHECK:STDOUT: %x.patt.a07: %pattern_type.92c = wrapper_binding_pattern x, %x.param_patt.601 [symbolic] -// CHECK:STDOUT: %.841: type = struct_access %T, element0 [symbolic] +// CHECK:STDOUT: %.841: type = struct_access %T.6cb, element0 [symbolic] // CHECK:STDOUT: %pattern_type.4ae: type = pattern_type %.841 [symbolic] // CHECK:STDOUT: %a.param_patt.ad4: %pattern_type.4ae = value_param_pattern [symbolic] // CHECK:STDOUT: %a.patt.68c: %pattern_type.4ae = wrapper_binding_pattern a, %a.param_patt.ad4 [symbolic] @@ -468,86 +403,38 @@ fn G() { // CHECK:STDOUT: %.7bf: ref %HoldsType.0a4 = temporary invalid, %HoldsType.val [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %.115: ref %C = temporary invalid, %C.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_33.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc13_33.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_33.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc13_33.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_33.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.e45: = bound_method %.115, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] -// CHECK:STDOUT: %self.param_patt.fc7: %pattern_type.c28 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3ef: %pattern_type.c28 = wrapper_binding_pattern self, %self.param_patt.fc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc13_8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.384: = bound_method %.7bf, %Destroy.WithSelf.SelfDestruct.db3fdb.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_33.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8ca: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.eb2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.016: %SubobjectDestroy.type = facet_value %HoldsType.0a4, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.675: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.016) [concrete] +// CHECK:STDOUT: %Destroy.facet.39a: %Destroy.type = facet_value %HoldsType.0a4, (%DestroyImpl.impl_witness.675, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8d9: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.39a) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_33.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc13_33.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_33.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc13_33.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c28 = ref_param_pattern [concrete = constants.%self.param_patt.fc7] -// CHECK:STDOUT: %self.patt: %pattern_type.c28 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3ef] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %HoldsType.0a4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %HoldsType.0a4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc13_8 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c28 = ref_param_pattern [concrete = constants.%self.param_patt.fc7] -// CHECK:STDOUT: %self.patt: %pattern_type.c28 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3ef] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %HoldsType.0a4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %HoldsType.0a4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -560,17 +447,17 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HoldsType.decl: %HoldsType.type = class_decl @HoldsType [concrete = constants.%HoldsType.generic] { -// CHECK:STDOUT: %T.patt.loc4_18.1: %pattern_type.136 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc4_18.1: %pattern_type.136 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.b23)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_29: type = splice_block %struct_type.t [concrete = constants.%struct_type.t] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc4_25: type = type_literal type [concrete = type] // CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete = constants.%struct_type.t] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc4_18.2: %struct_type.t = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T)] +// CHECK:STDOUT: %T.loc4_18.2: %struct_type.t = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T.6cb)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.136 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc8_7.1: %pattern_type.136 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.b23)] // CHECK:STDOUT: %x.param_patt.loc8_29.1: @F.%pattern_type.loc8_29 (%pattern_type.92c) = value_param_pattern [symbolic = %x.param_patt.loc8_29.2 (constants.%x.param_patt.601)] // CHECK:STDOUT: %x.patt.loc8_29.1: @F.%pattern_type.loc8_29 (%pattern_type.92c) = wrapper_binding_pattern x, %x.param_patt.loc8_29.1 [symbolic = %x.patt.loc8_29.2 (constants.%x.patt.a07)] // CHECK:STDOUT: %a.param_patt.loc8_53.1: @F.%pattern_type.loc8_53 (%pattern_type.4ae) = value_param_pattern [symbolic = %a.param_patt.loc8_53.2 (constants.%a.param_patt.ad4)] @@ -581,17 +468,17 @@ fn G() { // CHECK:STDOUT: %.loc8_14: type = type_literal type [concrete = type] // CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete = constants.%struct_type.t] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_7.2: %struct_type.t = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc8_7.2: %struct_type.t = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.6cb)] // CHECK:STDOUT: %x.param: @F.%HoldsType.loc8_42.1 (%HoldsType.73d) = value_param call_param0 // CHECK:STDOUT: %.loc8_42: type = splice_block %HoldsType.loc8_42.2 [symbolic = %HoldsType.loc8_42.1 (constants.%HoldsType.73d)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc8_41: %struct_type.t = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] -// CHECK:STDOUT: %HoldsType.loc8_42.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc8_42.1 (constants.%HoldsType.73d)] +// CHECK:STDOUT: %T.ref.loc8_41: %struct_type.t = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T.6cb)] +// CHECK:STDOUT: %HoldsType.loc8_42.2: type = class_type @HoldsType, @HoldsType(constants.%T.6cb) [symbolic = %HoldsType.loc8_42.1 (constants.%HoldsType.73d)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.%HoldsType.loc8_42.1 (%HoldsType.73d) = wrapper_binding x, %x.param // CHECK:STDOUT: %a.param: @F.%.loc8_56.1 (%.841) = value_param call_param1 // CHECK:STDOUT: %.loc8_56.2: type = splice_block %.loc8_56.3 [symbolic = %.loc8_56.1 (constants.%.841)] { -// CHECK:STDOUT: %T.ref.loc8_55: %struct_type.t = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc8_55: %struct_type.t = name_ref T, %T.loc8_7.2 [symbolic = %T.loc8_7.1 (constants.%T.6cb)] // CHECK:STDOUT: %.loc8_56.3: type = struct_access %T.ref.loc8_55, element0 [symbolic = %.loc8_56.1 (constants.%.841)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%.loc8_56.1 (%.841) = wrapper_binding a, %a.param @@ -601,8 +488,8 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @HoldsType(%T.loc4_18.2: %struct_type.t) { -// CHECK:STDOUT: %T.patt.loc4_18.2: %pattern_type.136 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc4_18.1: %struct_type.t = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc4_18.2: %pattern_type.136 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_18.2 (constants.%T.patt.b23)] +// CHECK:STDOUT: %T.loc4_18.1: %struct_type.t = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T.6cb)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -624,8 +511,8 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc8_7.2: %struct_type.t) { -// CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.136 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_7.1: %struct_type.t = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc8_7.2: %pattern_type.136 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_7.2 (constants.%T.patt.b23)] +// CHECK:STDOUT: %T.loc8_7.1: %struct_type.t = symbolic_binding T, 0 [symbolic = %T.loc8_7.1 (constants.%T.6cb)] // CHECK:STDOUT: %HoldsType.loc8_42.1: type = class_type @HoldsType, @HoldsType(%T.loc8_7.1) [symbolic = %HoldsType.loc8_42.1 (constants.%HoldsType.73d)] // CHECK:STDOUT: %pattern_type.loc8_29: type = pattern_type %HoldsType.loc8_42.1 [symbolic = %pattern_type.loc8_29 (constants.%pattern_type.92c)] // CHECK:STDOUT: %x.param_patt.loc8_29.2: @F.%pattern_type.loc8_29 (%pattern_type.92c) = value_param_pattern [symbolic = %x.param_patt.loc8_29.2 (constants.%x.param_patt.601)] @@ -668,54 +555,37 @@ fn G() { // CHECK:STDOUT: %.loc13_33.5: ref %C = temporary %.loc13_33.2, %.loc13_33.4 [concrete = constants.%.115] // CHECK:STDOUT: %.loc13_33.6: %C = acquire_value %.loc13_33.5 [concrete = constants.%C.val] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc13_8.3, %.loc13_33.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_33: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.e45(constants.%.115) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_8: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.384(constants.%.7bf) +// CHECK:STDOUT: %Destroy.facet.loc13_33.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc13_33.7: %Destroy.type = converted constants.%C, %Destroy.facet.loc13_33.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc13_33.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc13_33.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc13_33.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc13_33: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc13_33.5) +// CHECK:STDOUT: %Destroy.facet.loc13_8.1: %Destroy.type = facet_value constants.%HoldsType.0a4, (constants.%DestroyImpl.impl_witness.675, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.39a] +// CHECK:STDOUT: %.loc13_8.4: %Destroy.type = converted constants.%HoldsType.0a4, %Destroy.facet.loc13_8.1 [concrete = constants.%Destroy.facet.39a] +// CHECK:STDOUT: %Destroy.facet.loc13_8.2: %Destroy.type = facet_value constants.%HoldsType.0a4, (constants.%DestroyImpl.impl_witness.675, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.39a] +// CHECK:STDOUT: %.loc13_8.5: %Destroy.type = converted constants.%HoldsType.0a4, %Destroy.facet.loc13_8.2 [concrete = constants.%Destroy.facet.39a] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.39a) [concrete = constants.%SelfDestruct.specific_fn.8d9] +// CHECK:STDOUT: %SelfDestruct.call.loc13_8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc13_8.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_33.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_33.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_33.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_33.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_33.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_8(%self.param: ref %HoldsType.0a4) = "no_op"; // 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_33.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_8(%self.param: ref %HoldsType.0a4) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_8(%self.param: ref %HoldsType.0a4) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_8(%self.param: ref %HoldsType.0a4) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(constants.%T) { -// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc4_18.1 => constants.%T +// CHECK:STDOUT: specific @HoldsType(constants.%T.6cb) { +// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt.b23 +// CHECK:STDOUT: %T.loc4_18.1 => constants.%T.6cb // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_7.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.6cb) { +// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt.b23 +// CHECK:STDOUT: %T.loc8_7.1 => constants.%T.6cb // CHECK:STDOUT: %HoldsType.loc8_42.1 => constants.%HoldsType.73d // CHECK:STDOUT: %pattern_type.loc8_29 => constants.%pattern_type.92c // CHECK:STDOUT: %x.param_patt.loc8_29.2 => constants.%x.param_patt.601 @@ -727,14 +597,14 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%struct) { -// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt.b23 // CHECK:STDOUT: %T.loc4_18.1 => constants.%struct // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%struct) { -// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc8_7.2 => constants.%T.patt.b23 // CHECK:STDOUT: %T.loc8_7.1 => constants.%struct // CHECK:STDOUT: %HoldsType.loc8_42.1 => constants.%HoldsType.0a4 // CHECK:STDOUT: %pattern_type.loc8_29 => constants.%pattern_type.c28 @@ -755,7 +625,6 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Class: type = class_type @Class [concrete] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, type [concrete] // CHECK:STDOUT: %struct_type.t: type = struct_type {.t: type} [concrete] // CHECK:STDOUT: %complete_type.738: = complete_type_witness %struct_type.t [concrete] @@ -799,31 +668,27 @@ fn G() { // CHECK:STDOUT: %Class.val: %Class = struct_value (%C) [concrete] // CHECK:STDOUT: %.0de: ref %Class = temporary invalid, %Class.val [concrete] // CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%Class.val) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.11c: %pattern_type.9a5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.11d: %pattern_type.9a5 = wrapper_binding_pattern self, %self.param_patt.11c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc28_13.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc28_13.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc28_13.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.136: type = pattern_type %struct_type.t [concrete] -// CHECK:STDOUT: %self.param_patt.0c8: %pattern_type.136 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a0c: %pattern_type.136 = wrapper_binding_pattern self, %self.param_patt.0c8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc28_13.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc28_13.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b2b: %pattern_type.f15 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f19: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt.b2b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc28_13.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc28_13.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc28_13.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.0de, %Destroy.WithSelf.SelfDestruct.db3fdb.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc28_13.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.1f5: %SubobjectDestroy.type = facet_value type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a54: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.1f5) [concrete] +// CHECK:STDOUT: %Destroy.facet.029: %Destroy.type = facet_value type, (%DestroyImpl.impl_witness.a54, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.fe0: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.029) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc28_13.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.3a1: %SubobjectDestroy.type = facet_value %Class, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.66c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.3a1) [concrete] +// CHECK:STDOUT: %Destroy.facet.728: %Destroy.type = facet_value %Class, (%DestroyImpl.impl_witness.66c, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.744: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.728) [concrete] // CHECK:STDOUT: %HoldsType.ddc: type = class_type @HoldsType, @HoldsType(%Class.val) [concrete] // CHECK:STDOUT: %HoldsType.val.046: %HoldsType.ddc = struct_value () [concrete] // CHECK:STDOUT: } @@ -831,59 +696,16 @@ fn G() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.9c3: %type.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.aa5 = impl_witness_table (%Core.import_ref.9c3), @type.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc28_13.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9a5 = ref_param_pattern [concrete = constants.%self.param_patt.11c] -// CHECK:STDOUT: %self.patt: %pattern_type.9a5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.11d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref type = ref_param call_param0 -// CHECK:STDOUT: %self: ref type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc28_13.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9a5 = ref_param_pattern [concrete = constants.%self.param_patt.11c] -// CHECK:STDOUT: %self.patt: %pattern_type.9a5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.11d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref type = ref_param call_param0 -// CHECK:STDOUT: %self: ref type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc28_13.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.136 = ref_param_pattern [concrete = constants.%self.param_patt.0c8] -// CHECK:STDOUT: %self.patt: %pattern_type.136 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a0c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.t = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.t = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc28_13.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.136 = ref_param_pattern [concrete = constants.%self.param_patt.0c8] -// CHECK:STDOUT: %self.patt: %pattern_type.136 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a0c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.t = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.t = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc28_13.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc28_13.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f15 = ref_param_pattern [concrete = constants.%self.param_patt.b2b] -// CHECK:STDOUT: %self.patt: %pattern_type.f15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f19] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Class = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Class = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1042,53 +864,39 @@ fn G() { // CHECK:STDOUT: %.loc28_13.3: %Class = acquire_value %.loc28_13.2 [concrete = constants.%Class.val] // CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%Class.val) [concrete = constants.%G.specific_fn] // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.specific_fn() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.0de) +// CHECK:STDOUT: %Destroy.facet.loc28_13.1: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc28_13.4: %Destroy.type = converted constants.%Class, %Destroy.facet.loc28_13.1 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %Destroy.facet.loc28_13.2: %Destroy.type = facet_value constants.%Class, (constants.%DestroyImpl.impl_witness.66c, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %.loc28_13.5: %Destroy.type = converted constants.%Class, %Destroy.facet.loc28_13.2 [concrete = constants.%Destroy.facet.728] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.728) [concrete = constants.%SelfDestruct.specific_fn.744] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc28_13.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc28_13.1(%self.param: ref type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc28_13.1(%self.param: ref type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc28_13.1(%self.param: ref type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc28_13.1(%self.param: ref type) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc28_13.2(%self.param: ref %struct_type.t) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc28_13.1: ref type = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc28_13.1: %Destroy.type = facet_value type, (constants.%DestroyImpl.impl_witness.a54, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.029] +// CHECK:STDOUT: %.loc28_13.2: %Destroy.type = converted type, %Destroy.facet.loc28_13.1 [concrete = constants.%Destroy.facet.029] +// CHECK:STDOUT: %Destroy.facet.loc28_13.2: %Destroy.type = facet_value type, (constants.%DestroyImpl.impl_witness.a54, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.029] +// CHECK:STDOUT: %.loc28_13.3: %Destroy.type = converted type, %Destroy.facet.loc28_13.2 [concrete = constants.%Destroy.facet.029] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.029) [concrete = constants.%SelfDestruct.specific_fn.fe0] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc28_13.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc28_13.2(%self.param: ref %struct_type.t) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc28: ref type = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc28, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc28) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc28_13.2(%self.param: ref %struct_type.t) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc28_13.2(%self.param: ref %struct_type.t) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc28_13.3(%self.param: ref %Class) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc28_13.3(%self.param: ref %Class) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: %Class.elem = name_ref t, @Class.%field_decl [concrete = @Class.%field_decl] -// CHECK:STDOUT: %.loc28: ref type = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc28, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc28) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc28_13.3(%self.param: ref %Class) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc28_13.3(%self.param: ref %Class) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc28_13.1: ref type = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc28_13.1: %Destroy.type = facet_value type, (constants.%DestroyImpl.impl_witness.a54, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.029] +// CHECK:STDOUT: %.loc28_13.2: %Destroy.type = converted type, %Destroy.facet.loc28_13.1 [concrete = constants.%Destroy.facet.029] +// CHECK:STDOUT: %Destroy.facet.loc28_13.2: %Destroy.type = facet_value type, (constants.%DestroyImpl.impl_witness.a54, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.029] +// CHECK:STDOUT: %.loc28_13.3: %Destroy.type = converted type, %Destroy.facet.loc28_13.2 [concrete = constants.%Destroy.facet.029] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.029) [concrete = constants.%SelfDestruct.specific_fn.fe0] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc28_13.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1201,16 +1009,20 @@ fn G() { // CHECK:STDOUT: %.345: ref %Array.612 = temporary invalid, %array [concrete] // CHECK:STDOUT: %HoldsType.00d: type = class_type @HoldsType, @HoldsType(%array) [concrete] // CHECK:STDOUT: %HoldsType.val: %HoldsType.00d = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.46c: %pattern_type.809 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.463: %pattern_type.809 = wrapper_binding_pattern self, %self.param_patt.46c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.345, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.edc: %SubobjectDestroy.type = facet_value %Array.612, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e45: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.edc) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Array.612, (%DestroyImpl.impl_witness.e45, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1219,7 +1031,7 @@ fn G() { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1231,24 +1043,9 @@ fn G() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.9c3: %type.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.aa5 = impl_witness_table (%Core.import_ref.9c3), @type.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.809 = ref_param_pattern [concrete = constants.%self.param_patt.46c] -// CHECK:STDOUT: %self.patt: %pattern_type.809 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.463] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.612 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.612 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc15 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.809 = ref_param_pattern [concrete = constants.%self.param_patt.46c] -// CHECK:STDOUT: %self.patt: %pattern_type.809 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.463] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.612 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.612 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1379,20 +1176,16 @@ fn G() { // CHECK:STDOUT: %.loc15_6.3: init %HoldsType.00d to %.loc15_6.2 = class_init () [concrete = constants.%HoldsType.val] // CHECK:STDOUT: %.loc15_8: init %HoldsType.00d = converted %.loc15_6.1, %.loc15_6.3 [concrete = constants.%HoldsType.val] // CHECK:STDOUT: %.loc15_48: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.345) +// CHECK:STDOUT: %Destroy.facet.loc15_27.1: %Destroy.type = facet_value constants.%Array.612, (constants.%DestroyImpl.impl_witness.e45, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_27.4: %Destroy.type = converted constants.%Array.612, %Destroy.facet.loc15_27.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc15_27.2: %Destroy.type = facet_value constants.%Array.612, (constants.%DestroyImpl.impl_witness.e45, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_27.5: %Destroy.type = converted constants.%Array.612, %Destroy.facet.loc15_27.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_27.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15(%self.param: ref %Array.612) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15(%self.param: ref %Array.612) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15(%self.param: ref %Array.612) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15(%self.param: ref %Array.612) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%T.6be) { // CHECK:STDOUT: %T.patt.loc4_18.2 => constants.%T.patt.bb1 diff --git a/toolchain/check/testdata/eval/aggregates.carbon b/toolchain/check/testdata/eval/aggregates.carbon index df545edfceee..4fcc16061d6b 100644 --- a/toolchain/check/testdata/eval/aggregates.carbon +++ b/toolchain/check/testdata/eval/aggregates.carbon @@ -497,71 +497,69 @@ fn G(generic N: i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.429: type = pattern_type %Destroy.type [concrete] -// CHECK:STDOUT: %T.patt.351: %pattern_type.429 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T.0e7: %Destroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type %Destroy.type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.f45: %Destroy.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %T.as_type.700: type = facet_access_type %T.0e7 [symbolic] -// CHECK:STDOUT: %ptr.b37: type = ptr_type %T.as_type.700 [symbolic] -// CHECK:STDOUT: %const: type = const_type %T.as_type.700 [symbolic] +// CHECK:STDOUT: %T.as_type.190: type = facet_access_type %T.f45 [symbolic] +// CHECK:STDOUT: %ptr.360: type = ptr_type %T.as_type.190 [symbolic] +// CHECK:STDOUT: %const: type = const_type %T.as_type.190 [symbolic] // CHECK:STDOUT: %tuple.type.693: type = tuple_type (type, type) [concrete] -// CHECK:STDOUT: %tuple: %tuple.type.693 = tuple_value (%ptr.b37, %const) [symbolic] -// CHECK:STDOUT: %tuple.type.cd5: type = tuple_type (%ptr.b37, %const) [symbolic] -// CHECK:STDOUT: %require_complete.3b6: = require_complete_type %tuple.type.cd5 [symbolic] -// CHECK:STDOUT: %pattern_type.02b: type = pattern_type %tuple.type.cd5 [symbolic] -// CHECK:STDOUT: %u.patt: %pattern_type.02b = ref_binding_pattern u [symbolic] -// CHECK:STDOUT: %u.var_patt: %pattern_type.02b = var_pattern %u.patt [symbolic] +// CHECK:STDOUT: %tuple: %tuple.type.693 = tuple_value (%ptr.360, %const) [symbolic] +// CHECK:STDOUT: %tuple.type.0fd: type = tuple_type (%ptr.360, %const) [symbolic] +// CHECK:STDOUT: %require_complete.60d: = require_complete_type %tuple.type.0fd [symbolic] +// CHECK:STDOUT: %pattern_type.5a8: type = pattern_type %tuple.type.0fd [symbolic] +// CHECK:STDOUT: %u.patt: %pattern_type.5a8 = ref_binding_pattern u [symbolic] +// CHECK:STDOUT: %u.var_patt: %pattern_type.5a8 = var_pattern %u.patt [symbolic] // CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete] -// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.2ab: = lookup_impl_witness %tuple.type.cd5, @DefaultOrUnformed [symbolic] -// CHECK:STDOUT: %.fcd: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%tuple.type.cd5) [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.facet.c98: %DefaultOrUnformed.type = facet_value %tuple.type.cd5, (%DefaultOrUnformed.lookup_impl_witness.2ab) [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.f14: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.c98) [symbolic] -// CHECK:STDOUT: %.ae7: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.f14, %DefaultOrUnformed.facet.c98 [symbolic] -// CHECK:STDOUT: %impl.elem0.fec: %.ae7 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.2ab, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.619: = specific_impl_function %impl.elem0.fec, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.c98) [symbolic] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T.as_type.700} [symbolic] -// CHECK:STDOUT: %require_complete.f8e: = require_complete_type %struct_type.a [symbolic] -// CHECK:STDOUT: %pattern_type.915: type = pattern_type %struct_type.a [symbolic] -// CHECK:STDOUT: %v.patt: %pattern_type.915 = ref_binding_pattern v [symbolic] -// CHECK:STDOUT: %v.var_patt: %pattern_type.915 = var_pattern %v.patt [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.53f: = lookup_impl_witness %struct_type.a, @DefaultOrUnformed [symbolic] -// CHECK:STDOUT: %.a25: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%struct_type.a) [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.facet.103: %DefaultOrUnformed.type = facet_value %struct_type.a, (%DefaultOrUnformed.lookup_impl_witness.53f) [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.a16: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.103) [symbolic] -// CHECK:STDOUT: %.9be: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.a16, %DefaultOrUnformed.facet.103 [symbolic] -// CHECK:STDOUT: %impl.elem0.873: %.9be = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.53f, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.1d1: = specific_impl_function %impl.elem0.873, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.103) [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.0b6: = lookup_impl_witness %tuple.type.0fd, @DefaultOrUnformed [symbolic] +// CHECK:STDOUT: %.bac: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%tuple.type.0fd) [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.facet.008: %DefaultOrUnformed.type = facet_value %tuple.type.0fd, (%DefaultOrUnformed.lookup_impl_witness.0b6) [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.64a: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.008) [symbolic] +// CHECK:STDOUT: %.060: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.64a, %DefaultOrUnformed.facet.008 [symbolic] +// CHECK:STDOUT: %impl.elem0.a9e: %.060 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.0b6, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.329: = specific_impl_function %impl.elem0.a9e, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.008) [symbolic] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T.as_type.190} [symbolic] +// CHECK:STDOUT: %require_complete.6d5: = require_complete_type %struct_type.a [symbolic] +// CHECK:STDOUT: %pattern_type.beb: type = pattern_type %struct_type.a [symbolic] +// CHECK:STDOUT: %v.patt: %pattern_type.beb = ref_binding_pattern v [symbolic] +// CHECK:STDOUT: %v.var_patt: %pattern_type.beb = var_pattern %v.patt [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.a9a: = lookup_impl_witness %struct_type.a, @DefaultOrUnformed [symbolic] +// CHECK:STDOUT: %.f92: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%struct_type.a) [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.facet.16a: %DefaultOrUnformed.type = facet_value %struct_type.a, (%DefaultOrUnformed.lookup_impl_witness.a9a) [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.999: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.16a) [symbolic] +// CHECK:STDOUT: %.4e9: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.999, %DefaultOrUnformed.facet.16a [symbolic] +// CHECK:STDOUT: %impl.elem0.47c: %.4e9 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.a9a, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.e03: = specific_impl_function %impl.elem0.47c, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.16a) [symbolic] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete] -// CHECK:STDOUT: %Array.e06: type = class_type @Array, @Array(%T.as_type.700, %int_5) [symbolic] -// CHECK:STDOUT: %require_complete.05a: = require_complete_type %Array.e06 [symbolic] -// CHECK:STDOUT: %pattern_type.38c: type = pattern_type %Array.e06 [symbolic] -// CHECK:STDOUT: %w.patt: %pattern_type.38c = ref_binding_pattern w [symbolic] -// CHECK:STDOUT: %w.var_patt: %pattern_type.38c = var_pattern %w.patt [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.f03: = lookup_impl_witness %Array.e06, @DefaultOrUnformed [symbolic] -// CHECK:STDOUT: %.d6a: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%Array.e06) [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.facet.61d: %DefaultOrUnformed.type = facet_value %Array.e06, (%DefaultOrUnformed.lookup_impl_witness.f03) [symbolic] -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.25b: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.61d) [symbolic] -// CHECK:STDOUT: %.b93: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.25b, %DefaultOrUnformed.facet.61d [symbolic] -// CHECK:STDOUT: %impl.elem0.1c3: %.b93 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.f03, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.aef: = specific_impl_function %impl.elem0.1c3, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.61d) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.fc7: = lookup_impl_witness %Array.e06, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.aae: %Destroy.type = facet_value %Array.e06, (%Destroy.lookup_impl_witness.fc7) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.ddd: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.aae) [symbolic] -// CHECK:STDOUT: %.44d: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.ddd, %Destroy.facet.aae [symbolic] -// CHECK:STDOUT: %impl.elem2.f1a: %.44d = impl_witness_access %Destroy.lookup_impl_witness.fc7, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.5b6: = specific_impl_function %impl.elem2.f1a, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.aae) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.7f9: = lookup_impl_witness %struct_type.a, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.aa3: %Destroy.type = facet_value %struct_type.a, (%Destroy.lookup_impl_witness.7f9) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.af4: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.aa3) [symbolic] -// CHECK:STDOUT: %.8a1: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.af4, %Destroy.facet.aa3 [symbolic] -// CHECK:STDOUT: %impl.elem2.86f: %.8a1 = impl_witness_access %Destroy.lookup_impl_witness.7f9, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.86e: = specific_impl_function %impl.elem2.86f, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.aa3) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.d26: = lookup_impl_witness %tuple.type.cd5, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.7ba: %Destroy.type = facet_value %tuple.type.cd5, (%Destroy.lookup_impl_witness.d26) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.1e6: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.7ba) [symbolic] -// CHECK:STDOUT: %.b75: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.1e6, %Destroy.facet.7ba [symbolic] -// CHECK:STDOUT: %impl.elem2.dad: %.b75 = impl_witness_access %Destroy.lookup_impl_witness.d26, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.d5b: = specific_impl_function %impl.elem2.dad, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.7ba) [symbolic] +// CHECK:STDOUT: %Array.760: type = class_type @Array, @Array(%T.as_type.190, %int_5) [symbolic] +// CHECK:STDOUT: %require_complete.b4f: = require_complete_type %Array.760 [symbolic] +// CHECK:STDOUT: %pattern_type.1ed: type = pattern_type %Array.760 [symbolic] +// CHECK:STDOUT: %w.patt: %pattern_type.1ed = ref_binding_pattern w [symbolic] +// CHECK:STDOUT: %w.var_patt: %pattern_type.1ed = var_pattern %w.patt [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.b34: = lookup_impl_witness %Array.760, @DefaultOrUnformed [symbolic] +// CHECK:STDOUT: %.c4e: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%Array.760) [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.facet.814: %DefaultOrUnformed.type = facet_value %Array.760, (%DefaultOrUnformed.lookup_impl_witness.b34) [symbolic] +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.627: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.814) [symbolic] +// CHECK:STDOUT: %.543: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.627, %DefaultOrUnformed.facet.814 [symbolic] +// CHECK:STDOUT: %impl.elem0.be3: %.543 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.b34, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.c3c: = specific_impl_function %impl.elem0.be3, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.814) [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.496: = lookup_impl_witness %Array.760, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.54a: = lookup_impl_witness %Array.760, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.c4e: %SubobjectDestroy.type = facet_value %Array.760, (%SubobjectDestroy.lookup_impl_witness.54a) [symbolic] +// CHECK:STDOUT: %.5f3: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c4e) [symbolic] +// CHECK:STDOUT: %Destroy.facet.535: %Destroy.type = facet_value %Array.760, (%DestroyImpl.lookup_impl_witness.496, %SubobjectDestroy.lookup_impl_witness.54a) [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.070: = lookup_impl_witness %struct_type.a, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.049: = lookup_impl_witness %struct_type.a, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.4f8: %SubobjectDestroy.type = facet_value %struct_type.a, (%SubobjectDestroy.lookup_impl_witness.049) [symbolic] +// CHECK:STDOUT: %.1cf: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.4f8) [symbolic] +// CHECK:STDOUT: %Destroy.facet.632: %Destroy.type = facet_value %struct_type.a, (%DestroyImpl.lookup_impl_witness.070, %SubobjectDestroy.lookup_impl_witness.049) [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.c16: = lookup_impl_witness %tuple.type.0fd, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.b96: = lookup_impl_witness %tuple.type.0fd, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.102: %SubobjectDestroy.type = facet_value %tuple.type.0fd, (%SubobjectDestroy.lookup_impl_witness.b96) [symbolic] +// CHECK:STDOUT: %.252: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.102) [symbolic] +// CHECK:STDOUT: %Destroy.facet.095: %Destroy.type = facet_value %tuple.type.0fd, (%DestroyImpl.lookup_impl_witness.c16, %SubobjectDestroy.lookup_impl_witness.b96) [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] @@ -593,12 +591,11 @@ fn G(generic N: i32) { // CHECK:STDOUT: %.431: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.8de, %DefaultOrUnformed.facet.48a [symbolic] // CHECK:STDOUT: %impl.elem0.b7f: %.431 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.b5f, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.971: = specific_impl_function %impl.elem0.b7f, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.48a) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.27d: = lookup_impl_witness %Array.e80, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.ca8: %Destroy.type = facet_value %Array.e80, (%Destroy.lookup_impl_witness.27d) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.4da: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.ca8) [symbolic] -// CHECK:STDOUT: %.48f: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.4da, %Destroy.facet.ca8 [symbolic] -// CHECK:STDOUT: %impl.elem2.af7: %.48f = impl_witness_access %Destroy.lookup_impl_witness.27d, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.a3f: = specific_impl_function %impl.elem2.af7, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.ca8) [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.6da: = lookup_impl_witness %Array.e80, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.a96: = lookup_impl_witness %Array.e80, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.700: %SubobjectDestroy.type = facet_value %Array.e80, (%SubobjectDestroy.lookup_impl_witness.a96) [symbolic] +// CHECK:STDOUT: %.2d8: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.700) [symbolic] +// CHECK:STDOUT: %Destroy.facet.362: %Destroy.type = facet_value %Array.e80, (%DestroyImpl.lookup_impl_witness.6da, %SubobjectDestroy.lookup_impl_witness.a96) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -610,163 +607,154 @@ fn G(generic N: i32) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc6_19.2: type = facet_access_type %T.loc4_15.1 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] -// CHECK:STDOUT: %ptr.loc6_19.2: type = ptr_type %T.as_type.loc6_19.2 [symbolic = %ptr.loc6_19.2 (constants.%ptr.b37)] +// CHECK:STDOUT: %T.as_type.loc6_19.2: type = facet_access_type %T.loc4_15.1 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.190)] +// CHECK:STDOUT: %ptr.loc6_19.2: type = ptr_type %T.as_type.loc6_19.2 [symbolic = %ptr.loc6_19.2 (constants.%ptr.360)] // CHECK:STDOUT: %const.loc6_22.2: type = const_type %T.as_type.loc6_19.2 [symbolic = %const.loc6_22.2 (constants.%const)] // CHECK:STDOUT: %tuple: %tuple.type.693 = tuple_value (%ptr.loc6_19.2, %const.loc6_22.2) [symbolic = %tuple (constants.%tuple)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc6_19.2, %const.loc6_22.2) [symbolic = %tuple.type (constants.%tuple.type.cd5)] -// CHECK:STDOUT: %require_complete.loc6: = require_complete_type %tuple.type [symbolic = %require_complete.loc6 (constants.%require_complete.3b6)] -// CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %tuple.type [symbolic = %pattern_type.loc6 (constants.%pattern_type.02b)] -// CHECK:STDOUT: %u.patt.loc6_15.2: @F.%pattern_type.loc6 (%pattern_type.02b) = ref_binding_pattern u [symbolic = %u.patt.loc6_15.2 (constants.%u.patt)] -// CHECK:STDOUT: %u.var_patt.loc6_3.2: @F.%pattern_type.loc6 (%pattern_type.02b) = var_pattern %u.patt.loc6_15.2 [symbolic = %u.var_patt.loc6_3.2 (constants.%u.var_patt)] -// CHECK:STDOUT: %.loc6_30.3: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%tuple.type) [symbolic = %.loc6_30.3 (constants.%.fcd)] -// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.loc6: = lookup_impl_witness %tuple.type, @DefaultOrUnformed [symbolic = %DefaultOrUnformed.lookup_impl_witness.loc6 (constants.%DefaultOrUnformed.lookup_impl_witness.2ab)] -// CHECK:STDOUT: %DefaultOrUnformed.facet.loc6_30.2: %DefaultOrUnformed.type = facet_value %tuple.type, (%DefaultOrUnformed.lookup_impl_witness.loc6) [symbolic = %DefaultOrUnformed.facet.loc6_30.2 (constants.%DefaultOrUnformed.facet.c98)] -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.loc6: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.loc6_30.2) [symbolic = %DefaultOrUnformed.WithSelf.Op.type.loc6 (constants.%DefaultOrUnformed.WithSelf.Op.type.f14)] -// CHECK:STDOUT: %.loc6_30.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.loc6, %DefaultOrUnformed.facet.loc6_30.2 [symbolic = %.loc6_30.4 (constants.%.ae7)] -// CHECK:STDOUT: %impl.elem0.loc6_30.2: @F.%.loc6_30.4 (%.ae7) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.loc6, element0 [symbolic = %impl.elem0.loc6_30.2 (constants.%impl.elem0.fec)] -// CHECK:STDOUT: %specific_impl_fn.loc6_30.2: = specific_impl_function %impl.elem0.loc6_30.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc6_30.2) [symbolic = %specific_impl_fn.loc6_30.2 (constants.%specific_impl_fn.619)] -// CHECK:STDOUT: %struct_type.a.loc7_23.2: type = struct_type {.a: @F.%T.as_type.loc6_19.2 (%T.as_type.700)} [symbolic = %struct_type.a.loc7_23.2 (constants.%struct_type.a)] -// CHECK:STDOUT: %require_complete.loc7: = require_complete_type %struct_type.a.loc7_23.2 [symbolic = %require_complete.loc7 (constants.%require_complete.f8e)] -// CHECK:STDOUT: %pattern_type.loc7: type = pattern_type %struct_type.a.loc7_23.2 [symbolic = %pattern_type.loc7 (constants.%pattern_type.915)] -// CHECK:STDOUT: %v.patt.loc7_15.2: @F.%pattern_type.loc7 (%pattern_type.915) = ref_binding_pattern v [symbolic = %v.patt.loc7_15.2 (constants.%v.patt)] -// CHECK:STDOUT: %v.var_patt.loc7_3.2: @F.%pattern_type.loc7 (%pattern_type.915) = var_pattern %v.patt.loc7_15.2 [symbolic = %v.var_patt.loc7_3.2 (constants.%v.var_patt)] -// CHECK:STDOUT: %.loc7_24.3: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%struct_type.a.loc7_23.2) [symbolic = %.loc7_24.3 (constants.%.a25)] -// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.loc7: = lookup_impl_witness %struct_type.a.loc7_23.2, @DefaultOrUnformed [symbolic = %DefaultOrUnformed.lookup_impl_witness.loc7 (constants.%DefaultOrUnformed.lookup_impl_witness.53f)] -// CHECK:STDOUT: %DefaultOrUnformed.facet.loc7_24.2: %DefaultOrUnformed.type = facet_value %struct_type.a.loc7_23.2, (%DefaultOrUnformed.lookup_impl_witness.loc7) [symbolic = %DefaultOrUnformed.facet.loc7_24.2 (constants.%DefaultOrUnformed.facet.103)] -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.loc7: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.loc7_24.2) [symbolic = %DefaultOrUnformed.WithSelf.Op.type.loc7 (constants.%DefaultOrUnformed.WithSelf.Op.type.a16)] -// CHECK:STDOUT: %.loc7_24.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.loc7, %DefaultOrUnformed.facet.loc7_24.2 [symbolic = %.loc7_24.4 (constants.%.9be)] -// CHECK:STDOUT: %impl.elem0.loc7_24.2: @F.%.loc7_24.4 (%.9be) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.loc7, element0 [symbolic = %impl.elem0.loc7_24.2 (constants.%impl.elem0.873)] -// CHECK:STDOUT: %specific_impl_fn.loc7_24.2: = specific_impl_function %impl.elem0.loc7_24.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc7_24.2) [symbolic = %specific_impl_fn.loc7_24.2 (constants.%specific_impl_fn.1d1)] -// CHECK:STDOUT: %Array.loc8_27.2: type = class_type @Array, @Array(%T.as_type.loc6_19.2, constants.%int_5) [symbolic = %Array.loc8_27.2 (constants.%Array.e06)] -// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %Array.loc8_27.2 [symbolic = %require_complete.loc8 (constants.%require_complete.05a)] -// CHECK:STDOUT: %pattern_type.loc8: type = pattern_type %Array.loc8_27.2 [symbolic = %pattern_type.loc8 (constants.%pattern_type.38c)] -// CHECK:STDOUT: %w.patt.loc8_15.2: @F.%pattern_type.loc8 (%pattern_type.38c) = ref_binding_pattern w [symbolic = %w.patt.loc8_15.2 (constants.%w.patt)] -// CHECK:STDOUT: %w.var_patt.loc8_3.2: @F.%pattern_type.loc8 (%pattern_type.38c) = var_pattern %w.patt.loc8_15.2 [symbolic = %w.var_patt.loc8_3.2 (constants.%w.var_patt)] -// CHECK:STDOUT: %.loc8_28.3: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%Array.loc8_27.2) [symbolic = %.loc8_28.3 (constants.%.d6a)] -// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.loc8: = lookup_impl_witness %Array.loc8_27.2, @DefaultOrUnformed [symbolic = %DefaultOrUnformed.lookup_impl_witness.loc8 (constants.%DefaultOrUnformed.lookup_impl_witness.f03)] -// CHECK:STDOUT: %DefaultOrUnformed.facet.loc8_28.2: %DefaultOrUnformed.type = facet_value %Array.loc8_27.2, (%DefaultOrUnformed.lookup_impl_witness.loc8) [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.61d)] -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.loc8: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.loc8_28.2) [symbolic = %DefaultOrUnformed.WithSelf.Op.type.loc8 (constants.%DefaultOrUnformed.WithSelf.Op.type.25b)] -// CHECK:STDOUT: %.loc8_28.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.loc8, %DefaultOrUnformed.facet.loc8_28.2 [symbolic = %.loc8_28.4 (constants.%.b93)] -// CHECK:STDOUT: %impl.elem0.loc8_28.2: @F.%.loc8_28.4 (%.b93) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.loc8, element0 [symbolic = %impl.elem0.loc8_28.2 (constants.%impl.elem0.1c3)] -// CHECK:STDOUT: %specific_impl_fn.loc8_28.2: = specific_impl_function %impl.elem0.loc8_28.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc8_28.2) [symbolic = %specific_impl_fn.loc8_28.2 (constants.%specific_impl_fn.aef)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.loc8: = lookup_impl_witness %Array.loc8_27.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc8 (constants.%Destroy.lookup_impl_witness.fc7)] -// CHECK:STDOUT: %Destroy.facet.loc8_3.3: %Destroy.type = facet_value %Array.loc8_27.2, (%Destroy.lookup_impl_witness.loc8) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.aae)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.loc8: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc8_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type.loc8 (constants.%Destroy.WithSelf.SelfDestruct.type.ddd)] -// CHECK:STDOUT: %.loc8_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.loc8, %Destroy.facet.loc8_3.3 [symbolic = %.loc8_3.4 (constants.%.44d)] -// CHECK:STDOUT: %impl.elem2.loc8_3.2: @F.%.loc8_3.4 (%.44d) = impl_witness_access %Destroy.lookup_impl_witness.loc8, element2 [symbolic = %impl.elem2.loc8_3.2 (constants.%impl.elem2.f1a)] -// CHECK:STDOUT: %specific_impl_fn.loc8_3.2: = specific_impl_function %impl.elem2.loc8_3.2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.loc8_3.3) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.5b6)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.loc7: = lookup_impl_witness %struct_type.a.loc7_23.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc7 (constants.%Destroy.lookup_impl_witness.7f9)] -// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value %struct_type.a.loc7_23.2, (%Destroy.lookup_impl_witness.loc7) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.aa3)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.loc7: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc7_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type.loc7 (constants.%Destroy.WithSelf.SelfDestruct.type.af4)] -// CHECK:STDOUT: %.loc7_3.3: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.loc7, %Destroy.facet.loc7_3.3 [symbolic = %.loc7_3.3 (constants.%.8a1)] -// CHECK:STDOUT: %impl.elem2.loc7_3.2: @F.%.loc7_3.3 (%.8a1) = impl_witness_access %Destroy.lookup_impl_witness.loc7, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2.86f)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem2.loc7_3.2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.loc7_3.3) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.86e)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.loc6: = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc6 (constants.%Destroy.lookup_impl_witness.d26)] -// CHECK:STDOUT: %Destroy.facet.loc6_3.3: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness.loc6) [symbolic = %Destroy.facet.loc6_3.3 (constants.%Destroy.facet.7ba)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.loc6: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc6_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type.loc6 (constants.%Destroy.WithSelf.SelfDestruct.type.1e6)] -// CHECK:STDOUT: %.loc6_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.loc6, %Destroy.facet.loc6_3.3 [symbolic = %.loc6_3.4 (constants.%.b75)] -// CHECK:STDOUT: %impl.elem2.loc6_3.2: @F.%.loc6_3.4 (%.b75) = impl_witness_access %Destroy.lookup_impl_witness.loc6, element2 [symbolic = %impl.elem2.loc6_3.2 (constants.%impl.elem2.dad)] -// CHECK:STDOUT: %specific_impl_fn.loc6_3.2: = specific_impl_function %impl.elem2.loc6_3.2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.loc6_3.3) [symbolic = %specific_impl_fn.loc6_3.2 (constants.%specific_impl_fn.d5b)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc6_19.2, %const.loc6_22.2) [symbolic = %tuple.type (constants.%tuple.type.0fd)] +// CHECK:STDOUT: %require_complete.loc6: = require_complete_type %tuple.type [symbolic = %require_complete.loc6 (constants.%require_complete.60d)] +// CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %tuple.type [symbolic = %pattern_type.loc6 (constants.%pattern_type.5a8)] +// CHECK:STDOUT: %u.patt.loc6_15.2: @F.%pattern_type.loc6 (%pattern_type.5a8) = ref_binding_pattern u [symbolic = %u.patt.loc6_15.2 (constants.%u.patt)] +// CHECK:STDOUT: %u.var_patt.loc6_3.2: @F.%pattern_type.loc6 (%pattern_type.5a8) = var_pattern %u.patt.loc6_15.2 [symbolic = %u.var_patt.loc6_3.2 (constants.%u.var_patt)] +// CHECK:STDOUT: %.loc6_30.3: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%tuple.type) [symbolic = %.loc6_30.3 (constants.%.bac)] +// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.loc6: = lookup_impl_witness %tuple.type, @DefaultOrUnformed [symbolic = %DefaultOrUnformed.lookup_impl_witness.loc6 (constants.%DefaultOrUnformed.lookup_impl_witness.0b6)] +// CHECK:STDOUT: %DefaultOrUnformed.facet.loc6_30.2: %DefaultOrUnformed.type = facet_value %tuple.type, (%DefaultOrUnformed.lookup_impl_witness.loc6) [symbolic = %DefaultOrUnformed.facet.loc6_30.2 (constants.%DefaultOrUnformed.facet.008)] +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.loc6: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.loc6_30.2) [symbolic = %DefaultOrUnformed.WithSelf.Op.type.loc6 (constants.%DefaultOrUnformed.WithSelf.Op.type.64a)] +// CHECK:STDOUT: %.loc6_30.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.loc6, %DefaultOrUnformed.facet.loc6_30.2 [symbolic = %.loc6_30.4 (constants.%.060)] +// CHECK:STDOUT: %impl.elem0.loc6_30.2: @F.%.loc6_30.4 (%.060) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.loc6, element0 [symbolic = %impl.elem0.loc6_30.2 (constants.%impl.elem0.a9e)] +// CHECK:STDOUT: %specific_impl_fn.loc6_30.2: = specific_impl_function %impl.elem0.loc6_30.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc6_30.2) [symbolic = %specific_impl_fn.loc6_30.2 (constants.%specific_impl_fn.329)] +// CHECK:STDOUT: %struct_type.a.loc7_23.2: type = struct_type {.a: @F.%T.as_type.loc6_19.2 (%T.as_type.190)} [symbolic = %struct_type.a.loc7_23.2 (constants.%struct_type.a)] +// CHECK:STDOUT: %require_complete.loc7: = require_complete_type %struct_type.a.loc7_23.2 [symbolic = %require_complete.loc7 (constants.%require_complete.6d5)] +// CHECK:STDOUT: %pattern_type.loc7: type = pattern_type %struct_type.a.loc7_23.2 [symbolic = %pattern_type.loc7 (constants.%pattern_type.beb)] +// CHECK:STDOUT: %v.patt.loc7_15.2: @F.%pattern_type.loc7 (%pattern_type.beb) = ref_binding_pattern v [symbolic = %v.patt.loc7_15.2 (constants.%v.patt)] +// CHECK:STDOUT: %v.var_patt.loc7_3.2: @F.%pattern_type.loc7 (%pattern_type.beb) = var_pattern %v.patt.loc7_15.2 [symbolic = %v.var_patt.loc7_3.2 (constants.%v.var_patt)] +// CHECK:STDOUT: %.loc7_24.3: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%struct_type.a.loc7_23.2) [symbolic = %.loc7_24.3 (constants.%.f92)] +// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.loc7: = lookup_impl_witness %struct_type.a.loc7_23.2, @DefaultOrUnformed [symbolic = %DefaultOrUnformed.lookup_impl_witness.loc7 (constants.%DefaultOrUnformed.lookup_impl_witness.a9a)] +// CHECK:STDOUT: %DefaultOrUnformed.facet.loc7_24.2: %DefaultOrUnformed.type = facet_value %struct_type.a.loc7_23.2, (%DefaultOrUnformed.lookup_impl_witness.loc7) [symbolic = %DefaultOrUnformed.facet.loc7_24.2 (constants.%DefaultOrUnformed.facet.16a)] +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.loc7: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.loc7_24.2) [symbolic = %DefaultOrUnformed.WithSelf.Op.type.loc7 (constants.%DefaultOrUnformed.WithSelf.Op.type.999)] +// CHECK:STDOUT: %.loc7_24.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.loc7, %DefaultOrUnformed.facet.loc7_24.2 [symbolic = %.loc7_24.4 (constants.%.4e9)] +// CHECK:STDOUT: %impl.elem0.loc7_24.2: @F.%.loc7_24.4 (%.4e9) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.loc7, element0 [symbolic = %impl.elem0.loc7_24.2 (constants.%impl.elem0.47c)] +// CHECK:STDOUT: %specific_impl_fn.loc7_24.2: = specific_impl_function %impl.elem0.loc7_24.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc7_24.2) [symbolic = %specific_impl_fn.loc7_24.2 (constants.%specific_impl_fn.e03)] +// CHECK:STDOUT: %Array.loc8_27.2: type = class_type @Array, @Array(%T.as_type.loc6_19.2, constants.%int_5) [symbolic = %Array.loc8_27.2 (constants.%Array.760)] +// CHECK:STDOUT: %require_complete.loc8: = require_complete_type %Array.loc8_27.2 [symbolic = %require_complete.loc8 (constants.%require_complete.b4f)] +// CHECK:STDOUT: %pattern_type.loc8: type = pattern_type %Array.loc8_27.2 [symbolic = %pattern_type.loc8 (constants.%pattern_type.1ed)] +// CHECK:STDOUT: %w.patt.loc8_15.2: @F.%pattern_type.loc8 (%pattern_type.1ed) = ref_binding_pattern w [symbolic = %w.patt.loc8_15.2 (constants.%w.patt)] +// CHECK:STDOUT: %w.var_patt.loc8_3.2: @F.%pattern_type.loc8 (%pattern_type.1ed) = var_pattern %w.patt.loc8_15.2 [symbolic = %w.var_patt.loc8_3.2 (constants.%w.var_patt)] +// CHECK:STDOUT: %.loc8_28.3: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%Array.loc8_27.2) [symbolic = %.loc8_28.3 (constants.%.c4e)] +// CHECK:STDOUT: %DefaultOrUnformed.lookup_impl_witness.loc8: = lookup_impl_witness %Array.loc8_27.2, @DefaultOrUnformed [symbolic = %DefaultOrUnformed.lookup_impl_witness.loc8 (constants.%DefaultOrUnformed.lookup_impl_witness.b34)] +// CHECK:STDOUT: %DefaultOrUnformed.facet.loc8_28.2: %DefaultOrUnformed.type = facet_value %Array.loc8_27.2, (%DefaultOrUnformed.lookup_impl_witness.loc8) [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.814)] +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.loc8: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.loc8_28.2) [symbolic = %DefaultOrUnformed.WithSelf.Op.type.loc8 (constants.%DefaultOrUnformed.WithSelf.Op.type.627)] +// CHECK:STDOUT: %.loc8_28.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.loc8, %DefaultOrUnformed.facet.loc8_28.2 [symbolic = %.loc8_28.4 (constants.%.543)] +// CHECK:STDOUT: %impl.elem0.loc8_28.2: @F.%.loc8_28.4 (%.543) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness.loc8, element0 [symbolic = %impl.elem0.loc8_28.2 (constants.%impl.elem0.be3)] +// CHECK:STDOUT: %specific_impl_fn.loc8_28.2: = specific_impl_function %impl.elem0.loc8_28.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc8_28.2) [symbolic = %specific_impl_fn.loc8_28.2 (constants.%specific_impl_fn.c3c)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.loc8: = lookup_impl_witness %Array.loc8_27.2, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness.loc8 (constants.%SubobjectDestroy.lookup_impl_witness.54a)] +// CHECK:STDOUT: %SubobjectDestroy.facet.loc8: %SubobjectDestroy.type = facet_value %Array.loc8_27.2, (%SubobjectDestroy.lookup_impl_witness.loc8) [symbolic = %SubobjectDestroy.facet.loc8 (constants.%SubobjectDestroy.facet.c4e)] +// CHECK:STDOUT: %.loc8_3.4: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.loc8) [symbolic = %.loc8_3.4 (constants.%.5f3)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.loc8: = lookup_impl_witness %Array.loc8_27.2, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness.loc8 (constants.%DestroyImpl.lookup_impl_witness.496)] +// CHECK:STDOUT: %Destroy.facet.loc8_3.3: %Destroy.type = facet_value %Array.loc8_27.2, (%DestroyImpl.lookup_impl_witness.loc8, %SubobjectDestroy.lookup_impl_witness.loc8) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.535)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.loc7: = lookup_impl_witness %struct_type.a.loc7_23.2, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness.loc7 (constants.%SubobjectDestroy.lookup_impl_witness.049)] +// CHECK:STDOUT: %SubobjectDestroy.facet.loc7: %SubobjectDestroy.type = facet_value %struct_type.a.loc7_23.2, (%SubobjectDestroy.lookup_impl_witness.loc7) [symbolic = %SubobjectDestroy.facet.loc7 (constants.%SubobjectDestroy.facet.4f8)] +// CHECK:STDOUT: %.loc7_3.3: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.loc7) [symbolic = %.loc7_3.3 (constants.%.1cf)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.loc7: = lookup_impl_witness %struct_type.a.loc7_23.2, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness.loc7 (constants.%DestroyImpl.lookup_impl_witness.070)] +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value %struct_type.a.loc7_23.2, (%DestroyImpl.lookup_impl_witness.loc7, %SubobjectDestroy.lookup_impl_witness.loc7) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.632)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.loc6: = lookup_impl_witness %tuple.type, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness.loc6 (constants.%SubobjectDestroy.lookup_impl_witness.b96)] +// CHECK:STDOUT: %SubobjectDestroy.facet.loc6: %SubobjectDestroy.type = facet_value %tuple.type, (%SubobjectDestroy.lookup_impl_witness.loc6) [symbolic = %SubobjectDestroy.facet.loc6 (constants.%SubobjectDestroy.facet.102)] +// CHECK:STDOUT: %.loc6_3.4: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.loc6) [symbolic = %.loc6_3.4 (constants.%.252)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.loc6: = lookup_impl_witness %tuple.type, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness.loc6 (constants.%DestroyImpl.lookup_impl_witness.c16)] +// CHECK:STDOUT: %Destroy.facet.loc6_3.3: %Destroy.type = facet_value %tuple.type, (%DestroyImpl.lookup_impl_witness.loc6, %SubobjectDestroy.lookup_impl_witness.loc6) [symbolic = %Destroy.facet.loc6_3.3 (constants.%Destroy.facet.095)] +// CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %u.var: ref @F.%tuple.type (%tuple.type.cd5) = var_storage %u.var_patt.loc6_3.1 -// CHECK:STDOUT: %DefaultOrUnformed.facet.loc6_30.1: %DefaultOrUnformed.type = facet_value constants.%tuple.type.cd5, (constants.%DefaultOrUnformed.lookup_impl_witness.2ab) [symbolic = %DefaultOrUnformed.facet.loc6_30.2 (constants.%DefaultOrUnformed.facet.c98)] -// CHECK:STDOUT: %.loc6_30.1: %DefaultOrUnformed.type = converted constants.%tuple.type.cd5, %DefaultOrUnformed.facet.loc6_30.1 [symbolic = %DefaultOrUnformed.facet.loc6_30.2 (constants.%DefaultOrUnformed.facet.c98)] -// CHECK:STDOUT: %as_type.loc6: type = facet_access_type %.loc6_30.1 [symbolic = %tuple.type (constants.%tuple.type.cd5)] -// CHECK:STDOUT: %.loc6_30.2: type = converted %.loc6_30.1, %as_type.loc6 [symbolic = %tuple.type (constants.%tuple.type.cd5)] -// CHECK:STDOUT: %impl.elem0.loc6_30.1: @F.%.loc6_30.4 (%.ae7) = impl_witness_access constants.%DefaultOrUnformed.lookup_impl_witness.2ab, element0 [symbolic = %impl.elem0.loc6_30.2 (constants.%impl.elem0.fec)] -// CHECK:STDOUT: %specific_impl_fn.loc6_30.1: = specific_impl_function %impl.elem0.loc6_30.1, @DefaultOrUnformed.WithSelf.Op(constants.%DefaultOrUnformed.facet.c98) [symbolic = %specific_impl_fn.loc6_30.2 (constants.%specific_impl_fn.619)] -// CHECK:STDOUT: %.loc6_3.1: ref @F.%tuple.type (%tuple.type.cd5) = splice_block %u.var {} -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call.loc6: init @F.%tuple.type (%tuple.type.cd5) to %.loc6_3.1 = call %specific_impl_fn.loc6_30.1() +// CHECK:STDOUT: %u.var: ref @F.%tuple.type (%tuple.type.0fd) = var_storage %u.var_patt.loc6_3.1 +// CHECK:STDOUT: %DefaultOrUnformed.facet.loc6_30.1: %DefaultOrUnformed.type = facet_value constants.%tuple.type.0fd, (constants.%DefaultOrUnformed.lookup_impl_witness.0b6) [symbolic = %DefaultOrUnformed.facet.loc6_30.2 (constants.%DefaultOrUnformed.facet.008)] +// CHECK:STDOUT: %.loc6_30.1: %DefaultOrUnformed.type = converted constants.%tuple.type.0fd, %DefaultOrUnformed.facet.loc6_30.1 [symbolic = %DefaultOrUnformed.facet.loc6_30.2 (constants.%DefaultOrUnformed.facet.008)] +// CHECK:STDOUT: %as_type.loc6: type = facet_access_type %.loc6_30.1 [symbolic = %tuple.type (constants.%tuple.type.0fd)] +// CHECK:STDOUT: %.loc6_30.2: type = converted %.loc6_30.1, %as_type.loc6 [symbolic = %tuple.type (constants.%tuple.type.0fd)] +// CHECK:STDOUT: %impl.elem0.loc6_30.1: @F.%.loc6_30.4 (%.060) = impl_witness_access constants.%DefaultOrUnformed.lookup_impl_witness.0b6, element0 [symbolic = %impl.elem0.loc6_30.2 (constants.%impl.elem0.a9e)] +// CHECK:STDOUT: %specific_impl_fn.loc6_30.1: = specific_impl_function %impl.elem0.loc6_30.1, @DefaultOrUnformed.WithSelf.Op(constants.%DefaultOrUnformed.facet.008) [symbolic = %specific_impl_fn.loc6_30.2 (constants.%specific_impl_fn.329)] +// CHECK:STDOUT: %.loc6_3.1: ref @F.%tuple.type (%tuple.type.0fd) = splice_block %u.var {} +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call.loc6: init @F.%tuple.type (%tuple.type.0fd) to %.loc6_3.1 = call %specific_impl_fn.loc6_30.1() // CHECK:STDOUT: assign %u.var, %DefaultOrUnformed.WithSelf.Op.call.loc6 -// CHECK:STDOUT: %.loc6_29.1: type = splice_block %.loc6_29.3 [symbolic = %tuple.type (constants.%tuple.type.cd5)] { -// CHECK:STDOUT: %T.ref.loc6_18: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.0e7)] -// CHECK:STDOUT: %T.as_type.loc6_19.1: type = facet_access_type %T.ref.loc6_18 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] -// CHECK:STDOUT: %.loc6_19: type = converted %T.ref.loc6_18, %T.as_type.loc6_19.1 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] -// CHECK:STDOUT: %ptr.loc6_19.1: type = ptr_type %.loc6_19 [symbolic = %ptr.loc6_19.2 (constants.%ptr.b37)] -// CHECK:STDOUT: %T.ref.loc6_28: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.0e7)] -// CHECK:STDOUT: %T.as_type.loc6_22: type = facet_access_type %T.ref.loc6_28 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] -// CHECK:STDOUT: %.loc6_22: type = converted %T.ref.loc6_28, %T.as_type.loc6_22 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] +// CHECK:STDOUT: %.loc6_29.1: type = splice_block %.loc6_29.3 [symbolic = %tuple.type (constants.%tuple.type.0fd)] { +// CHECK:STDOUT: %T.ref.loc6_18: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.f45)] +// CHECK:STDOUT: %T.as_type.loc6_19.1: type = facet_access_type %T.ref.loc6_18 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.190)] +// CHECK:STDOUT: %.loc6_19: type = converted %T.ref.loc6_18, %T.as_type.loc6_19.1 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.190)] +// CHECK:STDOUT: %ptr.loc6_19.1: type = ptr_type %.loc6_19 [symbolic = %ptr.loc6_19.2 (constants.%ptr.360)] +// CHECK:STDOUT: %T.ref.loc6_28: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.f45)] +// CHECK:STDOUT: %T.as_type.loc6_22: type = facet_access_type %T.ref.loc6_28 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.190)] +// CHECK:STDOUT: %.loc6_22: type = converted %T.ref.loc6_28, %T.as_type.loc6_22 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.190)] // CHECK:STDOUT: %const.loc6_22.1: type = const_type %.loc6_22 [symbolic = %const.loc6_22.2 (constants.%const)] // CHECK:STDOUT: %.loc6_29.2: %tuple.type.693 = tuple_literal (%ptr.loc6_19.1, %const.loc6_22.1) [symbolic = %tuple (constants.%tuple)] -// CHECK:STDOUT: %.loc6_29.3: type = converted %.loc6_29.2, constants.%tuple.type.cd5 [symbolic = %tuple.type (constants.%tuple.type.cd5)] +// CHECK:STDOUT: %.loc6_29.3: type = converted %.loc6_29.2, constants.%tuple.type.0fd [symbolic = %tuple.type (constants.%tuple.type.0fd)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: ref @F.%tuple.type (%tuple.type.cd5) = wrapper_binding u, %u.var +// CHECK:STDOUT: %u: ref @F.%tuple.type (%tuple.type.0fd) = wrapper_binding u, %u.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %u.patt.loc6_15.1: @F.%pattern_type.loc6 (%pattern_type.02b) = ref_binding_pattern u [symbolic = %u.patt.loc6_15.2 (constants.%u.patt)] -// CHECK:STDOUT: %u.var_patt.loc6_3.1: @F.%pattern_type.loc6 (%pattern_type.02b) = var_pattern %u.patt.loc6_15.1 [symbolic = %u.var_patt.loc6_3.2 (constants.%u.var_patt)] +// CHECK:STDOUT: %u.patt.loc6_15.1: @F.%pattern_type.loc6 (%pattern_type.5a8) = ref_binding_pattern u [symbolic = %u.patt.loc6_15.2 (constants.%u.patt)] +// CHECK:STDOUT: %u.var_patt.loc6_3.1: @F.%pattern_type.loc6 (%pattern_type.5a8) = var_pattern %u.patt.loc6_15.1 [symbolic = %u.var_patt.loc6_3.2 (constants.%u.var_patt)] // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref @F.%struct_type.a.loc7_23.2 (%struct_type.a) = var_storage %v.var_patt.loc7_3.1 -// CHECK:STDOUT: %DefaultOrUnformed.facet.loc7_24.1: %DefaultOrUnformed.type = facet_value constants.%struct_type.a, (constants.%DefaultOrUnformed.lookup_impl_witness.53f) [symbolic = %DefaultOrUnformed.facet.loc7_24.2 (constants.%DefaultOrUnformed.facet.103)] -// CHECK:STDOUT: %.loc7_24.1: %DefaultOrUnformed.type = converted constants.%struct_type.a, %DefaultOrUnformed.facet.loc7_24.1 [symbolic = %DefaultOrUnformed.facet.loc7_24.2 (constants.%DefaultOrUnformed.facet.103)] +// CHECK:STDOUT: %DefaultOrUnformed.facet.loc7_24.1: %DefaultOrUnformed.type = facet_value constants.%struct_type.a, (constants.%DefaultOrUnformed.lookup_impl_witness.a9a) [symbolic = %DefaultOrUnformed.facet.loc7_24.2 (constants.%DefaultOrUnformed.facet.16a)] +// CHECK:STDOUT: %.loc7_24.1: %DefaultOrUnformed.type = converted constants.%struct_type.a, %DefaultOrUnformed.facet.loc7_24.1 [symbolic = %DefaultOrUnformed.facet.loc7_24.2 (constants.%DefaultOrUnformed.facet.16a)] // CHECK:STDOUT: %as_type.loc7: type = facet_access_type %.loc7_24.1 [symbolic = %struct_type.a.loc7_23.2 (constants.%struct_type.a)] // CHECK:STDOUT: %.loc7_24.2: type = converted %.loc7_24.1, %as_type.loc7 [symbolic = %struct_type.a.loc7_23.2 (constants.%struct_type.a)] -// CHECK:STDOUT: %impl.elem0.loc7_24.1: @F.%.loc7_24.4 (%.9be) = impl_witness_access constants.%DefaultOrUnformed.lookup_impl_witness.53f, element0 [symbolic = %impl.elem0.loc7_24.2 (constants.%impl.elem0.873)] -// CHECK:STDOUT: %specific_impl_fn.loc7_24.1: = specific_impl_function %impl.elem0.loc7_24.1, @DefaultOrUnformed.WithSelf.Op(constants.%DefaultOrUnformed.facet.103) [symbolic = %specific_impl_fn.loc7_24.2 (constants.%specific_impl_fn.1d1)] +// CHECK:STDOUT: %impl.elem0.loc7_24.1: @F.%.loc7_24.4 (%.4e9) = impl_witness_access constants.%DefaultOrUnformed.lookup_impl_witness.a9a, element0 [symbolic = %impl.elem0.loc7_24.2 (constants.%impl.elem0.47c)] +// CHECK:STDOUT: %specific_impl_fn.loc7_24.1: = specific_impl_function %impl.elem0.loc7_24.1, @DefaultOrUnformed.WithSelf.Op(constants.%DefaultOrUnformed.facet.16a) [symbolic = %specific_impl_fn.loc7_24.2 (constants.%specific_impl_fn.e03)] // CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call.loc7: init @F.%struct_type.a.loc7_23.2 (%struct_type.a) = call %specific_impl_fn.loc7_24.1() // CHECK:STDOUT: assign %v.var, %DefaultOrUnformed.WithSelf.Op.call.loc7 // CHECK:STDOUT: %.loc7_23: type = splice_block %struct_type.a.loc7_23.1 [symbolic = %struct_type.a.loc7_23.2 (constants.%struct_type.a)] { -// CHECK:STDOUT: %T.ref.loc7: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.0e7)] -// CHECK:STDOUT: %T.as_type.loc7: type = facet_access_type %T.ref.loc7 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] -// CHECK:STDOUT: %.loc7_22: type = converted %T.ref.loc7, %T.as_type.loc7 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] -// CHECK:STDOUT: %struct_type.a.loc7_23.1: type = struct_type {.a: @F.%T.as_type.loc6_19.2 (%T.as_type.700)} [symbolic = %struct_type.a.loc7_23.2 (constants.%struct_type.a)] +// CHECK:STDOUT: %T.ref.loc7: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.f45)] +// CHECK:STDOUT: %T.as_type.loc7: type = facet_access_type %T.ref.loc7 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.190)] +// CHECK:STDOUT: %.loc7_22: type = converted %T.ref.loc7, %T.as_type.loc7 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.190)] +// CHECK:STDOUT: %struct_type.a.loc7_23.1: type = struct_type {.a: @F.%T.as_type.loc6_19.2 (%T.as_type.190)} [symbolic = %struct_type.a.loc7_23.2 (constants.%struct_type.a)] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref @F.%struct_type.a.loc7_23.2 (%struct_type.a) = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %v.patt.loc7_15.1: @F.%pattern_type.loc7 (%pattern_type.915) = ref_binding_pattern v [symbolic = %v.patt.loc7_15.2 (constants.%v.patt)] -// CHECK:STDOUT: %v.var_patt.loc7_3.1: @F.%pattern_type.loc7 (%pattern_type.915) = var_pattern %v.patt.loc7_15.1 [symbolic = %v.var_patt.loc7_3.2 (constants.%v.var_patt)] +// CHECK:STDOUT: %v.patt.loc7_15.1: @F.%pattern_type.loc7 (%pattern_type.beb) = ref_binding_pattern v [symbolic = %v.patt.loc7_15.2 (constants.%v.patt)] +// CHECK:STDOUT: %v.var_patt.loc7_3.1: @F.%pattern_type.loc7 (%pattern_type.beb) = var_pattern %v.patt.loc7_15.1 [symbolic = %v.var_patt.loc7_3.2 (constants.%v.var_patt)] // CHECK:STDOUT: } -// CHECK:STDOUT: %w.var: ref @F.%Array.loc8_27.2 (%Array.e06) = var_storage %w.var_patt.loc8_3.1 -// CHECK:STDOUT: %DefaultOrUnformed.facet.loc8_28.1: %DefaultOrUnformed.type = facet_value constants.%Array.e06, (constants.%DefaultOrUnformed.lookup_impl_witness.f03) [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.61d)] -// CHECK:STDOUT: %.loc8_28.1: %DefaultOrUnformed.type = converted constants.%Array.e06, %DefaultOrUnformed.facet.loc8_28.1 [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.61d)] -// CHECK:STDOUT: %as_type.loc8: type = facet_access_type %.loc8_28.1 [symbolic = %Array.loc8_27.2 (constants.%Array.e06)] -// CHECK:STDOUT: %.loc8_28.2: type = converted %.loc8_28.1, %as_type.loc8 [symbolic = %Array.loc8_27.2 (constants.%Array.e06)] -// CHECK:STDOUT: %impl.elem0.loc8_28.1: @F.%.loc8_28.4 (%.b93) = impl_witness_access constants.%DefaultOrUnformed.lookup_impl_witness.f03, element0 [symbolic = %impl.elem0.loc8_28.2 (constants.%impl.elem0.1c3)] -// CHECK:STDOUT: %specific_impl_fn.loc8_28.1: = specific_impl_function %impl.elem0.loc8_28.1, @DefaultOrUnformed.WithSelf.Op(constants.%DefaultOrUnformed.facet.61d) [symbolic = %specific_impl_fn.loc8_28.2 (constants.%specific_impl_fn.aef)] -// CHECK:STDOUT: %.loc8_3.1: ref @F.%Array.loc8_27.2 (%Array.e06) = splice_block %w.var {} -// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call.loc8: init @F.%Array.loc8_27.2 (%Array.e06) to %.loc8_3.1 = call %specific_impl_fn.loc8_28.1() +// CHECK:STDOUT: %w.var: ref @F.%Array.loc8_27.2 (%Array.760) = var_storage %w.var_patt.loc8_3.1 +// CHECK:STDOUT: %DefaultOrUnformed.facet.loc8_28.1: %DefaultOrUnformed.type = facet_value constants.%Array.760, (constants.%DefaultOrUnformed.lookup_impl_witness.b34) [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.814)] +// CHECK:STDOUT: %.loc8_28.1: %DefaultOrUnformed.type = converted constants.%Array.760, %DefaultOrUnformed.facet.loc8_28.1 [symbolic = %DefaultOrUnformed.facet.loc8_28.2 (constants.%DefaultOrUnformed.facet.814)] +// CHECK:STDOUT: %as_type.loc8: type = facet_access_type %.loc8_28.1 [symbolic = %Array.loc8_27.2 (constants.%Array.760)] +// CHECK:STDOUT: %.loc8_28.2: type = converted %.loc8_28.1, %as_type.loc8 [symbolic = %Array.loc8_27.2 (constants.%Array.760)] +// CHECK:STDOUT: %impl.elem0.loc8_28.1: @F.%.loc8_28.4 (%.543) = impl_witness_access constants.%DefaultOrUnformed.lookup_impl_witness.b34, element0 [symbolic = %impl.elem0.loc8_28.2 (constants.%impl.elem0.be3)] +// CHECK:STDOUT: %specific_impl_fn.loc8_28.1: = specific_impl_function %impl.elem0.loc8_28.1, @DefaultOrUnformed.WithSelf.Op(constants.%DefaultOrUnformed.facet.814) [symbolic = %specific_impl_fn.loc8_28.2 (constants.%specific_impl_fn.c3c)] +// CHECK:STDOUT: %.loc8_3.1: ref @F.%Array.loc8_27.2 (%Array.760) = splice_block %w.var {} +// CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.call.loc8: init @F.%Array.loc8_27.2 (%Array.760) to %.loc8_3.1 = call %specific_impl_fn.loc8_28.1() // CHECK:STDOUT: assign %w.var, %DefaultOrUnformed.WithSelf.Op.call.loc8 -// CHECK:STDOUT: %.loc8_27: type = splice_block %Array.loc8_27.1 [symbolic = %Array.loc8_27.2 (constants.%Array.e06)] { -// CHECK:STDOUT: %T.ref.loc8: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.0e7)] +// CHECK:STDOUT: %.loc8_27: type = splice_block %Array.loc8_27.1 [symbolic = %Array.loc8_27.2 (constants.%Array.760)] { +// CHECK:STDOUT: %T.ref.loc8: %Destroy.type = name_ref T, %T.loc4_15.2 [symbolic = %T.loc4_15.1 (constants.%T.f45)] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] -// CHECK:STDOUT: %T.as_type.loc8: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] -// CHECK:STDOUT: %.loc8_23: type = converted %T.ref.loc8, %T.as_type.loc8 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.700)] -// CHECK:STDOUT: %Array.loc8_27.1: type = class_type @Array, @Array(constants.%T.as_type.700, constants.%int_5) [symbolic = %Array.loc8_27.2 (constants.%Array.e06)] +// CHECK:STDOUT: %T.as_type.loc8: type = facet_access_type %T.ref.loc8 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.190)] +// CHECK:STDOUT: %.loc8_23: type = converted %T.ref.loc8, %T.as_type.loc8 [symbolic = %T.as_type.loc6_19.2 (constants.%T.as_type.190)] +// CHECK:STDOUT: %Array.loc8_27.1: type = class_type @Array, @Array(constants.%T.as_type.190, constants.%int_5) [symbolic = %Array.loc8_27.2 (constants.%Array.760)] // CHECK:STDOUT: } -// CHECK:STDOUT: %w: ref @F.%Array.loc8_27.2 (%Array.e06) = wrapper_binding w, %w.var +// CHECK:STDOUT: %w: ref @F.%Array.loc8_27.2 (%Array.760) = wrapper_binding w, %w.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %w.patt.loc8_15.1: @F.%pattern_type.loc8 (%pattern_type.38c) = ref_binding_pattern w [symbolic = %w.patt.loc8_15.2 (constants.%w.patt)] -// CHECK:STDOUT: %w.var_patt.loc8_3.1: @F.%pattern_type.loc8 (%pattern_type.38c) = var_pattern %w.patt.loc8_15.1 [symbolic = %w.var_patt.loc8_3.2 (constants.%w.var_patt)] +// CHECK:STDOUT: %w.patt.loc8_15.1: @F.%pattern_type.loc8 (%pattern_type.1ed) = ref_binding_pattern w [symbolic = %w.patt.loc8_15.2 (constants.%w.patt)] +// CHECK:STDOUT: %w.var_patt.loc8_3.1: @F.%pattern_type.loc8 (%pattern_type.1ed) = var_pattern %w.patt.loc8_15.1 [symbolic = %w.var_patt.loc8_3.2 (constants.%w.var_patt)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem2.loc8_3.1: @F.%.loc8_3.4 (%.44d) = impl_witness_access constants.%Destroy.lookup_impl_witness.fc7, element2 [symbolic = %impl.elem2.loc8_3.2 (constants.%impl.elem2.f1a)] -// CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %w.var, %impl.elem2.loc8_3.1 -// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Array.e06, (constants.%Destroy.lookup_impl_witness.fc7) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.aae)] -// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Array.e06, %Destroy.facet.loc8_3.1 [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.aae)] -// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Array.e06, (constants.%Destroy.lookup_impl_witness.fc7) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.aae)] -// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Array.e06, %Destroy.facet.loc8_3.2 [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.aae)] -// CHECK:STDOUT: %specific_impl_fn.loc8_3.1: = specific_impl_function %impl.elem2.loc8_3.1, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet.aae) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.5b6)] -// CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %w.var, %specific_impl_fn.loc8_3.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%w.var) -// CHECK:STDOUT: %impl.elem2.loc7_3.1: @F.%.loc7_3.3 (%.8a1) = impl_witness_access constants.%Destroy.lookup_impl_witness.7f9, element2 [symbolic = %impl.elem2.loc7_3.2 (constants.%impl.elem2.86f)] -// CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem2.loc7_3.1 -// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%struct_type.a, (constants.%Destroy.lookup_impl_witness.7f9) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.aa3)] -// CHECK:STDOUT: %.loc7_3.1: %Destroy.type = converted constants.%struct_type.a, %Destroy.facet.loc7_3.1 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.aa3)] -// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%struct_type.a, (constants.%Destroy.lookup_impl_witness.7f9) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.aa3)] -// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%struct_type.a, %Destroy.facet.loc7_3.2 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.aa3)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem2.loc7_3.1, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet.aa3) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.86e)] -// CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_impl_fn.loc7_3.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %bound_method.loc7_3.2(%v.var) -// CHECK:STDOUT: %impl.elem2.loc6_3.1: @F.%.loc6_3.4 (%.b75) = impl_witness_access constants.%Destroy.lookup_impl_witness.d26, element2 [symbolic = %impl.elem2.loc6_3.2 (constants.%impl.elem2.dad)] -// CHECK:STDOUT: %bound_method.loc6_3.1: = bound_method %u.var, %impl.elem2.loc6_3.1 -// CHECK:STDOUT: %Destroy.facet.loc6_3.1: %Destroy.type = facet_value constants.%tuple.type.cd5, (constants.%Destroy.lookup_impl_witness.d26) [symbolic = %Destroy.facet.loc6_3.3 (constants.%Destroy.facet.7ba)] -// CHECK:STDOUT: %.loc6_3.2: %Destroy.type = converted constants.%tuple.type.cd5, %Destroy.facet.loc6_3.1 [symbolic = %Destroy.facet.loc6_3.3 (constants.%Destroy.facet.7ba)] -// CHECK:STDOUT: %Destroy.facet.loc6_3.2: %Destroy.type = facet_value constants.%tuple.type.cd5, (constants.%Destroy.lookup_impl_witness.d26) [symbolic = %Destroy.facet.loc6_3.3 (constants.%Destroy.facet.7ba)] -// CHECK:STDOUT: %.loc6_3.3: %Destroy.type = converted constants.%tuple.type.cd5, %Destroy.facet.loc6_3.2 [symbolic = %Destroy.facet.loc6_3.3 (constants.%Destroy.facet.7ba)] -// CHECK:STDOUT: %specific_impl_fn.loc6_3.1: = specific_impl_function %impl.elem2.loc6_3.1, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet.7ba) [symbolic = %specific_impl_fn.loc6_3.2 (constants.%specific_impl_fn.d5b)] -// CHECK:STDOUT: %bound_method.loc6_3.2: = bound_method %u.var, %specific_impl_fn.loc6_3.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6: init %empty_tuple.type = call %bound_method.loc6_3.2(%u.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Array.760, (constants.%DestroyImpl.lookup_impl_witness.496, constants.%SubobjectDestroy.lookup_impl_witness.54a) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.535)] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Array.760, %Destroy.facet.loc8_3.1 [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.535)] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Array.760, (constants.%DestroyImpl.lookup_impl_witness.496, constants.%SubobjectDestroy.lookup_impl_witness.54a) [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.535)] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Array.760, %Destroy.facet.loc8_3.2 [symbolic = %Destroy.facet.loc8_3.3 (constants.%Destroy.facet.535)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%w.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%struct_type.a, (constants.%DestroyImpl.lookup_impl_witness.070, constants.%SubobjectDestroy.lookup_impl_witness.049) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.632)] +// CHECK:STDOUT: %.loc7_3.1: %Destroy.type = converted constants.%struct_type.a, %Destroy.facet.loc7_3.1 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.632)] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%struct_type.a, (constants.%DestroyImpl.lookup_impl_witness.070, constants.%SubobjectDestroy.lookup_impl_witness.049) [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.632)] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%struct_type.a, %Destroy.facet.loc7_3.2 [symbolic = %Destroy.facet.loc7_3.3 (constants.%Destroy.facet.632)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc6_3.1: %Destroy.type = facet_value constants.%tuple.type.0fd, (constants.%DestroyImpl.lookup_impl_witness.c16, constants.%SubobjectDestroy.lookup_impl_witness.b96) [symbolic = %Destroy.facet.loc6_3.3 (constants.%Destroy.facet.095)] +// CHECK:STDOUT: %.loc6_3.2: %Destroy.type = converted constants.%tuple.type.0fd, %Destroy.facet.loc6_3.1 [symbolic = %Destroy.facet.loc6_3.3 (constants.%Destroy.facet.095)] +// CHECK:STDOUT: %Destroy.facet.loc6_3.2: %Destroy.type = facet_value constants.%tuple.type.0fd, (constants.%DestroyImpl.lookup_impl_witness.c16, constants.%SubobjectDestroy.lookup_impl_witness.b96) [symbolic = %Destroy.facet.loc6_3.3 (constants.%Destroy.facet.095)] +// CHECK:STDOUT: %.loc6_3.3: %Destroy.type = converted constants.%tuple.type.0fd, %Destroy.facet.loc6_3.2 [symbolic = %Destroy.facet.loc6_3.3 (constants.%Destroy.facet.095)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%u.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -790,12 +778,12 @@ fn G(generic N: i32) { // CHECK:STDOUT: %.loc14_30.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type, %DefaultOrUnformed.facet.loc14_30.2 [symbolic = %.loc14_30.4 (constants.%.431)] // CHECK:STDOUT: %impl.elem0.loc14_30.2: @G.%.loc14_30.4 (%.431) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_30.2 (constants.%impl.elem0.b7f)] // CHECK:STDOUT: %specific_impl_fn.loc14_30.2: = specific_impl_function %impl.elem0.loc14_30.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc14_30.2) [symbolic = %specific_impl_fn.loc14_30.2 (constants.%specific_impl_fn.971)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Array.loc14_29.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.27d)] -// CHECK:STDOUT: %Destroy.facet.loc14_3.3: %Destroy.type = facet_value %Array.loc14_29.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.ca8)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc14_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.4da)] -// CHECK:STDOUT: %.loc14_3.4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc14_3.3 [symbolic = %.loc14_3.4 (constants.%.48f)] -// CHECK:STDOUT: %impl.elem2.loc14_3.2: @G.%.loc14_3.4 (%.48f) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc14_3.2 (constants.%impl.elem2.af7)] -// CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem2.loc14_3.2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.loc14_3.3) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.a3f)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %Array.loc14_29.2, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.a96)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %Array.loc14_29.2, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.700)] +// CHECK:STDOUT: %.loc14_3.4: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc14_3.4 (constants.%.2d8)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %Array.loc14_29.2, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.6da)] +// CHECK:STDOUT: %Destroy.facet.loc14_3.3: %Destroy.type = facet_value %Array.loc14_29.2, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.362)] +// CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -826,22 +814,19 @@ fn G(generic N: i32) { // CHECK:STDOUT: %k.patt.loc14_15.1: @G.%pattern_type (%pattern_type.fc0) = ref_binding_pattern k [symbolic = %k.patt.loc14_15.2 (constants.%k.patt)] // CHECK:STDOUT: %k.var_patt.loc14_3.1: @G.%pattern_type (%pattern_type.fc0) = var_pattern %k.patt.loc14_15.1 [symbolic = %k.var_patt.loc14_3.2 (constants.%k.var_patt)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem2.loc14_3.1: @G.%.loc14_3.4 (%.48f) = impl_witness_access constants.%Destroy.lookup_impl_witness.27d, element2 [symbolic = %impl.elem2.loc14_3.2 (constants.%impl.elem2.af7)] -// CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %k.var, %impl.elem2.loc14_3.1 -// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%Array.e80, (constants.%Destroy.lookup_impl_witness.27d) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.ca8)] -// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%Array.e80, %Destroy.facet.loc14_3.1 [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.ca8)] -// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%Array.e80, (constants.%Destroy.lookup_impl_witness.27d) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.ca8)] -// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%Array.e80, %Destroy.facet.loc14_3.2 [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.ca8)] -// CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem2.loc14_3.1, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet.ca8) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.a3f)] -// CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %k.var, %specific_impl_fn.loc14_3.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc14_3.2(%k.var) +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%Array.e80, (constants.%DestroyImpl.lookup_impl_witness.6da, constants.%SubobjectDestroy.lookup_impl_witness.a96) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.362)] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%Array.e80, %Destroy.facet.loc14_3.1 [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.362)] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%Array.e80, (constants.%DestroyImpl.lookup_impl_witness.6da, constants.%SubobjectDestroy.lookup_impl_witness.a96) [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.362)] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%Array.e80, %Destroy.facet.loc14_3.2 [symbolic = %Destroy.facet.loc14_3.3 (constants.%Destroy.facet.362)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%k.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T.0e7) { -// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt.351 -// CHECK:STDOUT: %T.loc4_15.1 => constants.%T.0e7 +// CHECK:STDOUT: specific @F(constants.%T.f45) { +// CHECK:STDOUT: %T.patt.loc4_15.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc4_15.1 => constants.%T.f45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%N.c34) { diff --git a/toolchain/check/testdata/eval/call.carbon b/toolchain/check/testdata/eval/call.carbon index 3bcfadcdb5c4..bc77d80ef250 100644 --- a/toolchain/check/testdata/eval/call.carbon +++ b/toolchain/check/testdata/eval/call.carbon @@ -176,16 +176,12 @@ fn H() { // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %tuple.type.f7a: type = tuple_type () [concrete] // CHECK:STDOUT: %.9e9: %F.call = splice_inst @UseFGenerically.%tuple.elem0 [template] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.869: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self.0e7) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.c97: %Destroy.WithSelf.SelfDestruct.type.869 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.df0 [concrete] -// CHECK:STDOUT: %.8cb: type = type_of_inst @UseFGenerically.%.loc11_3.8 [template] -// CHECK:STDOUT: %.c23: %.8cb = splice_inst @UseFGenerically.%.loc11_3.8 [template] -// CHECK:STDOUT: %.57c: type = type_of_inst @UseFGenerically.%.loc11_3.11 [template] -// CHECK:STDOUT: %.e63: %.57c = splice_inst @UseFGenerically.%.loc11_3.11 [template] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %.3ea: type = type_of_inst @UseFGenerically.%.loc11_3.6 [template] +// CHECK:STDOUT: %.4ec: %.3ea = splice_inst @UseFGenerically.%.loc11_3.6 [template] // CHECK:STDOUT: %int_3.9f3: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] // CHECK:STDOUT: %v.patt.5c6: %pattern_type.98b = ref_binding_pattern v [concrete] @@ -198,70 +194,31 @@ fn H() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %tuple.242: %tuple.type.f7a = tuple_value (%inst.splice_block.426619.1) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.2: = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01daf.2, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.601: %Destroy.type = facet_value %C, (%custom_witness.f8f19d.2) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.791: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.601) [concrete] -// CHECK:STDOUT: %.d0c: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.791, %Destroy.facet.601 [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2c56.1: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.2: = inst_value [concrete] { -// CHECK:STDOUT: %.f33: = splice_block %bound_method.655 { +// CHECK:STDOUT: %.353: init %empty_tuple.type = splice_block %SelfDestruct.call { // CHECK:STDOUT: %.ddc4c9.1: ref %C = specific_inst @UseFGenerically.%v.var, @UseFGenerically(%int_3.9f3) -// CHECK:STDOUT: %impl.elem2: %.d0c = impl_witness_access %custom_witness.f8f19d.2, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.2] -// CHECK:STDOUT: %bound_method.655: = bound_method %.ddc4c9.1, %impl.elem2 +// CHECK:STDOUT: %Destroy.facet.eb2c56.2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete = %Destroy.facet.eb2c56.1] +// CHECK:STDOUT: %.227372.1: %Destroy.type = converted %C, %Destroy.facet.eb2c56.2 [concrete = %Destroy.facet.eb2c56.1] +// CHECK:STDOUT: %Destroy.facet.eb2c56.3: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete = %Destroy.facet.eb2c56.1] +// CHECK:STDOUT: %.227372.2: %Destroy.type = converted %C, %Destroy.facet.eb2c56.3 [concrete = %Destroy.facet.eb2c56.1] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.8ca4ee.2(%.ddc4c9.1) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %.f33(%.ddc4c9.1) -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.df0: @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct.type (%Destroy.WithSelf.SelfDestruct.type.869) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct (constants.%Destroy.WithSelf.SelfDestruct.c97)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -286,21 +243,18 @@ fn H() { // CHECK:STDOUT: %pattern_type: type = pattern_type %F.call.loc11_20.2 [template = %pattern_type (constants.%pattern_type.c72)] // CHECK:STDOUT: %v.patt.loc11_15.2: @UseFGenerically.%pattern_type (%pattern_type.c72) = ref_binding_pattern v [template = %v.patt.loc11_15.2 (constants.%v.patt.6d8)] // CHECK:STDOUT: %v.var_patt.loc11_3.2: @UseFGenerically.%pattern_type (%pattern_type.c72) = var_pattern %v.patt.loc11_15.2 [template = %v.var_patt.loc11_3.2 (constants.%v.var_patt.e1f)] -// CHECK:STDOUT: %.loc11_3.6: %tuple.type.f7a = initialize_action %.loc11_25, %F.call.loc11_20.2, %v.var, none, false [template] -// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc11_3.6, element0 [template] -// CHECK:STDOUT: %.loc11_3.7: @UseFGenerically.%F.call.loc11_20.2 (%F.call) = splice_inst %tuple.elem0 [template = %.loc11_3.7 (constants.%.9e9)] -// CHECK:STDOUT: %.loc11_3.8: = compound_member_access_action %v.var, constants.%assoc2 [template] -// CHECK:STDOUT: %.loc11_3.9: type = type_of_inst %.loc11_3.8 [template = %.loc11_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc11_3.10: @UseFGenerically.%.loc11_3.9 (%.8cb) = splice_inst %.loc11_3.8 [template = %.loc11_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc11_3.11: = call_action (%.loc11_3.3), true [template] -// CHECK:STDOUT: %.loc11_3.12: type = type_of_inst %.loc11_3.11 [template = %.loc11_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc11_3.13: @UseFGenerically.%.loc11_3.12 (%.57c) = splice_inst %.loc11_3.11 [template = %.loc11_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc11_3.4: %tuple.type.f7a = initialize_action %.loc11_25, %F.call.loc11_20.2, %v.var, none, false [template] +// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc11_3.4, element0 [template] +// CHECK:STDOUT: %.loc11_3.5: @UseFGenerically.%F.call.loc11_20.2 (%F.call) = splice_inst %tuple.elem0 [template = %.loc11_3.5 (constants.%.9e9)] +// CHECK:STDOUT: %.loc11_3.6: = call_action (constants.%SelfDestruct, %v.var), true [template] +// CHECK:STDOUT: %.loc11_3.7: type = type_of_inst %.loc11_3.6 [template = %.loc11_3.7 (constants.%.3ea)] +// CHECK:STDOUT: %.loc11_3.8: @UseFGenerically.%.loc11_3.7 (%.3ea) = splice_inst %.loc11_3.6 [template = %.loc11_3.8 (constants.%.4ec)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.var: ref @UseFGenerically.%F.call.loc11_20.2 (%F.call) = var_storage %v.var_patt.loc11_3.1 // CHECK:STDOUT: %.loc11_25: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc11_3.1: @UseFGenerically.%F.call.loc11_20.2 (%F.call) = splice_inst %tuple.elem0 [template = %.loc11_3.7 (constants.%.9e9)] +// CHECK:STDOUT: %.loc11_3.1: @UseFGenerically.%F.call.loc11_20.2 (%F.call) = splice_inst %tuple.elem0 [template = %.loc11_3.5 (constants.%.9e9)] // CHECK:STDOUT: assign %v.var, %.loc11_3.1 // CHECK:STDOUT: %.loc11_20.1: type = splice_block %.loc11_20.3 [template = %F.call.loc11_20.2 (constants.%F.call)] { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] @@ -314,35 +268,15 @@ fn H() { // CHECK:STDOUT: %v.patt.loc11_15.1: @UseFGenerically.%pattern_type (%pattern_type.c72) = ref_binding_pattern v [template = %v.patt.loc11_15.2 (constants.%v.patt.6d8)] // CHECK:STDOUT: %v.var_patt.loc11_3.1: @UseFGenerically.%pattern_type (%pattern_type.c72) = var_pattern %v.patt.loc11_15.1 [template = %v.var_patt.loc11_3.2 (constants.%v.var_patt.e1f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_3.2: type = type_of_inst %.loc11_3.8 [template = %.loc11_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc11_3.3: @UseFGenerically.%.loc11_3.9 (%.8cb) = splice_inst %.loc11_3.8 [template = %.loc11_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc11_3.4: type = type_of_inst %.loc11_3.11 [template = %.loc11_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc11_3.5: @UseFGenerically.%.loc11_3.12 (%.57c) = splice_inst %.loc11_3.11 [template = %.loc11_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc11_3.2: type = type_of_inst %.loc11_3.6 [template = %.loc11_3.7 (constants.%.3ea)] +// CHECK:STDOUT: %.loc11_3.3: @UseFGenerically.%.loc11_3.7 (%.3ea) = splice_inst %.loc11_3.6 [template = %.loc11_3.8 (constants.%.4ec)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @UseFGenerically(constants.%X) { // CHECK:STDOUT: %X.patt.loc10_29.2 => constants.%X.patt @@ -359,15 +293,12 @@ fn H() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b // CHECK:STDOUT: %v.patt.loc11_15.2 => constants.%v.patt.5c6 // CHECK:STDOUT: %v.var_patt.loc11_3.2 => constants.%v.var_patt.a6f -// CHECK:STDOUT: %.loc11_3.6 => constants.%tuple.242 +// CHECK:STDOUT: %.loc11_3.4 => constants.%tuple.242 // CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.1 -// CHECK:STDOUT: %.loc11_3.7 => constants.%C.val -// CHECK:STDOUT: %.loc11_3.8 => constants.%inst.splice_block.426619.2 -// CHECK:STDOUT: %.loc11_3.9 => -// CHECK:STDOUT: %.loc11_3.10 => -// CHECK:STDOUT: %.loc11_3.11 => constants.%inst.call -// CHECK:STDOUT: %.loc11_3.12 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc11_3.13 => +// CHECK:STDOUT: %.loc11_3.5 => constants.%C.val +// CHECK:STDOUT: %.loc11_3.6 => constants.%inst.splice_block.426619.2 +// CHECK:STDOUT: %.loc11_3.7 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc11_3.8 => // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- return_in_place_discarded.carbon @@ -378,66 +309,38 @@ fn H() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %tuple.type.abc: type = tuple_type (%i32, %i32, %i32) [concrete] -// CHECK:STDOUT: %pattern_type.c97: type = pattern_type %tuple.type.abc [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_2.2e0: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %int_3.9f3: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %tuple.80e: %tuple.type.abc = tuple_value (%int_1.68a, %int_2.2e0, %int_3.9f3) [concrete] // CHECK:STDOUT: %.a35: ref %tuple.type.abc = temporary invalid, %tuple.80e [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a2d: %pattern_type.c97 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eb0: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt.a2d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_5.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_5.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.a35, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.2e8: %SubobjectDestroy.type = facet_value %tuple.type.abc, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.62e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.2e8) [concrete] +// CHECK:STDOUT: %Destroy.facet.c1b: %Destroy.type = facet_value %tuple.type.abc, (%DestroyImpl.impl_witness.62e, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_5.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_5.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_5.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c97 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.abc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.abc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_5.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c97 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.abc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.abc = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -446,44 +349,43 @@ fn H() { // CHECK:STDOUT: %.loc8_5.1: ref %tuple.type.abc = temporary_storage // CHECK:STDOUT: %F.call: init %tuple.type.abc to %.loc8_5.1 = call %F.ref() [concrete = constants.%tuple.80e] // CHECK:STDOUT: %.loc8_5.2: ref %tuple.type.abc = temporary %.loc8_5.1, %F.call [concrete = constants.%.a35] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.a35) +// CHECK:STDOUT: %Destroy.facet.loc8_5.1: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc8_5.3: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc8_5.1 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %Destroy.facet.loc8_5.2: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc8_5.4: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc8_5.2 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_5.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_5.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_5.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_5.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_5.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_5.2(%self.param: ref %tuple.type.abc) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_5.2(%self.param: ref %tuple.type.abc) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_5.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_5.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_5.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc8_5.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_5.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_5.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc8_5.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_5.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_5.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_5.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_5.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_5.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_5.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc8_5.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_5.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_5.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc8_5.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_5.4: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_5.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_5.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_5.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_5.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_5.3(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_5.2(%self.param: ref %tuple.type.abc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_5.2(%self.param: ref %tuple.type.abc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc8_5.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_5.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_5.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc8_5.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_5.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_5.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_5.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -502,69 +404,43 @@ fn H() { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %int_2.2e0: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %int_3.9f3: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %tuple.80e: %tuple.type.abc = tuple_value (%int_1.68a, %int_2.2e0, %int_3.9f3) [concrete] // CHECK:STDOUT: %a.patt: %pattern_type.c97 = ref_binding_pattern a [concrete] // CHECK:STDOUT: %a.var_patt: %pattern_type.c97 = var_pattern %a.patt [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a2d: %pattern_type.c97 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eb0: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt.a2d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.2e8: %SubobjectDestroy.type = facet_value %tuple.type.abc, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.62e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.2e8) [concrete] +// CHECK:STDOUT: %Destroy.facet.c1b: %Destroy.type = facet_value %tuple.type.abc, (%DestroyImpl.impl_witness.62e, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c97 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.abc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.abc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c97 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.abc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.abc = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.var: ref %tuple.type.abc = var_storage %a.var_patt // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %.loc8_3: ref %tuple.type.abc = splice_block %a.var {} -// CHECK:STDOUT: %F.call: init %tuple.type.abc to %.loc8_3 = call %F.ref() [concrete = constants.%tuple.80e] +// CHECK:STDOUT: %.loc8_3.1: ref %tuple.type.abc = splice_block %a.var {} +// CHECK:STDOUT: %F.call: init %tuple.type.abc to %.loc8_3.1 = call %F.ref() [concrete = constants.%tuple.80e] // CHECK:STDOUT: assign %a.var, %F.call // CHECK:STDOUT: %.loc8_31.1: type = splice_block %.loc8_31.3 [concrete = constants.%tuple.type.abc] { // CHECK:STDOUT: %i32.loc8_18: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -578,45 +454,43 @@ fn H() { // CHECK:STDOUT: %a.patt: %pattern_type.c97 = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.c97 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %tuple.type.abc) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %tuple.type.abc) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_3.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_3.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_3.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_3.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc8_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc8_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.4: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_3.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_3.3(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %tuple.type.abc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %tuple.type.abc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc8_3.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc8_3.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -652,7 +526,6 @@ fn H() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3bd: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] @@ -663,63 +536,33 @@ fn H() { // CHECK:STDOUT: %bound_method.fb0: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.9f3: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %tuple.80e: %tuple.type.abc = tuple_value (%int_1.68a, %int_2.2e0, %int_3.9f3) [concrete] -// CHECK:STDOUT: %.a35: ref %tuple.type.abc = temporary invalid, %tuple.80e [concrete] // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.ad8: %tuple.type.f94 = tuple_value (%int_1.5b8, %int_2.ecc) [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_32.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc15_32.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15_32.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a2d: %pattern_type.c97 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eb0: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt.a2d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15_32.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_32.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15_32.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc15_32.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15_32.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.a35, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.2e8: %SubobjectDestroy.type = facet_value %tuple.type.abc, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.62e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.2e8) [concrete] +// CHECK:STDOUT: %Destroy.facet.c1b: %Destroy.type = facet_value %tuple.type.abc, (%DestroyImpl.impl_witness.62e, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_32.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc15_32.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15_32.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c97 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.abc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.abc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc15_32.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c97 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.abc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.abc = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -786,44 +629,43 @@ fn H() { // CHECK:STDOUT: %a.patt: = ref_binding_pattern a [concrete = ] // CHECK:STDOUT: %a.var_patt: = var_pattern %a.patt [concrete = ] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.a35) +// CHECK:STDOUT: %Destroy.facet.loc15_32.1: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc15_32.1: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc15_32.1 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %Destroy.facet.loc15_32.2: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc15_32.2: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc15_32.2 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_32.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_32.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_32.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_32.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_32.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15_32.2(%self.param: ref %tuple.type.abc) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15_32.2(%self.param: ref %tuple.type.abc) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15_32.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15_32.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15_32.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc15_32.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_32.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_32.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc15_32.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_32.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_32.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15_32.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15_32.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15_32.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15_32.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc15_32.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_32.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_32.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc15_32.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_32.4: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_32.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15_32.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15_32.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15_32.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15_32.3(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15_32.2(%self.param: ref %tuple.type.abc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15_32.2(%self.param: ref %tuple.type.abc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc15_32.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_32.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_32.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc15_32.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_32.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_32.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15_32.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -846,53 +688,22 @@ fn H() { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %.115: ref %C = temporary invalid, %C.val [concrete] // CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%C.val) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc13_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc13_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.115, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc13_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc13_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -925,29 +736,16 @@ fn H() { // CHECK:STDOUT: %.loc13_7.3: %C = acquire_value %.loc13_7.2 [concrete = constants.%C.val] // CHECK:STDOUT: %G.specific_fn: = specific_function %G.ref, @G(constants.%C.val) [concrete = constants.%G.specific_fn] // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.specific_fn() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.115) +// CHECK:STDOUT: %Destroy.facet.loc13_7.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_7.4: %Destroy.type = converted constants.%C, %Destroy.facet.loc13_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc13_7.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_7.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc13_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc13_7.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_7.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_7.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_7.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_7.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_7.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.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 349fbfe1640b..b71b0486c2de 100644 --- a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon +++ b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon @@ -99,28 +99,28 @@ fn F() { // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound.188: = bound_method %facet_type.b34, %type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %facet_type.22e: type = facet_type <@Empty & @A & @B> [concrete] // CHECK:STDOUT: %pattern_type.a67: type = pattern_type %facet_type.22e [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.a67 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: %facet_type.22e = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.653: type = pattern_type %T.as_type [symbolic] +// CHECK:STDOUT: %T.patt.2ab: %pattern_type.a67 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.b3c: %facet_type.22e = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.3d8: type = facet_access_type %T.b3c [symbolic] +// CHECK:STDOUT: %pattern_type.653: type = pattern_type %T.as_type.3d8 [symbolic] // CHECK:STDOUT: %t.param_patt.4f9: %pattern_type.653 = value_param_pattern [symbolic] // CHECK:STDOUT: %t.patt.00d: %pattern_type.653 = wrapper_binding_pattern t, %t.param_patt.4f9 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.632: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %A.WithSelf.AA.type.4e6: type = fn_type @A.WithSelf.AA, @A.WithSelf(%T) [symbolic] +// CHECK:STDOUT: %require_complete.632: = require_complete_type %T.as_type.3d8 [symbolic] +// CHECK:STDOUT: %A.WithSelf.AA.type.4e6: type = fn_type @A.WithSelf.AA, @A.WithSelf(%T.b3c) [symbolic] // CHECK:STDOUT: %A.WithSelf.AA.775: %A.WithSelf.AA.type.4e6 = struct_value () [symbolic] -// CHECK:STDOUT: %B.WithSelf.BB.type.6fb: type = fn_type @B.WithSelf.BB, @B.WithSelf(%T) [symbolic] +// CHECK:STDOUT: %B.WithSelf.BB.type.6fb: type = fn_type @B.WithSelf.BB, @B.WithSelf(%T.b3c) [symbolic] // CHECK:STDOUT: %B.WithSelf.BB.b81: %B.WithSelf.BB.type.6fb = struct_value () [symbolic] -// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T, @A [symbolic] -// CHECK:STDOUT: %A.facet.7b4: %A.type = facet_value %T.as_type, (%A.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.b3c, @A [symbolic] +// CHECK:STDOUT: %A.facet.7b4: %A.type = facet_value %T.as_type.3d8, (%A.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %A.WithSelf.AA.type.bb4: type = fn_type @A.WithSelf.AA, @A.WithSelf(%A.facet.7b4) [symbolic] // CHECK:STDOUT: %A.WithSelf.AA.e48: %A.WithSelf.AA.type.bb4 = struct_value () [symbolic] // CHECK:STDOUT: %.31e: type = fn_type_with_self_type %A.WithSelf.AA.type.bb4, %A.facet.7b4 [symbolic] // CHECK:STDOUT: %impl.elem0.333: %.31e = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.67a: = specific_impl_function %impl.elem0.333, @A.WithSelf.AA(%A.facet.7b4) [symbolic] -// CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T, @B [symbolic] -// CHECK:STDOUT: %B.facet.746: %B.type = facet_value %T.as_type, (%B.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T.b3c, @B [symbolic] +// CHECK:STDOUT: %B.facet.746: %B.type = facet_value %T.as_type.3d8, (%B.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %B.WithSelf.BB.type.4db: type = fn_type @B.WithSelf.BB, @B.WithSelf(%B.facet.746) [symbolic] // CHECK:STDOUT: %B.WithSelf.BB.4e4: %B.WithSelf.BB.type.4db = struct_value () [symbolic] // CHECK:STDOUT: %.770: type = fn_type_with_self_type %B.WithSelf.BB.type.4db, %B.facet.746 [symbolic] @@ -136,23 +136,20 @@ fn F() { // CHECK:STDOUT: %t.patt.429: %pattern_type.98b = wrapper_binding_pattern t, %t.param_patt.5f9 [concrete] // CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%facet_value) [concrete] // CHECK:STDOUT: %.115: ref %C = temporary invalid, %C.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc45_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc45_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc45_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc45_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc45_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.115, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc45_8.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %.be9: type = fn_type_with_self_type %A.WithSelf.AA.type.5ec, %A.facet.7ce [concrete] // CHECK:STDOUT: %.3d4: type = fn_type_with_self_type %B.WithSelf.BB.type.0e4, %B.facet.a13 [concrete] // CHECK:STDOUT: } @@ -160,45 +157,16 @@ fn F() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.a06 = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] // CHECK:STDOUT: %Core.import_ref.9c3: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.9c3), @type.as.BitAndWith.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc45_8.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc45_8.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc45_8.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc45_8.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -232,7 +200,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %.loc29: = impl_self_witness @C.as.B.impl.%C.ref, @B [concrete = constants.%.827] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] { -// CHECK:STDOUT: %T.patt.loc33_7.1: %pattern_type.a67 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc33_7.1: %pattern_type.a67 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_7.2 (constants.%T.patt.2ab)] // CHECK:STDOUT: %t.param_patt.loc33_25.1: @G.%pattern_type (%pattern_type.653) = value_param_pattern [symbolic = %t.param_patt.loc33_25.2 (constants.%t.param_patt.4f9)] // CHECK:STDOUT: %t.patt.loc33_25.1: @G.%pattern_type (%pattern_type.653) = wrapper_binding_pattern t, %t.param_patt.loc33_25.1 [symbolic = %t.patt.loc33_25.2 (constants.%t.patt.00d)] // CHECK:STDOUT: } { @@ -252,14 +220,14 @@ fn F() { // CHECK:STDOUT: %.loc33_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc33_19 [concrete = constants.%facet_type.22e] // CHECK:STDOUT: %.loc33_19.3: type = converted %type.as.BitAndWith.impl.Op.call.loc33_19, %.loc33_19.2 [concrete = constants.%facet_type.22e] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc33_7.2: %facet_type.22e = symbolic_binding T, 0 [symbolic = %T.loc33_7.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @G.%T.as_type.loc33_27.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc33_27.1: type = splice_block %.loc33_27.2 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc33: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc33_27.2: type = facet_access_type %T.ref.loc33 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc33_27.2: type = converted %T.ref.loc33, %T.as_type.loc33_27.2 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc33_7.2: %facet_type.22e = symbolic_binding T, 0 [symbolic = %T.loc33_7.1 (constants.%T.b3c)] +// CHECK:STDOUT: %t.param: @G.%T.as_type.loc33_27.1 (%T.as_type.3d8) = value_param call_param0 +// CHECK:STDOUT: %.loc33_27.1: type = splice_block %.loc33_27.2 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)] { +// CHECK:STDOUT: %T.ref.loc33: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T.b3c)] +// CHECK:STDOUT: %T.as_type.loc33_27.2: type = facet_access_type %T.ref.loc33 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)] +// CHECK:STDOUT: %.loc33_27.2: type = converted %T.ref.loc33, %T.as_type.loc33_27.2 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @G.%T.as_type.loc33_27.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @G.%T.as_type.loc33_27.1 (%T.as_type.3d8) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } @@ -369,9 +337,9 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G(%T.loc33_7.2: %facet_type.22e) { -// CHECK:STDOUT: %T.patt.loc33_7.2: %pattern_type.a67 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc33_7.1: %facet_type.22e = symbolic_binding T, 0 [symbolic = %T.loc33_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc33_27.1: type = facet_access_type %T.loc33_7.1 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.patt.loc33_7.2: %pattern_type.a67 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc33_7.2 (constants.%T.patt.2ab)] +// CHECK:STDOUT: %T.loc33_7.1: %facet_type.22e = symbolic_binding T, 0 [symbolic = %T.loc33_7.1 (constants.%T.b3c)] +// CHECK:STDOUT: %T.as_type.loc33_27.1: type = facet_access_type %T.loc33_7.1 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc33_27.1 [symbolic = %pattern_type (constants.%pattern_type.653)] // CHECK:STDOUT: %t.param_patt.loc33_25.2: @G.%pattern_type (%pattern_type.653) = value_param_pattern [symbolic = %t.param_patt.loc33_25.2 (constants.%t.param_patt.4f9)] // CHECK:STDOUT: %t.patt.loc33_25.2: @G.%pattern_type (%pattern_type.653) = wrapper_binding_pattern t, %t.param_patt.loc33_25.2 [symbolic = %t.patt.loc33_25.2 (constants.%t.patt.00d)] @@ -391,45 +359,45 @@ fn F() { // CHECK:STDOUT: %impl.elem0.loc35_4.2: @G.%.loc35 (%.770) = impl_witness_access %B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.1ce)] // CHECK:STDOUT: %specific_impl_fn.loc35_4.2: = specific_impl_function %impl.elem0.loc35_4.2, @B.WithSelf.BB(%B.facet.loc35) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.05f)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc33_27.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @G.%T.as_type.loc33_27.1 (%T.as_type.3d8)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref.loc34: @G.%T.as_type.loc33_27.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref.loc34: @G.%T.as_type.loc33_27.1 (%T.as_type.3d8) = name_ref t, %t // CHECK:STDOUT: %AA.ref.loc34: %A.assoc_type = name_ref AA, @A.WithSelf.%assoc0 [concrete = constants.%assoc0.f3a] // CHECK:STDOUT: %impl.elem0.loc34_4.1: @G.%.loc34 (%.31e) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.333)] // CHECK:STDOUT: %specific_impl_fn.loc34_4.1: = specific_impl_function %impl.elem0.loc34_4.1, @A.WithSelf.AA(constants.%A.facet.7b4) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.67a)] // CHECK:STDOUT: %A.WithSelf.AA.call.loc34: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() -// CHECK:STDOUT: %t.ref.loc35: @G.%T.as_type.loc33_27.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref.loc35: @G.%T.as_type.loc33_27.1 (%T.as_type.3d8) = name_ref t, %t // CHECK:STDOUT: %BB.ref.loc35: %B.assoc_type = name_ref BB, @B.WithSelf.%assoc0 [concrete = constants.%assoc0.7c3] // CHECK:STDOUT: %impl.elem0.loc35_4.1: @G.%.loc35 (%.770) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.1ce)] // CHECK:STDOUT: %specific_impl_fn.loc35_4.1: = specific_impl_function %impl.elem0.loc35_4.1, @B.WithSelf.BB(constants.%B.facet.746) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.05f)] // CHECK:STDOUT: %B.WithSelf.BB.call.loc35: init %empty_tuple.type = call %specific_impl_fn.loc35_4.1() -// CHECK:STDOUT: %T.ref.loc37: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc37: type = facet_access_type %T.ref.loc37 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc37: type = converted %T.ref.loc37, %T.as_type.loc37 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.ref.loc37: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T.b3c)] +// CHECK:STDOUT: %T.as_type.loc37: type = facet_access_type %T.ref.loc37 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)] +// CHECK:STDOUT: %.loc37: type = converted %T.ref.loc37, %T.as_type.loc37 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)] // CHECK:STDOUT: %AA.ref.loc37: %A.assoc_type = name_ref AA, @A.WithSelf.%assoc0 [concrete = constants.%assoc0.f3a] // CHECK:STDOUT: %impl.elem0.loc37: @G.%.loc34 (%.31e) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.333)] // CHECK:STDOUT: %specific_impl_fn.loc37: = specific_impl_function %impl.elem0.loc37, @A.WithSelf.AA(constants.%A.facet.7b4) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.67a)] // CHECK:STDOUT: %A.WithSelf.AA.call.loc37: init %empty_tuple.type = call %specific_impl_fn.loc37() -// CHECK:STDOUT: %T.ref.loc38: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc38: type = facet_access_type %T.ref.loc38 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc38: type = converted %T.ref.loc38, %T.as_type.loc38 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.ref.loc38: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T.b3c)] +// CHECK:STDOUT: %T.as_type.loc38: type = facet_access_type %T.ref.loc38 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)] +// CHECK:STDOUT: %.loc38: type = converted %T.ref.loc38, %T.as_type.loc38 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)] // CHECK:STDOUT: %BB.ref.loc38: %B.assoc_type = name_ref BB, @B.WithSelf.%assoc0 [concrete = constants.%assoc0.7c3] // CHECK:STDOUT: %impl.elem0.loc38: @G.%.loc35 (%.770) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.1ce)] // CHECK:STDOUT: %specific_impl_fn.loc38: = specific_impl_function %impl.elem0.loc38, @B.WithSelf.BB(constants.%B.facet.746) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.05f)] // CHECK:STDOUT: %B.WithSelf.BB.call.loc38: init %empty_tuple.type = call %specific_impl_fn.loc38() -// CHECK:STDOUT: %T.ref.loc40: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc40: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T.b3c)] // CHECK:STDOUT: %A.ref.loc40: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %AA.ref.loc40: %A.assoc_type = name_ref AA, @A.WithSelf.%assoc0 [concrete = constants.%assoc0.f3a] -// CHECK:STDOUT: %T.as_type.loc40: type = facet_access_type %T.ref.loc40 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc40: type = facet_access_type %T.ref.loc40 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)] // CHECK:STDOUT: %A.facet.loc40: %A.type = facet_value %T.as_type.loc40, (constants.%A.lookup_impl_witness) [symbolic = %A.facet.loc34 (constants.%A.facet.7b4)] // CHECK:STDOUT: %.loc40: %A.type = converted %T.ref.loc40, %A.facet.loc40 [symbolic = %A.facet.loc34 (constants.%A.facet.7b4)] // CHECK:STDOUT: %impl.elem0.loc40: @G.%.loc34 (%.31e) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.333)] // CHECK:STDOUT: %specific_impl_fn.loc40: = specific_impl_function %impl.elem0.loc40, @A.WithSelf.AA(constants.%A.facet.7b4) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.67a)] // CHECK:STDOUT: %A.WithSelf.AA.call.loc40: init %empty_tuple.type = call %specific_impl_fn.loc40() -// CHECK:STDOUT: %T.ref.loc41: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc41: %facet_type.22e = name_ref T, %T.loc33_7.2 [symbolic = %T.loc33_7.1 (constants.%T.b3c)] // CHECK:STDOUT: %B.ref.loc41: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: %BB.ref.loc41: %B.assoc_type = name_ref BB, @B.WithSelf.%assoc0 [concrete = constants.%assoc0.7c3] -// CHECK:STDOUT: %T.as_type.loc41: type = facet_access_type %T.ref.loc41 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc41: type = facet_access_type %T.ref.loc41 [symbolic = %T.as_type.loc33_27.1 (constants.%T.as_type.3d8)] // CHECK:STDOUT: %B.facet.loc41: %B.type = facet_value %T.as_type.loc41, (constants.%B.lookup_impl_witness) [symbolic = %B.facet.loc35 (constants.%B.facet.746)] // CHECK:STDOUT: %.loc41: %B.type = converted %T.ref.loc41, %B.facet.loc41 [symbolic = %B.facet.loc35 (constants.%B.facet.746)] // CHECK:STDOUT: %impl.elem0.loc41: @G.%.loc35 (%.770) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.1ce)] @@ -455,31 +423,18 @@ fn F() { // CHECK:STDOUT: %.loc45_8.2: ref %C = temporary %.loc45_6.2, %.loc45_8.1 [concrete = constants.%.115] // CHECK:STDOUT: %.loc45_8.3: %C = acquire_value %.loc45_8.2 [concrete = constants.%C.val] // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.specific_fn(%.loc45_8.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.115) +// CHECK:STDOUT: %Destroy.facet.loc45_8.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc45_8.4: %Destroy.type = converted constants.%C, %Destroy.facet.loc45_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc45_8.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc45_8.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc45_8.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc45_8.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc45_8.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc45_8.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc45_8.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc45_8.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc45_8.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc45_8.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @Empty.WithSelf(constants.%Self.d44) { // CHECK:STDOUT: !definition: @@ -525,29 +480,29 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @B.WithSelf.BB(constants.%B.facet.a13) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.patt.loc33_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc33_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc33_27.1 => constants.%T.as_type +// CHECK:STDOUT: specific @G(constants.%T.b3c) { +// CHECK:STDOUT: %T.patt.loc33_7.2 => constants.%T.patt.2ab +// CHECK:STDOUT: %T.loc33_7.1 => constants.%T.b3c +// CHECK:STDOUT: %T.as_type.loc33_27.1 => constants.%T.as_type.3d8 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.653 // CHECK:STDOUT: %t.param_patt.loc33_25.2 => constants.%t.param_patt.4f9 // CHECK:STDOUT: %t.patt.loc33_25.2 => constants.%t.patt.00d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Empty.WithSelf(constants.%T) { +// CHECK:STDOUT: specific @Empty.WithSelf(constants.%T.b3c) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.WithSelf(constants.%T) { +// CHECK:STDOUT: specific @A.WithSelf(constants.%T.b3c) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%T +// CHECK:STDOUT: %Self => constants.%T.b3c // CHECK:STDOUT: %A.WithSelf.AA.type => constants.%A.WithSelf.AA.type.4e6 // CHECK:STDOUT: %A.WithSelf.AA => constants.%A.WithSelf.AA.775 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @B.WithSelf(constants.%T) { +// CHECK:STDOUT: specific @B.WithSelf(constants.%T.b3c) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%T +// CHECK:STDOUT: %Self => constants.%T.b3c // CHECK:STDOUT: %B.WithSelf.BB.type => constants.%B.WithSelf.BB.type.6fb // CHECK:STDOUT: %B.WithSelf.BB => constants.%B.WithSelf.BB.b81 // CHECK:STDOUT: } @@ -571,7 +526,7 @@ fn F() { // CHECK:STDOUT: specific @B.WithSelf.BB(constants.%B.facet.746) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%facet_value) { -// CHECK:STDOUT: %T.patt.loc33_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc33_7.2 => constants.%T.patt.2ab // CHECK:STDOUT: %T.loc33_7.1 => constants.%facet_value // CHECK:STDOUT: %T.as_type.loc33_27.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b 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 1f1472fad19e..160d8d428042 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 @@ -422,8 +422,8 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %Scalar.patt: %pattern_type.9a5 = symbolic_binding_pattern Scalar, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %Scalar.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern Scalar, 0 [symbolic] // CHECK:STDOUT: %Scalar: type = symbolic_binding Scalar, 0 [symbolic] // CHECK:STDOUT: %Generic.type.30d: type = generic_interface_type @Generic [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -451,18 +451,18 @@ fn G() { // CHECK:STDOUT: %Generic.facet: %Generic.type.e46 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] // CHECK:STDOUT: %Generic.WithSelf.F.type.ae1: type = fn_type @Generic.WithSelf.F, @Generic.WithSelf(%GenericParam, %Generic.facet) [concrete] // CHECK:STDOUT: %Generic.WithSelf.F.946: %Generic.WithSelf.F.type.ae1 = struct_value () [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %Generic.type.6735e0.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Generic.type.6735e0.2: type = facet_type <@Generic, @Generic(%T.67d)> [symbolic] // CHECK:STDOUT: %pattern_type.2af: type = pattern_type %Generic.type.6735e0.2 [symbolic] // CHECK:STDOUT: %U.patt.adf: %pattern_type.2af = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %U: %Generic.type.6735e0.2 = symbolic_binding U, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %t.param_patt.513: %pattern_type.51d = value_param_pattern [symbolic] // CHECK:STDOUT: %t.patt.c64: %pattern_type.51d = wrapper_binding_pattern t, %t.param_patt.513 [symbolic] // CHECK:STDOUT: %CallGenericMethod.type: type = fn_type @CallGenericMethod [concrete] // CHECK:STDOUT: %CallGenericMethod: %CallGenericMethod.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -474,63 +474,31 @@ fn G() { // CHECK:STDOUT: %t.patt.89c: %pattern_type.485 = wrapper_binding_pattern t, %t.param_patt.4d1 [concrete] // CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet) [concrete] // CHECK:STDOUT: %.b65: ref %GenericParam = temporary invalid, %GenericParam.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_38.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc18_38.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.320: %pattern_type.485 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.c61: %pattern_type.485 = wrapper_binding_pattern self, %self.param_patt.320 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_38.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc18_38.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_38.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.b65, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_38.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.376: %SubobjectDestroy.type = facet_value %GenericParam, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f88: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.376) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %GenericParam, (%DestroyImpl.impl_witness.f88, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_38.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc18_38.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_38.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.485 = ref_param_pattern [concrete = constants.%self.param_patt.320] -// CHECK:STDOUT: %self.patt: %pattern_type.485 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c61] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %GenericParam = ref_param call_param0 -// CHECK:STDOUT: %self: ref %GenericParam = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc18_38.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.485 = ref_param_pattern [concrete = constants.%self.param_patt.320] -// CHECK:STDOUT: %self.patt: %pattern_type.485 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c61] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %GenericParam = ref_param call_param0 -// CHECK:STDOUT: %self: ref %GenericParam = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -544,7 +512,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Generic.decl: %Generic.type.30d = interface_decl @Generic [concrete = constants.%Generic.generic] { -// CHECK:STDOUT: %Scalar.patt.loc4_25.1: %pattern_type.9a5 = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc4_25.2 (constants.%Scalar.patt)] +// CHECK:STDOUT: %Scalar.patt.loc4_25.1: %pattern_type.9a587c.1 = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc4_25.2 (constants.%Scalar.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_27.1: type = splice_block %.loc4_27.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -562,7 +530,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %.loc11: = impl_self_witness @ImplsGeneric.as.Generic.impl.%ImplsGeneric.ref, @Generic, @Generic(constants.%GenericParam) [concrete = constants.%.f1b] // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { -// CHECK:STDOUT: %T.patt.loc15_23.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc15_23.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %U.patt.loc15_47.1: @CallGenericMethod.%pattern_type.loc15_47 (%pattern_type.2af) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_47.2 (constants.%U.patt.adf)] // CHECK:STDOUT: %t.param_patt.loc15_69.1: @CallGenericMethod.%pattern_type.loc15_69 (%pattern_type.51d) = value_param_pattern [symbolic = %t.param_patt.loc15_69.2 (constants.%t.param_patt.513)] // CHECK:STDOUT: %t.patt.loc15_69.1: @CallGenericMethod.%pattern_type.loc15_69 (%pattern_type.51d) = wrapper_binding_pattern t, %t.param_patt.loc15_69.1 [symbolic = %t.patt.loc15_69.2 (constants.%t.patt.c64)] @@ -571,23 +539,23 @@ fn G() { // CHECK:STDOUT: %.Self.frozen.loc15_23: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc15_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc15_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T)] +// CHECK:STDOUT: %T.loc15_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T.67d)] // CHECK:STDOUT: %.loc15_58: type = splice_block %Generic.type.loc15_58.2 [symbolic = %Generic.type.loc15_58.1 (constants.%Generic.type.6735e0.2)] { // CHECK:STDOUT: %.Self.frozen.loc15_47: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Generic.ref: %Generic.type.30d = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] -// CHECK:STDOUT: %T.ref.loc15_57: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc15_58.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc15_58.1 (constants.%Generic.type.6735e0.2)] +// CHECK:STDOUT: %T.ref.loc15_57: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T.67d)] +// CHECK:STDOUT: %Generic.type.loc15_58.2: type = facet_type <@Generic, @Generic(constants.%T.67d)> [symbolic = %Generic.type.loc15_58.1 (constants.%Generic.type.6735e0.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc15_47.2: @CallGenericMethod.%Generic.type.loc15_58.1 (%Generic.type.6735e0.2) = symbolic_binding U, 1 [symbolic = %U.loc15_47.1 (constants.%U)] -// CHECK:STDOUT: %t.param: @CallGenericMethod.%T.loc15_23.1 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc15_71: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %t: @CallGenericMethod.%T.loc15_23.1 (%T) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t.param: @CallGenericMethod.%T.loc15_23.1 (%T.67d) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc15_71: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T.67d)] +// CHECK:STDOUT: %t: @CallGenericMethod.%T.loc15_23.1 (%T.67d) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @Generic(%Scalar.loc4_25.2: type) { -// CHECK:STDOUT: %Scalar.patt.loc4_25.2: %pattern_type.9a5 = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc4_25.2 (constants.%Scalar.patt)] +// CHECK:STDOUT: %Scalar.patt.loc4_25.2: %pattern_type.9a587c.1 = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc4_25.2 (constants.%Scalar.patt)] // CHECK:STDOUT: %Scalar.loc4_25.1: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc4_25.1 (constants.%Scalar)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -648,8 +616,8 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc15_23.2: type, %U.loc15_47.2: @CallGenericMethod.%Generic.type.loc15_58.1 (%Generic.type.6735e0.2)) { -// CHECK:STDOUT: %T.patt.loc15_23.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc15_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc15_23.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc15_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T.67d)] // CHECK:STDOUT: %Generic.type.loc15_58.1: type = facet_type <@Generic, @Generic(%T.loc15_23.1)> [symbolic = %Generic.type.loc15_58.1 (constants.%Generic.type.6735e0.2)] // CHECK:STDOUT: %pattern_type.loc15_47: type = pattern_type %Generic.type.loc15_58.1 [symbolic = %pattern_type.loc15_47 (constants.%pattern_type.2af)] // CHECK:STDOUT: %U.patt.loc15_47.2: @CallGenericMethod.%pattern_type.loc15_47 (%pattern_type.2af) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_47.2 (constants.%U.patt.adf)] @@ -661,7 +629,7 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc15_23.1 [symbolic = %require_complete (constants.%require_complete.944)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @CallGenericMethod.%T.loc15_23.1 (%T)) { +// CHECK:STDOUT: fn(%t.param: @CallGenericMethod.%T.loc15_23.1 (%T.67d)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -682,31 +650,18 @@ fn G() { // CHECK:STDOUT: %.loc18_38.2: ref %GenericParam = temporary %.loc18_36.2, %.loc18_38.1 [concrete = constants.%.b65] // CHECK:STDOUT: %.loc18_38.3: %GenericParam = acquire_value %.loc18_38.2 [concrete = constants.%GenericParam.val] // CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn(%.loc18_38.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.b65) +// CHECK:STDOUT: %Destroy.facet.loc18_38.1: %Destroy.type = facet_value constants.%GenericParam, (constants.%DestroyImpl.impl_witness.f88, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_38.4: %Destroy.type = converted constants.%GenericParam, %Destroy.facet.loc18_38.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc18_38.2: %Destroy.type = facet_value constants.%GenericParam, (constants.%DestroyImpl.impl_witness.f88, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_38.5: %Destroy.type = converted constants.%GenericParam, %Destroy.facet.loc18_38.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc18_38.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_38.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_38.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_38.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_38.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_38.2(%self.param: ref %GenericParam) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_38.2(%self.param: ref %GenericParam) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%Scalar) { // CHECK:STDOUT: %Scalar.patt.loc4_25.2 => constants.%Scalar.patt @@ -750,14 +705,14 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%GenericParam, constants.%Generic.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(constants.%T) { +// CHECK:STDOUT: specific @Generic(constants.%T.67d) { // CHECK:STDOUT: %Scalar.patt.loc4_25.2 => constants.%Scalar.patt -// CHECK:STDOUT: %Scalar.loc4_25.1 => constants.%T +// CHECK:STDOUT: %Scalar.loc4_25.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) { -// CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc15_23.1 => constants.%T +// CHECK:STDOUT: specific @CallGenericMethod(constants.%T.67d, constants.%U) { +// CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc15_23.1 => constants.%T.67d // CHECK:STDOUT: %Generic.type.loc15_58.1 => constants.%Generic.type.6735e0.2 // CHECK:STDOUT: %pattern_type.loc15_47 => constants.%pattern_type.2af // CHECK:STDOUT: %U.patt.loc15_47.2 => constants.%U.patt.adf @@ -768,7 +723,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) { -// CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc15_23.1 => constants.%GenericParam // CHECK:STDOUT: %Generic.type.loc15_58.1 => constants.%Generic.type.e46 // CHECK:STDOUT: %pattern_type.loc15_47 => constants.%pattern_type.905 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 b5ea09d079a4..92c66cbf203f 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 @@ -31,16 +31,16 @@ fn F() { // CHECK:STDOUT: %Self.f00: %Animal.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.333: type = pattern_type %Animal.type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: %Animal.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.e90: type = pattern_type %T.as_type [symbolic] +// CHECK:STDOUT: %T.patt.e44: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.443: %Animal.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.01d: type = facet_access_type %T.443 [symbolic] +// CHECK:STDOUT: %pattern_type.e90: type = pattern_type %T.as_type.01d [symbolic] // CHECK:STDOUT: %a.param_patt.84e: %pattern_type.e90 = value_param_pattern [symbolic] // CHECK:STDOUT: %a.patt.feb: %pattern_type.e90 = wrapper_binding_pattern a, %a.param_patt.84e [symbolic] // CHECK:STDOUT: %WalkAnimal.type: type = fn_type @WalkAnimal [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %WalkAnimal: %WalkAnimal.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.db4: = require_complete_type %T.as_type [symbolic] +// CHECK:STDOUT: %require_complete.db4: = require_complete_type %T.as_type.01d [symbolic] // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -56,63 +56,31 @@ fn F() { // CHECK:STDOUT: %a.patt.fd6: %pattern_type.283 = wrapper_binding_pattern a, %a.param_patt.8f5 [concrete] // CHECK:STDOUT: %WalkAnimal.specific_fn: = specific_function %WalkAnimal, @WalkAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: %.4ea: ref %Goat = temporary invalid, %Goat.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_17.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc23_17.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.41a: %pattern_type.283 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ad2: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt.41a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_17.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc23_17.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_17.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.4ea, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_17.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.934: %SubobjectDestroy.type = facet_value %Goat, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c35: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.934) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Goat, (%DestroyImpl.impl_witness.c35, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_17.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc23_17.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_17.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.283 = ref_param_pattern [concrete = constants.%self.param_patt.41a] -// CHECK:STDOUT: %self.patt: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ad2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Goat = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Goat = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc23_17.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.283 = ref_param_pattern [concrete = constants.%self.param_patt.41a] -// CHECK:STDOUT: %self.patt: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ad2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Goat = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Goat = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -126,7 +94,7 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Animal.decl: type = interface_decl @Animal [concrete = constants.%Animal.type] {} {} // CHECK:STDOUT: %WalkAnimal.decl: %WalkAnimal.type = fn_decl @WalkAnimal [concrete = constants.%WalkAnimal] { -// CHECK:STDOUT: %T.patt.loc17_16.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc17_16.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt.e44)] // CHECK:STDOUT: %a.param_patt.loc17_34.1: @WalkAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_34.2 (constants.%a.param_patt.84e)] // CHECK:STDOUT: %a.patt.loc17_34.1: @WalkAnimal.%pattern_type (%pattern_type.e90) = wrapper_binding_pattern a, %a.param_patt.loc17_34.1 [symbolic = %a.patt.loc17_34.2 (constants.%a.patt.feb)] // CHECK:STDOUT: } { @@ -134,14 +102,14 @@ fn F() { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc17_16.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %a.param: @WalkAnimal.%T.as_type.loc17_36.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc17_36.1: type = splice_block %.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc17_16.2 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc17_36.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc17_36.2: type = converted %T.ref, %T.as_type.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc17_16.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T.443)] +// CHECK:STDOUT: %a.param: @WalkAnimal.%T.as_type.loc17_36.1 (%T.as_type.01d) = value_param call_param0 +// CHECK:STDOUT: %.loc17_36.1: type = splice_block %.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type.01d)] { +// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc17_16.2 [symbolic = %T.loc17_16.1 (constants.%T.443)] +// CHECK:STDOUT: %T.as_type.loc17_36.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %.loc17_36.2: type = converted %T.ref, %T.as_type.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type.01d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @WalkAnimal.%T.as_type.loc17_36.1 (%T.as_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @WalkAnimal.%T.as_type.loc17_36.1 (%T.as_type.01d) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Goat.decl: type = class_decl @Goat [concrete = constants.%Goat] {} {} // CHECK:STDOUT: impl_decl @Goat.as.Animal.impl [concrete] {} { @@ -181,9 +149,9 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @WalkAnimal(%T.loc17_16.2: %Animal.type) { -// CHECK:STDOUT: %T.patt.loc17_16.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc17_16.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc17_36.1: type = facet_access_type %T.loc17_16.1 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.patt.loc17_16.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt.e44)] +// CHECK:STDOUT: %T.loc17_16.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T.443)] +// CHECK:STDOUT: %T.as_type.loc17_36.1: type = facet_access_type %T.loc17_16.1 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type.01d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc17_36.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] // CHECK:STDOUT: %a.param_patt.loc17_34.2: @WalkAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_34.2 (constants.%a.param_patt.84e)] // CHECK:STDOUT: %a.patt.loc17_34.2: @WalkAnimal.%pattern_type (%pattern_type.e90) = wrapper_binding_pattern a, %a.param_patt.loc17_34.2 [symbolic = %a.patt.loc17_34.2 (constants.%a.patt.feb)] @@ -191,7 +159,7 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc17_36.1 [symbolic = %require_complete (constants.%require_complete.db4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @WalkAnimal.%T.as_type.loc17_36.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%a.param: @WalkAnimal.%T.as_type.loc17_36.1 (%T.as_type.01d)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -213,40 +181,27 @@ fn F() { // CHECK:STDOUT: %.loc23_17.2: ref %Goat = temporary %.loc23_15.2, %.loc23_17.1 [concrete = constants.%.4ea] // CHECK:STDOUT: %.loc23_17.3: %Goat = acquire_value %.loc23_17.2 [concrete = constants.%Goat.val] // CHECK:STDOUT: %WalkAnimal.call: init %empty_tuple.type = call %WalkAnimal.specific_fn(%.loc23_17.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.4ea) +// CHECK:STDOUT: %Destroy.facet.loc23_17.1: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_17.4: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc23_17.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc23_17.2: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_17.5: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc23_17.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc23_17.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_17.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_17.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_17.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_17.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_17.2(%self.param: ref %Goat) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_17.2(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @Animal.WithSelf(constants.%Self.f00) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @WalkAnimal(constants.%T) { -// CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc17_16.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc17_36.1 => constants.%T.as_type +// CHECK:STDOUT: specific @WalkAnimal(constants.%T.443) { +// CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt.e44 +// CHECK:STDOUT: %T.loc17_16.1 => constants.%T.443 +// CHECK:STDOUT: %T.as_type.loc17_36.1 => constants.%T.as_type.01d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e90 // CHECK:STDOUT: %a.param_patt.loc17_34.2 => constants.%a.param_patt.84e // CHECK:STDOUT: %a.patt.loc17_34.2 => constants.%a.patt.feb @@ -257,7 +212,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WalkAnimal(constants.%Animal.facet) { -// CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt.e44 // CHECK:STDOUT: %T.loc17_16.1 => constants.%Animal.facet // CHECK:STDOUT: %T.as_type.loc17_36.1 => constants.%Goat // CHECK:STDOUT: %pattern_type => constants.%pattern_type.283 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 d652bee09e57..9de3b3a50a87 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 @@ -91,8 +91,8 @@ fn B() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %Scalar.patt: %pattern_type.9a5 = symbolic_binding_pattern Scalar, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %Scalar.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern Scalar, 0 [symbolic] // CHECK:STDOUT: %Scalar: type = symbolic_binding Scalar, 0 [symbolic] // CHECK:STDOUT: %Generic.type.30d: type = generic_interface_type @Generic [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -120,9 +120,9 @@ fn B() { // CHECK:STDOUT: %Generic.facet: %Generic.type.e46 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] // CHECK:STDOUT: %Generic.WithSelf.F.type.ae1: type = fn_type @Generic.WithSelf.F, @Generic.WithSelf(%GenericParam, %Generic.facet) [concrete] // CHECK:STDOUT: %Generic.WithSelf.F.946: %Generic.WithSelf.F.type.ae1 = struct_value () [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %Generic.type.6735e0.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Generic.type.6735e0.2: type = facet_type <@Generic, @Generic(%T.67d)> [symbolic] // CHECK:STDOUT: %pattern_type.2af: type = pattern_type %Generic.type.6735e0.2 [symbolic] // CHECK:STDOUT: %U.patt.adf: %pattern_type.2af = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %U: %Generic.type.6735e0.2 = symbolic_binding U, 1 [symbolic] @@ -130,25 +130,25 @@ fn B() { // CHECK:STDOUT: %pattern_type.085: type = pattern_type %U.as_type [symbolic] // CHECK:STDOUT: %a.param_patt.4d1: %pattern_type.085 = value_param_pattern [symbolic] // CHECK:STDOUT: %a.patt.880: %pattern_type.085 = wrapper_binding_pattern a, %a.param_patt.4d1 [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %s.param_patt.cb5: %pattern_type.51d = value_param_pattern [symbolic] // CHECK:STDOUT: %s.patt.9d4: %pattern_type.51d = wrapper_binding_pattern s, %s.param_patt.cb5 [symbolic] // CHECK:STDOUT: %CallGenericMethod.type: type = fn_type @CallGenericMethod [concrete] // CHECK:STDOUT: %CallGenericMethod: %CallGenericMethod.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.a8f: = require_complete_type %U.as_type [symbolic] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [symbolic] // CHECK:STDOUT: %Self.be29b0.2: %Generic.type.6735e0.2 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.WithSelf.F.type.b0d2b5.2: type = fn_type @Generic.WithSelf.F, @Generic.WithSelf(%T, %Self.be29b0.1) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.b0d2b5.2: type = fn_type @Generic.WithSelf.F, @Generic.WithSelf(%T.67d, %Self.be29b0.1) [symbolic] // CHECK:STDOUT: %Generic.WithSelf.F.570805.2: %Generic.WithSelf.F.type.b0d2b5.2 = struct_value () [symbolic] -// CHECK:STDOUT: %Generic.assoc_type.4c593e.2: type = assoc_entity_type @Generic, @Generic(%T) [symbolic] +// CHECK:STDOUT: %Generic.assoc_type.4c593e.2: type = assoc_entity_type @Generic, @Generic(%T.67d) [symbolic] // CHECK:STDOUT: %assoc0.1b60b3.2: %Generic.assoc_type.4c593e.2 = assoc_entity element0, @Generic.WithSelf.%Generic.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %require_complete.fb1: = require_complete_type %Generic.type.6735e0.2 [symbolic] -// CHECK:STDOUT: %Generic.WithSelf.F.type.c83: type = fn_type @Generic.WithSelf.F, @Generic.WithSelf(%T, %U) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.c83: type = fn_type @Generic.WithSelf.F, @Generic.WithSelf(%T.67d, %U) [symbolic] // CHECK:STDOUT: %Generic.WithSelf.F.608: %Generic.WithSelf.F.type.c83 = struct_value () [symbolic] -// CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U, @Generic, @Generic(%T) [symbolic] +// CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U, @Generic, @Generic(%T.67d) [symbolic] // CHECK:STDOUT: %.39f: type = fn_type_with_self_type %Generic.WithSelf.F.type.c83, %U [symbolic] // CHECK:STDOUT: %impl.elem0.c24: %.39f = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.4cb: = specific_impl_function %impl.elem0.c24, @Generic.WithSelf.F(%T, %U) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.4cb: = specific_impl_function %impl.elem0.c24, @Generic.WithSelf.F(%T.67d, %U) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -165,88 +165,40 @@ fn B() { // CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet) [concrete] // CHECK:STDOUT: %.cd4: ref %ImplsGeneric = temporary invalid, %ImplsGeneric.val [concrete] // CHECK:STDOUT: %.b65: ref %GenericParam = temporary invalid, %GenericParam.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_44.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc20_44.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.320: %pattern_type.485 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.c61: %pattern_type.485 = wrapper_binding_pattern self, %self.param_patt.320 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_44.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc20_44.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20_44.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.f89: = bound_method %.b65, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] -// CHECK:STDOUT: %self.param_patt.a2d: %pattern_type.488 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.dca: %pattern_type.488 = wrapper_binding_pattern self, %self.param_patt.a2d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc20_24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20_24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.fc0: = bound_method %.cd4, %Destroy.WithSelf.SelfDestruct.db3fdb.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20_44.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.376: %SubobjectDestroy.type = facet_value %GenericParam, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f88: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.376) [concrete] +// CHECK:STDOUT: %Destroy.facet.86a: %Destroy.type = facet_value %GenericParam, (%DestroyImpl.impl_witness.f88, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.232: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.86a) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20_24 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.4d9: %SubobjectDestroy.type = facet_value %ImplsGeneric, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ee7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.4d9) [concrete] +// CHECK:STDOUT: %Destroy.facet.8f3: %Destroy.type = facet_value %ImplsGeneric, (%DestroyImpl.impl_witness.ee7, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.679: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.8f3) [concrete] // CHECK:STDOUT: %complete_type.a7d: = complete_type_witness %Generic.type.e46 [concrete] // CHECK:STDOUT: %.788: type = fn_type_with_self_type %Generic.WithSelf.F.type.ae1, %Generic.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_44.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc20_44.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_44.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.485 = ref_param_pattern [concrete = constants.%self.param_patt.320] -// CHECK:STDOUT: %self.patt: %pattern_type.485 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c61] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %GenericParam = ref_param call_param0 -// CHECK:STDOUT: %self: ref %GenericParam = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc20_44.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.485 = ref_param_pattern [concrete = constants.%self.param_patt.320] -// CHECK:STDOUT: %self.patt: %pattern_type.485 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c61] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %GenericParam = ref_param call_param0 -// CHECK:STDOUT: %self: ref %GenericParam = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_24 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.488 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.488 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.dca] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ImplsGeneric = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ImplsGeneric = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc20_24 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.488 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.488 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.dca] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ImplsGeneric = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ImplsGeneric = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -260,7 +212,7 @@ fn B() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Generic.decl: %Generic.type.30d = interface_decl @Generic [concrete = constants.%Generic.generic] { -// CHECK:STDOUT: %Scalar.patt.loc4_25.1: %pattern_type.9a5 = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc4_25.2 (constants.%Scalar.patt)] +// CHECK:STDOUT: %Scalar.patt.loc4_25.1: %pattern_type.9a587c.1 = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc4_25.2 (constants.%Scalar.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_27.1: type = splice_block %.loc4_27.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -278,7 +230,7 @@ fn B() { // CHECK:STDOUT: } // CHECK:STDOUT: %.loc11: = impl_self_witness @ImplsGeneric.as.Generic.impl.%ImplsGeneric.ref, @Generic, @Generic(constants.%GenericParam) [concrete = constants.%.f1b] // CHECK:STDOUT: %CallGenericMethod.decl: %CallGenericMethod.type = fn_decl @CallGenericMethod [concrete = constants.%CallGenericMethod] { -// CHECK:STDOUT: %T.patt.loc15_23.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc15_23.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %U.patt.loc15_32.1: @CallGenericMethod.%pattern_type.loc15_32 (%pattern_type.2af) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_32.2 (constants.%U.patt.adf)] // CHECK:STDOUT: %a.param_patt.loc15_54.1: @CallGenericMethod.%pattern_type.loc15_54 (%pattern_type.085) = value_param_pattern [symbolic = %a.param_patt.loc15_54.2 (constants.%a.param_patt.4d1)] // CHECK:STDOUT: %a.patt.loc15_54.1: @CallGenericMethod.%pattern_type.loc15_54 (%pattern_type.085) = wrapper_binding_pattern a, %a.param_patt.loc15_54.1 [symbolic = %a.patt.loc15_54.2 (constants.%a.patt.880)] @@ -289,12 +241,12 @@ fn B() { // CHECK:STDOUT: %.Self.frozen.loc15_23: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc15_25.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc15_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T)] +// CHECK:STDOUT: %T.loc15_23.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T.67d)] // CHECK:STDOUT: %.loc15_43: type = splice_block %Generic.type.loc15_43.2 [symbolic = %Generic.type.loc15_43.1 (constants.%Generic.type.6735e0.2)] { // CHECK:STDOUT: %.Self.frozen.loc15_32: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Generic.ref: %Generic.type.30d = name_ref Generic, file.%Generic.decl [concrete = constants.%Generic.generic] -// CHECK:STDOUT: %T.ref.loc15_42: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %Generic.type.loc15_43.2: type = facet_type <@Generic, @Generic(constants.%T)> [symbolic = %Generic.type.loc15_43.1 (constants.%Generic.type.6735e0.2)] +// CHECK:STDOUT: %T.ref.loc15_42: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T.67d)] +// CHECK:STDOUT: %Generic.type.loc15_43.2: type = facet_type <@Generic, @Generic(constants.%T.67d)> [symbolic = %Generic.type.loc15_43.1 (constants.%Generic.type.6735e0.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %U.loc15_32.2: @CallGenericMethod.%Generic.type.loc15_43.1 (%Generic.type.6735e0.2) = symbolic_binding U, 1 [symbolic = %U.loc15_32.1 (constants.%U)] // CHECK:STDOUT: %a.param: @CallGenericMethod.%U.as_type.loc15_56.1 (%U.as_type) = value_param call_param0 @@ -304,15 +256,15 @@ fn B() { // CHECK:STDOUT: %.loc15_56.2: type = converted %U.ref.loc15, %U.as_type.loc15_56.2 [symbolic = %U.as_type.loc15_56.1 (constants.%U.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @CallGenericMethod.%U.as_type.loc15_56.1 (%U.as_type) = wrapper_binding a, %a.param -// CHECK:STDOUT: %s.param: @CallGenericMethod.%T.loc15_23.1 (%T) = value_param call_param1 -// CHECK:STDOUT: %T.ref.loc15_69: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T)] -// CHECK:STDOUT: %s: @CallGenericMethod.%T.loc15_23.1 (%T) = wrapper_binding s, %s.param +// CHECK:STDOUT: %s.param: @CallGenericMethod.%T.loc15_23.1 (%T.67d) = value_param call_param1 +// CHECK:STDOUT: %T.ref.loc15_69: type = name_ref T, %T.loc15_23.2 [symbolic = %T.loc15_23.1 (constants.%T.67d)] +// CHECK:STDOUT: %s: @CallGenericMethod.%T.loc15_23.1 (%T.67d) = wrapper_binding s, %s.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @Generic(%Scalar.loc4_25.2: type) { -// CHECK:STDOUT: %Scalar.patt.loc4_25.2: %pattern_type.9a5 = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc4_25.2 (constants.%Scalar.patt)] +// CHECK:STDOUT: %Scalar.patt.loc4_25.2: %pattern_type.9a587c.1 = symbolic_binding_pattern Scalar, 0 [symbolic = %Scalar.patt.loc4_25.2 (constants.%Scalar.patt)] // CHECK:STDOUT: %Scalar.loc4_25.1: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc4_25.1 (constants.%Scalar)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -373,8 +325,8 @@ fn B() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @CallGenericMethod(%T.loc15_23.2: type, %U.loc15_32.2: @CallGenericMethod.%Generic.type.loc15_43.1 (%Generic.type.6735e0.2)) { -// CHECK:STDOUT: %T.patt.loc15_23.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc15_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc15_23.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_23.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc15_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_23.1 (constants.%T.67d)] // CHECK:STDOUT: %Generic.type.loc15_43.1: type = facet_type <@Generic, @Generic(%T.loc15_23.1)> [symbolic = %Generic.type.loc15_43.1 (constants.%Generic.type.6735e0.2)] // CHECK:STDOUT: %pattern_type.loc15_32: type = pattern_type %Generic.type.loc15_43.1 [symbolic = %pattern_type.loc15_32 (constants.%pattern_type.2af)] // CHECK:STDOUT: %U.patt.loc15_32.2: @CallGenericMethod.%pattern_type.loc15_32 (%pattern_type.2af) = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc15_32.2 (constants.%U.patt.adf)] @@ -399,15 +351,15 @@ fn B() { // CHECK:STDOUT: %impl.elem0.loc16_4.2: @CallGenericMethod.%.loc16_4.3 (%.39f) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.c24)] // CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @Generic.WithSelf.F(%T.loc15_23.1, %U.loc15_32.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.4cb)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @CallGenericMethod.%U.as_type.loc15_56.1 (%U.as_type), %s.param: @CallGenericMethod.%T.loc15_23.1 (%T)) { +// CHECK:STDOUT: fn(%a.param: @CallGenericMethod.%U.as_type.loc15_56.1 (%U.as_type), %s.param: @CallGenericMethod.%T.loc15_23.1 (%T.67d)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %U.ref.loc16: @CallGenericMethod.%Generic.type.loc15_43.1 (%Generic.type.6735e0.2) = name_ref U, %U.loc15_32.2 [symbolic = %U.loc15_32.1 (constants.%U)] // CHECK:STDOUT: %U.as_type.loc16: type = facet_access_type %U.ref.loc16 [symbolic = %U.as_type.loc15_56.1 (constants.%U.as_type)] // CHECK:STDOUT: %.loc16_4.1: type = converted %U.ref.loc16, %U.as_type.loc16 [symbolic = %U.as_type.loc15_56.1 (constants.%U.as_type)] -// CHECK:STDOUT: %.loc16_4.2: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.4c593e.2) = specific_constant @Generic.WithSelf.%assoc0.loc5_9.1, @Generic.WithSelf(constants.%T, constants.%U) [symbolic = %assoc0 (constants.%assoc0.1b60b3.2)] +// CHECK:STDOUT: %.loc16_4.2: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.4c593e.2) = specific_constant @Generic.WithSelf.%assoc0.loc5_9.1, @Generic.WithSelf(constants.%T.67d, constants.%U) [symbolic = %assoc0 (constants.%assoc0.1b60b3.2)] // CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.4c593e.2) = name_ref F, %.loc16_4.2 [symbolic = %assoc0 (constants.%assoc0.1b60b3.2)] // CHECK:STDOUT: %impl.elem0.loc16_4.1: @CallGenericMethod.%.loc16_4.3 (%.39f) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.c24)] -// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @Generic.WithSelf.F(constants.%T, constants.%U) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.4cb)] +// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @Generic.WithSelf.F(constants.%T.67d, constants.%U) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.4cb)] // CHECK:STDOUT: %Generic.WithSelf.F.call: init %empty_tuple.type = call %specific_impl_fn.loc16_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -434,43 +386,26 @@ fn B() { // CHECK:STDOUT: %.loc20_44.2: ref %GenericParam = temporary %.loc20_42.2, %.loc20_44.1 [concrete = constants.%.b65] // CHECK:STDOUT: %.loc20_44.3: %GenericParam = acquire_value %.loc20_44.2 [concrete = constants.%GenericParam.val] // CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn(%.loc20_24.3, %.loc20_44.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20_44: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.f89(constants.%.b65) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20_24: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.fc0(constants.%.cd4) +// CHECK:STDOUT: %Destroy.facet.loc20_44.1: %Destroy.type = facet_value constants.%GenericParam, (constants.%DestroyImpl.impl_witness.f88, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.86a] +// CHECK:STDOUT: %.loc20_44.4: %Destroy.type = converted constants.%GenericParam, %Destroy.facet.loc20_44.1 [concrete = constants.%Destroy.facet.86a] +// CHECK:STDOUT: %Destroy.facet.loc20_44.2: %Destroy.type = facet_value constants.%GenericParam, (constants.%DestroyImpl.impl_witness.f88, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.86a] +// CHECK:STDOUT: %.loc20_44.5: %Destroy.type = converted constants.%GenericParam, %Destroy.facet.loc20_44.2 [concrete = constants.%Destroy.facet.86a] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.86a) [concrete = constants.%SelfDestruct.specific_fn.232] +// CHECK:STDOUT: %SelfDestruct.call.loc20_44: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc20_44.2) +// CHECK:STDOUT: %Destroy.facet.loc20_24.1: %Destroy.type = facet_value constants.%ImplsGeneric, (constants.%DestroyImpl.impl_witness.ee7, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.8f3] +// CHECK:STDOUT: %.loc20_24.4: %Destroy.type = converted constants.%ImplsGeneric, %Destroy.facet.loc20_24.1 [concrete = constants.%Destroy.facet.8f3] +// CHECK:STDOUT: %Destroy.facet.loc20_24.2: %Destroy.type = facet_value constants.%ImplsGeneric, (constants.%DestroyImpl.impl_witness.ee7, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.8f3] +// CHECK:STDOUT: %.loc20_24.5: %Destroy.type = converted constants.%ImplsGeneric, %Destroy.facet.loc20_24.2 [concrete = constants.%Destroy.facet.8f3] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.8f3) [concrete = constants.%SelfDestruct.specific_fn.679] +// CHECK:STDOUT: %SelfDestruct.call.loc20_24: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc20_24.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_44.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_44.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_44.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_44.2(%self.param: ref %GenericParam) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_44.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_44.2(%self.param: ref %GenericParam) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_24(%self.param: ref %ImplsGeneric) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_24(%self.param: ref %ImplsGeneric) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%Scalar) { // CHECK:STDOUT: %Scalar.patt.loc4_25.2 => constants.%Scalar.patt @@ -514,18 +449,18 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%GenericParam, constants.%Generic.facet) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic(constants.%T) { +// CHECK:STDOUT: specific @Generic(constants.%T.67d) { // CHECK:STDOUT: %Scalar.patt.loc4_25.2 => constants.%Scalar.patt -// CHECK:STDOUT: %Scalar.loc4_25.1 => constants.%T +// CHECK:STDOUT: %Scalar.loc4_25.1 => constants.%T.67d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Generic.type => constants.%Generic.type.6735e0.2 // CHECK:STDOUT: %Self.loc4_33.2 => constants.%Self.be29b0.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) { -// CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc15_23.1 => constants.%T +// CHECK:STDOUT: specific @CallGenericMethod(constants.%T.67d, constants.%U) { +// CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc15_23.1 => constants.%T.67d // CHECK:STDOUT: %Generic.type.loc15_43.1 => constants.%Generic.type.6735e0.2 // CHECK:STDOUT: %pattern_type.loc15_32 => constants.%pattern_type.2af // CHECK:STDOUT: %U.patt.loc15_32.2 => constants.%U.patt.adf @@ -539,9 +474,9 @@ fn B() { // CHECK:STDOUT: %s.patt.loc15_67.2 => constants.%s.patt.9d4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.WithSelf(constants.%T, constants.%Self.be29b0.1) { +// CHECK:STDOUT: specific @Generic.WithSelf(constants.%T.67d, constants.%Self.be29b0.1) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Scalar => constants.%T +// CHECK:STDOUT: %Scalar => constants.%T.67d // CHECK:STDOUT: %Generic.type => constants.%Generic.type.6735e0.2 // CHECK:STDOUT: %Self => constants.%Self.be29b0.1 // CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.b0d2b5.2 @@ -550,9 +485,9 @@ fn B() { // CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.1b60b3.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.WithSelf(constants.%T, constants.%U) { +// CHECK:STDOUT: specific @Generic.WithSelf(constants.%T.67d, constants.%U) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Scalar => constants.%T +// CHECK:STDOUT: %Scalar => constants.%T.67d // CHECK:STDOUT: %Generic.type => constants.%Generic.type.6735e0.2 // CHECK:STDOUT: %Self => constants.%U // CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.c83 @@ -561,10 +496,10 @@ fn B() { // CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.1b60b3.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%T, constants.%U) {} +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%T.67d, constants.%U) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) { -// CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc15_23.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc15_23.1 => constants.%GenericParam // CHECK:STDOUT: %Generic.type.loc15_43.1 => constants.%Generic.type.e46 // CHECK:STDOUT: %pattern_type.loc15_32 => constants.%pattern_type.905 @@ -596,10 +531,10 @@ fn B() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %V.patt: %pattern_type.9a5 = symbolic_binding_pattern V, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %V.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %V: type = symbolic_binding V, 0 [symbolic] -// CHECK:STDOUT: %W.patt: %pattern_type.9a5 = symbolic_binding_pattern W, 1 [symbolic] +// CHECK:STDOUT: %W.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern W, 1 [symbolic] // CHECK:STDOUT: %W: type = symbolic_binding W, 1 [symbolic] // CHECK:STDOUT: %I.type.335: type = generic_interface_type @I [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -609,7 +544,7 @@ fn B() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %I.type.8c6: type = facet_type <@I, @I(%T.67d, %empty_tuple.type)> [symbolic] @@ -623,13 +558,13 @@ fn B() { // CHECK:STDOUT: %pattern_type.1a9: type = pattern_type %I.type.936 [concrete] // CHECK:STDOUT: %T.patt.6e5: %pattern_type.1a9 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.23e: %I.type.936 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.23e [symbolic] -// CHECK:STDOUT: %pattern_type.9b8: type = pattern_type %T.as_type [symbolic] +// CHECK:STDOUT: %T.as_type.9df: type = facet_access_type %T.23e [symbolic] +// CHECK:STDOUT: %pattern_type.9b8: type = pattern_type %T.as_type.9df [symbolic] // CHECK:STDOUT: %t.param_patt.150: %pattern_type.9b8 = value_param_pattern [symbolic] // CHECK:STDOUT: %t.patt.034: %pattern_type.9b8 = wrapper_binding_pattern t, %t.param_patt.150 [symbolic] // CHECK:STDOUT: %A.type: type = fn_type @A [concrete] // CHECK:STDOUT: %A: %A.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.a79: = require_complete_type %T.as_type [symbolic] +// CHECK:STDOUT: %require_complete.a79: = require_complete_type %T.as_type.9df [symbolic] // CHECK:STDOUT: %B.type: type = fn_type @B [concrete] // CHECK:STDOUT: %B: %B.type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] @@ -643,63 +578,31 @@ fn B() { // CHECK:STDOUT: %t.patt.429: %pattern_type.98b = wrapper_binding_pattern t, %t.param_patt.5f9 [concrete] // CHECK:STDOUT: %A.specific_fn: = specific_function %A, @A(%I.facet.708) [concrete] // CHECK:STDOUT: %.115: ref %C = temporary invalid, %C.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc12_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc12_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.115, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc12_8.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_8.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc12_8.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12_8.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc12_8.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -712,8 +615,8 @@ fn B() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: %I.type.335 = interface_decl @I [concrete = constants.%I.generic] { -// CHECK:STDOUT: %V.patt.loc3_14.1: %pattern_type.9a5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc3_14.2 (constants.%V.patt)] -// CHECK:STDOUT: %W.patt.loc3_23.1: %pattern_type.9a5 = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_23.2 (constants.%W.patt)] +// CHECK:STDOUT: %V.patt.loc3_14.1: %pattern_type.9a587c.1 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc3_14.2 (constants.%V.patt)] +// CHECK:STDOUT: %W.patt.loc3_23.1: %pattern_type.9a587c.1 = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_23.2 (constants.%W.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc3_16.1: type = splice_block %.loc3_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen.loc3_14: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -728,7 +631,7 @@ fn B() { // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] { -// CHECK:STDOUT: %T.patt.loc7_15.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc7_15.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.335 = name_ref I, file.%I.decl [concrete = constants.%I.generic] @@ -758,21 +661,21 @@ fn B() { // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%empty_struct_type, constants.%empty_tuple.type)> [concrete = constants.%I.type.936] // CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_7.2: %I.type.936 = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.23e)] -// CHECK:STDOUT: %t.param: @A.%T.as_type.loc9_30.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc9_30.1: type = splice_block %.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] { +// CHECK:STDOUT: %t.param: @A.%T.as_type.loc9_30.1 (%T.as_type.9df) = value_param call_param0 +// CHECK:STDOUT: %.loc9_30.1: type = splice_block %.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type.9df)] { // CHECK:STDOUT: %T.ref: %I.type.936 = name_ref T, %T.loc9_7.2 [symbolic = %T.loc9_7.1 (constants.%T.23e)] -// CHECK:STDOUT: %T.as_type.loc9_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc9_30.2: type = converted %T.ref, %T.as_type.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc9_30.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type.9df)] +// CHECK:STDOUT: %.loc9_30.2: type = converted %T.ref, %T.as_type.loc9_30.2 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type.9df)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @A.%T.as_type.loc9_30.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @A.%T.as_type.loc9_30.1 (%T.as_type.9df) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @I(%V.loc3_14.2: type, %W.loc3_23.2: type) { -// CHECK:STDOUT: %V.patt.loc3_14.2: %pattern_type.9a5 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc3_14.2 (constants.%V.patt)] +// CHECK:STDOUT: %V.patt.loc3_14.2: %pattern_type.9a587c.1 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc3_14.2 (constants.%V.patt)] // CHECK:STDOUT: %V.loc3_14.1: type = symbolic_binding V, 0 [symbolic = %V.loc3_14.1 (constants.%V)] -// CHECK:STDOUT: %W.patt.loc3_23.2: %pattern_type.9a5 = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_23.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc3_23.2: %pattern_type.9a587c.1 = symbolic_binding_pattern W, 1 [symbolic = %W.patt.loc3_23.2 (constants.%W.patt)] // CHECK:STDOUT: %W.loc3_23.1: type = symbolic_binding W, 1 [symbolic = %W.loc3_23.1 (constants.%W)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -792,7 +695,7 @@ fn B() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @C.as.I.impl(%T.loc7_15.1: type) { -// CHECK:STDOUT: %T.patt.loc7_15.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc7_15.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_15.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %T.loc7_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc7_15.2 (constants.%T.67d)] // CHECK:STDOUT: %I.type.loc7_35.2: type = facet_type <@I, @I(%T.loc7_15.2, constants.%empty_tuple.type)> [symbolic = %I.type.loc7_35.2 (constants.%I.type.8c6)] // CHECK:STDOUT: %.loc7_37: = impl_self_witness constants.%C, @I, @I(%T.loc7_15.2, constants.%empty_tuple.type) [symbolic = %.loc7_37 (constants.%.23a)] @@ -822,7 +725,7 @@ fn B() { // CHECK:STDOUT: generic fn @A(%T.loc9_7.2: %I.type.936) { // CHECK:STDOUT: %T.patt.loc9_7.2: %pattern_type.1a9 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_7.2 (constants.%T.patt.6e5)] // CHECK:STDOUT: %T.loc9_7.1: %I.type.936 = symbolic_binding T, 0 [symbolic = %T.loc9_7.1 (constants.%T.23e)] -// CHECK:STDOUT: %T.as_type.loc9_30.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc9_30.1: type = facet_access_type %T.loc9_7.1 [symbolic = %T.as_type.loc9_30.1 (constants.%T.as_type.9df)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc9_30.1 [symbolic = %pattern_type (constants.%pattern_type.9b8)] // CHECK:STDOUT: %t.param_patt.loc9_28.2: @A.%pattern_type (%pattern_type.9b8) = value_param_pattern [symbolic = %t.param_patt.loc9_28.2 (constants.%t.param_patt.150)] // CHECK:STDOUT: %t.patt.loc9_28.2: @A.%pattern_type (%pattern_type.9b8) = wrapper_binding_pattern t, %t.param_patt.loc9_28.2 [symbolic = %t.patt.loc9_28.2 (constants.%t.patt.034)] @@ -830,7 +733,7 @@ fn B() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc9_30.1 [symbolic = %require_complete (constants.%require_complete.a79)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @A.%T.as_type.loc9_30.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @A.%T.as_type.loc9_30.1 (%T.as_type.9df)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -852,31 +755,18 @@ fn B() { // CHECK:STDOUT: %.loc12_8.2: ref %C = temporary %.loc12_6.2, %.loc12_8.1 [concrete = constants.%.115] // CHECK:STDOUT: %.loc12_8.3: %C = acquire_value %.loc12_8.2 [concrete = constants.%C.val] // CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.specific_fn(%.loc12_8.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.115) +// CHECK:STDOUT: %Destroy.facet.loc12_8.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_8.4: %Destroy.type = converted constants.%C, %Destroy.facet.loc12_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc12_8.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_8.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc12_8.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc12_8.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc12_8.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_8.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12_8.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_8.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12_8.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12_8.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%V, constants.%W) { // CHECK:STDOUT: %V.patt.loc3_14.2 => constants.%V.patt @@ -899,7 +789,7 @@ fn B() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc7_15.2 => constants.%T.67d // CHECK:STDOUT: %I.type.loc7_35.2 => constants.%I.type.8c6 // CHECK:STDOUT: %.loc7_37 => constants.%.23a @@ -928,14 +818,14 @@ fn B() { // CHECK:STDOUT: specific @A(constants.%T.23e) { // CHECK:STDOUT: %T.patt.loc9_7.2 => constants.%T.patt.6e5 // CHECK:STDOUT: %T.loc9_7.1 => constants.%T.23e -// CHECK:STDOUT: %T.as_type.loc9_30.1 => constants.%T.as_type +// CHECK:STDOUT: %T.as_type.loc9_30.1 => constants.%T.as_type.9df // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b8 // CHECK:STDOUT: %t.param_patt.loc9_28.2 => constants.%t.param_patt.150 // CHECK:STDOUT: %t.patt.loc9_28.2 => constants.%t.patt.034 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%empty_struct_type) { -// CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc7_15.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc7_15.2 => constants.%empty_struct_type // CHECK:STDOUT: %I.type.loc7_35.2 => constants.%I.type.936 // CHECK:STDOUT: %.loc7_37 => constants.%.ec3 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 99520f6b79b6..4d2d6b6c0e2e 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 @@ -151,53 +151,22 @@ fn F[A: J, B: A](x: C(A, B)) { // CHECK:STDOUT: %Goat.val: %Goat = struct_value () [concrete] // CHECK:STDOUT: %.4ea: ref %Goat = temporary invalid, %Goat.val [concrete] // CHECK:STDOUT: %.482: type = fn_type_with_self_type %Eats.WithSelf.Eat.type.5db, %Eats.facet [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc26_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.41a: %pattern_type.283 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ad2: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt.41a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc26_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.4ea, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26_8.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.934: %SubobjectDestroy.type = facet_value %Goat, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c35: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.934) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Goat, (%DestroyImpl.impl_witness.c35, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26_8.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc26_8.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26_8.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.283 = ref_param_pattern [concrete = constants.%self.param_patt.41a] -// CHECK:STDOUT: %self.patt: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ad2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Goat = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Goat = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc26_8.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.283 = ref_param_pattern [concrete = constants.%self.param_patt.41a] -// CHECK:STDOUT: %self.patt: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ad2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Goat = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Goat = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -242,7 +211,12 @@ fn F[A: J, B: A](x: C(A, B)) { // CHECK:STDOUT: %.loc26_8.2: ref %Goat = temporary %.loc26_6.2, %.loc26_8.1 [concrete = constants.%.4ea] // CHECK:STDOUT: %Bleet.ref.loc26: %Goat.Bleet.type = name_ref Bleet, @Goat.%Goat.Bleet.decl [concrete = constants.%Goat.Bleet] // CHECK:STDOUT: %Goat.Bleet.call.loc26: init %empty_tuple.type = call %Bleet.ref.loc26() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc26: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.4ea) +// CHECK:STDOUT: %Destroy.facet.loc26_8.1: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc26_8.3: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc26_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc26_8.2: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc26_8.4: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc26_8.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc26: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc26_8.2) // CHECK:STDOUT: %.loc27_6.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %Goat.ref.loc27_11: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] // CHECK:STDOUT: %.loc27_6.2: ref %Goat = temporary_storage @@ -258,32 +232,24 @@ fn F[A: J, B: A](x: C(A, B)) { // CHECK:STDOUT: %Eat.ref.loc27: %Eats.assoc_type = name_ref Eat, @Eats.WithSelf.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc27: %.482 = impl_witness_access constants.%Eats.impl_witness, element0 [concrete = constants.%Goat.as.Eats.impl.Eat] // CHECK:STDOUT: %Goat.as.Eats.impl.Eat.call.loc27: init %empty_tuple.type = call %impl.elem0.loc27() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.4ea) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.4ea) +// CHECK:STDOUT: %Destroy.facet.loc27_8.1: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc27_8.3: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc27_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc27_8.2: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc27_8.4: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc27_8.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc27: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc27_8.2) +// CHECK:STDOUT: %Destroy.facet.loc22_30.1: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc22_30.4: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc22_30.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc22_30.2: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc22_30.5: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc22_30.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc22_30.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_8.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26_8.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_8.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_8.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_8.2(%self.param: ref %Goat) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26_8.2(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- facet_access_type_converts_back_to_original_facet_value.carbon // 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 8dccf5eff70c..90f1d5966eec 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 @@ -50,8 +50,8 @@ fn F() { // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.f00: %Animal.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %Food.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern Food, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %Food.patt.3a0: %pattern_type.9a587c.1 = symbolic_binding_pattern Food, 0 [symbolic] // CHECK:STDOUT: %Food.67d: type = symbolic_binding Food, 0 [symbolic] // CHECK:STDOUT: %Eats.type.8ef: type = generic_interface_type @Eats [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -137,32 +137,27 @@ fn F() { // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal, @HandleAnimal(%Animal.facet, %Edible.facet) [concrete] // CHECK:STDOUT: %.4ea: ref %Goat = temporary invalid, %Goat.val [concrete] // CHECK:STDOUT: %.202: ref %Grass = temporary invalid, %Grass.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc35_31.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc35_31.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.330: %pattern_type.92e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.414: %pattern_type.92e = wrapper_binding_pattern self, %self.param_patt.330 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc35_31.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc35_31.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc35_31.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.d5e: = bound_method %.202, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] -// CHECK:STDOUT: %self.param_patt.41a: %pattern_type.283 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ad2: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt.41a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc35_19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc35_19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc35_19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.d8f: = bound_method %.4ea, %Destroy.WithSelf.SelfDestruct.db3fdb.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc35_31.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a70: %SubobjectDestroy.type = facet_value %Grass, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3cc: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a70) [concrete] +// CHECK:STDOUT: %Destroy.facet.e11: %Destroy.type = facet_value %Grass, (%DestroyImpl.impl_witness.3cc, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.4d3: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.e11) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc35_19 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.934: %SubobjectDestroy.type = facet_value %Goat, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c35: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.934) [concrete] +// CHECK:STDOUT: %Destroy.facet.8b5: %Destroy.type = facet_value %Goat, (%DestroyImpl.impl_witness.c35, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.873: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.8b5) [concrete] // CHECK:STDOUT: %Eats.type.c0d: type = facet_type <@Eats, @Eats(%Grass)> [concrete] // CHECK:STDOUT: %.a7f: = impl_self_witness %Goat, @Eats, @Eats(%Grass) [concrete] // CHECK:STDOUT: %Eats.impl_witness.f05: = impl_witness @T.as_type.as.Eats.impl.%Eats.impl_witness_table, @T.as_type.as.Eats.impl(%Animal.facet, %Edible.facet) [concrete] @@ -180,56 +175,13 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc35_31.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc35_31.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc35_31.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.92e = ref_param_pattern [concrete = constants.%self.param_patt.330] -// CHECK:STDOUT: %self.patt: %pattern_type.92e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.414] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Grass = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Grass = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc35_31.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.92e = ref_param_pattern [concrete = constants.%self.param_patt.330] -// CHECK:STDOUT: %self.patt: %pattern_type.92e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.414] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Grass = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Grass = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc35_19 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.283 = ref_param_pattern [concrete = constants.%self.param_patt.41a] -// CHECK:STDOUT: %self.patt: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ad2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Goat = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Goat = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc35_19 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.283 = ref_param_pattern [concrete = constants.%self.param_patt.41a] -// CHECK:STDOUT: %self.patt: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ad2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Goat = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Goat = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -254,7 +206,7 @@ fn F() { // CHECK:STDOUT: %.loc18: = impl_self_witness @Grass.as.Edible.impl.%Grass.ref, @Edible [concrete = constants.%.54a] // CHECK:STDOUT: %Animal.decl: type = interface_decl @Animal [concrete = constants.%Animal.type] {} {} // CHECK:STDOUT: %Eats.decl: %Eats.type.8ef = interface_decl @Eats [concrete = constants.%Eats.generic] { -// CHECK:STDOUT: %Food.patt.loc21_20.1: %pattern_type.9a5 = symbolic_binding_pattern Food, 0 [symbolic = %Food.patt.loc21_20.2 (constants.%Food.patt.3a0)] +// CHECK:STDOUT: %Food.patt.loc21_20.1: %pattern_type.9a587c.1 = symbolic_binding_pattern Food, 0 [symbolic = %Food.patt.loc21_20.2 (constants.%Food.patt.3a0)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc21_22.1: type = splice_block %.loc21_22.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -388,7 +340,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @Eats(%Food.loc21_20.2: type) { -// CHECK:STDOUT: %Food.patt.loc21_20.2: %pattern_type.9a5 = symbolic_binding_pattern Food, 0 [symbolic = %Food.patt.loc21_20.2 (constants.%Food.patt.3a0)] +// CHECK:STDOUT: %Food.patt.loc21_20.2: %pattern_type.9a587c.1 = symbolic_binding_pattern Food, 0 [symbolic = %Food.patt.loc21_20.2 (constants.%Food.patt.3a0)] // CHECK:STDOUT: %Food.loc21_20.1: type = symbolic_binding Food, 0 [symbolic = %Food.loc21_20.1 (constants.%Food.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -556,43 +508,26 @@ fn F() { // CHECK:STDOUT: %.loc35_31.2: ref %Grass = temporary %.loc35_29.2, %.loc35_31.1 [concrete = constants.%.202] // CHECK:STDOUT: %.loc35_31.3: %Grass = acquire_value %.loc35_31.2 [concrete = constants.%Grass.val] // CHECK:STDOUT: %HandleAnimal.call: init %empty_tuple.type = call %HandleAnimal.specific_fn(%.loc35_19.3, %.loc35_31.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc35_31: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.d5e(constants.%.202) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc35_19: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.d8f(constants.%.4ea) +// CHECK:STDOUT: %Destroy.facet.loc35_31.1: %Destroy.type = facet_value constants.%Grass, (constants.%DestroyImpl.impl_witness.3cc, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e11] +// CHECK:STDOUT: %.loc35_31.4: %Destroy.type = converted constants.%Grass, %Destroy.facet.loc35_31.1 [concrete = constants.%Destroy.facet.e11] +// CHECK:STDOUT: %Destroy.facet.loc35_31.2: %Destroy.type = facet_value constants.%Grass, (constants.%DestroyImpl.impl_witness.3cc, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e11] +// CHECK:STDOUT: %.loc35_31.5: %Destroy.type = converted constants.%Grass, %Destroy.facet.loc35_31.2 [concrete = constants.%Destroy.facet.e11] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.e11) [concrete = constants.%SelfDestruct.specific_fn.4d3] +// CHECK:STDOUT: %SelfDestruct.call.loc35_31: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc35_31.2) +// CHECK:STDOUT: %Destroy.facet.loc35_19.1: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.8b5] +// CHECK:STDOUT: %.loc35_19.4: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc35_19.1 [concrete = constants.%Destroy.facet.8b5] +// CHECK:STDOUT: %Destroy.facet.loc35_19.2: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.8b5] +// CHECK:STDOUT: %.loc35_19.5: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc35_19.2 [concrete = constants.%Destroy.facet.8b5] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.8b5) [concrete = constants.%SelfDestruct.specific_fn.873] +// CHECK:STDOUT: %SelfDestruct.call.loc35_19: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc35_19.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc35_31.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc35_31.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc35_31.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc35_31.2(%self.param: ref %Grass) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc35_31.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc35_31.2(%self.param: ref %Grass) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc35_19(%self.param: ref %Goat) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc35_19(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @Edible.WithSelf(constants.%Self.59b) { // CHECK:STDOUT: !definition: 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 d489be230e6c..d1ff529cdc64 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 @@ -33,20 +33,20 @@ fn F() { // CHECK:STDOUT: %Self.f00: %Animal.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.333: type = pattern_type %Animal.type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: %Animal.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.e90: type = pattern_type %T.as_type [symbolic] +// CHECK:STDOUT: %T.patt.e44: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.443: %Animal.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.01d: type = facet_access_type %T.443 [symbolic] +// CHECK:STDOUT: %pattern_type.e90: type = pattern_type %T.as_type.01d [symbolic] // CHECK:STDOUT: %a.param_patt.84e: %pattern_type.e90 = value_param_pattern [symbolic] // CHECK:STDOUT: %a.patt.febc60.1: %pattern_type.e90 = wrapper_binding_pattern a, %a.param_patt.84e [symbolic] // CHECK:STDOUT: %FeedAnimal.type: type = fn_type @FeedAnimal [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %FeedAnimal: %FeedAnimal.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.db4: = require_complete_type %T.as_type [symbolic] +// CHECK:STDOUT: %require_complete.db4: = require_complete_type %T.as_type.01d [symbolic] // CHECK:STDOUT: %a.patt.febc60.2: %pattern_type.e90 = wrapper_binding_pattern a, %a.param_patt.84e [symbolic] // CHECK:STDOUT: %HandleAnimal.type: type = fn_type @HandleAnimal [concrete] // CHECK:STDOUT: %HandleAnimal: %HandleAnimal.type = struct_value () [concrete] -// CHECK:STDOUT: %FeedAnimal.specific_fn.1b3: = specific_function %FeedAnimal, @FeedAnimal(%T) [symbolic] +// CHECK:STDOUT: %FeedAnimal.specific_fn.1b3: = specific_function %FeedAnimal, @FeedAnimal(%T.443) [symbolic] // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -62,65 +62,33 @@ fn F() { // CHECK:STDOUT: %a.patt.fd6628.1: %pattern_type.283 = wrapper_binding_pattern a, %a.param_patt.8f5 [concrete] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal, @HandleAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: %.4ea: ref %Goat = temporary invalid, %Goat.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc25_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc25_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.41a: %pattern_type.283 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ad2: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt.41a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc25_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc25_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc25_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.4ea, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc25_19.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.934: %SubobjectDestroy.type = facet_value %Goat, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c35: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.934) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Goat, (%DestroyImpl.impl_witness.c35, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %a.patt.fd6628.2: %pattern_type.283 = wrapper_binding_pattern a, %a.param_patt.8f5 [concrete] // CHECK:STDOUT: %FeedAnimal.specific_fn.ea8: = specific_function %FeedAnimal, @FeedAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc25_19.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc25_19.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc25_19.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.283 = ref_param_pattern [concrete = constants.%self.param_patt.41a] -// CHECK:STDOUT: %self.patt: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ad2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Goat = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Goat = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc25_19.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.283 = ref_param_pattern [concrete = constants.%self.param_patt.41a] -// CHECK:STDOUT: %self.patt: %pattern_type.283 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ad2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Goat = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Goat = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -135,7 +103,7 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Animal.decl: type = interface_decl @Animal [concrete = constants.%Animal.type] {} {} // CHECK:STDOUT: %FeedAnimal.decl: %FeedAnimal.type = fn_decl @FeedAnimal [concrete = constants.%FeedAnimal] { -// CHECK:STDOUT: %T.patt.loc17_16.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc17_16.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt.e44)] // CHECK:STDOUT: %a.param_patt.loc17_34.1: @FeedAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_34.2 (constants.%a.param_patt.84e)] // CHECK:STDOUT: %a.patt.loc17_34.1: @FeedAnimal.%pattern_type (%pattern_type.e90) = wrapper_binding_pattern a, %a.param_patt.loc17_34.1 [symbolic = %a.patt.loc17_34.2 (constants.%a.patt.febc60.1)] // CHECK:STDOUT: } { @@ -143,17 +111,17 @@ fn F() { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc17_16.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %a.param: @FeedAnimal.%T.as_type.loc17_36.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc17_36.1: type = splice_block %.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc17_16.2 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc17_36.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc17_36.2: type = converted %T.ref, %T.as_type.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc17_16.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T.443)] +// CHECK:STDOUT: %a.param: @FeedAnimal.%T.as_type.loc17_36.1 (%T.as_type.01d) = value_param call_param0 +// CHECK:STDOUT: %.loc17_36.1: type = splice_block %.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type.01d)] { +// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc17_16.2 [symbolic = %T.loc17_16.1 (constants.%T.443)] +// CHECK:STDOUT: %T.as_type.loc17_36.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %.loc17_36.2: type = converted %T.ref, %T.as_type.loc17_36.2 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type.01d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @FeedAnimal.%T.as_type.loc17_36.1 (%T.as_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @FeedAnimal.%T.as_type.loc17_36.1 (%T.as_type.01d) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %HandleAnimal.decl: %HandleAnimal.type = fn_decl @HandleAnimal [concrete = constants.%HandleAnimal] { -// CHECK:STDOUT: %T.patt.loc19_18.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_18.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc19_18.1: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_18.2 (constants.%T.patt.e44)] // CHECK:STDOUT: %a.param_patt.loc19_29.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc19_29.2 (constants.%a.param_patt.84e)] // CHECK:STDOUT: %a.patt.loc19_29.1: @HandleAnimal.%pattern_type (%pattern_type.e90) = wrapper_binding_pattern a, %a.param_patt.loc19_29.1 [symbolic = %a.patt.loc19_29.2 (constants.%a.patt.febc60.2)] // CHECK:STDOUT: } { @@ -161,14 +129,14 @@ fn F() { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc19_18.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc19_18.1 (constants.%T)] -// CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc19_31.1: type = splice_block %.loc19_31.2 [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc19_18.2 [symbolic = %T.loc19_18.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc19_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc19_31.2: type = converted %T.ref, %T.as_type.loc19_31.2 [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc19_18.2: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc19_18.1 (constants.%T.443)] +// CHECK:STDOUT: %a.param: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type.01d) = value_param call_param0 +// CHECK:STDOUT: %.loc19_31.1: type = splice_block %.loc19_31.2 [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type.01d)] { +// CHECK:STDOUT: %T.ref: %Animal.type = name_ref T, %T.loc19_18.2 [symbolic = %T.loc19_18.1 (constants.%T.443)] +// CHECK:STDOUT: %T.as_type.loc19_31.2: type = facet_access_type %T.ref [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type.01d)] +// CHECK:STDOUT: %.loc19_31.2: type = converted %T.ref, %T.as_type.loc19_31.2 [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type.01d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %a: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type) = wrapper_binding a, %a.param +// CHECK:STDOUT: %a: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type.01d) = wrapper_binding a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Goat.decl: type = class_decl @Goat [concrete = constants.%Goat] {} {} // CHECK:STDOUT: impl_decl @Goat.as.Animal.impl [concrete] {} { @@ -208,9 +176,9 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @FeedAnimal(%T.loc17_16.2: %Animal.type) { -// CHECK:STDOUT: %T.patt.loc17_16.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc17_16.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc17_36.1: type = facet_access_type %T.loc17_16.1 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.patt.loc17_16.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_16.2 (constants.%T.patt.e44)] +// CHECK:STDOUT: %T.loc17_16.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc17_16.1 (constants.%T.443)] +// CHECK:STDOUT: %T.as_type.loc17_36.1: type = facet_access_type %T.loc17_16.1 [symbolic = %T.as_type.loc17_36.1 (constants.%T.as_type.01d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc17_36.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] // CHECK:STDOUT: %a.param_patt.loc17_34.2: @FeedAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc17_34.2 (constants.%a.param_patt.84e)] // CHECK:STDOUT: %a.patt.loc17_34.2: @FeedAnimal.%pattern_type (%pattern_type.e90) = wrapper_binding_pattern a, %a.param_patt.loc17_34.2 [symbolic = %a.patt.loc17_34.2 (constants.%a.patt.febc60.1)] @@ -218,16 +186,16 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc17_36.1 [symbolic = %require_complete (constants.%require_complete.db4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @FeedAnimal.%T.as_type.loc17_36.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%a.param: @FeedAnimal.%T.as_type.loc17_36.1 (%T.as_type.01d)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @HandleAnimal(%T.loc19_18.2: %Animal.type) { -// CHECK:STDOUT: %T.patt.loc19_18.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_18.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc19_18.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc19_18.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc19_31.1: type = facet_access_type %T.loc19_18.1 [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.patt.loc19_18.2: %pattern_type.333 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_18.2 (constants.%T.patt.e44)] +// CHECK:STDOUT: %T.loc19_18.1: %Animal.type = symbolic_binding T, 0 [symbolic = %T.loc19_18.1 (constants.%T.443)] +// CHECK:STDOUT: %T.as_type.loc19_31.1: type = facet_access_type %T.loc19_18.1 [symbolic = %T.as_type.loc19_31.1 (constants.%T.as_type.01d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc19_31.1 [symbolic = %pattern_type (constants.%pattern_type.e90)] // CHECK:STDOUT: %a.param_patt.loc19_29.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = value_param_pattern [symbolic = %a.param_patt.loc19_29.2 (constants.%a.param_patt.84e)] // CHECK:STDOUT: %a.patt.loc19_29.2: @HandleAnimal.%pattern_type (%pattern_type.e90) = wrapper_binding_pattern a, %a.param_patt.loc19_29.2 [symbolic = %a.patt.loc19_29.2 (constants.%a.patt.febc60.2)] @@ -236,13 +204,13 @@ fn F() { // CHECK:STDOUT: %require_complete: = require_complete_type %T.as_type.loc19_31.1 [symbolic = %require_complete (constants.%require_complete.db4)] // CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_36.2: = specific_function constants.%FeedAnimal, @FeedAnimal(%T.loc19_18.1) [symbolic = %FeedAnimal.specific_fn.loc19_36.2 (constants.%FeedAnimal.specific_fn.1b3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%a.param: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type.01d)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %FeedAnimal.ref: %FeedAnimal.type = name_ref FeedAnimal, file.%FeedAnimal.decl [concrete = constants.%FeedAnimal] -// CHECK:STDOUT: %a.ref: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type) = name_ref a, %a -// CHECK:STDOUT: %.loc19_48.1: %Animal.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc19_18.1 (constants.%T)] -// CHECK:STDOUT: %.loc19_48.2: %Animal.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc19_18.1 (constants.%T)] -// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_36.1: = specific_function %FeedAnimal.ref, @FeedAnimal(constants.%T) [symbolic = %FeedAnimal.specific_fn.loc19_36.2 (constants.%FeedAnimal.specific_fn.1b3)] +// CHECK:STDOUT: %a.ref: @HandleAnimal.%T.as_type.loc19_31.1 (%T.as_type.01d) = name_ref a, %a +// CHECK:STDOUT: %.loc19_48.1: %Animal.type = converted constants.%T.as_type.01d, constants.%T.443 [symbolic = %T.loc19_18.1 (constants.%T.443)] +// CHECK:STDOUT: %.loc19_48.2: %Animal.type = converted constants.%T.as_type.01d, constants.%T.443 [symbolic = %T.loc19_18.1 (constants.%T.443)] +// CHECK:STDOUT: %FeedAnimal.specific_fn.loc19_36.1: = specific_function %FeedAnimal.ref, @FeedAnimal(constants.%T.443) [symbolic = %FeedAnimal.specific_fn.loc19_36.2 (constants.%FeedAnimal.specific_fn.1b3)] // CHECK:STDOUT: %FeedAnimal.call: init %empty_tuple.type = call %FeedAnimal.specific_fn.loc19_36.1(%a.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -264,40 +232,27 @@ fn F() { // CHECK:STDOUT: %.loc25_19.2: ref %Goat = temporary %.loc25_17.2, %.loc25_19.1 [concrete = constants.%.4ea] // CHECK:STDOUT: %.loc25_19.3: %Goat = acquire_value %.loc25_19.2 [concrete = constants.%Goat.val] // CHECK:STDOUT: %HandleAnimal.call: init %empty_tuple.type = call %HandleAnimal.specific_fn(%.loc25_19.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.4ea) +// CHECK:STDOUT: %Destroy.facet.loc25_19.1: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc25_19.4: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc25_19.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc25_19.2: %Destroy.type = facet_value constants.%Goat, (constants.%DestroyImpl.impl_witness.c35, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc25_19.5: %Destroy.type = converted constants.%Goat, %Destroy.facet.loc25_19.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc25_19.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25_19.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc25_19.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc25_19.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc25_19.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc25_19.2(%self.param: ref %Goat) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc25_19.2(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @Animal.WithSelf(constants.%Self.f00) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @FeedAnimal(constants.%T) { -// CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc17_16.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc17_36.1 => constants.%T.as_type +// CHECK:STDOUT: specific @FeedAnimal(constants.%T.443) { +// CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt.e44 +// CHECK:STDOUT: %T.loc17_16.1 => constants.%T.443 +// CHECK:STDOUT: %T.as_type.loc17_36.1 => constants.%T.as_type.01d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e90 // CHECK:STDOUT: %a.param_patt.loc17_34.2 => constants.%a.param_patt.84e // CHECK:STDOUT: %a.patt.loc17_34.2 => constants.%a.patt.febc60.1 @@ -306,10 +261,10 @@ fn F() { // CHECK:STDOUT: %require_complete => constants.%require_complete.db4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HandleAnimal(constants.%T) { -// CHECK:STDOUT: %T.patt.loc19_18.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc19_18.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc19_31.1 => constants.%T.as_type +// CHECK:STDOUT: specific @HandleAnimal(constants.%T.443) { +// CHECK:STDOUT: %T.patt.loc19_18.2 => constants.%T.patt.e44 +// CHECK:STDOUT: %T.loc19_18.1 => constants.%T.443 +// CHECK:STDOUT: %T.as_type.loc19_31.1 => constants.%T.as_type.01d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e90 // CHECK:STDOUT: %a.param_patt.loc19_29.2 => constants.%a.param_patt.84e // CHECK:STDOUT: %a.patt.loc19_29.2 => constants.%a.patt.febc60.2 @@ -320,7 +275,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet) { -// CHECK:STDOUT: %T.patt.loc19_18.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc19_18.2 => constants.%T.patt.e44 // CHECK:STDOUT: %T.loc19_18.1 => constants.%Animal.facet // CHECK:STDOUT: %T.as_type.loc19_31.1 => constants.%Goat // CHECK:STDOUT: %pattern_type => constants.%pattern_type.283 @@ -333,7 +288,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @FeedAnimal(constants.%Animal.facet) { -// CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc17_16.2 => constants.%T.patt.e44 // CHECK:STDOUT: %T.loc17_16.1 => constants.%Animal.facet // CHECK:STDOUT: %T.as_type.loc17_36.1 => constants.%Goat // CHECK:STDOUT: %pattern_type => constants.%pattern_type.283 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 54d3f1503804..a7df9d4c0c72 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 @@ -43,12 +43,12 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: %tuple.type: type = tuple_type (type) [concrete] // CHECK:STDOUT: %tuple.ad8: %tuple.type = tuple_value (type) [concrete] // CHECK:STDOUT: %pattern_type.ddf: type = pattern_type %tuple.type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: %tuple.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.d26: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.198: %tuple.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %HoldsType.type: type = parameterized_class_name_type @HoldsType [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %HoldsType.generic: %HoldsType.type = struct_value () [concrete] -// CHECK:STDOUT: %HoldsType.7c6: type = class_type @HoldsType, @HoldsType(%T) [symbolic] +// CHECK:STDOUT: %HoldsType.7c6: type = class_type @HoldsType, @HoldsType(%T.198) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %RuntimeConvertFrom: type = class_type @RuntimeConvertFrom [concrete] @@ -72,7 +72,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %RuntimeConvertTo.val: %RuntimeConvertTo = struct_value () [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %tuple.elem0: type = tuple_access %T, element0 [symbolic] +// CHECK:STDOUT: %tuple.elem0: type = tuple_access %T.198, element0 [symbolic] // CHECK:STDOUT: %pattern_type.251: type = pattern_type %tuple.elem0 [symbolic] // CHECK:STDOUT: %A.patt.ee4: %pattern_type.251 = symbolic_binding_pattern A, 1 [symbolic] // CHECK:STDOUT: %A: %tuple.elem0 = symbolic_binding A, 1 [symbolic] @@ -97,64 +97,33 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: %x.param_patt.32e: %pattern_type.aaa = value_param_pattern [concrete] // CHECK:STDOUT: %x.patt.c12: %pattern_type.aaa = wrapper_binding_pattern x, %x.param_patt.32e [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc34_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.afb: %pattern_type.c10 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a97: %pattern_type.c10 = wrapper_binding_pattern self, %self.param_patt.afb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc34_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc34_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc34_19.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.790: %SubobjectDestroy.type = facet_value %RuntimeConvertTo, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.18d: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.790) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %RuntimeConvertTo, (%DestroyImpl.impl_witness.18d, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_19.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc34_19.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_19.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c10 = ref_param_pattern [concrete = constants.%self.param_patt.afb] -// CHECK:STDOUT: %self.patt: %pattern_type.c10 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a97] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %RuntimeConvertTo = ref_param call_param0 -// CHECK:STDOUT: %self: ref %RuntimeConvertTo = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc34_19.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c10 = ref_param_pattern [concrete = constants.%self.param_patt.afb] -// CHECK:STDOUT: %self.patt: %pattern_type.c10 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a97] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %RuntimeConvertTo = ref_param call_param0 -// CHECK:STDOUT: %self: ref %RuntimeConvertTo = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -168,7 +137,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HoldsType.decl: %HoldsType.type = class_decl @HoldsType [concrete = constants.%HoldsType.generic] { -// CHECK:STDOUT: %T.patt.loc17_18.1: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_18.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc17_18.1: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_18.2 (constants.%T.patt.d26)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc17_27.1: type = splice_block %.loc17_27.3 [concrete = constants.%tuple.type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -176,7 +145,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: %.loc17_27.2: %tuple.type = tuple_literal (%.loc17_21) [concrete = constants.%tuple.ad8] // CHECK:STDOUT: %.loc17_27.3: type = converted %.loc17_27.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc17_18.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc17_18.1 (constants.%T)] +// CHECK:STDOUT: %T.loc17_18.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc17_18.1 (constants.%T.198)] // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeConvertFrom.decl: type = class_decl @RuntimeConvertFrom [concrete = constants.%RuntimeConvertFrom] {} {} // CHECK:STDOUT: %RuntimeConvertTo.decl: type = class_decl @RuntimeConvertTo [concrete = constants.%RuntimeConvertTo] {} {} @@ -189,7 +158,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: } // CHECK:STDOUT: %.loc22: = impl_self_witness @RuntimeConvertFrom.as.ImplicitAs.impl.%RuntimeConvertFrom.ref, @ImplicitAs, @ImplicitAs(constants.%RuntimeConvertTo) [concrete = constants.%.692] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc27_7.1: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc27_7.1: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_7.2 (constants.%T.patt.d26)] // CHECK:STDOUT: %A.patt.loc27_35.1: @F.%pattern_type.loc27_35 (%pattern_type.251) = symbolic_binding_pattern A, 1 [symbolic = %A.patt.loc27_35.2 (constants.%A.patt.ee4)] // CHECK:STDOUT: %x.param_patt.loc27_50.1: @F.%pattern_type.loc27_50 (%pattern_type.831) = value_param_pattern [symbolic = %x.param_patt.loc27_50.2 (constants.%x.param_patt.c68)] // CHECK:STDOUT: %x.patt.loc27_50.1: @F.%pattern_type.loc27_50 (%pattern_type.831) = wrapper_binding_pattern x, %x.param_patt.loc27_50.1 [symbolic = %x.patt.loc27_50.2 (constants.%x.patt.efd)] @@ -200,10 +169,10 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: %.loc27_16.2: %tuple.type = tuple_literal (%.loc27_10) [concrete = constants.%tuple.ad8] // CHECK:STDOUT: %.loc27_16.3: type = converted %.loc27_16.2, constants.%tuple.type [concrete = constants.%tuple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc27_7.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc27_7.1 (constants.%T)] +// CHECK:STDOUT: %T.loc27_7.2: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc27_7.1 (constants.%T.198)] // CHECK:STDOUT: %.loc27_38: type = splice_block %tuple.elem0.loc27_38.2 [symbolic = %tuple.elem0.loc27_38.1 (constants.%tuple.elem0)] { // CHECK:STDOUT: %.Self.frozen.loc27_35: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %T.ref.loc27_37: %tuple.type = name_ref T, %T.loc27_7.2 [symbolic = %T.loc27_7.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc27_37: %tuple.type = name_ref T, %T.loc27_7.2 [symbolic = %T.loc27_7.1 (constants.%T.198)] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0.loc27_38.2: type = tuple_access %T.ref.loc27_37, element0 [symbolic = %tuple.elem0.loc27_38.1 (constants.%tuple.elem0)] // CHECK:STDOUT: } @@ -211,8 +180,8 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: %x.param: @F.%HoldsType.loc27_63.1 (%HoldsType.7c6) = value_param call_param0 // CHECK:STDOUT: %.loc27_63: type = splice_block %HoldsType.loc27_63.2 [symbolic = %HoldsType.loc27_63.1 (constants.%HoldsType.7c6)] { // CHECK:STDOUT: %HoldsType.ref: %HoldsType.type = name_ref HoldsType, file.%HoldsType.decl [concrete = constants.%HoldsType.generic] -// CHECK:STDOUT: %T.ref.loc27_62: %tuple.type = name_ref T, %T.loc27_7.2 [symbolic = %T.loc27_7.1 (constants.%T)] -// CHECK:STDOUT: %HoldsType.loc27_63.2: type = class_type @HoldsType, @HoldsType(constants.%T) [symbolic = %HoldsType.loc27_63.1 (constants.%HoldsType.7c6)] +// CHECK:STDOUT: %T.ref.loc27_62: %tuple.type = name_ref T, %T.loc27_7.2 [symbolic = %T.loc27_7.1 (constants.%T.198)] +// CHECK:STDOUT: %HoldsType.loc27_63.2: type = class_type @HoldsType, @HoldsType(constants.%T.198) [symbolic = %HoldsType.loc27_63.1 (constants.%HoldsType.7c6)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.%HoldsType.loc27_63.1 (%HoldsType.7c6) = wrapper_binding x, %x.param // CHECK:STDOUT: } @@ -265,8 +234,8 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @HoldsType(%T.loc17_18.2: %tuple.type) { -// CHECK:STDOUT: %T.patt.loc17_18.2: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_18.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc17_18.1: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc17_18.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc17_18.2: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc17_18.2 (constants.%T.patt.d26)] +// CHECK:STDOUT: %T.loc17_18.1: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc17_18.1 (constants.%T.198)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -304,8 +273,8 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc27_7.2: %tuple.type, %A.loc27_35.2: @F.%tuple.elem0.loc27_38.1 (%tuple.elem0)) { -// CHECK:STDOUT: %T.patt.loc27_7.2: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc27_7.1: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc27_7.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc27_7.2: %pattern_type.ddf = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_7.2 (constants.%T.patt.d26)] +// CHECK:STDOUT: %T.loc27_7.1: %tuple.type = symbolic_binding T, 0 [symbolic = %T.loc27_7.1 (constants.%T.198)] // CHECK:STDOUT: %tuple.elem0.loc27_38.1: type = tuple_access %T.loc27_7.1, element0 [symbolic = %tuple.elem0.loc27_38.1 (constants.%tuple.elem0)] // CHECK:STDOUT: %pattern_type.loc27_35: type = pattern_type %tuple.elem0.loc27_38.1 [symbolic = %pattern_type.loc27_35 (constants.%pattern_type.251)] // CHECK:STDOUT: %A.patt.loc27_35.2: @F.%pattern_type.loc27_35 (%pattern_type.251) = symbolic_binding_pattern A, 1 [symbolic = %A.patt.loc27_35.2 (constants.%A.patt.ee4)] @@ -347,44 +316,30 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: %.loc34_19.5: %empty_tuple.type = call %F.specific_fn(%holds_to.ref) // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc34_19.6: %empty_tuple.type = converted %.loc34_19.5, %empty_tuple [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc34_19.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc34_19.3) +// CHECK:STDOUT: %Destroy.facet.loc34_19.1: %Destroy.type = facet_value constants.%RuntimeConvertTo, (constants.%DestroyImpl.impl_witness.18d, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc34_19.7: %Destroy.type = converted constants.%RuntimeConvertTo, %Destroy.facet.loc34_19.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc34_19.2: %Destroy.type = facet_value constants.%RuntimeConvertTo, (constants.%DestroyImpl.impl_witness.18d, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc34_19.8: %Destroy.type = converted constants.%RuntimeConvertTo, %Destroy.facet.loc34_19.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc34_19.3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_19.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_19.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_19.2(%self.param: ref %RuntimeConvertTo) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_19.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.2(%self.param: ref %RuntimeConvertTo) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_19.2(%self.param: ref %RuntimeConvertTo) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_19.2(%self.param: ref %RuntimeConvertTo) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @HoldsType(constants.%T) { -// CHECK:STDOUT: %T.patt.loc17_18.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc17_18.1 => constants.%T +// CHECK:STDOUT: specific @HoldsType(constants.%T.198) { +// CHECK:STDOUT: %T.patt.loc17_18.2 => constants.%T.patt.d26 +// CHECK:STDOUT: %T.loc17_18.1 => constants.%T.198 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T, constants.%A) { -// CHECK:STDOUT: %T.patt.loc27_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc27_7.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.198, constants.%A) { +// CHECK:STDOUT: %T.patt.loc27_7.2 => constants.%T.patt.d26 +// CHECK:STDOUT: %T.loc27_7.1 => constants.%T.198 // CHECK:STDOUT: %tuple.elem0.loc27_38.1 => constants.%tuple.elem0 // CHECK:STDOUT: %pattern_type.loc27_35 => constants.%pattern_type.251 // CHECK:STDOUT: %A.patt.loc27_35.2 => constants.%A.patt.ee4 @@ -396,7 +351,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HoldsType(constants.%tuple.eb2) { -// CHECK:STDOUT: %T.patt.loc17_18.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc17_18.2 => constants.%T.patt.d26 // CHECK:STDOUT: %T.loc17_18.1 => constants.%tuple.eb2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -408,7 +363,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), generic from: RuntimeConvertFrom // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%tuple.eb2, ) { -// CHECK:STDOUT: %T.patt.loc27_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc27_7.2 => constants.%T.patt.d26 // CHECK:STDOUT: %T.loc27_7.1 => constants.%tuple.eb2 // CHECK:STDOUT: %tuple.elem0.loc27_38.1 => constants.%RuntimeConvertTo // CHECK:STDOUT: %pattern_type.loc27_35 => constants.%pattern_type.c10 diff --git a/toolchain/check/testdata/for/actual.carbon b/toolchain/check/testdata/for/actual.carbon index 1ce393e75af2..ab7566ed4c7b 100644 --- a/toolchain/check/testdata/for/actual.carbon +++ b/toolchain/check/testdata/for/actual.carbon @@ -79,8 +79,9 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %facet_type.bd0: type = facet_type <@Copy & @Destroy> [concrete] // CHECK:STDOUT: %Optional.type: type = parameterized_class_name_type @Optional [concrete] // CHECK:STDOUT: %Optional.generic: %Optional.type = struct_value () [concrete] // CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] @@ -88,29 +89,34 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Optional.Some.792: %Optional.Some.type.63b = struct_value () [symbolic] // CHECK:STDOUT: %Optional.None.type.626: type = fn_type @Optional.None, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.None.3ad: %Optional.None.type.626 = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.frozen.bdd: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.frozen.as_type: type = facet_access_type %.Self.frozen.bdd [symbolic_self] // CHECK:STDOUT: %Iterate.assoc_type: type = assoc_entity_type @Iterate [concrete] -// CHECK:STDOUT: %assoc1.c91: %Iterate.assoc_type = assoc_entity element1, imports.%Core.import_ref.dd9 [concrete] +// CHECK:STDOUT: %assoc1.bf7: %Iterate.assoc_type = assoc_entity element1, imports.%Core.import_ref.457 [concrete] // CHECK:STDOUT: %.052: = impl_self_witness %.Self.frozen.bdd, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem1.a93: %Destroy.type = impl_witness_access %.052, element1 [symbolic_self] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.053: = lookup_impl_witness %Int.d4bbe0.1, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e3e: %Destroy.type = facet_value %Int.d4bbe0.1, (%Destroy.lookup_impl_witness.053) [symbolic] -// CHECK:STDOUT: %assoc0.0f0: %Iterate.assoc_type = assoc_entity element0, imports.%Core.import_ref.ebd [concrete] -// CHECK:STDOUT: %impl.elem0.3b7: %facet_type.f48 = impl_witness_access %.052, element0 [symbolic_self] +// CHECK:STDOUT: %impl.elem1.d2c: %Destroy.type = impl_witness_access %.052, element1 [symbolic_self] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.f5e: = lookup_impl_witness %Int.d4bbe0.1, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.79f: = lookup_impl_witness %Int.d4bbe0.1, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.cbf: %SubobjectDestroy.type = facet_value %Int.d4bbe0.1, (%SubobjectDestroy.lookup_impl_witness.f5e) [symbolic] // CHECK:STDOUT: %require_complete.d0a0eb.1: = require_complete_type %Int.d4bbe0.1 [symbolic] +// CHECK:STDOUT: %.811: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cbf) [symbolic] +// CHECK:STDOUT: %Destroy.facet.0e1: %Destroy.type = facet_value %Int.d4bbe0.1, (%SubobjectDestroy.lookup_impl_witness.f5e, %DestroyImpl.lookup_impl_witness.79f) [symbolic] +// CHECK:STDOUT: %assoc0.d28: %Iterate.assoc_type = assoc_entity element0, imports.%Core.import_ref.b1e5 [concrete] +// CHECK:STDOUT: %impl.elem0.a07: %facet_type.bd0 = impl_witness_access %.052, element0 [symbolic_self] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.3c1: %Int.as.Copy.impl.Op.type.a1d = struct_value () [symbolic] // CHECK:STDOUT: %return.param_patt.a51197.1: %pattern_type.5515d5.1 = out_param_pattern [symbolic] // CHECK:STDOUT: %.c504e9.1: Core.Form = init_form %Int.d4bbe0.1 [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.923: = lookup_impl_witness %Int.d4bbe0.1, @Copy [symbolic] // CHECK:STDOUT: %.cbd: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic] -// CHECK:STDOUT: %facet_value: %facet_type.f48 = facet_value %Int.d4bbe0.1, (%Destroy.lookup_impl_witness.053, %Copy.lookup_impl_witness.923) [symbolic] +// CHECK:STDOUT: %facet_value: %facet_type.bd0 = facet_value %Int.d4bbe0.1, (%SubobjectDestroy.lookup_impl_witness.f5e, %DestroyImpl.lookup_impl_witness.79f, %Copy.lookup_impl_witness.923) [symbolic] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.327: = impl_self_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem1.4a6: %Destroy.type = impl_witness_access %.327, element1 [symbolic_self] -// CHECK:STDOUT: %impl.elem0.188: %facet_type.f48 = impl_witness_access %.327, element0 [symbolic_self] -// CHECK:STDOUT: %Iterate_where.type.483: type = facet_type <@Iterate where %impl.elem1.4a6 = %Destroy.facet.e3e and %impl.elem0.188 = %facet_value> [symbolic] +// CHECK:STDOUT: %impl.elem1.af2: %Destroy.type = impl_witness_access %.327, element1 [symbolic_self] +// CHECK:STDOUT: %impl.elem0.685: %facet_type.bd0 = impl_witness_access %.327, element0 [symbolic_self] +// CHECK:STDOUT: %Iterate_where.type.4d1: type = facet_type <@Iterate where %impl.elem1.af2 = %Destroy.facet.0e1 and %impl.elem0.685 = %facet_value> [symbolic] // CHECK:STDOUT: %.712: = impl_self_witness %IntRange.0bb, @Iterate [symbolic] // CHECK:STDOUT: %Iterate.impl_witness: = impl_witness @IntRange.as.Iterate.impl.%Iterate.impl_witness_table, @IntRange.as.Iterate.impl(%N) [symbolic] // CHECK:STDOUT: %self.param_patt.b7f: %pattern_type.711 = value_param_pattern [symbolic] @@ -121,7 +127,7 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %cursor.param_patt.a08: %pattern_type.5515d5.1 = ref_param_pattern [symbolic] // CHECK:STDOUT: %cursor.patt.019: %pattern_type.5515d5.1 = wrapper_binding_pattern cursor, %cursor.param_patt.a08 [symbolic] // CHECK:STDOUT: %OptionalStorage.lookup_impl_witness.f1f: = lookup_impl_witness %Int.d4bbe0.1, @OptionalStorage [symbolic] -// CHECK:STDOUT: %.7b1: require_specific_def_type = require_specific_def @T.as_type.as.OptionalStorage.impl(%facet_value) [symbolic] +// CHECK:STDOUT: %.9d1: require_specific_def_type = require_specific_def @T.as_type.as.OptionalStorage.impl(%facet_value) [symbolic] // CHECK:STDOUT: %OptionalStorage.facet.b7c: %OptionalStorage.type = facet_value %Int.d4bbe0.1, (%OptionalStorage.lookup_impl_witness.f1f) [symbolic] // CHECK:STDOUT: %Optional.b5c: type = class_type @Optional, @Optional(%OptionalStorage.facet.b7c) [symbolic] // CHECK:STDOUT: %.940: Core.Form = init_form %Optional.b5c [symbolic] @@ -181,10 +187,7 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %impl.elem0.fc5: %.bfa = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.b3e: = specific_impl_function %impl.elem0.fc5, @Inc.WithSelf.Op(%Inc.facet) [symbolic] // CHECK:STDOUT: %Optional.Some.specific_fn: = specific_function %Optional.Some.a4c, @Optional.Some(%OptionalStorage.facet.b7c) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.1da: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.e3e) [symbolic] -// CHECK:STDOUT: %.085: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.1da, %Destroy.facet.e3e [symbolic] -// CHECK:STDOUT: %impl.elem2.1ea: %.085 = impl_witness_access %Destroy.lookup_impl_witness.053, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.380: = specific_impl_function %impl.elem2.1ea, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.e3e) [symbolic] +// CHECK:STDOUT: %SelfDestruct.specific_fn.bd1: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.0e1) [symbolic] // CHECK:STDOUT: %Optional.None.specific_fn: = specific_function %Optional.None.125, @Optional.None(%OptionalStorage.facet.b7c) [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] @@ -229,7 +232,7 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %.72f: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Copy.facet.95d: %Copy.type = facet_value %i32, (%Copy.impl_witness.8af) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.95d) [concrete] -// CHECK:STDOUT: %.2b93: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] +// CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -242,7 +245,7 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: .Copy = %Core.Copy.e5d // CHECK:STDOUT: .OrderedWith = %Core.OrderedWith // CHECK:STDOUT: .Inc = %Core.Inc -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -250,14 +253,14 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Core.IntLiteral: type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Iterate: type = import_ref Core//prelude/iterate, Iterate, loaded [concrete = constants.%Iterate.type] -// CHECK:STDOUT: %Core.import_ref.96b: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc0.0f0] -// CHECK:STDOUT: %Core.import_ref.5be: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc1.c91] +// CHECK:STDOUT: %Core.import_ref.55a: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc0.d28] +// CHECK:STDOUT: %Core.import_ref.bbd: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc1.bf7] // CHECK:STDOUT: %Core.import_ref.987: @Optional.%Optional.None.type (%Optional.None.type.626) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.3ad)] // CHECK:STDOUT: %Core.import_ref.300: @Optional.%Optional.Some.type (%Optional.Some.type.63b) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.792)] -// CHECK:STDOUT: %Core.import_ref.dd9: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %CursorType] +// CHECK:STDOUT: %Core.import_ref.457: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %CursorType] // CHECK:STDOUT: %CursorType: %Destroy.type = assoc_const_decl @CursorType [concrete] {} -// CHECK:STDOUT: %Core.import_ref.ebd: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %ElementType] -// CHECK:STDOUT: %ElementType: %facet_type.f48 = assoc_const_decl @ElementType [concrete] {} +// CHECK:STDOUT: %Core.import_ref.b1e5: %facet_type.bd0 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %ElementType] +// CHECK:STDOUT: %ElementType: %facet_type.bd0 = assoc_const_decl @ElementType [concrete] {} // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic] @@ -272,7 +275,7 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Core.import_ref.ae2 = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %OrderedWith.impl_witness_table.ef8 = impl_witness_table (%Core.import_ref.03e, %Core.import_ref.27a, %Core.import_ref.3c0, %Core.import_ref.ae2), @Int.as.OrderedWith.impl.97c [concrete] // CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.6b6.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.6b6.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl.6b6 [concrete] @@ -317,12 +320,15 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)] // CHECK:STDOUT: %IntRange: type = class_type @IntRange, @IntRange(%N) [symbolic = %IntRange (constants.%IntRange.0bb)] // CHECK:STDOUT: %Int.loc9_54.1: type = class_type @Int, @Int(%N) [symbolic = %Int.loc9_54.1 (constants.%Int.d4bbe0.1)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Int.loc9_54.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.053)] -// CHECK:STDOUT: %Destroy.facet.loc9_54.1: %Destroy.type = facet_value %Int.loc9_54.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.e3e)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %Int.loc9_54.1, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.f5e)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %Int.loc9_54.1, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.cbf)] +// CHECK:STDOUT: %.loc9_54.1: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc9_54.1 (constants.%.811)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %Int.loc9_54.1, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.79f)] +// CHECK:STDOUT: %Destroy.facet.loc9_54.1: %Destroy.type = facet_value %Int.loc9_54.1, (%SubobjectDestroy.lookup_impl_witness, %DestroyImpl.lookup_impl_witness) [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.0e1)] // CHECK:STDOUT: %.loc9_85.1: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc9_85.1 (constants.%.cbd)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %Int.loc9_54.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.923)] -// CHECK:STDOUT: %facet_value.loc9_85.1: %facet_type.f48 = facet_value %Int.loc9_54.1, (%Destroy.lookup_impl_witness, %Copy.lookup_impl_witness) [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)] -// CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where constants.%impl.elem1.4a6 = %Destroy.facet.loc9_54.1 and constants.%impl.elem0.188 = %facet_value.loc9_85.1> [symbolic = %Iterate_where.type (constants.%Iterate_where.type.483)] +// CHECK:STDOUT: %facet_value.loc9_85.1: %facet_type.bd0 = facet_value %Int.loc9_54.1, (%SubobjectDestroy.lookup_impl_witness, %DestroyImpl.lookup_impl_witness, %Copy.lookup_impl_witness) [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)] +// CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where constants.%impl.elem1.af2 = %Destroy.facet.loc9_54.1 and constants.%impl.elem0.685 = %facet_value.loc9_85.1> [symbolic = %Iterate_where.type (constants.%Iterate_where.type.4d1)] // CHECK:STDOUT: %.loc9_87: = impl_self_witness %IntRange, @Iterate [symbolic = %.loc9_87 (constants.%.712)] // CHECK:STDOUT: %Iterate.impl_witness.loc9_87.2: = impl_witness %Iterate.impl_witness_table, @IntRange.as.Iterate.impl(%N) [symbolic = %Iterate.impl_witness.loc9_87.2 (constants.%Iterate.impl_witness)] // CHECK:STDOUT: @@ -393,8 +399,8 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: } // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant.loc9_87.1, %impl_witness_assoc_constant.loc9_87.2, %IntRange.as.Iterate.impl.NewCursor.decl, %IntRange.as.Iterate.impl.Next.decl), @IntRange.as.Iterate.impl [concrete] // CHECK:STDOUT: %Iterate.impl_witness.loc9_87.1: = impl_witness %Iterate.impl_witness_table, @IntRange.as.Iterate.impl(constants.%N) [symbolic = %Iterate.impl_witness.loc9_87.2 (constants.%Iterate.impl_witness)] -// CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.1: %facet_type.f48 = impl_witness_assoc_constant constants.%facet_value [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)] -// CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.2: %Destroy.type = impl_witness_assoc_constant constants.%Destroy.facet.e3e [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.e3e)] +// CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.1: %facet_type.bd0 = impl_witness_assoc_constant constants.%facet_value [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)] +// CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.2: %Destroy.type = impl_witness_assoc_constant constants.%Destroy.facet.0e1 [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.0e1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = @@ -461,36 +467,36 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %.Self.ref.loc9_30: %Iterate.type = name_ref .Self, %.Self.frozen [symbolic_self = constants.%.Self.frozen.bdd] // CHECK:STDOUT: %.Self.as_type.loc9_30: type = facet_access_type %.Self.ref.loc9_30 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %.loc9_30: type = converted %.Self.ref.loc9_30, %.Self.as_type.loc9_30 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %CursorType.ref: %Iterate.assoc_type = name_ref CursorType, imports.%Core.import_ref.5be [concrete = constants.%assoc1.c91] -// CHECK:STDOUT: %impl.elem1.loc9_30.1: %Destroy.type = impl_witness_access constants.%.052, element1 [symbolic_self = constants.%impl.elem1.a93] +// CHECK:STDOUT: %CursorType.ref: %Iterate.assoc_type = name_ref CursorType, imports.%Core.import_ref.bbd [concrete = constants.%assoc1.bf7] +// CHECK:STDOUT: %impl.elem1.loc9_30.1: %Destroy.type = impl_witness_access constants.%.052, element1 [symbolic_self = constants.%impl.elem1.d2c] // CHECK:STDOUT: %Core.ref.loc9_44: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Int.ref.loc9_48: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic] // CHECK:STDOUT: %.loc9_53: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)] // CHECK:STDOUT: %N.ref.loc9_53: Core.IntLiteral = name_ref N, %.loc9_53 [symbolic = %N (constants.%N)] // CHECK:STDOUT: %Int.loc9_54.2: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc9_54.1 (constants.%Int.d4bbe0.1)] -// CHECK:STDOUT: %Destroy.facet.loc9_54.2: %Destroy.type = facet_value %Int.loc9_54.2, (constants.%Destroy.lookup_impl_witness.053) [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %.loc9_54: %Destroy.type = converted %Int.loc9_54.2, %Destroy.facet.loc9_54.2 [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %rewrite.loc9_42.1 = requirement_rewrite %impl.elem1.loc9_30.1, %.loc9_54 [concrete] +// CHECK:STDOUT: %Destroy.facet.loc9_54.2: %Destroy.type = facet_value %Int.loc9_54.2, (constants.%SubobjectDestroy.lookup_impl_witness.f5e, constants.%DestroyImpl.lookup_impl_witness.79f) [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.0e1)] +// CHECK:STDOUT: %.loc9_54.2: %Destroy.type = converted %Int.loc9_54.2, %Destroy.facet.loc9_54.2 [symbolic = %Destroy.facet.loc9_54.1 (constants.%Destroy.facet.0e1)] +// CHECK:STDOUT: %rewrite.loc9_42.1 = requirement_rewrite %impl.elem1.loc9_30.1, %.loc9_54.2 [concrete] // CHECK:STDOUT: %.Self.ref.loc9_60: %Iterate.type = name_ref .Self, %.Self.frozen [symbolic_self = constants.%.Self.frozen.bdd] // CHECK:STDOUT: %.Self.as_type.loc9_60: type = facet_access_type %.Self.ref.loc9_60 [symbolic_self = constants.%.Self.frozen.as_type] // CHECK:STDOUT: %.loc9_60: type = converted %.Self.ref.loc9_60, %.Self.as_type.loc9_60 [symbolic_self = constants.%.Self.frozen.as_type] -// CHECK:STDOUT: %ElementType.ref: %Iterate.assoc_type = name_ref ElementType, imports.%Core.import_ref.96b [concrete = constants.%assoc0.0f0] -// CHECK:STDOUT: %impl.elem0.loc9_60.1: %facet_type.f48 = impl_witness_access constants.%.052, element0 [symbolic_self = constants.%impl.elem0.3b7] +// CHECK:STDOUT: %ElementType.ref: %Iterate.assoc_type = name_ref ElementType, imports.%Core.import_ref.55a [concrete = constants.%assoc0.d28] +// CHECK:STDOUT: %impl.elem0.loc9_60.1: %facet_type.bd0 = impl_witness_access constants.%.052, element0 [symbolic_self = constants.%impl.elem0.a07] // CHECK:STDOUT: %Core.ref.loc9_75: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Int.ref.loc9_79: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic] // CHECK:STDOUT: %.loc9_84: Core.IntLiteral = specific_constant @IntRange.%N.loc4_17.2, @IntRange(constants.%N) [symbolic = %N (constants.%N)] // CHECK:STDOUT: %N.ref.loc9_84: Core.IntLiteral = name_ref N, %.loc9_84 [symbolic = %N (constants.%N)] // CHECK:STDOUT: %Int.loc9_85: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc9_54.1 (constants.%Int.d4bbe0.1)] -// CHECK:STDOUT: %facet_value.loc9_85.2: %facet_type.f48 = facet_value %Int.loc9_85, (constants.%Destroy.lookup_impl_witness.053, constants.%Copy.lookup_impl_witness.923) [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)] -// CHECK:STDOUT: %.loc9_85.2: %facet_type.f48 = converted %Int.loc9_85, %facet_value.loc9_85.2 [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)] +// CHECK:STDOUT: %facet_value.loc9_85.2: %facet_type.bd0 = facet_value %Int.loc9_85, (constants.%SubobjectDestroy.lookup_impl_witness.f5e, constants.%DestroyImpl.lookup_impl_witness.79f, constants.%Copy.lookup_impl_witness.923) [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)] +// CHECK:STDOUT: %.loc9_85.2: %facet_type.bd0 = converted %Int.loc9_85, %facet_value.loc9_85.2 [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)] // CHECK:STDOUT: %rewrite.loc9_73.1 = requirement_rewrite %impl.elem0.loc9_60.1, %.loc9_85.2 [concrete] -// CHECK:STDOUT: %impl.elem1.loc9_30.2: %Destroy.type = impl_witness_access constants.%.327, element1 [symbolic_self = constants.%impl.elem1.4a6] -// CHECK:STDOUT: %rewrite.loc9_42.2 = requirement_rewrite %impl.elem1.loc9_30.2, %.loc9_54 [concrete] -// CHECK:STDOUT: %impl.elem0.loc9_60.2: %facet_type.f48 = impl_witness_access constants.%.327, element0 [symbolic_self = constants.%impl.elem0.188] +// CHECK:STDOUT: %impl.elem1.loc9_30.2: %Destroy.type = impl_witness_access constants.%.327, element1 [symbolic_self = constants.%impl.elem1.af2] +// CHECK:STDOUT: %rewrite.loc9_42.2 = requirement_rewrite %impl.elem1.loc9_30.2, %.loc9_54.2 [concrete] +// CHECK:STDOUT: %impl.elem0.loc9_60.2: %facet_type.bd0 = impl_witness_access constants.%.327, element0 [symbolic_self = constants.%impl.elem0.685] // CHECK:STDOUT: %rewrite.loc9_73.2 = requirement_rewrite %impl.elem0.loc9_60.2, %.loc9_85.2 [concrete] -// CHECK:STDOUT: %.loc9_24: type = where_expr [symbolic = %Iterate_where.type (constants.%Iterate_where.type.483)] { +// CHECK:STDOUT: %.loc9_24: type = where_expr [symbolic = %Iterate_where.type (constants.%Iterate_where.type.4d1)] { // CHECK:STDOUT: %base_facet_type = requirement_base_facet_type %Iterate.ref [concrete] -// CHECK:STDOUT: %rewrite.loc9_42.2 = requirement_rewrite %impl.elem1.loc9_30.2, %.loc9_54 [concrete] +// CHECK:STDOUT: %rewrite.loc9_42.2 = requirement_rewrite %impl.elem1.loc9_30.2, %.loc9_54.2 [concrete] // CHECK:STDOUT: %rewrite.loc9_73.2 = requirement_rewrite %impl.elem0.loc9_60.2, %.loc9_85.2 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -631,10 +637,11 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %pattern_type.loc11_29: type = pattern_type %Int.loc11_41.1 [symbolic = %pattern_type.loc11_29 (constants.%pattern_type.5515d5.1)] // CHECK:STDOUT: %cursor.param_patt.loc11_29.2: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_29 (%pattern_type.5515d5.1) = ref_param_pattern [symbolic = %cursor.param_patt.loc11_29.2 (constants.%cursor.param_patt.a08)] // CHECK:STDOUT: %cursor.patt.loc11_29.2: @IntRange.as.Iterate.impl.Next.%pattern_type.loc11_29 (%pattern_type.5515d5.1) = wrapper_binding_pattern cursor, %cursor.param_patt.loc11_29.2 [symbolic = %cursor.patt.loc11_29.2 (constants.%cursor.patt.019)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Int.loc11_41.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.053)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %Int.loc11_41.1, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.f5e)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %Int.loc11_41.1, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.79f)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %Int.loc11_41.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.923)] -// CHECK:STDOUT: %facet_value: %facet_type.f48 = facet_value %Int.loc11_41.1, (%Destroy.lookup_impl_witness, %Copy.lookup_impl_witness) [symbolic = %facet_value (constants.%facet_value)] -// CHECK:STDOUT: %.loc11_72.3: require_specific_def_type = require_specific_def @T.as_type.as.OptionalStorage.impl(%facet_value) [symbolic = %.loc11_72.3 (constants.%.7b1)] +// CHECK:STDOUT: %facet_value: %facet_type.bd0 = facet_value %Int.loc11_41.1, (%SubobjectDestroy.lookup_impl_witness, %DestroyImpl.lookup_impl_witness, %Copy.lookup_impl_witness) [symbolic = %facet_value (constants.%facet_value)] +// CHECK:STDOUT: %.loc11_72.3: require_specific_def_type = require_specific_def @T.as_type.as.OptionalStorage.impl(%facet_value) [symbolic = %.loc11_72.3 (constants.%.9d1)] // CHECK:STDOUT: %OptionalStorage.lookup_impl_witness: = lookup_impl_witness %Int.loc11_41.1, @OptionalStorage [symbolic = %OptionalStorage.lookup_impl_witness (constants.%OptionalStorage.lookup_impl_witness.f1f)] // CHECK:STDOUT: %OptionalStorage.facet.loc11_72.1: %OptionalStorage.type = facet_value %Int.loc11_41.1, (%OptionalStorage.lookup_impl_witness) [symbolic = %OptionalStorage.facet.loc11_72.1 (constants.%OptionalStorage.facet.b7c)] // CHECK:STDOUT: %Optional.loc11_72.1: type = class_type @Optional, @Optional(%OptionalStorage.facet.loc11_72.1) [symbolic = %Optional.loc11_72.1 (constants.%Optional.b5c)] @@ -678,11 +685,10 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Optional.Some.type: type = fn_type @Optional.Some, @Optional(%OptionalStorage.facet.loc11_72.1) [symbolic = %Optional.Some.type (constants.%Optional.Some.type.36c)] // CHECK:STDOUT: %Optional.Some: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.36c) = struct_value () [symbolic = %Optional.Some (constants.%Optional.Some.a4c)] // CHECK:STDOUT: %Optional.Some.specific_fn.loc15_42.2: = specific_function %Optional.Some, @Optional.Some(%OptionalStorage.facet.loc11_72.1) [symbolic = %Optional.Some.specific_fn.loc15_42.2 (constants.%Optional.Some.specific_fn)] -// CHECK:STDOUT: %Destroy.facet.loc12_7.5: %Destroy.type = facet_value %Int.loc11_41.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc12_7.5) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.1da)] -// CHECK:STDOUT: %.loc12_7.5: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc12_7.5 [symbolic = %.loc12_7.5 (constants.%.085)] -// CHECK:STDOUT: %impl.elem2.loc12_7.3: @IntRange.as.Iterate.impl.Next.%.loc12_7.5 (%.085) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc12_7.3 (constants.%impl.elem2.1ea)] -// CHECK:STDOUT: %specific_impl_fn.loc12_7.3: = specific_impl_function %impl.elem2.loc12_7.3, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.loc12_7.5) [symbolic = %specific_impl_fn.loc12_7.3 (constants.%specific_impl_fn.380)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %Int.loc11_41.1, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.cbf)] +// CHECK:STDOUT: %.loc12_7.5: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc12_7.5 (constants.%.811)] +// CHECK:STDOUT: %Destroy.facet.loc12_7.5: %Destroy.type = facet_value %Int.loc11_41.1, (%SubobjectDestroy.lookup_impl_witness, %DestroyImpl.lookup_impl_witness) [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.0e1)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(%Destroy.facet.loc12_7.5) [symbolic = %SelfDestruct.specific_fn.3 (constants.%SelfDestruct.specific_fn.bd1)] // CHECK:STDOUT: %Optional.None.type: type = fn_type @Optional.None, @Optional(%OptionalStorage.facet.loc11_72.1) [symbolic = %Optional.None.type (constants.%Optional.None.type.145)] // CHECK:STDOUT: %Optional.None: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.145) = struct_value () [symbolic = %Optional.None (constants.%Optional.None.125)] // CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.2: = specific_function %Optional.None, @Optional.None(%OptionalStorage.facet.loc11_72.1) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn)] @@ -764,15 +770,12 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %.loc11_72.1: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_72.1 (%Optional.b5c) = splice_block %return.param {} // CHECK:STDOUT: %.loc15_48: @IntRange.as.Iterate.impl.Next.%Int.loc11_41.1 (%Int.d4bbe0.1) = acquire_value %value.ref.loc15 // CHECK:STDOUT: %Optional.Some.call: init @IntRange.as.Iterate.impl.Next.%Optional.loc11_72.1 (%Optional.b5c) to %.loc11_72.1 = call %Optional.Some.specific_fn.loc15_42.1(%.loc15_48) -// CHECK:STDOUT: %impl.elem2.loc12_7.1: @IntRange.as.Iterate.impl.Next.%.loc12_7.5 (%.085) = impl_witness_access constants.%Destroy.lookup_impl_witness.053, element2 [symbolic = %impl.elem2.loc12_7.3 (constants.%impl.elem2.1ea)] -// CHECK:STDOUT: %bound_method.loc12_7.1: = bound_method %value.var, %impl.elem2.loc12_7.1 -// CHECK:STDOUT: %Destroy.facet.loc12_7.1: %Destroy.type = facet_value constants.%Int.d4bbe0.1, (constants.%Destroy.lookup_impl_witness.053) [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %.loc12_7.1: %Destroy.type = converted constants.%Int.d4bbe0.1, %Destroy.facet.loc12_7.1 [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %Destroy.facet.loc12_7.2: %Destroy.type = facet_value constants.%Int.d4bbe0.1, (constants.%Destroy.lookup_impl_witness.053) [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %.loc12_7.2: %Destroy.type = converted constants.%Int.d4bbe0.1, %Destroy.facet.loc12_7.2 [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %specific_impl_fn.loc12_7.1: = specific_impl_function %impl.elem2.loc12_7.1, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet.e3e) [symbolic = %specific_impl_fn.loc12_7.3 (constants.%specific_impl_fn.380)] -// CHECK:STDOUT: %bound_method.loc12_7.2: = bound_method %value.var, %specific_impl_fn.loc12_7.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12_7.1: init %empty_tuple.type = call %bound_method.loc12_7.2(%value.var) +// CHECK:STDOUT: %Destroy.facet.loc12_7.1: %Destroy.type = facet_value constants.%Int.d4bbe0.1, (constants.%SubobjectDestroy.lookup_impl_witness.f5e, constants.%DestroyImpl.lookup_impl_witness.79f) [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.0e1)] +// CHECK:STDOUT: %.loc12_7.1: %Destroy.type = converted constants.%Int.d4bbe0.1, %Destroy.facet.loc12_7.1 [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.0e1)] +// CHECK:STDOUT: %Destroy.facet.loc12_7.2: %Destroy.type = facet_value constants.%Int.d4bbe0.1, (constants.%SubobjectDestroy.lookup_impl_witness.f5e, constants.%DestroyImpl.lookup_impl_witness.79f) [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.0e1)] +// CHECK:STDOUT: %.loc12_7.2: %Destroy.type = converted constants.%Int.d4bbe0.1, %Destroy.facet.loc12_7.2 [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.0e1)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.0e1) [symbolic = %SelfDestruct.specific_fn.3 (constants.%SelfDestruct.specific_fn.bd1)] +// CHECK:STDOUT: %SelfDestruct.call.loc12_7.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%value.var) // CHECK:STDOUT: return %Optional.Some.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !if.else: @@ -791,15 +794,12 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.1: = specific_function %None.ref, @Optional.None(constants.%OptionalStorage.facet.b7c) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn)] // CHECK:STDOUT: %.loc11_72.2: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_72.1 (%Optional.b5c) = splice_block %return.param {} // CHECK:STDOUT: %Optional.None.call: init @IntRange.as.Iterate.impl.Next.%Optional.loc11_72.1 (%Optional.b5c) to %.loc11_72.2 = call %Optional.None.specific_fn.loc17_42.1() -// CHECK:STDOUT: %impl.elem2.loc12_7.2: @IntRange.as.Iterate.impl.Next.%.loc12_7.5 (%.085) = impl_witness_access constants.%Destroy.lookup_impl_witness.053, element2 [symbolic = %impl.elem2.loc12_7.3 (constants.%impl.elem2.1ea)] -// CHECK:STDOUT: %bound_method.loc12_7.3: = bound_method %value.var, %impl.elem2.loc12_7.2 -// CHECK:STDOUT: %Destroy.facet.loc12_7.3: %Destroy.type = facet_value constants.%Int.d4bbe0.1, (constants.%Destroy.lookup_impl_witness.053) [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %.loc12_7.3: %Destroy.type = converted constants.%Int.d4bbe0.1, %Destroy.facet.loc12_7.3 [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %Destroy.facet.loc12_7.4: %Destroy.type = facet_value constants.%Int.d4bbe0.1, (constants.%Destroy.lookup_impl_witness.053) [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %.loc12_7.4: %Destroy.type = converted constants.%Int.d4bbe0.1, %Destroy.facet.loc12_7.4 [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %specific_impl_fn.loc12_7.2: = specific_impl_function %impl.elem2.loc12_7.2, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet.e3e) [symbolic = %specific_impl_fn.loc12_7.3 (constants.%specific_impl_fn.380)] -// CHECK:STDOUT: %bound_method.loc12_7.4: = bound_method %value.var, %specific_impl_fn.loc12_7.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12_7.2: init %empty_tuple.type = call %bound_method.loc12_7.4(%value.var) +// CHECK:STDOUT: %Destroy.facet.loc12_7.3: %Destroy.type = facet_value constants.%Int.d4bbe0.1, (constants.%SubobjectDestroy.lookup_impl_witness.f5e, constants.%DestroyImpl.lookup_impl_witness.79f) [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.0e1)] +// CHECK:STDOUT: %.loc12_7.3: %Destroy.type = converted constants.%Int.d4bbe0.1, %Destroy.facet.loc12_7.3 [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.0e1)] +// CHECK:STDOUT: %Destroy.facet.loc12_7.4: %Destroy.type = facet_value constants.%Int.d4bbe0.1, (constants.%SubobjectDestroy.lookup_impl_witness.f5e, constants.%DestroyImpl.lookup_impl_witness.79f) [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.0e1)] +// CHECK:STDOUT: %.loc12_7.4: %Destroy.type = converted constants.%Int.d4bbe0.1, %Destroy.facet.loc12_7.4 [symbolic = %Destroy.facet.loc12_7.5 (constants.%Destroy.facet.0e1)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.0e1) [symbolic = %SelfDestruct.specific_fn.3 (constants.%SelfDestruct.specific_fn.bd1)] +// CHECK:STDOUT: %SelfDestruct.call.loc12_7.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%value.var) // CHECK:STDOUT: return %Optional.None.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -860,12 +860,15 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %N => constants.%N // CHECK:STDOUT: %IntRange => constants.%IntRange.0bb // CHECK:STDOUT: %Int.loc9_54.1 => constants.%Int.d4bbe0.1 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.lookup_impl_witness.053 -// CHECK:STDOUT: %Destroy.facet.loc9_54.1 => constants.%Destroy.facet.e3e +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness => constants.%SubobjectDestroy.lookup_impl_witness.f5e +// CHECK:STDOUT: %SubobjectDestroy.facet => constants.%SubobjectDestroy.facet.cbf +// CHECK:STDOUT: %.loc9_54.1 => constants.%.811 +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness => constants.%DestroyImpl.lookup_impl_witness.79f +// CHECK:STDOUT: %Destroy.facet.loc9_54.1 => constants.%Destroy.facet.0e1 // CHECK:STDOUT: %.loc9_85.1 => constants.%.cbd // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.923 // CHECK:STDOUT: %facet_value.loc9_85.1 => constants.%facet_value -// CHECK:STDOUT: %Iterate_where.type => constants.%Iterate_where.type.483 +// CHECK:STDOUT: %Iterate_where.type => constants.%Iterate_where.type.4d1 // CHECK:STDOUT: %.loc9_87 => constants.%.712 // CHECK:STDOUT: %Iterate.impl_witness.loc9_87.2 => constants.%Iterate.impl_witness // CHECK:STDOUT: @@ -899,10 +902,11 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %pattern_type.loc11_29 => constants.%pattern_type.5515d5.1 // CHECK:STDOUT: %cursor.param_patt.loc11_29.2 => constants.%cursor.param_patt.a08 // CHECK:STDOUT: %cursor.patt.loc11_29.2 => constants.%cursor.patt.019 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%Destroy.lookup_impl_witness.053 +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness => constants.%SubobjectDestroy.lookup_impl_witness.f5e +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness => constants.%DestroyImpl.lookup_impl_witness.79f // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.923 // CHECK:STDOUT: %facet_value => constants.%facet_value -// CHECK:STDOUT: %.loc11_72.3 => constants.%.7b1 +// CHECK:STDOUT: %.loc11_72.3 => constants.%.9d1 // CHECK:STDOUT: %OptionalStorage.lookup_impl_witness => constants.%OptionalStorage.lookup_impl_witness.f1f // CHECK:STDOUT: %OptionalStorage.facet.loc11_72.1 => constants.%OptionalStorage.facet.b7c // CHECK:STDOUT: %Optional.loc11_72.1 => constants.%Optional.b5c @@ -949,7 +953,7 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.8af // CHECK:STDOUT: %Copy.facet.loc6_22.3 => constants.%Copy.facet.95d // CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.f76 -// CHECK:STDOUT: %.loc6_22.4 => constants.%.2b93 +// CHECK:STDOUT: %.loc6_22.4 => constants.%.2b9 // CHECK:STDOUT: %impl.elem0.loc6_22.2 => constants.%Int.as.Copy.impl.Op.cae // CHECK:STDOUT: %specific_impl_fn.loc6_22.2 => constants.%Int.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } @@ -1010,7 +1014,6 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %x.var_patt: %pattern_type.9c3 = var_pattern %x.patt [concrete] // CHECK:STDOUT: %Range.type: type = fn_type @Range [concrete] // CHECK:STDOUT: %Range: %Range.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.6b0: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] @@ -1027,30 +1030,27 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %y, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method(%y) [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc5_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.f0a: type = pattern_type %struct_type.start.end.7e8 [concrete] -// CHECK:STDOUT: %self.param_patt.d76: %pattern_type.f0a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f77: %pattern_type.f0a = wrapper_binding_pattern self, %self.param_patt.d76 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc5_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.21f: %pattern_type.9c3 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.bd1: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt.21f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc5_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6e0: %SubobjectDestroy.type = facet_value %IntRange.773, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.acc: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6e0) [concrete] +// CHECK:STDOUT: %Destroy.facet.70a: %Destroy.type = facet_value %IntRange.773, (%DestroyImpl.impl_witness.acc, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.7f7: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.70a) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1059,7 +1059,7 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Core.048aa3.1: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .IntLiteral = %Core.IntLiteral // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1074,58 +1074,15 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.6b6.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.6b6.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl.6b6 [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Main.import_ref.531: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Main//lib, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Main.import_ref.531), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Main.import_ref.a56c11.1 = import_ref Main//lib, loc23_30, unloaded // CHECK:STDOUT: %field_decl.b65: @IntRange.%IntRange.elem (%IntRange.elem.945) = field_decl end, element1, %Main.import_ref.a56c11.1 in [concrete] {} // CHECK:STDOUT: %Main.import_ref.a56c11.2 = import_ref Main//lib, loc22_32, unloaded // CHECK:STDOUT: %field_decl.1ae: @IntRange.%IntRange.elem (%IntRange.elem.945) = field_decl start, element0, %Main.import_ref.a56c11.2 in [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc5_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f0a = ref_param_pattern [concrete = constants.%self.param_patt.d76] -// CHECK:STDOUT: %self.patt: %pattern_type.f0a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f77] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.start.end.7e8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.start.end.7e8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc5_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f0a = ref_param_pattern [concrete = constants.%self.param_patt.d76] -// CHECK:STDOUT: %self.patt: %pattern_type.f0a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f77] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.start.end.7e8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.start.end.7e8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9c3 = ref_param_pattern [concrete = constants.%self.param_patt.21f] -// CHECK:STDOUT: %self.patt: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bd1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %IntRange.773 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %IntRange.773 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc5_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9c3 = ref_param_pattern [concrete = constants.%self.param_patt.21f] -// CHECK:STDOUT: %self.patt: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bd1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %IntRange.773 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %IntRange.773 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .IntRange = imports.%Main.IntRange @@ -1186,7 +1143,7 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %x.var: ref %IntRange.773 = var_storage %x.var_patt // CHECK:STDOUT: %Range.ref: %Range.type = name_ref Range, imports.%Main.Range [concrete = constants.%Range] // CHECK:STDOUT: %y.ref: Core.IntLiteral = name_ref y, %y.loc4_18.2 [symbolic = %y.loc4_18.1 (constants.%y)] -// CHECK:STDOUT: %.loc5_3: ref %IntRange.773 = splice_block %x.var {} +// CHECK:STDOUT: %.loc5_3.1: ref %IntRange.773 = splice_block %x.var {} // CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60] // CHECK:STDOUT: %bound_method.loc5_38.1: = bound_method %y.ref, %impl.elem0 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] @@ -1194,7 +1151,7 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5_38.1: init %i32 = call %bound_method.loc5_38.2(%y.ref) [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5_38.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: %.loc5_38.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5_38.1 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5_38.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] // CHECK:STDOUT: %.loc5_38.2: %i32 = converted %y.ref, %.loc5_38.1 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5_38.2 (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.call)] -// CHECK:STDOUT: %Range.call: init %IntRange.773 to %.loc5_3 = call %Range.ref(%.loc5_38.2) +// CHECK:STDOUT: %Range.call: init %IntRange.773 to %.loc5_3.1 = call %Range.ref(%.loc5_38.2) // CHECK:STDOUT: assign %x.var, %Range.call // CHECK:STDOUT: %.loc5_28: type = splice_block %IntRange [concrete = constants.%IntRange.773] { // CHECK:STDOUT: %IntRange.ref: %IntRange.type = name_ref IntRange, imports.%Main.IntRange [concrete = constants.%IntRange.generic] @@ -1206,8 +1163,12 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: %x.patt: %pattern_type.9c3 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.9c3 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc5_3.1: %Destroy.type = facet_value constants.%IntRange.773, (constants.%DestroyImpl.impl_witness.acc, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.70a] +// CHECK:STDOUT: %.loc5_3.2: %Destroy.type = converted constants.%IntRange.773, %Destroy.facet.loc5_3.1 [concrete = constants.%Destroy.facet.70a] +// CHECK:STDOUT: %Destroy.facet.loc5_3.2: %Destroy.type = facet_value constants.%IntRange.773, (constants.%DestroyImpl.impl_witness.acc, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.70a] +// CHECK:STDOUT: %.loc5_3.3: %Destroy.type = converted constants.%IntRange.773, %Destroy.facet.loc5_3.2 [concrete = constants.%Destroy.facet.70a] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.70a) [concrete = constants.%SelfDestruct.specific_fn.7f7] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1243,56 +1204,45 @@ fn Read(generic y: Core.IntLiteral) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Range [from "lib.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_3.2(%self.param: ref %struct_type.start.end.7e8) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5_3.2(%self.param: ref %struct_type.start.end.7e8) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc5_3.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc5_3.1: = bound_method %.loc5_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc5_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc5_3.1(%.loc5_3.1) -// CHECK:STDOUT: %.loc5_3.2: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc5_3.2: = bound_method %.loc5_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc5_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc5_3.2(%.loc5_3.2) +// CHECK:STDOUT: %Destroy.facet.loc5_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc5_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc5_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc5_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc5_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc5_3.1) +// CHECK:STDOUT: %.loc5_3.4: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc5_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc5_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc5_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc5_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc5_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc5_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5_3.2(%self.param: ref %struct_type.start.end.7e8) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5_3.2(%self.param: ref %struct_type.start.end.7e8) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_3.3(%self.param: ref %IntRange.773) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5_3.3(%self.param: ref %IntRange.773) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %end.ref: %IntRange.elem.85f = name_ref end, imports.%Main.import_ref.eef [concrete = imports.%field_decl.b65] // CHECK:STDOUT: %.loc5_3.1: ref %i32 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc5_3.1: = bound_method %.loc5_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc5_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc5_3.1(%.loc5_3.1) +// CHECK:STDOUT: %Destroy.facet.loc5_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc5_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc5_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc5_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc5_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc5_3.1) // CHECK:STDOUT: %start.ref: %IntRange.elem.85f = name_ref start, imports.%Main.import_ref.9df [concrete = imports.%field_decl.1ae] -// CHECK:STDOUT: %.loc5_3.2: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc5_3.2: = bound_method %.loc5_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc5_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc5_3.2(%.loc5_3.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5_3.3(%self.param: ref %IntRange.773) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5_3.3(%self.param: ref %IntRange.773) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc5_3.4: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc5_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc5_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc5_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc5_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc5_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc5_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/for/basic.carbon b/toolchain/check/testdata/for/basic.carbon index 17026612084e..d1bec71834ea 100644 --- a/toolchain/check/testdata/for/basic.carbon +++ b/toolchain/check/testdata/for/basic.carbon @@ -65,17 +65,14 @@ fn Run() { // CHECK:STDOUT: %Optional.Get.c2b: %Optional.Get.type.f7a = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.23a: type = fn_type @Optional.HasValue, @Optional(%T.f84) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f8f: %Optional.HasValue.type.23a = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Copy.impl_witness.37a: = impl_witness imports.%Copy.impl_witness_table.229 [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %empty_tuple.type, (%Copy.impl_witness.37a) [concrete] // CHECK:STDOUT: %Iterate.impl_witness: = impl_witness @TrivialRange.as.Iterate.impl.%Iterate.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.d81: type = pattern_type %TrivialRange [concrete] // CHECK:STDOUT: %TrivialRange.as.Iterate.impl.NewCursor.type.de32c1.1: type = fn_type @TrivialRange.as.Iterate.impl.NewCursor.loc6_31.1 [concrete] // CHECK:STDOUT: %TrivialRange.as.Iterate.impl.NewCursor.93de00.1: %TrivialRange.as.Iterate.impl.NewCursor.type.de32c1.1 = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %Optional.9a5: type = class_type @Optional, @Optional(%Copy.facet) [concrete] -// CHECK:STDOUT: %pattern_type.5f2: type = pattern_type %Optional.9a5 [concrete] // CHECK:STDOUT: %TrivialRange.as.Iterate.impl.Next.type: type = fn_type @TrivialRange.as.Iterate.impl.Next [concrete] // CHECK:STDOUT: %TrivialRange.as.Iterate.impl.Next: %TrivialRange.as.Iterate.impl.Next.type = struct_value () [concrete] // CHECK:STDOUT: %Iterate.facet.38e: %Iterate.type = facet_value %TrivialRange, (%Iterate.impl_witness) [concrete] @@ -106,53 +103,35 @@ fn Run() { // CHECK:STDOUT: %TrivialRange.as.Iterate.impl.Next.bound: = bound_method %.50e, %TrivialRange.as.Iterate.impl.Next [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.e1d, @Optional.HasValue(%Copy.facet) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.fd5, @Optional.Get(%Copy.facet) [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_35.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc18_35.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_35.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_35.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc18_35.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_35.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.5ad: type = pattern_type %struct_type.has_value.value.da2 [concrete] -// CHECK:STDOUT: %self.param_patt.69f: %pattern_type.5ad = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a66: %pattern_type.5ad = wrapper_binding_pattern self, %self.param_patt.69f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_35.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc18_35.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.6e0: %pattern_type.5f2 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.bb7: %pattern_type.5f2 = wrapper_binding_pattern self, %self.param_patt.6e0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_35.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc18_35.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_35.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_20.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc18_20.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.f48: %pattern_type.d81 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3ed: %pattern_type.d81 = wrapper_binding_pattern self, %self.param_patt.f48 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_20.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc18_20.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_20.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.50e, %Destroy.WithSelf.SelfDestruct.db3fdb.6 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_35.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet.939: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_35.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_35.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.854: %SubobjectDestroy.type = facet_value %Optional.9a5, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.edb: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.854) [concrete] +// CHECK:STDOUT: %Destroy.facet.a93: %Destroy.type = facet_value %Optional.9a5, (%DestroyImpl.impl_witness.edb, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.6: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_20.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.6: %SubobjectDestroy.WithSelf.Op.type.6870fd.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.6: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.6), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.328: %SubobjectDestroy.type = facet_value %TrivialRange, (%custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.9c7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.328) [concrete] +// CHECK:STDOUT: %Destroy.facet.7d8: %Destroy.type = facet_value %TrivialRange, (%DestroyImpl.impl_witness.9c7, %custom_witness.b80ef6.6) [concrete] // CHECK:STDOUT: %empty_tuple.type.as.Copy.impl.Op.type: type = fn_type @empty_tuple.type.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %empty_tuple.type.as.Copy.impl.Op: %empty_tuple.type.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -164,99 +143,14 @@ fn Run() { // CHECK:STDOUT: %Core.import_ref.2f6: @Optional.%Optional.elem.2 (%Optional.elem.a1f) = import_ref Core//prelude/parts/iterate, inst{{[0-9A-F]+}} [indirect], loaded [concrete = %field_decl.b75] // CHECK:STDOUT: %Core.import_ref.9c3: %empty_tuple.type.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%empty_tuple.type.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.229 = impl_witness_table (%Core.import_ref.9c3), @empty_tuple.type.as.Copy.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.127 = import_ref Core//prelude/parts/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %field_decl.b75: @Optional.%Optional.elem.2 (%Optional.elem.a1f) = field_decl value, element1, %Core.import_ref.127 in [concrete] {} // CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/parts/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %field_decl.897: @Optional.%Optional.elem.1 (%Optional.elem.fbd) = field_decl has_value, element0, %Core.import_ref.b0d in [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_35.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc18_35.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_35.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc18_35.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_35.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5ad = ref_param_pattern [concrete = constants.%self.param_patt.69f] -// CHECK:STDOUT: %self.patt: %pattern_type.5ad = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a66] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.has_value.value.da2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.has_value.value.da2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc18_35.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5ad = ref_param_pattern [concrete = constants.%self.param_patt.69f] -// CHECK:STDOUT: %self.patt: %pattern_type.5ad = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a66] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.has_value.value.da2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.has_value.value.da2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_35.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f2 = ref_param_pattern [concrete = constants.%self.param_patt.6e0] -// CHECK:STDOUT: %self.patt: %pattern_type.5f2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bb7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.9a5 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.9a5 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc18_35.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f2 = ref_param_pattern [concrete = constants.%self.param_patt.6e0] -// CHECK:STDOUT: %self.patt: %pattern_type.5f2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bb7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.9a5 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.9a5 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_20.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc18_20.1 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_20.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d81 = ref_param_pattern [concrete = constants.%self.param_patt.f48] -// CHECK:STDOUT: %self.patt: %pattern_type.d81 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3ed] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %TrivialRange = ref_param call_param0 -// CHECK:STDOUT: %self: ref %TrivialRange = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc18_20.2 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d81 = ref_param_pattern [concrete = constants.%self.param_patt.f48] -// CHECK:STDOUT: %self.patt: %pattern_type.d81 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3ed] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %TrivialRange = ref_param call_param0 -// CHECK:STDOUT: %self: ref %TrivialRange = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { @@ -315,106 +209,89 @@ fn Run() { // CHECK:STDOUT: %_: %empty_tuple.type = wrapper_binding _, %.loc18_35.11 // CHECK:STDOUT: %Body.ref: %Body.type = name_ref Body, file.%Body.decl [concrete = constants.%Body] // CHECK:STDOUT: %Body.call: init %empty_tuple.type = call %Body.ref() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_35.1: = bound_method %.loc18_35.10, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_35.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_35.1(%.loc18_35.10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_35.2: = bound_method %.loc18_35.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_35.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_35.2(%.loc18_35.2) +// CHECK:STDOUT: %Destroy.facet.loc18_35.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc18_35.12: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_35.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc18_35.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc18_35.13: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_35.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc18_35.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc18_35.10) +// CHECK:STDOUT: %Destroy.facet.loc18_35.3: %Destroy.type = facet_value constants.%Optional.9a5, (constants.%DestroyImpl.impl_witness.edb, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.a93] +// CHECK:STDOUT: %.loc18_35.14: %Destroy.type = converted constants.%Optional.9a5, %Destroy.facet.loc18_35.3 [concrete = constants.%Destroy.facet.a93] +// CHECK:STDOUT: %Destroy.facet.loc18_35.4: %Destroy.type = facet_value constants.%Optional.9a5, (constants.%DestroyImpl.impl_witness.edb, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.a93] +// CHECK:STDOUT: %.loc18_35.15: %Destroy.type = converted constants.%Optional.9a5, %Destroy.facet.loc18_35.4 [concrete = constants.%Destroy.facet.a93] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc18_35.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc18_35.2) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_35.3: = bound_method %.loc18_35.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_35.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_35.3(%.loc18_35.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_35.4: = bound_method %var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_35.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_35.4(%var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_20: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.50e) +// CHECK:STDOUT: %Destroy.facet.loc18_35.5: %Destroy.type = facet_value constants.%Optional.9a5, (constants.%DestroyImpl.impl_witness.edb, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.a93] +// CHECK:STDOUT: %.loc18_35.16: %Destroy.type = converted constants.%Optional.9a5, %Destroy.facet.loc18_35.5 [concrete = constants.%Destroy.facet.a93] +// CHECK:STDOUT: %Destroy.facet.loc18_35.6: %Destroy.type = facet_value constants.%Optional.9a5, (constants.%DestroyImpl.impl_witness.edb, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.a93] +// CHECK:STDOUT: %.loc18_35.17: %Destroy.type = converted constants.%Optional.9a5, %Destroy.facet.loc18_35.6 [concrete = constants.%Destroy.facet.a93] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc18_35.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc18_35.2) +// CHECK:STDOUT: %Destroy.facet.loc18_35.7: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc18_35.18: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_35.7 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc18_35.8: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc18_35.19: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_35.8 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc18_35.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) +// CHECK:STDOUT: %Destroy.facet.loc18_20.1: %Destroy.type = facet_value constants.%TrivialRange, (constants.%DestroyImpl.impl_witness.9c7, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.7d8] +// CHECK:STDOUT: %.loc18_20.5: %Destroy.type = converted constants.%TrivialRange, %Destroy.facet.loc18_20.1 [concrete = constants.%Destroy.facet.7d8] +// CHECK:STDOUT: %Destroy.facet.loc18_20.2: %Destroy.type = facet_value constants.%TrivialRange, (constants.%DestroyImpl.impl_witness.9c7, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.7d8] +// CHECK:STDOUT: %.loc18_20.6: %Destroy.type = converted constants.%TrivialRange, %Destroy.facet.loc18_20.2 [concrete = constants.%Destroy.facet.7d8] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc18_20: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc18_20.2) // CHECK:STDOUT: %AfterLoop.ref: %AfterLoop.type = name_ref AfterLoop, file.%AfterLoop.decl [concrete = constants.%AfterLoop] // CHECK:STDOUT: %AfterLoop.call: init %empty_tuple.type = call %AfterLoop.ref() // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_35.1(%self.param: ref %empty_tuple.type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_35.1(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_35.1(%self.param: ref %empty_tuple.type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_35.2(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_35.1(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_35.2(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_35.2(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_35.2(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_35.3(%self.param: ref %struct_type.has_value.value.da2) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_35.3(%self.param: ref %struct_type.has_value.value.da2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18_35.1: ref %empty_tuple.type = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_35.1: = bound_method %.loc18_35.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_35.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_35.1(%.loc18_35.1) -// CHECK:STDOUT: %.loc18_35.2: ref bool = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_35.2: = bound_method %.loc18_35.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_35.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_35.2(%.loc18_35.2) +// CHECK:STDOUT: %Destroy.facet.loc18_35.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc18_35.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_35.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc18_35.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc18_35.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_35.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc18_35.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc18_35.1) +// CHECK:STDOUT: %.loc18_35.4: ref bool = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc18_35.3: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc18_35.5: %Destroy.type = converted bool, %Destroy.facet.loc18_35.3 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc18_35.4: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc18_35.6: %Destroy.type = converted bool, %Destroy.facet.loc18_35.4 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc18_35.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc18_35.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_35.3(%self.param: ref %struct_type.has_value.value.da2) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_35.3(%self.param: ref %struct_type.has_value.value.da2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_35.4(%self.param: ref %Optional.9a5) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_35.4(%self.param: ref %Optional.9a5) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %value.ref: %Optional.elem.5ec = name_ref value, imports.%Core.import_ref.2f6 [concrete = imports.%field_decl.b75] // CHECK:STDOUT: %.loc18_35.1: ref %empty_tuple.type = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_35.1: = bound_method %.loc18_35.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_35.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_35.1(%.loc18_35.1) +// CHECK:STDOUT: %Destroy.facet.loc18_35.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc18_35.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_35.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc18_35.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc18_35.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc18_35.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc18_35.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc18_35.1) // CHECK:STDOUT: %has_value.ref: %Optional.elem.ac4 = name_ref has_value, imports.%Core.import_ref.5d0 [concrete = imports.%field_decl.897] -// CHECK:STDOUT: %.loc18_35.2: ref bool = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_35.2: = bound_method %.loc18_35.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_35.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_35.2(%.loc18_35.2) +// CHECK:STDOUT: %.loc18_35.4: ref bool = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc18_35.3: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc18_35.5: %Destroy.type = converted bool, %Destroy.facet.loc18_35.3 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc18_35.4: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc18_35.6: %Destroy.type = converted bool, %Destroy.facet.loc18_35.4 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc18_35.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc18_35.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_35.4(%self.param: ref %Optional.9a5) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_20.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_35.4(%self.param: ref %Optional.9a5) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_20.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_20.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_20.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_20.2(%self.param: ref %TrivialRange) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.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 46f18c8653b8..3aa8b854f206 100644 --- a/toolchain/check/testdata/for/pattern.carbon +++ b/toolchain/check/testdata/for/pattern.carbon @@ -137,7 +137,6 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.c31: type = class_type @EmptyRange, @EmptyRange(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.Make.type.14e: type = fn_type @EmptyRange.Make, @EmptyRange(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.Make.82d: %EmptyRange.Make.type.14e = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.dc0: type = pattern_type %EmptyRange.c31 [concrete] // CHECK:STDOUT: %EmptyRange.Make.specific_fn: = specific_function %EmptyRange.Make.82d, @EmptyRange.Make(%Copy.facet) [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %Optional.afc: type = class_type @Optional, @Optional(%T.f84) [symbolic] @@ -147,12 +146,10 @@ fn Run() { // CHECK:STDOUT: %Optional.Get.c2b: %Optional.Get.type.f7a = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.23a: type = fn_type @Optional.HasValue, @Optional(%T.f84) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f8f: %Optional.HasValue.type.23a = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.type.e76: type = fn_type @EmptyRange.as.Iterate.impl.Next, @EmptyRange.as.Iterate.impl(%T.f84) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.706: %EmptyRange.as.Iterate.impl.Next.type.e76 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.c99: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%T.f84) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.f76: %EmptyRange.as.Iterate.impl.NewCursor.type.c99 = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] // CHECK:STDOUT: %Iterate.impl_witness.562: = impl_witness imports.%Iterate.impl_witness_table, @EmptyRange.as.Iterate.impl(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.1bb: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.84b: %EmptyRange.as.Iterate.impl.NewCursor.type.1bb = struct_value () [concrete] @@ -165,7 +162,6 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.NewCursor.84b, @EmptyRange.as.Iterate.impl.NewCursor(%Copy.facet) [concrete] // CHECK:STDOUT: %.0fb: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.d3a, %Iterate.facet [concrete] // CHECK:STDOUT: %Optional.5b4: type = class_type @Optional, @Optional(%Copy.facet) [concrete] -// CHECK:STDOUT: %pattern_type.a80: type = pattern_type %Optional.5b4 [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.Next.7e7, @EmptyRange.as.Iterate.impl.Next(%Copy.facet) [concrete] // CHECK:STDOUT: %Optional.HasValue.type.371: type = fn_type @Optional.HasValue, @Optional(%Copy.facet) [concrete] // CHECK:STDOUT: %Optional.HasValue.766: %Optional.HasValue.type.371 = struct_value () [concrete] @@ -176,53 +172,41 @@ fn Run() { // CHECK:STDOUT: %struct_type.has_value.value.9e7: type = struct_type {.has_value: bool, .value: %C} [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.766, @Optional.HasValue(%Copy.facet) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.c2f, @Optional.Get(%Copy.facet) [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_36.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_36.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_36.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_36.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_36.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_36.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_36.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_36.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_36.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.1a1: type = pattern_type %struct_type.has_value.value.9e7 [concrete] -// CHECK:STDOUT: %self.param_patt.c09: %pattern_type.1a1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.343: %pattern_type.1a1 = wrapper_binding_pattern self, %self.param_patt.c09 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_36.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10_36.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c14: %pattern_type.a80 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.000: %pattern_type.a80 = wrapper_binding_pattern self, %self.param_patt.c14 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_36.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc10_36.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_36.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b71: %pattern_type.dc0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.c0c: %pattern_type.dc0 = wrapper_binding_pattern self, %self.param_patt.b71 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_35 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc10_35 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_35 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_36.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_36.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_36.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_36.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.969: %SubobjectDestroy.type = facet_value %Optional.5b4, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d97: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.969) [concrete] +// CHECK:STDOUT: %Destroy.facet.607: %Destroy.type = facet_value %Optional.5b4, (%DestroyImpl.impl_witness.d97, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6b7: %SubobjectDestroy.type = facet_value %empty_struct_type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.011: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6b7) [concrete] +// CHECK:STDOUT: %Destroy.facet.fed: %Destroy.type = facet_value %empty_struct_type, (%DestroyImpl.impl_witness.011, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.6: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_35 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.6: %SubobjectDestroy.WithSelf.Op.type.6870fd.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.6: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.6), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0c7: %SubobjectDestroy.type = facet_value %EmptyRange.c31, (%custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.eea: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0c7) [concrete] +// CHECK:STDOUT: %Destroy.facet.d45: %Destroy.type = facet_value %EmptyRange.c31, (%DestroyImpl.impl_witness.eea, %custom_witness.b80ef6.6) [concrete] // CHECK:STDOUT: %C.as.Copy.impl.Op.type: type = fn_type @C.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %C.as.Copy.impl.Op: %C.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -242,99 +226,14 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.9b4: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.c99) = import_ref Main//empty_range, loc8_37, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.f76)] // CHECK:STDOUT: %Main.import_ref.405: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.e76) = import_ref Main//empty_range, loc11_69, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.706)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.71a, %Main.import_ref.999, %Main.import_ref.9b4, %Main.import_ref.405), @EmptyRange.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.127 = import_ref Core//prelude/parts/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %field_decl.b75: @Optional.%Optional.elem.2 (%Optional.elem.a1f) = field_decl value, element1, %Core.import_ref.127 in [concrete] {} // CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/parts/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %field_decl.897: @Optional.%Optional.elem.1 (%Optional.elem.fbd) = field_decl has_value, element0, %Core.import_ref.b0d in [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_36.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_36.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_36.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_36.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_36.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_36.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_36.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1a1 = ref_param_pattern [concrete = constants.%self.param_patt.c09] -// CHECK:STDOUT: %self.patt: %pattern_type.1a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.343] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.has_value.value.9e7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.has_value.value.9e7 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10_36.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1a1 = ref_param_pattern [concrete = constants.%self.param_patt.c09] -// CHECK:STDOUT: %self.patt: %pattern_type.1a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.343] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.has_value.value.9e7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.has_value.value.9e7 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_36.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a80 = ref_param_pattern [concrete = constants.%self.param_patt.c14] -// CHECK:STDOUT: %self.patt: %pattern_type.a80 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.000] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.5b4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.5b4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc10_36.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a80 = ref_param_pattern [concrete = constants.%self.param_patt.c14] -// CHECK:STDOUT: %self.patt: %pattern_type.a80 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.000] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.5b4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.5b4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_35 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = ref_param_pattern [concrete = constants.%self.param_patt.b71] -// CHECK:STDOUT: %self.patt: %pattern_type.dc0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c0c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %EmptyRange.c31 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %EmptyRange.c31 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc10_35 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = ref_param_pattern [concrete = constants.%self.param_patt.b71] -// CHECK:STDOUT: %self.patt: %pattern_type.dc0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c0c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %EmptyRange.c31 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %EmptyRange.c31 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { @@ -397,107 +296,89 @@ fn Run() { // CHECK:STDOUT: %Body.ref: %Body.type = name_ref Body, file.%Body.decl [concrete = constants.%Body] // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %Body.call: init %empty_tuple.type = call %Body.ref(%c.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_36.1: = bound_method %.loc10_36.10, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_36.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_36.1(%.loc10_36.10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_36.2: = bound_method %.loc10_36.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_36.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_36.2(%.loc10_36.2) +// CHECK:STDOUT: %Destroy.facet.loc10_36.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_36.12: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_36.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_36.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_36.13: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_36.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_36.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_36.10) +// CHECK:STDOUT: %Destroy.facet.loc10_36.3: %Destroy.type = facet_value constants.%Optional.5b4, (constants.%DestroyImpl.impl_witness.d97, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %.loc10_36.14: %Destroy.type = converted constants.%Optional.5b4, %Destroy.facet.loc10_36.3 [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %Destroy.facet.loc10_36.4: %Destroy.type = facet_value constants.%Optional.5b4, (constants.%DestroyImpl.impl_witness.d97, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %.loc10_36.15: %Destroy.type = converted constants.%Optional.5b4, %Destroy.facet.loc10_36.4 [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_36.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_36.2) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_36.3: = bound_method %.loc10_36.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_36.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_36.3(%.loc10_36.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_36.4: = bound_method %var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_36.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_36.4(%var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_35: = bound_method %.loc10_35.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_35: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_35(%.loc10_35.2) +// CHECK:STDOUT: %Destroy.facet.loc10_36.5: %Destroy.type = facet_value constants.%Optional.5b4, (constants.%DestroyImpl.impl_witness.d97, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %.loc10_36.16: %Destroy.type = converted constants.%Optional.5b4, %Destroy.facet.loc10_36.5 [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %Destroy.facet.loc10_36.6: %Destroy.type = facet_value constants.%Optional.5b4, (constants.%DestroyImpl.impl_witness.d97, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %.loc10_36.17: %Destroy.type = converted constants.%Optional.5b4, %Destroy.facet.loc10_36.6 [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_36.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc10_36.2) +// CHECK:STDOUT: %Destroy.facet.loc10_36.7: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_36.18: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_36.7 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %Destroy.facet.loc10_36.8: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_36.19: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_36.8 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_36.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) +// CHECK:STDOUT: %Destroy.facet.loc10_35.1: %Destroy.type = facet_value constants.%EmptyRange.c31, (constants.%DestroyImpl.impl_witness.eea, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.d45] +// CHECK:STDOUT: %.loc10_35.5: %Destroy.type = converted constants.%EmptyRange.c31, %Destroy.facet.loc10_35.1 [concrete = constants.%Destroy.facet.d45] +// CHECK:STDOUT: %Destroy.facet.loc10_35.2: %Destroy.type = facet_value constants.%EmptyRange.c31, (constants.%DestroyImpl.impl_witness.eea, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.d45] +// CHECK:STDOUT: %.loc10_35.6: %Destroy.type = converted constants.%EmptyRange.c31, %Destroy.facet.loc10_35.2 [concrete = constants.%Destroy.facet.d45] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_35: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc10_35.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_36.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_36.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_36.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_36.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_36.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_36.3(%self.param: ref bool) = "no_op"; // 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_36.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_36.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_36.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_36.3(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_36.4(%self.param: ref %struct_type.has_value.value.9e7) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_36.4(%self.param: ref %struct_type.has_value.value.9e7) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc10_36.1: ref %C = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_36.1: = bound_method %.loc10_36.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_36.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_36.1(%.loc10_36.1) -// CHECK:STDOUT: %.loc10_36.2: ref bool = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_36.2: = bound_method %.loc10_36.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_36.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_36.2(%.loc10_36.2) +// CHECK:STDOUT: %Destroy.facet.loc10_36.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_36.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_36.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_36.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_36.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_36.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_36.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_36.1) +// CHECK:STDOUT: %.loc10_36.4: ref bool = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc10_36.3: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_36.5: %Destroy.type = converted bool, %Destroy.facet.loc10_36.3 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc10_36.4: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_36.6: %Destroy.type = converted bool, %Destroy.facet.loc10_36.4 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_36.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_36.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_36.4(%self.param: ref %struct_type.has_value.value.9e7) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_36.4(%self.param: ref %struct_type.has_value.value.9e7) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_36.5(%self.param: ref %Optional.5b4) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_36.5(%self.param: ref %Optional.5b4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %value.ref: %Optional.elem.433 = name_ref value, imports.%Core.import_ref.2f6 [concrete = imports.%field_decl.b75] // CHECK:STDOUT: %.loc10_36.1: ref %C = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_36.1: = bound_method %.loc10_36.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_36.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_36.1(%.loc10_36.1) +// CHECK:STDOUT: %Destroy.facet.loc10_36.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_36.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_36.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_36.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_36.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_36.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_36.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_36.1) // CHECK:STDOUT: %has_value.ref: %Optional.elem.606 = name_ref has_value, imports.%Core.import_ref.5d0 [concrete = imports.%field_decl.897] -// CHECK:STDOUT: %.loc10_36.2: ref bool = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_36.2: = bound_method %.loc10_36.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_36.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_36.2(%.loc10_36.2) +// CHECK:STDOUT: %.loc10_36.4: ref bool = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc10_36.3: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_36.5: %Destroy.type = converted bool, %Destroy.facet.loc10_36.3 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc10_36.4: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_36.6: %Destroy.type = converted bool, %Destroy.facet.loc10_36.4 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_36.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_36.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_36.5(%self.param: ref %Optional.5b4) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_36.5(%self.param: ref %Optional.5b4) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_35(%self.param: ref %EmptyRange.c31) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_35(%self.param: ref %EmptyRange.c31) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_35(%self.param: ref %EmptyRange.c31) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_35(%self.param: ref %EmptyRange.c31) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- var.carbon // CHECK:STDOUT: @@ -524,7 +405,6 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.c31: type = class_type @EmptyRange, @EmptyRange(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.Make.type.14e: type = fn_type @EmptyRange.Make, @EmptyRange(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.Make.82d: %EmptyRange.Make.type.14e = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.dc0: type = pattern_type %EmptyRange.c31 [concrete] // CHECK:STDOUT: %EmptyRange.Make.specific_fn: = specific_function %EmptyRange.Make.82d, @EmptyRange.Make(%Copy.facet) [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %Optional.afc: type = class_type @Optional, @Optional(%T.f84) [symbolic] @@ -534,12 +414,10 @@ fn Run() { // CHECK:STDOUT: %Optional.Get.c2b: %Optional.Get.type.f7a = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.23a: type = fn_type @Optional.HasValue, @Optional(%T.f84) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f8f: %Optional.HasValue.type.23a = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.type.e76: type = fn_type @EmptyRange.as.Iterate.impl.Next, @EmptyRange.as.Iterate.impl(%T.f84) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.706: %EmptyRange.as.Iterate.impl.Next.type.e76 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.c99: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%T.f84) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.f76: %EmptyRange.as.Iterate.impl.NewCursor.type.c99 = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] // CHECK:STDOUT: %Iterate.impl_witness.562: = impl_witness imports.%Iterate.impl_witness_table, @EmptyRange.as.Iterate.impl(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.1bb: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.84b: %EmptyRange.as.Iterate.impl.NewCursor.type.1bb = struct_value () [concrete] @@ -552,7 +430,6 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.NewCursor.84b, @EmptyRange.as.Iterate.impl.NewCursor(%Copy.facet) [concrete] // CHECK:STDOUT: %.0fb: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.d3a, %Iterate.facet [concrete] // CHECK:STDOUT: %Optional.5b4: type = class_type @Optional, @Optional(%Copy.facet) [concrete] -// CHECK:STDOUT: %pattern_type.a80: type = pattern_type %Optional.5b4 [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.Next.7e7, @EmptyRange.as.Iterate.impl.Next(%Copy.facet) [concrete] // CHECK:STDOUT: %Optional.HasValue.type.371: type = fn_type @Optional.HasValue, @Optional(%Copy.facet) [concrete] // CHECK:STDOUT: %Optional.HasValue.766: %Optional.HasValue.type.371 = struct_value () [concrete] @@ -563,53 +440,41 @@ fn Run() { // CHECK:STDOUT: %struct_type.has_value.value.9e7: type = struct_type {.has_value: bool, .value: %C} [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.766, @Optional.HasValue(%Copy.facet) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.c2f, @Optional.Get(%Copy.facet) [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_40.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_40.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_40.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_40.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_40.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_40.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_40.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_40.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_40.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.1a1: type = pattern_type %struct_type.has_value.value.9e7 [concrete] -// CHECK:STDOUT: %self.param_patt.c09: %pattern_type.1a1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.343: %pattern_type.1a1 = wrapper_binding_pattern self, %self.param_patt.c09 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_40.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10_40.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c14: %pattern_type.a80 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.000: %pattern_type.a80 = wrapper_binding_pattern self, %self.param_patt.c14 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_40.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc10_40.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_40.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b71: %pattern_type.dc0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.c0c: %pattern_type.dc0 = wrapper_binding_pattern self, %self.param_patt.b71 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_39 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc10_39 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_39 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_40.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_40.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_40.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_40.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.969: %SubobjectDestroy.type = facet_value %Optional.5b4, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d97: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.969) [concrete] +// CHECK:STDOUT: %Destroy.facet.607: %Destroy.type = facet_value %Optional.5b4, (%DestroyImpl.impl_witness.d97, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6b7: %SubobjectDestroy.type = facet_value %empty_struct_type, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.011: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6b7) [concrete] +// CHECK:STDOUT: %Destroy.facet.fed: %Destroy.type = facet_value %empty_struct_type, (%DestroyImpl.impl_witness.011, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.6: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_39 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.6: %SubobjectDestroy.WithSelf.Op.type.6870fd.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.6: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.6), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0c7: %SubobjectDestroy.type = facet_value %EmptyRange.c31, (%custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.eea: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0c7) [concrete] +// CHECK:STDOUT: %Destroy.facet.d45: %Destroy.type = facet_value %EmptyRange.c31, (%DestroyImpl.impl_witness.eea, %custom_witness.b80ef6.6) [concrete] // CHECK:STDOUT: %C.as.Copy.impl.Op.type: type = fn_type @C.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %C.as.Copy.impl.Op: %C.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -629,99 +494,14 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.9b4: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.c99) = import_ref Main//empty_range, loc8_37, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.f76)] // CHECK:STDOUT: %Main.import_ref.405: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.e76) = import_ref Main//empty_range, loc11_69, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.706)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.71a, %Main.import_ref.999, %Main.import_ref.9b4, %Main.import_ref.405), @EmptyRange.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.127 = import_ref Core//prelude/parts/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %field_decl.b75: @Optional.%Optional.elem.2 (%Optional.elem.a1f) = field_decl value, element1, %Core.import_ref.127 in [concrete] {} // CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/parts/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %field_decl.897: @Optional.%Optional.elem.1 (%Optional.elem.fbd) = field_decl has_value, element0, %Core.import_ref.b0d in [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_40.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_40.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_40.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_40.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_40.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_40.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_40.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1a1 = ref_param_pattern [concrete = constants.%self.param_patt.c09] -// CHECK:STDOUT: %self.patt: %pattern_type.1a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.343] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.has_value.value.9e7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.has_value.value.9e7 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10_40.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1a1 = ref_param_pattern [concrete = constants.%self.param_patt.c09] -// CHECK:STDOUT: %self.patt: %pattern_type.1a1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.343] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.has_value.value.9e7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.has_value.value.9e7 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_40.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a80 = ref_param_pattern [concrete = constants.%self.param_patt.c14] -// CHECK:STDOUT: %self.patt: %pattern_type.a80 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.000] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.5b4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.5b4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc10_40.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a80 = ref_param_pattern [concrete = constants.%self.param_patt.c14] -// CHECK:STDOUT: %self.patt: %pattern_type.a80 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.000] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.5b4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.5b4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_39 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = ref_param_pattern [concrete = constants.%self.param_patt.b71] -// CHECK:STDOUT: %self.patt: %pattern_type.dc0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c0c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %EmptyRange.c31 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %EmptyRange.c31 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc10_39 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = ref_param_pattern [concrete = constants.%self.param_patt.b71] -// CHECK:STDOUT: %self.patt: %pattern_type.dc0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c0c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %EmptyRange.c31 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %EmptyRange.c31 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.var: ref %C = var_storage %c.var_patt @@ -776,9 +556,9 @@ fn Run() { // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc10_40.2, %Get.ref // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%Copy.facet) [concrete = constants.%Optional.Get.specific_fn] // CHECK:STDOUT: %bound_method.loc10_40.6: = bound_method %.loc10_40.2, %Optional.Get.specific_fn -// CHECK:STDOUT: %.loc10_8: ref %C = splice_block %c.var {} +// CHECK:STDOUT: %.loc10_8.1: ref %C = splice_block %c.var {} // CHECK:STDOUT: %.loc10_40.8: %Optional.5b4 = acquire_value %.loc10_40.2 -// CHECK:STDOUT: %Optional.Get.call: init %C to %.loc10_8 = call %bound_method.loc10_40.6(%.loc10_40.8) +// CHECK:STDOUT: %Optional.Get.call: init %C to %.loc10_8.1 = call %bound_method.loc10_40.6(%.loc10_40.8) // CHECK:STDOUT: assign %c.var, %Optional.Get.call // CHECK:STDOUT: %C.ref.loc10_15: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = wrapper_binding c, %c.var @@ -786,109 +566,95 @@ fn Run() { // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %addr: %ptr.6b6 = addr_of %c.ref // CHECK:STDOUT: %Body.call: init %empty_tuple.type = call %Body.ref(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_40.1: = bound_method %.loc10_40.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_40.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_40.1(%.loc10_40.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_8.1: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_8.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_8.1(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc10_40.1: %Destroy.type = facet_value constants.%Optional.5b4, (constants.%DestroyImpl.impl_witness.d97, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %.loc10_40.9: %Destroy.type = converted constants.%Optional.5b4, %Destroy.facet.loc10_40.1 [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %Destroy.facet.loc10_40.2: %Destroy.type = facet_value constants.%Optional.5b4, (constants.%DestroyImpl.impl_witness.d97, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %.loc10_40.10: %Destroy.type = converted constants.%Optional.5b4, %Destroy.facet.loc10_40.2 [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_40.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_40.2) +// CHECK:STDOUT: %Destroy.facet.loc10_8.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_8.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_8.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_8.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_8.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_8.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_8.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%c.var) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_40.2: = bound_method %.loc10_40.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_40.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_40.2(%.loc10_40.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_8.2: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_8.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_8.2(%c.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_40.3: = bound_method %var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_40.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_40.3(%var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_39: = bound_method %.loc10_39.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_39: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_39(%.loc10_39.2) +// CHECK:STDOUT: %Destroy.facet.loc10_40.3: %Destroy.type = facet_value constants.%Optional.5b4, (constants.%DestroyImpl.impl_witness.d97, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %.loc10_40.11: %Destroy.type = converted constants.%Optional.5b4, %Destroy.facet.loc10_40.3 [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %Destroy.facet.loc10_40.4: %Destroy.type = facet_value constants.%Optional.5b4, (constants.%DestroyImpl.impl_witness.d97, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: %.loc10_40.12: %Destroy.type = converted constants.%Optional.5b4, %Destroy.facet.loc10_40.4 [concrete = constants.%Destroy.facet.607] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_40.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc10_40.2) +// CHECK:STDOUT: %Destroy.facet.loc10_8.3: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_8.4: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_8.3 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_8.4: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_8.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_8.4 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_8.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc10_40.5: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_40.13: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_40.5 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %Destroy.facet.loc10_40.6: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_40.14: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_40.6 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_40.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%var) +// CHECK:STDOUT: %Destroy.facet.loc10_39.1: %Destroy.type = facet_value constants.%EmptyRange.c31, (constants.%DestroyImpl.impl_witness.eea, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.d45] +// CHECK:STDOUT: %.loc10_39.5: %Destroy.type = converted constants.%EmptyRange.c31, %Destroy.facet.loc10_39.1 [concrete = constants.%Destroy.facet.d45] +// CHECK:STDOUT: %Destroy.facet.loc10_39.2: %Destroy.type = facet_value constants.%EmptyRange.c31, (constants.%DestroyImpl.impl_witness.eea, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.d45] +// CHECK:STDOUT: %.loc10_39.6: %Destroy.type = converted constants.%EmptyRange.c31, %Destroy.facet.loc10_39.2 [concrete = constants.%Destroy.facet.d45] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_39: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%.loc10_39.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_40.1(%self.param: ref bool) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_40.1(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_40.1(%self.param: ref bool) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_40.2(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_40.1(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_40.3(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_40.2(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_40.2(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_40.2(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_40.3(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_40.4(%self.param: ref %struct_type.has_value.value.9e7) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_40.4(%self.param: ref %struct_type.has_value.value.9e7) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc10_40.1: ref %C = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_40.1: = bound_method %.loc10_40.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_40.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_40.1(%.loc10_40.1) -// CHECK:STDOUT: %.loc10_40.2: ref bool = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_40.2: = bound_method %.loc10_40.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_40.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_40.2(%.loc10_40.2) +// CHECK:STDOUT: %Destroy.facet.loc10_40.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_40.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_40.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_40.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_40.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_40.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_40.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_40.1) +// CHECK:STDOUT: %.loc10_40.4: ref bool = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc10_40.3: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_40.5: %Destroy.type = converted bool, %Destroy.facet.loc10_40.3 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc10_40.4: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_40.6: %Destroy.type = converted bool, %Destroy.facet.loc10_40.4 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_40.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_40.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_40.4(%self.param: ref %struct_type.has_value.value.9e7) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_40.4(%self.param: ref %struct_type.has_value.value.9e7) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_40.5(%self.param: ref %Optional.5b4) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_40.5(%self.param: ref %Optional.5b4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %value.ref: %Optional.elem.433 = name_ref value, imports.%Core.import_ref.2f6 [concrete = imports.%field_decl.b75] // CHECK:STDOUT: %.loc10_40.1: ref %C = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_40.1: = bound_method %.loc10_40.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_40.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_40.1(%.loc10_40.1) +// CHECK:STDOUT: %Destroy.facet.loc10_40.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_40.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_40.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_40.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_40.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_40.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_40.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_40.1) // CHECK:STDOUT: %has_value.ref: %Optional.elem.606 = name_ref has_value, imports.%Core.import_ref.5d0 [concrete = imports.%field_decl.897] -// CHECK:STDOUT: %.loc10_40.2: ref bool = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_40.2: = bound_method %.loc10_40.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_40.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_40.2(%.loc10_40.2) +// CHECK:STDOUT: %.loc10_40.4: ref bool = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc10_40.3: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_40.5: %Destroy.type = converted bool, %Destroy.facet.loc10_40.3 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc10_40.4: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_40.6: %Destroy.type = converted bool, %Destroy.facet.loc10_40.4 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_40.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_40.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_40.5(%self.param: ref %Optional.5b4) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_40.5(%self.param: ref %Optional.5b4) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_39(%self.param: ref %EmptyRange.c31) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_39(%self.param: ref %EmptyRange.c31) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_39(%self.param: ref %EmptyRange.c31) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_39(%self.param: ref %EmptyRange.c31) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- tuple.carbon // CHECK:STDOUT: @@ -923,7 +689,6 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.7d6: type = class_type @EmptyRange, @EmptyRange(%Copy.facet.fa2) [concrete] // CHECK:STDOUT: %EmptyRange.Make.type.408: type = fn_type @EmptyRange.Make, @EmptyRange(%Copy.facet.fa2) [concrete] // CHECK:STDOUT: %EmptyRange.Make.94c: %EmptyRange.Make.type.408 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.0ff: type = pattern_type %EmptyRange.7d6 [concrete] // CHECK:STDOUT: %EmptyRange.Make.specific_fn: = specific_function %EmptyRange.Make.94c, @EmptyRange.Make(%Copy.facet.fa2) [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %Optional.afc: type = class_type @Optional, @Optional(%T.f84) [symbolic] @@ -937,7 +702,6 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.706: %EmptyRange.as.Iterate.impl.Next.type.e76 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.c99: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%T.f84) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.f76: %EmptyRange.as.Iterate.impl.NewCursor.type.c99 = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] // CHECK:STDOUT: %Iterate.impl_witness.aa8: = impl_witness imports.%Iterate.impl_witness_table, @EmptyRange.as.Iterate.impl(%Copy.facet.fa2) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.35f: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%Copy.facet.fa2) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.54f: %EmptyRange.as.Iterate.impl.NewCursor.type.35f = struct_value () [concrete] @@ -950,7 +714,6 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.NewCursor.54f, @EmptyRange.as.Iterate.impl.NewCursor(%Copy.facet.fa2) [concrete] // CHECK:STDOUT: %.d55: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.a45, %Iterate.facet [concrete] // CHECK:STDOUT: %Optional.9ca: type = class_type @Optional, @Optional(%Copy.facet.fa2) [concrete] -// CHECK:STDOUT: %pattern_type.b8c: type = pattern_type %Optional.9ca [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.Next.03d, @EmptyRange.as.Iterate.impl.Next(%Copy.facet.fa2) [concrete] // CHECK:STDOUT: %Optional.HasValue.type.e99: type = fn_type @Optional.HasValue, @Optional(%Copy.facet.fa2) [concrete] // CHECK:STDOUT: %Optional.HasValue.0e2: %Optional.HasValue.type.e99 = struct_value () [concrete] @@ -961,55 +724,43 @@ fn Run() { // CHECK:STDOUT: %struct_type.has_value.value.6f9: type = struct_type {.has_value: bool, .value: %tuple.type.784} [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.0e2, @Optional.HasValue(%Copy.facet.fa2) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.7e8, @Optional.Get(%Copy.facet.fa2) [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_61.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_61.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_61.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.fa3: %pattern_type.860 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3e4: %pattern_type.860 = wrapper_binding_pattern self, %self.param_patt.fa3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_61.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_61.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_61.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80ef6.1) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_61.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_61.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.095: type = pattern_type %struct_type.has_value.value.6f9 [concrete] -// CHECK:STDOUT: %self.param_patt.e70: %pattern_type.095 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cce: %pattern_type.095 = wrapper_binding_pattern self, %self.param_patt.e70 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_61.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_61.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b36: %pattern_type.b8c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbe: %pattern_type.b8c = wrapper_binding_pattern self, %self.param_patt.b36 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_61.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10_61.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_61.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_61.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc10_61.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_61.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.34c: %pattern_type.0ff = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b63: %pattern_type.0ff = wrapper_binding_pattern self, %self.param_patt.34c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_60 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc10_60 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_60 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c2f: %SubobjectDestroy.type = facet_value %tuple.type.784, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.bf6: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c2f) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b9: %Destroy.type = facet_value %tuple.type.784, (%DestroyImpl.impl_witness.bf6, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_61.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.88d: %SubobjectDestroy.type = facet_value %Optional.9ca, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.11e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.88d) [concrete] +// CHECK:STDOUT: %Destroy.facet.542: %Destroy.type = facet_value %Optional.9ca, (%DestroyImpl.impl_witness.11e, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_61.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6b7: %SubobjectDestroy.type = facet_value %empty_struct_type, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.011: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6b7) [concrete] +// CHECK:STDOUT: %Destroy.facet.fed: %Destroy.type = facet_value %empty_struct_type, (%DestroyImpl.impl_witness.011, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.6: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_60 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.6: %SubobjectDestroy.WithSelf.Op.type.6870fd.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.6: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.6), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.41c: %SubobjectDestroy.type = facet_value %EmptyRange.7d6, (%custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.0c1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.41c) [concrete] +// CHECK:STDOUT: %Destroy.facet.89f: %Destroy.type = facet_value %EmptyRange.7d6, (%DestroyImpl.impl_witness.0c1, %custom_witness.b80ef6.6) [concrete] // CHECK:STDOUT: %bool.as.Copy.impl.Op.type: type = fn_type @bool.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %bool.as.Copy.impl.Op: %bool.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -1030,99 +781,14 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.9b4: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.c99) = import_ref Main//empty_range, loc8_37, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.f76)] // CHECK:STDOUT: %Main.import_ref.405: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.e76) = import_ref Main//empty_range, loc11_69, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.706)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.71a, %Main.import_ref.999, %Main.import_ref.9b4, %Main.import_ref.405), @EmptyRange.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.127 = import_ref Core//prelude/parts/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %field_decl.b75: @Optional.%Optional.elem.2 (%Optional.elem.a1f) = field_decl value, element1, %Core.import_ref.127 in [concrete] {} // CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/parts/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %field_decl.897: @Optional.%Optional.elem.1 (%Optional.elem.fbd) = field_decl has_value, element0, %Core.import_ref.b0d in [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_61.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_61.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_61.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.860 = ref_param_pattern [concrete = constants.%self.param_patt.fa3] -// CHECK:STDOUT: %self.patt: %pattern_type.860 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3e4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.784 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.784 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_61.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.860 = ref_param_pattern [concrete = constants.%self.param_patt.fa3] -// CHECK:STDOUT: %self.patt: %pattern_type.860 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3e4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.784 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.784 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_61.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.095 = ref_param_pattern [concrete = constants.%self.param_patt.e70] -// CHECK:STDOUT: %self.patt: %pattern_type.095 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cce] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.has_value.value.6f9 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.has_value.value.6f9 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_61.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.095 = ref_param_pattern [concrete = constants.%self.param_patt.e70] -// CHECK:STDOUT: %self.patt: %pattern_type.095 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cce] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.has_value.value.6f9 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.has_value.value.6f9 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_61.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b8c = ref_param_pattern [concrete = constants.%self.param_patt.b36] -// CHECK:STDOUT: %self.patt: %pattern_type.b8c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbe] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.9ca = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.9ca = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10_61.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b8c = ref_param_pattern [concrete = constants.%self.param_patt.b36] -// CHECK:STDOUT: %self.patt: %pattern_type.b8c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbe] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.9ca = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.9ca = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_61.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc10_61.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_60 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ff = ref_param_pattern [concrete = constants.%self.param_patt.34c] -// CHECK:STDOUT: %self.patt: %pattern_type.0ff = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b63] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %EmptyRange.7d6 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %EmptyRange.7d6 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc10_60 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ff = ref_param_pattern [concrete = constants.%self.param_patt.34c] -// CHECK:STDOUT: %self.patt: %pattern_type.0ff = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b63] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %EmptyRange.7d6 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %EmptyRange.7d6 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { @@ -1195,118 +861,108 @@ fn Run() { // CHECK:STDOUT: %a.ref: bool = name_ref a, %a // CHECK:STDOUT: %b.ref: bool = name_ref b, %b // CHECK:STDOUT: %Body.call: init %empty_tuple.type = call %Body.ref(%a.ref, %b.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_61.1: = bound_method %.loc10_61.10, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_61.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_61.1(%.loc10_61.10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_61.2: = bound_method %.loc10_61.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_61.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_61.2(%.loc10_61.2) +// CHECK:STDOUT: %Destroy.facet.loc10_61.1: %Destroy.type = facet_value constants.%tuple.type.784, (constants.%DestroyImpl.impl_witness.bf6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: %.loc10_61.13: %Destroy.type = converted constants.%tuple.type.784, %Destroy.facet.loc10_61.1 [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: %Destroy.facet.loc10_61.2: %Destroy.type = facet_value constants.%tuple.type.784, (constants.%DestroyImpl.impl_witness.bf6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: %.loc10_61.14: %Destroy.type = converted constants.%tuple.type.784, %Destroy.facet.loc10_61.2 [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_61.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_61.10) +// CHECK:STDOUT: %Destroy.facet.loc10_61.3: %Destroy.type = facet_value constants.%Optional.9ca, (constants.%DestroyImpl.impl_witness.11e, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.542] +// CHECK:STDOUT: %.loc10_61.15: %Destroy.type = converted constants.%Optional.9ca, %Destroy.facet.loc10_61.3 [concrete = constants.%Destroy.facet.542] +// CHECK:STDOUT: %Destroy.facet.loc10_61.4: %Destroy.type = facet_value constants.%Optional.9ca, (constants.%DestroyImpl.impl_witness.11e, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.542] +// CHECK:STDOUT: %.loc10_61.16: %Destroy.type = converted constants.%Optional.9ca, %Destroy.facet.loc10_61.4 [concrete = constants.%Destroy.facet.542] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_61.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_61.2) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_61.3: = bound_method %.loc10_61.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_61.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_61.3(%.loc10_61.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_61.4: = bound_method %var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_61.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_61.4(%var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_60: = bound_method %.loc10_60.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_60: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_60(%.loc10_60.2) +// CHECK:STDOUT: %Destroy.facet.loc10_61.5: %Destroy.type = facet_value constants.%Optional.9ca, (constants.%DestroyImpl.impl_witness.11e, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.542] +// CHECK:STDOUT: %.loc10_61.17: %Destroy.type = converted constants.%Optional.9ca, %Destroy.facet.loc10_61.5 [concrete = constants.%Destroy.facet.542] +// CHECK:STDOUT: %Destroy.facet.loc10_61.6: %Destroy.type = facet_value constants.%Optional.9ca, (constants.%DestroyImpl.impl_witness.11e, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.542] +// CHECK:STDOUT: %.loc10_61.18: %Destroy.type = converted constants.%Optional.9ca, %Destroy.facet.loc10_61.6 [concrete = constants.%Destroy.facet.542] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_61.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc10_61.2) +// CHECK:STDOUT: %Destroy.facet.loc10_61.7: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_61.19: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_61.7 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %Destroy.facet.loc10_61.8: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_61.20: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_61.8 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_61.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) +// CHECK:STDOUT: %Destroy.facet.loc10_60.1: %Destroy.type = facet_value constants.%EmptyRange.7d6, (constants.%DestroyImpl.impl_witness.0c1, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.89f] +// CHECK:STDOUT: %.loc10_60.5: %Destroy.type = converted constants.%EmptyRange.7d6, %Destroy.facet.loc10_60.1 [concrete = constants.%Destroy.facet.89f] +// CHECK:STDOUT: %Destroy.facet.loc10_60.2: %Destroy.type = facet_value constants.%EmptyRange.7d6, (constants.%DestroyImpl.impl_witness.0c1, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.89f] +// CHECK:STDOUT: %.loc10_60.6: %Destroy.type = converted constants.%EmptyRange.7d6, %Destroy.facet.loc10_60.2 [concrete = constants.%Destroy.facet.89f] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_60: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc10_60.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_61.1(%self.param: ref bool) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_61.1(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_61.1(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_61.1(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_61.2(%self.param: ref %tuple.type.784) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_61.2(%self.param: ref %tuple.type.784) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref bool = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_61.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_61.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_61.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc10_61.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_61.1: %Destroy.type = converted bool, %Destroy.facet.loc10_61.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc10_61.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_61.2: %Destroy.type = converted bool, %Destroy.facet.loc10_61.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_61.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref bool = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_61.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_61.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_61.2(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc10_61.3: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_61.3: %Destroy.type = converted bool, %Destroy.facet.loc10_61.3 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc10_61.4: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_61.4: %Destroy.type = converted bool, %Destroy.facet.loc10_61.4 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_61.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_61.2(%self.param: ref %tuple.type.784) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_61.2(%self.param: ref %tuple.type.784) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_61.3(%self.param: ref %struct_type.has_value.value.6f9) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_61.3(%self.param: ref %struct_type.has_value.value.6f9) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc10_61.1: ref %tuple.type.784 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_61.1: = bound_method %.loc10_61.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_61.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_61.1(%.loc10_61.1) -// CHECK:STDOUT: %.loc10_61.2: ref bool = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_61.2: = bound_method %.loc10_61.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_61.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_61.2(%.loc10_61.2) +// CHECK:STDOUT: %Destroy.facet.loc10_61.1: %Destroy.type = facet_value constants.%tuple.type.784, (constants.%DestroyImpl.impl_witness.bf6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: %.loc10_61.2: %Destroy.type = converted constants.%tuple.type.784, %Destroy.facet.loc10_61.1 [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: %Destroy.facet.loc10_61.2: %Destroy.type = facet_value constants.%tuple.type.784, (constants.%DestroyImpl.impl_witness.bf6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: %.loc10_61.3: %Destroy.type = converted constants.%tuple.type.784, %Destroy.facet.loc10_61.2 [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_61.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_61.1) +// CHECK:STDOUT: %.loc10_61.4: ref bool = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc10_61.3: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_61.5: %Destroy.type = converted bool, %Destroy.facet.loc10_61.3 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc10_61.4: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_61.6: %Destroy.type = converted bool, %Destroy.facet.loc10_61.4 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_61.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_61.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_61.3(%self.param: ref %struct_type.has_value.value.6f9) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_61.3(%self.param: ref %struct_type.has_value.value.6f9) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_61.4(%self.param: ref %Optional.9ca) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_61.4(%self.param: ref %Optional.9ca) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %value.ref: %Optional.elem.6d0 = name_ref value, imports.%Core.import_ref.2f6 [concrete = imports.%field_decl.b75] // CHECK:STDOUT: %.loc10_61.1: ref %tuple.type.784 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_61.1: = bound_method %.loc10_61.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_61.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_61.1(%.loc10_61.1) +// CHECK:STDOUT: %Destroy.facet.loc10_61.1: %Destroy.type = facet_value constants.%tuple.type.784, (constants.%DestroyImpl.impl_witness.bf6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: %.loc10_61.2: %Destroy.type = converted constants.%tuple.type.784, %Destroy.facet.loc10_61.1 [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: %Destroy.facet.loc10_61.2: %Destroy.type = facet_value constants.%tuple.type.784, (constants.%DestroyImpl.impl_witness.bf6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: %.loc10_61.3: %Destroy.type = converted constants.%tuple.type.784, %Destroy.facet.loc10_61.2 [concrete = constants.%Destroy.facet.3b9] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_61.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_61.1) // CHECK:STDOUT: %has_value.ref: %Optional.elem.79c = name_ref has_value, imports.%Core.import_ref.5d0 [concrete = imports.%field_decl.897] -// CHECK:STDOUT: %.loc10_61.2: ref bool = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_61.2: = bound_method %.loc10_61.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_61.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_61.2(%.loc10_61.2) +// CHECK:STDOUT: %.loc10_61.4: ref bool = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc10_61.3: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_61.5: %Destroy.type = converted bool, %Destroy.facet.loc10_61.3 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc10_61.4: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_61.6: %Destroy.type = converted bool, %Destroy.facet.loc10_61.4 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_61.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_61.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_61.4(%self.param: ref %Optional.9ca) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_61.5(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_61.4(%self.param: ref %Optional.9ca) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_61.5(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_61.5(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_61.5(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_60(%self.param: ref %EmptyRange.7d6) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_60(%self.param: ref %EmptyRange.7d6) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_60(%self.param: ref %EmptyRange.7d6) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_60(%self.param: ref %EmptyRange.7d6) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- tuple_class.carbon // CHECK:STDOUT: @@ -1342,7 +998,6 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.ad6: type = class_type @EmptyRange, @EmptyRange(%Copy.facet.83b) [concrete] // CHECK:STDOUT: %EmptyRange.Make.type.2f8: type = fn_type @EmptyRange.Make, @EmptyRange(%Copy.facet.83b) [concrete] // CHECK:STDOUT: %EmptyRange.Make.d66: %EmptyRange.Make.type.2f8 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.242: type = pattern_type %EmptyRange.ad6 [concrete] // CHECK:STDOUT: %EmptyRange.Make.specific_fn: = specific_function %EmptyRange.Make.d66, @EmptyRange.Make(%Copy.facet.83b) [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %Optional.afc: type = class_type @Optional, @Optional(%T.f84) [symbolic] @@ -1352,12 +1007,10 @@ fn Run() { // CHECK:STDOUT: %Optional.Get.c2b: %Optional.Get.type.f7a = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.23a: type = fn_type @Optional.HasValue, @Optional(%T.f84) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f8f: %Optional.HasValue.type.23a = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.type.e76: type = fn_type @EmptyRange.as.Iterate.impl.Next, @EmptyRange.as.Iterate.impl(%T.f84) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.706: %EmptyRange.as.Iterate.impl.Next.type.e76 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.c99: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%T.f84) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.f76: %EmptyRange.as.Iterate.impl.NewCursor.type.c99 = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] // CHECK:STDOUT: %Iterate.impl_witness.649: = impl_witness imports.%Iterate.impl_witness_table, @EmptyRange.as.Iterate.impl(%Copy.facet.83b) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.194: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%Copy.facet.83b) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.367: %EmptyRange.as.Iterate.impl.NewCursor.type.194 = struct_value () [concrete] @@ -1370,7 +1023,6 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.NewCursor.367, @EmptyRange.as.Iterate.impl.NewCursor(%Copy.facet.83b) [concrete] // CHECK:STDOUT: %.ea9: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.568, %Iterate.facet [concrete] // CHECK:STDOUT: %Optional.cc1: type = class_type @Optional, @Optional(%Copy.facet.83b) [concrete] -// CHECK:STDOUT: %pattern_type.19f: type = pattern_type %Optional.cc1 [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.Next.835, @EmptyRange.as.Iterate.impl.Next(%Copy.facet.83b) [concrete] // CHECK:STDOUT: %Optional.HasValue.type.5a2: type = fn_type @Optional.HasValue, @Optional(%Copy.facet.83b) [concrete] // CHECK:STDOUT: %Optional.HasValue.6c6: %Optional.HasValue.type.5a2 = struct_value () [concrete] @@ -1381,63 +1033,49 @@ fn Run() { // CHECK:STDOUT: %struct_type.has_value.value.9b1: type = struct_type {.has_value: bool, .value: %tuple.type.748} [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.6c6, @Optional.HasValue(%Copy.facet.83b) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.9d7, @Optional.Get(%Copy.facet.83b) [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_49.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_49.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_49.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_49.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_49.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_49.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a49: %pattern_type.8b4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d80: %pattern_type.8b4 = wrapper_binding_pattern self, %self.param_patt.a49 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_49.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_49.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_49.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_49.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_49.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_49.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_49.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10_49.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_49.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.ebb: type = pattern_type %struct_type.has_value.value.9b1 [concrete] -// CHECK:STDOUT: %self.param_patt.c1b: %pattern_type.ebb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4fb: %pattern_type.ebb = wrapper_binding_pattern self, %self.param_patt.c1b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_49.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc10_49.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.6d0: %pattern_type.19f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f8d: %pattern_type.19f = wrapper_binding_pattern self, %self.param_patt.6d0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_49.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc10_49.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_49.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.f63: %pattern_type.242 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cd1: %pattern_type.242 = wrapper_binding_pattern self, %self.param_patt.f63 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_48 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc10_48 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_48 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.7: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.72d: %SubobjectDestroy.type = facet_value %tuple.type.748, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4bb: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.72d) [concrete] +// CHECK:STDOUT: %Destroy.facet.70c: %Destroy.type = facet_value %tuple.type.748, (%DestroyImpl.impl_witness.4bb, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_49.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.6: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_49.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.6: %SubobjectDestroy.WithSelf.Op.type.6870fd.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.6: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.6), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.8d6: %SubobjectDestroy.type = facet_value %Optional.cc1, (%custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f64: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.8d6) [concrete] +// CHECK:STDOUT: %Destroy.facet.cbf: %Destroy.type = facet_value %Optional.cc1, (%DestroyImpl.impl_witness.f64, %custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6b7: %SubobjectDestroy.type = facet_value %empty_struct_type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.011: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6b7) [concrete] +// CHECK:STDOUT: %Destroy.facet.fed: %Destroy.type = facet_value %empty_struct_type, (%DestroyImpl.impl_witness.011, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_48 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.bf2: %SubobjectDestroy.type = facet_value %EmptyRange.ad6, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.314: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.bf2) [concrete] +// CHECK:STDOUT: %Destroy.facet.65a: %Destroy.type = facet_value %EmptyRange.ad6, (%DestroyImpl.impl_witness.314, %custom_witness.b80ef6.7) [concrete] // CHECK:STDOUT: %C.as.Copy.impl.Op.type: type = fn_type @C.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %C.as.Copy.impl.Op: %C.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -1459,113 +1097,14 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.9b4: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.c99) = import_ref Main//empty_range, loc8_37, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.f76)] // CHECK:STDOUT: %Main.import_ref.405: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.e76) = import_ref Main//empty_range, loc11_69, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.706)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.71a, %Main.import_ref.999, %Main.import_ref.9b4, %Main.import_ref.405), @EmptyRange.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.127 = import_ref Core//prelude/parts/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %field_decl.b75: @Optional.%Optional.elem.2 (%Optional.elem.a1f) = field_decl value, element1, %Core.import_ref.127 in [concrete] {} // CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/parts/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %field_decl.897: @Optional.%Optional.elem.1 (%Optional.elem.fbd) = field_decl has_value, element0, %Core.import_ref.b0d in [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_49.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_49.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_49.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_49.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_49.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8b4 = ref_param_pattern [concrete = constants.%self.param_patt.a49] -// CHECK:STDOUT: %self.patt: %pattern_type.8b4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d80] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.748 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.748 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_49.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8b4 = ref_param_pattern [concrete = constants.%self.param_patt.a49] -// CHECK:STDOUT: %self.patt: %pattern_type.8b4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d80] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.748 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.748 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_49.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10_49.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_49.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ebb = ref_param_pattern [concrete = constants.%self.param_patt.c1b] -// CHECK:STDOUT: %self.patt: %pattern_type.ebb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4fb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.has_value.value.9b1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.has_value.value.9b1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc10_49.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ebb = ref_param_pattern [concrete = constants.%self.param_patt.c1b] -// CHECK:STDOUT: %self.patt: %pattern_type.ebb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4fb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.has_value.value.9b1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.has_value.value.9b1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_49.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.19f = ref_param_pattern [concrete = constants.%self.param_patt.6d0] -// CHECK:STDOUT: %self.patt: %pattern_type.19f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f8d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.cc1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.cc1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc10_49.6 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.19f = ref_param_pattern [concrete = constants.%self.param_patt.6d0] -// CHECK:STDOUT: %self.patt: %pattern_type.19f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f8d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.cc1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.cc1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_48 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.242 = ref_param_pattern [concrete = constants.%self.param_patt.f63] -// CHECK:STDOUT: %self.patt: %pattern_type.242 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cd1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %EmptyRange.ad6 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %EmptyRange.ad6 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc10_48 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.242 = ref_param_pattern [concrete = constants.%self.param_patt.f63] -// CHECK:STDOUT: %self.patt: %pattern_type.242 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cd1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %EmptyRange.ad6 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %EmptyRange.ad6 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { @@ -1638,127 +1177,108 @@ fn Run() { // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b // CHECK:STDOUT: %Body.call: init %empty_tuple.type = call %Body.ref(%a.ref, %b.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_49.1: = bound_method %.loc10_49.10, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_49.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_49.1(%.loc10_49.10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_49.2: = bound_method %.loc10_49.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_49.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_49.2(%.loc10_49.2) +// CHECK:STDOUT: %Destroy.facet.loc10_49.1: %Destroy.type = facet_value constants.%tuple.type.748, (constants.%DestroyImpl.impl_witness.4bb, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: %.loc10_49.13: %Destroy.type = converted constants.%tuple.type.748, %Destroy.facet.loc10_49.1 [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: %Destroy.facet.loc10_49.2: %Destroy.type = facet_value constants.%tuple.type.748, (constants.%DestroyImpl.impl_witness.4bb, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: %.loc10_49.14: %Destroy.type = converted constants.%tuple.type.748, %Destroy.facet.loc10_49.2 [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_49.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_49.10) +// CHECK:STDOUT: %Destroy.facet.loc10_49.3: %Destroy.type = facet_value constants.%Optional.cc1, (constants.%DestroyImpl.impl_witness.f64, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.cbf] +// CHECK:STDOUT: %.loc10_49.15: %Destroy.type = converted constants.%Optional.cc1, %Destroy.facet.loc10_49.3 [concrete = constants.%Destroy.facet.cbf] +// CHECK:STDOUT: %Destroy.facet.loc10_49.4: %Destroy.type = facet_value constants.%Optional.cc1, (constants.%DestroyImpl.impl_witness.f64, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.cbf] +// CHECK:STDOUT: %.loc10_49.16: %Destroy.type = converted constants.%Optional.cc1, %Destroy.facet.loc10_49.4 [concrete = constants.%Destroy.facet.cbf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_49.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_49.2) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_49.3: = bound_method %.loc10_49.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_49.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_49.3(%.loc10_49.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_49.4: = bound_method %var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_49.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_49.4(%var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_48: = bound_method %.loc10_48.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_48: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_48(%.loc10_48.2) +// CHECK:STDOUT: %Destroy.facet.loc10_49.5: %Destroy.type = facet_value constants.%Optional.cc1, (constants.%DestroyImpl.impl_witness.f64, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.cbf] +// CHECK:STDOUT: %.loc10_49.17: %Destroy.type = converted constants.%Optional.cc1, %Destroy.facet.loc10_49.5 [concrete = constants.%Destroy.facet.cbf] +// CHECK:STDOUT: %Destroy.facet.loc10_49.6: %Destroy.type = facet_value constants.%Optional.cc1, (constants.%DestroyImpl.impl_witness.f64, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.cbf] +// CHECK:STDOUT: %.loc10_49.18: %Destroy.type = converted constants.%Optional.cc1, %Destroy.facet.loc10_49.6 [concrete = constants.%Destroy.facet.cbf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_49.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc10_49.2) +// CHECK:STDOUT: %Destroy.facet.loc10_49.7: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_49.19: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_49.7 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %Destroy.facet.loc10_49.8: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_49.20: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_49.8 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_49.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) +// CHECK:STDOUT: %Destroy.facet.loc10_48.1: %Destroy.type = facet_value constants.%EmptyRange.ad6, (constants.%DestroyImpl.impl_witness.314, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.65a] +// CHECK:STDOUT: %.loc10_48.5: %Destroy.type = converted constants.%EmptyRange.ad6, %Destroy.facet.loc10_48.1 [concrete = constants.%Destroy.facet.65a] +// CHECK:STDOUT: %Destroy.facet.loc10_48.2: %Destroy.type = facet_value constants.%EmptyRange.ad6, (constants.%DestroyImpl.impl_witness.314, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.65a] +// CHECK:STDOUT: %.loc10_48.6: %Destroy.type = converted constants.%EmptyRange.ad6, %Destroy.facet.loc10_48.2 [concrete = constants.%Destroy.facet.65a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_48: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc10_48.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_49.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_49.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_49.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_49.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_49.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_49.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_49.3(%self.param: ref %tuple.type.748) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_49.3(%self.param: ref %tuple.type.748) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %C = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_49.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_49.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_49.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc10_49.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_49.1: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_49.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_49.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_49.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_49.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_49.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %C = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_49.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_49.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_49.2(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc10_49.3: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_49.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_49.3 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc10_49.4: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc10_49.4: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_49.4 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_49.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_49.3(%self.param: ref %tuple.type.748) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_49.4(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_49.3(%self.param: ref %tuple.type.748) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_49.4(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_49.4(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_49.4(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_49.5(%self.param: ref %struct_type.has_value.value.9b1) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_49.5(%self.param: ref %struct_type.has_value.value.9b1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc10_49.1: ref %tuple.type.748 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_49.1: = bound_method %.loc10_49.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_49.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_49.1(%.loc10_49.1) -// CHECK:STDOUT: %.loc10_49.2: ref bool = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_49.2: = bound_method %.loc10_49.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_49.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_49.2(%.loc10_49.2) +// CHECK:STDOUT: %Destroy.facet.loc10_49.1: %Destroy.type = facet_value constants.%tuple.type.748, (constants.%DestroyImpl.impl_witness.4bb, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: %.loc10_49.2: %Destroy.type = converted constants.%tuple.type.748, %Destroy.facet.loc10_49.1 [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: %Destroy.facet.loc10_49.2: %Destroy.type = facet_value constants.%tuple.type.748, (constants.%DestroyImpl.impl_witness.4bb, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: %.loc10_49.3: %Destroy.type = converted constants.%tuple.type.748, %Destroy.facet.loc10_49.2 [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_49.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_49.1) +// CHECK:STDOUT: %.loc10_49.4: ref bool = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc10_49.3: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_49.5: %Destroy.type = converted bool, %Destroy.facet.loc10_49.3 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc10_49.4: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_49.6: %Destroy.type = converted bool, %Destroy.facet.loc10_49.4 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_49.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_49.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_49.5(%self.param: ref %struct_type.has_value.value.9b1) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_49.5(%self.param: ref %struct_type.has_value.value.9b1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_49.6(%self.param: ref %Optional.cc1) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_49.6(%self.param: ref %Optional.cc1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %value.ref: %Optional.elem.260 = name_ref value, imports.%Core.import_ref.2f6 [concrete = imports.%field_decl.b75] // CHECK:STDOUT: %.loc10_49.1: ref %tuple.type.748 = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_49.1: = bound_method %.loc10_49.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_49.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_49.1(%.loc10_49.1) +// CHECK:STDOUT: %Destroy.facet.loc10_49.1: %Destroy.type = facet_value constants.%tuple.type.748, (constants.%DestroyImpl.impl_witness.4bb, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: %.loc10_49.2: %Destroy.type = converted constants.%tuple.type.748, %Destroy.facet.loc10_49.1 [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: %Destroy.facet.loc10_49.2: %Destroy.type = facet_value constants.%tuple.type.748, (constants.%DestroyImpl.impl_witness.4bb, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: %.loc10_49.3: %Destroy.type = converted constants.%tuple.type.748, %Destroy.facet.loc10_49.2 [concrete = constants.%Destroy.facet.70c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_49.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_49.1) // CHECK:STDOUT: %has_value.ref: %Optional.elem.c4d = name_ref has_value, imports.%Core.import_ref.5d0 [concrete = imports.%field_decl.897] -// CHECK:STDOUT: %.loc10_49.2: ref bool = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_49.2: = bound_method %.loc10_49.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_49.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_49.2(%.loc10_49.2) +// CHECK:STDOUT: %.loc10_49.4: ref bool = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc10_49.3: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_49.5: %Destroy.type = converted bool, %Destroy.facet.loc10_49.3 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc10_49.4: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc10_49.6: %Destroy.type = converted bool, %Destroy.facet.loc10_49.4 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_49.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_49.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_49.6(%self.param: ref %Optional.cc1) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_49.6(%self.param: ref %Optional.cc1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_48(%self.param: ref %EmptyRange.ad6) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_48(%self.param: ref %EmptyRange.ad6) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_48(%self.param: ref %EmptyRange.ad6) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.7(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_48(%self.param: ref %EmptyRange.ad6) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/alias.carbon b/toolchain/check/testdata/function/call/alias.carbon index 4a4ad370d948..773ae0c7b648 100644 --- a/toolchain/check/testdata/function/call/alias.carbon +++ b/toolchain/check/testdata/function/call/alias.carbon @@ -36,41 +36,31 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.cb1 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.cb1 = var_pattern %b.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc20 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -119,19 +109,14 @@ fn Main() { // CHECK:STDOUT: %b.patt: %pattern_type.cb1 = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.cb1 = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc20_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_3.1: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc20_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc20_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc20_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%b.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20(%self.param: ref %empty_tuple.type) = "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 dd5b3c299d8d..08971f5ac1ad 100644 --- a/toolchain/check/testdata/function/call/default_values.carbon +++ b/toolchain/check/testdata/function/call/default_values.carbon @@ -90,7 +90,6 @@ fn G() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] @@ -99,53 +98,22 @@ fn G() { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_6.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_6.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_6.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_6.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_6.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.115, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_6.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_6.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_6.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_6.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_6.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -162,31 +130,18 @@ fn G() { // CHECK:STDOUT: %.loc7_6.5: ref %C = temporary %.loc7_6.2, %.loc7_6.4 [concrete = constants.%.115] // CHECK:STDOUT: %.loc7_6.6: %C = acquire_value %.loc7_6.5 [concrete = constants.%C.val] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc7_6.6, @F.%.loc3_34.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.115) +// CHECK:STDOUT: %Destroy.facet.loc7_6.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_6.7: %Destroy.type = converted constants.%C, %Destroy.facet.loc7_6.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_6.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_6.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc7_6.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc7_6.5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_6.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_6.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_6.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_6.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_6.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_6.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- tuple_defaults_fully_specified.carbon // CHECK:STDOUT: @@ -219,53 +174,22 @@ fn G() { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_6.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_6.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_6.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_6.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_6.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.115, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_6.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_6.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_6.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_6.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_6.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -336,31 +260,18 @@ fn G() { // CHECK:STDOUT: %tuple.elem0: %C = tuple_access @F.%.loc5_55.8, element0 [concrete = constants.%C.val] // CHECK:STDOUT: %tuple.elem1: %C = tuple_access @F.%.loc5_55.8, element1 [concrete = constants.%C.val] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc8_6.6, %tuple.elem0, %tuple.elem1, @F.%.loc5_73.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.115) +// CHECK:STDOUT: %Destroy.facet.loc8_6.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_6.7: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_6.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_6.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_6.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_6.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_6.5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_6.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_6.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_6.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_6.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_6.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_6.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- single_argument.carbon // 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 869a1a913695..20df2a71cca2 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -62,15 +62,20 @@ fn Run() { // CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %x.patt: %pattern_type.d94 = ref_binding_pattern x [concrete] // CHECK:STDOUT: %x.var_patt: %pattern_type.d94 = var_pattern %x.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc21 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc21 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc21 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc21 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -78,7 +83,7 @@ fn Run() { // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -87,24 +92,9 @@ fn Run() { // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/parts/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc21 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc21 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -143,7 +133,7 @@ fn Run() { // CHECK:STDOUT: %x.var: ref %i32 = var_storage %x.var_patt // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %Foo.call: init %f64.761 = call %Foo.ref() -// CHECK:STDOUT: %.loc21: %i32 = converted %Foo.call, [concrete = ] +// CHECK:STDOUT: %.loc21_3.1: %i32 = converted %Foo.call, [concrete = ] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %x: ref %i32 = wrapper_binding x, %x.var @@ -151,19 +141,14 @@ fn Run() { // CHECK:STDOUT: %x.patt: %pattern_type.d94 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.d94 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc21_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc21_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc21_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc21_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc21(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc21(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc21(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc21(%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 0cdec4ea04a0..e6c48dd2a4c8 100644 --- a/toolchain/check/testdata/function/call/form.carbon +++ b/toolchain/check/testdata/function/call/form.carbon @@ -3,6 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/form.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -10,6 +11,12 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/call/form.carbon +// --- core.carbon + +package Core library "[[@TEST_NAME]]"; + +export import library "prelude/parts/form"; + // --- ref_form_param.carbon library "[[@TEST_NAME]]"; @@ -60,6 +67,8 @@ fn F(x:? form(ref ())); // --- fail_param_form_not_constant.carbon library "[[@TEST_NAME]]"; +import Core library "core"; + fn F() -> Core.Form; // CHECK:STDERR: fail_param_form_not_constant.carbon:[[@LINE+2]]:10-12: error: cannot evaluate form expression [FormExprEvaluationFailure] // CHECK:STDERR: @@ -94,6 +103,8 @@ fn G() { // --- form_generic_param.carbon library "[[@TEST_NAME]]"; +import Core library "core"; + fn F(generic Fm: Core.Form, unused x:? Fm) {} fn G() { @@ -104,6 +115,8 @@ fn G() { // --- fail_todo_composite_generic_form.carbon library "[[@TEST_NAME]]"; +import Core library "core"; + fn F(generic Fm: Core.Form, unused x:? Fm) {} fn G() { @@ -118,6 +131,8 @@ fn G() { // --- fail_todo_deduce_generic_form.carbon library "[[@TEST_NAME]]"; +import Core library "core"; + fn F[Fm: Core.Form](v:? Fm); fn G() { @@ -131,6 +146,8 @@ fn G() { // --- fail_form_generic_arg_not_form.carbon library "[[@TEST_NAME]]"; +import Core library "core"; + fn F(generic Fm: Core.Form, unused x:? Fm) {} fn G() { @@ -145,6 +162,8 @@ fn G() { // --- fail_form_generic_missing_ref_tag.carbon library "[[@TEST_NAME]]"; +import Core library "core"; + fn F(generic Fm: Core.Form, unused x:? Fm) {} fn G() { @@ -168,6 +187,8 @@ fn F() { // --- fail_todo_local_symbolic_form_binding.carbon library "[[@TEST_NAME]]"; +import Core library "core"; + // TODO: this code should fail for a different reason, but right now we don't // have a way to write correct code that reaches the TODO we're exercising here. fn F(generic Form: Core.Form) { @@ -282,6 +303,8 @@ fn F() ->? ref i32; // --- form_generic_return.carbon library "[[@TEST_NAME]]"; + +import Core library "core"; //@include-in-dumps fn F(generic Fm: Core.Form, v:? Fm) ->? Fm { @@ -369,36 +392,24 @@ fn G() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.753: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc4 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -428,25 +439,20 @@ fn G() { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_7.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc4_7.2(%int_0) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc4: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] +// CHECK:STDOUT: %.loc4_7.1: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] // CHECK:STDOUT: %x.var: ref %i32 = var_storage @F.%x.var_patt -// CHECK:STDOUT: assign %x.var, %.loc4 +// CHECK:STDOUT: assign %x.var, %.loc4_7.1 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%x.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc4_7.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc4_7.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc4_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc4_7.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc4_7.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc4_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc4(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc4(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc4(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc4(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- val_form_param.carbon // CHECK:STDOUT: @@ -604,31 +610,22 @@ fn G() { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %_.patt: %pattern_type.d94 = ref_binding_pattern _ [concrete] // CHECK:STDOUT: %_.var_patt: %pattern_type.d94 = var_pattern %_.patt [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -658,21 +655,16 @@ fn G() { // CHECK:STDOUT: %_.patt: %pattern_type.d94 = ref_binding_pattern _ [concrete = constants.%_.patt] // CHECK:STDOUT: %_.var_patt: %pattern_type.d94 = var_pattern %_.patt [concrete = constants.%_.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %_.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%_.var) +// CHECK:STDOUT: %Destroy.facet.loc9_7.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_7.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_7.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_7.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%_.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- val_return_form.carbon // CHECK:STDOUT: @@ -913,12 +905,12 @@ fn G() { // CHECK:STDOUT: %Fm: Core.Form = symbolic_binding Fm, 0 [symbolic] // CHECK:STDOUT: %.42f: type = type_component_of %Fm [symbolic] // CHECK:STDOUT: %pattern_type.177: type = pattern_type %.42f [symbolic] -// CHECK:STDOUT: %.481d89.1: %pattern_type.177 = splice_inst @F.%.loc4_30.3 [template] +// CHECK:STDOUT: %.481d89.1: %pattern_type.177 = splice_inst @F.%.loc6_30.3 [template] // CHECK:STDOUT: %v.patt.db46d6.1: %pattern_type.177 = wrapper_binding_pattern v, %.481d89.1 [template] -// CHECK:STDOUT: %.05fee9.1: %pattern_type.177 = splice_inst @F.%.loc4_37.3 [template] +// CHECK:STDOUT: %.05fee9.1: %pattern_type.177 = splice_inst @F.%.loc6_37.3 [template] // CHECK:STDOUT: %return.patt.94bfcb.1: %pattern_type.177 = return_slot_pattern %.05fee9.1, %.42f [template] -// CHECK:STDOUT: %.59eb0c.1: %.42f = splice_inst @F.%.loc4_30.5 [template] -// CHECK:STDOUT: %.4d6629.1: %.42f = splice_inst @F.%.loc4_37.5 [template] +// CHECK:STDOUT: %.59eb0c.1: %.42f = splice_inst @F.%.loc6_30.5 [template] +// CHECK:STDOUT: %.4d6629.1: %.42f = splice_inst @F.%.loc6_37.5 [template] // CHECK:STDOUT: %.c5c: = form_param_pattern_action %Fm, v [template] // CHECK:STDOUT: %.481d89.2: %pattern_type.177 = splice_inst %.c5c [template] // CHECK:STDOUT: %v.patt.db46d6.2: %pattern_type.177 = wrapper_binding_pattern v, %.481d89.2 [template] @@ -1017,24 +1009,20 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %return.patt.f8b: %pattern_type.d94 = return_slot_pattern %.45b17a.1, %i32 [concrete] // CHECK:STDOUT: %F.specific_fn.efd: = specific_function %F, @F(%.acd) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.869: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self.0e7) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.c97: %Destroy.WithSelf.SelfDestruct.type.869 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.df0 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f: = custom_witness (%Destroy.WithSelf.Op.403, %Destroy.WithSelf.SubobjectDestroy.d01, %Destroy.WithSelf.SelfDestruct.db3), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.ed0: %Destroy.type = facet_value %i32, (%custom_witness.f8f) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.648: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.ed0) [concrete] -// CHECK:STDOUT: %.d2d: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.648, %Destroy.facet.ed0 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1043,8 +1031,9 @@ fn G() { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//core // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Form: type = import_ref Core//prelude/parts/form, Form, loaded [concrete = Core.Form] @@ -1055,26 +1044,9 @@ fn G() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.8ba: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc2] -// CHECK:STDOUT: %Core.import_ref.df0: @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct.type (%Destroy.WithSelf.SelfDestruct.type.869) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct (constants.%Destroy.WithSelf.SelfDestruct.c97)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.2 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1085,215 +1057,216 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %Fm.patt.loc4_16.1: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc4_16.2 (constants.%Fm.patt)] -// CHECK:STDOUT: %.loc4_30.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_30.3 [template = %.loc4_30.4 (constants.%.481d89.1)] -// CHECK:STDOUT: %v.patt.loc4_30.1: @F.%pattern_type (%pattern_type.177) = wrapper_binding_pattern v, %.loc4_30.2 [template = %v.patt.loc4_30.2 (constants.%v.patt.db46d6.1)] -// CHECK:STDOUT: %.loc4_37.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_37.3 [template = %.loc4_37.4 (constants.%.05fee9.1)] -// CHECK:STDOUT: %return.patt.loc4_37.1: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc4_37.2, %.loc4_41 [template = %return.patt.loc4_37.2 (constants.%return.patt.94bfcb.1)] +// CHECK:STDOUT: %Fm.patt.loc6_16.1: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc6_16.2 (constants.%Fm.patt)] +// CHECK:STDOUT: %.loc6_30.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc6_30.3 [template = %.loc6_30.4 (constants.%.481d89.1)] +// CHECK:STDOUT: %v.patt.loc6_30.1: @F.%pattern_type (%pattern_type.177) = wrapper_binding_pattern v, %.loc6_30.2 [template = %v.patt.loc6_30.2 (constants.%v.patt.db46d6.1)] +// CHECK:STDOUT: %.loc6_37.2: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc6_37.3 [template = %.loc6_37.4 (constants.%.05fee9.1)] +// CHECK:STDOUT: %return.patt.loc6_37.1: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc6_37.2, %.loc6_41 [template = %return.patt.loc6_37.2 (constants.%return.patt.94bfcb.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Fm.ref.loc4_41: Core.Form = name_ref Fm, %Fm.loc4_16.2 [symbolic = %Fm.loc4_16.1 (constants.%Fm)] -// CHECK:STDOUT: %.loc4_41: type = type_component_of %Fm.ref.loc4_41 [symbolic = %.loc4_33.1 (constants.%.42f)] -// CHECK:STDOUT: %.loc4_22: type = splice_block %Form.ref [concrete = Core.Form] { +// CHECK:STDOUT: %Fm.ref.loc6_41: Core.Form = name_ref Fm, %Fm.loc6_16.2 [symbolic = %Fm.loc6_16.1 (constants.%Fm)] +// CHECK:STDOUT: %.loc6_41: type = type_component_of %Fm.ref.loc6_41 [symbolic = %.loc6_33.1 (constants.%.42f)] +// CHECK:STDOUT: %.loc6_22: type = splice_block %Form.ref [concrete = Core.Form] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Form.ref: type = name_ref Form, imports.%Core.Form [concrete = Core.Form] // CHECK:STDOUT: } -// CHECK:STDOUT: %Fm.loc4_16.2: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc4_16.1 (constants.%Fm)] -// CHECK:STDOUT: %.loc4_30.1: @F.%.loc4_33.1 (%.42f) = splice_inst %.loc4_30.5 [template = %.loc4_30.6 (constants.%.59eb0c.1)] -// CHECK:STDOUT: %.loc4_33.2: Core.Form = splice_block %Fm.ref.loc4_33 [symbolic = %Fm.loc4_16.1 (constants.%Fm)] { -// CHECK:STDOUT: %Fm.ref.loc4_33: Core.Form = name_ref Fm, %Fm.loc4_16.2 [symbolic = %Fm.loc4_16.1 (constants.%Fm)] -// CHECK:STDOUT: %.loc4_33.3: type = type_component_of %Fm.ref.loc4_33 [symbolic = %.loc4_33.1 (constants.%.42f)] +// CHECK:STDOUT: %Fm.loc6_16.2: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc6_16.1 (constants.%Fm)] +// CHECK:STDOUT: %.loc6_30.1: @F.%.loc6_33.1 (%.42f) = splice_inst %.loc6_30.5 [template = %.loc6_30.6 (constants.%.59eb0c.1)] +// CHECK:STDOUT: %.loc6_33.2: Core.Form = splice_block %Fm.ref.loc6_33 [symbolic = %Fm.loc6_16.1 (constants.%Fm)] { +// CHECK:STDOUT: %Fm.ref.loc6_33: Core.Form = name_ref Fm, %Fm.loc6_16.2 [symbolic = %Fm.loc6_16.1 (constants.%Fm)] +// CHECK:STDOUT: %.loc6_33.3: type = type_component_of %Fm.ref.loc6_33 [symbolic = %.loc6_33.1 (constants.%.42f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %v: @F.%.loc4_33.1 (%.42f) = wrapper_binding v, %.loc4_30.1 -// CHECK:STDOUT: %.loc4_37.1: @F.%.loc4_33.1 (%.42f) = splice_inst %.loc4_37.5 [template = %.loc4_37.6 (constants.%.4d6629.1)] -// CHECK:STDOUT: %return: @F.%.loc4_33.1 (%.42f) = return_slot %.loc4_37.1 +// CHECK:STDOUT: %v: @F.%.loc6_33.1 (%.42f) = wrapper_binding v, %.loc6_30.1 +// CHECK:STDOUT: %.loc6_37.1: @F.%.loc6_33.1 (%.42f) = splice_inst %.loc6_37.5 [template = %.loc6_37.6 (constants.%.4d6629.1)] +// CHECK:STDOUT: %return: @F.%.loc6_33.1 (%.42f) = return_slot %.loc6_37.1 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%Fm.loc4_16.2: Core.Form) { -// CHECK:STDOUT: %Fm.patt.loc4_16.2: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc4_16.2 (constants.%Fm.patt)] -// CHECK:STDOUT: %Fm.loc4_16.1: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc4_16.1 (constants.%Fm)] -// CHECK:STDOUT: %.loc4_33.1: type = type_component_of %Fm.loc4_16.1 [symbolic = %.loc4_33.1 (constants.%.42f)] -// CHECK:STDOUT: %.loc4_30.3: = form_param_pattern_action %Fm.ref.loc4_33, v [template] -// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc4_33.1 [symbolic = %pattern_type (constants.%pattern_type.177)] -// CHECK:STDOUT: %.loc4_30.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_30.3 [template = %.loc4_30.4 (constants.%.481d89.1)] -// CHECK:STDOUT: %v.patt.loc4_30.2: @F.%pattern_type (%pattern_type.177) = wrapper_binding_pattern v, %.loc4_30.4 [template = %v.patt.loc4_30.2 (constants.%v.patt.db46d6.1)] -// CHECK:STDOUT: %.loc4_37.3: = out_form_param_pattern_action %Fm.ref.loc4_41 [template] -// CHECK:STDOUT: %.loc4_37.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc4_37.3 [template = %.loc4_37.4 (constants.%.05fee9.1)] -// CHECK:STDOUT: %return.patt.loc4_37.2: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc4_37.4, %.loc4_33.1 [template = %return.patt.loc4_37.2 (constants.%return.patt.94bfcb.1)] -// CHECK:STDOUT: %.loc4_30.5: = callee_pattern_match_action constants.%.481d89.1, call_param0 [template] -// CHECK:STDOUT: %.loc4_30.6: @F.%.loc4_33.1 (%.42f) = splice_inst %.loc4_30.5 [template = %.loc4_30.6 (constants.%.59eb0c.1)] -// CHECK:STDOUT: %.loc4_37.5: = callee_pattern_match_action constants.%.05fee9.1, call_param1 [template] -// CHECK:STDOUT: %.loc4_37.6: @F.%.loc4_33.1 (%.42f) = splice_inst %.loc4_37.5 [template = %.loc4_37.6 (constants.%.4d6629.1)] +// CHECK:STDOUT: generic fn @F(%Fm.loc6_16.2: Core.Form) { +// CHECK:STDOUT: %Fm.patt.loc6_16.2: %pattern_type.13f = symbolic_binding_pattern Fm, 0 [symbolic = %Fm.patt.loc6_16.2 (constants.%Fm.patt)] +// CHECK:STDOUT: %Fm.loc6_16.1: Core.Form = symbolic_binding Fm, 0 [symbolic = %Fm.loc6_16.1 (constants.%Fm)] +// CHECK:STDOUT: %.loc6_33.1: type = type_component_of %Fm.loc6_16.1 [symbolic = %.loc6_33.1 (constants.%.42f)] +// CHECK:STDOUT: %.loc6_30.3: = form_param_pattern_action %Fm.ref.loc6_33, v [template] +// CHECK:STDOUT: %pattern_type: type = pattern_type %.loc6_33.1 [symbolic = %pattern_type (constants.%pattern_type.177)] +// CHECK:STDOUT: %.loc6_30.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc6_30.3 [template = %.loc6_30.4 (constants.%.481d89.1)] +// CHECK:STDOUT: %v.patt.loc6_30.2: @F.%pattern_type (%pattern_type.177) = wrapper_binding_pattern v, %.loc6_30.4 [template = %v.patt.loc6_30.2 (constants.%v.patt.db46d6.1)] +// CHECK:STDOUT: %.loc6_37.3: = out_form_param_pattern_action %Fm.ref.loc6_41 [template] +// CHECK:STDOUT: %.loc6_37.4: @F.%pattern_type (%pattern_type.177) = splice_inst %.loc6_37.3 [template = %.loc6_37.4 (constants.%.05fee9.1)] +// CHECK:STDOUT: %return.patt.loc6_37.2: @F.%pattern_type (%pattern_type.177) = return_slot_pattern %.loc6_37.4, %.loc6_33.1 [template = %return.patt.loc6_37.2 (constants.%return.patt.94bfcb.1)] +// CHECK:STDOUT: %.loc6_30.5: = callee_pattern_match_action constants.%.481d89.1, call_param0 [template] +// CHECK:STDOUT: %.loc6_30.6: @F.%.loc6_33.1 (%.42f) = splice_inst %.loc6_30.5 [template = %.loc6_30.6 (constants.%.59eb0c.1)] +// CHECK:STDOUT: %.loc6_37.5: = callee_pattern_match_action constants.%.05fee9.1, call_param1 [template] +// CHECK:STDOUT: %.loc6_37.6: @F.%.loc6_33.1 (%.42f) = splice_inst %.loc6_37.5 [template = %.loc6_37.6 (constants.%.4d6629.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %.loc4_33.1 [symbolic = %require_complete (constants.%require_complete.c9b)] +// CHECK:STDOUT: %require_complete: = require_complete_type %.loc6_33.1 [symbolic = %require_complete (constants.%require_complete.c9b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%.loc4_30.1: @F.%.loc4_33.1 (%.42f)) -> out %.loc4_37.1:? %Fm { +// CHECK:STDOUT: fn(%.loc6_30.1: @F.%.loc6_33.1 (%.42f)) -> out %.loc6_37.1:? %Fm { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.ref: @F.%.loc4_33.1 (%.42f) = name_ref v, %v +// CHECK:STDOUT: %v.ref: @F.%.loc6_33.1 (%.42f) = name_ref v, %v // CHECK:STDOUT: return %v.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %v.var.loc11: ref %i32 = var_storage %v.var_patt +// CHECK:STDOUT: %v.var.loc13: ref %i32 = var_storage %v.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc11: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60] -// CHECK:STDOUT: %bound_method.loc11_3.1: = bound_method %int_0, %impl.elem0.loc11 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] -// CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem0.loc11, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc11_3.2: = bound_method %int_0, %specific_fn.loc11 [concrete = constants.%bound_method] -// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc11_3.2(%int_0) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc11: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %v.var.loc11, %.loc11 -// CHECK:STDOUT: %i32.loc11: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %v: ref %i32 = wrapper_binding v, %v.var.loc11 +// CHECK:STDOUT: %impl.elem0.loc13: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60] +// CHECK:STDOUT: %bound_method.loc13_3.1: = bound_method %int_0, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] +// CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc13_3.2: = bound_method %int_0, %specific_fn.loc13 [concrete = constants.%bound_method] +// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc13_3.2(%int_0) [concrete = constants.%int_0.753] +// CHECK:STDOUT: %.loc13_3.1: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %v.var.loc13, %.loc13_3.1 +// CHECK:STDOUT: %i32.loc13: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %v: ref %i32 = wrapper_binding v, %v.var.loc13 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: %pattern_type.d94 = ref_binding_pattern v [concrete = constants.%v.patt.1f6] // CHECK:STDOUT: %v.var_patt: %pattern_type.d94 = var_pattern %v.patt [concrete = constants.%v.var_patt.afe] // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %i32 = var_storage %x.var_patt -// CHECK:STDOUT: %F.ref.loc13: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %i32.loc13_34: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc13_30: Core.Form = init_form %i32.loc13_34 [concrete = constants.%.0b3] -// CHECK:STDOUT: %v.ref.loc13: ref %i32 = name_ref v, %v -// CHECK:STDOUT: %F.specific_fn.loc13: = specific_function %F.ref.loc13, @F(constants.%.0b3) [concrete = constants.%F.specific_fn.aed] -// CHECK:STDOUT: %.loc13_40: %i32 = acquire_value %v.ref.loc13 -// CHECK:STDOUT: %impl.elem0.loc13: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] -// CHECK:STDOUT: %bound_method.loc13_40.1: = bound_method %.loc13_40, %impl.elem0.loc13 -// CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc13_40.2: = bound_method %.loc13_40, %specific_fn.loc13 -// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc13_40.2(%.loc13_40) +// CHECK:STDOUT: %F.ref.loc15: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] +// CHECK:STDOUT: %i32.loc15_34: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc15_30: Core.Form = init_form %i32.loc15_34 [concrete = constants.%.0b3] +// CHECK:STDOUT: %v.ref.loc15: ref %i32 = name_ref v, %v +// CHECK:STDOUT: %F.specific_fn.loc15: = specific_function %F.ref.loc15, @F(constants.%.0b3) [concrete = constants.%F.specific_fn.aed] +// CHECK:STDOUT: %.loc15_40: %i32 = acquire_value %v.ref.loc15 +// CHECK:STDOUT: %impl.elem0.loc15: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] +// CHECK:STDOUT: %bound_method.loc15_40.1: = bound_method %.loc15_40, %impl.elem0.loc15 +// CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] +// CHECK:STDOUT: %bound_method.loc15_40.2: = bound_method %.loc15_40, %specific_fn.loc15 +// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc15_40.2(%.loc15_40) // CHECK:STDOUT: %v.var.1: ref %i32 = var_storage constants.%v.var_patt.90aa0b.1 // CHECK:STDOUT: assign %v.var.1, %Int.as.Copy.impl.Op.call -// CHECK:STDOUT: %F.call.loc13: init %i32 = call %F.specific_fn.loc13(%v.var.1) -// CHECK:STDOUT: assign %x.var, %F.call.loc13 -// CHECK:STDOUT: %i32.loc13_17: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %F.call.loc15: init %i32 = call %F.specific_fn.loc15(%v.var.1) +// CHECK:STDOUT: assign %x.var, %F.call.loc15 +// CHECK:STDOUT: %i32.loc15_17: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %x: ref %i32 = wrapper_binding x, %x.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %pattern_type.d94 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.d94 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.ref.loc14: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %i32.loc14_38: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc14_34: Core.Form = ref_form %i32.loc14_38 [concrete = constants.%.30e] -// CHECK:STDOUT: %v.ref.loc14: ref %i32 = name_ref v, %v -// CHECK:STDOUT: %.loc14_44: %i32 = ref_tag %v.ref.loc14 -// CHECK:STDOUT: %F.specific_fn.loc14: = specific_function %F.ref.loc14, @F(constants.%.30e) [concrete = constants.%F.specific_fn.503] -// CHECK:STDOUT: %F.call.loc14: ref %i32 = call %F.specific_fn.loc14(%v.ref.loc14) -// CHECK:STDOUT: %i32.loc14_21: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %y: ref %i32 = wrapper_binding y, %F.call.loc14 +// CHECK:STDOUT: %F.ref.loc16: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] +// CHECK:STDOUT: %i32.loc16_38: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc16_34: Core.Form = ref_form %i32.loc16_38 [concrete = constants.%.30e] +// CHECK:STDOUT: %v.ref.loc16: ref %i32 = name_ref v, %v +// CHECK:STDOUT: %.loc16_44: %i32 = ref_tag %v.ref.loc16 +// CHECK:STDOUT: %F.specific_fn.loc16: = specific_function %F.ref.loc16, @F(constants.%.30e) [concrete = constants.%F.specific_fn.503] +// CHECK:STDOUT: %F.call.loc16: ref %i32 = call %F.specific_fn.loc16(%v.ref.loc16) +// CHECK:STDOUT: %i32.loc16_21: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %y: ref %i32 = wrapper_binding y, %F.call.loc16 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %y.patt: %pattern_type.d94 = ref_binding_pattern y [concrete = constants.%y.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %F.ref.loc15: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %i32.loc15_34: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %.loc15_30: Core.Form = value_form %i32.loc15_34 [concrete = constants.%.acd] -// CHECK:STDOUT: %v.ref.loc15: ref %i32 = name_ref v, %v -// CHECK:STDOUT: %F.specific_fn.loc15: = specific_function %F.ref.loc15, @F(constants.%.acd) [concrete = constants.%F.specific_fn.efd] -// CHECK:STDOUT: %.loc15_40: %i32 = acquire_value %v.ref.loc15 -// CHECK:STDOUT: %F.call.loc15: %i32 = call %F.specific_fn.loc15(%.loc15_40) -// CHECK:STDOUT: %i32.loc15_17: type = type_literal constants.%i32 [concrete = constants.%i32] -// CHECK:STDOUT: %z: %i32 = wrapper_binding z, %F.call.loc15 +// CHECK:STDOUT: %F.ref.loc17: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] +// CHECK:STDOUT: %i32.loc17_34: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %.loc17_30: Core.Form = value_form %i32.loc17_34 [concrete = constants.%.acd] +// CHECK:STDOUT: %v.ref.loc17: ref %i32 = name_ref v, %v +// CHECK:STDOUT: %F.specific_fn.loc17: = specific_function %F.ref.loc17, @F(constants.%.acd) [concrete = constants.%F.specific_fn.efd] +// CHECK:STDOUT: %.loc17_40: %i32 = acquire_value %v.ref.loc17 +// CHECK:STDOUT: %F.call.loc17: %i32 = call %F.specific_fn.loc17(%.loc17_40) +// CHECK:STDOUT: %i32.loc17_17: type = type_literal constants.%i32 [concrete = constants.%i32] +// CHECK:STDOUT: %z: %i32 = wrapper_binding z, %F.call.loc17 // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %z.patt: %pattern_type.d94 = value_binding_pattern z [concrete = constants.%z.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %SelfDestruct.ref: %Destroy.assoc_type = name_ref SelfDestruct, imports.%Core.import_ref.8ba [concrete = constants.%assoc2] -// CHECK:STDOUT: %impl.elem2: %.d2d = impl_witness_access constants.%custom_witness.f8f, element2 [concrete = constants.%Destroy.WithSelf.SelfDestruct.db3] -// CHECK:STDOUT: %bound_method.1: = bound_method %v.var.1, %impl.elem2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.1: init %empty_tuple.type = call %bound_method.1(%v.var.1) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13(%x.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %v.var.loc11, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%v.var.loc11) +// CHECK:STDOUT: %Destroy.facet.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.1: %Destroy.type = converted constants.%i32, %Destroy.facet.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.2: %Destroy.type = converted constants.%i32, %Destroy.facet.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%v.var.1) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc15: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc13_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc13_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc13: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%v.var.loc13) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.2(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.2(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.2(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Fm) { -// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt -// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%Fm -// CHECK:STDOUT: %.loc4_33.1 => constants.%.42f -// CHECK:STDOUT: %.loc4_30.3 => constants.%.c5c +// CHECK:STDOUT: %Fm.patt.loc6_16.2 => constants.%Fm.patt +// CHECK:STDOUT: %Fm.loc6_16.1 => constants.%Fm +// CHECK:STDOUT: %.loc6_33.1 => constants.%.42f +// CHECK:STDOUT: %.loc6_30.3 => constants.%.c5c // CHECK:STDOUT: %pattern_type => constants.%pattern_type.177 -// CHECK:STDOUT: %.loc4_30.4 => constants.%.481d89.2 -// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.db46d6.2 -// CHECK:STDOUT: %.loc4_37.3 => constants.%.2e1 -// CHECK:STDOUT: %.loc4_37.4 => constants.%.05fee9.2 -// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.94bfcb.2 -// CHECK:STDOUT: %.loc4_30.5 => constants.%.0c9 -// CHECK:STDOUT: %.loc4_30.6 => constants.%.59eb0c.2 -// CHECK:STDOUT: %.loc4_37.5 => constants.%.ed0 -// CHECK:STDOUT: %.loc4_37.6 => constants.%.4d6629.2 +// CHECK:STDOUT: %.loc6_30.4 => constants.%.481d89.2 +// CHECK:STDOUT: %v.patt.loc6_30.2 => constants.%v.patt.db46d6.2 +// CHECK:STDOUT: %.loc6_37.3 => constants.%.2e1 +// CHECK:STDOUT: %.loc6_37.4 => constants.%.05fee9.2 +// CHECK:STDOUT: %return.patt.loc6_37.2 => constants.%return.patt.94bfcb.2 +// CHECK:STDOUT: %.loc6_30.5 => constants.%.0c9 +// CHECK:STDOUT: %.loc6_30.6 => constants.%.59eb0c.2 +// CHECK:STDOUT: %.loc6_37.5 => constants.%.ed0 +// CHECK:STDOUT: %.loc6_37.6 => constants.%.4d6629.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%.0b3) { -// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt -// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%.0b3 -// CHECK:STDOUT: %.loc4_33.1 => constants.%i32 -// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.splice_block +// CHECK:STDOUT: %Fm.patt.loc6_16.2 => constants.%Fm.patt +// CHECK:STDOUT: %Fm.loc6_16.1 => constants.%.0b3 +// CHECK:STDOUT: %.loc6_33.1 => constants.%i32 +// CHECK:STDOUT: %.loc6_30.3 => constants.%inst.splice_block // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d94 -// CHECK:STDOUT: %.loc4_30.4 => constants.%v.var_patt.90aa0b.1 -// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.4c9 -// CHECK:STDOUT: %.loc4_37.3 => constants.%inst.out_param_pattern -// CHECK:STDOUT: %.loc4_37.4 => constants.%return.param_patt.2999fd.1 -// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.6fa -// CHECK:STDOUT: %.loc4_30.5 => constants.%.0c9 -// CHECK:STDOUT: %.loc4_30.6 => constants.%.c443 -// CHECK:STDOUT: %.loc4_37.5 => constants.%.ed0 -// CHECK:STDOUT: %.loc4_37.6 => constants.%.26e +// CHECK:STDOUT: %.loc6_30.4 => constants.%v.var_patt.90aa0b.1 +// CHECK:STDOUT: %v.patt.loc6_30.2 => constants.%v.patt.4c9 +// CHECK:STDOUT: %.loc6_37.3 => constants.%inst.out_param_pattern +// CHECK:STDOUT: %.loc6_37.4 => constants.%return.param_patt.2999fd.1 +// CHECK:STDOUT: %return.patt.loc6_37.2 => constants.%return.patt.6fa +// CHECK:STDOUT: %.loc6_30.5 => constants.%.0c9 +// CHECK:STDOUT: %.loc6_30.6 => constants.%.c443 +// CHECK:STDOUT: %.loc6_37.5 => constants.%.ed0 +// CHECK:STDOUT: %.loc6_37.6 => constants.%.26e // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%.30e) { -// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt -// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%.30e -// CHECK:STDOUT: %.loc4_33.1 => constants.%i32 -// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.ref_param_pattern +// CHECK:STDOUT: %Fm.patt.loc6_16.2 => constants.%Fm.patt +// CHECK:STDOUT: %Fm.loc6_16.1 => constants.%.30e +// CHECK:STDOUT: %.loc6_33.1 => constants.%i32 +// CHECK:STDOUT: %.loc6_30.3 => constants.%inst.ref_param_pattern // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d94 -// CHECK:STDOUT: %.loc4_30.4 => constants.%v.param_patt.8c11bb.1 -// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.600 -// CHECK:STDOUT: %.loc4_37.3 => constants.%inst.ref_return_pattern -// CHECK:STDOUT: %.loc4_37.4 => constants.%.b71e7d.1 -// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.2c5 -// CHECK:STDOUT: %.loc4_30.5 => constants.%.0c9 -// CHECK:STDOUT: %.loc4_30.6 => constants.%.c443 -// CHECK:STDOUT: %.loc4_37.5 => constants.%.ed0 -// CHECK:STDOUT: %.loc4_37.6 => constants.%.26e +// CHECK:STDOUT: %.loc6_30.4 => constants.%v.param_patt.8c11bb.1 +// CHECK:STDOUT: %v.patt.loc6_30.2 => constants.%v.patt.600 +// CHECK:STDOUT: %.loc6_37.3 => constants.%inst.ref_return_pattern +// CHECK:STDOUT: %.loc6_37.4 => constants.%.b71e7d.1 +// CHECK:STDOUT: %return.patt.loc6_37.2 => constants.%return.patt.2c5 +// CHECK:STDOUT: %.loc6_30.5 => constants.%.0c9 +// CHECK:STDOUT: %.loc6_30.6 => constants.%.c443 +// CHECK:STDOUT: %.loc6_37.5 => constants.%.ed0 +// CHECK:STDOUT: %.loc6_37.6 => constants.%.26e // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%.acd) { -// CHECK:STDOUT: %Fm.patt.loc4_16.2 => constants.%Fm.patt -// CHECK:STDOUT: %Fm.loc4_16.1 => constants.%.acd -// CHECK:STDOUT: %.loc4_33.1 => constants.%i32 -// CHECK:STDOUT: %.loc4_30.3 => constants.%inst.value_param_pattern +// CHECK:STDOUT: %Fm.patt.loc6_16.2 => constants.%Fm.patt +// CHECK:STDOUT: %Fm.loc6_16.1 => constants.%.acd +// CHECK:STDOUT: %.loc6_33.1 => constants.%i32 +// CHECK:STDOUT: %.loc6_30.3 => constants.%inst.value_param_pattern // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d94 -// CHECK:STDOUT: %.loc4_30.4 => constants.%v.param_patt.9d4532.1 -// CHECK:STDOUT: %v.patt.loc4_30.2 => constants.%v.patt.58a -// CHECK:STDOUT: %.loc4_37.3 => constants.%inst.value_return_pattern -// CHECK:STDOUT: %.loc4_37.4 => constants.%.45b17a.1 -// CHECK:STDOUT: %return.patt.loc4_37.2 => constants.%return.patt.f8b -// CHECK:STDOUT: %.loc4_30.5 => constants.%.0c9 -// CHECK:STDOUT: %.loc4_30.6 => constants.%.c443 -// CHECK:STDOUT: %.loc4_37.5 => constants.%.ed0 -// CHECK:STDOUT: %.loc4_37.6 => constants.%.26e +// CHECK:STDOUT: %.loc6_30.4 => constants.%v.param_patt.9d4532.1 +// CHECK:STDOUT: %v.patt.loc6_30.2 => constants.%v.patt.58a +// CHECK:STDOUT: %.loc6_37.3 => constants.%inst.value_return_pattern +// CHECK:STDOUT: %.loc6_37.4 => constants.%.45b17a.1 +// CHECK:STDOUT: %return.patt.loc6_37.2 => constants.%return.patt.f8b +// CHECK:STDOUT: %.loc6_30.5 => constants.%.0c9 +// CHECK:STDOUT: %.loc6_30.6 => constants.%.c443 +// CHECK:STDOUT: %.loc6_37.5 => constants.%.ed0 +// CHECK:STDOUT: %.loc6_37.6 => constants.%.26e // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index ebb5cadebf2b..adb2f780e5d7 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -69,15 +69,20 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,7 +90,7 @@ fn Main() { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -96,24 +101,9 @@ fn Main() { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc20 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -171,19 +161,14 @@ fn Main() { // CHECK:STDOUT: %b.patt: %pattern_type.d94 = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.d94 = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc20_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc20_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%b.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20(%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 ba9006d0bf32..6af45881d209 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -69,30 +69,34 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.dcf: = bound_method %int_6.462, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.c9a: = bound_method %int_6.462, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_6.b33: %i32 = int_value 6 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.062: %pattern_type.6e0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9c2: %pattern_type.6e0 = wrapper_binding_pattern self, %self.param_patt.062 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f9d: %SubobjectDestroy.type = facet_value %tuple.type.294, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.24d: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f9d) [concrete] +// CHECK:STDOUT: %Destroy.facet.544: %Destroy.type = facet_value %tuple.type.294, (%DestroyImpl.impl_witness.24d, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.bd7: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.544) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -100,38 +104,9 @@ fn Main() { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc18_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6e0 = ref_param_pattern [concrete = constants.%self.param_patt.062] -// CHECK:STDOUT: %self.patt: %pattern_type.6e0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9c2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.294 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.294 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc18_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6e0 = ref_param_pattern [concrete = constants.%self.param_patt.062] -// CHECK:STDOUT: %self.patt: %pattern_type.6e0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9c2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.294 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.294 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -174,8 +149,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18: init %i32 = call %bound_method.loc18_22.2(%int_1) [concrete = constants.%int_1.68a] // CHECK:STDOUT: %.loc18_22.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18 [concrete = constants.%int_1.68a] // CHECK:STDOUT: %.loc18_22.3: init %tuple.type.294 to %x.var = tuple_init (%.loc18_22.2) [concrete = constants.%tuple.f6b] -// CHECK:STDOUT: %.loc18_3: init %tuple.type.294 = converted %.loc18_22.1, %.loc18_22.3 [concrete = constants.%tuple.f6b] -// CHECK:STDOUT: assign %x.var, %.loc18_3 +// CHECK:STDOUT: %.loc18_3.1: init %tuple.type.294 = converted %.loc18_22.1, %.loc18_22.3 [concrete = constants.%tuple.f6b] +// CHECK:STDOUT: assign %x.var, %.loc18_3.1 // CHECK:STDOUT: %.loc18_15.1: type = splice_block %.loc18_15.3 [concrete = constants.%tuple.type.294] { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %.loc18_15.2: %tuple.type.135 = tuple_literal (%i32) [concrete = constants.%tuple.f7a] @@ -200,37 +175,27 @@ fn Main() { // CHECK:STDOUT: %.loc20_12.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20 [concrete = constants.%int_6.b33] // CHECK:STDOUT: %.loc20_12.2: %i32 = converted %int_6, %.loc20_12.1 [concrete = constants.%int_6.b33] // CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc20_8, %.loc20_12.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%tuple.type.294, (constants.%DestroyImpl.impl_witness.24d, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.544] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%tuple.type.294, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.544] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%tuple.type.294, (constants.%DestroyImpl.impl_witness.24d, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.544] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%tuple.type.294, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.544] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.544) [concrete = constants.%SelfDestruct.specific_fn.bd7] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %tuple.type.294) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_3.2(%self.param: ref %tuple.type.294) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.2(%self.param: ref %tuple.type.294) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_3.2(%self.param: ref %tuple.type.294) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/ref.carbon b/toolchain/check/testdata/function/call/ref.carbon index 9355a73d7923..97b07d625f3d 100644 --- a/toolchain/check/testdata/function/call/ref.carbon +++ b/toolchain/check/testdata/function/call/ref.carbon @@ -128,36 +128,24 @@ fn G(ref d: D) { F(ref d); } // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.753: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -183,8 +171,8 @@ fn G(ref d: D) { F(ref d); } // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc8_3.2(%int_0) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc8: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %y.var, %.loc8 +// CHECK:STDOUT: %.loc8_3.1: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %y.var, %.loc8_3.1 // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %y: ref %i32 = wrapper_binding y, %y.var // CHECK:STDOUT: name_binding_decl { @@ -195,21 +183,16 @@ fn G(ref d: D) { F(ref d); } // CHECK:STDOUT: %y.ref: ref %i32 = name_ref y, %y // CHECK:STDOUT: %.loc10: %i32 = ref_tag %y.ref // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%y.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %y.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%y.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%y.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- class.carbon // CHECK:STDOUT: @@ -234,55 +217,24 @@ fn G(ref d: D) { F(ref d); } // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.5c0: %T.as.DefaultOrUnformed.impl.Op.type.5f6 = struct_value () [symbolic] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.30a: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.856, @T.as.DefaultOrUnformed.impl(%C) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %C, (%DefaultOrUnformed.impl_witness.30a) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -317,8 +269,8 @@ fn G(ref d: D) { F(ref d); } // CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_11.1 [concrete = constants.%C] // CHECK:STDOUT: %.loc10_11.2: type = converted %.loc10_11.1, %as_type [concrete = constants.%C] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc10_3: ref %C = splice_block %c.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %C to %.loc10_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc10_3.1: ref %C = splice_block %c.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %C to %.loc10_3.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %c.var, %T.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = wrapper_binding c, %c.var @@ -330,30 +282,16 @@ fn G(ref d: D) { F(ref d); } // CHECK:STDOUT: %F.ref: %C.F.type = name_ref F, @C.%C.F.decl [concrete = constants.%C.F] // CHECK:STDOUT: %C.F.bound: = bound_method %c.ref, %F.ref // CHECK:STDOUT: %C.F.call: init %empty_tuple.type = call %C.F.bound(%c.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%c.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/return_implicit.carbon b/toolchain/check/testdata/function/call/return_implicit.carbon index 925ba592a299..c09e10a18f94 100644 --- a/toolchain/check/testdata/function/call/return_implicit.carbon +++ b/toolchain/check/testdata/function/call/return_implicit.carbon @@ -32,41 +32,31 @@ fn Main() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.cb1 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.cb1 = var_pattern %b.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc19 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc19 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc19 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -100,19 +90,14 @@ fn Main() { // CHECK:STDOUT: %b.patt: %pattern_type.cb1 = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.cb1 = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc19_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc19_3.1: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc19_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc19_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc19_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc19_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%b.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc19(%self.param: ref %empty_tuple.type) = "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 6a04efc9a356..b26535ea2a04 100644 --- a/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon +++ b/toolchain/check/testdata/function/declaration/fail_import_incomplete_return.carbon @@ -194,23 +194,20 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %pattern_type.d8d: type = pattern_type %D [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc19_17.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc19_17.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b8e: %pattern_type.d8d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.86b: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt.b8e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc19_17.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc19_17.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19_17.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc19_17.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f61: %SubobjectDestroy.type = facet_value %D, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.30f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f61) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %D, (%DestroyImpl.impl_witness.30f, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %ReturnDUsed.type: type = fn_type @ReturnDUsed [concrete] // CHECK:STDOUT: %ReturnDUsed: %ReturnDUsed.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -224,44 +221,15 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %Main.ReturnDUsed: %ReturnDUsed.type = import_ref Main//incomplete_return, ReturnDUsed, loaded [concrete = constants.%ReturnDUsed] // CHECK:STDOUT: %Main.Call = import_ref Main//incomplete_return, Call, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//incomplete_return, loc25_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//incomplete_return, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc19_17.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc19_17.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc19_17.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8d = ref_param_pattern [concrete = constants.%self.param_patt.b8e] -// CHECK:STDOUT: %self.patt: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.86b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc19_17.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8d = ref_param_pattern [concrete = constants.%self.param_patt.b8e] -// CHECK:STDOUT: %self.patt: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.86b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -300,14 +268,22 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %.loc19_17.1: ref %D = temporary_storage // CHECK:STDOUT: %ReturnDUnused.call: init %D to %.loc19_17.1 = call %ReturnDUnused.ref() // CHECK:STDOUT: %.loc19_17.2: ref %D = temporary %.loc19_17.1, %ReturnDUnused.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %.loc19_17.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%.loc19_17.2) +// CHECK:STDOUT: %Destroy.facet.loc19_17.1: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc19_17.3: %Destroy.type = converted constants.%D, %Destroy.facet.loc19_17.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc19_17.2: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc19_17.4: %Destroy.type = converted constants.%D, %Destroy.facet.loc19_17.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc19_17.2) // CHECK:STDOUT: %ReturnDUsed.ref: %ReturnDUsed.type = name_ref ReturnDUsed, imports.%Main.ReturnDUsed [concrete = constants.%ReturnDUsed] // CHECK:STDOUT: %.loc20_15.1: ref %D = temporary_storage // CHECK:STDOUT: %ReturnDUsed.call: init %D to %.loc20_15.1 = call %ReturnDUsed.ref() // CHECK:STDOUT: %.loc20_15.2: ref %D = temporary %.loc20_15.1, %ReturnDUsed.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc20: = bound_method %.loc20_15.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc20(%.loc20_15.2) +// CHECK:STDOUT: %Destroy.facet.loc20_15.1: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_15.3: %Destroy.type = converted constants.%D, %Destroy.facet.loc20_15.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc20_15.2: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_15.4: %Destroy.type = converted constants.%D, %Destroy.facet.loc20_15.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc20: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc20_15.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -317,27 +293,9 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: // CHECK:STDOUT: fn @ReturnDUnused [from "fail_incomplete_return.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19_17.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc19_17.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19_17.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19_17.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19_17.2(%self.param: ref %D) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19_17.2(%self.param: ref %D) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19_17.2(%self.param: ref %D) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc19_17.2(%self.param: ref %D) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @ReturnDUsed [from "fail_incomplete_return.carbon"]; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/deduced_return/form.carbon b/toolchain/check/testdata/function/deduced_return/form.carbon index f1c3f8dc6b90..7e5d7384227d 100644 --- a/toolchain/check/testdata/function/deduced_return/form.carbon +++ b/toolchain/check/testdata/function/deduced_return/form.carbon @@ -336,14 +336,17 @@ fn F() ->? form(ref auto) { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %x.patt: %pattern_type.d94 = ref_binding_pattern x [concrete] // CHECK:STDOUT: %x.var_patt: %pattern_type.d94 = var_pattern %x.patt [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -351,23 +354,8 @@ fn F() ->? form(ref auto) { // CHECK:STDOUT: %As.impl_witness_table.1c2 = impl_witness_table (%Core.import_ref.9e0), @Core.IntLiteral.as.As.impl [concrete] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -417,19 +405,14 @@ fn F() ->? form(ref auto) { // CHECK:STDOUT: %x.patt: %pattern_type.d94 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.d94 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/deduced_return/import.carbon b/toolchain/check/testdata/function/deduced_return/import.carbon index 6ad83911eeb2..8da92cdf20ab 100644 --- a/toolchain/check/testdata/function/deduced_return/import.carbon +++ b/toolchain/check/testdata/function/deduced_return/import.carbon @@ -163,6 +163,7 @@ fn L() -> (bool, bool) { return K(true); } // CHECK:STDOUT: %Pair.specific_fn.24c: = specific_function %Pair, @Pair(%Copy.facet.95d) [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %BitAndWith.type.a06: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.a06 = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.7f7: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] @@ -173,35 +174,37 @@ fn L() -> (bool, bool) { return K(true); } // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %Copy.type, %type.as.BitAndWith.impl.Op [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@Copy & @Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.143: type = pattern_type %facet_type [concrete] -// CHECK:STDOUT: %U.patt.256: %pattern_type.143 = symbolic_binding_pattern U, 0 [symbolic] -// CHECK:STDOUT: %U.dc4: %facet_type = symbolic_binding U, 0 [symbolic] -// CHECK:STDOUT: %U.as_type.5d6: type = facet_access_type %U.dc4 [symbolic] -// CHECK:STDOUT: %pattern_type.0e9: type = pattern_type %U.as_type.5d6 [symbolic] -// CHECK:STDOUT: %u.param_patt.f9a: %pattern_type.0e9 = value_param_pattern [symbolic] -// CHECK:STDOUT: %u.patt.d30: %pattern_type.0e9 = wrapper_binding_pattern u, %u.param_patt.f9a [symbolic] -// CHECK:STDOUT: %tuple.type.56f: type = tuple_type (%facet_type, %facet_type) [concrete] -// CHECK:STDOUT: %tuple.f81: %tuple.type.56f = tuple_value (%U.dc4, %U.dc4) [symbolic] -// CHECK:STDOUT: %tuple.type.7d0: type = tuple_type (%U.as_type.5d6, %U.as_type.5d6) [symbolic] -// CHECK:STDOUT: %.7db: Core.Form = init_form %tuple.type.7d0 [symbolic] -// CHECK:STDOUT: %pattern_type.c29: type = pattern_type %tuple.type.7d0 [symbolic] -// CHECK:STDOUT: %return.param_patt.df9: %pattern_type.c29 = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.b82: %pattern_type.c29 = return_slot_pattern %return.param_patt.df9, %tuple.type.7d0 [symbolic] +// CHECK:STDOUT: %facet_type.bd0: type = facet_type <@Copy & @Destroy> [concrete] +// CHECK:STDOUT: %pattern_type.e81def.2: type = pattern_type %facet_type.bd0 [concrete] +// CHECK:STDOUT: %U.patt.fe6: %pattern_type.e81def.2 = symbolic_binding_pattern U, 0 [symbolic] +// CHECK:STDOUT: %U.f84: %facet_type.bd0 = symbolic_binding U, 0 [symbolic] +// CHECK:STDOUT: %U.as_type.c1c: type = facet_access_type %U.f84 [symbolic] +// CHECK:STDOUT: %pattern_type.2c66b4.3: type = pattern_type %U.as_type.c1c [symbolic] +// CHECK:STDOUT: %u.param_patt.f7a: %pattern_type.2c66b4.3 = value_param_pattern [symbolic] +// CHECK:STDOUT: %u.patt.659: %pattern_type.2c66b4.3 = wrapper_binding_pattern u, %u.param_patt.f7a [symbolic] +// CHECK:STDOUT: %tuple.type.24a5ba.2: type = tuple_type (%facet_type.bd0, %facet_type.bd0) [concrete] +// CHECK:STDOUT: %tuple.598: %tuple.type.24a5ba.2 = tuple_value (%U.f84, %U.f84) [symbolic] +// CHECK:STDOUT: %tuple.type.db8bf7.2: type = tuple_type (%U.as_type.c1c, %U.as_type.c1c) [symbolic] +// CHECK:STDOUT: %.58c1c6.2: Core.Form = init_form %tuple.type.db8bf7.2 [symbolic] +// CHECK:STDOUT: %pattern_type.aacade.2: type = pattern_type %tuple.type.db8bf7.2 [symbolic] +// CHECK:STDOUT: %return.param_patt.1c7f00.2: %pattern_type.aacade.2 = out_param_pattern [symbolic] +// CHECK:STDOUT: %return.patt.e7a: %pattern_type.aacade.2 = return_slot_pattern %return.param_patt.1c7f00.2, %tuple.type.db8bf7.2 [symbolic] // CHECK:STDOUT: %K.type: type = fn_type @K [concrete] // CHECK:STDOUT: %K: %K.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.091: = require_complete_type %U.as_type.5d6 [symbolic] -// CHECK:STDOUT: %require_complete.8f6: = require_complete_type %tuple.type.7d0 [symbolic] -// CHECK:STDOUT: %Copy.lookup_impl_witness.fd8: = lookup_impl_witness %U.dc4, @Copy [symbolic] -// CHECK:STDOUT: %Copy.facet.40c: %Copy.type = facet_value %U.as_type.5d6, (%Copy.lookup_impl_witness.fd8) [symbolic] -// CHECK:STDOUT: %Id.specific_fn.e53: = specific_function %Id, @Id(%Copy.facet.40c) [symbolic] -// CHECK:STDOUT: %Pair.specific_fn.540: = specific_function %Pair, @Pair(%Copy.facet.40c) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.491: = lookup_impl_witness %U.dc4, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.589: %Destroy.type = facet_value %U.as_type.5d6, (%Destroy.lookup_impl_witness.491) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.613: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.589) [symbolic] -// CHECK:STDOUT: %.a48: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.613, %Destroy.facet.589 [symbolic] -// CHECK:STDOUT: %impl.elem2: %.a48 = impl_witness_access %Destroy.lookup_impl_witness.491, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.eba: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.589) [symbolic] +// CHECK:STDOUT: %require_complete.d83f06.2: = require_complete_type %U.as_type.c1c [symbolic] +// CHECK:STDOUT: %require_complete.b868a8.2: = require_complete_type %tuple.type.db8bf7.2 [symbolic] +// CHECK:STDOUT: %Copy.lookup_impl_witness.d9c332.2: = lookup_impl_witness %U.f84, @Copy [symbolic] +// CHECK:STDOUT: %Copy.facet.d94: %Copy.type = facet_value %U.as_type.c1c, (%Copy.lookup_impl_witness.d9c332.2) [symbolic] +// CHECK:STDOUT: %Id.specific_fn.1c0: = specific_function %Id, @Id(%Copy.facet.d94) [symbolic] +// CHECK:STDOUT: %Pair.specific_fn.4e1: = specific_function %Pair, @Pair(%Copy.facet.d94) [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.bf2: = lookup_impl_witness %U.f84, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.70f: = lookup_impl_witness %U.f84, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %Destroy.facet.46f: %Destroy.type = facet_value %U.as_type.c1c, (%DestroyImpl.lookup_impl_witness.bf2, %SubobjectDestroy.lookup_impl_witness.70f) [symbolic] // CHECK:STDOUT: %tuple.type.784: type = tuple_type (bool, bool) [concrete] // CHECK:STDOUT: %.7b8: Core.Form = init_form %tuple.type.784 [concrete] // CHECK:STDOUT: %pattern_type.860: type = pattern_type %tuple.type.784 [concrete] @@ -209,25 +212,22 @@ fn L() -> (bool, bool) { return K(true); } // CHECK:STDOUT: %return.patt.fc1: %pattern_type.860 = return_slot_pattern %return.param_patt.3b7, %tuple.type.784 [concrete] // CHECK:STDOUT: %Copy.impl_witness.5e1: = impl_witness imports.%Copy.impl_witness_table.bda [concrete] // CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f: = custom_witness (%Destroy.WithSelf.Op.403, %Destroy.WithSelf.SubobjectDestroy.d01, %Destroy.WithSelf.SelfDestruct.db3), @Destroy [concrete] -// CHECK:STDOUT: %facet_value: %facet_type = facet_value bool, (%Copy.impl_witness.5e1, %custom_witness.f8f) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %complete_type.127: = complete_type_witness bool [concrete] +// CHECK:STDOUT: %facet_value: %facet_type.bd0 = facet_value bool, (%Copy.impl_witness.5e1, %DestroyImpl.impl_witness.778, %custom_witness.b80) [concrete] // CHECK:STDOUT: %u.param_patt.56f: %pattern_type.831 = value_param_pattern [concrete] // CHECK:STDOUT: %u.patt.0d7: %pattern_type.831 = wrapper_binding_pattern u, %u.param_patt.56f [concrete] -// CHECK:STDOUT: %tuple.6be: %tuple.type.56f = tuple_value (%facet_value, %facet_value) [concrete] -// CHECK:STDOUT: %complete_type.127: = complete_type_witness bool [concrete] +// CHECK:STDOUT: %tuple.11f: %tuple.type.24a5ba.2 = tuple_value (%facet_value, %facet_value) [concrete] // CHECK:STDOUT: %complete_type.e0b: = complete_type_witness %tuple.type.784 [concrete] // CHECK:STDOUT: %Copy.facet.7af: %Copy.type = facet_value bool, (%Copy.impl_witness.5e1) [concrete] // CHECK:STDOUT: %Id.specific_fn.06a: = specific_function %Id, @Id(%Copy.facet.7af) [concrete] // CHECK:STDOUT: %Pair.specific_fn.62b: = specific_function %Pair, @Pair(%Copy.facet.7af) [concrete] -// CHECK:STDOUT: %Destroy.facet.75f: %Destroy.type = facet_value bool, (%custom_witness.f8f) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.2a2: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.75f) [concrete] -// CHECK:STDOUT: %.fb9: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.2a2, %Destroy.facet.75f [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.68f: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.e68) [concrete] // CHECK:STDOUT: %bool.as.Copy.impl.Op.type: type = fn_type @bool.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %bool.as.Copy.impl.Op: %bool.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -241,6 +241,7 @@ fn L() -> (bool, bool) { return K(true); } // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -256,6 +257,9 @@ fn L() -> (bool, bool) { return K(true); } // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.a06 = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] // CHECK:STDOUT: %Core.import_ref.9c3475.1: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.9c3475.1), @type.as.BitAndWith.impl [concrete] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.Bool: type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = bool] // CHECK:STDOUT: %Core.import_ref.9c3475.2: %bool.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.bda = impl_witness_table (%Core.import_ref.9c3475.2), @bool.as.Copy.impl [concrete] @@ -275,43 +279,43 @@ fn L() -> (bool, bool) { return K(true); } // CHECK:STDOUT: %return: ref %tuple.type.35f = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %K.decl: %K.type = fn_decl @K [concrete = constants.%K] { -// CHECK:STDOUT: %U.patt.loc7_7.1: %pattern_type.143 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_7.2 (constants.%U.patt.256)] -// CHECK:STDOUT: %u.param_patt.loc7_36.1: @K.%pattern_type.loc7_36 (%pattern_type.0e9) = value_param_pattern [symbolic = %u.param_patt.loc7_36.2 (constants.%u.param_patt.f9a)] -// CHECK:STDOUT: %u.patt.loc7_36.1: @K.%pattern_type.loc7_36 (%pattern_type.0e9) = wrapper_binding_pattern u, %u.param_patt.loc7_36.1 [symbolic = %u.patt.loc7_36.2 (constants.%u.patt.d30)] -// CHECK:STDOUT: %return.param_patt.loc7_49.1: @K.%pattern_type.loc7_49 (%pattern_type.c29) = out_param_pattern [symbolic = %return.param_patt.loc7_49.2 (constants.%return.param_patt.df9)] -// CHECK:STDOUT: %return.patt.loc7_41.1: @K.%pattern_type.loc7_49 (%pattern_type.c29) = return_slot_pattern %return.param_patt.loc7_49.1, %.loc7_49.6 [symbolic = %return.patt.loc7_41.2 (constants.%return.patt.b82)] +// CHECK:STDOUT: %U.patt.loc7_7.1: %pattern_type.e81def.2 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_7.2 (constants.%U.patt.fe6)] +// CHECK:STDOUT: %u.param_patt.loc7_36.1: @K.%pattern_type.loc7_36 (%pattern_type.2c66b4.3) = value_param_pattern [symbolic = %u.param_patt.loc7_36.2 (constants.%u.param_patt.f7a)] +// CHECK:STDOUT: %u.patt.loc7_36.1: @K.%pattern_type.loc7_36 (%pattern_type.2c66b4.3) = wrapper_binding_pattern u, %u.param_patt.loc7_36.1 [symbolic = %u.patt.loc7_36.2 (constants.%u.patt.659)] +// CHECK:STDOUT: %return.param_patt.loc7_49.1: @K.%pattern_type.loc7_49 (%pattern_type.aacade.2) = out_param_pattern [symbolic = %return.param_patt.loc7_49.2 (constants.%return.param_patt.1c7f00.2)] +// CHECK:STDOUT: %return.patt.loc7_41.1: @K.%pattern_type.loc7_49 (%pattern_type.aacade.2) = return_slot_pattern %return.param_patt.loc7_49.1, %.loc7_49.6 [symbolic = %return.patt.loc7_41.2 (constants.%return.patt.e7a)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc7_45: %facet_type = name_ref U, %U.loc7_7.2 [symbolic = %U.loc7_7.1 (constants.%U.dc4)] -// CHECK:STDOUT: %U.ref.loc7_48: %facet_type = name_ref U, %U.loc7_7.2 [symbolic = %U.loc7_7.1 (constants.%U.dc4)] -// CHECK:STDOUT: %.loc7_49.3: %tuple.type.56f = tuple_literal (%U.ref.loc7_45, %U.ref.loc7_48) [symbolic = %tuple (constants.%tuple.f81)] -// CHECK:STDOUT: %U.as_type.loc7_49.1: type = facet_access_type constants.%U.dc4 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.5d6)] -// CHECK:STDOUT: %.loc7_49.4: type = converted constants.%U.dc4, %U.as_type.loc7_49.1 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.5d6)] -// CHECK:STDOUT: %U.as_type.loc7_49.2: type = facet_access_type constants.%U.dc4 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.5d6)] -// CHECK:STDOUT: %.loc7_49.5: type = converted constants.%U.dc4, %U.as_type.loc7_49.2 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.5d6)] -// CHECK:STDOUT: %.loc7_49.6: type = converted %.loc7_49.3, constants.%tuple.type.7d0 [symbolic = %tuple.type (constants.%tuple.type.7d0)] -// CHECK:STDOUT: %.loc7_49.7: Core.Form = init_form %.loc7_49.6 [symbolic = %.loc7_49.2 (constants.%.7db)] -// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %U.ref.loc7_45: %facet_type.bd0 = name_ref U, %U.loc7_7.2 [symbolic = %U.loc7_7.1 (constants.%U.f84)] +// CHECK:STDOUT: %U.ref.loc7_48: %facet_type.bd0 = name_ref U, %U.loc7_7.2 [symbolic = %U.loc7_7.1 (constants.%U.f84)] +// CHECK:STDOUT: %.loc7_49.3: %tuple.type.24a5ba.2 = tuple_literal (%U.ref.loc7_45, %U.ref.loc7_48) [symbolic = %tuple (constants.%tuple.598)] +// CHECK:STDOUT: %U.as_type.loc7_49.1: type = facet_access_type constants.%U.f84 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc7_49.4: type = converted constants.%U.f84, %U.as_type.loc7_49.1 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %U.as_type.loc7_49.2: type = facet_access_type constants.%U.f84 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc7_49.5: type = converted constants.%U.f84, %U.as_type.loc7_49.2 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc7_49.6: type = converted %.loc7_49.3, constants.%tuple.type.db8bf7.2 [symbolic = %tuple.type (constants.%tuple.type.db8bf7.2)] +// CHECK:STDOUT: %.loc7_49.7: Core.Form = init_form %.loc7_49.6 [symbolic = %.loc7_49.2 (constants.%.58c1c6.2)] +// CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%facet_type.bd0] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Core.ref.loc7_9: = name_ref Core, imports.%Core.048aa3.1 [concrete = imports.%Core.048aa3.1] // CHECK:STDOUT: %Copy.ref: type = name_ref Copy, imports.%Core.Copy [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.ref.loc7_21: = name_ref Core, imports.%Core.048aa3.1 [concrete = imports.%Core.048aa3.1] // CHECK:STDOUT: %Destroy.ref: type = name_ref Destroy, imports.%Core.Destroy [concrete = constants.%Destroy.type] // CHECK:STDOUT: %impl.elem0: %.b4e = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method.loc7_19: = bound_method %Copy.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc7_19(%Copy.ref, %Destroy.ref) [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc7_19.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc7_19.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: %bound_method: = bound_method %Copy.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Copy.ref, %Destroy.ref) [concrete = constants.%facet_type.bd0] +// CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.bd0] +// CHECK:STDOUT: %.loc7_19.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc7_19.2 [concrete = constants.%facet_type.bd0] // CHECK:STDOUT: } -// CHECK:STDOUT: %U.loc7_7.2: %facet_type = symbolic_binding U, 0 [symbolic = %U.loc7_7.1 (constants.%U.dc4)] -// CHECK:STDOUT: %u.param: @K.%U.as_type.loc7_38.1 (%U.as_type.5d6) = value_param call_param0 -// CHECK:STDOUT: %.loc7_38.1: type = splice_block %.loc7_38.2 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.5d6)] { -// CHECK:STDOUT: %U.ref.loc7_38: %facet_type = name_ref U, %U.loc7_7.2 [symbolic = %U.loc7_7.1 (constants.%U.dc4)] -// CHECK:STDOUT: %U.as_type.loc7_38.2: type = facet_access_type %U.ref.loc7_38 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.5d6)] -// CHECK:STDOUT: %.loc7_38.2: type = converted %U.ref.loc7_38, %U.as_type.loc7_38.2 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.5d6)] +// CHECK:STDOUT: %U.loc7_7.2: %facet_type.bd0 = symbolic_binding U, 0 [symbolic = %U.loc7_7.1 (constants.%U.f84)] +// CHECK:STDOUT: %u.param: @K.%U.as_type.loc7_38.1 (%U.as_type.c1c) = value_param call_param0 +// CHECK:STDOUT: %.loc7_38.1: type = splice_block %.loc7_38.2 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.c1c)] { +// CHECK:STDOUT: %U.ref.loc7_38: %facet_type.bd0 = name_ref U, %U.loc7_7.2 [symbolic = %U.loc7_7.1 (constants.%U.f84)] +// CHECK:STDOUT: %U.as_type.loc7_38.2: type = facet_access_type %U.ref.loc7_38 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %.loc7_38.2: type = converted %U.ref.loc7_38, %U.as_type.loc7_38.2 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.c1c)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @K.%U.as_type.loc7_38.1 (%U.as_type.5d6) = wrapper_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @K.%tuple.type (%tuple.type.7d0) = out_param call_param1 -// CHECK:STDOUT: %return: ref @K.%tuple.type (%tuple.type.7d0) = return_slot %return.param +// CHECK:STDOUT: %u: @K.%U.as_type.loc7_38.1 (%U.as_type.c1c) = wrapper_binding u, %u.param +// CHECK:STDOUT: %return.param: ref @K.%tuple.type (%tuple.type.db8bf7.2) = out_param call_param1 +// CHECK:STDOUT: %return: ref @K.%tuple.type (%tuple.type.db8bf7.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -346,91 +350,86 @@ fn L() -> (bool, bool) { return K(true); } // CHECK:STDOUT: return %Pair.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @K(%U.loc7_7.2: %facet_type) { -// CHECK:STDOUT: %U.patt.loc7_7.2: %pattern_type.143 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_7.2 (constants.%U.patt.256)] -// CHECK:STDOUT: %U.loc7_7.1: %facet_type = symbolic_binding U, 0 [symbolic = %U.loc7_7.1 (constants.%U.dc4)] -// CHECK:STDOUT: %U.as_type.loc7_38.1: type = facet_access_type %U.loc7_7.1 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.5d6)] -// CHECK:STDOUT: %pattern_type.loc7_36: type = pattern_type %U.as_type.loc7_38.1 [symbolic = %pattern_type.loc7_36 (constants.%pattern_type.0e9)] -// CHECK:STDOUT: %u.param_patt.loc7_36.2: @K.%pattern_type.loc7_36 (%pattern_type.0e9) = value_param_pattern [symbolic = %u.param_patt.loc7_36.2 (constants.%u.param_patt.f9a)] -// CHECK:STDOUT: %u.patt.loc7_36.2: @K.%pattern_type.loc7_36 (%pattern_type.0e9) = wrapper_binding_pattern u, %u.param_patt.loc7_36.2 [symbolic = %u.patt.loc7_36.2 (constants.%u.patt.d30)] -// CHECK:STDOUT: %tuple: %tuple.type.56f = tuple_value (%U.loc7_7.1, %U.loc7_7.1) [symbolic = %tuple (constants.%tuple.f81)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (%U.as_type.loc7_38.1, %U.as_type.loc7_38.1) [symbolic = %tuple.type (constants.%tuple.type.7d0)] -// CHECK:STDOUT: %.loc7_49.2: Core.Form = init_form %tuple.type [symbolic = %.loc7_49.2 (constants.%.7db)] -// CHECK:STDOUT: %pattern_type.loc7_49: type = pattern_type %tuple.type [symbolic = %pattern_type.loc7_49 (constants.%pattern_type.c29)] -// CHECK:STDOUT: %return.param_patt.loc7_49.2: @K.%pattern_type.loc7_49 (%pattern_type.c29) = out_param_pattern [symbolic = %return.param_patt.loc7_49.2 (constants.%return.param_patt.df9)] -// CHECK:STDOUT: %return.patt.loc7_41.2: @K.%pattern_type.loc7_49 (%pattern_type.c29) = return_slot_pattern %return.param_patt.loc7_49.2, %tuple.type [symbolic = %return.patt.loc7_41.2 (constants.%return.patt.b82)] +// CHECK:STDOUT: generic fn @K(%U.loc7_7.2: %facet_type.bd0) { +// CHECK:STDOUT: %U.patt.loc7_7.2: %pattern_type.e81def.2 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc7_7.2 (constants.%U.patt.fe6)] +// CHECK:STDOUT: %U.loc7_7.1: %facet_type.bd0 = symbolic_binding U, 0 [symbolic = %U.loc7_7.1 (constants.%U.f84)] +// CHECK:STDOUT: %U.as_type.loc7_38.1: type = facet_access_type %U.loc7_7.1 [symbolic = %U.as_type.loc7_38.1 (constants.%U.as_type.c1c)] +// CHECK:STDOUT: %pattern_type.loc7_36: type = pattern_type %U.as_type.loc7_38.1 [symbolic = %pattern_type.loc7_36 (constants.%pattern_type.2c66b4.3)] +// CHECK:STDOUT: %u.param_patt.loc7_36.2: @K.%pattern_type.loc7_36 (%pattern_type.2c66b4.3) = value_param_pattern [symbolic = %u.param_patt.loc7_36.2 (constants.%u.param_patt.f7a)] +// CHECK:STDOUT: %u.patt.loc7_36.2: @K.%pattern_type.loc7_36 (%pattern_type.2c66b4.3) = wrapper_binding_pattern u, %u.param_patt.loc7_36.2 [symbolic = %u.patt.loc7_36.2 (constants.%u.patt.659)] +// CHECK:STDOUT: %tuple: %tuple.type.24a5ba.2 = tuple_value (%U.loc7_7.1, %U.loc7_7.1) [symbolic = %tuple (constants.%tuple.598)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (%U.as_type.loc7_38.1, %U.as_type.loc7_38.1) [symbolic = %tuple.type (constants.%tuple.type.db8bf7.2)] +// CHECK:STDOUT: %.loc7_49.2: Core.Form = init_form %tuple.type [symbolic = %.loc7_49.2 (constants.%.58c1c6.2)] +// CHECK:STDOUT: %pattern_type.loc7_49: type = pattern_type %tuple.type [symbolic = %pattern_type.loc7_49 (constants.%pattern_type.aacade.2)] +// CHECK:STDOUT: %return.param_patt.loc7_49.2: @K.%pattern_type.loc7_49 (%pattern_type.aacade.2) = out_param_pattern [symbolic = %return.param_patt.loc7_49.2 (constants.%return.param_patt.1c7f00.2)] +// CHECK:STDOUT: %return.patt.loc7_41.2: @K.%pattern_type.loc7_49 (%pattern_type.aacade.2) = return_slot_pattern %return.param_patt.loc7_49.2, %tuple.type [symbolic = %return.patt.loc7_41.2 (constants.%return.patt.e7a)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc7_36: = require_complete_type %U.as_type.loc7_38.1 [symbolic = %require_complete.loc7_36 (constants.%require_complete.091)] -// CHECK:STDOUT: %require_complete.loc7_41: = require_complete_type %tuple.type [symbolic = %require_complete.loc7_41 (constants.%require_complete.8f6)] -// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc7_7.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.fd8)] -// CHECK:STDOUT: %Copy.facet.loc7_69.3: %Copy.type = facet_value %U.as_type.loc7_38.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.40c)] -// CHECK:STDOUT: %Id.specific_fn.loc7_65.2: = specific_function constants.%Id, @Id(%Copy.facet.loc7_69.3) [symbolic = %Id.specific_fn.loc7_65.2 (constants.%Id.specific_fn.e53)] -// CHECK:STDOUT: %Pair.specific_fn.loc7_60.2: = specific_function constants.%Pair, @Pair(%Copy.facet.loc7_69.3) [symbolic = %Pair.specific_fn.loc7_60.2 (constants.%Pair.specific_fn.540)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %U.loc7_7.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.491)] -// CHECK:STDOUT: %Destroy.facet.loc7_69.3: %Destroy.type = facet_value %U.as_type.loc7_38.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc7_69.3 (constants.%Destroy.facet.589)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc7_69.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.613)] -// CHECK:STDOUT: %.loc7_69.8: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc7_69.3 [symbolic = %.loc7_69.8 (constants.%.a48)] -// CHECK:STDOUT: %impl.elem2.loc7_69.2: @K.%.loc7_69.8 (%.a48) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc7_69.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc7_69.2: = specific_impl_function %impl.elem2.loc7_69.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc7_69.3) [symbolic = %specific_impl_fn.loc7_69.2 (constants.%specific_impl_fn.eba)] +// CHECK:STDOUT: %require_complete.loc7_36: = require_complete_type %U.as_type.loc7_38.1 [symbolic = %require_complete.loc7_36 (constants.%require_complete.d83f06.2)] +// CHECK:STDOUT: %require_complete.loc7_41: = require_complete_type %tuple.type [symbolic = %require_complete.loc7_41 (constants.%require_complete.b868a8.2)] +// CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc7_7.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.d9c332.2)] +// CHECK:STDOUT: %Copy.facet.loc7_69.3: %Copy.type = facet_value %U.as_type.loc7_38.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %Id.specific_fn.loc7_65.2: = specific_function constants.%Id, @Id(%Copy.facet.loc7_69.3) [symbolic = %Id.specific_fn.loc7_65.2 (constants.%Id.specific_fn.1c0)] +// CHECK:STDOUT: %Pair.specific_fn.loc7_60.2: = specific_function constants.%Pair, @Pair(%Copy.facet.loc7_69.3) [symbolic = %Pair.specific_fn.loc7_60.2 (constants.%Pair.specific_fn.4e1)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %U.loc7_7.1, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.bf2)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %U.loc7_7.1, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.70f)] +// CHECK:STDOUT: %Destroy.facet.loc7_69.3: %Destroy.type = facet_value %U.as_type.loc7_38.1, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc7_69.3 (constants.%Destroy.facet.46f)] +// CHECK:STDOUT: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @K.%U.as_type.loc7_38.1 (%U.as_type.5d6)) -> out %return.param: @K.%tuple.type (%tuple.type.7d0) { +// CHECK:STDOUT: fn(%u.param: @K.%U.as_type.loc7_38.1 (%U.as_type.c1c)) -> out %return.param: @K.%tuple.type (%tuple.type.db8bf7.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Pair.ref: %Pair.type = name_ref Pair, imports.%Main.Pair [concrete = constants.%Pair] // CHECK:STDOUT: %Id.ref: %Id.type = name_ref Id, imports.%Main.Id [concrete = constants.%Id] -// CHECK:STDOUT: %u.ref: @K.%U.as_type.loc7_38.1 (%U.as_type.5d6) = name_ref u, %u -// CHECK:STDOUT: %Copy.facet.loc7_69.1: %Copy.type = facet_value constants.%U.as_type.5d6, (constants.%Copy.lookup_impl_witness.fd8) [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.40c)] -// CHECK:STDOUT: %.loc7_69.1: %Copy.type = converted constants.%U.as_type.5d6, %Copy.facet.loc7_69.1 [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.40c)] -// CHECK:STDOUT: %Copy.facet.loc7_69.2: %Copy.type = facet_value constants.%U.as_type.5d6, (constants.%Copy.lookup_impl_witness.fd8) [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.40c)] -// CHECK:STDOUT: %.loc7_69.2: %Copy.type = converted constants.%U.as_type.5d6, %Copy.facet.loc7_69.2 [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.40c)] -// CHECK:STDOUT: %Id.specific_fn.loc7_65.1: = specific_function %Id.ref, @Id(constants.%Copy.facet.40c) [symbolic = %Id.specific_fn.loc7_65.2 (constants.%Id.specific_fn.e53)] -// CHECK:STDOUT: %.loc7_69.3: ref @K.%U.as_type.loc7_38.1 (%U.as_type.5d6) = temporary_storage -// CHECK:STDOUT: %Id.call: init @K.%U.as_type.loc7_38.1 (%U.as_type.5d6) to %.loc7_69.3 = call %Id.specific_fn.loc7_65.1(%u.ref) -// CHECK:STDOUT: %Copy.facet.loc7_70.1: %Copy.type = facet_value constants.%U.as_type.5d6, (constants.%Copy.lookup_impl_witness.fd8) [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.40c)] -// CHECK:STDOUT: %.loc7_70.1: %Copy.type = converted constants.%U.as_type.5d6, %Copy.facet.loc7_70.1 [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.40c)] -// CHECK:STDOUT: %Copy.facet.loc7_70.2: %Copy.type = facet_value constants.%U.as_type.5d6, (constants.%Copy.lookup_impl_witness.fd8) [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.40c)] -// CHECK:STDOUT: %.loc7_70.2: %Copy.type = converted constants.%U.as_type.5d6, %Copy.facet.loc7_70.2 [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.40c)] -// CHECK:STDOUT: %Pair.specific_fn.loc7_60.1: = specific_function %Pair.ref, @Pair(constants.%Copy.facet.40c) [symbolic = %Pair.specific_fn.loc7_60.2 (constants.%Pair.specific_fn.540)] -// CHECK:STDOUT: %.loc7_49.1: ref @K.%tuple.type (%tuple.type.7d0) = splice_block %return.param {} -// CHECK:STDOUT: %.loc7_69.4: ref @K.%U.as_type.loc7_38.1 (%U.as_type.5d6) = temporary %.loc7_69.3, %Id.call -// CHECK:STDOUT: %.loc7_69.5: @K.%U.as_type.loc7_38.1 (%U.as_type.5d6) = acquire_value %.loc7_69.4 -// CHECK:STDOUT: %Pair.call: init @K.%tuple.type (%tuple.type.7d0) to %.loc7_49.1 = call %Pair.specific_fn.loc7_60.1(%.loc7_69.5) -// CHECK:STDOUT: %impl.elem2.loc7_69.1: @K.%.loc7_69.8 (%.a48) = impl_witness_access constants.%Destroy.lookup_impl_witness.491, element2 [symbolic = %impl.elem2.loc7_69.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc7_69.1: = bound_method %.loc7_69.4, %impl.elem2.loc7_69.1 -// CHECK:STDOUT: %Destroy.facet.loc7_69.1: %Destroy.type = facet_value constants.%U.as_type.5d6, (constants.%Destroy.lookup_impl_witness.491) [symbolic = %Destroy.facet.loc7_69.3 (constants.%Destroy.facet.589)] -// CHECK:STDOUT: %.loc7_69.6: %Destroy.type = converted constants.%U.as_type.5d6, %Destroy.facet.loc7_69.1 [symbolic = %Destroy.facet.loc7_69.3 (constants.%Destroy.facet.589)] -// CHECK:STDOUT: %Destroy.facet.loc7_69.2: %Destroy.type = facet_value constants.%U.as_type.5d6, (constants.%Destroy.lookup_impl_witness.491) [symbolic = %Destroy.facet.loc7_69.3 (constants.%Destroy.facet.589)] -// CHECK:STDOUT: %.loc7_69.7: %Destroy.type = converted constants.%U.as_type.5d6, %Destroy.facet.loc7_69.2 [symbolic = %Destroy.facet.loc7_69.3 (constants.%Destroy.facet.589)] -// CHECK:STDOUT: %specific_impl_fn.loc7_69.1: = specific_impl_function %impl.elem2.loc7_69.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.589) [symbolic = %specific_impl_fn.loc7_69.2 (constants.%specific_impl_fn.eba)] -// CHECK:STDOUT: %bound_method.loc7_69.2: = bound_method %.loc7_69.4, %specific_impl_fn.loc7_69.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc7_69.2(%.loc7_69.4) +// CHECK:STDOUT: %u.ref: @K.%U.as_type.loc7_38.1 (%U.as_type.c1c) = name_ref u, %u +// CHECK:STDOUT: %Copy.facet.loc7_69.1: %Copy.type = facet_value constants.%U.as_type.c1c, (constants.%Copy.lookup_impl_witness.d9c332.2) [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %.loc7_69.1: %Copy.type = converted constants.%U.as_type.c1c, %Copy.facet.loc7_69.1 [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %Copy.facet.loc7_69.2: %Copy.type = facet_value constants.%U.as_type.c1c, (constants.%Copy.lookup_impl_witness.d9c332.2) [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %.loc7_69.2: %Copy.type = converted constants.%U.as_type.c1c, %Copy.facet.loc7_69.2 [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %Id.specific_fn.loc7_65.1: = specific_function %Id.ref, @Id(constants.%Copy.facet.d94) [symbolic = %Id.specific_fn.loc7_65.2 (constants.%Id.specific_fn.1c0)] +// CHECK:STDOUT: %.loc7_69.3: ref @K.%U.as_type.loc7_38.1 (%U.as_type.c1c) = temporary_storage +// CHECK:STDOUT: %Id.call: init @K.%U.as_type.loc7_38.1 (%U.as_type.c1c) to %.loc7_69.3 = call %Id.specific_fn.loc7_65.1(%u.ref) +// CHECK:STDOUT: %Copy.facet.loc7_70.1: %Copy.type = facet_value constants.%U.as_type.c1c, (constants.%Copy.lookup_impl_witness.d9c332.2) [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %.loc7_70.1: %Copy.type = converted constants.%U.as_type.c1c, %Copy.facet.loc7_70.1 [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %Copy.facet.loc7_70.2: %Copy.type = facet_value constants.%U.as_type.c1c, (constants.%Copy.lookup_impl_witness.d9c332.2) [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %.loc7_70.2: %Copy.type = converted constants.%U.as_type.c1c, %Copy.facet.loc7_70.2 [symbolic = %Copy.facet.loc7_69.3 (constants.%Copy.facet.d94)] +// CHECK:STDOUT: %Pair.specific_fn.loc7_60.1: = specific_function %Pair.ref, @Pair(constants.%Copy.facet.d94) [symbolic = %Pair.specific_fn.loc7_60.2 (constants.%Pair.specific_fn.4e1)] +// CHECK:STDOUT: %.loc7_49.1: ref @K.%tuple.type (%tuple.type.db8bf7.2) = splice_block %return.param {} +// CHECK:STDOUT: %.loc7_69.4: ref @K.%U.as_type.loc7_38.1 (%U.as_type.c1c) = temporary %.loc7_69.3, %Id.call +// CHECK:STDOUT: %.loc7_69.5: @K.%U.as_type.loc7_38.1 (%U.as_type.c1c) = acquire_value %.loc7_69.4 +// CHECK:STDOUT: %Pair.call: init @K.%tuple.type (%tuple.type.db8bf7.2) to %.loc7_49.1 = call %Pair.specific_fn.loc7_60.1(%.loc7_69.5) +// CHECK:STDOUT: %Destroy.facet.loc7_69.1: %Destroy.type = facet_value constants.%U.as_type.c1c, (constants.%DestroyImpl.lookup_impl_witness.bf2, constants.%SubobjectDestroy.lookup_impl_witness.70f) [symbolic = %Destroy.facet.loc7_69.3 (constants.%Destroy.facet.46f)] +// CHECK:STDOUT: %.loc7_69.6: %Destroy.type = converted constants.%U.as_type.c1c, %Destroy.facet.loc7_69.1 [symbolic = %Destroy.facet.loc7_69.3 (constants.%Destroy.facet.46f)] +// CHECK:STDOUT: %Destroy.facet.loc7_69.2: %Destroy.type = facet_value constants.%U.as_type.c1c, (constants.%DestroyImpl.lookup_impl_witness.bf2, constants.%SubobjectDestroy.lookup_impl_witness.70f) [symbolic = %Destroy.facet.loc7_69.3 (constants.%Destroy.facet.46f)] +// CHECK:STDOUT: %.loc7_69.7: %Destroy.type = converted constants.%U.as_type.c1c, %Destroy.facet.loc7_69.2 [symbolic = %Destroy.facet.loc7_69.3 (constants.%Destroy.facet.46f)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc7_69.4) // CHECK:STDOUT: return %Pair.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @K(constants.%U.dc4) { -// CHECK:STDOUT: %U.patt.loc7_7.2 => constants.%U.patt.256 -// CHECK:STDOUT: %U.loc7_7.1 => constants.%U.dc4 -// CHECK:STDOUT: %U.as_type.loc7_38.1 => constants.%U.as_type.5d6 -// CHECK:STDOUT: %pattern_type.loc7_36 => constants.%pattern_type.0e9 -// CHECK:STDOUT: %u.param_patt.loc7_36.2 => constants.%u.param_patt.f9a -// CHECK:STDOUT: %u.patt.loc7_36.2 => constants.%u.patt.d30 -// CHECK:STDOUT: %tuple => constants.%tuple.f81 -// CHECK:STDOUT: %tuple.type => constants.%tuple.type.7d0 -// CHECK:STDOUT: %.loc7_49.2 => constants.%.7db -// CHECK:STDOUT: %pattern_type.loc7_49 => constants.%pattern_type.c29 -// CHECK:STDOUT: %return.param_patt.loc7_49.2 => constants.%return.param_patt.df9 -// CHECK:STDOUT: %return.patt.loc7_41.2 => constants.%return.patt.b82 +// CHECK:STDOUT: specific @K(constants.%U.f84) { +// CHECK:STDOUT: %U.patt.loc7_7.2 => constants.%U.patt.fe6 +// CHECK:STDOUT: %U.loc7_7.1 => constants.%U.f84 +// CHECK:STDOUT: %U.as_type.loc7_38.1 => constants.%U.as_type.c1c +// CHECK:STDOUT: %pattern_type.loc7_36 => constants.%pattern_type.2c66b4.3 +// CHECK:STDOUT: %u.param_patt.loc7_36.2 => constants.%u.param_patt.f7a +// CHECK:STDOUT: %u.patt.loc7_36.2 => constants.%u.patt.659 +// CHECK:STDOUT: %tuple => constants.%tuple.598 +// CHECK:STDOUT: %tuple.type => constants.%tuple.type.db8bf7.2 +// CHECK:STDOUT: %.loc7_49.2 => constants.%.58c1c6.2 +// CHECK:STDOUT: %pattern_type.loc7_49 => constants.%pattern_type.aacade.2 +// CHECK:STDOUT: %return.param_patt.loc7_49.2 => constants.%return.param_patt.1c7f00.2 +// CHECK:STDOUT: %return.patt.loc7_41.2 => constants.%return.patt.e7a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @K(constants.%facet_value) { -// CHECK:STDOUT: %U.patt.loc7_7.2 => constants.%U.patt.256 +// CHECK:STDOUT: %U.patt.loc7_7.2 => constants.%U.patt.fe6 // CHECK:STDOUT: %U.loc7_7.1 => constants.%facet_value // CHECK:STDOUT: %U.as_type.loc7_38.1 => bool // CHECK:STDOUT: %pattern_type.loc7_36 => constants.%pattern_type.831 // CHECK:STDOUT: %u.param_patt.loc7_36.2 => constants.%u.param_patt.56f // CHECK:STDOUT: %u.patt.loc7_36.2 => constants.%u.patt.0d7 -// CHECK:STDOUT: %tuple => constants.%tuple.6be +// CHECK:STDOUT: %tuple => constants.%tuple.11f // CHECK:STDOUT: %tuple.type => constants.%tuple.type.784 // CHECK:STDOUT: %.loc7_49.2 => constants.%.7b8 // CHECK:STDOUT: %pattern_type.loc7_49 => constants.%pattern_type.860 @@ -444,11 +443,9 @@ fn L() -> (bool, bool) { return K(true); } // CHECK:STDOUT: %Copy.facet.loc7_69.3 => constants.%Copy.facet.7af // CHECK:STDOUT: %Id.specific_fn.loc7_65.2 => constants.%Id.specific_fn.06a // CHECK:STDOUT: %Pair.specific_fn.loc7_60.2 => constants.%Pair.specific_fn.62b -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f -// CHECK:STDOUT: %Destroy.facet.loc7_69.3 => constants.%Destroy.facet.75f -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.2a2 -// CHECK:STDOUT: %.loc7_69.8 => constants.%.fb9 -// CHECK:STDOUT: %impl.elem2.loc7_69.2 => constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %specific_impl_fn.loc7_69.2 => constants.%Destroy.WithSelf.SelfDestruct.db3 +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness => constants.%DestroyImpl.impl_witness.778 +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness => constants.%custom_witness.b80 +// CHECK:STDOUT: %Destroy.facet.loc7_69.3 => constants.%Destroy.facet.e68 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.68f // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/deduced_return/returned_var.carbon b/toolchain/check/testdata/function/deduced_return/returned_var.carbon index 30bf27e9a844..8b5f9b777fc8 100644 --- a/toolchain/check/testdata/function/deduced_return/returned_var.carbon +++ b/toolchain/check/testdata/function/deduced_return/returned_var.carbon @@ -134,36 +134,24 @@ fn F(b: bool) -> auto { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.753: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc5 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -187,8 +175,8 @@ fn F(b: bool) -> auto { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_12.2(%int_0) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc5_12: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %r.var, %.loc5_12 +// CHECK:STDOUT: %.loc5_12.1: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %r.var, %.loc5_12.1 // CHECK:STDOUT: %i32.loc5_19.1: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %r: ref %i32 = wrapper_binding r, %r.var // CHECK:STDOUT: name_binding_decl { @@ -196,21 +184,16 @@ fn F(b: bool) -> auto { // CHECK:STDOUT: %r.var_patt: %pattern_type.d94 = var_pattern %r.patt [concrete = constants.%r.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc5_17: %i32 = acquire_value %r -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %r.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%r.var) +// CHECK:STDOUT: %Destroy.facet.loc5_12.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc5_12.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc5_12.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc5_12.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%r.var) // CHECK:STDOUT: return %.loc5_17 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- returned_var_after_return.carbon // CHECK:STDOUT: @@ -249,36 +232,24 @@ fn F(b: bool) -> auto { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.762: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.036: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.753: %i32 = int_value 0 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -323,8 +294,8 @@ fn F(b: bool) -> auto { // CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_12.2: = bound_method %int_0, %specific_fn.loc9 [concrete = constants.%bound_method.036] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %i32 = call %bound_method.loc9_12.2(%int_0) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc9_12: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %r.var, %.loc9_12 +// CHECK:STDOUT: %.loc9_12.1: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %r.var, %.loc9_12.1 // CHECK:STDOUT: %i32.loc9_19.1: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %r: ref %i32 = wrapper_binding r, %r.var // CHECK:STDOUT: name_binding_decl { @@ -332,21 +303,16 @@ fn F(b: bool) -> auto { // CHECK:STDOUT: %r.var_patt: %pattern_type.d94 = var_pattern %r.patt [concrete = constants.%r.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc9_17: %i32 = acquire_value %r -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %r.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%r.var) +// CHECK:STDOUT: %Destroy.facet.loc9_12.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_12.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_12.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_12.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%r.var) // CHECK:STDOUT: return %.loc9_17 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- returned_var_in_place.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/terse.carbon b/toolchain/check/testdata/function/definition/terse.carbon index aa17b840bab1..7e62f40c4d6e 100644 --- a/toolchain/check/testdata/function/definition/terse.carbon +++ b/toolchain/check/testdata/function/definition/terse.carbon @@ -228,22 +228,23 @@ class C { // CHECK:STDOUT: %bound_method.002: = bound_method %int_10.64f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_10.6a3: %i32 = int_value 10 [concrete] // CHECK:STDOUT: %b.patt.094d65.1: %pattern_type.d94 = value_binding_pattern b [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_41.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc13_41.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_41.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.490: %pattern_type.290 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a39: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt.490 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_41.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc13_41.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_41.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_41.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_41.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.582: %SubobjectDestroy.type = facet_value %struct_type.a.b, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6b7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.582) [concrete] +// CHECK:STDOUT: %Destroy.facet.6bf: %Destroy.type = facet_value %struct_type.a.b, (%DestroyImpl.impl_witness.6b7, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -251,37 +252,8 @@ class C { // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_41.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc13_41.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_41.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.290 = ref_param_pattern [concrete = constants.%self.param_patt.490] -// CHECK:STDOUT: %self.patt: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a39] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc13_41.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.290 = ref_param_pattern [concrete = constants.%self.param_patt.490] -// CHECK:STDOUT: %self.patt: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a39] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -435,39 +407,33 @@ class C { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %b.patt: %pattern_type.d94 = value_binding_pattern b [concrete = constants.%b.patt.094d65.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc13_41.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc13_41.2) +// CHECK:STDOUT: %Destroy.facet.loc13_41.1: %Destroy.type = facet_value constants.%struct_type.a.b, (constants.%DestroyImpl.impl_witness.6b7, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %.loc13_41.8: %Destroy.type = converted constants.%struct_type.a.b, %Destroy.facet.loc13_41.1 [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %Destroy.facet.loc13_41.2: %Destroy.type = facet_value constants.%struct_type.a.b, (constants.%DestroyImpl.impl_witness.6b7, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %.loc13_41.9: %Destroy.type = converted constants.%struct_type.a.b, %Destroy.facet.loc13_41.2 [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc13_41.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_41.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_41.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_41.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_41.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_41.2(%self.param: ref %struct_type.a.b) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_41.2(%self.param: ref %struct_type.a.b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc13_41.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13_41.1: = bound_method %.loc13_41.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_41.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13_41.1(%.loc13_41.1) -// CHECK:STDOUT: %.loc13_41.2: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13_41.2: = bound_method %.loc13_41.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_41.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13_41.2(%.loc13_41.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_41.2(%self.param: ref %struct_type.a.b) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_41.2(%self.param: ref %struct_type.a.b) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc13_41.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_41.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_41.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc13_41.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_41.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_41.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13_41.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc13_41.1) +// CHECK:STDOUT: %.loc13_41.4: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc13_41.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_41.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_41.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc13_41.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_41.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_41.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13_41.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc13_41.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index 6c84722a1eec..9a7034b706d8 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -549,13 +549,13 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %x.param_patt.91d: %pattern_type.51d = value_param_pattern [symbolic] // CHECK:STDOUT: %x.patt.260: %pattern_type.51d = wrapper_binding_pattern x, %x.param_patt.91d [symbolic] -// CHECK:STDOUT: %ptr.e8f: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] // CHECK:STDOUT: %.cb6: Core.Form = init_form %ptr.e8f [symbolic] // CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic] // CHECK:STDOUT: %return.param_patt.27f: %pattern_type.4f4 = out_param_pattern [symbolic] @@ -563,9 +563,9 @@ fn F() { // CHECK:STDOUT: %ExplicitAndAlsoDeduced.type: type = fn_type @ExplicitAndAlsoDeduced [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %ExplicitAndAlsoDeduced: %ExplicitAndAlsoDeduced.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [symbolic] // CHECK:STDOUT: %require_complete.ef1: = require_complete_type %ptr.e8f [symbolic] -// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.153: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T) [symbolic] +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.153: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.d43: type = ptr_type %A [concrete] // CHECK:STDOUT: %.1a4: Core.Form = init_form %ptr.d43 [concrete] // CHECK:STDOUT: %pattern_type.8a5: type = pattern_type %ptr.d43 [concrete] @@ -580,64 +580,32 @@ fn F() { // CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.fbd: = specific_function %ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%A) [concrete] // CHECK:STDOUT: %A.val: %A = struct_value () [concrete] // CHECK:STDOUT: %.367: ref %A = temporary invalid, %A.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_37.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_37.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.367, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_37.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %complete_type.a75: = complete_type_witness %ptr.d43 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_37.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_37.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_37.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_37.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -650,23 +618,23 @@ fn F() { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {} // CHECK:STDOUT: %ExplicitAndAlsoDeduced.decl: %ExplicitAndAlsoDeduced.type = fn_decl @ExplicitAndAlsoDeduced [concrete = constants.%ExplicitAndAlsoDeduced] { -// CHECK:STDOUT: %T.patt.loc6_36.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_36.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc6_36.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_36.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %x.param_patt.loc6_45.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_45 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc6_45.2 (constants.%x.param_patt.91d)] // CHECK:STDOUT: %x.patt.loc6_45.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_45 (%pattern_type.51d) = wrapper_binding_pattern x, %x.param_patt.loc6_45.1 [symbolic = %x.patt.loc6_45.2 (constants.%x.patt.260)] // CHECK:STDOUT: %return.param_patt.loc6_54.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_54 (%pattern_type.4f4) = out_param_pattern [symbolic = %return.param_patt.loc6_54.2 (constants.%return.param_patt.27f)] // CHECK:STDOUT: %return.patt.loc6_50.1: @ExplicitAndAlsoDeduced.%pattern_type.loc6_54 (%pattern_type.4f4) = return_slot_pattern %return.param_patt.loc6_54.1, %ptr.loc6_54.2 [symbolic = %return.patt.loc6_50.2 (constants.%return.patt.d67)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_53: type = name_ref T, %T.loc6_36.2 [symbolic = %T.loc6_36.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc6_53: type = name_ref T, %T.loc6_36.2 [symbolic = %T.loc6_36.1 (constants.%T.67d)] // CHECK:STDOUT: %ptr.loc6_54.2: type = ptr_type %T.ref.loc6_53 [symbolic = %ptr.loc6_54.1 (constants.%ptr.e8f)] // CHECK:STDOUT: %.loc6_54.2: Core.Form = init_form %ptr.loc6_54.2 [symbolic = %.loc6_54.1 (constants.%.cb6)] // CHECK:STDOUT: %.loc6_38.1: type = splice_block %.loc6_38.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc6_38.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc6_36.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_36.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref.loc6_47: type = name_ref T, %T.loc6_36.2 [symbolic = %T.loc6_36.1 (constants.%T)] -// CHECK:STDOUT: %x: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T) = wrapper_binding x, %x.param +// CHECK:STDOUT: %T.loc6_36.2: type = symbolic_binding T, 0 [symbolic = %T.loc6_36.1 (constants.%T.67d)] +// CHECK:STDOUT: %x.param: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T.67d) = value_param call_param0 +// CHECK:STDOUT: %T.ref.loc6_47: type = name_ref T, %T.loc6_36.2 [symbolic = %T.loc6_36.1 (constants.%T.67d)] +// CHECK:STDOUT: %x: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T.67d) = wrapper_binding x, %x.param // CHECK:STDOUT: %return.param: ref @ExplicitAndAlsoDeduced.%ptr.loc6_54.1 (%ptr.e8f) = out_param call_param1 // CHECK:STDOUT: %return: ref @ExplicitAndAlsoDeduced.%ptr.loc6_54.1 (%ptr.e8f) = return_slot %return.param // CHECK:STDOUT: } @@ -691,8 +659,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @ExplicitAndAlsoDeduced(%T.loc6_36.2: type) { -// CHECK:STDOUT: %T.patt.loc6_36.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_36.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc6_36.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_36.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc6_36.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc6_36.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc6_36.1: type = symbolic_binding T, 0 [symbolic = %T.loc6_36.1 (constants.%T.67d)] // CHECK:STDOUT: %pattern_type.loc6_45: type = pattern_type %T.loc6_36.1 [symbolic = %pattern_type.loc6_45 (constants.%pattern_type.51d)] // CHECK:STDOUT: %x.param_patt.loc6_45.2: @ExplicitAndAlsoDeduced.%pattern_type.loc6_45 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc6_45.2 (constants.%x.param_patt.91d)] // CHECK:STDOUT: %x.patt.loc6_45.2: @ExplicitAndAlsoDeduced.%pattern_type.loc6_45 (%pattern_type.51d) = wrapper_binding_pattern x, %x.param_patt.loc6_45.2 [symbolic = %x.patt.loc6_45.2 (constants.%x.patt.260)] @@ -707,12 +675,12 @@ fn F() { // CHECK:STDOUT: %require_complete.loc6_50: = require_complete_type %ptr.loc6_54.1 [symbolic = %require_complete.loc6_50 (constants.%require_complete.ef1)] // CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2: = specific_function constants.%ExplicitAndAlsoDeduced, @ExplicitAndAlsoDeduced(%T.loc6_36.1) [symbolic = %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 (constants.%ExplicitAndAlsoDeduced.specific_fn.153)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T)) -> out %return.param: @ExplicitAndAlsoDeduced.%ptr.loc6_54.1 (%ptr.e8f) { +// CHECK:STDOUT: fn(%x.param: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T.67d)) -> out %return.param: @ExplicitAndAlsoDeduced.%ptr.loc6_54.1 (%ptr.e8f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitAndAlsoDeduced.ref: %ExplicitAndAlsoDeduced.type = name_ref ExplicitAndAlsoDeduced, file.%ExplicitAndAlsoDeduced.decl [concrete = constants.%ExplicitAndAlsoDeduced] -// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_36.2 [symbolic = %T.loc6_36.1 (constants.%T)] -// CHECK:STDOUT: %x.ref: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T) = name_ref x, %x -// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.1: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%T) [symbolic = %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 (constants.%ExplicitAndAlsoDeduced.specific_fn.153)] +// CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc6_36.2 [symbolic = %T.loc6_36.1 (constants.%T.67d)] +// CHECK:STDOUT: %x.ref: @ExplicitAndAlsoDeduced.%T.loc6_36.1 (%T.67d) = name_ref x, %x +// CHECK:STDOUT: %ExplicitAndAlsoDeduced.specific_fn.loc7_10.1: = specific_function %ExplicitAndAlsoDeduced.ref, @ExplicitAndAlsoDeduced(constants.%T.67d) [symbolic = %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 (constants.%ExplicitAndAlsoDeduced.specific_fn.153)] // CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init @ExplicitAndAlsoDeduced.%ptr.loc6_54.1 (%ptr.e8f) = call %ExplicitAndAlsoDeduced.specific_fn.loc7_10.1(%x.ref) // CHECK:STDOUT: return %ExplicitAndAlsoDeduced.call // CHECK:STDOUT: } @@ -730,35 +698,22 @@ fn F() { // CHECK:STDOUT: %.loc11_37.5: ref %A = temporary %.loc11_37.2, %.loc11_37.4 [concrete = constants.%.367] // CHECK:STDOUT: %.loc11_37.6: %A = acquire_value %.loc11_37.5 [concrete = constants.%A.val] // CHECK:STDOUT: %ExplicitAndAlsoDeduced.call: init %ptr.d43 = call %ExplicitAndAlsoDeduced.specific_fn(%.loc11_37.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.367) +// CHECK:STDOUT: %Destroy.facet.loc11_37.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_37.7: %Destroy.type = converted constants.%A, %Destroy.facet.loc11_37.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_37.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_37.8: %Destroy.type = converted constants.%A, %Destroy.facet.loc11_37.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_37.5) // CHECK:STDOUT: return %ExplicitAndAlsoDeduced.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_37.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_37.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_37.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_37.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_37.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_37.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(constants.%T) { -// CHECK:STDOUT: %T.patt.loc6_36.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc6_36.1 => constants.%T +// CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc6_36.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc6_36.1 => constants.%T.67d // CHECK:STDOUT: %pattern_type.loc6_45 => constants.%pattern_type.51d // CHECK:STDOUT: %x.param_patt.loc6_45.2 => constants.%x.param_patt.91d // CHECK:STDOUT: %x.patt.loc6_45.2 => constants.%x.patt.260 @@ -775,7 +730,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(constants.%A) { -// CHECK:STDOUT: %T.patt.loc6_36.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc6_36.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc6_36.1 => constants.%A // CHECK:STDOUT: %pattern_type.loc6_45 => constants.%pattern_type.9ef // CHECK:STDOUT: %x.param_patt.loc6_45.2 => constants.%x.param_patt.4c3 diff --git a/toolchain/check/testdata/function/generic/default_values.carbon b/toolchain/check/testdata/function/generic/default_values.carbon index c46c2e1e0cd3..10230d820f5b 100644 --- a/toolchain/check/testdata/function/generic/default_values.carbon +++ b/toolchain/check/testdata/function/generic/default_values.carbon @@ -50,16 +50,16 @@ fn G() { // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %E, (%Z.impl_witness) [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.5d7: type = pattern_type %Z.type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: %Z.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.4a7: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.013: %Z.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = parameterized_class_name_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.ccf: type = class_type @C, @C(%T) [symbolic] +// CHECK:STDOUT: %C.ccf: type = class_type @C, @C(%T.013) [symbolic] // CHECK:STDOUT: %pattern_type.d8d: type = pattern_type %D [concrete] // CHECK:STDOUT: %struct_type.d.67c: type = struct_type {.d: %D} [concrete] // CHECK:STDOUT: %complete_type.e41: = complete_type_witness %struct_type.d.67c [concrete] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.cab: type = pattern_type %T.as_type [symbolic] +// CHECK:STDOUT: %T.as_type.ff1: type = facet_access_type %T.013 [symbolic] +// CHECK:STDOUT: %pattern_type.cab: type = pattern_type %T.as_type.ff1 [symbolic] // CHECK:STDOUT: %t.param_patt.571: %pattern_type.cab = value_param_pattern [symbolic] // CHECK:STDOUT: %t.patt.a08: %pattern_type.cab = wrapper_binding_pattern t, %t.param_patt.571 [symbolic] // CHECK:STDOUT: %d.param_patt: %pattern_type.d8d = value_param_pattern [concrete] @@ -72,7 +72,7 @@ fn G() { // CHECK:STDOUT: %return.patt.a2c: %pattern_type.aa1 = return_slot_pattern %return.param_patt.c22, %C.ccf [symbolic] // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.e12: = require_complete_type %T.as_type [symbolic] +// CHECK:STDOUT: %require_complete.e12: = require_complete_type %T.as_type.ff1 [symbolic] // CHECK:STDOUT: %require_complete.f24: = require_complete_type %C.ccf [symbolic] // CHECK:STDOUT: %C.val.e90: %C.ccf = struct_value (%D.val) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] @@ -89,101 +89,34 @@ fn G() { // CHECK:STDOUT: %return.param_patt.a86: %pattern_type.b01 = out_param_pattern [concrete] // CHECK:STDOUT: %return.patt.4c6: %pattern_type.b01 = return_slot_pattern %return.param_patt.a86, %C.10f [concrete] // CHECK:STDOUT: %Make.specific_fn: = specific_function %Make, @Make(%Z.facet) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_32.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc20_32.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b8e: %pattern_type.d8d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.86b: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt.b8e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_32.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc20_32.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20_32.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.2a7: type = pattern_type %struct_type.d.67c [concrete] -// CHECK:STDOUT: %self.param_patt.a2a: %pattern_type.2a7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9e1: %pattern_type.2a7 = wrapper_binding_pattern self, %self.param_patt.a2a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_32.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc20_32.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.732: %pattern_type.b01 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b5a: %pattern_type.b01 = wrapper_binding_pattern self, %self.param_patt.732 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20_32.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc20_32.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20_32.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20_32.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f61: %SubobjectDestroy.type = facet_value %D, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.30f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f61) [concrete] +// CHECK:STDOUT: %Destroy.facet.448: %Destroy.type = facet_value %D, (%DestroyImpl.impl_witness.30f, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20_32.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d79: %SubobjectDestroy.type = facet_value %C.10f, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.0a0: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d79) [concrete] +// CHECK:STDOUT: %Destroy.facet.81d: %Destroy.type = facet_value %C.10f, (%DestroyImpl.impl_witness.0a0, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: %C.val.a4f: %C.10f = struct_value (%D.val) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_32.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc20_32.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_32.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8d = ref_param_pattern [concrete = constants.%self.param_patt.b8e] -// CHECK:STDOUT: %self.patt: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.86b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc20_32.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8d = ref_param_pattern [concrete = constants.%self.param_patt.b8e] -// CHECK:STDOUT: %self.patt: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.86b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_32.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.2a7 = ref_param_pattern [concrete = constants.%self.param_patt.a2a] -// CHECK:STDOUT: %self.patt: %pattern_type.2a7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9e1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.d.67c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.d.67c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc20_32.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.2a7 = ref_param_pattern [concrete = constants.%self.param_patt.a2a] -// CHECK:STDOUT: %self.patt: %pattern_type.2a7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9e1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.d.67c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.d.67c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc20_32.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b01 = ref_param_pattern [concrete = constants.%self.param_patt.732] -// CHECK:STDOUT: %self.patt: %pattern_type.b01 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b5a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.10f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.10f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc20_32.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b01 = ref_param_pattern [concrete = constants.%self.param_patt.732] -// CHECK:STDOUT: %self.patt: %pattern_type.b01 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b5a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.10f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.10f = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [concrete = constants.%Make] { -// CHECK:STDOUT: %T.patt.loc15_18.1: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_18.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc15_18.1: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_18.2 (constants.%T.patt.4a7)] // CHECK:STDOUT: %t.param_patt.loc15_31.1: @Make.%pattern_type.loc15_31 (%pattern_type.cab) = value_param_pattern [symbolic = %t.param_patt.loc15_31.2 (constants.%t.param_patt.571)] // CHECK:STDOUT: %t.patt.loc15_31.1: @Make.%pattern_type.loc15_31 (%pattern_type.cab) = wrapper_binding_pattern t, %t.param_patt.loc15_31.1 [symbolic = %t.patt.loc15_31.2 (constants.%t.patt.a08)] // CHECK:STDOUT: %d.param_patt: %pattern_type.d8d = value_param_pattern [concrete = constants.%d.param_patt] @@ -198,21 +131,21 @@ fn G() { // CHECK:STDOUT: %.loc15_46.1: %D = as_compatible %empty_struct [concrete = constants.%D.val] // CHECK:STDOUT: %.loc15_46.2: %D = converted %.loc15_44, %.loc15_46.1 [concrete = constants.%D.val] // CHECK:STDOUT: %C.ref.loc15: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %T.ref.loc15_57: %Z.type = name_ref T, %T.loc15_18.2 [symbolic = %T.loc15_18.1 (constants.%T)] -// CHECK:STDOUT: %C.loc15_58.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc15_58.1 (constants.%C.ccf)] +// CHECK:STDOUT: %T.ref.loc15_57: %Z.type = name_ref T, %T.loc15_18.2 [symbolic = %T.loc15_18.1 (constants.%T.013)] +// CHECK:STDOUT: %C.loc15_58.2: type = class_type @C, @C(constants.%T.013) [symbolic = %C.loc15_58.1 (constants.%C.ccf)] // CHECK:STDOUT: %.loc15_58.3: Core.Form = init_form %C.loc15_58.2 [symbolic = %.loc15_58.2 (constants.%.20e)] // CHECK:STDOUT: %.loc15_20: type = splice_block %Z.ref [concrete = constants.%Z.type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc15_18.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc15_18.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @Make.%T.as_type.loc15_33.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc15_33.1: type = splice_block %.loc15_33.2 [symbolic = %T.as_type.loc15_33.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc15_33: %Z.type = name_ref T, %T.loc15_18.2 [symbolic = %T.loc15_18.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc15_33.2: type = facet_access_type %T.ref.loc15_33 [symbolic = %T.as_type.loc15_33.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc15_33.2: type = converted %T.ref.loc15_33, %T.as_type.loc15_33.2 [symbolic = %T.as_type.loc15_33.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc15_18.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc15_18.1 (constants.%T.013)] +// CHECK:STDOUT: %t.param: @Make.%T.as_type.loc15_33.1 (%T.as_type.ff1) = value_param call_param0 +// CHECK:STDOUT: %.loc15_33.1: type = splice_block %.loc15_33.2 [symbolic = %T.as_type.loc15_33.1 (constants.%T.as_type.ff1)] { +// CHECK:STDOUT: %T.ref.loc15_33: %Z.type = name_ref T, %T.loc15_18.2 [symbolic = %T.loc15_18.1 (constants.%T.013)] +// CHECK:STDOUT: %T.as_type.loc15_33.2: type = facet_access_type %T.ref.loc15_33 [symbolic = %T.as_type.loc15_33.1 (constants.%T.as_type.ff1)] +// CHECK:STDOUT: %.loc15_33.2: type = converted %T.ref.loc15_33, %T.as_type.loc15_33.2 [symbolic = %T.as_type.loc15_33.1 (constants.%T.as_type.ff1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @Make.%T.as_type.loc15_33.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @Make.%T.as_type.loc15_33.1 (%T.as_type.ff1) = wrapper_binding t, %t.param // CHECK:STDOUT: %d.param: %D = value_param call_param1 // CHECK:STDOUT: %D.ref.loc15_39: type = name_ref D, file.%D.decl [concrete = constants.%D] // CHECK:STDOUT: %d: %D = wrapper_binding d, %d.param @@ -223,9 +156,9 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Make(%T.loc15_18.2: %Z.type) { -// CHECK:STDOUT: %T.patt.loc15_18.2: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_18.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc15_18.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc15_18.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc15_33.1: type = facet_access_type %T.loc15_18.1 [symbolic = %T.as_type.loc15_33.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.patt.loc15_18.2: %pattern_type.5d7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_18.2 (constants.%T.patt.4a7)] +// CHECK:STDOUT: %T.loc15_18.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc15_18.1 (constants.%T.013)] +// CHECK:STDOUT: %T.as_type.loc15_33.1: type = facet_access_type %T.loc15_18.1 [symbolic = %T.as_type.loc15_33.1 (constants.%T.as_type.ff1)] // CHECK:STDOUT: %pattern_type.loc15_31: type = pattern_type %T.as_type.loc15_33.1 [symbolic = %pattern_type.loc15_31 (constants.%pattern_type.cab)] // CHECK:STDOUT: %t.param_patt.loc15_31.2: @Make.%pattern_type.loc15_31 (%pattern_type.cab) = value_param_pattern [symbolic = %t.param_patt.loc15_31.2 (constants.%t.param_patt.571)] // CHECK:STDOUT: %t.patt.loc15_31.2: @Make.%pattern_type.loc15_31 (%pattern_type.cab) = wrapper_binding_pattern t, %t.param_patt.loc15_31.2 [symbolic = %t.patt.loc15_31.2 (constants.%t.patt.a08)] @@ -240,13 +173,13 @@ fn G() { // CHECK:STDOUT: %require_complete.loc15_52: = require_complete_type %C.loc15_58.1 [symbolic = %require_complete.loc15_52 (constants.%require_complete.f24)] // CHECK:STDOUT: %C.val: @Make.%C.loc15_58.1 (%C.ccf) = struct_value (constants.%D.val) [symbolic = %C.val (constants.%C.val.e90)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @Make.%T.as_type.loc15_33.1 (%T.as_type), %d.param: %D) -> out %return.param: @Make.%C.loc15_58.1 (%C.ccf) { +// CHECK:STDOUT: fn(%t.param: @Make.%T.as_type.loc15_33.1 (%T.as_type.ff1), %d.param: %D) -> out %return.param: @Make.%C.loc15_58.1 (%C.ccf) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref: %D = name_ref d, %d // CHECK:STDOUT: %.loc16_17.1: %struct_type.d.67c = struct_literal (%d.ref) // CHECK:STDOUT: %C.ref.loc16: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %T.ref.loc16: %Z.type = name_ref T, %T.loc15_18.2 [symbolic = %T.loc15_18.1 (constants.%T)] -// CHECK:STDOUT: %C.loc16: type = class_type @C, @C(constants.%T) [symbolic = %C.loc15_58.1 (constants.%C.ccf)] +// CHECK:STDOUT: %T.ref.loc16: %Z.type = name_ref T, %T.loc15_18.2 [symbolic = %T.loc15_18.1 (constants.%T.013)] +// CHECK:STDOUT: %C.loc16: type = class_type @C, @C(constants.%T.013) [symbolic = %C.loc15_58.1 (constants.%C.ccf)] // CHECK:STDOUT: %.loc16_17.2: %empty_struct_type = as_compatible %d.ref // CHECK:STDOUT: %.loc15_58.1: ref @Make.%C.loc15_58.1 (%C.ccf) = splice_block %return.param {} // CHECK:STDOUT: %.loc16_17.3: ref %D = class_element_access %.loc15_58.1, element0 @@ -292,72 +225,48 @@ fn G() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt: %pattern_type.b01 = value_binding_pattern _ [concrete = constants.%_.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc20_32.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc20_32.5) +// CHECK:STDOUT: %Destroy.facet.loc20_32.1: %Destroy.type = facet_value constants.%C.10f, (constants.%DestroyImpl.impl_witness.0a0, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.81d] +// CHECK:STDOUT: %.loc20_32.7: %Destroy.type = converted constants.%C.10f, %Destroy.facet.loc20_32.1 [concrete = constants.%Destroy.facet.81d] +// CHECK:STDOUT: %Destroy.facet.loc20_32.2: %Destroy.type = facet_value constants.%C.10f, (constants.%DestroyImpl.impl_witness.0a0, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.81d] +// CHECK:STDOUT: %.loc20_32.8: %Destroy.type = converted constants.%C.10f, %Destroy.facet.loc20_32.2 [concrete = constants.%Destroy.facet.81d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc20_32.5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_32.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_32.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_32.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_32.2(%self.param: ref %D) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_32.1(%self.param: ref %empty_struct_type) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_32.3(%self.param: ref %struct_type.d.67c) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc20_32.1: ref %D = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc20_32.1: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %.loc20_32.2: %Destroy.type = converted constants.%D, %Destroy.facet.loc20_32.1 [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %Destroy.facet.loc20_32.2: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %.loc20_32.3: %Destroy.type = converted constants.%D, %Destroy.facet.loc20_32.2 [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc20_32.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_32.2(%self.param: ref %D) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_32.2(%self.param: ref %D) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_32.2(%self.param: ref %D) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_32.3(%self.param: ref %struct_type.d.67c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20: ref %D = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc20, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc20) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_32.3(%self.param: ref %struct_type.d.67c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_32.3(%self.param: ref %struct_type.d.67c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc20_32.4(%self.param: ref %C.10f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc20_32.4(%self.param: ref %C.10f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %d.ref: %C.elem.a58 = name_ref d, @C.%field_decl [concrete = @C.%field_decl] -// CHECK:STDOUT: %.loc20: ref %D = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc20, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc20) +// CHECK:STDOUT: %.loc20_32.1: ref %D = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc20_32.1: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %.loc20_32.2: %Destroy.type = converted constants.%D, %Destroy.facet.loc20_32.1 [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %Destroy.facet.loc20_32.2: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: %.loc20_32.3: %Destroy.type = converted constants.%D, %Destroy.facet.loc20_32.2 [concrete = constants.%Destroy.facet.448] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc20_32.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20_32.4(%self.param: ref %C.10f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20_32.4(%self.param: ref %C.10f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Make(constants.%T) { -// CHECK:STDOUT: %T.patt.loc15_18.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc15_18.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc15_33.1 => constants.%T.as_type +// CHECK:STDOUT: specific @Make(constants.%T.013) { +// CHECK:STDOUT: %T.patt.loc15_18.2 => constants.%T.patt.4a7 +// CHECK:STDOUT: %T.loc15_18.1 => constants.%T.013 +// CHECK:STDOUT: %T.as_type.loc15_33.1 => constants.%T.as_type.ff1 // CHECK:STDOUT: %pattern_type.loc15_31 => constants.%pattern_type.cab // CHECK:STDOUT: %t.param_patt.loc15_31.2 => constants.%t.param_patt.571 // CHECK:STDOUT: %t.patt.loc15_31.2 => constants.%t.patt.a08 @@ -369,7 +278,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Make(constants.%Z.facet) { -// CHECK:STDOUT: %T.patt.loc15_18.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc15_18.2 => constants.%T.patt.4a7 // CHECK:STDOUT: %T.loc15_18.1 => constants.%Z.facet // CHECK:STDOUT: %T.as_type.loc15_33.1 => constants.%E // CHECK:STDOUT: %pattern_type.loc15_31 => constants.%pattern_type.849 diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index cd61e5445ca3..81e02901a97f 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -62,13 +62,19 @@ fn CallNegative() { // CHECK:STDOUT: %.b59: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.cb5, %DefaultOrUnformed.facet.67a [symbolic] // CHECK:STDOUT: %impl.elem0.f8f: %.b59 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.4db: = specific_impl_function %impl.elem0.f8f, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.67a) [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.053: = lookup_impl_witness %Int, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e3e: %Destroy.type = facet_value %Int, (%Destroy.lookup_impl_witness.053) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.1da: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.e3e) [symbolic] -// CHECK:STDOUT: %.085: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.1da, %Destroy.facet.e3e [symbolic] -// CHECK:STDOUT: %impl.elem2: %.085 = impl_witness_access %Destroy.lookup_impl_witness.053, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.380: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.e3e) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.79f: = lookup_impl_witness %Int, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.f5e: = lookup_impl_witness %Int, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.cbf: %SubobjectDestroy.type = facet_value %Int, (%SubobjectDestroy.lookup_impl_witness.f5e) [symbolic] +// CHECK:STDOUT: %.811: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cbf) [symbolic] +// CHECK:STDOUT: %Destroy.facet.bee: %Destroy.type = facet_value %Int, (%DestroyImpl.lookup_impl_witness.79f, %SubobjectDestroy.lookup_impl_witness.f5e) [symbolic] +// CHECK:STDOUT: %SelfDestruct.specific_fn.465: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.bee) [symbolic] // CHECK:STDOUT: %CallNegative.type: type = fn_type @CallNegative [concrete] // CHECK:STDOUT: %CallNegative: %CallNegative.type = struct_value () [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] @@ -85,18 +91,14 @@ fn CallNegative() { // CHECK:STDOUT: %DefaultOrUnformed.WithSelf.Op.type.d5c: type = fn_type @DefaultOrUnformed.WithSelf.Op, @DefaultOrUnformed.WithSelf(%DefaultOrUnformed.facet.d1a) [concrete] // CHECK:STDOUT: %.3e6: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.d5c, %DefaultOrUnformed.facet.d1a [concrete] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function %T.as.DefaultOrUnformed.impl.Op.353, @T.as.DefaultOrUnformed.impl.Op(%i0) [concrete] -// CHECK:STDOUT: %self.param_patt.588: %pattern_type.4ed = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.dab: %pattern_type.4ed = wrapper_binding_pattern self, %self.param_patt.588 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f: = custom_witness (%Destroy.WithSelf.Op.403, %Destroy.WithSelf.SubobjectDestroy.d01, %Destroy.WithSelf.SelfDestruct.db3), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.2cf: %Destroy.type = facet_value %i0, (%custom_witness.f8f) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.496: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.2cf) [concrete] -// CHECK:STDOUT: %.2ec: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.496, %Destroy.facet.2cf [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.26a: %SubobjectDestroy.type = facet_value %i0, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c8f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.26a) [concrete] +// CHECK:STDOUT: %.737: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.26a) [concrete] +// CHECK:STDOUT: %Destroy.facet.a31: %Destroy.type = facet_value %i0, (%DestroyImpl.impl_witness.c8f, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.fbd: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.a31) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -104,7 +106,7 @@ fn CallNegative() { // CHECK:STDOUT: .IntLiteral = %Core.IntLiteral // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -113,24 +115,9 @@ fn CallNegative() { // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] // CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4ed = ref_param_pattern [concrete = constants.%self.param_patt.588] -// CHECK:STDOUT: %self.patt: %pattern_type.4ed = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.dab] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i0 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i0 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4ed = ref_param_pattern [concrete = constants.%self.param_patt.588] -// CHECK:STDOUT: %self.patt: %pattern_type.4ed = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.dab] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i0 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i0 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -170,12 +157,12 @@ fn CallNegative() { // CHECK:STDOUT: %.loc9_28.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type, %DefaultOrUnformed.facet.loc9_28.2 [symbolic = %.loc9_28.4 (constants.%.b59)] // CHECK:STDOUT: %impl.elem0.loc9_28.2: @ErrorIfNIsZero.%.loc9_28.4 (%.b59) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_28.2 (constants.%impl.elem0.f8f)] // CHECK:STDOUT: %specific_impl_fn.loc9_28.2: = specific_impl_function %impl.elem0.loc9_28.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc9_28.2) [symbolic = %specific_impl_fn.loc9_28.2 (constants.%specific_impl_fn.4db)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Int.loc9_27.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.053)] -// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value %Int.loc9_27.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc9_3.3 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc9_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.1da)] -// CHECK:STDOUT: %.loc9_3.3: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc9_3.3 [symbolic = %.loc9_3.3 (constants.%.085)] -// CHECK:STDOUT: %impl.elem2.loc9_3.2: @ErrorIfNIsZero.%.loc9_3.3 (%.085) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc9_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc9_3.2: = specific_impl_function %impl.elem2.loc9_3.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc9_3.3) [symbolic = %specific_impl_fn.loc9_3.2 (constants.%specific_impl_fn.380)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %Int.loc9_27.2, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.f5e)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %Int.loc9_27.2, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.cbf)] +// CHECK:STDOUT: %.loc9_3.3: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc9_3.3 (constants.%.811)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %Int.loc9_27.2, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.79f)] +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value %Int.loc9_27.2, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc9_3.3 (constants.%Destroy.facet.bee)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(%Destroy.facet.loc9_3.3) [symbolic = %SelfDestruct.specific_fn.2 (constants.%SelfDestruct.specific_fn.465)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -199,15 +186,12 @@ fn CallNegative() { // CHECK:STDOUT: %v.patt.loc9_15.1: @ErrorIfNIsZero.%pattern_type (%pattern_type.551) = ref_binding_pattern v [symbolic = %v.patt.loc9_15.2 (constants.%v.patt.fc3)] // CHECK:STDOUT: %v.var_patt.loc9_3.1: @ErrorIfNIsZero.%pattern_type (%pattern_type.551) = var_pattern %v.patt.loc9_15.1 [symbolic = %v.var_patt.loc9_3.2 (constants.%v.var_patt.c99)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem2.loc9_3.1: @ErrorIfNIsZero.%.loc9_3.3 (%.085) = impl_witness_access constants.%Destroy.lookup_impl_witness.053, element2 [symbolic = %impl.elem2.loc9_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %v.var, %impl.elem2.loc9_3.1 -// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Int, (constants.%Destroy.lookup_impl_witness.053) [symbolic = %Destroy.facet.loc9_3.3 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%Int, %Destroy.facet.loc9_3.1 [symbolic = %Destroy.facet.loc9_3.3 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Int, (constants.%Destroy.lookup_impl_witness.053) [symbolic = %Destroy.facet.loc9_3.3 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Int, %Destroy.facet.loc9_3.2 [symbolic = %Destroy.facet.loc9_3.3 (constants.%Destroy.facet.e3e)] -// CHECK:STDOUT: %specific_impl_fn.loc9_3.1: = specific_impl_function %impl.elem2.loc9_3.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.e3e) [symbolic = %specific_impl_fn.loc9_3.2 (constants.%specific_impl_fn.380)] -// CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %v.var, %specific_impl_fn.loc9_3.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc9_3.2(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Int, (constants.%DestroyImpl.lookup_impl_witness.79f, constants.%SubobjectDestroy.lookup_impl_witness.f5e) [symbolic = %Destroy.facet.loc9_3.3 (constants.%Destroy.facet.bee)] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%Int, %Destroy.facet.loc9_3.1 [symbolic = %Destroy.facet.loc9_3.3 (constants.%Destroy.facet.bee)] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Int, (constants.%DestroyImpl.lookup_impl_witness.79f, constants.%SubobjectDestroy.lookup_impl_witness.f5e) [symbolic = %Destroy.facet.loc9_3.3 (constants.%Destroy.facet.bee)] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Int, %Destroy.facet.loc9_3.2 [symbolic = %Destroy.facet.loc9_3.3 (constants.%Destroy.facet.bee)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.bee) [symbolic = %SelfDestruct.specific_fn.2 (constants.%SelfDestruct.specific_fn.465)] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -221,16 +205,7 @@ fn CallNegative() { // CHECK:STDOUT: return // CHECK:STDOUT: } // 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %i0) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %i0) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @ErrorIfNIsZero(constants.%N) { // CHECK:STDOUT: %N.patt.loc4_28.2 => constants.%N.patt @@ -254,11 +229,11 @@ fn CallNegative() { // CHECK:STDOUT: %.loc9_28.4 => constants.%.3e6 // CHECK:STDOUT: %impl.elem0.loc9_28.2 => constants.%T.as.DefaultOrUnformed.impl.Op.353 // CHECK:STDOUT: %specific_impl_fn.loc9_28.2 => constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f -// CHECK:STDOUT: %Destroy.facet.loc9_3.3 => constants.%Destroy.facet.2cf -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.496 -// CHECK:STDOUT: %.loc9_3.3 => constants.%.2ec -// CHECK:STDOUT: %impl.elem2.loc9_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %specific_impl_fn.loc9_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3 +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness => constants.%custom_witness.b80 +// CHECK:STDOUT: %SubobjectDestroy.facet => constants.%SubobjectDestroy.facet.26a +// CHECK:STDOUT: %.loc9_3.3 => constants.%.737 +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness => constants.%DestroyImpl.impl_witness.c8f +// CHECK:STDOUT: %Destroy.facet.loc9_3.3 => constants.%Destroy.facet.a31 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.fbd // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index 10933903c9a3..810a347ec035 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -29,23 +29,23 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Wrap.type: type = parameterized_class_name_type @Wrap [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Wrap.generic: %Wrap.type = struct_value () [concrete] -// CHECK:STDOUT: %Wrap.eda: type = class_type @Wrap, @Wrap(%T) [symbolic] -// CHECK:STDOUT: %.184: Core.Form = init_form %T [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %Wrap.eda: type = class_type @Wrap, @Wrap(%T.67d) [symbolic] +// CHECK:STDOUT: %.184: Core.Form = init_form %T.67d [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %return.param_patt.41d: %pattern_type.51d = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.b39: %pattern_type.51d = return_slot_pattern %return.param_patt.41d, %T [symbolic] -// CHECK:STDOUT: %Wrap.Make.type.c47: type = fn_type @Wrap.Make, @Wrap(%T) [symbolic] +// CHECK:STDOUT: %return.patt.b39: %pattern_type.51d = return_slot_pattern %return.param_patt.41d, %T.67d [symbolic] +// CHECK:STDOUT: %Wrap.Make.type.c47: type = fn_type @Wrap.Make, @Wrap(%T.67d) [symbolic] // CHECK:STDOUT: %Wrap.Make.1b6: %Wrap.Make.type.c47 = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %Wrap.Make.specific_fn.74a: = specific_function %Wrap.Make.1b6, @Wrap.Make(%T) [symbolic] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [symbolic] +// CHECK:STDOUT: %Wrap.Make.specific_fn.74a: = specific_function %Wrap.Make.1b6, @Wrap.Make(%T.67d) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = parameterized_class_name_type @Int [concrete] @@ -57,7 +57,6 @@ fn G() { // CHECK:STDOUT: %Array.746: type = class_type @Array, @Array(%i32, %int_100) [concrete] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] // CHECK:STDOUT: %complete_type.f8a: = complete_type_witness %i32.builtin [concrete] -// CHECK:STDOUT: %pattern_type.bb6: type = pattern_type %Array.746 [concrete] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %Array.746 [concrete] // CHECK:STDOUT: %struct_type.arr.a4f: type = struct_type {.arr: %Array.746} [concrete] // CHECK:STDOUT: %complete_type.cc0: = complete_type_witness %struct_type.arr.a4f [concrete] @@ -94,20 +93,23 @@ fn G() { // CHECK:STDOUT: %return.param_patt.89a: %pattern_type.98b = out_param_pattern [concrete] // CHECK:STDOUT: %return.patt.e4a: %pattern_type.98b = return_slot_pattern %return.param_patt.89a, %C [concrete] // CHECK:STDOUT: %Wrap.Make.specific_fn.f23: = specific_function %Wrap.Make.b55, @Wrap.Make(%C) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.327: %pattern_type.bb6 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.fc5: %pattern_type.bb6 = wrapper_binding_pattern self, %self.param_patt.327 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_99: Core.IntLiteral = int_value 99 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] // CHECK:STDOUT: %int_98: Core.IntLiteral = int_value 98 [concrete] // CHECK:STDOUT: %int_97: Core.IntLiteral = int_value 97 [concrete] // CHECK:STDOUT: %int_96: Core.IntLiteral = int_value 96 [concrete] @@ -206,120 +208,41 @@ fn G() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.181: type = pattern_type %struct_type.arr.a4f [concrete] -// CHECK:STDOUT: %self.param_patt.20d: %pattern_type.181 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0c4: %pattern_type.181 = wrapper_binding_pattern self, %self.param_patt.20d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc24_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc24_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc23 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a6d: %SubobjectDestroy.type = facet_value %Array.746, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1f1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a6d) [concrete] +// CHECK:STDOUT: %Destroy.facet.dda: %Destroy.type = facet_value %Array.746, (%DestroyImpl.impl_witness.1f1, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.09e: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.dda) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet.eb2: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8ca: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.eb2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] // CHECK:STDOUT: %complete_type.782: = complete_type_witness %empty_tuple.type [concrete] +// CHECK:STDOUT: %Destroy.facet.939: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c50: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.939) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Array = %Core.Array -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/parts/array, Array, loaded [concrete = constants.%Array.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc24_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bb6 = ref_param_pattern [concrete = constants.%self.param_patt.327] -// CHECK:STDOUT: %self.patt: %pattern_type.bb6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.fc5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.746 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.746 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bb6 = ref_param_pattern [concrete = constants.%self.param_patt.327] -// CHECK:STDOUT: %self.patt: %pattern_type.bb6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.fc5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.746 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.746 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.181 = ref_param_pattern [concrete = constants.%self.param_patt.20d] -// CHECK:STDOUT: %self.patt: %pattern_type.181 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0c4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.arr.a4f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.arr.a4f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc24_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.181 = ref_param_pattern [concrete = constants.%self.param_patt.20d] -// CHECK:STDOUT: %self.patt: %pattern_type.181 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0c4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.arr.a4f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.arr.a4f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc24_3.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc23 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -331,21 +254,21 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Wrap.decl: %Wrap.type = class_decl @Wrap [concrete = constants.%Wrap.generic] { -// CHECK:STDOUT: %T.patt.loc15_13.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_13.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc15_13.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_13.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc15_15.1: type = splice_block %.loc15_15.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc15_15.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc15_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_13.1 (constants.%T)] +// CHECK:STDOUT: %T.loc15_13.2: type = symbolic_binding T, 0 [symbolic = %T.loc15_13.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @Wrap(%T.loc15_13.2: type) { -// CHECK:STDOUT: %T.patt.loc15_13.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_13.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc15_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_13.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc15_13.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_13.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc15_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_13.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Wrap.Make.type: type = fn_type @Wrap.Make, @Wrap(%T.loc15_13.1) [symbolic = %Wrap.Make.type (constants.%Wrap.Make.type.c47)] @@ -356,11 +279,11 @@ fn G() { // CHECK:STDOUT: %return.param_patt.loc16_16.1: @Wrap.Make.%pattern_type (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc16_16.2 (constants.%return.param_patt.41d)] // CHECK:STDOUT: %return.patt.loc16_13.1: @Wrap.Make.%pattern_type (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc16_16.1, %T.ref [symbolic = %return.patt.loc16_13.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_16.3: type = specific_constant @Wrap.%T.loc15_13.2, @Wrap(constants.%T) [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc16_16.3 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %.loc16_16.3: type = specific_constant @Wrap.%T.loc15_13.2, @Wrap(constants.%T.67d) [symbolic = %T (constants.%T.67d)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc16_16.3 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %.loc16_16.4: Core.Form = init_form %T.ref [symbolic = %.loc16_16.2 (constants.%.184)] -// CHECK:STDOUT: %return.param: ref @Wrap.Make.%T (%T) = out_param call_param0 -// CHECK:STDOUT: %return: ref @Wrap.Make.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @Wrap.Make.%T (%T.67d) = out_param call_param0 +// CHECK:STDOUT: %return: ref @Wrap.Make.%T (%T.67d) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -387,7 +310,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Wrap.Make(@Wrap.%T.loc15_13.2: type) { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %.loc16_16.2: Core.Form = init_form %T [symbolic = %.loc16_16.2 (constants.%.184)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] // CHECK:STDOUT: %return.param_patt.loc16_16.2: @Wrap.Make.%pattern_type (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc16_16.2 (constants.%return.param_patt.41d)] @@ -399,13 +322,13 @@ fn G() { // CHECK:STDOUT: %Wrap.Make: @Wrap.Make.%Wrap.Make.type (%Wrap.Make.type.c47) = struct_value () [symbolic = %Wrap.Make (constants.%Wrap.Make.1b6)] // CHECK:STDOUT: %Wrap.Make.specific_fn.loc16_27.2: = specific_function %Wrap.Make, @Wrap.Make(%T) [symbolic = %Wrap.Make.specific_fn.loc16_27.2 (constants.%Wrap.Make.specific_fn.74a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @Wrap.Make.%T (%T) { +// CHECK:STDOUT: fn() -> out %return.param: @Wrap.Make.%T (%T.67d) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_27: @Wrap.Make.%Wrap.Make.type (%Wrap.Make.type.c47) = specific_constant @Wrap.%Wrap.Make.decl, @Wrap(constants.%T) [symbolic = %Wrap.Make (constants.%Wrap.Make.1b6)] +// CHECK:STDOUT: %.loc16_27: @Wrap.Make.%Wrap.Make.type (%Wrap.Make.type.c47) = specific_constant @Wrap.%Wrap.Make.decl, @Wrap(constants.%T.67d) [symbolic = %Wrap.Make (constants.%Wrap.Make.1b6)] // CHECK:STDOUT: %Make.ref: @Wrap.Make.%Wrap.Make.type (%Wrap.Make.type.c47) = name_ref Make, %.loc16_27 [symbolic = %Wrap.Make (constants.%Wrap.Make.1b6)] -// CHECK:STDOUT: %Wrap.Make.specific_fn.loc16_27.1: = specific_function %Make.ref, @Wrap.Make(constants.%T) [symbolic = %Wrap.Make.specific_fn.loc16_27.2 (constants.%Wrap.Make.specific_fn.74a)] -// CHECK:STDOUT: %.loc16_16.1: ref @Wrap.Make.%T (%T) = splice_block %return.param {} -// CHECK:STDOUT: %Wrap.Make.call: init @Wrap.Make.%T (%T) to %.loc16_16.1 = call %Wrap.Make.specific_fn.loc16_27.1() +// CHECK:STDOUT: %Wrap.Make.specific_fn.loc16_27.1: = specific_function %Make.ref, @Wrap.Make(constants.%T.67d) [symbolic = %Wrap.Make.specific_fn.loc16_27.2 (constants.%Wrap.Make.specific_fn.74a)] +// CHECK:STDOUT: %.loc16_16.1: ref @Wrap.Make.%T (%T.67d) = splice_block %return.param {} +// CHECK:STDOUT: %Wrap.Make.call: init @Wrap.Make.%T (%T.67d) to %.loc16_16.1 = call %Wrap.Make.specific_fn.loc16_27.1() // CHECK:STDOUT: return %Wrap.Make.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -416,8 +339,8 @@ fn G() { // CHECK:STDOUT: %Wrap.ref.loc22: %Wrap.type = name_ref Wrap, file.%Wrap.decl [concrete = constants.%Wrap.generic] // CHECK:STDOUT: %i32.loc22_28: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %Wrap.loc22: type = class_type @Wrap, @Wrap(constants.%i32) [concrete = constants.%Wrap.cab] -// CHECK:STDOUT: %.loc22: %Wrap.Make.type.c6a = specific_constant @Wrap.%Wrap.Make.decl, @Wrap(constants.%i32) [concrete = constants.%Wrap.Make.f2f] -// CHECK:STDOUT: %Make.ref.loc22: %Wrap.Make.type.c6a = name_ref Make, %.loc22 [concrete = constants.%Wrap.Make.f2f] +// CHECK:STDOUT: %.loc22_32: %Wrap.Make.type.c6a = specific_constant @Wrap.%Wrap.Make.decl, @Wrap(constants.%i32) [concrete = constants.%Wrap.Make.f2f] +// CHECK:STDOUT: %Make.ref.loc22: %Wrap.Make.type.c6a = name_ref Make, %.loc22_32 [concrete = constants.%Wrap.Make.f2f] // CHECK:STDOUT: %Wrap.Make.specific_fn.loc22: = specific_function %Make.ref.loc22, @Wrap.Make(constants.%i32) [concrete = constants.%Wrap.Make.specific_fn.ace] // CHECK:STDOUT: %Wrap.Make.call.loc22: init %i32 = call %Wrap.Make.specific_fn.loc22() // CHECK:STDOUT: assign %a.var, %Wrap.Make.call.loc22 @@ -453,8 +376,8 @@ fn G() { // CHECK:STDOUT: %.loc24_28: %Wrap.Make.type.1db = specific_constant @Wrap.%Wrap.Make.decl, @Wrap(constants.%C) [concrete = constants.%Wrap.Make.b55] // CHECK:STDOUT: %Make.ref.loc24: %Wrap.Make.type.1db = name_ref Make, %.loc24_28 [concrete = constants.%Wrap.Make.b55] // CHECK:STDOUT: %Wrap.Make.specific_fn.loc24: = specific_function %Make.ref.loc24, @Wrap.Make(constants.%C) [concrete = constants.%Wrap.Make.specific_fn.f23] -// CHECK:STDOUT: %.loc24_3: ref %C = splice_block %c.var {} -// CHECK:STDOUT: %Wrap.Make.call.loc24: init %C to %.loc24_3 = call %Wrap.Make.specific_fn.loc24() +// CHECK:STDOUT: %.loc24_3.1: ref %C = splice_block %c.var {} +// CHECK:STDOUT: %Wrap.Make.call.loc24: init %C to %.loc24_3.1 = call %Wrap.Make.specific_fn.loc24() // CHECK:STDOUT: assign %c.var, %Wrap.Make.call.loc24 // CHECK:STDOUT: %C.ref.loc24_17: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = wrapper_binding c, %c.var @@ -462,497 +385,872 @@ fn G() { // CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete = constants.%c.patt] // CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete = constants.%c.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%c.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.eb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.eb2) [concrete = constants.%SelfDestruct.specific_fn.8ca] +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc23_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc23_3.1: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc23_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc23_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc23_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc23_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call.loc23: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc22_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc22_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.746) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.746) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_99: Core.IntLiteral = int_value 99 [concrete = constants.%int_99] // CHECK:STDOUT: %.loc24_3.1: ref %i32 = array_index %self.param, %int_99 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.1: = bound_method %.loc24_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.1(%.loc24_3.1) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc24_3.1) // CHECK:STDOUT: %int_98: Core.IntLiteral = int_value 98 [concrete = constants.%int_98] -// CHECK:STDOUT: %.loc24_3.2: ref %i32 = array_index %self.param, %int_98 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.2: = bound_method %.loc24_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.2(%.loc24_3.2) +// CHECK:STDOUT: %.loc24_3.4: ref %i32 = array_index %self.param, %int_98 +// CHECK:STDOUT: %Destroy.facet.loc24_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc24_3.4) // CHECK:STDOUT: %int_97: Core.IntLiteral = int_value 97 [concrete = constants.%int_97] -// CHECK:STDOUT: %.loc24_3.3: ref %i32 = array_index %self.param, %int_97 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.3: = bound_method %.loc24_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.3(%.loc24_3.3) +// CHECK:STDOUT: %.loc24_3.7: ref %i32 = array_index %self.param, %int_97 +// CHECK:STDOUT: %Destroy.facet.loc24_3.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.8: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.9: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc24_3.7) // CHECK:STDOUT: %int_96: Core.IntLiteral = int_value 96 [concrete = constants.%int_96] -// CHECK:STDOUT: %.loc24_3.4: ref %i32 = array_index %self.param, %int_96 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.4: = bound_method %.loc24_3.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.4(%.loc24_3.4) +// CHECK:STDOUT: %.loc24_3.10: ref %i32 = array_index %self.param, %int_96 +// CHECK:STDOUT: %Destroy.facet.loc24_3.7: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.11: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.7 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.8: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.12: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.8 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.4: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc24_3.10) // CHECK:STDOUT: %int_95: Core.IntLiteral = int_value 95 [concrete = constants.%int_95] -// CHECK:STDOUT: %.loc24_3.5: ref %i32 = array_index %self.param, %int_95 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.5: = bound_method %.loc24_3.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.5: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.5(%.loc24_3.5) +// CHECK:STDOUT: %.loc24_3.13: ref %i32 = array_index %self.param, %int_95 +// CHECK:STDOUT: %Destroy.facet.loc24_3.9: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.14: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.9 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.10: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.15: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.10 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.5: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.5: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc24_3.13) // CHECK:STDOUT: %int_94: Core.IntLiteral = int_value 94 [concrete = constants.%int_94] -// CHECK:STDOUT: %.loc24_3.6: ref %i32 = array_index %self.param, %int_94 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.6: = bound_method %.loc24_3.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.6: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.6(%.loc24_3.6) +// CHECK:STDOUT: %.loc24_3.16: ref %i32 = array_index %self.param, %int_94 +// CHECK:STDOUT: %Destroy.facet.loc24_3.11: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.17: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.11 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.12: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.18: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.12 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.6: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.6: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%.loc24_3.16) // CHECK:STDOUT: %int_93: Core.IntLiteral = int_value 93 [concrete = constants.%int_93] -// CHECK:STDOUT: %.loc24_3.7: ref %i32 = array_index %self.param, %int_93 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.7: = bound_method %.loc24_3.7, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.7(%.loc24_3.7) +// CHECK:STDOUT: %.loc24_3.19: ref %i32 = array_index %self.param, %int_93 +// CHECK:STDOUT: %Destroy.facet.loc24_3.13: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.20: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.13 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.14: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.21: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.14 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.7: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.7: init %empty_tuple.type = call %SelfDestruct.specific_fn.7(%.loc24_3.19) // CHECK:STDOUT: %int_92: Core.IntLiteral = int_value 92 [concrete = constants.%int_92] -// CHECK:STDOUT: %.loc24_3.8: ref %i32 = array_index %self.param, %int_92 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.8: = bound_method %.loc24_3.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.8(%.loc24_3.8) +// CHECK:STDOUT: %.loc24_3.22: ref %i32 = array_index %self.param, %int_92 +// CHECK:STDOUT: %Destroy.facet.loc24_3.15: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.23: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.15 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.16: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.24: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.16 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.8: init %empty_tuple.type = call %SelfDestruct.specific_fn.8(%.loc24_3.22) // CHECK:STDOUT: %int_91: Core.IntLiteral = int_value 91 [concrete = constants.%int_91] -// CHECK:STDOUT: %.loc24_3.9: ref %i32 = array_index %self.param, %int_91 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.9: = bound_method %.loc24_3.9, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.9(%.loc24_3.9) +// CHECK:STDOUT: %.loc24_3.25: ref %i32 = array_index %self.param, %int_91 +// CHECK:STDOUT: %Destroy.facet.loc24_3.17: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.26: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.17 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.18: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.27: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.18 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.9: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.9: init %empty_tuple.type = call %SelfDestruct.specific_fn.9(%.loc24_3.25) // CHECK:STDOUT: %int_90: Core.IntLiteral = int_value 90 [concrete = constants.%int_90] -// CHECK:STDOUT: %.loc24_3.10: ref %i32 = array_index %self.param, %int_90 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.10: = bound_method %.loc24_3.10, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.10(%.loc24_3.10) +// CHECK:STDOUT: %.loc24_3.28: ref %i32 = array_index %self.param, %int_90 +// CHECK:STDOUT: %Destroy.facet.loc24_3.19: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.29: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.19 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.20: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.30: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.20 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.10: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.10: init %empty_tuple.type = call %SelfDestruct.specific_fn.10(%.loc24_3.28) // CHECK:STDOUT: %int_89: Core.IntLiteral = int_value 89 [concrete = constants.%int_89] -// CHECK:STDOUT: %.loc24_3.11: ref %i32 = array_index %self.param, %int_89 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.11: = bound_method %.loc24_3.11, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.11(%.loc24_3.11) +// CHECK:STDOUT: %.loc24_3.31: ref %i32 = array_index %self.param, %int_89 +// CHECK:STDOUT: %Destroy.facet.loc24_3.21: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.32: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.21 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.22: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.33: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.22 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.11: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.11: init %empty_tuple.type = call %SelfDestruct.specific_fn.11(%.loc24_3.31) // CHECK:STDOUT: %int_88: Core.IntLiteral = int_value 88 [concrete = constants.%int_88] -// CHECK:STDOUT: %.loc24_3.12: ref %i32 = array_index %self.param, %int_88 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.12: = bound_method %.loc24_3.12, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.12(%.loc24_3.12) +// CHECK:STDOUT: %.loc24_3.34: ref %i32 = array_index %self.param, %int_88 +// CHECK:STDOUT: %Destroy.facet.loc24_3.23: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.35: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.23 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.24: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.36: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.24 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.12: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.12: init %empty_tuple.type = call %SelfDestruct.specific_fn.12(%.loc24_3.34) // CHECK:STDOUT: %int_87: Core.IntLiteral = int_value 87 [concrete = constants.%int_87] -// CHECK:STDOUT: %.loc24_3.13: ref %i32 = array_index %self.param, %int_87 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.13: = bound_method %.loc24_3.13, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.13(%.loc24_3.13) +// CHECK:STDOUT: %.loc24_3.37: ref %i32 = array_index %self.param, %int_87 +// CHECK:STDOUT: %Destroy.facet.loc24_3.25: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.38: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.25 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.26: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.39: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.26 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.13: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.13: init %empty_tuple.type = call %SelfDestruct.specific_fn.13(%.loc24_3.37) // CHECK:STDOUT: %int_86: Core.IntLiteral = int_value 86 [concrete = constants.%int_86] -// CHECK:STDOUT: %.loc24_3.14: ref %i32 = array_index %self.param, %int_86 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.14: = bound_method %.loc24_3.14, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.14: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.14(%.loc24_3.14) +// CHECK:STDOUT: %.loc24_3.40: ref %i32 = array_index %self.param, %int_86 +// CHECK:STDOUT: %Destroy.facet.loc24_3.27: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.41: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.27 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.28: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.42: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.28 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.14: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.14: init %empty_tuple.type = call %SelfDestruct.specific_fn.14(%.loc24_3.40) // CHECK:STDOUT: %int_85: Core.IntLiteral = int_value 85 [concrete = constants.%int_85] -// CHECK:STDOUT: %.loc24_3.15: ref %i32 = array_index %self.param, %int_85 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.15: = bound_method %.loc24_3.15, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.15: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.15(%.loc24_3.15) +// CHECK:STDOUT: %.loc24_3.43: ref %i32 = array_index %self.param, %int_85 +// CHECK:STDOUT: %Destroy.facet.loc24_3.29: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.44: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.29 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.30: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.45: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.30 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.15: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.15: init %empty_tuple.type = call %SelfDestruct.specific_fn.15(%.loc24_3.43) // CHECK:STDOUT: %int_84: Core.IntLiteral = int_value 84 [concrete = constants.%int_84] -// CHECK:STDOUT: %.loc24_3.16: ref %i32 = array_index %self.param, %int_84 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.16: = bound_method %.loc24_3.16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.16(%.loc24_3.16) +// CHECK:STDOUT: %.loc24_3.46: ref %i32 = array_index %self.param, %int_84 +// CHECK:STDOUT: %Destroy.facet.loc24_3.31: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.47: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.31 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.32: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.48: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.32 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.16: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.16: init %empty_tuple.type = call %SelfDestruct.specific_fn.16(%.loc24_3.46) // CHECK:STDOUT: %int_83: Core.IntLiteral = int_value 83 [concrete = constants.%int_83] -// CHECK:STDOUT: %.loc24_3.17: ref %i32 = array_index %self.param, %int_83 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.17: = bound_method %.loc24_3.17, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.17: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.17(%.loc24_3.17) +// CHECK:STDOUT: %.loc24_3.49: ref %i32 = array_index %self.param, %int_83 +// CHECK:STDOUT: %Destroy.facet.loc24_3.33: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.50: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.33 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.34: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.51: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.34 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.17: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.17: init %empty_tuple.type = call %SelfDestruct.specific_fn.17(%.loc24_3.49) // CHECK:STDOUT: %int_82: Core.IntLiteral = int_value 82 [concrete = constants.%int_82] -// CHECK:STDOUT: %.loc24_3.18: ref %i32 = array_index %self.param, %int_82 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.18: = bound_method %.loc24_3.18, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.18: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.18(%.loc24_3.18) +// CHECK:STDOUT: %.loc24_3.52: ref %i32 = array_index %self.param, %int_82 +// CHECK:STDOUT: %Destroy.facet.loc24_3.35: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.53: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.35 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.36: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.54: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.36 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.18: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.18: init %empty_tuple.type = call %SelfDestruct.specific_fn.18(%.loc24_3.52) // CHECK:STDOUT: %int_81: Core.IntLiteral = int_value 81 [concrete = constants.%int_81] -// CHECK:STDOUT: %.loc24_3.19: ref %i32 = array_index %self.param, %int_81 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.19: = bound_method %.loc24_3.19, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.19(%.loc24_3.19) +// CHECK:STDOUT: %.loc24_3.55: ref %i32 = array_index %self.param, %int_81 +// CHECK:STDOUT: %Destroy.facet.loc24_3.37: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.56: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.37 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.38: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.57: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.38 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.19: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.19: init %empty_tuple.type = call %SelfDestruct.specific_fn.19(%.loc24_3.55) // CHECK:STDOUT: %int_80: Core.IntLiteral = int_value 80 [concrete = constants.%int_80] -// CHECK:STDOUT: %.loc24_3.20: ref %i32 = array_index %self.param, %int_80 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.20: = bound_method %.loc24_3.20, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.20: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.20(%.loc24_3.20) +// CHECK:STDOUT: %.loc24_3.58: ref %i32 = array_index %self.param, %int_80 +// CHECK:STDOUT: %Destroy.facet.loc24_3.39: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.59: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.39 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.40: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.60: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.40 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.20: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.20: init %empty_tuple.type = call %SelfDestruct.specific_fn.20(%.loc24_3.58) // CHECK:STDOUT: %int_79: Core.IntLiteral = int_value 79 [concrete = constants.%int_79] -// CHECK:STDOUT: %.loc24_3.21: ref %i32 = array_index %self.param, %int_79 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.21: = bound_method %.loc24_3.21, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.21(%.loc24_3.21) +// CHECK:STDOUT: %.loc24_3.61: ref %i32 = array_index %self.param, %int_79 +// CHECK:STDOUT: %Destroy.facet.loc24_3.41: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.62: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.41 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.42: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.63: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.42 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.21: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.21: init %empty_tuple.type = call %SelfDestruct.specific_fn.21(%.loc24_3.61) // CHECK:STDOUT: %int_78: Core.IntLiteral = int_value 78 [concrete = constants.%int_78] -// CHECK:STDOUT: %.loc24_3.22: ref %i32 = array_index %self.param, %int_78 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.22: = bound_method %.loc24_3.22, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.22(%.loc24_3.22) +// CHECK:STDOUT: %.loc24_3.64: ref %i32 = array_index %self.param, %int_78 +// CHECK:STDOUT: %Destroy.facet.loc24_3.43: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.65: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.43 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.44: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.66: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.44 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.22: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.22: init %empty_tuple.type = call %SelfDestruct.specific_fn.22(%.loc24_3.64) // CHECK:STDOUT: %int_77: Core.IntLiteral = int_value 77 [concrete = constants.%int_77] -// CHECK:STDOUT: %.loc24_3.23: ref %i32 = array_index %self.param, %int_77 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.23: = bound_method %.loc24_3.23, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.23(%.loc24_3.23) +// CHECK:STDOUT: %.loc24_3.67: ref %i32 = array_index %self.param, %int_77 +// CHECK:STDOUT: %Destroy.facet.loc24_3.45: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.68: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.45 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.46: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.69: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.46 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.23: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.23: init %empty_tuple.type = call %SelfDestruct.specific_fn.23(%.loc24_3.67) // CHECK:STDOUT: %int_76: Core.IntLiteral = int_value 76 [concrete = constants.%int_76] -// CHECK:STDOUT: %.loc24_3.24: ref %i32 = array_index %self.param, %int_76 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.24: = bound_method %.loc24_3.24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.24(%.loc24_3.24) +// CHECK:STDOUT: %.loc24_3.70: ref %i32 = array_index %self.param, %int_76 +// CHECK:STDOUT: %Destroy.facet.loc24_3.47: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.71: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.47 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.48: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.72: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.48 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.24: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.24: init %empty_tuple.type = call %SelfDestruct.specific_fn.24(%.loc24_3.70) // CHECK:STDOUT: %int_75: Core.IntLiteral = int_value 75 [concrete = constants.%int_75] -// CHECK:STDOUT: %.loc24_3.25: ref %i32 = array_index %self.param, %int_75 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.25: = bound_method %.loc24_3.25, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.25: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.25(%.loc24_3.25) +// CHECK:STDOUT: %.loc24_3.73: ref %i32 = array_index %self.param, %int_75 +// CHECK:STDOUT: %Destroy.facet.loc24_3.49: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.74: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.49 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.50: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.75: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.50 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.25: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.25: init %empty_tuple.type = call %SelfDestruct.specific_fn.25(%.loc24_3.73) // CHECK:STDOUT: %int_74: Core.IntLiteral = int_value 74 [concrete = constants.%int_74] -// CHECK:STDOUT: %.loc24_3.26: ref %i32 = array_index %self.param, %int_74 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.26: = bound_method %.loc24_3.26, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.26: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.26(%.loc24_3.26) +// CHECK:STDOUT: %.loc24_3.76: ref %i32 = array_index %self.param, %int_74 +// CHECK:STDOUT: %Destroy.facet.loc24_3.51: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.77: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.51 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.52: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.78: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.52 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.26: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.26: init %empty_tuple.type = call %SelfDestruct.specific_fn.26(%.loc24_3.76) // CHECK:STDOUT: %int_73: Core.IntLiteral = int_value 73 [concrete = constants.%int_73] -// CHECK:STDOUT: %.loc24_3.27: ref %i32 = array_index %self.param, %int_73 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.27: = bound_method %.loc24_3.27, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.27: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.27(%.loc24_3.27) +// CHECK:STDOUT: %.loc24_3.79: ref %i32 = array_index %self.param, %int_73 +// CHECK:STDOUT: %Destroy.facet.loc24_3.53: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.80: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.53 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.54: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.81: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.54 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.27: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.27: init %empty_tuple.type = call %SelfDestruct.specific_fn.27(%.loc24_3.79) // CHECK:STDOUT: %int_72: Core.IntLiteral = int_value 72 [concrete = constants.%int_72] -// CHECK:STDOUT: %.loc24_3.28: ref %i32 = array_index %self.param, %int_72 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.28: = bound_method %.loc24_3.28, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.28: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.28(%.loc24_3.28) +// CHECK:STDOUT: %.loc24_3.82: ref %i32 = array_index %self.param, %int_72 +// CHECK:STDOUT: %Destroy.facet.loc24_3.55: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.83: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.55 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.56: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.84: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.56 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.28: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.28: init %empty_tuple.type = call %SelfDestruct.specific_fn.28(%.loc24_3.82) // CHECK:STDOUT: %int_71: Core.IntLiteral = int_value 71 [concrete = constants.%int_71] -// CHECK:STDOUT: %.loc24_3.29: ref %i32 = array_index %self.param, %int_71 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.29: = bound_method %.loc24_3.29, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.29: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.29(%.loc24_3.29) +// CHECK:STDOUT: %.loc24_3.85: ref %i32 = array_index %self.param, %int_71 +// CHECK:STDOUT: %Destroy.facet.loc24_3.57: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.86: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.57 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.58: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.87: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.58 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.29: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.29: init %empty_tuple.type = call %SelfDestruct.specific_fn.29(%.loc24_3.85) // CHECK:STDOUT: %int_70: Core.IntLiteral = int_value 70 [concrete = constants.%int_70] -// CHECK:STDOUT: %.loc24_3.30: ref %i32 = array_index %self.param, %int_70 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.30: = bound_method %.loc24_3.30, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.30: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.30(%.loc24_3.30) +// CHECK:STDOUT: %.loc24_3.88: ref %i32 = array_index %self.param, %int_70 +// CHECK:STDOUT: %Destroy.facet.loc24_3.59: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.89: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.59 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.60: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.90: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.60 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.30: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.30: init %empty_tuple.type = call %SelfDestruct.specific_fn.30(%.loc24_3.88) // CHECK:STDOUT: %int_69: Core.IntLiteral = int_value 69 [concrete = constants.%int_69] -// CHECK:STDOUT: %.loc24_3.31: ref %i32 = array_index %self.param, %int_69 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.31: = bound_method %.loc24_3.31, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.31: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.31(%.loc24_3.31) +// CHECK:STDOUT: %.loc24_3.91: ref %i32 = array_index %self.param, %int_69 +// CHECK:STDOUT: %Destroy.facet.loc24_3.61: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.92: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.61 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.62: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.93: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.62 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.31: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.31: init %empty_tuple.type = call %SelfDestruct.specific_fn.31(%.loc24_3.91) // CHECK:STDOUT: %int_68: Core.IntLiteral = int_value 68 [concrete = constants.%int_68] -// CHECK:STDOUT: %.loc24_3.32: ref %i32 = array_index %self.param, %int_68 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.32: = bound_method %.loc24_3.32, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.32: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.32(%.loc24_3.32) +// CHECK:STDOUT: %.loc24_3.94: ref %i32 = array_index %self.param, %int_68 +// CHECK:STDOUT: %Destroy.facet.loc24_3.63: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.95: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.63 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.64: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.96: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.64 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.32: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.32: init %empty_tuple.type = call %SelfDestruct.specific_fn.32(%.loc24_3.94) // CHECK:STDOUT: %int_67: Core.IntLiteral = int_value 67 [concrete = constants.%int_67] -// CHECK:STDOUT: %.loc24_3.33: ref %i32 = array_index %self.param, %int_67 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.33: = bound_method %.loc24_3.33, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.33: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.33(%.loc24_3.33) +// CHECK:STDOUT: %.loc24_3.97: ref %i32 = array_index %self.param, %int_67 +// CHECK:STDOUT: %Destroy.facet.loc24_3.65: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.98: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.65 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.66: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.99: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.66 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.33: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.33: init %empty_tuple.type = call %SelfDestruct.specific_fn.33(%.loc24_3.97) // CHECK:STDOUT: %int_66: Core.IntLiteral = int_value 66 [concrete = constants.%int_66] -// CHECK:STDOUT: %.loc24_3.34: ref %i32 = array_index %self.param, %int_66 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.34: = bound_method %.loc24_3.34, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.34: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.34(%.loc24_3.34) +// CHECK:STDOUT: %.loc24_3.100: ref %i32 = array_index %self.param, %int_66 +// CHECK:STDOUT: %Destroy.facet.loc24_3.67: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.101: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.67 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.68: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.102: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.68 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.34: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.34: init %empty_tuple.type = call %SelfDestruct.specific_fn.34(%.loc24_3.100) // CHECK:STDOUT: %int_65: Core.IntLiteral = int_value 65 [concrete = constants.%int_65] -// CHECK:STDOUT: %.loc24_3.35: ref %i32 = array_index %self.param, %int_65 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.35: = bound_method %.loc24_3.35, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.35: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.35(%.loc24_3.35) +// CHECK:STDOUT: %.loc24_3.103: ref %i32 = array_index %self.param, %int_65 +// CHECK:STDOUT: %Destroy.facet.loc24_3.69: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.104: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.69 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.70: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.105: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.70 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.35: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.35: init %empty_tuple.type = call %SelfDestruct.specific_fn.35(%.loc24_3.103) // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64] -// CHECK:STDOUT: %.loc24_3.36: ref %i32 = array_index %self.param, %int_64 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.36: = bound_method %.loc24_3.36, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.36: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.36(%.loc24_3.36) +// CHECK:STDOUT: %.loc24_3.106: ref %i32 = array_index %self.param, %int_64 +// CHECK:STDOUT: %Destroy.facet.loc24_3.71: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.107: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.71 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.72: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.108: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.72 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.36: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.36: init %empty_tuple.type = call %SelfDestruct.specific_fn.36(%.loc24_3.106) // CHECK:STDOUT: %int_63: Core.IntLiteral = int_value 63 [concrete = constants.%int_63] -// CHECK:STDOUT: %.loc24_3.37: ref %i32 = array_index %self.param, %int_63 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.37: = bound_method %.loc24_3.37, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.37: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.37(%.loc24_3.37) +// CHECK:STDOUT: %.loc24_3.109: ref %i32 = array_index %self.param, %int_63 +// CHECK:STDOUT: %Destroy.facet.loc24_3.73: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.110: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.73 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.74: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.111: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.74 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.37: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.37: init %empty_tuple.type = call %SelfDestruct.specific_fn.37(%.loc24_3.109) // CHECK:STDOUT: %int_62: Core.IntLiteral = int_value 62 [concrete = constants.%int_62] -// CHECK:STDOUT: %.loc24_3.38: ref %i32 = array_index %self.param, %int_62 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.38: = bound_method %.loc24_3.38, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.38: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.38(%.loc24_3.38) +// CHECK:STDOUT: %.loc24_3.112: ref %i32 = array_index %self.param, %int_62 +// CHECK:STDOUT: %Destroy.facet.loc24_3.75: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.113: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.75 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.76: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.114: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.76 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.38: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.38: init %empty_tuple.type = call %SelfDestruct.specific_fn.38(%.loc24_3.112) // CHECK:STDOUT: %int_61: Core.IntLiteral = int_value 61 [concrete = constants.%int_61] -// CHECK:STDOUT: %.loc24_3.39: ref %i32 = array_index %self.param, %int_61 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.39: = bound_method %.loc24_3.39, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.39: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.39(%.loc24_3.39) +// CHECK:STDOUT: %.loc24_3.115: ref %i32 = array_index %self.param, %int_61 +// CHECK:STDOUT: %Destroy.facet.loc24_3.77: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.116: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.77 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.78: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.117: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.78 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.39: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.39: init %empty_tuple.type = call %SelfDestruct.specific_fn.39(%.loc24_3.115) // CHECK:STDOUT: %int_60: Core.IntLiteral = int_value 60 [concrete = constants.%int_60] -// CHECK:STDOUT: %.loc24_3.40: ref %i32 = array_index %self.param, %int_60 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.40: = bound_method %.loc24_3.40, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.40: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.40(%.loc24_3.40) +// CHECK:STDOUT: %.loc24_3.118: ref %i32 = array_index %self.param, %int_60 +// CHECK:STDOUT: %Destroy.facet.loc24_3.79: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.119: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.79 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.80: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.120: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.80 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.40: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.40: init %empty_tuple.type = call %SelfDestruct.specific_fn.40(%.loc24_3.118) // CHECK:STDOUT: %int_59: Core.IntLiteral = int_value 59 [concrete = constants.%int_59] -// CHECK:STDOUT: %.loc24_3.41: ref %i32 = array_index %self.param, %int_59 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.41: = bound_method %.loc24_3.41, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.41: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.41(%.loc24_3.41) +// CHECK:STDOUT: %.loc24_3.121: ref %i32 = array_index %self.param, %int_59 +// CHECK:STDOUT: %Destroy.facet.loc24_3.81: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.122: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.81 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.82: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.123: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.82 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.41: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.41: init %empty_tuple.type = call %SelfDestruct.specific_fn.41(%.loc24_3.121) // CHECK:STDOUT: %int_58: Core.IntLiteral = int_value 58 [concrete = constants.%int_58] -// CHECK:STDOUT: %.loc24_3.42: ref %i32 = array_index %self.param, %int_58 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.42: = bound_method %.loc24_3.42, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.42: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.42(%.loc24_3.42) +// CHECK:STDOUT: %.loc24_3.124: ref %i32 = array_index %self.param, %int_58 +// CHECK:STDOUT: %Destroy.facet.loc24_3.83: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.125: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.83 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.84: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.126: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.84 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.42: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.42: init %empty_tuple.type = call %SelfDestruct.specific_fn.42(%.loc24_3.124) // CHECK:STDOUT: %int_57: Core.IntLiteral = int_value 57 [concrete = constants.%int_57] -// CHECK:STDOUT: %.loc24_3.43: ref %i32 = array_index %self.param, %int_57 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.43: = bound_method %.loc24_3.43, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.43: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.43(%.loc24_3.43) +// CHECK:STDOUT: %.loc24_3.127: ref %i32 = array_index %self.param, %int_57 +// CHECK:STDOUT: %Destroy.facet.loc24_3.85: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.128: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.85 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.86: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.129: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.86 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.43: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.43: init %empty_tuple.type = call %SelfDestruct.specific_fn.43(%.loc24_3.127) // CHECK:STDOUT: %int_56: Core.IntLiteral = int_value 56 [concrete = constants.%int_56] -// CHECK:STDOUT: %.loc24_3.44: ref %i32 = array_index %self.param, %int_56 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.44: = bound_method %.loc24_3.44, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.44: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.44(%.loc24_3.44) +// CHECK:STDOUT: %.loc24_3.130: ref %i32 = array_index %self.param, %int_56 +// CHECK:STDOUT: %Destroy.facet.loc24_3.87: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.131: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.87 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.88: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.132: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.88 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.44: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.44: init %empty_tuple.type = call %SelfDestruct.specific_fn.44(%.loc24_3.130) // CHECK:STDOUT: %int_55: Core.IntLiteral = int_value 55 [concrete = constants.%int_55] -// CHECK:STDOUT: %.loc24_3.45: ref %i32 = array_index %self.param, %int_55 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.45: = bound_method %.loc24_3.45, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.45: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.45(%.loc24_3.45) +// CHECK:STDOUT: %.loc24_3.133: ref %i32 = array_index %self.param, %int_55 +// CHECK:STDOUT: %Destroy.facet.loc24_3.89: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.134: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.89 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.90: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.135: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.90 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.45: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.45: init %empty_tuple.type = call %SelfDestruct.specific_fn.45(%.loc24_3.133) // CHECK:STDOUT: %int_54: Core.IntLiteral = int_value 54 [concrete = constants.%int_54] -// CHECK:STDOUT: %.loc24_3.46: ref %i32 = array_index %self.param, %int_54 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.46: = bound_method %.loc24_3.46, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.46: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.46(%.loc24_3.46) +// CHECK:STDOUT: %.loc24_3.136: ref %i32 = array_index %self.param, %int_54 +// CHECK:STDOUT: %Destroy.facet.loc24_3.91: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.137: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.91 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.92: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.138: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.92 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.46: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.46: init %empty_tuple.type = call %SelfDestruct.specific_fn.46(%.loc24_3.136) // CHECK:STDOUT: %int_53: Core.IntLiteral = int_value 53 [concrete = constants.%int_53] -// CHECK:STDOUT: %.loc24_3.47: ref %i32 = array_index %self.param, %int_53 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.47: = bound_method %.loc24_3.47, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.47: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.47(%.loc24_3.47) +// CHECK:STDOUT: %.loc24_3.139: ref %i32 = array_index %self.param, %int_53 +// CHECK:STDOUT: %Destroy.facet.loc24_3.93: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.140: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.93 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.94: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.141: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.94 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.47: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.47: init %empty_tuple.type = call %SelfDestruct.specific_fn.47(%.loc24_3.139) // CHECK:STDOUT: %int_52: Core.IntLiteral = int_value 52 [concrete = constants.%int_52] -// CHECK:STDOUT: %.loc24_3.48: ref %i32 = array_index %self.param, %int_52 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.48: = bound_method %.loc24_3.48, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.48: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.48(%.loc24_3.48) +// CHECK:STDOUT: %.loc24_3.142: ref %i32 = array_index %self.param, %int_52 +// CHECK:STDOUT: %Destroy.facet.loc24_3.95: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.143: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.95 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.96: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.144: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.96 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.48: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.48: init %empty_tuple.type = call %SelfDestruct.specific_fn.48(%.loc24_3.142) // CHECK:STDOUT: %int_51: Core.IntLiteral = int_value 51 [concrete = constants.%int_51] -// CHECK:STDOUT: %.loc24_3.49: ref %i32 = array_index %self.param, %int_51 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.49: = bound_method %.loc24_3.49, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.49: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.49(%.loc24_3.49) +// CHECK:STDOUT: %.loc24_3.145: ref %i32 = array_index %self.param, %int_51 +// CHECK:STDOUT: %Destroy.facet.loc24_3.97: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.146: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.97 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.98: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.147: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.98 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.49: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.49: init %empty_tuple.type = call %SelfDestruct.specific_fn.49(%.loc24_3.145) // CHECK:STDOUT: %int_50: Core.IntLiteral = int_value 50 [concrete = constants.%int_50] -// CHECK:STDOUT: %.loc24_3.50: ref %i32 = array_index %self.param, %int_50 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.50: = bound_method %.loc24_3.50, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.50: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.50(%.loc24_3.50) +// CHECK:STDOUT: %.loc24_3.148: ref %i32 = array_index %self.param, %int_50 +// CHECK:STDOUT: %Destroy.facet.loc24_3.99: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.149: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.99 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.100: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.150: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.100 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.50: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.50: init %empty_tuple.type = call %SelfDestruct.specific_fn.50(%.loc24_3.148) // CHECK:STDOUT: %int_49: Core.IntLiteral = int_value 49 [concrete = constants.%int_49] -// CHECK:STDOUT: %.loc24_3.51: ref %i32 = array_index %self.param, %int_49 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.51: = bound_method %.loc24_3.51, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.51: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.51(%.loc24_3.51) +// CHECK:STDOUT: %.loc24_3.151: ref %i32 = array_index %self.param, %int_49 +// CHECK:STDOUT: %Destroy.facet.loc24_3.101: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.152: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.101 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.102: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.153: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.102 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.51: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.51: init %empty_tuple.type = call %SelfDestruct.specific_fn.51(%.loc24_3.151) // CHECK:STDOUT: %int_48: Core.IntLiteral = int_value 48 [concrete = constants.%int_48] -// CHECK:STDOUT: %.loc24_3.52: ref %i32 = array_index %self.param, %int_48 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.52: = bound_method %.loc24_3.52, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.52: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.52(%.loc24_3.52) +// CHECK:STDOUT: %.loc24_3.154: ref %i32 = array_index %self.param, %int_48 +// CHECK:STDOUT: %Destroy.facet.loc24_3.103: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.155: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.103 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.104: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.156: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.104 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.52: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.52: init %empty_tuple.type = call %SelfDestruct.specific_fn.52(%.loc24_3.154) // CHECK:STDOUT: %int_47: Core.IntLiteral = int_value 47 [concrete = constants.%int_47] -// CHECK:STDOUT: %.loc24_3.53: ref %i32 = array_index %self.param, %int_47 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.53: = bound_method %.loc24_3.53, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.53: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.53(%.loc24_3.53) +// CHECK:STDOUT: %.loc24_3.157: ref %i32 = array_index %self.param, %int_47 +// CHECK:STDOUT: %Destroy.facet.loc24_3.105: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.158: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.105 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.106: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.159: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.106 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.53: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.53: init %empty_tuple.type = call %SelfDestruct.specific_fn.53(%.loc24_3.157) // CHECK:STDOUT: %int_46: Core.IntLiteral = int_value 46 [concrete = constants.%int_46] -// CHECK:STDOUT: %.loc24_3.54: ref %i32 = array_index %self.param, %int_46 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.54: = bound_method %.loc24_3.54, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.54: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.54(%.loc24_3.54) +// CHECK:STDOUT: %.loc24_3.160: ref %i32 = array_index %self.param, %int_46 +// CHECK:STDOUT: %Destroy.facet.loc24_3.107: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.161: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.107 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.108: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.162: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.108 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.54: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.54: init %empty_tuple.type = call %SelfDestruct.specific_fn.54(%.loc24_3.160) // CHECK:STDOUT: %int_45: Core.IntLiteral = int_value 45 [concrete = constants.%int_45] -// CHECK:STDOUT: %.loc24_3.55: ref %i32 = array_index %self.param, %int_45 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.55: = bound_method %.loc24_3.55, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.55: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.55(%.loc24_3.55) +// CHECK:STDOUT: %.loc24_3.163: ref %i32 = array_index %self.param, %int_45 +// CHECK:STDOUT: %Destroy.facet.loc24_3.109: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.164: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.109 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.110: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.165: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.110 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.55: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.55: init %empty_tuple.type = call %SelfDestruct.specific_fn.55(%.loc24_3.163) // CHECK:STDOUT: %int_44: Core.IntLiteral = int_value 44 [concrete = constants.%int_44] -// CHECK:STDOUT: %.loc24_3.56: ref %i32 = array_index %self.param, %int_44 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.56: = bound_method %.loc24_3.56, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.56: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.56(%.loc24_3.56) +// CHECK:STDOUT: %.loc24_3.166: ref %i32 = array_index %self.param, %int_44 +// CHECK:STDOUT: %Destroy.facet.loc24_3.111: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.167: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.111 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.112: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.168: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.112 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.56: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.56: init %empty_tuple.type = call %SelfDestruct.specific_fn.56(%.loc24_3.166) // CHECK:STDOUT: %int_43: Core.IntLiteral = int_value 43 [concrete = constants.%int_43] -// CHECK:STDOUT: %.loc24_3.57: ref %i32 = array_index %self.param, %int_43 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.57: = bound_method %.loc24_3.57, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.57: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.57(%.loc24_3.57) +// CHECK:STDOUT: %.loc24_3.169: ref %i32 = array_index %self.param, %int_43 +// CHECK:STDOUT: %Destroy.facet.loc24_3.113: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.170: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.113 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.114: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.171: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.114 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.57: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.57: init %empty_tuple.type = call %SelfDestruct.specific_fn.57(%.loc24_3.169) // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42] -// CHECK:STDOUT: %.loc24_3.58: ref %i32 = array_index %self.param, %int_42 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.58: = bound_method %.loc24_3.58, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.58: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.58(%.loc24_3.58) +// CHECK:STDOUT: %.loc24_3.172: ref %i32 = array_index %self.param, %int_42 +// CHECK:STDOUT: %Destroy.facet.loc24_3.115: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.173: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.115 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.116: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.174: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.116 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.58: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.58: init %empty_tuple.type = call %SelfDestruct.specific_fn.58(%.loc24_3.172) // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete = constants.%int_41] -// CHECK:STDOUT: %.loc24_3.59: ref %i32 = array_index %self.param, %int_41 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.59: = bound_method %.loc24_3.59, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.59: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.59(%.loc24_3.59) +// CHECK:STDOUT: %.loc24_3.175: ref %i32 = array_index %self.param, %int_41 +// CHECK:STDOUT: %Destroy.facet.loc24_3.117: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.176: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.117 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.118: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.177: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.118 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.59: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.59: init %empty_tuple.type = call %SelfDestruct.specific_fn.59(%.loc24_3.175) // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete = constants.%int_40] -// CHECK:STDOUT: %.loc24_3.60: ref %i32 = array_index %self.param, %int_40 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.60: = bound_method %.loc24_3.60, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.60: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.60(%.loc24_3.60) +// CHECK:STDOUT: %.loc24_3.178: ref %i32 = array_index %self.param, %int_40 +// CHECK:STDOUT: %Destroy.facet.loc24_3.119: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.179: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.119 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.120: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.180: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.120 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.60: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.60: init %empty_tuple.type = call %SelfDestruct.specific_fn.60(%.loc24_3.178) // CHECK:STDOUT: %int_39: Core.IntLiteral = int_value 39 [concrete = constants.%int_39] -// CHECK:STDOUT: %.loc24_3.61: ref %i32 = array_index %self.param, %int_39 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.61: = bound_method %.loc24_3.61, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.61: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.61(%.loc24_3.61) +// CHECK:STDOUT: %.loc24_3.181: ref %i32 = array_index %self.param, %int_39 +// CHECK:STDOUT: %Destroy.facet.loc24_3.121: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.182: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.121 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.122: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.183: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.122 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.61: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.61: init %empty_tuple.type = call %SelfDestruct.specific_fn.61(%.loc24_3.181) // CHECK:STDOUT: %int_38: Core.IntLiteral = int_value 38 [concrete = constants.%int_38] -// CHECK:STDOUT: %.loc24_3.62: ref %i32 = array_index %self.param, %int_38 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.62: = bound_method %.loc24_3.62, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.62: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.62(%.loc24_3.62) +// CHECK:STDOUT: %.loc24_3.184: ref %i32 = array_index %self.param, %int_38 +// CHECK:STDOUT: %Destroy.facet.loc24_3.123: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.185: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.123 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.124: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.186: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.124 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.62: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.62: init %empty_tuple.type = call %SelfDestruct.specific_fn.62(%.loc24_3.184) // CHECK:STDOUT: %int_37: Core.IntLiteral = int_value 37 [concrete = constants.%int_37] -// CHECK:STDOUT: %.loc24_3.63: ref %i32 = array_index %self.param, %int_37 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.63: = bound_method %.loc24_3.63, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.63: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.63(%.loc24_3.63) +// CHECK:STDOUT: %.loc24_3.187: ref %i32 = array_index %self.param, %int_37 +// CHECK:STDOUT: %Destroy.facet.loc24_3.125: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.188: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.125 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.126: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.189: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.126 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.63: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.63: init %empty_tuple.type = call %SelfDestruct.specific_fn.63(%.loc24_3.187) // CHECK:STDOUT: %int_36: Core.IntLiteral = int_value 36 [concrete = constants.%int_36] -// CHECK:STDOUT: %.loc24_3.64: ref %i32 = array_index %self.param, %int_36 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.64: = bound_method %.loc24_3.64, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.64: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.64(%.loc24_3.64) +// CHECK:STDOUT: %.loc24_3.190: ref %i32 = array_index %self.param, %int_36 +// CHECK:STDOUT: %Destroy.facet.loc24_3.127: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.191: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.127 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.128: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.192: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.128 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.64: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.64: init %empty_tuple.type = call %SelfDestruct.specific_fn.64(%.loc24_3.190) // CHECK:STDOUT: %int_35: Core.IntLiteral = int_value 35 [concrete = constants.%int_35] -// CHECK:STDOUT: %.loc24_3.65: ref %i32 = array_index %self.param, %int_35 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.65: = bound_method %.loc24_3.65, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.65: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.65(%.loc24_3.65) +// CHECK:STDOUT: %.loc24_3.193: ref %i32 = array_index %self.param, %int_35 +// CHECK:STDOUT: %Destroy.facet.loc24_3.129: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.194: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.129 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.130: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.195: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.130 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.65: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.65: init %empty_tuple.type = call %SelfDestruct.specific_fn.65(%.loc24_3.193) // CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [concrete = constants.%int_34] -// CHECK:STDOUT: %.loc24_3.66: ref %i32 = array_index %self.param, %int_34 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.66: = bound_method %.loc24_3.66, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.66: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.66(%.loc24_3.66) +// CHECK:STDOUT: %.loc24_3.196: ref %i32 = array_index %self.param, %int_34 +// CHECK:STDOUT: %Destroy.facet.loc24_3.131: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.197: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.131 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.132: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.198: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.132 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.66: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.66: init %empty_tuple.type = call %SelfDestruct.specific_fn.66(%.loc24_3.196) // CHECK:STDOUT: %int_33: Core.IntLiteral = int_value 33 [concrete = constants.%int_33] -// CHECK:STDOUT: %.loc24_3.67: ref %i32 = array_index %self.param, %int_33 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.67: = bound_method %.loc24_3.67, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.67: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.67(%.loc24_3.67) +// CHECK:STDOUT: %.loc24_3.199: ref %i32 = array_index %self.param, %int_33 +// CHECK:STDOUT: %Destroy.facet.loc24_3.133: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.200: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.133 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.134: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.201: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.134 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.67: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.67: init %empty_tuple.type = call %SelfDestruct.specific_fn.67(%.loc24_3.199) // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %.loc24_3.68: ref %i32 = array_index %self.param, %int_32 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.68: = bound_method %.loc24_3.68, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.68: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.68(%.loc24_3.68) +// CHECK:STDOUT: %.loc24_3.202: ref %i32 = array_index %self.param, %int_32 +// CHECK:STDOUT: %Destroy.facet.loc24_3.135: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.203: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.135 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.136: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.204: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.136 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.68: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.68: init %empty_tuple.type = call %SelfDestruct.specific_fn.68(%.loc24_3.202) // CHECK:STDOUT: %int_31: Core.IntLiteral = int_value 31 [concrete = constants.%int_31] -// CHECK:STDOUT: %.loc24_3.69: ref %i32 = array_index %self.param, %int_31 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.69: = bound_method %.loc24_3.69, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.69: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.69(%.loc24_3.69) +// CHECK:STDOUT: %.loc24_3.205: ref %i32 = array_index %self.param, %int_31 +// CHECK:STDOUT: %Destroy.facet.loc24_3.137: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.206: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.137 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.138: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.207: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.138 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.69: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.69: init %empty_tuple.type = call %SelfDestruct.specific_fn.69(%.loc24_3.205) // CHECK:STDOUT: %int_30: Core.IntLiteral = int_value 30 [concrete = constants.%int_30] -// CHECK:STDOUT: %.loc24_3.70: ref %i32 = array_index %self.param, %int_30 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.70: = bound_method %.loc24_3.70, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.70: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.70(%.loc24_3.70) +// CHECK:STDOUT: %.loc24_3.208: ref %i32 = array_index %self.param, %int_30 +// CHECK:STDOUT: %Destroy.facet.loc24_3.139: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.209: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.139 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.140: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.210: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.140 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.70: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.70: init %empty_tuple.type = call %SelfDestruct.specific_fn.70(%.loc24_3.208) // CHECK:STDOUT: %int_29: Core.IntLiteral = int_value 29 [concrete = constants.%int_29] -// CHECK:STDOUT: %.loc24_3.71: ref %i32 = array_index %self.param, %int_29 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.71: = bound_method %.loc24_3.71, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.71: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.71(%.loc24_3.71) +// CHECK:STDOUT: %.loc24_3.211: ref %i32 = array_index %self.param, %int_29 +// CHECK:STDOUT: %Destroy.facet.loc24_3.141: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.212: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.141 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.142: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.213: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.142 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.71: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.71: init %empty_tuple.type = call %SelfDestruct.specific_fn.71(%.loc24_3.211) // CHECK:STDOUT: %int_28: Core.IntLiteral = int_value 28 [concrete = constants.%int_28] -// CHECK:STDOUT: %.loc24_3.72: ref %i32 = array_index %self.param, %int_28 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.72: = bound_method %.loc24_3.72, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.72: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.72(%.loc24_3.72) +// CHECK:STDOUT: %.loc24_3.214: ref %i32 = array_index %self.param, %int_28 +// CHECK:STDOUT: %Destroy.facet.loc24_3.143: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.215: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.143 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.144: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.216: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.144 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.72: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.72: init %empty_tuple.type = call %SelfDestruct.specific_fn.72(%.loc24_3.214) // CHECK:STDOUT: %int_27: Core.IntLiteral = int_value 27 [concrete = constants.%int_27] -// CHECK:STDOUT: %.loc24_3.73: ref %i32 = array_index %self.param, %int_27 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.73: = bound_method %.loc24_3.73, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.73: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.73(%.loc24_3.73) +// CHECK:STDOUT: %.loc24_3.217: ref %i32 = array_index %self.param, %int_27 +// CHECK:STDOUT: %Destroy.facet.loc24_3.145: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.218: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.145 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.146: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.219: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.146 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.73: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.73: init %empty_tuple.type = call %SelfDestruct.specific_fn.73(%.loc24_3.217) // CHECK:STDOUT: %int_26: Core.IntLiteral = int_value 26 [concrete = constants.%int_26] -// CHECK:STDOUT: %.loc24_3.74: ref %i32 = array_index %self.param, %int_26 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.74: = bound_method %.loc24_3.74, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.74: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.74(%.loc24_3.74) +// CHECK:STDOUT: %.loc24_3.220: ref %i32 = array_index %self.param, %int_26 +// CHECK:STDOUT: %Destroy.facet.loc24_3.147: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.221: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.147 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.148: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.222: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.148 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.74: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.74: init %empty_tuple.type = call %SelfDestruct.specific_fn.74(%.loc24_3.220) // CHECK:STDOUT: %int_25: Core.IntLiteral = int_value 25 [concrete = constants.%int_25] -// CHECK:STDOUT: %.loc24_3.75: ref %i32 = array_index %self.param, %int_25 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.75: = bound_method %.loc24_3.75, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.75: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.75(%.loc24_3.75) +// CHECK:STDOUT: %.loc24_3.223: ref %i32 = array_index %self.param, %int_25 +// CHECK:STDOUT: %Destroy.facet.loc24_3.149: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.224: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.149 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.150: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.225: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.150 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.75: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.75: init %empty_tuple.type = call %SelfDestruct.specific_fn.75(%.loc24_3.223) // CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [concrete = constants.%int_24] -// CHECK:STDOUT: %.loc24_3.76: ref %i32 = array_index %self.param, %int_24 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.76: = bound_method %.loc24_3.76, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.76: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.76(%.loc24_3.76) +// CHECK:STDOUT: %.loc24_3.226: ref %i32 = array_index %self.param, %int_24 +// CHECK:STDOUT: %Destroy.facet.loc24_3.151: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.227: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.151 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.152: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.228: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.152 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.76: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.76: init %empty_tuple.type = call %SelfDestruct.specific_fn.76(%.loc24_3.226) // CHECK:STDOUT: %int_23: Core.IntLiteral = int_value 23 [concrete = constants.%int_23] -// CHECK:STDOUT: %.loc24_3.77: ref %i32 = array_index %self.param, %int_23 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.77: = bound_method %.loc24_3.77, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.77: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.77(%.loc24_3.77) +// CHECK:STDOUT: %.loc24_3.229: ref %i32 = array_index %self.param, %int_23 +// CHECK:STDOUT: %Destroy.facet.loc24_3.153: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.230: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.153 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.154: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.231: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.154 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.77: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.77: init %empty_tuple.type = call %SelfDestruct.specific_fn.77(%.loc24_3.229) // CHECK:STDOUT: %int_22: Core.IntLiteral = int_value 22 [concrete = constants.%int_22] -// CHECK:STDOUT: %.loc24_3.78: ref %i32 = array_index %self.param, %int_22 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.78: = bound_method %.loc24_3.78, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.78: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.78(%.loc24_3.78) +// CHECK:STDOUT: %.loc24_3.232: ref %i32 = array_index %self.param, %int_22 +// CHECK:STDOUT: %Destroy.facet.loc24_3.155: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.233: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.155 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.156: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.234: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.156 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.78: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.78: init %empty_tuple.type = call %SelfDestruct.specific_fn.78(%.loc24_3.232) // CHECK:STDOUT: %int_21: Core.IntLiteral = int_value 21 [concrete = constants.%int_21] -// CHECK:STDOUT: %.loc24_3.79: ref %i32 = array_index %self.param, %int_21 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.79: = bound_method %.loc24_3.79, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.79: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.79(%.loc24_3.79) +// CHECK:STDOUT: %.loc24_3.235: ref %i32 = array_index %self.param, %int_21 +// CHECK:STDOUT: %Destroy.facet.loc24_3.157: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.236: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.157 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.158: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.237: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.158 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.79: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.79: init %empty_tuple.type = call %SelfDestruct.specific_fn.79(%.loc24_3.235) // CHECK:STDOUT: %int_20: Core.IntLiteral = int_value 20 [concrete = constants.%int_20] -// CHECK:STDOUT: %.loc24_3.80: ref %i32 = array_index %self.param, %int_20 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.80: = bound_method %.loc24_3.80, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.80: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.80(%.loc24_3.80) +// CHECK:STDOUT: %.loc24_3.238: ref %i32 = array_index %self.param, %int_20 +// CHECK:STDOUT: %Destroy.facet.loc24_3.159: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.239: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.159 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.160: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.240: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.160 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.80: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.80: init %empty_tuple.type = call %SelfDestruct.specific_fn.80(%.loc24_3.238) // CHECK:STDOUT: %int_19: Core.IntLiteral = int_value 19 [concrete = constants.%int_19] -// CHECK:STDOUT: %.loc24_3.81: ref %i32 = array_index %self.param, %int_19 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.81: = bound_method %.loc24_3.81, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.81: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.81(%.loc24_3.81) +// CHECK:STDOUT: %.loc24_3.241: ref %i32 = array_index %self.param, %int_19 +// CHECK:STDOUT: %Destroy.facet.loc24_3.161: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.242: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.161 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.162: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.243: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.162 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.81: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.81: init %empty_tuple.type = call %SelfDestruct.specific_fn.81(%.loc24_3.241) // CHECK:STDOUT: %int_18: Core.IntLiteral = int_value 18 [concrete = constants.%int_18] -// CHECK:STDOUT: %.loc24_3.82: ref %i32 = array_index %self.param, %int_18 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.82: = bound_method %.loc24_3.82, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.82: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.82(%.loc24_3.82) +// CHECK:STDOUT: %.loc24_3.244: ref %i32 = array_index %self.param, %int_18 +// CHECK:STDOUT: %Destroy.facet.loc24_3.163: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.245: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.163 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.164: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.246: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.164 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.82: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.82: init %empty_tuple.type = call %SelfDestruct.specific_fn.82(%.loc24_3.244) // CHECK:STDOUT: %int_17: Core.IntLiteral = int_value 17 [concrete = constants.%int_17] -// CHECK:STDOUT: %.loc24_3.83: ref %i32 = array_index %self.param, %int_17 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.83: = bound_method %.loc24_3.83, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.83: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.83(%.loc24_3.83) +// CHECK:STDOUT: %.loc24_3.247: ref %i32 = array_index %self.param, %int_17 +// CHECK:STDOUT: %Destroy.facet.loc24_3.165: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.248: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.165 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.166: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.249: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.166 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.83: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.83: init %empty_tuple.type = call %SelfDestruct.specific_fn.83(%.loc24_3.247) // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] -// CHECK:STDOUT: %.loc24_3.84: ref %i32 = array_index %self.param, %int_16 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.84: = bound_method %.loc24_3.84, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.84: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.84(%.loc24_3.84) +// CHECK:STDOUT: %.loc24_3.250: ref %i32 = array_index %self.param, %int_16 +// CHECK:STDOUT: %Destroy.facet.loc24_3.167: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.251: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.167 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.168: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.252: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.168 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.84: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.84: init %empty_tuple.type = call %SelfDestruct.specific_fn.84(%.loc24_3.250) // CHECK:STDOUT: %int_15: Core.IntLiteral = int_value 15 [concrete = constants.%int_15] -// CHECK:STDOUT: %.loc24_3.85: ref %i32 = array_index %self.param, %int_15 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.85: = bound_method %.loc24_3.85, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.85: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.85(%.loc24_3.85) +// CHECK:STDOUT: %.loc24_3.253: ref %i32 = array_index %self.param, %int_15 +// CHECK:STDOUT: %Destroy.facet.loc24_3.169: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.254: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.169 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.170: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.255: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.170 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.85: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.85: init %empty_tuple.type = call %SelfDestruct.specific_fn.85(%.loc24_3.253) // CHECK:STDOUT: %int_14: Core.IntLiteral = int_value 14 [concrete = constants.%int_14] -// CHECK:STDOUT: %.loc24_3.86: ref %i32 = array_index %self.param, %int_14 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.86: = bound_method %.loc24_3.86, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.86: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.86(%.loc24_3.86) +// CHECK:STDOUT: %.loc24_3.256: ref %i32 = array_index %self.param, %int_14 +// CHECK:STDOUT: %Destroy.facet.loc24_3.171: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.257: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.171 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.172: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.258: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.172 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.86: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.86: init %empty_tuple.type = call %SelfDestruct.specific_fn.86(%.loc24_3.256) // CHECK:STDOUT: %int_13: Core.IntLiteral = int_value 13 [concrete = constants.%int_13] -// CHECK:STDOUT: %.loc24_3.87: ref %i32 = array_index %self.param, %int_13 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.87: = bound_method %.loc24_3.87, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.87: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.87(%.loc24_3.87) +// CHECK:STDOUT: %.loc24_3.259: ref %i32 = array_index %self.param, %int_13 +// CHECK:STDOUT: %Destroy.facet.loc24_3.173: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.260: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.173 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.174: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.261: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.174 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.87: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.87: init %empty_tuple.type = call %SelfDestruct.specific_fn.87(%.loc24_3.259) // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12] -// CHECK:STDOUT: %.loc24_3.88: ref %i32 = array_index %self.param, %int_12 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.88: = bound_method %.loc24_3.88, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.88: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.88(%.loc24_3.88) +// CHECK:STDOUT: %.loc24_3.262: ref %i32 = array_index %self.param, %int_12 +// CHECK:STDOUT: %Destroy.facet.loc24_3.175: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.263: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.175 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.176: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.264: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.176 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.88: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.88: init %empty_tuple.type = call %SelfDestruct.specific_fn.88(%.loc24_3.262) // CHECK:STDOUT: %int_11: Core.IntLiteral = int_value 11 [concrete = constants.%int_11] -// CHECK:STDOUT: %.loc24_3.89: ref %i32 = array_index %self.param, %int_11 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.89: = bound_method %.loc24_3.89, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.89: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.89(%.loc24_3.89) +// CHECK:STDOUT: %.loc24_3.265: ref %i32 = array_index %self.param, %int_11 +// CHECK:STDOUT: %Destroy.facet.loc24_3.177: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.266: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.177 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.178: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.267: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.178 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.89: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.89: init %empty_tuple.type = call %SelfDestruct.specific_fn.89(%.loc24_3.265) // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10] -// CHECK:STDOUT: %.loc24_3.90: ref %i32 = array_index %self.param, %int_10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.90: = bound_method %.loc24_3.90, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.90: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.90(%.loc24_3.90) +// CHECK:STDOUT: %.loc24_3.268: ref %i32 = array_index %self.param, %int_10 +// CHECK:STDOUT: %Destroy.facet.loc24_3.179: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.269: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.179 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.180: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.270: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.180 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.90: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.90: init %empty_tuple.type = call %SelfDestruct.specific_fn.90(%.loc24_3.268) // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9] -// CHECK:STDOUT: %.loc24_3.91: ref %i32 = array_index %self.param, %int_9 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.91: = bound_method %.loc24_3.91, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.91: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.91(%.loc24_3.91) +// CHECK:STDOUT: %.loc24_3.271: ref %i32 = array_index %self.param, %int_9 +// CHECK:STDOUT: %Destroy.facet.loc24_3.181: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.272: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.181 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.182: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.273: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.182 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.91: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.91: init %empty_tuple.type = call %SelfDestruct.specific_fn.91(%.loc24_3.271) // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8] -// CHECK:STDOUT: %.loc24_3.92: ref %i32 = array_index %self.param, %int_8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.92: = bound_method %.loc24_3.92, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.92: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.92(%.loc24_3.92) +// CHECK:STDOUT: %.loc24_3.274: ref %i32 = array_index %self.param, %int_8 +// CHECK:STDOUT: %Destroy.facet.loc24_3.183: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.275: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.183 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.184: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.276: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.184 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.92: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.92: init %empty_tuple.type = call %SelfDestruct.specific_fn.92(%.loc24_3.274) // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7] -// CHECK:STDOUT: %.loc24_3.93: ref %i32 = array_index %self.param, %int_7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.93: = bound_method %.loc24_3.93, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.93: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.93(%.loc24_3.93) +// CHECK:STDOUT: %.loc24_3.277: ref %i32 = array_index %self.param, %int_7 +// CHECK:STDOUT: %Destroy.facet.loc24_3.185: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.278: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.185 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.186: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.279: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.186 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.93: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.93: init %empty_tuple.type = call %SelfDestruct.specific_fn.93(%.loc24_3.277) // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6] -// CHECK:STDOUT: %.loc24_3.94: ref %i32 = array_index %self.param, %int_6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.94: = bound_method %.loc24_3.94, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.94: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.94(%.loc24_3.94) +// CHECK:STDOUT: %.loc24_3.280: ref %i32 = array_index %self.param, %int_6 +// CHECK:STDOUT: %Destroy.facet.loc24_3.187: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.281: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.187 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.188: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.282: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.188 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.94: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.94: init %empty_tuple.type = call %SelfDestruct.specific_fn.94(%.loc24_3.280) // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] -// CHECK:STDOUT: %.loc24_3.95: ref %i32 = array_index %self.param, %int_5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.95: = bound_method %.loc24_3.95, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.95: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.95(%.loc24_3.95) +// CHECK:STDOUT: %.loc24_3.283: ref %i32 = array_index %self.param, %int_5 +// CHECK:STDOUT: %Destroy.facet.loc24_3.189: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.284: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.189 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.190: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.285: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.190 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.95: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.95: init %empty_tuple.type = call %SelfDestruct.specific_fn.95(%.loc24_3.283) // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] -// CHECK:STDOUT: %.loc24_3.96: ref %i32 = array_index %self.param, %int_4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.96: = bound_method %.loc24_3.96, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.96: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.96(%.loc24_3.96) +// CHECK:STDOUT: %.loc24_3.286: ref %i32 = array_index %self.param, %int_4 +// CHECK:STDOUT: %Destroy.facet.loc24_3.191: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.287: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.191 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.192: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.288: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.192 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.96: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.96: init %empty_tuple.type = call %SelfDestruct.specific_fn.96(%.loc24_3.286) // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %.loc24_3.97: ref %i32 = array_index %self.param, %int_3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.97: = bound_method %.loc24_3.97, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.97: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.97(%.loc24_3.97) +// CHECK:STDOUT: %.loc24_3.289: ref %i32 = array_index %self.param, %int_3 +// CHECK:STDOUT: %Destroy.facet.loc24_3.193: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.290: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.193 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.194: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.291: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.194 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.97: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.97: init %empty_tuple.type = call %SelfDestruct.specific_fn.97(%.loc24_3.289) // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %.loc24_3.98: ref %i32 = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.98: = bound_method %.loc24_3.98, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.98: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.98(%.loc24_3.98) +// CHECK:STDOUT: %.loc24_3.292: ref %i32 = array_index %self.param, %int_2 +// CHECK:STDOUT: %Destroy.facet.loc24_3.195: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.293: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.195 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.196: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.294: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.196 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.98: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.98: init %empty_tuple.type = call %SelfDestruct.specific_fn.98(%.loc24_3.292) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc24_3.99: ref %i32 = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.99: = bound_method %.loc24_3.99, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.99: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.99(%.loc24_3.99) +// CHECK:STDOUT: %.loc24_3.295: ref %i32 = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc24_3.197: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.296: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.197 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.198: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.297: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.198 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.99: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.99: init %empty_tuple.type = call %SelfDestruct.specific_fn.99(%.loc24_3.295) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc24_3.100: ref %i32 = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_3.100: = bound_method %.loc24_3.100, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_3.100: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_3.100(%.loc24_3.100) +// CHECK:STDOUT: %.loc24_3.298: ref %i32 = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc24_3.199: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.299: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.199 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc24_3.200: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc24_3.300: %Destroy.type = converted constants.%i32, %Destroy.facet.loc24_3.200 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.100: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc24_3.100: init %empty_tuple.type = call %SelfDestruct.specific_fn.100(%.loc24_3.298) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.746) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.746) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.3(%self.param: ref %struct_type.arr.a4f) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc24_3.1: ref %Array.746 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%Array.746, (constants.%DestroyImpl.impl_witness.1f1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.dda] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%Array.746, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.dda] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%Array.746, (constants.%DestroyImpl.impl_witness.1f1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.dda] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%Array.746, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.dda] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.dda) [concrete = constants.%SelfDestruct.specific_fn.09e] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc24_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.3(%self.param: ref %struct_type.arr.a4f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc24: ref %Array.746 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc24) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.3(%self.param: ref %struct_type.arr.a4f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.3(%self.param: ref %struct_type.arr.a4f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.4(%self.param: ref %C) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.4(%self.param: ref %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %arr.ref: %C.elem = name_ref arr, @C.%field_decl [concrete = @C.%field_decl] -// CHECK:STDOUT: %.loc24: ref %Array.746 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc24) +// CHECK:STDOUT: %.loc24_3.1: ref %Array.746 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%Array.746, (constants.%DestroyImpl.impl_witness.1f1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.dda] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%Array.746, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.dda] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%Array.746, (constants.%DestroyImpl.impl_witness.1f1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.dda] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%Array.746, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.dda] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.dda) [concrete = constants.%SelfDestruct.specific_fn.09e] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc24_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.4(%self.param: ref %C) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.4(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Wrap(constants.%T) { -// CHECK:STDOUT: %T.patt.loc15_13.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc15_13.1 => constants.%T +// CHECK:STDOUT: specific @Wrap(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc15_13.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc15_13.1 => constants.%T.67d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Wrap.Make.type => constants.%Wrap.Make.type.c47 // CHECK:STDOUT: %Wrap.Make => constants.%Wrap.Make.1b6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Wrap.Make(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @Wrap.Make(constants.%T.67d) { +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %.loc16_16.2 => constants.%.184 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: %return.param_patt.loc16_16.2 => constants.%return.param_patt.41d @@ -966,7 +1264,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Wrap(constants.%i32) { -// CHECK:STDOUT: %T.patt.loc15_13.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc15_13.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc15_13.1 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -989,7 +1287,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Wrap(constants.%empty_tuple.type) { -// CHECK:STDOUT: %T.patt.loc15_13.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc15_13.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc15_13.1 => constants.%empty_tuple.type // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1012,7 +1310,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Wrap(constants.%C) { -// CHECK:STDOUT: %T.patt.loc15_13.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc15_13.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc15_13.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/function/generic/type_param.carbon b/toolchain/check/testdata/function/generic/type_param.carbon index f30716962a58..4c97c904f9d1 100644 --- a/toolchain/check/testdata/function/generic/type_param.carbon +++ b/toolchain/check/testdata/function/generic/type_param.carbon @@ -23,8 +23,8 @@ fn F(generic T: type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -45,24 +45,27 @@ fn F(generic T: type) { // CHECK:STDOUT: %impl.elem0.7c1: %.8a2 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.44c: = specific_impl_function %impl.elem0.7c1, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet) [symbolic] // CHECK:STDOUT: %n.patt: %pattern_type.51d = value_binding_pattern n [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.86b: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet) [symbolic] -// CHECK:STDOUT: %.da6: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.86b, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem2: %.da6 = impl_witness_access %Destroy.lookup_impl_witness.781, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.4fd: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.b3f: %SubobjectDestroy.type = facet_value %ptr, (%SubobjectDestroy.lookup_impl_witness.61e) [symbolic] +// CHECK:STDOUT: %.fb8: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b3f) [symbolic] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr, (%DestroyImpl.lookup_impl_witness.18b, %SubobjectDestroy.lookup_impl_witness.61e) [symbolic] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -72,7 +75,7 @@ fn F(generic T: type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc15_15.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc15_15.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -83,7 +86,7 @@ fn F(generic T: type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc15_15.2: type) { -// CHECK:STDOUT: %T.patt.loc15_15.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc15_15.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_15.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %T.loc15_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_15.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -102,12 +105,12 @@ fn F(generic T: type) { // CHECK:STDOUT: %require_complete.loc17: = require_complete_type %T.loc15_15.1 [symbolic = %require_complete.loc17 (constants.%require_complete.944)] // CHECK:STDOUT: %pattern_type.loc17: type = pattern_type %T.loc15_15.1 [symbolic = %pattern_type.loc17 (constants.%pattern_type.51d)] // CHECK:STDOUT: %n.patt.loc17_15.2: @F.%pattern_type.loc17 (%pattern_type.51d) = value_binding_pattern n [symbolic = %n.patt.loc17_15.2 (constants.%n.patt)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.781)] -// CHECK:STDOUT: %Destroy.facet.loc16_3.3: %Destroy.type = facet_value %ptr.loc16_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc16_3.3 (constants.%Destroy.facet)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc16_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.86b)] -// CHECK:STDOUT: %.loc16_3.3: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc16_3.3 [symbolic = %.loc16_3.3 (constants.%.da6)] -// CHECK:STDOUT: %impl.elem2.loc16_3.2: @F.%.loc16_3.3 (%.da6) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc16_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc16_3.2: = specific_impl_function %impl.elem2.loc16_3.2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.loc16_3.3) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn.4fd)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_11.2, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.61e)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %ptr.loc16_11.2, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.b3f)] +// CHECK:STDOUT: %.loc16_3.3: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc16_3.3 (constants.%.fb8)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_11.2, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.18b)] +// CHECK:STDOUT: %Destroy.facet.loc16_3.3: %Destroy.type = facet_value %ptr.loc16_11.2, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc16_3.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(%Destroy.facet.loc16_3.3) [symbolic = %SelfDestruct.specific_fn.2 (constants.%SelfDestruct.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -138,21 +141,18 @@ fn F(generic T: type) { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %n.patt.loc17_15.1: @F.%pattern_type.loc17 (%pattern_type.51d) = value_binding_pattern n [symbolic = %n.patt.loc17_15.2 (constants.%n.patt)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem2.loc16_3.1: @F.%.loc16_3.3 (%.da6) = impl_witness_access constants.%Destroy.lookup_impl_witness.781, element2 [symbolic = %impl.elem2.loc16_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %p.var, %impl.elem2.loc16_3.1 -// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%ptr, (constants.%Destroy.lookup_impl_witness.781) [symbolic = %Destroy.facet.loc16_3.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%ptr, (constants.%DestroyImpl.lookup_impl_witness.18b, constants.%SubobjectDestroy.lookup_impl_witness.61e) [symbolic = %Destroy.facet.loc16_3.3 (constants.%Destroy.facet)] // CHECK:STDOUT: %.loc16_3.1: %Destroy.type = converted constants.%ptr, %Destroy.facet.loc16_3.1 [symbolic = %Destroy.facet.loc16_3.3 (constants.%Destroy.facet)] -// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%ptr, (constants.%Destroy.lookup_impl_witness.781) [symbolic = %Destroy.facet.loc16_3.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%ptr, (constants.%DestroyImpl.lookup_impl_witness.18b, constants.%SubobjectDestroy.lookup_impl_witness.61e) [symbolic = %Destroy.facet.loc16_3.3 (constants.%Destroy.facet)] // CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%ptr, %Destroy.facet.loc16_3.2 [symbolic = %Destroy.facet.loc16_3.3 (constants.%Destroy.facet)] -// CHECK:STDOUT: %specific_impl_fn.loc16_3.1: = specific_impl_function %impl.elem2.loc16_3.1, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn.4fd)] -// CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %p.var, %specific_impl_fn.loc16_3.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc16_3.2(%p.var) +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [symbolic = %SelfDestruct.specific_fn.2 (constants.%SelfDestruct.specific_fn)] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%p.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc15_15.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc15_15.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc15_15.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/call_basic_depth.carbon b/toolchain/check/testdata/generic/call_basic_depth.carbon index 24e2db2bca27..b4609fcab1f3 100644 --- a/toolchain/check/testdata/generic/call_basic_depth.carbon +++ b/toolchain/check/testdata/generic/call_basic_depth.carbon @@ -52,11 +52,11 @@ fn M() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %x.param_patt.91d: %pattern_type.51d = value_param_pattern [symbolic] // CHECK:STDOUT: %x.patt.26065e.1: %pattern_type.51d = wrapper_binding_pattern x, %x.param_patt.91d [symbolic] // CHECK:STDOUT: %C.Cfn.type: type = fn_type @C.Cfn [concrete] @@ -64,17 +64,17 @@ fn M() { // CHECK:STDOUT: %C.Cfn: %C.Cfn.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [symbolic] // CHECK:STDOUT: %x.patt.26065e.2: %pattern_type.51d = wrapper_binding_pattern x, %x.param_patt.91d [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %x.patt.26065e.3: %pattern_type.51d = wrapper_binding_pattern x, %x.param_patt.91d [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] -// CHECK:STDOUT: %F.specific_fn.c05: = specific_function %F, @F(%T) [symbolic] +// CHECK:STDOUT: %F.specific_fn.c05: = specific_function %F, @F(%T.67d) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %H.specific_fn.294: = specific_function %H, @H(%T) [symbolic] +// CHECK:STDOUT: %H.specific_fn.294: = specific_function %H, @H(%T.67d) [symbolic] // CHECK:STDOUT: %x.param_patt.0f9: %pattern_type.98b = value_param_pattern [concrete] // CHECK:STDOUT: %x.patt.953b21.1: %pattern_type.98b = wrapper_binding_pattern x, %x.param_patt.0f9 [concrete] // CHECK:STDOUT: %F.specific_fn.c73: = specific_function %F, @F(%C) [concrete] @@ -86,7 +86,7 @@ fn M() { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc19_7.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc19_7.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_7.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %x.param_patt.loc19_23.1: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc19_23.2 (constants.%x.param_patt.91d)] // CHECK:STDOUT: %x.patt.loc19_23.1: @F.%pattern_type (%pattern_type.51d) = wrapper_binding_pattern x, %x.param_patt.loc19_23.1 [symbolic = %x.patt.loc19_23.2 (constants.%x.patt.26065e.2)] // CHECK:STDOUT: } { @@ -94,16 +94,16 @@ fn M() { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc19_9.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc19_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc19_7.1 (constants.%T)] -// CHECK:STDOUT: %x.param: @F.%T.loc19_7.1 (%T) = value_param call_param0 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_7.2 [symbolic = %T.loc19_7.1 (constants.%T)] -// CHECK:STDOUT: %x: @F.%T.loc19_7.1 (%T) = wrapper_binding x, %x.param +// CHECK:STDOUT: %T.loc19_7.2: type = symbolic_binding T, 0 [symbolic = %T.loc19_7.1 (constants.%T.67d)] +// CHECK:STDOUT: %x.param: @F.%T.loc19_7.1 (%T.67d) = value_param call_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_7.2 [symbolic = %T.loc19_7.1 (constants.%T.67d)] +// CHECK:STDOUT: %x: @F.%T.loc19_7.1 (%T.67d) = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc19_7.2: type) { -// CHECK:STDOUT: %T.patt.loc19_7.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc19_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc19_7.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc19_7.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_7.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc19_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc19_7.1 (constants.%T.67d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc19_7.1 [symbolic = %pattern_type (constants.%pattern_type.51d)] // CHECK:STDOUT: %x.param_patt.loc19_23.2: @F.%pattern_type (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc19_23.2 (constants.%x.param_patt.91d)] // CHECK:STDOUT: %x.patt.loc19_23.2: @F.%pattern_type (%pattern_type.51d) = wrapper_binding_pattern x, %x.param_patt.loc19_23.2 [symbolic = %x.patt.loc19_23.2 (constants.%x.patt.26065e.2)] @@ -111,7 +111,7 @@ fn M() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc19_7.1 [symbolic = %require_complete (constants.%require_complete.944)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @F.%T.loc19_7.1 (%T)) { +// CHECK:STDOUT: fn(%x.param: @F.%T.loc19_7.1 (%T.67d)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -124,11 +124,11 @@ fn M() { // CHECK:STDOUT: // CHECK:STDOUT: %F.specific_fn.loc25_3.2: = specific_function constants.%F, @F(%T.loc23_7.1) [symbolic = %F.specific_fn.loc25_3.2 (constants.%F.specific_fn.c05)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @H.%T.loc23_7.1 (%T)) { +// CHECK:STDOUT: fn(%x.param: @H.%T.loc23_7.1 (%T.67d)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %x.ref: @H.%T.loc23_7.1 (%T) = name_ref x, %x -// CHECK:STDOUT: %F.specific_fn.loc25_3.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc25_3.2 (constants.%F.specific_fn.c05)] +// CHECK:STDOUT: %x.ref: @H.%T.loc23_7.1 (%T.67d) = name_ref x, %x +// CHECK:STDOUT: %F.specific_fn.loc25_3.1: = specific_function %F.ref, @F(constants.%T.67d) [symbolic = %F.specific_fn.loc25_3.2 (constants.%F.specific_fn.c05)] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc25_3.1(%x.ref) // CHECK:STDOUT: // CHECK:STDOUT: } @@ -143,15 +143,15 @@ fn M() { // CHECK:STDOUT: %F.specific_fn.loc32_3.2: = specific_function constants.%F, @F(%T.loc29_7.1) [symbolic = %F.specific_fn.loc32_3.2 (constants.%F.specific_fn.c05)] // CHECK:STDOUT: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @G.%T.loc29_7.1 (%T)) { +// CHECK:STDOUT: fn(%x.param: @G.%T.loc29_7.1 (%T.67d)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [concrete = constants.%H] -// CHECK:STDOUT: %x.ref.loc31: @G.%T.loc29_7.1 (%T) = name_ref x, %x -// CHECK:STDOUT: %H.specific_fn.loc31_3.1: = specific_function %H.ref, @H(constants.%T) [symbolic = %H.specific_fn.loc31_3.2 (constants.%H.specific_fn.294)] +// CHECK:STDOUT: %x.ref.loc31: @G.%T.loc29_7.1 (%T.67d) = name_ref x, %x +// CHECK:STDOUT: %H.specific_fn.loc31_3.1: = specific_function %H.ref, @H(constants.%T.67d) [symbolic = %H.specific_fn.loc31_3.2 (constants.%H.specific_fn.294)] // CHECK:STDOUT: %H.call: init %empty_tuple.type = call %H.specific_fn.loc31_3.1(%x.ref.loc31) // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %x.ref.loc32: @G.%T.loc29_7.1 (%T) = name_ref x, %x -// CHECK:STDOUT: %F.specific_fn.loc32_3.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc32_3.2 (constants.%F.specific_fn.c05)] +// CHECK:STDOUT: %x.ref.loc32: @G.%T.loc29_7.1 (%T.67d) = name_ref x, %x +// CHECK:STDOUT: %F.specific_fn.loc32_3.1: = specific_function %F.ref, @F(constants.%T.67d) [symbolic = %F.specific_fn.loc32_3.2 (constants.%F.specific_fn.c05)] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn.loc32_3.1(%x.ref.loc32) // CHECK:STDOUT: // CHECK:STDOUT: } @@ -173,9 +173,9 @@ fn M() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc19_7.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc19_7.1 => constants.%T.67d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: %x.param_patt.loc19_23.2 => constants.%x.param_patt.91d // CHECK:STDOUT: %x.patt.loc19_23.2 => constants.%x.patt.26065e.1 @@ -184,9 +184,9 @@ fn M() { // CHECK:STDOUT: %require_complete => constants.%require_complete.944 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @H(constants.%T) { -// CHECK:STDOUT: %T.patt.loc23_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc23_7.1 => constants.%T +// CHECK:STDOUT: specific @H(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc23_7.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc23_7.1 => constants.%T.67d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: %x.param_patt.loc23_16.2 => constants.%x.param_patt.91d // CHECK:STDOUT: %x.patt.loc23_16.2 => constants.%x.patt.26065e.3 @@ -196,16 +196,16 @@ fn M() { // CHECK:STDOUT: %F.specific_fn.loc25_3.2 => constants.%F.specific_fn.c05 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G(constants.%T) { -// CHECK:STDOUT: %T.patt.loc29_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc29_7.1 => constants.%T +// CHECK:STDOUT: specific @G(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc29_7.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc29_7.1 => constants.%T.67d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: %x.param_patt.loc29_16.2 => constants.%x.param_patt.91d // CHECK:STDOUT: %x.patt.loc29_16.2 => constants.%x.patt.26065e.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%C) { -// CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc19_7.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc19_7.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b // CHECK:STDOUT: %x.param_patt.loc19_23.2 => constants.%x.param_patt.0f9 @@ -216,7 +216,7 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%C) { -// CHECK:STDOUT: %T.patt.loc29_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc29_7.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc29_7.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b // CHECK:STDOUT: %x.param_patt.loc29_16.2 => constants.%x.param_patt.0f9 @@ -230,7 +230,7 @@ fn M() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @H(constants.%C) { -// CHECK:STDOUT: %T.patt.loc23_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc23_7.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc23_7.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.98b // CHECK:STDOUT: %x.param_patt.loc23_16.2 => constants.%x.param_patt.0f9 diff --git a/toolchain/check/testdata/generic/local.carbon b/toolchain/check/testdata/generic/local.carbon index 3b4e586b3944..6f2ed5a0ceea 100644 --- a/toolchain/check/testdata/generic/local.carbon +++ b/toolchain/check/testdata/generic/local.carbon @@ -51,15 +51,15 @@ class C(C: type) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = parameterized_class_name_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.3d5: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] -// CHECK:STDOUT: %C.elem.7c2: type = unbound_element_type %C.3d5, %T [symbolic] -// CHECK:STDOUT: %struct_type.x.0c5: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %C.3d5: type = class_type @C, @C(%T.67d) [symbolic] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [symbolic] +// CHECK:STDOUT: %C.elem.7c2: type = unbound_element_type %C.3d5, %T.67d [symbolic] +// CHECK:STDOUT: %struct_type.x.0c5: type = struct_type {.x: %T.67d} [symbolic] // CHECK:STDOUT: %complete_type.735: = complete_type_witness %struct_type.x.0c5 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = parameterized_class_name_type @Int [concrete] @@ -90,42 +90,38 @@ class C(C: type) { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %C.val: %C.347 = struct_value (%int_1.68a) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.38e: type = pattern_type %struct_type.x.991 [concrete] -// CHECK:STDOUT: %self.param_patt.eec: %pattern_type.38e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0ef: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt.eec [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.96d: %pattern_type.fdc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.165: %pattern_type.fdc = wrapper_binding_pattern self, %self.param_patt.96d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc8_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.244: %SubobjectDestroy.type = facet_value %C.347, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.605: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.244) [concrete] +// CHECK:STDOUT: %Destroy.facet.758: %Destroy.type = facet_value %C.347, (%DestroyImpl.impl_witness.605, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.360: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.758) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -133,52 +129,9 @@ class C(C: type) { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.38e = ref_param_pattern [concrete = constants.%self.param_patt.eec] -// CHECK:STDOUT: %self.patt: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0ef] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.x.991 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.x.991 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.38e = ref_param_pattern [concrete = constants.%self.param_patt.eec] -// CHECK:STDOUT: %self.patt: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0ef] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.x.991 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.x.991 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fdc = ref_param_pattern [concrete = constants.%self.param_patt.96d] -// CHECK:STDOUT: %self.patt: %pattern_type.fdc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.165] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.347 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.347 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc8_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fdc = ref_param_pattern [concrete = constants.%self.param_patt.96d] -// CHECK:STDOUT: %self.patt: %pattern_type.fdc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.165] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.347 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.347 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -191,19 +144,19 @@ class C(C: type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc5_12.2: type) { -// CHECK:STDOUT: %T.patt.loc5_12.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_12.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc5_12.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_12.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc5_12.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_12.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc5_12.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_12.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc5_12.1 [symbolic = %require_complete (constants.%require_complete.944)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc5_12.1) [symbolic = %C (constants.%C.3d5)] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %T.loc5_12.1 [symbolic = %C.elem (constants.%C.elem.7c2)] -// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T.loc5_12.1 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x.0c5)] +// CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @C.%T.loc5_12.1 (%T.67d)} [symbolic = %struct_type.x (constants.%struct_type.x.0c5)] // CHECK:STDOUT: %complete_type.loc7_3.2: = complete_type_witness %struct_type.x [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.735)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %field_decl: @C.%C.elem (%C.elem.7c2) = field_decl x, element0, %T.ref in [concrete] { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_12.2 [symbolic = %T.loc5_12.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_12.2 [symbolic = %T.loc5_12.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type.loc7_3.1: = complete_type_witness constants.%struct_type.x.0c5 [symbolic = %complete_type.loc7_3.2 (constants.%complete_type.735)] // CHECK:STDOUT: complete_type_witness = %complete_type.loc7_3.1 @@ -218,13 +171,13 @@ class C(C: type) { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { -// CHECK:STDOUT: %T.patt.loc5_12.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_12.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc5_12.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_12.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc5_14.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc5_12.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_12.1 (constants.%T)] +// CHECK:STDOUT: %T.loc5_12.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_12.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %C.347 = var_storage %v.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -238,8 +191,8 @@ class C(C: type) { // CHECK:STDOUT: %.loc8_33.3: ref %i32 = class_element_access %v.var, element0 // CHECK:STDOUT: %.loc8_33.4: init %i32 to %.loc8_33.3 = in_place_init %.loc8_33.2 [concrete = constants.%int_1.68a] // CHECK:STDOUT: %.loc8_33.5: init %C.347 to %v.var = class_init (%.loc8_33.4) [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc8_3: init %C.347 = converted %.loc8_33.1, %.loc8_33.5 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %v.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %C.347 = converted %.loc8_33.1, %.loc8_33.5 [concrete = constants.%C.val] +// CHECK:STDOUT: assign %v.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_22: type = splice_block %C [concrete = constants.%C.347] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -250,64 +203,49 @@ class C(C: type) { // CHECK:STDOUT: %v.patt: %pattern_type.fdc = ref_binding_pattern v [concrete = constants.%v.patt] // CHECK:STDOUT: %v.var_patt: %pattern_type.fdc = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%C.347, (constants.%DestroyImpl.impl_witness.605, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.758] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%C.347, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.758] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%C.347, (constants.%DestroyImpl.impl_witness.605, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.758] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%C.347, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.758] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.758) [concrete = constants.%SelfDestruct.specific_fn.360] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %struct_type.x.991) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc8_3.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %struct_type.x.991) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc8: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %struct_type.x.991) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %struct_type.x.991) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.3(%self.param: ref %C.347) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.3(%self.param: ref %C.347) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %C.elem.f95 = name_ref x, @C.%field_decl [concrete = @C.%field_decl] -// CHECK:STDOUT: %.loc8: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8) +// CHECK:STDOUT: %.loc8_3.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.3(%self.param: ref %C.347) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.3(%self.param: ref %C.347) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T) { -// CHECK:STDOUT: %T.patt.loc5_12.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc5_12.1 => constants.%T +// CHECK:STDOUT: specific @C(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc5_12.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc5_12.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { -// CHECK:STDOUT: %T.patt.loc5_12.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc5_12.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc5_12.1 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/generic/template/convert.carbon b/toolchain/check/testdata/generic/template/convert.carbon index cfbdd98a0b4b..3a935e1ff2fd 100644 --- a/toolchain/check/testdata/generic/template/convert.carbon +++ b/toolchain/check/testdata/generic/template/convert.carbon @@ -442,29 +442,25 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0, template [template] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0, template [template] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [template] -// CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T [template] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [template] +// CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T.67d [template] // CHECK:STDOUT: %w.patt.f6d: %pattern_type.51d1c4.1 = ref_binding_pattern w [template] // CHECK:STDOUT: %w.var_patt.7fe: %pattern_type.51d1c4.1 = var_pattern %w.patt.f6d [template] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %.38e: %T = splice_inst @F.%tuple.elem0 [template] +// CHECK:STDOUT: %.38e: %T.67d = splice_inst @F.%tuple.elem0 [template] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.869: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self.0e7) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.c97: %Destroy.WithSelf.SelfDestruct.type.869 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.df0 [concrete] -// CHECK:STDOUT: %.8cb: type = type_of_inst @F.%.loc6_3.8 [template] -// CHECK:STDOUT: %.c23: %.8cb = splice_inst @F.%.loc6_3.8 [template] -// CHECK:STDOUT: %.57c: type = type_of_inst @F.%.loc6_3.11 [template] -// CHECK:STDOUT: %.e63: %.57c = splice_inst @F.%.loc6_3.11 [template] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %.08d: type = type_of_inst @F.%.loc6_3.6 [template] +// CHECK:STDOUT: %.295: %.08d = splice_inst @F.%.loc6_3.6 [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] @@ -496,122 +492,90 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%inst.splice_block.426619.1) [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f: = custom_witness (%Destroy.WithSelf.Op.403, %Destroy.WithSelf.SubobjectDestroy.d01, %Destroy.WithSelf.SelfDestruct.db3), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.ed0: %Destroy.type = facet_value %i32, (%custom_witness.f8f) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.648: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.ed0) [concrete] -// CHECK:STDOUT: %.d2d: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.648, %Destroy.facet.ed0 [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b307.1: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.2: = inst_value [concrete] { -// CHECK:STDOUT: %.3c7: = splice_block %bound_method.18d { +// CHECK:STDOUT: %.274: init %empty_tuple.type = splice_block %SelfDestruct.call { // CHECK:STDOUT: %.fc4: ref %i32 = specific_inst @F.%w.var, @F(%i32) -// CHECK:STDOUT: %impl.elem2: %.d2d = impl_witness_access %custom_witness.f8f, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3] -// CHECK:STDOUT: %bound_method.18d: = bound_method %.fc4, %impl.elem2 +// CHECK:STDOUT: %Destroy.facet.c2b307.2: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete = %Destroy.facet.c2b307.1] +// CHECK:STDOUT: %.e9d4d1.1: %Destroy.type = converted %i32, %Destroy.facet.c2b307.2 [concrete = %Destroy.facet.c2b307.1] +// CHECK:STDOUT: %Destroy.facet.c2b307.3: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete = %Destroy.facet.c2b307.1] +// CHECK:STDOUT: %.e9d4d1.2: %Destroy.type = converted %i32, %Destroy.facet.c2b307.3 [concrete = %Destroy.facet.c2b307.1] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.845230.2(%.fc4) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %.3c7(%.fc4) -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.df0: @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct.type (%Destroy.WithSelf.SelfDestruct.type.869) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct (constants.%Destroy.WithSelf.SelfDestruct.c97)] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc6 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc5_16.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc5_16.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc5_18.1: type = splice_block %.loc5_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc5_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc5_16.2: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T)] +// CHECK:STDOUT: %T.loc5_16.2: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc5_16.2: type) { -// CHECK:STDOUT: %T.patt.loc5_16.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc5_16.1: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc5_16.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc5_16.1: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc5_16.1 [template = %require_complete (constants.%require_complete.944)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc5_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)] // CHECK:STDOUT: %w.patt.loc6_15.2: @F.%pattern_type (%pattern_type.51d1c4.1) = ref_binding_pattern w [template = %w.patt.loc6_15.2 (constants.%w.patt.f6d)] // CHECK:STDOUT: %w.var_patt.loc6_3.2: @F.%pattern_type (%pattern_type.51d1c4.1) = var_pattern %w.patt.loc6_15.2 [template = %w.var_patt.loc6_3.2 (constants.%w.var_patt.7fe)] -// CHECK:STDOUT: %.loc6_3.6: %tuple.type = initialize_action %int_0, %T.loc5_16.1, %w.var, none, false [template] -// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc6_3.6, element0 [template] -// CHECK:STDOUT: %.loc6_3.7: @F.%T.loc5_16.1 (%T) = splice_inst %tuple.elem0 [template = %.loc6_3.7 (constants.%.38e)] -// CHECK:STDOUT: %.loc6_3.8: = compound_member_access_action %w.var, constants.%assoc2 [template] -// CHECK:STDOUT: %.loc6_3.9: type = type_of_inst %.loc6_3.8 [template = %.loc6_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc6_3.10: @F.%.loc6_3.9 (%.8cb) = splice_inst %.loc6_3.8 [template = %.loc6_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc6_3.11: = call_action (%.loc6_3.3), true [template] -// CHECK:STDOUT: %.loc6_3.12: type = type_of_inst %.loc6_3.11 [template = %.loc6_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc6_3.13: @F.%.loc6_3.12 (%.57c) = splice_inst %.loc6_3.11 [template = %.loc6_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc6_3.4: %tuple.type = initialize_action %int_0, %T.loc5_16.1, %w.var, none, false [template] +// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc6_3.4, element0 [template] +// CHECK:STDOUT: %.loc6_3.5: @F.%T.loc5_16.1 (%T.67d) = splice_inst %tuple.elem0 [template = %.loc6_3.5 (constants.%.38e)] +// CHECK:STDOUT: %.loc6_3.6: = call_action (constants.%SelfDestruct, %w.var), true [template] +// CHECK:STDOUT: %.loc6_3.7: type = type_of_inst %.loc6_3.6 [template = %.loc6_3.7 (constants.%.08d)] +// CHECK:STDOUT: %.loc6_3.8: @F.%.loc6_3.7 (%.08d) = splice_inst %.loc6_3.6 [template = %.loc6_3.8 (constants.%.295)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %w.var: ref @F.%T.loc5_16.1 (%T) = var_storage %w.var_patt.loc6_3.1 +// CHECK:STDOUT: %w.var: ref @F.%T.loc5_16.1 (%T.67d) = var_storage %w.var_patt.loc6_3.1 // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc6_3.1: @F.%T.loc5_16.1 (%T) = splice_inst %tuple.elem0 [template = %.loc6_3.7 (constants.%.38e)] +// CHECK:STDOUT: %.loc6_3.1: @F.%T.loc5_16.1 (%T.67d) = splice_inst %tuple.elem0 [template = %.loc6_3.5 (constants.%.38e)] // CHECK:STDOUT: assign %w.var, %.loc6_3.1 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T)] -// CHECK:STDOUT: %w: ref @F.%T.loc5_16.1 (%T) = wrapper_binding w, %w.var +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc5_16.2 [template = %T.loc5_16.1 (constants.%T.67d)] +// CHECK:STDOUT: %w: ref @F.%T.loc5_16.1 (%T.67d) = wrapper_binding w, %w.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %w.patt.loc6_15.1: @F.%pattern_type (%pattern_type.51d1c4.1) = ref_binding_pattern w [template = %w.patt.loc6_15.2 (constants.%w.patt.f6d)] // CHECK:STDOUT: %w.var_patt.loc6_3.1: @F.%pattern_type (%pattern_type.51d1c4.1) = var_pattern %w.patt.loc6_15.1 [template = %w.var_patt.loc6_3.2 (constants.%w.var_patt.7fe)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_3.2: type = type_of_inst %.loc6_3.8 [template = %.loc6_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc6_3.3: @F.%.loc6_3.9 (%.8cb) = splice_inst %.loc6_3.8 [template = %.loc6_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc6_3.4: type = type_of_inst %.loc6_3.11 [template = %.loc6_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc6_3.5: @F.%.loc6_3.12 (%.57c) = splice_inst %.loc6_3.11 [template = %.loc6_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc6_3.2: type = type_of_inst %.loc6_3.6 [template = %.loc6_3.7 (constants.%.08d)] +// CHECK:STDOUT: %.loc6_3.3: @F.%.loc6_3.7 (%.08d) = splice_inst %.loc6_3.6 [template = %.loc6_3.8 (constants.%.295)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc6(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc5_16.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc5_16.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc5_16.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc5_16.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%i32) { -// CHECK:STDOUT: %T.patt.loc5_16.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc5_16.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc5_16.1 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -619,15 +583,12 @@ fn Run() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d94 // CHECK:STDOUT: %w.patt.loc6_15.2 => constants.%w.patt.26c // CHECK:STDOUT: %w.var_patt.loc6_3.2 => constants.%w.var_patt.4a6 -// CHECK:STDOUT: %.loc6_3.6 => constants.%tuple +// CHECK:STDOUT: %.loc6_3.4 => constants.%tuple // CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.1 -// CHECK:STDOUT: %.loc6_3.7 => constants.%int_0.753 -// CHECK:STDOUT: %.loc6_3.8 => constants.%inst.splice_block.426619.2 -// CHECK:STDOUT: %.loc6_3.9 => -// CHECK:STDOUT: %.loc6_3.10 => -// CHECK:STDOUT: %.loc6_3.11 => constants.%inst.call -// CHECK:STDOUT: %.loc6_3.12 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc6_3.13 => +// CHECK:STDOUT: %.loc6_3.5 => constants.%int_0.753 +// CHECK:STDOUT: %.loc6_3.6 => constants.%inst.splice_block.426619.2 +// CHECK:STDOUT: %.loc6_3.7 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc6_3.8 => // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- initialize_primitive.carbon @@ -635,8 +596,8 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template] // CHECK:STDOUT: %T.67db0b.1: type = symbolic_binding T, 0, template [template] // CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T.67db0b.1 [template] // CHECK:STDOUT: %x.param_patt.91d: %pattern_type.51d1c4.1 = value_param_pattern [template] @@ -655,14 +616,17 @@ fn Run() { // CHECK:STDOUT: %w.var_patt: %pattern_type.d94 = var_pattern %w.patt [concrete] // CHECK:STDOUT: %tuple.type.f7a: type = tuple_type () [concrete] // CHECK:STDOUT: %.318: %i32 = splice_inst @F.%tuple.elem0 [template] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] // CHECK:STDOUT: %x.param_patt.051: %pattern_type.d94 = value_param_pattern [concrete] // CHECK:STDOUT: %x.patt.0f7: %pattern_type.d94 = wrapper_binding_pattern x, %x.param_patt.051 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] @@ -689,30 +653,15 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc6 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc5_16.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.patt.loc5_16.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %x.param_patt.loc5_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc5_25.2 (constants.%x.param_patt.91d)] // CHECK:STDOUT: %x.patt.loc5_25.1: @F.%pattern_type (%pattern_type.51d1c4.1) = wrapper_binding_pattern x, %x.param_patt.loc5_25.1 [template = %x.patt.loc5_25.2 (constants.%x.patt.260)] // CHECK:STDOUT: } { @@ -728,7 +677,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc5_16.2: type) { -// CHECK:STDOUT: %T.patt.loc5_16.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.patt.loc5_16.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc5_16.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %T.loc5_16.1: type = symbolic_binding T, 0, template [template = %T.loc5_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc5_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)] // CHECK:STDOUT: %x.param_patt.loc5_25.2: @F.%pattern_type (%pattern_type.51d1c4.1) = value_param_pattern [template = %x.param_patt.loc5_25.2 (constants.%x.param_patt.91d)] @@ -736,15 +685,15 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc5_16.1 [template = %require_complete (constants.%require_complete.944)] -// CHECK:STDOUT: %.loc6_3.2: %tuple.type.f7a = initialize_action %x.ref, constants.%i32, %w.var, none, false [template] -// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc6_3.2, element0 [template] -// CHECK:STDOUT: %.loc6_3.3: %i32 = splice_inst %tuple.elem0 [template = %.loc6_3.3 (constants.%.318)] +// CHECK:STDOUT: %.loc6_3.4: %tuple.type.f7a = initialize_action %x.ref, constants.%i32, %w.var, none, false [template] +// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc6_3.4, element0 [template] +// CHECK:STDOUT: %.loc6_3.5: %i32 = splice_inst %tuple.elem0 [template = %.loc6_3.5 (constants.%.318)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @F.%T.loc5_16.1 (%T.67db0b.1)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %w.var: ref %i32 = var_storage %w.var_patt // CHECK:STDOUT: %x.ref: @F.%T.loc5_16.1 (%T.67db0b.1) = name_ref x, %x -// CHECK:STDOUT: %.loc6_3.1: %i32 = splice_inst %tuple.elem0 [template = %.loc6_3.3 (constants.%.318)] +// CHECK:STDOUT: %.loc6_3.1: %i32 = splice_inst %tuple.elem0 [template = %.loc6_3.5 (constants.%.318)] // CHECK:STDOUT: assign %w.var, %.loc6_3.1 // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %w: ref %i32 = wrapper_binding w, %w.var @@ -752,22 +701,17 @@ fn Run() { // CHECK:STDOUT: %w.patt: %pattern_type.d94 = ref_binding_pattern w [concrete = constants.%w.patt] // CHECK:STDOUT: %w.var_patt: %pattern_type.d94 = var_pattern %w.patt [concrete = constants.%w.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %w.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%w.var) +// CHECK:STDOUT: %Destroy.facet.loc6_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc6_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc6_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc6_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc6_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%w.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc6(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc6(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc6(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc6(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67db0b.1) { // CHECK:STDOUT: %T.patt.loc5_16.2 => constants.%T.patt.3a0592.1 @@ -786,9 +730,9 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a -// CHECK:STDOUT: %.loc6_3.2 => constants.%tuple.242 +// CHECK:STDOUT: %.loc6_3.4 => constants.%tuple.242 // CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block -// CHECK:STDOUT: %.loc6_3.3 => +// CHECK:STDOUT: %.loc6_3.5 => // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- initialize_from_tuple.carbon @@ -798,13 +742,12 @@ fn Run() { // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %pattern_type.6cb: type = pattern_type %X [concrete] // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template] // CHECK:STDOUT: %T.67db0b.1: type = symbolic_binding T, 0, template [template] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] @@ -818,16 +761,12 @@ fn Run() { // CHECK:STDOUT: %.c57: %X = splice_inst @F.%tuple.elem2 [template] // CHECK:STDOUT: %.ceb: %X = splice_inst @F.%tuple.elem3 [template] // CHECK:STDOUT: %.b00: %T.67db0b.1 = splice_inst @F.%tuple.elem0 [template] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.869: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self.0e7) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.c97: %Destroy.WithSelf.SelfDestruct.type.869 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.df0 [concrete] -// CHECK:STDOUT: %.8cb: type = type_of_inst @F.%.loc9_3.14 [template] -// CHECK:STDOUT: %.c23: %.8cb = splice_inst @F.%.loc9_3.14 [template] -// CHECK:STDOUT: %.57c: type = type_of_inst @F.%.loc9_3.17 [template] -// CHECK:STDOUT: %.e63: %.57c = splice_inst @F.%.loc9_3.17 [template] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %.08d: type = type_of_inst @F.%.loc9_3.12 [template] +// CHECK:STDOUT: %.295: %.08d = splice_inst @F.%.loc9_3.12 [template] // CHECK:STDOUT: %Y: type = class_type @Y [concrete] // CHECK:STDOUT: %ImplicitAs.type.2cb: type = facet_type <@ImplicitAs, @ImplicitAs(%Y)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness @tuple.type.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] @@ -858,46 +797,35 @@ fn Run() { // CHECK:STDOUT: %tuple.elem2: ref %X = tuple_access %.7189bc.2, element2 // CHECK:STDOUT: } // CHECK:STDOUT: %tuple.1ed7a0.1: %tuple.type.f39 = tuple_value (%inst.tuple_init, %inst.splice_block.426619.1, %inst.tuple_access.426619.1, %inst.tuple_access.426619.2) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b09: %pattern_type.eca = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6d4: %pattern_type.eca = wrapper_binding_pattern self, %self.param_patt.b09 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] // CHECK:STDOUT: %int_2.ecc8af.1: Core.IntLiteral = int_value 2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc5) [concrete] +// CHECK:STDOUT: %Destroy.facet.689: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.e12, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %int_1.5b8115.1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_0.5c61a1.1: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.3: = custom_witness (%Destroy.WithSelf.Op.403171.3, %Destroy.WithSelf.SubobjectDestroy.d01daf.3, %Destroy.WithSelf.SelfDestruct.db3fdb.3), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.51e: %Destroy.type = facet_value %tuple.type.92e, (%custom_witness.f8f19d.3) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.0b2: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.51e) [concrete] -// CHECK:STDOUT: %.095: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.0b2, %Destroy.facet.51e [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.795: %SubobjectDestroy.type = facet_value %tuple.type.92e, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b9c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.795) [concrete] +// CHECK:STDOUT: %Destroy.facet.59ea6e.1: %Destroy.type = facet_value %tuple.type.92e, (%DestroyImpl.impl_witness.b9c, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.2: = inst_value [concrete] { -// CHECK:STDOUT: %.8f6: = splice_block %bound_method.649 { +// CHECK:STDOUT: %.e19: init %empty_tuple.type = splice_block %SelfDestruct.call.0eb { // CHECK:STDOUT: %.7189bc.1: ref %tuple.type.92e = specific_inst @F.%w.var, @F(%tuple.type.92e) -// CHECK:STDOUT: %impl.elem2.23d: %.095 = impl_witness_access %custom_witness.f8f19d.3, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.3] -// CHECK:STDOUT: %bound_method.649: = bound_method %.7189bc.1, %impl.elem2.23d +// CHECK:STDOUT: %Destroy.facet.59ea6e.2: %Destroy.type = facet_value %tuple.type.92e, (%DestroyImpl.impl_witness.b9c, %custom_witness.b80ef6.3) [concrete = %Destroy.facet.59ea6e.1] +// CHECK:STDOUT: %.83ae9b.1: %Destroy.type = converted %tuple.type.92e, %Destroy.facet.59ea6e.2 [concrete = %Destroy.facet.59ea6e.1] +// CHECK:STDOUT: %Destroy.facet.59ea6e.3: %Destroy.type = facet_value %tuple.type.92e, (%DestroyImpl.impl_witness.b9c, %custom_witness.b80ef6.3) [concrete = %Destroy.facet.59ea6e.1] +// CHECK:STDOUT: %.83ae9b.2: %Destroy.type = converted %tuple.type.92e, %Destroy.facet.59ea6e.3 [concrete = %Destroy.facet.59ea6e.1] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.0eb: init %empty_tuple.type = call %SelfDestruct.specific_fn.d82e5e.2(%.7189bc.1) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call.426619.1: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.60b: init %empty_tuple.type = call %.8f6(%.7189bc.1) -// CHECK:STDOUT: } // CHECK:STDOUT: %array_type.4c0: type = array_type %int_3, %X [concrete] // CHECK:STDOUT: %complete_type.3e8: = complete_type_witness %array_type.4c0 [concrete] // CHECK:STDOUT: %pattern_type.573: type = pattern_type %Array.2ee [concrete] @@ -926,35 +854,30 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %tuple.1ed7a0.2: %tuple.type.f39 = tuple_value (%inst.array_init, %inst.splice_block.426619.3, %inst.splice_block.426619.4, %inst.splice_block.426619.5) [concrete] -// CHECK:STDOUT: %self.param_patt.81d: %pattern_type.573 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f89: %pattern_type.573 = wrapper_binding_pattern self, %self.param_patt.81d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc9_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.4: = custom_witness (%Destroy.WithSelf.Op.403171.4, %Destroy.WithSelf.SubobjectDestroy.d01daf.4, %Destroy.WithSelf.SelfDestruct.db3fdb.4), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.865: %Destroy.type = facet_value %Array.2ee, (%custom_witness.f8f19d.4) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.75fe: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.865) [concrete] -// CHECK:STDOUT: %.a3a: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.75fe, %Destroy.facet.865 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f91: %SubobjectDestroy.type = facet_value %Array.2ee, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.694: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f91) [concrete] +// CHECK:STDOUT: %Destroy.facet.c738c0.1: %Destroy.type = facet_value %Array.2ee, (%DestroyImpl.impl_witness.694, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.6: = inst_value [concrete] { -// CHECK:STDOUT: %.636: = splice_block %bound_method.8fb { +// CHECK:STDOUT: %.267: init %empty_tuple.type = splice_block %SelfDestruct.call.22f { // CHECK:STDOUT: %.be1f7d.1: ref %Array.2ee = specific_inst @F.%w.var, @F(%Array.2ee) -// CHECK:STDOUT: %impl.elem2.fc9: %.a3a = impl_witness_access %custom_witness.f8f19d.4, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.4] -// CHECK:STDOUT: %bound_method.8fb: = bound_method %.be1f7d.1, %impl.elem2.fc9 +// CHECK:STDOUT: %Destroy.facet.c738c0.2: %Destroy.type = facet_value %Array.2ee, (%DestroyImpl.impl_witness.694, %custom_witness.b80ef6.4) [concrete = %Destroy.facet.c738c0.1] +// CHECK:STDOUT: %.6310dc.1: %Destroy.type = converted %Array.2ee, %Destroy.facet.c738c0.2 [concrete = %Destroy.facet.c738c0.1] +// CHECK:STDOUT: %Destroy.facet.c738c0.3: %Destroy.type = facet_value %Array.2ee, (%DestroyImpl.impl_witness.694, %custom_witness.b80ef6.4) [concrete = %Destroy.facet.c738c0.1] +// CHECK:STDOUT: %.6310dc.2: %Destroy.type = converted %Array.2ee, %Destroy.facet.c738c0.3 [concrete = %Destroy.facet.c738c0.1] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.22f: init %empty_tuple.type = call %SelfDestruct.specific_fn.77fca3.2(%.be1f7d.1) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call.426619.2: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.21b: init %empty_tuple.type = call %.636(%.be1f7d.1) -// CHECK:STDOUT: } // CHECK:STDOUT: %w.patt.22a: %pattern_type.7ab = ref_binding_pattern w [concrete] // CHECK:STDOUT: %w.var_patt.565: %pattern_type.7ab = var_pattern %w.patt.22a [concrete] // CHECK:STDOUT: %.321: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.c71, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %inst.splice_block.426619.7: = inst_value [concrete] { // CHECK:STDOUT: %.897: init %Y = splice_block %tuple.type.as.ImplicitAs.impl.Convert.call { // CHECK:STDOUT: %impl.elem0.4aa: %.321 = impl_witness_access %ImplicitAs.impl_witness, element0 [concrete = %tuple.type.as.ImplicitAs.impl.Convert] -// CHECK:STDOUT: %bound_method.454: = bound_method @F.%.loc9_44, %impl.elem0.4aa +// CHECK:STDOUT: %bound_method: = bound_method @F.%.loc9_44, %impl.elem0.4aa // CHECK:STDOUT: %.12a9d9.2: ref %Y = specific_inst @F.%w.var, @F(%Y) // CHECK:STDOUT: %.71d: ref %X = temporary @F.%.loc9_3.1, @F.%Make.call.loc9_27 // CHECK:STDOUT: %.173: %X = acquire_value %.71d @@ -964,7 +887,7 @@ fn Run() { // CHECK:STDOUT: %.eee: %X = acquire_value %.55f // CHECK:STDOUT: %tuple.9aa: %tuple.type.92e = tuple_value (%.173, %.f2a, %.eee) // CHECK:STDOUT: %.1f9: %tuple.type.92e = converted @F.%.loc9_44, %tuple.9aa -// CHECK:STDOUT: %tuple.type.as.ImplicitAs.impl.Convert.call: init %Y to %.12a9d9.2 = call %bound_method.454(%.1f9) +// CHECK:STDOUT: %tuple.type.as.ImplicitAs.impl.Convert.call: init %Y to %.12a9d9.2 = call %bound_method(%.1f9) // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %inst.temporary_storage.426619.1: = inst_value [concrete] { @@ -977,110 +900,33 @@ fn Run() { // CHECK:STDOUT: %.7a56fd.3: ref %X = temporary_storage // CHECK:STDOUT: } // CHECK:STDOUT: %tuple.1ed7a0.3: %tuple.type.f39 = tuple_value (%inst.splice_block.426619.7, %inst.temporary_storage.426619.1, %inst.temporary_storage.426619.2, %inst.temporary_storage.426619.3) [concrete] -// CHECK:STDOUT: %self.param_patt.1fb: %pattern_type.7ab = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eee: %pattern_type.7ab = wrapper_binding_pattern self, %self.param_patt.1fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc9_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.5: = custom_witness (%Destroy.WithSelf.Op.403171.5, %Destroy.WithSelf.SubobjectDestroy.d01daf.5, %Destroy.WithSelf.SelfDestruct.db3fdb.5), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.09f: %Destroy.type = facet_value %Y, (%custom_witness.f8f19d.5) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.062: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.09f) [concrete] -// CHECK:STDOUT: %.e55: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.062, %Destroy.facet.09f [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.8db: %SubobjectDestroy.type = facet_value %Y, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a90: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.8db) [concrete] +// CHECK:STDOUT: %Destroy.facet.9118c8.1: %Destroy.type = facet_value %Y, (%DestroyImpl.impl_witness.a90, %custom_witness.b80ef6.5) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.8: = inst_value [concrete] { -// CHECK:STDOUT: %.c75: = splice_block %bound_method.d1a { +// CHECK:STDOUT: %.bca: init %empty_tuple.type = splice_block %SelfDestruct.call.4c5 { // CHECK:STDOUT: %.12a9d9.1: ref %Y = specific_inst @F.%w.var, @F(%Y) -// CHECK:STDOUT: %impl.elem2.f87: %.e55 = impl_witness_access %custom_witness.f8f19d.5, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.5] -// CHECK:STDOUT: %bound_method.d1a: = bound_method %.12a9d9.1, %impl.elem2.f87 +// CHECK:STDOUT: %Destroy.facet.9118c8.2: %Destroy.type = facet_value %Y, (%DestroyImpl.impl_witness.a90, %custom_witness.b80ef6.5) [concrete = %Destroy.facet.9118c8.1] +// CHECK:STDOUT: %.236ffe.1: %Destroy.type = converted %Y, %Destroy.facet.9118c8.2 [concrete = %Destroy.facet.9118c8.1] +// CHECK:STDOUT: %Destroy.facet.9118c8.3: %Destroy.type = facet_value %Y, (%DestroyImpl.impl_witness.a90, %custom_witness.b80ef6.5) [concrete = %Destroy.facet.9118c8.1] +// CHECK:STDOUT: %.236ffe.2: %Destroy.type = converted %Y, %Destroy.facet.9118c8.3 [concrete = %Destroy.facet.9118c8.1] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.4c5: init %empty_tuple.type = call %SelfDestruct.specific_fn.2cfc50.2(%.12a9d9.1) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call.426619.3: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.38e: init %empty_tuple.type = call %.c75(%.12a9d9.1) -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.df0: @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct.type (%Destroy.WithSelf.SelfDestruct.type.869) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct (constants.%Destroy.WithSelf.SelfDestruct.c97)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.eca = ref_param_pattern [concrete = constants.%self.param_patt.b09] -// CHECK:STDOUT: %self.patt: %pattern_type.eca = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6d4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.92e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.92e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.eca = ref_param_pattern [concrete = constants.%self.param_patt.b09] -// CHECK:STDOUT: %self.patt: %pattern_type.eca = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6d4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.92e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.92e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.573 = ref_param_pattern [concrete = constants.%self.param_patt.81d] -// CHECK:STDOUT: %self.patt: %pattern_type.573 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f89] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.2ee = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.2ee = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc9_3.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.573 = ref_param_pattern [concrete = constants.%self.param_patt.81d] -// CHECK:STDOUT: %self.patt: %pattern_type.573 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f89] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.2ee = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.2ee = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7ab = ref_param_pattern [concrete = constants.%self.param_patt.1fb] -// CHECK:STDOUT: %self.patt: %pattern_type.7ab = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eee] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc9_3.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7ab = ref_param_pattern [concrete = constants.%self.param_patt.1fb] -// CHECK:STDOUT: %self.patt: %pattern_type.7ab = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eee] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc8_16.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.patt.loc8_16.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -1091,7 +937,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc8_16.2: type) { -// CHECK:STDOUT: %T.patt.loc8_16.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.patt.loc8_16.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %T.loc8_16.1: type = symbolic_binding T, 0, template [template = %T.loc8_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1099,36 +945,33 @@ fn Run() { // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc8_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)] // CHECK:STDOUT: %w.patt.loc9_15.2: @F.%pattern_type (%pattern_type.51d1c4.1) = ref_binding_pattern w [template = %w.patt.loc9_15.2 (constants.%w.patt.f6d)] // CHECK:STDOUT: %w.var_patt.loc9_3.2: @F.%pattern_type (%pattern_type.51d1c4.1) = var_pattern %w.patt.loc9_15.2 [template = %w.var_patt.loc9_3.2 (constants.%w.var_patt.7fe)] -// CHECK:STDOUT: %.loc9_3.9: %tuple.type.f39 = initialize_action %.loc9_44, %T.loc8_16.1, %w.var, none, false [template] -// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc9_3.9, element0 [template] -// CHECK:STDOUT: %tuple.elem1: = tuple_access %.loc9_3.9, element1 [template] -// CHECK:STDOUT: %.loc9_3.10: %X = splice_inst %tuple.elem1 [template = %.loc9_3.10 (constants.%.4e3)] -// CHECK:STDOUT: %tuple.elem2: = tuple_access %.loc9_3.9, element2 [template] -// CHECK:STDOUT: %.loc9_3.11: %X = splice_inst %tuple.elem2 [template = %.loc9_3.11 (constants.%.c57)] -// CHECK:STDOUT: %tuple.elem3: = tuple_access %.loc9_3.9, element3 [template] -// CHECK:STDOUT: %.loc9_3.12: %X = splice_inst %tuple.elem3 [template = %.loc9_3.12 (constants.%.ceb)] -// CHECK:STDOUT: %.loc9_3.13: @F.%T.loc8_16.1 (%T.67db0b.1) = splice_inst %tuple.elem0 [template = %.loc9_3.13 (constants.%.b00)] -// CHECK:STDOUT: %.loc9_3.14: = compound_member_access_action %w.var, constants.%assoc2 [template] -// CHECK:STDOUT: %.loc9_3.15: type = type_of_inst %.loc9_3.14 [template = %.loc9_3.15 (constants.%.8cb)] -// CHECK:STDOUT: %.loc9_3.16: @F.%.loc9_3.15 (%.8cb) = splice_inst %.loc9_3.14 [template = %.loc9_3.16 (constants.%.c23)] -// CHECK:STDOUT: %.loc9_3.17: = call_action (%.loc9_3.6), true [template] -// CHECK:STDOUT: %.loc9_3.18: type = type_of_inst %.loc9_3.17 [template = %.loc9_3.18 (constants.%.57c)] -// CHECK:STDOUT: %.loc9_3.19: @F.%.loc9_3.18 (%.57c) = splice_inst %.loc9_3.17 [template = %.loc9_3.19 (constants.%.e63)] +// CHECK:STDOUT: %.loc9_3.7: %tuple.type.f39 = initialize_action %.loc9_44, %T.loc8_16.1, %w.var, none, false [template] +// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc9_3.7, element0 [template] +// CHECK:STDOUT: %tuple.elem1: = tuple_access %.loc9_3.7, element1 [template] +// CHECK:STDOUT: %.loc9_3.8: %X = splice_inst %tuple.elem1 [template = %.loc9_3.8 (constants.%.4e3)] +// CHECK:STDOUT: %tuple.elem2: = tuple_access %.loc9_3.7, element2 [template] +// CHECK:STDOUT: %.loc9_3.9: %X = splice_inst %tuple.elem2 [template = %.loc9_3.9 (constants.%.c57)] +// CHECK:STDOUT: %tuple.elem3: = tuple_access %.loc9_3.7, element3 [template] +// CHECK:STDOUT: %.loc9_3.10: %X = splice_inst %tuple.elem3 [template = %.loc9_3.10 (constants.%.ceb)] +// CHECK:STDOUT: %.loc9_3.11: @F.%T.loc8_16.1 (%T.67db0b.1) = splice_inst %tuple.elem0 [template = %.loc9_3.11 (constants.%.b00)] +// CHECK:STDOUT: %.loc9_3.12: = call_action (constants.%SelfDestruct, %w.var), true [template] +// CHECK:STDOUT: %.loc9_3.13: type = type_of_inst %.loc9_3.12 [template = %.loc9_3.13 (constants.%.08d)] +// CHECK:STDOUT: %.loc9_3.14: @F.%.loc9_3.13 (%.08d) = splice_inst %.loc9_3.12 [template = %.loc9_3.14 (constants.%.295)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %w.var: ref @F.%T.loc8_16.1 (%T.67db0b.1) = var_storage %w.var_patt.loc9_3.1 // CHECK:STDOUT: %Make.ref.loc9_22: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] -// CHECK:STDOUT: %.loc9_3.1: %X = splice_inst %tuple.elem1 [template = %.loc9_3.10 (constants.%.4e3)] +// CHECK:STDOUT: %.loc9_3.1: %X = splice_inst %tuple.elem1 [template = %.loc9_3.8 (constants.%.4e3)] // CHECK:STDOUT: %Make.call.loc9_27: init %X to %.loc9_3.1 = call %Make.ref.loc9_22() // CHECK:STDOUT: %Make.ref.loc9_30: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] -// CHECK:STDOUT: %.loc9_3.2: %X = splice_inst %tuple.elem2 [template = %.loc9_3.11 (constants.%.c57)] +// CHECK:STDOUT: %.loc9_3.2: %X = splice_inst %tuple.elem2 [template = %.loc9_3.9 (constants.%.c57)] // CHECK:STDOUT: %Make.call.loc9_35: init %X to %.loc9_3.2 = call %Make.ref.loc9_30() // CHECK:STDOUT: %Make.ref.loc9_38: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] -// CHECK:STDOUT: %.loc9_3.3: %X = splice_inst %tuple.elem3 [template = %.loc9_3.12 (constants.%.ceb)] +// CHECK:STDOUT: %.loc9_3.3: %X = splice_inst %tuple.elem3 [template = %.loc9_3.10 (constants.%.ceb)] // CHECK:STDOUT: %Make.call.loc9_43: init %X to %.loc9_3.3 = call %Make.ref.loc9_38() // CHECK:STDOUT: %.loc9_44: %tuple.type.92e = tuple_literal (%Make.call.loc9_27, %Make.call.loc9_35, %Make.call.loc9_43) -// CHECK:STDOUT: %.loc9_3.4: @F.%T.loc8_16.1 (%T.67db0b.1) = splice_inst %tuple.elem0 [template = %.loc9_3.13 (constants.%.b00)] +// CHECK:STDOUT: %.loc9_3.4: @F.%T.loc8_16.1 (%T.67db0b.1) = splice_inst %tuple.elem0 [template = %.loc9_3.11 (constants.%.b00)] // CHECK:STDOUT: assign %w.var, %.loc9_3.4 // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_16.2 [template = %T.loc8_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %w: ref @F.%T.loc8_16.1 (%T.67db0b.1) = wrapper_binding w, %w.var @@ -1136,98 +979,75 @@ fn Run() { // CHECK:STDOUT: %w.patt.loc9_15.1: @F.%pattern_type (%pattern_type.51d1c4.1) = ref_binding_pattern w [template = %w.patt.loc9_15.2 (constants.%w.patt.f6d)] // CHECK:STDOUT: %w.var_patt.loc9_3.1: @F.%pattern_type (%pattern_type.51d1c4.1) = var_pattern %w.patt.loc9_15.1 [template = %w.var_patt.loc9_3.2 (constants.%w.var_patt.7fe)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_3.5: type = type_of_inst %.loc9_3.14 [template = %.loc9_3.15 (constants.%.8cb)] -// CHECK:STDOUT: %.loc9_3.6: @F.%.loc9_3.15 (%.8cb) = splice_inst %.loc9_3.14 [template = %.loc9_3.16 (constants.%.c23)] -// CHECK:STDOUT: %.loc9_3.7: type = type_of_inst %.loc9_3.17 [template = %.loc9_3.18 (constants.%.57c)] -// CHECK:STDOUT: %.loc9_3.8: @F.%.loc9_3.18 (%.57c) = splice_inst %.loc9_3.17 [template = %.loc9_3.19 (constants.%.e63)] +// CHECK:STDOUT: %.loc9_3.5: type = type_of_inst %.loc9_3.12 [template = %.loc9_3.13 (constants.%.08d)] +// CHECK:STDOUT: %.loc9_3.6: @F.%.loc9_3.13 (%.08d) = splice_inst %.loc9_3.12 [template = %.loc9_3.14 (constants.%.295)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %tuple.type.92e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.3(%self.param: ref %tuple.type.92e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc8af.1] // CHECK:STDOUT: %tuple.elem2: ref %X = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8115.1] // CHECK:STDOUT: %tuple.elem1: ref %X = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c61a1.1] // CHECK:STDOUT: %tuple.elem0: ref %X = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc9_3.5: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.5 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc9_3.6: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.6: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.6 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %tuple.type.92e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %tuple.type.92e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.4(%self.param: ref %Array.2ee) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.4(%self.param: ref %Array.2ee) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc8af.1] // CHECK:STDOUT: %.loc9_3.1: ref %X = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %.loc9_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%.loc9_3.1) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_3.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8115.1] -// CHECK:STDOUT: %.loc9_3.2: ref %X = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %.loc9_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%.loc9_3.2) +// CHECK:STDOUT: %.loc9_3.4: ref %X = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.6: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_3.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c61a1.1] -// CHECK:STDOUT: %.loc9_3.3: ref %X = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3: = bound_method %.loc9_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.3(%.loc9_3.3) +// CHECK:STDOUT: %.loc9_3.7: ref %X = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.5: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.8: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.5 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc9_3.6: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.9: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.6 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc9_3.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.4(%self.param: ref %Array.2ee) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.4(%self.param: ref %Array.2ee) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.5(%self.param: ref %Y) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.5(%self.param: ref %Y) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67db0b.1) { // CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt.3a0592.1 @@ -1243,21 +1063,18 @@ fn Run() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.eca // CHECK:STDOUT: %w.patt.loc9_15.2 => constants.%w.patt.689 // CHECK:STDOUT: %w.var_patt.loc9_3.2 => constants.%w.var_patt.e50 -// CHECK:STDOUT: %.loc9_3.9 => constants.%tuple.1ed7a0.1 +// CHECK:STDOUT: %.loc9_3.7 => constants.%tuple.1ed7a0.1 // CHECK:STDOUT: %tuple.elem0 => constants.%inst.tuple_init // CHECK:STDOUT: %tuple.elem1 => constants.%inst.splice_block.426619.1 -// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.8 => // CHECK:STDOUT: %tuple.elem2 => constants.%inst.tuple_access.426619.1 -// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.9 => // CHECK:STDOUT: %tuple.elem3 => constants.%inst.tuple_access.426619.2 -// CHECK:STDOUT: %.loc9_3.12 => -// CHECK:STDOUT: %.loc9_3.13 => -// CHECK:STDOUT: %.loc9_3.14 => constants.%inst.splice_block.426619.2 -// CHECK:STDOUT: %.loc9_3.15 => -// CHECK:STDOUT: %.loc9_3.16 => -// CHECK:STDOUT: %.loc9_3.17 => constants.%inst.call.426619.1 -// CHECK:STDOUT: %.loc9_3.18 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc9_3.19 => +// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.12 => constants.%inst.splice_block.426619.2 +// CHECK:STDOUT: %.loc9_3.13 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc9_3.14 => // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Array.2ee) { @@ -1269,21 +1086,18 @@ fn Run() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.573 // CHECK:STDOUT: %w.patt.loc9_15.2 => constants.%w.patt.16b // CHECK:STDOUT: %w.var_patt.loc9_3.2 => constants.%w.var_patt.9ac -// CHECK:STDOUT: %.loc9_3.9 => constants.%tuple.1ed7a0.2 +// CHECK:STDOUT: %.loc9_3.7 => constants.%tuple.1ed7a0.2 // CHECK:STDOUT: %tuple.elem0 => constants.%inst.array_init // CHECK:STDOUT: %tuple.elem1 => constants.%inst.splice_block.426619.3 -// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.8 => // CHECK:STDOUT: %tuple.elem2 => constants.%inst.splice_block.426619.4 -// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.9 => // CHECK:STDOUT: %tuple.elem3 => constants.%inst.splice_block.426619.5 -// CHECK:STDOUT: %.loc9_3.12 => -// CHECK:STDOUT: %.loc9_3.13 => -// CHECK:STDOUT: %.loc9_3.14 => constants.%inst.splice_block.426619.6 -// CHECK:STDOUT: %.loc9_3.15 => -// CHECK:STDOUT: %.loc9_3.16 => -// CHECK:STDOUT: %.loc9_3.17 => constants.%inst.call.426619.2 -// CHECK:STDOUT: %.loc9_3.18 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc9_3.19 => +// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.12 => constants.%inst.splice_block.426619.6 +// CHECK:STDOUT: %.loc9_3.13 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc9_3.14 => // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Y) { @@ -1295,21 +1109,18 @@ fn Run() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ab // CHECK:STDOUT: %w.patt.loc9_15.2 => constants.%w.patt.22a // CHECK:STDOUT: %w.var_patt.loc9_3.2 => constants.%w.var_patt.565 -// CHECK:STDOUT: %.loc9_3.9 => constants.%tuple.1ed7a0.3 +// CHECK:STDOUT: %.loc9_3.7 => constants.%tuple.1ed7a0.3 // CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.7 // CHECK:STDOUT: %tuple.elem1 => constants.%inst.temporary_storage.426619.1 -// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.8 => // CHECK:STDOUT: %tuple.elem2 => constants.%inst.temporary_storage.426619.2 -// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.9 => // CHECK:STDOUT: %tuple.elem3 => constants.%inst.temporary_storage.426619.3 -// CHECK:STDOUT: %.loc9_3.12 => -// CHECK:STDOUT: %.loc9_3.13 => -// CHECK:STDOUT: %.loc9_3.14 => constants.%inst.splice_block.426619.8 -// CHECK:STDOUT: %.loc9_3.15 => -// CHECK:STDOUT: %.loc9_3.16 => -// CHECK:STDOUT: %.loc9_3.17 => constants.%inst.call.426619.3 -// CHECK:STDOUT: %.loc9_3.18 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc9_3.19 => +// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.12 => constants.%inst.splice_block.426619.8 +// CHECK:STDOUT: %.loc9_3.13 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc9_3.14 => // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- initialize_from_nested_literal.carbon @@ -1318,18 +1129,17 @@ fn Run() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %pattern_type.6cb: type = pattern_type %X [concrete] // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0, template [template] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0, template [template] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [template] -// CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T [template] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [template] +// CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T.67d [template] // CHECK:STDOUT: %w.patt.f6d: %pattern_type.51d1c4.1 = ref_binding_pattern w [template] // CHECK:STDOUT: %w.var_patt.7fe: %pattern_type.51d1c4.1 = var_pattern %w.patt.f6d [template] // CHECK:STDOUT: %struct_type.a.b.f38: type = struct_type {.a: %X, .b: %X} [concrete] @@ -1338,21 +1148,16 @@ fn Run() { // CHECK:STDOUT: %.4e3: %X = splice_inst @F.%tuple.elem1 [template] // CHECK:STDOUT: %.c57: %X = splice_inst @F.%tuple.elem2 [template] // CHECK:STDOUT: %.ceb: %X = splice_inst @F.%tuple.elem3 [template] -// CHECK:STDOUT: %.b00: %T = splice_inst @F.%tuple.elem0 [template] +// CHECK:STDOUT: %.b00: %T.67d = splice_inst @F.%tuple.elem0 [template] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.869: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self.0e7) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.c97: %Destroy.WithSelf.SelfDestruct.type.869 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.df0 [concrete] -// CHECK:STDOUT: %.8cb: type = type_of_inst @F.%.loc9_3.14 [template] -// CHECK:STDOUT: %.c23: %.8cb = splice_inst @F.%.loc9_3.14 [template] -// CHECK:STDOUT: %.57c: type = type_of_inst @F.%.loc9_3.17 [template] -// CHECK:STDOUT: %.e63: %.57c = splice_inst @F.%.loc9_3.17 [template] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %.08d: type = type_of_inst @F.%.loc9_3.12 [template] +// CHECK:STDOUT: %.295: %.08d = splice_inst @F.%.loc9_3.12 [template] // CHECK:STDOUT: %Y: type = class_type @Y [concrete] // CHECK:STDOUT: %ImplicitAs.type.2cb: type = facet_type <@ImplicitAs, @ImplicitAs(%Y)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness @X.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] -// CHECK:STDOUT: %pattern_type.7ab: type = pattern_type %Y [concrete] // CHECK:STDOUT: %X.as.ImplicitAs.impl.Convert.type: type = fn_type @X.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %X.as.ImplicitAs.impl.Convert: %X.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2cb = facet_value %X, (%ImplicitAs.impl_witness) [concrete] @@ -1389,54 +1194,40 @@ fn Run() { // CHECK:STDOUT: %tuple.elem1.b82: ref %X = tuple_access %.224b0e.2, element1 // CHECK:STDOUT: } // CHECK:STDOUT: %tuple.1ed7a0.1: %tuple.type.f39 = tuple_value (%inst.splice_block.426619.1, %inst.splice_block.426619.2, %inst.struct_access, %inst.tuple_access) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.4c3: type = pattern_type %struct_type.a.b.f38 [concrete] -// CHECK:STDOUT: %self.param_patt.bd8: %pattern_type.4c3 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7ce: %pattern_type.4c3 = wrapper_binding_pattern self, %self.param_patt.bd8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.165: %pattern_type.9a0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.c78: %pattern_type.9a0 = wrapper_binding_pattern self, %self.param_patt.165 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc5) [concrete] +// CHECK:STDOUT: %Destroy.facet.689: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.e12, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc9_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.4: = custom_witness (%Destroy.WithSelf.Op.403171.4, %Destroy.WithSelf.SubobjectDestroy.d01daf.4, %Destroy.WithSelf.SelfDestruct.db3fdb.4), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.e65: %Destroy.type = facet_value %tuple.type.4c2, (%custom_witness.f8f19d.4) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.839: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.e65) [concrete] -// CHECK:STDOUT: %.81f: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.839, %Destroy.facet.e65 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.bc4: %SubobjectDestroy.type = facet_value %struct_type.a.b.f38, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7ea: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.bc4) [concrete] +// CHECK:STDOUT: %Destroy.facet.3ef: %Destroy.type = facet_value %struct_type.a.b.f38, (%DestroyImpl.impl_witness.7ea, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.4c8: %SubobjectDestroy.type = facet_value %tuple.type.4c2, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.17e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.4c8) [concrete] +// CHECK:STDOUT: %Destroy.facet.e7364e.1: %Destroy.type = facet_value %tuple.type.4c2, (%DestroyImpl.impl_witness.17e, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.3: = inst_value [concrete] { -// CHECK:STDOUT: %.1f2: = splice_block %bound_method.a78 { +// CHECK:STDOUT: %.ff2: init %empty_tuple.type = splice_block %SelfDestruct.call.603 { // CHECK:STDOUT: %.224b0e.1: ref %tuple.type.4c2 = specific_inst @F.%w.var, @F(%tuple.type.4c2) -// CHECK:STDOUT: %impl.elem2.006: %.81f = impl_witness_access %custom_witness.f8f19d.4, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.4] -// CHECK:STDOUT: %bound_method.a78: = bound_method %.224b0e.1, %impl.elem2.006 +// CHECK:STDOUT: %Destroy.facet.e7364e.2: %Destroy.type = facet_value %tuple.type.4c2, (%DestroyImpl.impl_witness.17e, %custom_witness.b80ef6.4) [concrete = %Destroy.facet.e7364e.1] +// CHECK:STDOUT: %.b7e686.1: %Destroy.type = converted %tuple.type.4c2, %Destroy.facet.e7364e.2 [concrete = %Destroy.facet.e7364e.1] +// CHECK:STDOUT: %Destroy.facet.e7364e.3: %Destroy.type = facet_value %tuple.type.4c2, (%DestroyImpl.impl_witness.17e, %custom_witness.b80ef6.4) [concrete = %Destroy.facet.e7364e.1] +// CHECK:STDOUT: %.b7e686.2: %Destroy.type = converted %tuple.type.4c2, %Destroy.facet.e7364e.3 [concrete = %Destroy.facet.e7364e.1] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.603: init %empty_tuple.type = call %SelfDestruct.specific_fn.3e0743.2(%.224b0e.1) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call.426619.1: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.2c9: init %empty_tuple.type = call %.1f2(%.224b0e.1) -// CHECK:STDOUT: } // CHECK:STDOUT: %complete_type.8ea: = complete_type_witness %tuple.type.2f4 [concrete] // CHECK:STDOUT: %pattern_type.2cd: type = pattern_type %tuple.type.2f4 [concrete] // CHECK:STDOUT: %w.patt.e8c: %pattern_type.2cd = ref_binding_pattern w [concrete] @@ -1484,45 +1275,35 @@ fn Run() { // CHECK:STDOUT: %.7a56fd.3: ref %X = temporary_storage // CHECK:STDOUT: } // CHECK:STDOUT: %tuple.1ed7a0.2: %tuple.type.f39 = tuple_value (%inst.splice_block.426619.4, %inst.temporary_storage.426619.1, %inst.temporary_storage.426619.2, %inst.temporary_storage.426619.3) [concrete] -// CHECK:STDOUT: %self.param_patt.1fb: %pattern_type.7ab = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eee: %pattern_type.7ab = wrapper_binding_pattern self, %self.param_patt.1fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc9_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.83c: type = pattern_type %struct_type.a.b.095 [concrete] -// CHECK:STDOUT: %self.param_patt.201: %pattern_type.83c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2b2: %pattern_type.83c = wrapper_binding_pattern self, %self.param_patt.201 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc9_3.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7ad: %pattern_type.2cd = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.be8: %pattern_type.2cd = wrapper_binding_pattern self, %self.param_patt.7ad [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc9_3.7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.7: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.7: = custom_witness (%Destroy.WithSelf.Op.403171.7, %Destroy.WithSelf.SubobjectDestroy.d01daf.7, %Destroy.WithSelf.SelfDestruct.db3fdb.7), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.585: %Destroy.type = facet_value %tuple.type.2f4, (%custom_witness.f8f19d.7) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.18f: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.585) [concrete] -// CHECK:STDOUT: %.2b6: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.18f, %Destroy.facet.585 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.6: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.6: %SubobjectDestroy.WithSelf.Op.type.6870fd.6 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.8db: %SubobjectDestroy.type = facet_value %Y, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a90: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.8db) [concrete] +// CHECK:STDOUT: %Destroy.facet.911: %Destroy.type = facet_value %Y, (%DestroyImpl.impl_witness.a90, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.6: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.6), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.cf7: %SubobjectDestroy.type = facet_value %struct_type.a.b.095, (%custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.601: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cf7) [concrete] +// CHECK:STDOUT: %Destroy.facet.d72: %Destroy.type = facet_value %struct_type.a.b.095, (%DestroyImpl.impl_witness.601, %custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9d8: %SubobjectDestroy.type = facet_value %tuple.type.2f4, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.357: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9d8) [concrete] +// CHECK:STDOUT: %Destroy.facet.a94c61.1: %Destroy.type = facet_value %tuple.type.2f4, (%DestroyImpl.impl_witness.357, %custom_witness.b80ef6.7) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.5: = inst_value [concrete] { -// CHECK:STDOUT: %.c0f: = splice_block %bound_method.349 { +// CHECK:STDOUT: %.4fd: init %empty_tuple.type = splice_block %SelfDestruct.call.286 { // CHECK:STDOUT: %.021893.1: ref %tuple.type.2f4 = specific_inst @F.%w.var, @F(%tuple.type.2f4) -// CHECK:STDOUT: %impl.elem2.b50: %.2b6 = impl_witness_access %custom_witness.f8f19d.7, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.7] -// CHECK:STDOUT: %bound_method.349: = bound_method %.021893.1, %impl.elem2.b50 +// CHECK:STDOUT: %Destroy.facet.a94c61.2: %Destroy.type = facet_value %tuple.type.2f4, (%DestroyImpl.impl_witness.357, %custom_witness.b80ef6.7) [concrete = %Destroy.facet.a94c61.1] +// CHECK:STDOUT: %.f83ac9.1: %Destroy.type = converted %tuple.type.2f4, %Destroy.facet.a94c61.2 [concrete = %Destroy.facet.a94c61.1] +// CHECK:STDOUT: %Destroy.facet.a94c61.3: %Destroy.type = facet_value %tuple.type.2f4, (%DestroyImpl.impl_witness.357, %custom_witness.b80ef6.7) [concrete = %Destroy.facet.a94c61.1] +// CHECK:STDOUT: %.f83ac9.2: %Destroy.type = converted %tuple.type.2f4, %Destroy.facet.a94c61.3 [concrete = %Destroy.facet.a94c61.1] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.286: init %empty_tuple.type = call %SelfDestruct.specific_fn.e32fda.2(%.021893.1) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call.426619.2: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.7f9: init %empty_tuple.type = call %.c0f(%.021893.1) -// CHECK:STDOUT: } // CHECK:STDOUT: %complete_type.561: = complete_type_witness %tuple.type.bb4 [concrete] // CHECK:STDOUT: %pattern_type.8b0: type = pattern_type %tuple.type.bb4 [concrete] // CHECK:STDOUT: %w.patt.d74: %pattern_type.8b0 = ref_binding_pattern w [concrete] @@ -1562,448 +1343,252 @@ fn Run() { // CHECK:STDOUT: %.7a56fd.5: ref %X = temporary_storage // CHECK:STDOUT: } // CHECK:STDOUT: %tuple.1ed7a0.3: %tuple.type.f39 = tuple_value (%inst.splice_block.426619.6, %inst.splice_block.426619.7, %inst.temporary_storage.426619.4, %inst.temporary_storage.426619.5) [concrete] -// CHECK:STDOUT: %pattern_type.483: type = pattern_type %struct_type.a.b.297 [concrete] -// CHECK:STDOUT: %self.param_patt.502: %pattern_type.483 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.93b: %pattern_type.483 = wrapper_binding_pattern self, %self.param_patt.502 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc9_3.8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.34e: type = pattern_type %Z [concrete] -// CHECK:STDOUT: %self.param_patt.37e: %pattern_type.34e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f3f: %pattern_type.34e = wrapper_binding_pattern self, %self.param_patt.37e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.9: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.9: type = fn_type @Destroy.WithSelf.Op.loc9_3.9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.9: %Destroy.WithSelf.Op.type.ef016f.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.9: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.328: %pattern_type.8b0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.289: %pattern_type.8b0 = wrapper_binding_pattern self, %self.param_patt.328 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.10: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.10: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.10 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.10: type = fn_type @Destroy.WithSelf.Op.loc9_3.10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.10: %Destroy.WithSelf.Op.type.ef016f.10 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.10: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.10: = custom_witness (%Destroy.WithSelf.Op.403171.10, %Destroy.WithSelf.SubobjectDestroy.d01daf.10, %Destroy.WithSelf.SelfDestruct.db3fdb.10), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.128: %Destroy.type = facet_value %tuple.type.bb4, (%custom_witness.f8f19d.10) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.44e: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.128) [concrete] -// CHECK:STDOUT: %.560: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.44e, %Destroy.facet.128 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.9: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.9: %SubobjectDestroy.WithSelf.Op.type.6870fd.9 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.9: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.9), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.10: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.10: %SubobjectDestroy.WithSelf.Op.type.6870fd.10 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.5d5: %SubobjectDestroy.type = facet_value %Z, (%custom_witness.b80ef6.9) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6a0: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.5d5) [concrete] +// CHECK:STDOUT: %Destroy.facet.2ca: %Destroy.type = facet_value %Z, (%DestroyImpl.impl_witness.6a0, %custom_witness.b80ef6.9) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.10: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.10), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0d4: %SubobjectDestroy.type = facet_value %tuple.type.bb4, (%custom_witness.b80ef6.10) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.551: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0d4) [concrete] +// CHECK:STDOUT: %Destroy.facet.955af9.1: %Destroy.type = facet_value %tuple.type.bb4, (%DestroyImpl.impl_witness.551, %custom_witness.b80ef6.10) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.8: = inst_value [concrete] { -// CHECK:STDOUT: %.9e3: = splice_block %bound_method.d0a { +// CHECK:STDOUT: %.eac: init %empty_tuple.type = splice_block %SelfDestruct.call.e2e { // CHECK:STDOUT: %.9597f3.1: ref %tuple.type.bb4 = specific_inst @F.%w.var, @F(%tuple.type.bb4) -// CHECK:STDOUT: %impl.elem2.21a: %.560 = impl_witness_access %custom_witness.f8f19d.10, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.10] -// CHECK:STDOUT: %bound_method.d0a: = bound_method %.9597f3.1, %impl.elem2.21a +// CHECK:STDOUT: %Destroy.facet.955af9.2: %Destroy.type = facet_value %tuple.type.bb4, (%DestroyImpl.impl_witness.551, %custom_witness.b80ef6.10) [concrete = %Destroy.facet.955af9.1] +// CHECK:STDOUT: %.959a8d.1: %Destroy.type = converted %tuple.type.bb4, %Destroy.facet.955af9.2 [concrete = %Destroy.facet.955af9.1] +// CHECK:STDOUT: %Destroy.facet.955af9.3: %Destroy.type = facet_value %tuple.type.bb4, (%DestroyImpl.impl_witness.551, %custom_witness.b80ef6.10) [concrete = %Destroy.facet.955af9.1] +// CHECK:STDOUT: %.959a8d.2: %Destroy.type = converted %tuple.type.bb4, %Destroy.facet.955af9.3 [concrete = %Destroy.facet.955af9.1] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.e2e: init %empty_tuple.type = call %SelfDestruct.specific_fn.62f358.2(%.9597f3.1) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call.426619.3: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.cbc: init %empty_tuple.type = call %.9e3(%.9597f3.1) -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.df0: @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct.type (%Destroy.WithSelf.SelfDestruct.type.869) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct (constants.%Destroy.WithSelf.SelfDestruct.c97)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4c3 = ref_param_pattern [concrete = constants.%self.param_patt.bd8] -// CHECK:STDOUT: %self.patt: %pattern_type.4c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7ce] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.f38 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.f38 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4c3 = ref_param_pattern [concrete = constants.%self.param_patt.bd8] -// CHECK:STDOUT: %self.patt: %pattern_type.4c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7ce] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.f38 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.f38 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9a0 = ref_param_pattern [concrete = constants.%self.param_patt.165] -// CHECK:STDOUT: %self.patt: %pattern_type.9a0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c78] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.4c2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.4c2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc9_3.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9a0 = ref_param_pattern [concrete = constants.%self.param_patt.165] -// CHECK:STDOUT: %self.patt: %pattern_type.9a0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c78] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.4c2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.4c2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7ab = ref_param_pattern [concrete = constants.%self.param_patt.1fb] -// CHECK:STDOUT: %self.patt: %pattern_type.7ab = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eee] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc9_3.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7ab = ref_param_pattern [concrete = constants.%self.param_patt.1fb] -// CHECK:STDOUT: %self.patt: %pattern_type.7ab = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eee] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.83c = ref_param_pattern [concrete = constants.%self.param_patt.201] -// CHECK:STDOUT: %self.patt: %pattern_type.83c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2b2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.095 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.095 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc9_3.6 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.83c = ref_param_pattern [concrete = constants.%self.param_patt.201] -// CHECK:STDOUT: %self.patt: %pattern_type.83c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2b2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.095 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.095 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.2cd = ref_param_pattern [concrete = constants.%self.param_patt.7ad] -// CHECK:STDOUT: %self.patt: %pattern_type.2cd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.be8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.2f4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.2f4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc9_3.7 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.2cd = ref_param_pattern [concrete = constants.%self.param_patt.7ad] -// CHECK:STDOUT: %self.patt: %pattern_type.2cd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.be8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.2f4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.2f4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.483 = ref_param_pattern [concrete = constants.%self.param_patt.502] -// CHECK:STDOUT: %self.patt: %pattern_type.483 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.93b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.297 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.297 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.8: %Destroy.WithSelf.Op.type.ef016f.8 = fn_decl @Destroy.WithSelf.Op.loc9_3.8 [concrete = constants.%Destroy.WithSelf.Op.403171.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.483 = ref_param_pattern [concrete = constants.%self.param_patt.502] -// CHECK:STDOUT: %self.patt: %pattern_type.483 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.93b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.297 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.297 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.9: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.9] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.34e = ref_param_pattern [concrete = constants.%self.param_patt.37e] -// CHECK:STDOUT: %self.patt: %pattern_type.34e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f3f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Z = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Z = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.9: %Destroy.WithSelf.Op.type.ef016f.9 = fn_decl @Destroy.WithSelf.Op.loc9_3.9 [concrete = constants.%Destroy.WithSelf.Op.403171.9] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.34e = ref_param_pattern [concrete = constants.%self.param_patt.37e] -// CHECK:STDOUT: %self.patt: %pattern_type.34e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f3f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Z = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Z = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.10: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.10 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.10] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8b0 = ref_param_pattern [concrete = constants.%self.param_patt.328] -// CHECK:STDOUT: %self.patt: %pattern_type.8b0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.289] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.bb4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.bb4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.10: %Destroy.WithSelf.Op.type.ef016f.10 = fn_decl @Destroy.WithSelf.Op.loc9_3.10 [concrete = constants.%Destroy.WithSelf.Op.403171.10] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8b0 = ref_param_pattern [concrete = constants.%self.param_patt.328] -// CHECK:STDOUT: %self.patt: %pattern_type.8b0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.289] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.bb4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.bb4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc8_16.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc8_16.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc8_18.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc8_16.2: type = symbolic_binding T, 0, template [template = %T.loc8_16.1 (constants.%T)] +// CHECK:STDOUT: %T.loc8_16.2: type = symbolic_binding T, 0, template [template = %T.loc8_16.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc8_16.2: type) { -// CHECK:STDOUT: %T.patt.loc8_16.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc8_16.1: type = symbolic_binding T, 0, template [template = %T.loc8_16.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc8_16.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc8_16.1: type = symbolic_binding T, 0, template [template = %T.loc8_16.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.loc8_16.1 [template = %require_complete (constants.%require_complete.944)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc8_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)] // CHECK:STDOUT: %w.patt.loc9_15.2: @F.%pattern_type (%pattern_type.51d1c4.1) = ref_binding_pattern w [template = %w.patt.loc9_15.2 (constants.%w.patt.f6d)] // CHECK:STDOUT: %w.var_patt.loc9_3.2: @F.%pattern_type (%pattern_type.51d1c4.1) = var_pattern %w.patt.loc9_15.2 [template = %w.var_patt.loc9_3.2 (constants.%w.var_patt.7fe)] -// CHECK:STDOUT: %.loc9_3.9: %tuple.type.f39 = initialize_action %.loc9_56, %T.loc8_16.1, %w.var, none, false [template] -// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc9_3.9, element0 [template] -// CHECK:STDOUT: %tuple.elem1: = tuple_access %.loc9_3.9, element1 [template] -// CHECK:STDOUT: %.loc9_3.10: %X = splice_inst %tuple.elem1 [template = %.loc9_3.10 (constants.%.4e3)] -// CHECK:STDOUT: %tuple.elem2: = tuple_access %.loc9_3.9, element2 [template] -// CHECK:STDOUT: %.loc9_3.11: %X = splice_inst %tuple.elem2 [template = %.loc9_3.11 (constants.%.c57)] -// CHECK:STDOUT: %tuple.elem3: = tuple_access %.loc9_3.9, element3 [template] -// CHECK:STDOUT: %.loc9_3.12: %X = splice_inst %tuple.elem3 [template = %.loc9_3.12 (constants.%.ceb)] -// CHECK:STDOUT: %.loc9_3.13: @F.%T.loc8_16.1 (%T) = splice_inst %tuple.elem0 [template = %.loc9_3.13 (constants.%.b00)] -// CHECK:STDOUT: %.loc9_3.14: = compound_member_access_action %w.var, constants.%assoc2 [template] -// CHECK:STDOUT: %.loc9_3.15: type = type_of_inst %.loc9_3.14 [template = %.loc9_3.15 (constants.%.8cb)] -// CHECK:STDOUT: %.loc9_3.16: @F.%.loc9_3.15 (%.8cb) = splice_inst %.loc9_3.14 [template = %.loc9_3.16 (constants.%.c23)] -// CHECK:STDOUT: %.loc9_3.17: = call_action (%.loc9_3.6), true [template] -// CHECK:STDOUT: %.loc9_3.18: type = type_of_inst %.loc9_3.17 [template = %.loc9_3.18 (constants.%.57c)] -// CHECK:STDOUT: %.loc9_3.19: @F.%.loc9_3.18 (%.57c) = splice_inst %.loc9_3.17 [template = %.loc9_3.19 (constants.%.e63)] +// CHECK:STDOUT: %.loc9_3.7: %tuple.type.f39 = initialize_action %.loc9_56, %T.loc8_16.1, %w.var, none, false [template] +// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc9_3.7, element0 [template] +// CHECK:STDOUT: %tuple.elem1: = tuple_access %.loc9_3.7, element1 [template] +// CHECK:STDOUT: %.loc9_3.8: %X = splice_inst %tuple.elem1 [template = %.loc9_3.8 (constants.%.4e3)] +// CHECK:STDOUT: %tuple.elem2: = tuple_access %.loc9_3.7, element2 [template] +// CHECK:STDOUT: %.loc9_3.9: %X = splice_inst %tuple.elem2 [template = %.loc9_3.9 (constants.%.c57)] +// CHECK:STDOUT: %tuple.elem3: = tuple_access %.loc9_3.7, element3 [template] +// CHECK:STDOUT: %.loc9_3.10: %X = splice_inst %tuple.elem3 [template = %.loc9_3.10 (constants.%.ceb)] +// CHECK:STDOUT: %.loc9_3.11: @F.%T.loc8_16.1 (%T.67d) = splice_inst %tuple.elem0 [template = %.loc9_3.11 (constants.%.b00)] +// CHECK:STDOUT: %.loc9_3.12: = call_action (constants.%SelfDestruct, %w.var), true [template] +// CHECK:STDOUT: %.loc9_3.13: type = type_of_inst %.loc9_3.12 [template = %.loc9_3.13 (constants.%.08d)] +// CHECK:STDOUT: %.loc9_3.14: @F.%.loc9_3.13 (%.08d) = splice_inst %.loc9_3.12 [template = %.loc9_3.14 (constants.%.295)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %w.var: ref @F.%T.loc8_16.1 (%T) = var_storage %w.var_patt.loc9_3.1 +// CHECK:STDOUT: %w.var: ref @F.%T.loc8_16.1 (%T.67d) = var_storage %w.var_patt.loc9_3.1 // CHECK:STDOUT: %Make.ref.loc9_28: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] -// CHECK:STDOUT: %.loc9_3.1: %X = splice_inst %tuple.elem1 [template = %.loc9_3.10 (constants.%.4e3)] +// CHECK:STDOUT: %.loc9_3.1: %X = splice_inst %tuple.elem1 [template = %.loc9_3.8 (constants.%.4e3)] // CHECK:STDOUT: %Make.call.loc9_33: init %X to %.loc9_3.1 = call %Make.ref.loc9_28() // CHECK:STDOUT: %Make.ref.loc9_41: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] -// CHECK:STDOUT: %.loc9_3.2: %X = splice_inst %tuple.elem2 [template = %.loc9_3.11 (constants.%.c57)] +// CHECK:STDOUT: %.loc9_3.2: %X = splice_inst %tuple.elem2 [template = %.loc9_3.9 (constants.%.c57)] // CHECK:STDOUT: %Make.call.loc9_46: init %X to %.loc9_3.2 = call %Make.ref.loc9_41() // CHECK:STDOUT: %.loc9_47: %struct_type.a.b.f38 = struct_literal (%Make.call.loc9_33, %Make.call.loc9_46) // CHECK:STDOUT: %Make.ref.loc9_50: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] -// CHECK:STDOUT: %.loc9_3.3: %X = splice_inst %tuple.elem3 [template = %.loc9_3.12 (constants.%.ceb)] +// CHECK:STDOUT: %.loc9_3.3: %X = splice_inst %tuple.elem3 [template = %.loc9_3.10 (constants.%.ceb)] // CHECK:STDOUT: %Make.call.loc9_55: init %X to %.loc9_3.3 = call %Make.ref.loc9_50() // CHECK:STDOUT: %.loc9_56: %tuple.type.4c2 = tuple_literal (%.loc9_47, %Make.call.loc9_55) -// CHECK:STDOUT: %.loc9_3.4: @F.%T.loc8_16.1 (%T) = splice_inst %tuple.elem0 [template = %.loc9_3.13 (constants.%.b00)] +// CHECK:STDOUT: %.loc9_3.4: @F.%T.loc8_16.1 (%T.67d) = splice_inst %tuple.elem0 [template = %.loc9_3.11 (constants.%.b00)] // CHECK:STDOUT: assign %w.var, %.loc9_3.4 -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_16.2 [template = %T.loc8_16.1 (constants.%T)] -// CHECK:STDOUT: %w: ref @F.%T.loc8_16.1 (%T) = wrapper_binding w, %w.var +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_16.2 [template = %T.loc8_16.1 (constants.%T.67d)] +// CHECK:STDOUT: %w: ref @F.%T.loc8_16.1 (%T.67d) = wrapper_binding w, %w.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %w.patt.loc9_15.1: @F.%pattern_type (%pattern_type.51d1c4.1) = ref_binding_pattern w [template = %w.patt.loc9_15.2 (constants.%w.patt.f6d)] // CHECK:STDOUT: %w.var_patt.loc9_3.1: @F.%pattern_type (%pattern_type.51d1c4.1) = var_pattern %w.patt.loc9_15.1 [template = %w.var_patt.loc9_3.2 (constants.%w.var_patt.7fe)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_3.5: type = type_of_inst %.loc9_3.14 [template = %.loc9_3.15 (constants.%.8cb)] -// CHECK:STDOUT: %.loc9_3.6: @F.%.loc9_3.15 (%.8cb) = splice_inst %.loc9_3.14 [template = %.loc9_3.16 (constants.%.c23)] -// CHECK:STDOUT: %.loc9_3.7: type = type_of_inst %.loc9_3.17 [template = %.loc9_3.18 (constants.%.57c)] -// CHECK:STDOUT: %.loc9_3.8: @F.%.loc9_3.18 (%.57c) = splice_inst %.loc9_3.17 [template = %.loc9_3.19 (constants.%.e63)] +// CHECK:STDOUT: %.loc9_3.5: type = type_of_inst %.loc9_3.12 [template = %.loc9_3.13 (constants.%.08d)] +// CHECK:STDOUT: %.loc9_3.6: @F.%.loc9_3.13 (%.08d) = splice_inst %.loc9_3.12 [template = %.loc9_3.14 (constants.%.295)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.3(%self.param: ref %struct_type.a.b.f38) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.3(%self.param: ref %struct_type.a.b.f38) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc9_3.1: ref %X = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %.loc9_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%.loc9_3.1) -// CHECK:STDOUT: %.loc9_3.2: ref %X = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %.loc9_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%.loc9_3.2) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_3.1) +// CHECK:STDOUT: %.loc9_3.4: ref %X = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.6: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.3(%self.param: ref %struct_type.a.b.f38) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.3(%self.param: ref %struct_type.a.b.f38) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.4(%self.param: ref %tuple.type.4c2) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.4(%self.param: ref %tuple.type.4c2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %X = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %struct_type.a.b.f38 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%struct_type.a.b.f38, (constants.%DestroyImpl.impl_witness.7ea, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3ef] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%struct_type.a.b.f38, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.3ef] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%struct_type.a.b.f38, (constants.%DestroyImpl.impl_witness.7ea, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.3ef] +// CHECK:STDOUT: %.loc9_3.4: %Destroy.type = converted constants.%struct_type.a.b.f38, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.3ef] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.4(%self.param: ref %tuple.type.4c2) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.5(%self.param: ref %Y) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.4(%self.param: ref %tuple.type.4c2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.5(%self.param: ref %Y) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.6(%self.param: ref %struct_type.a.b.095) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.6(%self.param: ref %struct_type.a.b.095) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc9_3.1: ref %Y = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %.loc9_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%.loc9_3.1) -// CHECK:STDOUT: %.loc9_3.2: ref %Y = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %.loc9_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%.loc9_3.2) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_3.1) +// CHECK:STDOUT: %.loc9_3.4: ref %Y = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.6: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.6(%self.param: ref %struct_type.a.b.095) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.6(%self.param: ref %struct_type.a.b.095) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.7(%self.param: ref %tuple.type.2f4) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.7(%self.param: ref %tuple.type.2f4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %Y = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %struct_type.a.b.095 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%struct_type.a.b.095, (constants.%DestroyImpl.impl_witness.601, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.d72] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%struct_type.a.b.095, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.d72] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%struct_type.a.b.095, (constants.%DestroyImpl.impl_witness.601, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.d72] +// CHECK:STDOUT: %.loc9_3.4: %Destroy.type = converted constants.%struct_type.a.b.095, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.d72] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.7(%self.param: ref %tuple.type.2f4) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.7(%self.param: ref %tuple.type.2f4) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.7(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.8(%self.param: ref %struct_type.a.b.297) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.8(%self.param: ref %struct_type.a.b.297) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc9_3.1: ref %Y = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %.loc9_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%.loc9_3.1) -// CHECK:STDOUT: %.loc9_3.2: ref %X = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %.loc9_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%.loc9_3.2) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_3.1) +// CHECK:STDOUT: %.loc9_3.4: ref %X = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.6: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.8(%self.param: ref %struct_type.a.b.297) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.8(%self.param: ref %struct_type.a.b.297) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.8(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.8(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.9(%self.param: ref %Z) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.9(%self.param: ref %Z) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %b.ref: %Z.elem.5d0 = name_ref b, @Z.%field_decl.loc21 [concrete = @Z.%field_decl.loc21] // CHECK:STDOUT: %.loc9_3.1: ref %Y = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %.loc9_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%.loc9_3.1) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_3.1) // CHECK:STDOUT: %a.ref: %Z.elem.d23 = name_ref a, @Z.%field_decl.loc20 [concrete = @Z.%field_decl.loc20] -// CHECK:STDOUT: %.loc9_3.2: ref %X = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %.loc9_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%.loc9_3.2) +// CHECK:STDOUT: %.loc9_3.4: ref %X = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc9_3.6: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.9(%self.param: ref %Z) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.9(%self.param: ref %Z) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.9(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.9(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.10(%self.param: ref %tuple.type.bb4) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.10(%self.param: ref %tuple.type.bb4) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %Y = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Y, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %Z = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.9 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9_3.2(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc9_3.3: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.9) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Z, %Destroy.facet.loc9_3.3 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %Destroy.facet.loc9_3.4: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.9) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc9_3.4: %Destroy.type = converted constants.%Z, %Destroy.facet.loc9_3.4 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.10(%self.param: ref %tuple.type.bb4) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.10(%self.param: ref %tuple.type.bb4) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.10(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.10(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc8_16.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc8_16.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%tuple.type.4c2) { -// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc8_16.1 => constants.%tuple.type.4c2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2011,25 +1596,22 @@ fn Run() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9a0 // CHECK:STDOUT: %w.patt.loc9_15.2 => constants.%w.patt.a80 // CHECK:STDOUT: %w.var_patt.loc9_3.2 => constants.%w.var_patt.607 -// CHECK:STDOUT: %.loc9_3.9 => constants.%tuple.1ed7a0.1 +// CHECK:STDOUT: %.loc9_3.7 => constants.%tuple.1ed7a0.1 // CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.1 // CHECK:STDOUT: %tuple.elem1 => constants.%inst.splice_block.426619.2 -// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.8 => // CHECK:STDOUT: %tuple.elem2 => constants.%inst.struct_access -// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.9 => // CHECK:STDOUT: %tuple.elem3 => constants.%inst.tuple_access -// CHECK:STDOUT: %.loc9_3.12 => -// CHECK:STDOUT: %.loc9_3.13 => -// CHECK:STDOUT: %.loc9_3.14 => constants.%inst.splice_block.426619.3 -// CHECK:STDOUT: %.loc9_3.15 => -// CHECK:STDOUT: %.loc9_3.16 => -// CHECK:STDOUT: %.loc9_3.17 => constants.%inst.call.426619.1 -// CHECK:STDOUT: %.loc9_3.18 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc9_3.19 => +// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.12 => constants.%inst.splice_block.426619.3 +// CHECK:STDOUT: %.loc9_3.13 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc9_3.14 => // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%tuple.type.2f4) { -// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc8_16.1 => constants.%tuple.type.2f4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2037,25 +1619,22 @@ fn Run() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2cd // CHECK:STDOUT: %w.patt.loc9_15.2 => constants.%w.patt.e8c // CHECK:STDOUT: %w.var_patt.loc9_3.2 => constants.%w.var_patt.61a -// CHECK:STDOUT: %.loc9_3.9 => constants.%tuple.1ed7a0.2 +// CHECK:STDOUT: %.loc9_3.7 => constants.%tuple.1ed7a0.2 // CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.4 // CHECK:STDOUT: %tuple.elem1 => constants.%inst.temporary_storage.426619.1 -// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.8 => // CHECK:STDOUT: %tuple.elem2 => constants.%inst.temporary_storage.426619.2 -// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.9 => // CHECK:STDOUT: %tuple.elem3 => constants.%inst.temporary_storage.426619.3 -// CHECK:STDOUT: %.loc9_3.12 => -// CHECK:STDOUT: %.loc9_3.13 => -// CHECK:STDOUT: %.loc9_3.14 => constants.%inst.splice_block.426619.5 -// CHECK:STDOUT: %.loc9_3.15 => -// CHECK:STDOUT: %.loc9_3.16 => -// CHECK:STDOUT: %.loc9_3.17 => constants.%inst.call.426619.2 -// CHECK:STDOUT: %.loc9_3.18 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc9_3.19 => +// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.12 => constants.%inst.splice_block.426619.5 +// CHECK:STDOUT: %.loc9_3.13 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc9_3.14 => // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%tuple.type.bb4) { -// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc8_16.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc8_16.1 => constants.%tuple.type.bb4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2063,21 +1642,18 @@ fn Run() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.8b0 // CHECK:STDOUT: %w.patt.loc9_15.2 => constants.%w.patt.d74 // CHECK:STDOUT: %w.var_patt.loc9_3.2 => constants.%w.var_patt.e1e -// CHECK:STDOUT: %.loc9_3.9 => constants.%tuple.1ed7a0.3 +// CHECK:STDOUT: %.loc9_3.7 => constants.%tuple.1ed7a0.3 // CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.6 // CHECK:STDOUT: %tuple.elem1 => constants.%inst.splice_block.426619.7 -// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.8 => // CHECK:STDOUT: %tuple.elem2 => constants.%inst.temporary_storage.426619.4 -// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.9 => // CHECK:STDOUT: %tuple.elem3 => constants.%inst.temporary_storage.426619.5 -// CHECK:STDOUT: %.loc9_3.12 => -// CHECK:STDOUT: %.loc9_3.13 => -// CHECK:STDOUT: %.loc9_3.14 => constants.%inst.splice_block.426619.8 -// CHECK:STDOUT: %.loc9_3.15 => -// CHECK:STDOUT: %.loc9_3.16 => -// CHECK:STDOUT: %.loc9_3.17 => constants.%inst.call.426619.3 -// CHECK:STDOUT: %.loc9_3.18 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc9_3.19 => +// CHECK:STDOUT: %.loc9_3.10 => +// CHECK:STDOUT: %.loc9_3.11 => +// CHECK:STDOUT: %.loc9_3.12 => constants.%inst.splice_block.426619.8 +// CHECK:STDOUT: %.loc9_3.13 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc9_3.14 => // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- as.carbon @@ -2426,18 +2002,17 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %B: type = class_type @B [concrete] -// CHECK:STDOUT: %pattern_type.e39: type = pattern_type %B [concrete] // CHECK:STDOUT: %B.MakeB.type: type = fn_type @B.MakeB [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %B.MakeB: %B.MakeB.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0, template [template] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0, template [template] // CHECK:STDOUT: %A.type: type = parameterized_class_name_type @A [concrete] // CHECK:STDOUT: %A.generic: %A.type = struct_value () [concrete] -// CHECK:STDOUT: %A.59f: type = class_type @A, @A(%T) [template] +// CHECK:STDOUT: %A.59f: type = class_type @A, @A(%T.67d) [template] // CHECK:STDOUT: %.23e: type = type_of_inst @A.MakeA.%.loc12_20.1 [template] // CHECK:STDOUT: %.296: %.23e = splice_inst @A.MakeA.%.loc12_20.1 [template] // CHECK:STDOUT: %.5372ba.1: type = splice_inst @A.MakeA.%.loc12_20.4 [template] @@ -2445,7 +2020,7 @@ fn Run() { // CHECK:STDOUT: %pattern_type.fcb8f3.1: type = pattern_type %.5372ba.1 [template] // CHECK:STDOUT: %return.param_patt.2e9ac5.1: %pattern_type.fcb8f3.1 = out_param_pattern [template] // CHECK:STDOUT: %return.patt.7fc6a1.1: %pattern_type.fcb8f3.1 = return_slot_pattern %return.param_patt.2e9ac5.1, %.5372ba.1 [template] -// CHECK:STDOUT: %.082: = call_action (%A.generic, %T), false [template] +// CHECK:STDOUT: %.082: = call_action (%A.generic, %T.67d), false [template] // CHECK:STDOUT: %.9ff: type = type_of_inst %.082 [template] // CHECK:STDOUT: %.13f: %.9ff = splice_inst %.082 [template] // CHECK:STDOUT: %.c8c: = convert_to_value_action %.13f, type [template] @@ -2454,11 +2029,11 @@ fn Run() { // CHECK:STDOUT: %pattern_type.fcb8f3.2: type = pattern_type %.5372ba.2 [template] // CHECK:STDOUT: %return.param_patt.2e9ac5.2: %pattern_type.fcb8f3.2 = out_param_pattern [template] // CHECK:STDOUT: %return.patt.7fc6a1.2: %pattern_type.fcb8f3.2 = return_slot_pattern %return.param_patt.2e9ac5.2, %.5372ba.2 [template] -// CHECK:STDOUT: %A.MakeA.type.6e4: type = fn_type @A.MakeA, @A(%T) [template] +// CHECK:STDOUT: %A.MakeA.type.6e4: type = fn_type @A.MakeA, @A(%T.67d) [template] // CHECK:STDOUT: %A.MakeA.6d7: %A.MakeA.type.6e4 = struct_value () [template] -// CHECK:STDOUT: %require_complete.944: = require_complete_type %T [template] -// CHECK:STDOUT: %A.elem.ca6: type = unbound_element_type %A.59f, %T [template] -// CHECK:STDOUT: %struct_type.field.686: type = struct_type {.field: %T} [template] +// CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [template] +// CHECK:STDOUT: %A.elem.ca6: type = unbound_element_type %A.59f, %T.67d [template] +// CHECK:STDOUT: %struct_type.field.686: type = struct_type {.field: %T.67d} [template] // CHECK:STDOUT: %complete_type.725: = complete_type_witness %struct_type.field.686 [template] // CHECK:STDOUT: %require_complete.cb0: = require_complete_type %.5372ba.1 [template] // CHECK:STDOUT: %.a08: type = type_of_inst @A.MakeA.%.loc13_23.3 [template] @@ -2486,36 +2061,23 @@ fn Run() { // CHECK:STDOUT: %return.param_patt.a31: %pattern_type.709 = out_param_pattern [concrete] // CHECK:STDOUT: %return.patt.dae: %pattern_type.709 = return_slot_pattern %return.param_patt.a31, %A.7d2f7e.1 [concrete] // CHECK:STDOUT: %A.MakeA.specific_fn: = specific_function %A.MakeA.0fd, @A.MakeA(%B) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_14.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc22_14.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_14.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc22_14.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22_14.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.79c: type = pattern_type %struct_type.field.8fb [concrete] -// CHECK:STDOUT: %self.param_patt.df4: %pattern_type.79c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.20d: %pattern_type.79c = wrapper_binding_pattern self, %self.param_patt.df4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_14.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc22_14.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2a6: %pattern_type.709 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.80c: %pattern_type.709 = wrapper_binding_pattern self, %self.param_patt.2a6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_14.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc22_14.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22_14.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc22_14.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.92e: %SubobjectDestroy.type = facet_value %B, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.131: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.92e) [concrete] +// CHECK:STDOUT: %Destroy.facet.09e: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.131, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc22_14.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0ae: %SubobjectDestroy.type = facet_value %A.7d2f7e.1, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f9b: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0ae) [concrete] +// CHECK:STDOUT: %Destroy.facet.797: %Destroy.type = facet_value %A.7d2f7e.1, (%DestroyImpl.impl_witness.f9b, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: %inst.name_ref: = inst_value [concrete] { // CHECK:STDOUT: %MakeB.ref: %B.MakeB.type = name_ref MakeB, @B.%B.MakeB.decl [concrete = %B.MakeB] // CHECK:STDOUT: } @@ -2538,63 +2100,9 @@ fn Run() { // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%inst.splice_block.426619.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_14.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc22_14.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_14.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc22_14.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_14.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.79c = ref_param_pattern [concrete = constants.%self.param_patt.df4] -// CHECK:STDOUT: %self.patt: %pattern_type.79c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.20d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.field.8fb = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.field.8fb = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22_14.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.79c = ref_param_pattern [concrete = constants.%self.param_patt.df4] -// CHECK:STDOUT: %self.patt: %pattern_type.79c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.20d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.field.8fb = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.field.8fb = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_14.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.709 = ref_param_pattern [concrete = constants.%self.param_patt.2a6] -// CHECK:STDOUT: %self.patt: %pattern_type.709 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.80c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A.7d2f7e.1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A.7d2f7e.1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc22_14.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.709 = ref_param_pattern [concrete = constants.%self.param_patt.2a6] -// CHECK:STDOUT: %self.patt: %pattern_type.709 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.80c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A.7d2f7e.1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A.7d2f7e.1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @A(%T.loc10_19.2: type) { @@ -2611,8 +2119,8 @@ fn Run() { // CHECK:STDOUT: %return.patt.loc12_14.1: @A.MakeA.%pattern_type (%pattern_type.fcb8f3.1) = return_slot_pattern %return.param_patt.loc12_20.1, %.loc12_20.9 [template = %return.patt.loc12_14.2 (constants.%return.patt.7fc6a1.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A.generic] -// CHECK:STDOUT: %.loc12_19: type = specific_constant @A.%T.loc10_19.2, @A(constants.%T) [template = %T (constants.%T)] -// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, %.loc12_19 [template = %T (constants.%T)] +// CHECK:STDOUT: %.loc12_19: type = specific_constant @A.%T.loc10_19.2, @A(constants.%T.67d) [template = %T (constants.%T.67d)] +// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, %.loc12_19 [template = %T (constants.%T.67d)] // CHECK:STDOUT: %.loc12_20.7: type = type_of_inst %.loc12_20.1 [template = %.loc12_20.2 (constants.%.23e)] // CHECK:STDOUT: %.loc12_20.8: @A.MakeA.%.loc12_20.2 (%.23e) = splice_inst %.loc12_20.1 [template = %.loc12_20.3 (constants.%.296)] // CHECK:STDOUT: %.loc12_20.9: type = splice_inst %.loc12_20.4 [template = %.loc12_20.5 (constants.%.5372ba.1)] @@ -2633,7 +2141,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @A.MakeA(@A.%T.loc10_19.2: type) { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0, template [template = %T (constants.%T)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0, template [template = %T (constants.%T.67d)] // CHECK:STDOUT: %.loc12_20.1: = call_action (%A.ref, %T.ref.loc12), false [template] // CHECK:STDOUT: %.loc12_20.2: type = type_of_inst %.loc12_20.1 [template = %.loc12_20.2 (constants.%.23e)] // CHECK:STDOUT: %.loc12_20.3: @A.MakeA.%.loc12_20.2 (%.23e) = splice_inst %.loc12_20.1 [template = %.loc12_20.3 (constants.%.296)] @@ -2660,8 +2168,8 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: @A.MakeA.%.loc12_20.5 (%.5372ba.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_22: type = specific_constant @A.%T.loc10_19.2, @A(constants.%T) [template = %T (constants.%T)] -// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %.loc13_22 [template = %T (constants.%T)] +// CHECK:STDOUT: %.loc13_22: type = specific_constant @A.%T.loc10_19.2, @A(constants.%T.67d) [template = %T (constants.%T.67d)] +// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %.loc13_22 [template = %T (constants.%T.67d)] // CHECK:STDOUT: %.loc13_23.1: type = type_of_inst %.loc13_23.3 [template = %.loc13_23.4 (constants.%.a08)] // CHECK:STDOUT: %.loc13_23.2: @A.MakeA.%.loc13_23.4 (%.a08) = splice_inst %.loc13_23.3 [template = %.loc13_23.5 (constants.%.5c2)] // CHECK:STDOUT: %.loc13_30.1: type = type_of_inst %.loc13_30.3 [template = %.loc13_30.4 (constants.%.308)] @@ -2683,71 +2191,47 @@ fn Run() { // CHECK:STDOUT: %.loc22_14.1: ref %A.7d2f7e.1 = temporary_storage // CHECK:STDOUT: %A.MakeA.call: init %A.7d2f7e.1 to %.loc22_14.1 = call %A.MakeA.specific_fn() // CHECK:STDOUT: %.loc22_14.2: ref %A.7d2f7e.1 = temporary %.loc22_14.1, %A.MakeA.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc22_14.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc22_14.2) +// CHECK:STDOUT: %Destroy.facet.loc22_14.1: %Destroy.type = facet_value constants.%A.7d2f7e.1, (constants.%DestroyImpl.impl_witness.f9b, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.797] +// CHECK:STDOUT: %.loc22_14.3: %Destroy.type = converted constants.%A.7d2f7e.1, %Destroy.facet.loc22_14.1 [concrete = constants.%Destroy.facet.797] +// CHECK:STDOUT: %Destroy.facet.loc22_14.2: %Destroy.type = facet_value constants.%A.7d2f7e.1, (constants.%DestroyImpl.impl_witness.f9b, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.797] +// CHECK:STDOUT: %.loc22_14.4: %Destroy.type = converted constants.%A.7d2f7e.1, %Destroy.facet.loc22_14.2 [concrete = constants.%Destroy.facet.797] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc22_14.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_14.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_14.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_14.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_14.2(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_14.1(%self.param: ref %empty_struct_type) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_14.3(%self.param: ref %struct_type.field.8fb) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc22_14.1: ref %B = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc22_14.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc22_14.2: %Destroy.type = converted constants.%B, %Destroy.facet.loc22_14.1 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %Destroy.facet.loc22_14.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc22_14.3: %Destroy.type = converted constants.%B, %Destroy.facet.loc22_14.2 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc22_14.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_14.2(%self.param: ref %B) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_14.2(%self.param: ref %B) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_14.2(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_14.3(%self.param: ref %struct_type.field.8fb) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22: ref %B = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc22, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc22) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_14.3(%self.param: ref %struct_type.field.8fb) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_14.3(%self.param: ref %struct_type.field.8fb) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_14.4(%self.param: ref %A.7d2f7e.1) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_14.4(%self.param: ref %A.7d2f7e.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %field.ref: %A.elem.77c = name_ref field, @A.%field_decl [concrete = @A.%field_decl] -// CHECK:STDOUT: %.loc22: ref %B = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc22, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc22) +// CHECK:STDOUT: %.loc22_14.1: ref %B = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc22_14.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc22_14.2: %Destroy.type = converted constants.%B, %Destroy.facet.loc22_14.1 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %Destroy.facet.loc22_14.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc22_14.3: %Destroy.type = converted constants.%B, %Destroy.facet.loc22_14.2 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc22_14.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_14.4(%self.param: ref %A.7d2f7e.1) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_14.4(%self.param: ref %A.7d2f7e.1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @A(constants.%T) { -// CHECK:STDOUT: %T.patt.loc10_19.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc10_19.1 => constants.%T +// CHECK:STDOUT: specific @A(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc10_19.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc10_19.1 => constants.%T.67d // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A.MakeA.type => constants.%A.MakeA.type.6e4 @@ -2759,8 +2243,8 @@ fn Run() { // CHECK:STDOUT: %complete_type.loc18_1.2 => constants.%complete_type.725 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.MakeA(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @A.MakeA(constants.%T.67d) { +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %.loc12_20.1 => constants.%.082 // CHECK:STDOUT: %.loc12_20.2 => constants.%.9ff // CHECK:STDOUT: %.loc12_20.3 => constants.%.13f @@ -2773,7 +2257,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%B) { -// CHECK:STDOUT: %T.patt.loc10_19.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc10_19.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc10_19.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2818,7 +2302,6 @@ fn Run() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %B: type = class_type @B [concrete] -// CHECK:STDOUT: %pattern_type.e39: type = pattern_type %B [concrete] // CHECK:STDOUT: %B.MakeB.type: type = fn_type @B.MakeB [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %B.MakeB: %B.MakeB.type = struct_value () [concrete] @@ -2828,9 +2311,9 @@ fn Run() { // CHECK:STDOUT: %struct_type.field.8fb: type = struct_type {.field: %B} [concrete] // CHECK:STDOUT: %complete_type.08c: = complete_type_witness %struct_type.field.8fb [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0, template [template] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0, template [template] // CHECK:STDOUT: %.cbf: Core.Form = init_form %A [concrete] // CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete] // CHECK:STDOUT: %return.param_patt.f0c: %pattern_type.9ef = out_param_pattern [concrete] @@ -2854,36 +2337,23 @@ fn Run() { // CHECK:STDOUT: %Run.type: type = fn_type @Run [concrete] // CHECK:STDOUT: %Run: %Run.type = struct_value () [concrete] // CHECK:STDOUT: %MakeA.specific_fn: = specific_function %MakeA, @MakeA(%B) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_10.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc22_10.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_10.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc22_10.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22_10.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.79c: type = pattern_type %struct_type.field.8fb [concrete] -// CHECK:STDOUT: %self.param_patt.df4: %pattern_type.79c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.20d: %pattern_type.79c = wrapper_binding_pattern self, %self.param_patt.df4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_10.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc22_10.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_10.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc22_10.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22_10.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc22_10.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.92e: %SubobjectDestroy.type = facet_value %B, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.131: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.92e) [concrete] +// CHECK:STDOUT: %Destroy.facet.09e: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.131, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc22_10.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet.35e: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: %inst.name_ref: = inst_value [concrete] { // CHECK:STDOUT: %MakeB.ref: %B.MakeB.type = name_ref MakeB, @B.%B.MakeB.decl [concrete = %B.MakeB] // CHECK:STDOUT: } @@ -2899,69 +2369,15 @@ fn Run() { // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%inst.splice_block.426619.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_10.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc22_10.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_10.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc22_10.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_10.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.79c = ref_param_pattern [concrete = constants.%self.param_patt.df4] -// CHECK:STDOUT: %self.patt: %pattern_type.79c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.20d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.field.8fb = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.field.8fb = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22_10.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.79c = ref_param_pattern [concrete = constants.%self.param_patt.df4] -// CHECK:STDOUT: %self.patt: %pattern_type.79c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.20d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.field.8fb = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.field.8fb = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_10.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc22_10.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {} // CHECK:STDOUT: %MakeA.decl: %MakeA.type = fn_decl @MakeA [concrete = constants.%MakeA] { -// CHECK:STDOUT: %T.patt.loc15_20.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc15_20.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc15_20.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc15_20.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %return.param_patt: %pattern_type.9ef = out_param_pattern [concrete = constants.%return.param_patt.f0c] // CHECK:STDOUT: %return.patt: %pattern_type.9ef = return_slot_pattern %return.param_patt, %A.ref [concrete = constants.%return.patt.a6d] // CHECK:STDOUT: } { @@ -2971,7 +2387,7 @@ fn Run() { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc15_22.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc15_20.2: type = symbolic_binding T, 0, template [template = %T.loc15_20.1 (constants.%T)] +// CHECK:STDOUT: %T.loc15_20.2: type = symbolic_binding T, 0, template [template = %T.loc15_20.1 (constants.%T.67d)] // CHECK:STDOUT: %return.param: ref %A = out_param call_param0 // CHECK:STDOUT: %return: ref %A = return_slot %return.param // CHECK:STDOUT: } @@ -2992,8 +2408,8 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @MakeA(%T.loc15_20.2: type) { -// CHECK:STDOUT: %T.patt.loc15_20.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc15_20.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc15_20.1: type = symbolic_binding T, 0, template [template = %T.loc15_20.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc15_20.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc15_20.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc15_20.1: type = symbolic_binding T, 0, template [template = %T.loc15_20.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc17_16.3: = access_member_action %T.ref, MakeB [template] @@ -3011,7 +2427,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: %A { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_20.2 [template = %T.loc15_20.1 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_20.2 [template = %T.loc15_20.1 (constants.%T.67d)] // CHECK:STDOUT: %.loc17_16.1: type = type_of_inst %.loc17_16.3 [template = %.loc17_16.4 (constants.%.a08)] // CHECK:STDOUT: %.loc17_16.2: @MakeA.%.loc17_16.4 (%.a08) = splice_inst %.loc17_16.3 [template = %.loc17_16.5 (constants.%.5c2)] // CHECK:STDOUT: %.loc17_23.1: type = type_of_inst %.loc17_23.3 [template = %.loc17_23.4 (constants.%.308)] @@ -3032,75 +2448,51 @@ fn Run() { // CHECK:STDOUT: %.loc22_10.1: ref %A = temporary_storage // CHECK:STDOUT: %MakeA.call: init %A to %.loc22_10.1 = call %MakeA.specific_fn() // CHECK:STDOUT: %.loc22_10.2: ref %A = temporary %.loc22_10.1, %MakeA.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc22_10.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc22_10.2) +// CHECK:STDOUT: %Destroy.facet.loc22_10.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc22_10.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc22_10.1 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %Destroy.facet.loc22_10.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc22_10.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc22_10.2 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc22_10.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_10.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_10.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_10.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_10.2(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_10.1(%self.param: ref %empty_struct_type) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_10.3(%self.param: ref %struct_type.field.8fb) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc22_10.1: ref %B = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc22_10.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc22_10.2: %Destroy.type = converted constants.%B, %Destroy.facet.loc22_10.1 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %Destroy.facet.loc22_10.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc22_10.3: %Destroy.type = converted constants.%B, %Destroy.facet.loc22_10.2 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc22_10.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_10.2(%self.param: ref %B) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_10.2(%self.param: ref %B) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_10.2(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_10.3(%self.param: ref %struct_type.field.8fb) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22: ref %B = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc22, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc22) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_10.3(%self.param: ref %struct_type.field.8fb) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_10.3(%self.param: ref %struct_type.field.8fb) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_10.4(%self.param: ref %A) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_10.4(%self.param: ref %A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %field.ref: %A.elem = name_ref field, @A.%field_decl [concrete = @A.%field_decl] -// CHECK:STDOUT: %.loc22: ref %B = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc22, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc22) +// CHECK:STDOUT: %.loc22_10.1: ref %B = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc22_10.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc22_10.2: %Destroy.type = converted constants.%B, %Destroy.facet.loc22_10.1 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %Destroy.facet.loc22_10.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc22_10.3: %Destroy.type = converted constants.%B, %Destroy.facet.loc22_10.2 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc22_10.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_10.4(%self.param: ref %A) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_10.4(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @MakeA(constants.%T) { -// CHECK:STDOUT: %T.patt.loc15_20.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc15_20.1 => constants.%T +// CHECK:STDOUT: specific @MakeA(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc15_20.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc15_20.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @MakeA(constants.%B) { -// CHECK:STDOUT: %T.patt.loc15_20.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc15_20.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc15_20.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/generic/template/operator.carbon b/toolchain/check/testdata/generic/template/operator.carbon index 35ae4c06d994..85d9051f005c 100644 --- a/toolchain/check/testdata/generic/template/operator.carbon +++ b/toolchain/check/testdata/generic/template/operator.carbon @@ -87,8 +87,8 @@ fn G() { // CHECK:STDOUT: %struct_type.x.991: type = struct_type {.x: %i32} [concrete] // CHECK:STDOUT: %complete_type.c49: = complete_type_witness %struct_type.x.991 [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template] // CHECK:STDOUT: %T.67db0b.1: type = symbolic_binding T, 0, template [template] // CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T.67db0b.1 [template] // CHECK:STDOUT: %t.param_patt.d4a: %pattern_type.51d1c4.1 = ref_param_pattern [template] @@ -149,7 +149,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc8_16.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.patt.loc8_16.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %t.param_patt.loc8_29.1: @F.%pattern_type (%pattern_type.51d1c4.1) = ref_param_pattern [template = %t.param_patt.loc8_29.2 (constants.%t.param_patt.d4a)] // CHECK:STDOUT: %t.patt.loc8_29.1: @F.%pattern_type (%pattern_type.51d1c4.1) = wrapper_binding_pattern t, %t.param_patt.loc8_29.1 [template = %t.patt.loc8_29.2 (constants.%t.patt.e90)] // CHECK:STDOUT: } { @@ -165,7 +165,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc8_16.2: type) { -// CHECK:STDOUT: %T.patt.loc8_16.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.patt.loc8_16.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0, template [template = %T.patt.loc8_16.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %T.loc8_16.1: type = symbolic_binding T, 0, template [template = %T.loc8_16.1 (constants.%T.67db0b.1)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc8_16.1 [template = %pattern_type (constants.%pattern_type.51d1c4.1)] // CHECK:STDOUT: %t.param_patt.loc8_29.2: @F.%pattern_type (%pattern_type.51d1c4.1) = ref_param_pattern [template = %t.param_patt.loc8_29.2 (constants.%t.param_patt.d4a)] diff --git a/toolchain/check/testdata/generic/var_param.carbon b/toolchain/check/testdata/generic/var_param.carbon index 965e19d1daa1..c97a106b3ab0 100644 --- a/toolchain/check/testdata/generic/var_param.carbon +++ b/toolchain/check/testdata/generic/var_param.carbon @@ -66,36 +66,24 @@ fn Test(x: i32) { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc22 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -153,21 +141,16 @@ fn Test(x: i32) { // CHECK:STDOUT: %x.var: ref %i32 = var_storage @TestOp.%x.param_patt.loc22_24.1 // CHECK:STDOUT: assign %x.var, %Int.as.Copy.impl.Op.call // CHECK:STDOUT: %TestOp.call: init %empty_tuple.type = call %TestOp.specific_fn(%x.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc22_24.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc22_24.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_24.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc22_24.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc22_24.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_24.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @TestOp(constants.%T.dda) { // CHECK:STDOUT: %T.patt.loc22_12.2 => constants.%T.patt.1df diff --git a/toolchain/check/testdata/if/lifetime.carbon b/toolchain/check/testdata/if/lifetime.carbon index 426d7f0ffcfd..a7db0da3c338 100644 --- a/toolchain/check/testdata/if/lifetime.carbon +++ b/toolchain/check/testdata/if/lifetime.carbon @@ -39,57 +39,26 @@ fn F() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %A.F: %A.F.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete] // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_12.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc14_12.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_12.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc14_12.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_12.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_12.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_12.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc14_12.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_12.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc14_12.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -102,8 +71,12 @@ fn F() { // CHECK:STDOUT: %A.F.call: init bool = call %F.ref() // CHECK:STDOUT: %.loc14_17.1: bool = value_of_initializer %A.F.call // CHECK:STDOUT: %.loc14_17.2: bool = converted %A.F.call, %.loc14_17.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc14_12.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc14_12.2) +// CHECK:STDOUT: %Destroy.facet.loc14_12.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_12.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc14_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc14_12.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_12.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc14_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc14_12.2) // CHECK:STDOUT: if %.loc14_17.2 br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: @@ -115,25 +88,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_12.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_12.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_12.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_12.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_12.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.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 52380e6e8440..4b0a449454f6 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -77,23 +77,27 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc16_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7ec: %pattern_type.dc1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.902: %pattern_type.dc1 = wrapper_binding_pattern self, %self.param_patt.7ec [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc16_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b33: %SubobjectDestroy.type = facet_value %Array.00c, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d75: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b33) [concrete] +// CHECK:STDOUT: %Destroy.facet.2f1: %Destroy.type = facet_value %Array.00c, (%DestroyImpl.impl_witness.d75, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.408: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.2f1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -103,7 +107,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -116,38 +120,9 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc16_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc1 = ref_param_pattern [concrete = constants.%self.param_patt.7ec] -// CHECK:STDOUT: %self.patt: %pattern_type.dc1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.902] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.00c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.00c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc16_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc1 = ref_param_pattern [concrete = constants.%self.param_patt.7ec] -// CHECK:STDOUT: %self.patt: %pattern_type.dc1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.902] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.00c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.00c = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -197,8 +172,8 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %.loc16_29.3: ref %i32 = array_index %x.var, %int_0.loc16_29 // CHECK:STDOUT: %.loc16_29.4: init %i32 to %.loc16_29.3 = in_place_init %.loc16_29.2 [concrete = constants.%int_0.753] // CHECK:STDOUT: %.loc16_29.5: init %Array.00c to %x.var = array_init (%.loc16_29.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc16_3: init %Array.00c = converted %.loc16_29.1, %.loc16_29.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %x.var, %.loc16_3 +// CHECK:STDOUT: %.loc16_3.1: init %Array.00c = converted %.loc16_29.1, %.loc16_29.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %x.var, %.loc16_3.1 // CHECK:STDOUT: %.loc16_22: type = splice_block %Array [concrete = constants.%Array.00c] { // CHECK:STDOUT: %i32.loc16: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] @@ -233,37 +208,27 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_10.2: = bound_method %.loc17_10, %specific_fn.loc17 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc17_10.2(%.loc17_10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%Array.00c, (constants.%DestroyImpl.impl_witness.d75, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.2f1] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%Array.00c, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.2f1] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%Array.00c, (constants.%DestroyImpl.impl_witness.d75, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.2f1] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%Array.00c, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.2f1] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.2f1) [concrete = constants.%SelfDestruct.specific_fn.408] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %Array.00c) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_3.2(%self.param: ref %Array.00c) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc16: ref %i32 = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc16) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %Array.00c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.2(%self.param: ref %Array.00c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc16_3.1: ref %i32 = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc16_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index 7350f82eda3a..a1d8200d2088 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -54,7 +54,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] // CHECK:STDOUT: %ImplicitAs.type.6b0: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] @@ -109,25 +109,29 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %Copy.WithSelf.Op.type.9a2: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.652) [concrete] // CHECK:STDOUT: %.309: type = fn_type_with_self_type %Copy.WithSelf.Op.type.9a2, %Copy.facet.652 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.81f, @ptr.as.Copy.impl.Op(%i32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.6cc: %pattern_type.7dc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a12: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt.6cc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc28 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc28 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc28 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc27 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc27 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc27 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %t.param_patt: %pattern_type.9a5 = value_param_pattern [concrete] -// CHECK:STDOUT: %t.patt: %pattern_type.9a5 = wrapper_binding_pattern t, %t.param_patt [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc28 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d4d: %SubobjectDestroy.type = facet_value %ptr.a17, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b8f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d4d) [concrete] +// CHECK:STDOUT: %Destroy.facet.abb: %Destroy.type = facet_value %ptr.a17, (%DestroyImpl.impl_witness.b8f, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.690: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.abb) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc27 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %t.param_patt.277: %pattern_type.9a587c.1 = value_param_pattern [concrete] +// CHECK:STDOUT: %t.patt.3a0: %pattern_type.9a587c.1 = wrapper_binding_pattern t, %t.param_patt.277 [concrete] // CHECK:STDOUT: %PartiallyConstant.type: type = fn_type @PartiallyConstant [concrete] // CHECK:STDOUT: %PartiallyConstant: %PartiallyConstant.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -137,7 +141,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -150,38 +154,9 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.06a: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.20f) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.f12)] // CHECK:STDOUT: %Copy.impl_witness_table.fb0 = impl_witness_table (%Core.import_ref.06a), @ptr.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc28 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc28 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc27 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc27 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -241,8 +216,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %PartiallyConstant.decl: %PartiallyConstant.type = fn_decl @PartiallyConstant [concrete = constants.%PartiallyConstant] { -// CHECK:STDOUT: %t.param_patt: %pattern_type.9a5 = value_param_pattern [concrete = constants.%t.param_patt] -// CHECK:STDOUT: %t.patt: %pattern_type.9a5 = wrapper_binding_pattern t, %t.param_patt [concrete = constants.%t.patt] +// CHECK:STDOUT: %t.param_patt: %pattern_type.9a587c.1 = value_param_pattern [concrete = constants.%t.param_patt.277] +// CHECK:STDOUT: %t.patt: %pattern_type.9a587c.1 = wrapper_binding_pattern t, %t.param_patt [concrete = constants.%t.patt.3a0] // CHECK:STDOUT: %return.param_patt: %pattern_type.d94 = out_param_pattern [concrete = constants.%return.param_patt.299] // CHECK:STDOUT: %return.patt: %pattern_type.d94 = return_slot_pattern %return.param_patt, %i32.loc32 [concrete = constants.%return.patt.6fa] // CHECK:STDOUT: } { @@ -347,8 +322,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_3.2: = bound_method %int_1, %specific_fn.loc27 [concrete = constants.%bound_method.3bd] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc27_3.2(%int_1) [concrete = constants.%int_1.68a] -// CHECK:STDOUT: %.loc27_3: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a] -// CHECK:STDOUT: assign %v.var, %.loc27_3 +// CHECK:STDOUT: %.loc27_3.1: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a] +// CHECK:STDOUT: assign %v.var, %.loc27_3.1 // CHECK:STDOUT: br !.loc27_13 // CHECK:STDOUT: // CHECK:STDOUT: !.loc27_13: @@ -399,7 +374,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: br !if.expr.result.loc28(%ptr.loc28) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc28: -// CHECK:STDOUT: %.loc28: type = block_arg !if.expr.result.loc28 [concrete = constants.%ptr.a17] +// CHECK:STDOUT: %.loc28_10: type = block_arg !if.expr.result.loc28 [concrete = constants.%ptr.a17] // CHECK:STDOUT: br !.loc28_8 // CHECK:STDOUT: // CHECK:STDOUT: !.loc28_8: @@ -417,34 +392,24 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc29_10.2: = bound_method %.loc29_10.2, %specific_fn.loc29 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc29_10.2(%.loc29_10.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc28: = bound_method %w.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc28: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc28(%w.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc27: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc27(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc28_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc28_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc28_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc28_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc28_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc28_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abb) [concrete = constants.%SelfDestruct.specific_fn.690] +// CHECK:STDOUT: %SelfDestruct.call.loc28: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%w.var) +// CHECK:STDOUT: %Destroy.facet.loc27_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc27_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc27_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc27_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc27_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc27_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc27: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%v.var) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc28(%self.param: ref %ptr.a17) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc28(%self.param: ref %ptr.a17) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc28(%self.param: ref %ptr.a17) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc28(%self.param: ref %ptr.a17) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc27(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc27(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @PartiallyConstant(%t.param: type) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: @@ -455,8 +420,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %specific_fn.loc33: = specific_function %impl.elem0.loc33, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc33_3.2: = bound_method %int_1, %specific_fn.loc33 [concrete = constants.%bound_method.3bd] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc33_3.2(%int_1) [concrete = constants.%int_1.68a] -// CHECK:STDOUT: %.loc33_3: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a] -// CHECK:STDOUT: assign %v.var, %.loc33_3 +// CHECK:STDOUT: %.loc33_3.1: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a] +// CHECK:STDOUT: assign %v.var, %.loc33_3.1 // CHECK:STDOUT: br !.loc33_13 // CHECK:STDOUT: // CHECK:STDOUT: !.loc33_13: @@ -506,7 +471,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: br !if.expr.result.loc34(%ptr) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc34: -// CHECK:STDOUT: %.loc34: type = block_arg !if.expr.result.loc34 [concrete = constants.%ptr.a17] +// CHECK:STDOUT: %.loc34_10: type = block_arg !if.expr.result.loc34 [concrete = constants.%ptr.a17] // CHECK:STDOUT: br !.loc34_8 // CHECK:STDOUT: // CHECK:STDOUT: !.loc34_8: @@ -524,10 +489,18 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc35_10.2: = bound_method %.loc35_10.2, %specific_fn.loc35 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc35_10.2(%.loc35_10.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc34: = bound_method %w.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc34: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc34(%w.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc33: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc33: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc33(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc34_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc34_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc34_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc34_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc34_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc34_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abb) [concrete = constants.%SelfDestruct.specific_fn.690] +// CHECK:STDOUT: %SelfDestruct.call.loc34: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%w.var) +// CHECK:STDOUT: %Destroy.facet.loc33_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc33_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc33: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%v.var) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon index 5f9b7b087360..05669f688c9a 100644 --- a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon +++ b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon @@ -52,20 +52,21 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Bool: type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = bool] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -120,9 +121,9 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %t.param_patt: %pattern_type.9a5 = value_param_pattern [concrete] -// CHECK:STDOUT: %t.patt: %pattern_type.9a5 = wrapper_binding_pattern t, %t.param_patt [concrete] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %t.param_patt.277: %pattern_type.9a587c.1 = value_param_pattern [concrete] +// CHECK:STDOUT: %t.patt.3a0: %pattern_type.9a587c.1 = wrapper_binding_pattern t, %t.param_patt.277 [concrete] // CHECK:STDOUT: %ChosenBranchIsNonConstant.type: type = fn_type @ChosenBranchIsNonConstant [concrete] // CHECK:STDOUT: %ChosenBranchIsNonConstant: %ChosenBranchIsNonConstant.type = struct_value () [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] @@ -132,18 +133,19 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %false: bool = bool_literal false [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -153,8 +155,8 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ChosenBranchIsNonConstant.decl: %ChosenBranchIsNonConstant.type = fn_decl @ChosenBranchIsNonConstant [concrete = constants.%ChosenBranchIsNonConstant] { -// CHECK:STDOUT: %t.param_patt: %pattern_type.9a5 = value_param_pattern [concrete = constants.%t.param_patt] -// CHECK:STDOUT: %t.patt: %pattern_type.9a5 = wrapper_binding_pattern t, %t.param_patt [concrete = constants.%t.patt] +// CHECK:STDOUT: %t.param_patt: %pattern_type.9a587c.1 = value_param_pattern [concrete = constants.%t.param_patt.277] +// CHECK:STDOUT: %t.patt: %pattern_type.9a587c.1 = wrapper_binding_pattern t, %t.param_patt [concrete = constants.%t.patt.3a0] // CHECK:STDOUT: } { // CHECK:STDOUT: %t.param: type = value_param call_param0 // CHECK:STDOUT: %.loc4: type = type_literal type [concrete = type] diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index c7a292a6802f..567557ed03e4 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -58,7 +58,6 @@ fn F(cond: bool) { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3bd: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] @@ -66,23 +65,27 @@ fn F(cond: bool) { // CHECK:STDOUT: %bound_method.a55: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.2e0: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %struct.940: %struct_type.a.b.250 = struct_value (%int_1.68a, %int_2.2e0) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.490: %pattern_type.290 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a39: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt.490 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.582: %SubobjectDestroy.type = facet_value %struct_type.a.b.250, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6b7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.582) [concrete] +// CHECK:STDOUT: %Destroy.facet.6bf: %Destroy.type = facet_value %struct_type.a.b.250, (%DestroyImpl.impl_witness.6b7, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.20b: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.6bf) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -90,7 +93,7 @@ fn F(cond: bool) { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -99,38 +102,9 @@ fn F(cond: bool) { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc18_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.290 = ref_param_pattern [concrete = constants.%self.param_patt.490] -// CHECK:STDOUT: %self.patt: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a39] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.250 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.250 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc18_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.290 = ref_param_pattern [concrete = constants.%self.param_patt.490] -// CHECK:STDOUT: %self.patt: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a39] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.250 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.250 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -187,8 +161,8 @@ fn F(cond: bool) { // CHECK:STDOUT: %.loc18_46.6: ref %i32 = struct_access %a.var, element1 // CHECK:STDOUT: %.loc18_46.7: init %i32 to %.loc18_46.6 = in_place_init %.loc18_46.5 [concrete = constants.%int_2.2e0] // CHECK:STDOUT: %.loc18_46.8: init %struct_type.a.b.250 to %a.var = struct_init (%.loc18_46.4, %.loc18_46.7) [concrete = constants.%struct.940] -// CHECK:STDOUT: %.loc18_3: init %struct_type.a.b.250 = converted %.loc18_46.1, %.loc18_46.8 [concrete = constants.%struct.940] -// CHECK:STDOUT: assign %a.var, %.loc18_3 +// CHECK:STDOUT: %.loc18_3.1: init %struct_type.a.b.250 = converted %.loc18_46.1, %.loc18_46.8 [concrete = constants.%struct.940] +// CHECK:STDOUT: assign %a.var, %.loc18_3.1 // CHECK:STDOUT: %.loc18_27: type = splice_block %struct_type.a.b [concrete = constants.%struct_type.a.b.250] { // CHECK:STDOUT: %i32.loc18_15: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %i32.loc18_24: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -226,39 +200,33 @@ fn F(cond: bool) { // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc19_5: %struct_type.a.b.250 = block_arg !if.expr.result // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref(%.loc19_5) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%struct_type.a.b.250, (constants.%DestroyImpl.impl_witness.6b7, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%struct_type.a.b.250, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%struct_type.a.b.250, (constants.%DestroyImpl.impl_witness.6b7, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%struct_type.a.b.250, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.6bf) [concrete = constants.%SelfDestruct.specific_fn.20b] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %struct_type.a.b.250) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_3.2(%self.param: ref %struct_type.a.b.250) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18_3.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_3.1: = bound_method %.loc18_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_3.1(%.loc18_3.1) -// CHECK:STDOUT: %.loc18_3.2: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_3.2: = bound_method %.loc18_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_3.2(%.loc18_3.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.2(%self.param: ref %struct_type.a.b.250) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_3.2(%self.param: ref %struct_type.a.b.250) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc18_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc18_3.1) +// CHECK:STDOUT: %.loc18_3.4: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc18_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc18_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc18_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/custom_witness/fail_todo_require_impls_for_impl_in_class.carbon b/toolchain/check/testdata/impl/custom_witness/fail_todo_require_impls_for_impl_in_class.carbon new file mode 100644 index 000000000000..f5c9de50517c --- /dev/null +++ b/toolchain/check/testdata/impl/custom_witness/fail_todo_require_impls_for_impl_in_class.carbon @@ -0,0 +1,41 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/custom_witness/fail_todo_require_impls_for_impl_in_class.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/custom_witness/fail_todo_require_impls_for_impl_in_class.carbon + +// --- destroy.carbon + +package Core library "prelude/destroy"; + +interface SubobjectDestroy { + fn Op(ref self); +} + +interface DestroyImpl { + require impls SubobjectDestroy; + + fn Op(ref self); +} + +impl forall [T: SubobjectDestroy] T as DestroyImpl { + fn Op(ref self) = "no_op"; +} + +// --- fail_todo_require_impls_for_impl_in_class.carbon + +import Core library "prelude/destroy"; + +class NonTrivialDestroy { + // CHECK:STDERR: fail_todo_require_impls_for_impl_in_class.carbon:[[@LINE+2]]:3-28: error: interface `DestroyImpl` being implemented requires that `NonTrivialDestroy` implements `Core.SubobjectDestroy` [InterfaceRequireImplsNotImplemented] + // CHECK:STDERR: + impl as Core.DestroyImpl { + fn Op(unused ref self) {} + } +} diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index ed60656db68e..39ca4ec52e1d 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -57,8 +57,8 @@ class X(U: type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %HasF.type.c96: type = generic_interface_type @HasF [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -144,30 +144,27 @@ class X(U: type) { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_27.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc22_27.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22_27.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.38e: type = pattern_type %struct_type.x.991 [concrete] -// CHECK:STDOUT: %self.param_patt.eec: %pattern_type.38e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0ef: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt.eec [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_27.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc22_27.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.4da: %pattern_type.116 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.335: %pattern_type.116 = wrapper_binding_pattern self, %self.param_patt.4da [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_27.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc22_27.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22_27.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc22_27.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc22_27.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.92e: %SubobjectDestroy.type = facet_value %Param, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.8dd: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.92e) [concrete] +// CHECK:STDOUT: %Destroy.facet.2bd: %Destroy.type = facet_value %Param, (%DestroyImpl.impl_witness.8dd, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.328: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.2bd) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -175,7 +172,7 @@ class X(U: type) { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -186,52 +183,9 @@ class X(U: type) { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_27.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc22_27.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_27.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.38e = ref_param_pattern [concrete = constants.%self.param_patt.eec] -// CHECK:STDOUT: %self.patt: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0ef] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.x.991 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.x.991 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc22_27.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.38e = ref_param_pattern [concrete = constants.%self.param_patt.eec] -// CHECK:STDOUT: %self.patt: %pattern_type.38e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0ef] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.x.991 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.x.991 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_27.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.116 = ref_param_pattern [concrete = constants.%self.param_patt.4da] -// CHECK:STDOUT: %self.patt: %pattern_type.116 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.335] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Param = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Param = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22_27.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.116 = ref_param_pattern [concrete = constants.%self.param_patt.4da] -// CHECK:STDOUT: %self.patt: %pattern_type.116 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.335] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Param = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Param = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -244,7 +198,7 @@ class X(U: type) { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %HasF.decl: %HasF.type.c96 = interface_decl @HasF [concrete = constants.%HasF.generic] { -// CHECK:STDOUT: %T.patt.loc4_17.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc4_17.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_19.1: type = splice_block %.loc4_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -265,7 +219,7 @@ class X(U: type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @HasF(%T.loc4_17.2: type) { -// CHECK:STDOUT: %T.patt.loc4_17.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc4_17.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_17.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %T.loc4_17.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_17.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -419,63 +373,56 @@ class X(U: type) { // CHECK:STDOUT: %b.patt: %pattern_type.d94 = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.d94 = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22_27: = bound_method %.loc22_27.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22_27: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22_27(%.loc22_27.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22_3: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22_3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22_3(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21: = bound_method %.loc21_27.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21(%.loc21_27.2) +// CHECK:STDOUT: %Destroy.facet.loc22_27.1: %Destroy.type = facet_value constants.%Param, (constants.%DestroyImpl.impl_witness.8dd, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.2bd] +// CHECK:STDOUT: %.loc22_27.3: %Destroy.type = converted constants.%Param, %Destroy.facet.loc22_27.1 [concrete = constants.%Destroy.facet.2bd] +// CHECK:STDOUT: %Destroy.facet.loc22_27.2: %Destroy.type = facet_value constants.%Param, (constants.%DestroyImpl.impl_witness.8dd, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.2bd] +// CHECK:STDOUT: %.loc22_27.4: %Destroy.type = converted constants.%Param, %Destroy.facet.loc22_27.2 [concrete = constants.%Destroy.facet.2bd] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.2bd) [concrete = constants.%SelfDestruct.specific_fn.328] +// CHECK:STDOUT: %SelfDestruct.call.loc22_27: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc22_27.2) +// CHECK:STDOUT: %Destroy.facet.loc22_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc22_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc22_3: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc21_27.1: %Destroy.type = facet_value constants.%Param, (constants.%DestroyImpl.impl_witness.8dd, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.2bd] +// CHECK:STDOUT: %.loc21_27.3: %Destroy.type = converted constants.%Param, %Destroy.facet.loc21_27.1 [concrete = constants.%Destroy.facet.2bd] +// CHECK:STDOUT: %Destroy.facet.loc21_27.2: %Destroy.type = facet_value constants.%Param, (constants.%DestroyImpl.impl_witness.8dd, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.2bd] +// CHECK:STDOUT: %.loc21_27.4: %Destroy.type = converted constants.%Param, %Destroy.facet.loc21_27.2 [concrete = constants.%Destroy.facet.2bd] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.2bd) [concrete = constants.%SelfDestruct.specific_fn.328] +// CHECK:STDOUT: %SelfDestruct.call.loc21: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc21_27.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_27.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_27.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_27.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_27.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_27.2(%self.param: ref %struct_type.x.991) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc22_27.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc22_27.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_27.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_27.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc22_27.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_27.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_27.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc22_27.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_27.2(%self.param: ref %struct_type.x.991) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc22, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc22) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_27.2(%self.param: ref %struct_type.x.991) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_27.2(%self.param: ref %struct_type.x.991) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_27.3(%self.param: ref %Param) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_27.3(%self.param: ref %Param) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %Param.elem = name_ref x, @Param.%field_decl [concrete = @Param.%field_decl] -// CHECK:STDOUT: %.loc22: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc22, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc22) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_27.3(%self.param: ref %Param) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_27.3(%self.param: ref %Param) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc22_27.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc22_27.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_27.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_27.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc22_27.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_27.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_27.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc22_27.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasF(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc4_17.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: @@ -490,7 +437,7 @@ class X(U: type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasF(constants.%Param) { -// CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc4_17.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc4_17.1 => constants.%Param // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index 01352c93ed69..1c6e69002ffd 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -210,64 +210,31 @@ fn F() { // CHECK:STDOUT: %Z.WithSelf.Zero.type.4ff: type = fn_type @Z.WithSelf.Zero, @Z.WithSelf(%Point) [concrete] // CHECK:STDOUT: %Z.WithSelf.Zero.50c: %Z.WithSelf.Zero.type.4ff = struct_value () [concrete] // CHECK:STDOUT: %.075: type = fn_type_with_self_type %Z.WithSelf.Zero.type.e9c, %Z.facet [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc23_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.9d8: type = pattern_type %Point [concrete] -// CHECK:STDOUT: %self.param_patt.e02: %pattern_type.9d8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.8c1: %pattern_type.9d8 = wrapper_binding_pattern self, %self.param_patt.e02 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc23_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.e6b, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.04d: %SubobjectDestroy.type = facet_value %Point, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.222: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.04d) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Point, (%DestroyImpl.impl_witness.222, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc23_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9d8 = ref_param_pattern [concrete = constants.%self.param_patt.e02] -// CHECK:STDOUT: %self.patt: %pattern_type.9d8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8c1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Point = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Point = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc23_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9d8 = ref_param_pattern [concrete = constants.%self.param_patt.e02] -// CHECK:STDOUT: %self.patt: %pattern_type.9d8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8c1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Point = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Point = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -377,31 +344,18 @@ fn F() { // CHECK:STDOUT: %Zero.ref: %Z.assoc_type = name_ref Zero, @Z.WithSelf.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: %.075 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%Point.as.Z.impl.Zero] // CHECK:STDOUT: %Point.as.Z.impl.Zero.call: init %empty_tuple.type = call %impl.elem0() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.e6b) +// CHECK:STDOUT: %Destroy.facet.loc23_7.1: %Destroy.type = facet_value constants.%Point, (constants.%DestroyImpl.impl_witness.222, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_7.3: %Destroy.type = converted constants.%Point, %Destroy.facet.loc23_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc23_7.2: %Destroy.type = facet_value constants.%Point, (constants.%DestroyImpl.impl_witness.222, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_7.4: %Destroy.type = converted constants.%Point, %Destroy.facet.loc23_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc23_7.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_7.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_7.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_7.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_7.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_7.2(%self.param: ref %Point) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_7.2(%self.param: ref %Point) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_7.2(%self.param: ref %Point) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_7.2(%self.param: ref %Point) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%Self.cb6) { // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index 1bfeb95b688f..222c0ad6b6c4 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -276,63 +276,31 @@ class X { // CHECK:STDOUT: %.18a: type = fn_type_with_self_type %Z.WithSelf.Method.type.322, %Z.facet [concrete] // CHECK:STDOUT: %Point.as.Z.impl.Method.bound: = bound_method %Point.val, %Point.as.Z.impl.Method [concrete] // CHECK:STDOUT: %.e6b: ref %Point = temporary invalid, %Point.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc27_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc27_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e02: %pattern_type.9d8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.8c1: %pattern_type.9d8 = wrapper_binding_pattern self, %self.param_patt.e02 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc27_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc27_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc27_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.e6b, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc27_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.04d: %SubobjectDestroy.type = facet_value %Point, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.222: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.04d) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Point, (%DestroyImpl.impl_witness.222, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc27_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc27_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc27_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9d8 = ref_param_pattern [concrete = constants.%self.param_patt.e02] -// CHECK:STDOUT: %self.patt: %pattern_type.9d8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8c1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Point = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Point = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc27_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9d8 = ref_param_pattern [concrete = constants.%self.param_patt.e02] -// CHECK:STDOUT: %self.patt: %pattern_type.9d8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8c1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Point = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Point = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -519,31 +487,18 @@ class X { // CHECK:STDOUT: %.loc27_7.2: ref %Point = temporary %.loc27_5.2, %.loc27_7.1 [concrete = constants.%.e6b] // CHECK:STDOUT: %.loc27_7.3: %Point = acquire_value %.loc27_7.2 [concrete = constants.%Point.val] // CHECK:STDOUT: %Point.as.Z.impl.Method.call: init %empty_tuple.type = call %bound_method(%.loc27_7.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.e6b) +// CHECK:STDOUT: %Destroy.facet.loc27_7.1: %Destroy.type = facet_value constants.%Point, (constants.%DestroyImpl.impl_witness.222, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc27_7.4: %Destroy.type = converted constants.%Point, %Destroy.facet.loc27_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc27_7.2: %Destroy.type = facet_value constants.%Point, (constants.%DestroyImpl.impl_witness.222, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc27_7.5: %Destroy.type = converted constants.%Point, %Destroy.facet.loc27_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc27_7.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_7.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc27_7.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27_7.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc27_7.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_7.2(%self.param: ref %Point) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27_7.2(%self.param: ref %Point) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc27_7.2(%self.param: ref %Point) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc27_7.2(%self.param: ref %Point) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @Z.WithSelf(constants.%Self.cb6) { // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index cc37b1505830..b797fa494838 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -51,62 +51,31 @@ class C { // CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc23_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc23_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc23_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc23_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -173,40 +142,26 @@ class C { // CHECK:STDOUT: %c.var: ref %C = var_storage %c.var_patt // CHECK:STDOUT: %.loc23_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc23_26.2: init %C to %c.var = class_init () [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc23_7: init %C = converted %.loc23_26.1, %.loc23_26.2 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %c.var, %.loc23_7 +// CHECK:STDOUT: %.loc23_7.1: init %C = converted %.loc23_26.1, %.loc23_26.2 [concrete = constants.%C.val] +// CHECK:STDOUT: assign %c.var, %.loc23_7.1 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = wrapper_binding c, %c.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete = constants.%c.patt] // CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete = constants.%c.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc23_7.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_7.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc23_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc23_7.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_7.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc23_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%c.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_7.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_7.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_7.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_7.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_7.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_7.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple.WithSelf(constants.%Self.f79) { // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/impl/impl_thunk.carbon b/toolchain/check/testdata/impl/impl_thunk.carbon index 8ae0fa6d3f1e..26ba75fdf98a 100644 --- a/toolchain/check/testdata/impl/impl_thunk.carbon +++ b/toolchain/check/testdata/impl/impl_thunk.carbon @@ -341,77 +341,34 @@ impl () as I({}) { // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_48.2 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bd5be1.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = struct_value () [concrete] // CHECK:STDOUT: %struct: %struct_type.c.d.15a = struct_value (%empty_tuple, %empty_struct) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_48.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_48.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_48.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_48.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_48.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_48.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e6d: %pattern_type.844 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.82a: %pattern_type.844 = wrapper_binding_pattern self, %self.param_patt.e6d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_48.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_48.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_48.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_48.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_48.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_48.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet.939: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6b7: %SubobjectDestroy.type = facet_value %empty_struct_type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.011: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6b7) [concrete] +// CHECK:STDOUT: %Destroy.facet.fed: %Destroy.type = facet_value %empty_struct_type, (%DestroyImpl.impl_witness.011, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.110: %SubobjectDestroy.type = facet_value %struct_type.d.c.b36, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ad4: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.110) [concrete] +// CHECK:STDOUT: %Destroy.facet.82e: %Destroy.type = facet_value %struct_type.d.c.b36, (%DestroyImpl.impl_witness.ad4, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_48.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_48.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_48.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_48.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_48.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.844 = ref_param_pattern [concrete = constants.%self.param_patt.e6d] -// CHECK:STDOUT: %self.patt: %pattern_type.844 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.82a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.d.c.b36 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.d.c.b36 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_48.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.844 = ref_param_pattern [concrete = constants.%self.param_patt.e6d] -// CHECK:STDOUT: %self.patt: %pattern_type.844 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.82a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.d.c.b36 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.d.c.b36 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.I.impl: %.loc8_7.2 as %I.ref { @@ -477,50 +434,35 @@ impl () as I({}) { // CHECK:STDOUT: %.loc10_48.15: init %empty_struct_type to %.loc10_48.12 = in_place_init %.loc10_48.14 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_48.16: init %struct_type.c.d.15a to %return.param = struct_init (%.loc10_48.10, %.loc10_48.15) [concrete = constants.%struct] // CHECK:STDOUT: %.loc10_48.17: init %struct_type.c.d.15a = converted %empty_tuple.type.as.I.impl.F.call, %.loc10_48.16 [concrete = constants.%struct] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc10_48.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc10_48.5) +// CHECK:STDOUT: %Destroy.facet.loc10_48.1: %Destroy.type = facet_value constants.%struct_type.d.c.b36, (constants.%DestroyImpl.impl_witness.ad4, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.82e] +// CHECK:STDOUT: %.loc10_48.18: %Destroy.type = converted constants.%struct_type.d.c.b36, %Destroy.facet.loc10_48.1 [concrete = constants.%Destroy.facet.82e] +// CHECK:STDOUT: %Destroy.facet.loc10_48.2: %Destroy.type = facet_value constants.%struct_type.d.c.b36, (constants.%DestroyImpl.impl_witness.ad4, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.82e] +// CHECK:STDOUT: %.loc10_48.19: %Destroy.type = converted constants.%struct_type.d.c.b36, %Destroy.facet.loc10_48.2 [concrete = constants.%Destroy.facet.82e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc10_48.5) // CHECK:STDOUT: return %.loc10_48.17 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_48.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_48.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_48.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_48.2(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_48.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_48.2(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_48.2(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_48.2(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_48.3(%self.param: ref %struct_type.d.c.b36) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_48.3(%self.param: ref %struct_type.d.c.b36) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc10_48.1: ref %empty_tuple.type = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_48.1: = bound_method %.loc10_48.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_48.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_48.1(%.loc10_48.1) -// CHECK:STDOUT: %.loc10_48.2: ref %empty_struct_type = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_48.2: = bound_method %.loc10_48.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_48.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_48.2(%.loc10_48.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_48.3(%self.param: ref %struct_type.d.c.b36) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_48.3(%self.param: ref %struct_type.d.c.b36) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc10_48.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc10_48.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc10_48.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc10_48.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc10_48.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc10_48.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_48.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_48.1) +// CHECK:STDOUT: %.loc10_48.4: ref %empty_struct_type = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc10_48.3: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_48.5: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_48.3 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %Destroy.facet.loc10_48.4: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_48.6: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_48.4 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_48.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_48.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1093,98 +1035,30 @@ impl () as I({}) { // CHECK:STDOUT: %A.as.X.impl.F.type.48cdab.1: type = fn_type @A.as.X.impl.F.loc17_14.1 [concrete] // CHECK:STDOUT: %A.as.X.impl.F.bd5be1.1: %A.as.X.impl.F.type.48cdab.1 = struct_value () [concrete] // CHECK:STDOUT: %X.facet: %X.type = facet_value %A, (%X.impl_witness) [concrete] -// CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete] // CHECK:STDOUT: %A.as.X.impl.F.type.48cdab.2: type = fn_type @A.as.X.impl.F.loc17_14.2 [concrete] // CHECK:STDOUT: %A.as.X.impl.F.bd5be1.2: %A.as.X.impl.F.type.48cdab.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17_14.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc17_14.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17_14.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc17_14.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17_14.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.7bd: type = pattern_type %struct_type.base.cb7 [concrete] -// CHECK:STDOUT: %self.param_patt.c67: %pattern_type.7bd = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e77: %pattern_type.7bd = wrapper_binding_pattern self, %self.param_patt.c67 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17_14.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc17_14.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17_14.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc17_14.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17_14.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc17_14.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet.35e: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc17_14.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.92e: %SubobjectDestroy.type = facet_value %B, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.131: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.92e) [concrete] +// CHECK:STDOUT: %Destroy.facet.09e: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.131, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17_14.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc17_14.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17_14.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc17_14.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17_14.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7bd = ref_param_pattern [concrete = constants.%self.param_patt.c67] -// CHECK:STDOUT: %self.patt: %pattern_type.7bd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e77] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.cb7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.cb7 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc17_14.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7bd = ref_param_pattern [concrete = constants.%self.param_patt.c67] -// CHECK:STDOUT: %self.patt: %pattern_type.7bd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e77] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.cb7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.cb7 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17_14.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc17_14.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @A.as.X.impl: %A.ref as %X.ref { @@ -1223,65 +1097,41 @@ impl () as I({}) { // CHECK:STDOUT: %.loc17_14.3: ref %A = class_element_access %.loc17_14.2, element0 // CHECK:STDOUT: %.loc17_14.4: ref %A = converted %A.as.X.impl.F.call, %.loc17_14.3 // CHECK:STDOUT: %.loc17_14.5: %A = acquire_value %.loc17_14.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc17_14.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc17_14.2) +// CHECK:STDOUT: %Destroy.facet.loc17_14.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc17_14.6: %Destroy.type = converted constants.%B, %Destroy.facet.loc17_14.1 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %Destroy.facet.loc17_14.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc17_14.7: %Destroy.type = converted constants.%B, %Destroy.facet.loc17_14.2 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc17_14.2) // CHECK:STDOUT: return to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_14.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17_14.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_14.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17_14.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_14.1(%self.param: ref %empty_struct_type) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17_14.3(%self.param: ref %struct_type.base.cb7) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc17_14.1: ref %A = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc17_14.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc17_14.2: %Destroy.type = converted constants.%A, %Destroy.facet.loc17_14.1 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %Destroy.facet.loc17_14.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc17_14.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc17_14.2 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc17_14.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_14.2(%self.param: ref %A) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_14.2(%self.param: ref %A) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_14.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_14.3(%self.param: ref %struct_type.base.cb7) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17: ref %A = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc17, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc17) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_14.3(%self.param: ref %struct_type.base.cb7) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_14.3(%self.param: ref %struct_type.base.cb7) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_14.4(%self.param: ref %B) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17_14.4(%self.param: ref %B) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %base.ref: %B.elem = name_ref base, @B.%.loc5 [concrete = @B.%.loc5] -// CHECK:STDOUT: %.loc17: ref %A = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc17, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc17) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_14.4(%self.param: ref %B) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_14.4(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) +// CHECK:STDOUT: %.loc17_14.1: ref %A = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc17_14.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc17_14.2: %Destroy.type = converted constants.%A, %Destroy.facet.loc17_14.1 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %Destroy.facet.loc17_14.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc17_14.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc17_14.2 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc17_14.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1726,54 +1576,28 @@ impl () as I({}) { // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.48cdab.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_29.2 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.bd5be1.2: %empty_tuple.type.as.I.impl.F.type.48cdab.2 = struct_value () [concrete] // CHECK:STDOUT: %struct: %struct_type.a.b.f95 = struct_value (%empty_struct, %empty_struct) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_29.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_29.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_29.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.aa3: %pattern_type.914 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a9d: %pattern_type.914 = wrapper_binding_pattern self, %self.param_patt.aa3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_29.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_29.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_29.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_29.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_29.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6b7: %SubobjectDestroy.type = facet_value %empty_struct_type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.011: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6b7) [concrete] +// CHECK:STDOUT: %Destroy.facet.fed: %Destroy.type = facet_value %empty_struct_type, (%DestroyImpl.impl_witness.011, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.268: %SubobjectDestroy.type = facet_value %struct_type.b.a.1b0, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.aca: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.268) [concrete] +// CHECK:STDOUT: %Destroy.facet.544: %Destroy.type = facet_value %struct_type.b.a.1b0, (%DestroyImpl.impl_witness.aca, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_29.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_29.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_29.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.914 = ref_param_pattern [concrete = constants.%self.param_patt.aa3] -// CHECK:STDOUT: %self.patt: %pattern_type.914 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a9d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.b.a.1b0 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.b.a.1b0 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_29.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.914 = ref_param_pattern [concrete = constants.%self.param_patt.aa3] -// CHECK:STDOUT: %self.patt: %pattern_type.914 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a9d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.b.a.1b0 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.b.a.1b0 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.I.impl: %.loc8_7.2 as %I.type { @@ -1824,39 +1648,33 @@ impl () as I({}) { // CHECK:STDOUT: %.loc10_29.12: init %empty_struct_type to %.loc10_29.9 = in_place_init %.loc10_29.11 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_29.13: init %struct_type.a.b.f95 to %return.param = struct_init (%.loc10_29.7, %.loc10_29.12) [concrete = constants.%struct] // CHECK:STDOUT: %.loc10_29.14: init %struct_type.a.b.f95 = converted %empty_tuple.type.as.I.impl.F.call, %.loc10_29.13 [concrete = constants.%struct] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc10_29.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc10_29.2) +// CHECK:STDOUT: %Destroy.facet.loc10_29.1: %Destroy.type = facet_value constants.%struct_type.b.a.1b0, (constants.%DestroyImpl.impl_witness.aca, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.544] +// CHECK:STDOUT: %.loc10_29.15: %Destroy.type = converted constants.%struct_type.b.a.1b0, %Destroy.facet.loc10_29.1 [concrete = constants.%Destroy.facet.544] +// CHECK:STDOUT: %Destroy.facet.loc10_29.2: %Destroy.type = facet_value constants.%struct_type.b.a.1b0, (constants.%DestroyImpl.impl_witness.aca, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.544] +// CHECK:STDOUT: %.loc10_29.16: %Destroy.type = converted constants.%struct_type.b.a.1b0, %Destroy.facet.loc10_29.2 [concrete = constants.%Destroy.facet.544] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc10_29.2) // CHECK:STDOUT: return %.loc10_29.14 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_29.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_29.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_29.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_29.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_29.2(%self.param: ref %struct_type.b.a.1b0) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_29.2(%self.param: ref %struct_type.b.a.1b0) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc10_29.1: ref %empty_struct_type = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_29.1: = bound_method %.loc10_29.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_29.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_29.1(%.loc10_29.1) -// CHECK:STDOUT: %.loc10_29.2: ref %empty_struct_type = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_29.2: = bound_method %.loc10_29.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_29.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_29.2(%.loc10_29.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_29.2(%self.param: ref %struct_type.b.a.1b0) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_29.2(%self.param: ref %struct_type.b.a.1b0) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc10_29.1: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_29.2: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_29.1 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %Destroy.facet.loc10_29.2: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_29.3: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_29.2 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_29.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_29.1) +// CHECK:STDOUT: %.loc10_29.4: ref %empty_struct_type = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc10_29.3: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_29.5: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_29.3 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %Destroy.facet.loc10_29.4: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc10_29.6: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc10_29.4 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_29.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_29.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_canonical_witnesses.carbon b/toolchain/check/testdata/impl/import_canonical_witnesses.carbon index a0000b4d59ae..c26ba97e0e04 100644 --- a/toolchain/check/testdata/impl/import_canonical_witnesses.carbon +++ b/toolchain/check/testdata/impl/import_canonical_witnesses.carbon @@ -15,9 +15,9 @@ // // SET-CHECK-SUBSET // CHECK:STDOUT: --- interfaces.carbon -// CHECK:STDOUT: %facet_type: type = facet_type <@SimpleOp & @Empty> [concrete] +// CHECK:STDOUT: %facet_type{{.*}}: type = facet_type <@SimpleOp & @Empty> [concrete] // CHECK:STDOUT: --- use.carbon -// CHECK:STDOUT: %facet_type: type = facet_type <@Empty & @SimpleOp> [concrete] +// CHECK:STDOUT: %facet_type{{.*}}: type = facet_type <@Empty & @SimpleOp> [concrete] // // This check does not strictly exclude extra facet types, although that should // create different instruction names. We also anticipate diagnostics should be diff --git a/toolchain/check/testdata/impl/import_thunk.carbon b/toolchain/check/testdata/impl/import_thunk.carbon index 8871d8ade08e..285ac626c238 100644 --- a/toolchain/check/testdata/impl/import_thunk.carbon +++ b/toolchain/check/testdata/impl/import_thunk.carbon @@ -150,27 +150,22 @@ fn G() { // CHECK:STDOUT: %C.as.I.impl.F.specific_fn: = specific_function %C.as.I.impl.F.efddb7.1, @C.as.I.impl.F.loc8_24.1(%Y) [symbolic] // CHECK:STDOUT: %C.val: %C.49b051.2 = struct_value () [symbolic] // CHECK:STDOUT: %.f6a: ref %C.49b051.2 = temporary invalid, %C.val [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.50c: = lookup_impl_witness %C.49b051.2, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.8aa: %Destroy.type = facet_value %C.49b051.2, (%Destroy.lookup_impl_witness.50c) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.561: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.8aa) [symbolic] -// CHECK:STDOUT: %.aa7: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.561, %Destroy.facet.8aa [symbolic] -// CHECK:STDOUT: %impl.elem2: %.aa7 = impl_witness_access %Destroy.lookup_impl_witness.50c, element2 [symbolic] -// CHECK:STDOUT: %bound_method.ff7: = bound_method %.f6a, %impl.elem2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.3c0: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.8aa) [symbolic] -// CHECK:STDOUT: %bound_method.a7a: = bound_method %.f6a, %specific_impl_fn.3c0 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.267: = lookup_impl_witness %C.49b051.2, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.598: = lookup_impl_witness %C.49b051.2, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.04b: %SubobjectDestroy.type = facet_value %C.49b051.2, (%SubobjectDestroy.lookup_impl_witness.598) [symbolic] +// CHECK:STDOUT: %.d90: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.04b) [symbolic] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C.49b051.2, (%DestroyImpl.lookup_impl_witness.267, %SubobjectDestroy.lookup_impl_witness.598) [symbolic] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//a, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -179,24 +174,7 @@ fn G() { // CHECK:STDOUT: %I.WithSelf.F.decl: %I.WithSelf.F.type.eae = fn_decl @I.WithSelf.F [symbolic = @I.WithSelf.%I.WithSelf.F (constants.%I.WithSelf.F.4b1)] {} {} // CHECK:STDOUT: %Main.import_ref.e59c42.2: %I.type = import_ref Main//a, loc4_13, loaded [symbolic = constants.%Self.dda] // CHECK:STDOUT: %Main.import_ref.223 = import_ref Main//a, loc4_13, unloaded -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -336,14 +314,12 @@ fn G() { // CHECK:STDOUT: %require_complete: = require_complete_type %C [symbolic = %require_complete (constants.%require_complete.6db)] // CHECK:STDOUT: %C.val: @C.as.I.impl.F.loc8_24.2.%C (%C.49b051.2) = struct_value () [symbolic = %C.val (constants.%C.val)] // CHECK:STDOUT: %.loc8_24.9: ref @C.as.I.impl.F.loc8_24.2.%C (%C.49b051.2) = temporary invalid, %C.val [symbolic = %.loc8_24.9 (constants.%.f6a)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %C, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.50c)] -// CHECK:STDOUT: %Destroy.facet.loc8_24.3: %Destroy.type = facet_value %C, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc8_24.3 (constants.%Destroy.facet.8aa)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc8_24.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.561)] -// CHECK:STDOUT: %.loc8_24.10: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc8_24.3 [symbolic = %.loc8_24.10 (constants.%.aa7)] -// CHECK:STDOUT: %impl.elem2.loc8_24.2: @C.as.I.impl.F.loc8_24.2.%.loc8_24.10 (%.aa7) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc8_24.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc8_24.3: = bound_method %.loc8_24.9, %impl.elem2.loc8_24.2 [symbolic = %bound_method.loc8_24.3 (constants.%bound_method.ff7)] -// CHECK:STDOUT: %specific_impl_fn.loc8_24.2: = specific_impl_function %impl.elem2.loc8_24.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc8_24.3) [symbolic = %specific_impl_fn.loc8_24.2 (constants.%specific_impl_fn.3c0)] -// CHECK:STDOUT: %bound_method.loc8_24.4: = bound_method %.loc8_24.9, %specific_impl_fn.loc8_24.2 [symbolic = %bound_method.loc8_24.4 (constants.%bound_method.a7a)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %C, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.598)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %C, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.04b)] +// CHECK:STDOUT: %.loc8_24.10: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc8_24.10 (constants.%.d90)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %C, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.267)] +// CHECK:STDOUT: %Destroy.facet.loc8_24.3: %Destroy.type = facet_value %C, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc8_24.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(%Destroy.facet.loc8_24.3) [symbolic = %SelfDestruct.specific_fn.2 (constants.%SelfDestruct.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: %empty_struct_type) [thunk @C.as.I.impl.%C.as.I.impl.F.decl.loc8_24.1 for imports.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet)] { // CHECK:STDOUT: !entry: @@ -356,29 +332,17 @@ fn G() { // CHECK:STDOUT: %.loc8_24.5: ref @C.as.I.impl.F.loc8_24.2.%C (%C.49b051.2) = temporary %.loc8_24.2, %.loc8_24.4 [symbolic = %.loc8_24.9 (constants.%.f6a)] // CHECK:STDOUT: %.loc8_24.6: @C.as.I.impl.F.loc8_24.2.%C (%C.49b051.2) = acquire_value %.loc8_24.5 [symbolic = %C.val (constants.%C.val)] // CHECK:STDOUT: %C.as.I.impl.F.call: init %empty_tuple.type = call %C.as.I.impl.F.specific_fn.loc8_24.1(%.loc8_24.6) -// CHECK:STDOUT: %impl.elem2.loc8_24.1: @C.as.I.impl.F.loc8_24.2.%.loc8_24.10 (%.aa7) = impl_witness_access constants.%Destroy.lookup_impl_witness.50c, element2 [symbolic = %impl.elem2.loc8_24.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc8_24.1: = bound_method %.loc8_24.5, %impl.elem2.loc8_24.1 [symbolic = %bound_method.loc8_24.3 (constants.%bound_method.ff7)] -// CHECK:STDOUT: %Destroy.facet.loc8_24.1: %Destroy.type = facet_value constants.%C.49b051.2, (constants.%Destroy.lookup_impl_witness.50c) [symbolic = %Destroy.facet.loc8_24.3 (constants.%Destroy.facet.8aa)] -// CHECK:STDOUT: %.loc8_24.7: %Destroy.type = converted constants.%C.49b051.2, %Destroy.facet.loc8_24.1 [symbolic = %Destroy.facet.loc8_24.3 (constants.%Destroy.facet.8aa)] -// CHECK:STDOUT: %Destroy.facet.loc8_24.2: %Destroy.type = facet_value constants.%C.49b051.2, (constants.%Destroy.lookup_impl_witness.50c) [symbolic = %Destroy.facet.loc8_24.3 (constants.%Destroy.facet.8aa)] -// CHECK:STDOUT: %.loc8_24.8: %Destroy.type = converted constants.%C.49b051.2, %Destroy.facet.loc8_24.2 [symbolic = %Destroy.facet.loc8_24.3 (constants.%Destroy.facet.8aa)] -// CHECK:STDOUT: %specific_impl_fn.loc8_24.1: = specific_impl_function %impl.elem2.loc8_24.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.8aa) [symbolic = %specific_impl_fn.loc8_24.2 (constants.%specific_impl_fn.3c0)] -// CHECK:STDOUT: %bound_method.loc8_24.2: = bound_method %.loc8_24.5, %specific_impl_fn.loc8_24.1 [symbolic = %bound_method.loc8_24.4 (constants.%bound_method.a7a)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc8_24.2(%.loc8_24.5) +// CHECK:STDOUT: %Destroy.facet.loc8_24.1: %Destroy.type = facet_value constants.%C.49b051.2, (constants.%DestroyImpl.lookup_impl_witness.267, constants.%SubobjectDestroy.lookup_impl_witness.598) [symbolic = %Destroy.facet.loc8_24.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %.loc8_24.7: %Destroy.type = converted constants.%C.49b051.2, %Destroy.facet.loc8_24.1 [symbolic = %Destroy.facet.loc8_24.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %Destroy.facet.loc8_24.2: %Destroy.type = facet_value constants.%C.49b051.2, (constants.%DestroyImpl.lookup_impl_witness.267, constants.%SubobjectDestroy.lookup_impl_witness.598) [symbolic = %Destroy.facet.loc8_24.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %.loc8_24.8: %Destroy.type = converted constants.%C.49b051.2, %Destroy.facet.loc8_24.2 [symbolic = %Destroy.facet.loc8_24.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [symbolic = %SelfDestruct.specific_fn.2 (constants.%SelfDestruct.specific_fn)] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc8_24.5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%X) { // CHECK:STDOUT: %X.patt.loc5_10.2 => constants.%X.patt @@ -457,7 +421,6 @@ fn G() { // CHECK:STDOUT: %Self.dda: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I.WithSelf.F.type.eae: type = fn_type @I.WithSelf.F, @I.WithSelf(%Self.dda) [symbolic] // CHECK:STDOUT: %I.WithSelf.F.4b1: %I.WithSelf.F.type.eae = struct_value () [symbolic] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.c77 [concrete] // CHECK:STDOUT: %Y: %empty_tuple.type = symbolic_binding Y, 0 [symbolic] @@ -474,17 +437,21 @@ fn G() { // CHECK:STDOUT: %x.patt.642: %pattern_type.a58 = wrapper_binding_pattern x, %x.param_patt.460 [symbolic] // CHECK:STDOUT: %require_complete.6db: = require_complete_type %C.49b051.2 [symbolic] // CHECK:STDOUT: %I.facet.25c: %I.type = facet_value %C.49b051.2, (%I.impl_witness.34a) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.598: = lookup_impl_witness %C.49b051.2, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.267: = lookup_impl_witness %C.49b051.2, @DestroyImpl [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.50c: = lookup_impl_witness %C.49b051.2, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.8aa: %Destroy.type = facet_value %C.49b051.2, (%Destroy.lookup_impl_witness.50c) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.561: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.8aa) [symbolic] -// CHECK:STDOUT: %.aa7: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.561, %Destroy.facet.8aa [symbolic] -// CHECK:STDOUT: %impl.elem2: %.aa7 = impl_witness_access %Destroy.lookup_impl_witness.50c, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.3c0: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.8aa) [symbolic] +// CHECK:STDOUT: %Destroy.facet.c41: %Destroy.type = facet_value %C.49b051.2, (%SubobjectDestroy.lookup_impl_witness.598, %DestroyImpl.lookup_impl_witness.267) [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.710: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c41) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.04b: %SubobjectDestroy.type = facet_value %C.49b051.2, (%SubobjectDestroy.lookup_impl_witness.598) [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %.d90: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.04b) [symbolic] // CHECK:STDOUT: %C.val.a80: %C.49b051.2 = struct_value () [symbolic] // CHECK:STDOUT: %.f6a: ref %C.49b051.2 = temporary invalid, %C.val.a80 [symbolic] -// CHECK:STDOUT: %bound_method.a7a: = bound_method %.f6a, %specific_impl_fn.3c0 [symbolic] -// CHECK:STDOUT: %bound_method.ff7: = bound_method %.f6a, %impl.elem2 [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.specific_fn.4fa: = specific_function %C.as.I.impl.F.beb65e.2, @C.as.I.impl.F.2(%Y) [symbolic] // CHECK:STDOUT: %.675: = impl_self_witness %C.6dc, @I [concrete] // CHECK:STDOUT: %I.impl_witness.d52: = impl_witness imports.%I.impl_witness_table, @C.as.I.impl(%empty_tuple) [concrete] @@ -504,32 +471,21 @@ fn G() { // CHECK:STDOUT: %C.as.I.impl.F.specific_fn.a6ea0c.2: = specific_function %C.as.I.impl.F.c2b15c.1, @C.as.I.impl.F.2(%empty_tuple) [concrete] // CHECK:STDOUT: %C.val.be3: %C.6dc = struct_value () [concrete] // CHECK:STDOUT: %.b3f: ref %C.6dc = temporary invalid, %C.val.be3 [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_16.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_16.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.817: %pattern_type.6b7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.fde: %pattern_type.6b7 = wrapper_binding_pattern self, %self.param_patt.817 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_16.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_16.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_16.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.2: = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01daf.2, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.f51: %Destroy.type = facet_value %C.6dc, (%custom_witness.f8f19d.2) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.134: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.f51) [concrete] -// CHECK:STDOUT: %.0b0: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.134, %Destroy.facet.f51 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.b3f, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_16.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.5e8: %SubobjectDestroy.type = facet_value %C.6dc, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1fe: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.5e8) [concrete] +// CHECK:STDOUT: %.134: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.5e8) [concrete] +// CHECK:STDOUT: %Destroy.facet.cb2: %Destroy.type = facet_value %C.6dc, (%custom_witness.b80ef6.2, %DestroyImpl.impl_witness.1fe) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2f8: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.cb2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//a, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: %C.type = import_ref Main//b, C, loaded [concrete = constants.%C.generic] // CHECK:STDOUT: %Core.048aa3.1: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -548,41 +504,12 @@ fn G() { // CHECK:STDOUT: %Main.import_ref.c90e1a.2: %empty_tuple.type = import_ref Main//b, loc7_15, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)] // CHECK:STDOUT: %Main.F.611: @C.as.I.impl.%C.as.I.impl.F.type.1 (%C.as.I.impl.F.type.7e1c37.2) = import_ref Main//b, F, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.1 (constants.%C.as.I.impl.F.beb65e.2)] // CHECK:STDOUT: %Main.import_ref.c90e1a.3: %empty_tuple.type = import_ref Main//b, loc7_15, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)] +// CHECK:STDOUT: %Main.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Main//b, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Main.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Main.import_ref.821: type = import_ref Main//b, loc7_24, loaded [symbolic = @C.as.I.impl.%C (constants.%C.49b051.2)] // CHECK:STDOUT: %Main.import_ref.e90: type = import_ref Main//b, loc7_29, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.import_ref.c90e1a.4: %empty_tuple.type = import_ref Main//b, loc7_15, loaded [symbolic = @C.as.I.impl.%Y (constants.%Y)] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_16.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_16.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_16.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6b7 = ref_param_pattern [concrete = constants.%self.param_patt.817] -// CHECK:STDOUT: %self.patt: %pattern_type.6b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.fde] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.6dc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.6dc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_16.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6b7 = ref_param_pattern [concrete = constants.%self.param_patt.817] -// CHECK:STDOUT: %self.patt: %pattern_type.6b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.fde] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.6dc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.6dc = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -664,7 +591,12 @@ fn G() { // CHECK:STDOUT: %.loc7_16.6: ref %C.6dc = temporary %.loc7_16.3, %.loc7_16.5 [concrete = constants.%.b3f] // CHECK:STDOUT: %.loc7_16.7: %C.6dc = acquire_value %.loc7_16.6 [concrete = constants.%C.val.be3] // CHECK:STDOUT: %C.as.I.impl.F.call: init %empty_tuple.type = call %C.as.I.impl.F.specific_fn(%.loc7_16.7) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.b3f) +// CHECK:STDOUT: %Destroy.facet.loc7_16.1: %Destroy.type = facet_value constants.%C.6dc, (constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.1fe) [concrete = constants.%Destroy.facet.cb2] +// CHECK:STDOUT: %.loc7_16.8: %Destroy.type = converted constants.%C.6dc, %Destroy.facet.loc7_16.1 [concrete = constants.%Destroy.facet.cb2] +// CHECK:STDOUT: %Destroy.facet.loc7_16.2: %Destroy.type = facet_value constants.%C.6dc, (constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.1fe) [concrete = constants.%Destroy.facet.cb2] +// CHECK:STDOUT: %.loc7_16.9: %Destroy.type = converted constants.%C.6dc, %Destroy.facet.loc7_16.2 [concrete = constants.%Destroy.facet.cb2] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.cb2) [concrete = constants.%SelfDestruct.specific_fn.2f8] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc7_16.6) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -682,14 +614,12 @@ fn G() { // CHECK:STDOUT: %require_complete: = require_complete_type %C [symbolic = %require_complete (constants.%require_complete.6db)] // CHECK:STDOUT: %C.val: @C.as.I.impl.F.1.%C (%C.49b051.2) = struct_value () [symbolic = %C.val (constants.%C.val.a80)] // CHECK:STDOUT: %.1: ref @C.as.I.impl.F.1.%C (%C.49b051.2) = temporary invalid, %C.val [symbolic = %.1 (constants.%.f6a)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %C, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.50c)] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.8aa)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.561)] -// CHECK:STDOUT: %.2: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet [symbolic = %.2 (constants.%.aa7)] -// CHECK:STDOUT: %impl.elem2: @C.as.I.impl.F.1.%.2 (%.aa7) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.1: = bound_method %.1, %impl.elem2 [symbolic = %bound_method.1 (constants.%bound_method.ff7)] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet) [symbolic = %specific_impl_fn (constants.%specific_impl_fn.3c0)] -// CHECK:STDOUT: %bound_method.2: = bound_method %.1, %specific_impl_fn [symbolic = %bound_method.2 (constants.%bound_method.a7a)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %C, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.598)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %C, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.04b)] +// CHECK:STDOUT: %.2: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.2 (constants.%.d90)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %C, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.267)] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%SubobjectDestroy.lookup_impl_witness, %DestroyImpl.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.c41)] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(%Destroy.facet) [symbolic = %SelfDestruct.specific_fn (constants.%SelfDestruct.specific_fn.710)] // CHECK:STDOUT: // CHECK:STDOUT: fn [thunk imports.%Main.F.611 for imports.%I.WithSelf.F.decl, @I.WithSelf.F(constants.%I.facet.25c)]; // CHECK:STDOUT: } @@ -707,27 +637,9 @@ fn G() { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_16.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_16.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_16.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_16.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_16.2(%self.param: ref %C.6dc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_16.2(%self.param: ref %C.6dc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_16.2(%self.param: ref %C.6dc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_16.2(%self.param: ref %C.6dc) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%X) { // CHECK:STDOUT: %X.patt => constants.%X.patt @@ -817,14 +729,12 @@ fn G() { // CHECK:STDOUT: %require_complete => constants.%complete_type // CHECK:STDOUT: %C.val => constants.%C.val.be3 // CHECK:STDOUT: %.1 => constants.%.b3f -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.2 -// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.f51 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.134 -// CHECK:STDOUT: %.2 => constants.%.0b0 -// CHECK:STDOUT: %impl.elem2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %bound_method.1 => constants.%Destroy.WithSelf.SelfDestruct.bound -// CHECK:STDOUT: %specific_impl_fn => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %bound_method.2 => constants.%Destroy.WithSelf.SelfDestruct.bound +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness => constants.%custom_witness.b80ef6.2 +// CHECK:STDOUT: %SubobjectDestroy.facet => constants.%SubobjectDestroy.facet.5e8 +// CHECK:STDOUT: %.2 => constants.%.134 +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness => constants.%DestroyImpl.impl_witness.1fe +// CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.cb2 +// CHECK:STDOUT: %SelfDestruct.specific_fn => constants.%SelfDestruct.specific_fn.2f8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.F.2(constants.%empty_tuple) { diff --git a/toolchain/check/testdata/impl/interface_args.carbon b/toolchain/check/testdata/impl/interface_args.carbon index 4cb1abbcc6e2..8969ee4740bf 100644 --- a/toolchain/check/testdata/impl/interface_args.carbon +++ b/toolchain/check/testdata/impl/interface_args.carbon @@ -12,13 +12,6 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/interface_args.carbon -// --- core.carbon -package Core; - -interface ImplicitAs(Dest: type) { - fn Convert(self) -> Dest; -} - // --- action.carbon library "[[@TEST_NAME]]"; @@ -85,8 +78,6 @@ fn InstanceB(a: A) -> B { impl library "[[@TEST_NAME]]"; -import Core; - class C {} fn MakeC() -> C { @@ -102,136 +93,6 @@ fn InstanceC(a: A) -> C { } -// CHECK:STDOUT: --- core.carbon -// CHECK:STDOUT: -// CHECK:STDOUT: constants { -// CHECK:STDOUT: type: type = facet_type [concrete] -// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %Dest.patt: %pattern_type.9a5 = symbolic_binding_pattern Dest, 0 [symbolic] -// CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic] -// CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] -// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] -// CHECK:STDOUT: %ImplicitAs.type.b02: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] -// CHECK:STDOUT: %Self: %ImplicitAs.type.b02 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic] -// CHECK:STDOUT: %pattern_type.97b: type = pattern_type %Self.as_type [symbolic] -// CHECK:STDOUT: %self.param_patt: %pattern_type.97b = value_param_pattern [symbolic] -// CHECK:STDOUT: %self.patt: %pattern_type.97b = wrapper_binding_pattern self, %self.param_patt [symbolic] -// CHECK:STDOUT: %.184: Core.Form = init_form %Dest [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %Dest [symbolic] -// CHECK:STDOUT: %return.param_patt: %pattern_type.51d = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt: %pattern_type.51d = return_slot_pattern %return.param_patt, %Dest [symbolic] -// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Dest, %Self) [symbolic] -// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert: %ImplicitAs.WithSelf.Convert.type = struct_value () [symbolic] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.decl [symbolic] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.Destroy = import_ref Core//prelude/parts/destroy, Destroy, unloaded -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: file { -// CHECK:STDOUT: package: = namespace [concrete] { -// CHECK:STDOUT: .Destroy = imports.%Core.Destroy -// CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl -// CHECK:STDOUT: } -// CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.0ff = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] { -// CHECK:STDOUT: %Dest.patt.loc3_26.1: %pattern_type.9a5 = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc3_26.2 (constants.%Dest.patt)] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_28.1: type = splice_block %.loc3_28.2 [concrete = type] { -// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] -// CHECK:STDOUT: %.loc3_28.2: type = type_literal type [concrete = type] -// CHECK:STDOUT: } -// CHECK:STDOUT: %Dest.loc3_26.2: type = symbolic_binding Dest, 0 [symbolic = %Dest.loc3_26.1 (constants.%Dest)] -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(%Dest.loc3_26.2: type) { -// CHECK:STDOUT: %Dest.patt.loc3_26.2: %pattern_type.9a5 = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc3_26.2 (constants.%Dest.patt)] -// CHECK:STDOUT: %Dest.loc3_26.1: type = symbolic_binding Dest, 0 [symbolic = %Dest.loc3_26.1 (constants.%Dest)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_26.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.b02)] -// CHECK:STDOUT: %Self.loc3_34.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.b02) = symbolic_binding Self, 1 [symbolic = %Self.loc3_34.2 (constants.%Self)] -// CHECK:STDOUT: -// CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_34.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.b02) = symbolic_binding Self, 1 [symbolic = %Self.loc3_34.2 (constants.%Self)] -// CHECK:STDOUT: %ImplicitAs.WithSelf.decl = interface_with_self_decl @ImplicitAs [concrete] -// CHECK:STDOUT: -// CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.decl: @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type) = fn_decl @ImplicitAs.WithSelf.Convert [symbolic = @ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert)] { -// CHECK:STDOUT: %self.param_patt.loc4_14.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_14 (%pattern_type.97b) = value_param_pattern [symbolic = %self.param_patt.loc4_14.2 (constants.%self.param_patt)] -// CHECK:STDOUT: %self.patt.loc4_14.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_14 (%pattern_type.97b) = wrapper_binding_pattern self, %self.param_patt.loc4_14.1 [symbolic = %self.patt.loc4_14.2 (constants.%self.patt)] -// CHECK:STDOUT: %return.param_patt.loc4_23.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc4_23.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc4_20.1: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc4_23.1, %Dest.ref [symbolic = %return.patt.loc4_20.2 (constants.%return.patt)] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_23.2: type = specific_constant @ImplicitAs.%Dest.loc3_26.2, @ImplicitAs(constants.%Dest) [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, %.loc4_23.2 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %.loc4_23.3: Core.Form = init_form %Dest.ref [symbolic = %.loc4_23.1 (constants.%.184)] -// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc4_14.1 (%Self.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc4_14.1: type = splice_block %.loc4_14.3 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] { -// CHECK:STDOUT: %.loc4_14.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.b02) = specific_constant @ImplicitAs.%Self.loc3_34.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.b02) = name_ref Self, %.loc4_14.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc4_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc4_14.3: type = converted %Self.ref, %Self.as_type.loc4_14.2 [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: } -// CHECK:STDOUT: %self: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc4_14.1 (%Self.as_type) = wrapper_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @ImplicitAs.WithSelf.Convert.%Dest (%Dest) = out_param call_param1 -// CHECK:STDOUT: %return: ref @ImplicitAs.WithSelf.Convert.%Dest (%Dest) = return_slot %return.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc4_27.1: @ImplicitAs.WithSelf.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc4_27.2 (constants.%assoc0)] -// CHECK:STDOUT: -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self.loc3_34.1 -// CHECK:STDOUT: .Dest = -// CHECK:STDOUT: .Dest = -// CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc4_27.1 -// CHECK:STDOUT: witness = (@ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.decl) -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_26.2: type, @ImplicitAs.%Self.loc3_34.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.b02)) { -// CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)] -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.b02)] -// CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.b02) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc4_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %pattern_type.loc4_14: type = pattern_type %Self.as_type.loc4_14.1 [symbolic = %pattern_type.loc4_14 (constants.%pattern_type.97b)] -// CHECK:STDOUT: %self.param_patt.loc4_14.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_14 (%pattern_type.97b) = value_param_pattern [symbolic = %self.param_patt.loc4_14.2 (constants.%self.param_patt)] -// CHECK:STDOUT: %self.patt.loc4_14.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_14 (%pattern_type.97b) = wrapper_binding_pattern self, %self.param_patt.loc4_14.2 [symbolic = %self.patt.loc4_14.2 (constants.%self.patt)] -// CHECK:STDOUT: %.loc4_23.1: Core.Form = init_form %Dest [symbolic = %.loc4_23.1 (constants.%.184)] -// CHECK:STDOUT: %pattern_type.loc4_23: type = pattern_type %Dest [symbolic = %pattern_type.loc4_23 (constants.%pattern_type.51d)] -// CHECK:STDOUT: %return.param_patt.loc4_23.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_23 (%pattern_type.51d) = out_param_pattern [symbolic = %return.param_patt.loc4_23.2 (constants.%return.param_patt)] -// CHECK:STDOUT: %return.patt.loc4_20.2: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_23 (%pattern_type.51d) = return_slot_pattern %return.param_patt.loc4_23.2, %Dest [symbolic = %return.patt.loc4_20.2 (constants.%return.patt)] -// CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @ImplicitAs.WithSelf.Convert.%Self.as_type.loc4_14.1 (%Self.as_type)) -> out %return.param: @ImplicitAs.WithSelf.Convert.%Dest (%Dest); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { -// CHECK:STDOUT: %Dest.patt.loc3_26.2 => constants.%Dest.patt -// CHECK:STDOUT: %Dest.loc3_26.1 => constants.%Dest -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs.WithSelf(constants.%Dest, constants.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%Dest, constants.%Self) { -// CHECK:STDOUT: %Dest => constants.%Dest -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.b02 -// CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %Self.as_type.loc4_14.1 => constants.%Self.as_type -// CHECK:STDOUT: %pattern_type.loc4_14 => constants.%pattern_type.97b -// CHECK:STDOUT: %self.param_patt.loc4_14.2 => constants.%self.param_patt -// CHECK:STDOUT: %self.patt.loc4_14.2 => constants.%self.patt -// CHECK:STDOUT: %.loc4_23.1 => constants.%.184 -// CHECK:STDOUT: %pattern_type.loc4_23 => constants.%pattern_type.51d -// CHECK:STDOUT: %return.param_patt.loc4_23.2 => constants.%return.param_patt -// CHECK:STDOUT: %return.patt.loc4_20.2 => constants.%return.patt -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- action.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1606,7 +1467,6 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.B = import_ref Main//factory, B, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: import Core//prelude -// CHECK:STDOUT: import Core//default // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//factory, loc12_10, loaded [concrete = constants.%complete_type] @@ -1651,10 +1511,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %MakeC.decl: %MakeC.type = fn_decl @MakeC [concrete = constants.%MakeC] { // CHECK:STDOUT: %return.param_patt: %pattern_type.98b = out_param_pattern [concrete = constants.%return.param_patt.89a] -// CHECK:STDOUT: %return.patt: %pattern_type.98b = return_slot_pattern %return.param_patt, %C.ref.loc8 [concrete = constants.%return.patt.e4a] +// CHECK:STDOUT: %return.patt: %pattern_type.98b = return_slot_pattern %return.param_patt, %C.ref.loc6 [concrete = constants.%return.patt.e4a] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %.loc8: Core.Form = init_form %C.ref.loc8 [concrete = constants.%.a44] +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc6: Core.Form = init_form %C.ref.loc6 [concrete = constants.%.a44] // CHECK:STDOUT: %return.param: ref %C = out_param call_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } @@ -1662,10 +1522,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %a.param_patt: %pattern_type.9ef = value_param_pattern [concrete = constants.%a.param_patt] // CHECK:STDOUT: %a.patt: %pattern_type.9ef = wrapper_binding_pattern a, %a.param_patt [concrete = constants.%a.patt] // CHECK:STDOUT: %return.param_patt: %pattern_type.98b = out_param_pattern [concrete = constants.%return.param_patt.89a] -// CHECK:STDOUT: %return.patt: %pattern_type.98b = return_slot_pattern %return.param_patt, %C.ref.loc14 [concrete = constants.%return.patt.e4a] +// CHECK:STDOUT: %return.patt: %pattern_type.98b = return_slot_pattern %return.param_patt, %C.ref.loc12 [concrete = constants.%return.patt.e4a] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %.loc14: Core.Form = init_form %C.ref.loc14 [concrete = constants.%.a44] +// CHECK:STDOUT: %C.ref.loc12: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %.loc12: Core.Form = init_form %C.ref.loc12 [concrete = constants.%.a44] // CHECK:STDOUT: %a.param: %A = value_param call_param0 // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%Main.A [concrete = constants.%A] // CHECK:STDOUT: %a: %A = wrapper_binding a, %a.param @@ -1753,10 +1613,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%Main.A [concrete = constants.%A] // CHECK:STDOUT: %Factory.ref: %Factory.type.9da = name_ref Factory, imports.%Main.Factory [concrete = constants.%Factory.generic] -// CHECK:STDOUT: %C.ref.loc11: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%C)> [concrete = constants.%Factory.type.120] -// CHECK:STDOUT: %.loc11: %Factory.assoc_type.b33 = specific_constant imports.%Main.import_ref.0c4, @Factory.WithSelf(constants.%C, constants.%Self.0bb) [concrete = constants.%assoc0.593] -// CHECK:STDOUT: %Make.ref: %Factory.assoc_type.b33 = name_ref Make, %.loc11 [concrete = constants.%assoc0.593] +// CHECK:STDOUT: %.loc9: %Factory.assoc_type.b33 = specific_constant imports.%Main.import_ref.0c4, @Factory.WithSelf(constants.%C, constants.%Self.0bb) [concrete = constants.%assoc0.593] +// CHECK:STDOUT: %Make.ref: %Factory.assoc_type.b33 = name_ref Make, %.loc9 [concrete = constants.%assoc0.593] // CHECK:STDOUT: return to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1764,10 +1624,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %Factory.ref: %Factory.type.9da = name_ref Factory, imports.%Main.Factory [concrete = constants.%Factory.generic] -// CHECK:STDOUT: %C.ref.loc17: type = name_ref C, file.%C.decl [concrete = constants.%C] +// CHECK:STDOUT: %C.ref.loc15: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%C)> [concrete = constants.%Factory.type.120] -// CHECK:STDOUT: %.loc17: %Factory.assoc_type.b33 = specific_constant imports.%Main.import_ref.998, @Factory.WithSelf(constants.%C, constants.%Self.0bb) [concrete = constants.%assoc1.4d7] -// CHECK:STDOUT: %Method.ref: %Factory.assoc_type.b33 = name_ref Method, %.loc17 [concrete = constants.%assoc1.4d7] +// CHECK:STDOUT: %.loc15: %Factory.assoc_type.b33 = specific_constant imports.%Main.import_ref.998, @Factory.WithSelf(constants.%C, constants.%Self.0bb) [concrete = constants.%assoc1.4d7] +// CHECK:STDOUT: %Method.ref: %Factory.assoc_type.b33 = name_ref Method, %.loc15 [concrete = constants.%assoc1.4d7] // CHECK:STDOUT: return to %return.param // CHECK:STDOUT: } // 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 3230ccfa8182..85aa7147b5b4 100644 --- a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon @@ -83,24 +83,24 @@ fn G() { // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %I.type, %type.as.BitAndWith.impl.Op [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@I & @J> [concrete] -// CHECK:STDOUT: %pattern_type.fb7: type = pattern_type %facet_type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: %facet_type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.936: type = pattern_type %T.as_type [symbolic] +// CHECK:STDOUT: %facet_type.f2a: type = facet_type <@I & @J> [concrete] +// CHECK:STDOUT: %pattern_type.fb7: type = pattern_type %facet_type.f2a [concrete] +// CHECK:STDOUT: %T.patt.3e5: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.c7f: %facet_type.f2a = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.0fb: type = facet_access_type %T.c7f [symbolic] +// CHECK:STDOUT: %pattern_type.936: type = pattern_type %T.as_type.0fb [symbolic] // CHECK:STDOUT: %t.param_patt.ed4: %pattern_type.936 = value_param_pattern [symbolic] // CHECK:STDOUT: %t.patt.4c5: %pattern_type.936 = wrapper_binding_pattern t, %t.param_patt.ed4 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.b4a: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] -// CHECK:STDOUT: %I.facet.d3d: %I.type = facet_value %T.as_type, (%I.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T, @J [symbolic] -// CHECK:STDOUT: %J.facet.cbc: %J.type = facet_value %T.as_type, (%J.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %I.WithSelf.II.type.42e: type = fn_type @I.WithSelf.II, @I.WithSelf(%T) [symbolic] +// CHECK:STDOUT: %require_complete.b4a: = require_complete_type %T.as_type.0fb [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.c7f, @I [symbolic] +// CHECK:STDOUT: %I.facet.d3d: %I.type = facet_value %T.as_type.0fb, (%I.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.c7f, @J [symbolic] +// CHECK:STDOUT: %J.facet.cbc: %J.type = facet_value %T.as_type.0fb, (%J.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %I.WithSelf.II.type.42e: type = fn_type @I.WithSelf.II, @I.WithSelf(%T.c7f) [symbolic] // CHECK:STDOUT: %I.WithSelf.II.6c1: %I.WithSelf.II.type.42e = struct_value () [symbolic] -// CHECK:STDOUT: %J.WithSelf.JJ.type.ff5: type = fn_type @J.WithSelf.JJ, @J.WithSelf(%T) [symbolic] +// CHECK:STDOUT: %J.WithSelf.JJ.type.ff5: type = fn_type @J.WithSelf.JJ, @J.WithSelf(%T.c7f) [symbolic] // CHECK:STDOUT: %J.WithSelf.JJ.bdc: %J.WithSelf.JJ.type.ff5 = struct_value () [symbolic] // CHECK:STDOUT: %J.WithSelf.JJ.type.0f6: type = fn_type @J.WithSelf.JJ, @J.WithSelf(%J.facet.cbc) [symbolic] // CHECK:STDOUT: %J.WithSelf.JJ.029: %J.WithSelf.JJ.type.0f6 = struct_value () [symbolic] @@ -140,24 +140,21 @@ fn G() { // CHECK:STDOUT: %I.WithSelf.II.7c8: %I.WithSelf.II.type.c41 = struct_value () [concrete] // CHECK:STDOUT: %.df5: type = fn_type_with_self_type %J.WithSelf.JJ.type.a9e, %J.facet.85d [concrete] // CHECK:STDOUT: %C.as.J.impl.JJ.bound: = bound_method %.5d3, %C.as.J.impl.JJ [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc40_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc40_8.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.967: %pattern_type.f79 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2f2: %pattern_type.f79 = wrapper_binding_pattern self, %self.param_patt.967 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc40_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc40_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc40_8.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.5d3, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] -// CHECK:STDOUT: %facet_value: %facet_type = facet_value %C, (%I.impl_witness, %J.impl_witness) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc40_8.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.068: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.de6: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.068) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.de6, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] +// CHECK:STDOUT: %facet_value: %facet_type.f2a = facet_value %C, (%I.impl_witness, %J.impl_witness) [concrete] // CHECK:STDOUT: %t.param_patt.5f8: %pattern_type.f79 = value_param_pattern [concrete] // CHECK:STDOUT: %t.patt.094: %pattern_type.f79 = wrapper_binding_pattern t, %t.param_patt.5f8 [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%facet_value) [concrete] @@ -166,45 +163,16 @@ fn G() { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.a06 = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] // CHECK:STDOUT: %Core.import_ref.9c3: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.9c3), @type.as.BitAndWith.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc40_8.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc40_8.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc40_8.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f79 = ref_param_pattern [concrete = constants.%self.param_patt.967] -// CHECK:STDOUT: %self.patt: %pattern_type.f79 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2f2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc40_8.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f79 = ref_param_pattern [concrete = constants.%self.param_patt.967] -// CHECK:STDOUT: %self.patt: %pattern_type.f79 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2f2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -219,28 +187,28 @@ fn G() { // CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {} // CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc22_15.1: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc22_15.1: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_15.2 (constants.%T.patt.3e5)] // CHECK:STDOUT: %t.param_patt.loc22_25.1: @F.%pattern_type (%pattern_type.936) = value_param_pattern [symbolic = %t.param_patt.loc22_25.2 (constants.%t.param_patt.ed4)] // CHECK:STDOUT: %t.patt.loc22_25.1: @F.%pattern_type (%pattern_type.936) = wrapper_binding_pattern t, %t.param_patt.loc22_25.1 [symbolic = %t.patt.loc22_25.2 (constants.%t.patt.4c5)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc22_19.1: type = splice_block %.loc22_19.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %.loc22_19.1: type = splice_block %.loc22_19.3 [concrete = constants.%facet_type.f2a] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref.loc22: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %J.ref.loc22: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %impl.elem0.loc22: %.b4e = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc22: = bound_method %I.ref.loc22, %impl.elem0.loc22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc22(%I.ref.loc22, %J.ref.loc22) [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc22_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc22_19.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc22_19.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc22(%I.ref.loc22, %J.ref.loc22) [concrete = constants.%facet_type.f2a] +// CHECK:STDOUT: %.loc22_19.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.f2a] +// CHECK:STDOUT: %.loc22_19.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc22_19.2 [concrete = constants.%facet_type.f2a] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc22_15.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc22_15.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @F.%T.as_type.loc22_27.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc22_27.1: type = splice_block %.loc22_27.2 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc22: %facet_type = name_ref T, %T.loc22_15.2 [symbolic = %T.loc22_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc22_27.2: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc22_27.2: type = converted %T.ref.loc22, %T.as_type.loc22_27.2 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc22_15.2: %facet_type.f2a = symbolic_binding T, 0 [symbolic = %T.loc22_15.1 (constants.%T.c7f)] +// CHECK:STDOUT: %t.param: @F.%T.as_type.loc22_27.1 (%T.as_type.0fb) = value_param call_param0 +// CHECK:STDOUT: %.loc22_27.1: type = splice_block %.loc22_27.2 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] { +// CHECK:STDOUT: %T.ref.loc22: %facet_type.f2a = name_ref T, %T.loc22_15.2 [symbolic = %T.loc22_15.1 (constants.%T.c7f)] +// CHECK:STDOUT: %T.as_type.loc22_27.2: type = facet_access_type %T.ref.loc22 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] +// CHECK:STDOUT: %.loc22_27.2: type = converted %T.ref.loc22, %T.as_type.loc22_27.2 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @F.%T.as_type.loc22_27.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @F.%T.as_type.loc22_27.1 (%T.as_type.0fb) = wrapper_binding t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} {} // CHECK:STDOUT: } @@ -380,10 +348,10 @@ fn G() { // CHECK:STDOUT: fn(%self.param: @J.WithSelf.JJ.%Self.as_type.loc19_9.1 (%Self.as_type.976)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%T.loc22_15.2: %facet_type) { -// CHECK:STDOUT: %T.patt.loc22_15.2: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc22_15.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc22_15.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc22_27.1: type = facet_access_type %T.loc22_15.1 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: generic fn @F(%T.loc22_15.2: %facet_type.f2a) { +// CHECK:STDOUT: %T.patt.loc22_15.2: %pattern_type.fb7 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc22_15.2 (constants.%T.patt.3e5)] +// CHECK:STDOUT: %T.loc22_15.1: %facet_type.f2a = symbolic_binding T, 0 [symbolic = %T.loc22_15.1 (constants.%T.c7f)] +// CHECK:STDOUT: %T.as_type.loc22_27.1: type = facet_access_type %T.loc22_15.1 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc22_27.1 [symbolic = %pattern_type (constants.%pattern_type.936)] // CHECK:STDOUT: %t.param_patt.loc22_25.2: @F.%pattern_type (%pattern_type.936) = value_param_pattern [symbolic = %t.param_patt.loc22_25.2 (constants.%t.param_patt.ed4)] // CHECK:STDOUT: %t.patt.loc22_25.2: @F.%pattern_type (%pattern_type.936) = wrapper_binding_pattern t, %t.param_patt.loc22_25.2 [symbolic = %t.patt.loc22_25.2 (constants.%t.patt.4c5)] @@ -399,41 +367,41 @@ fn G() { // CHECK:STDOUT: %impl.elem0.loc26_69.2: @F.%.loc26_69 (%.b3e) = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0.228)] // CHECK:STDOUT: %specific_impl_fn.loc26_69.2: = specific_impl_function %impl.elem0.loc26_69.2, @J.WithSelf.JJ(%J.facet.loc26_33.2) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn.02b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc22_27.1 (%T.as_type)) { +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc22_27.1 (%T.as_type.0fb)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc22_27.1 (%T.as_type) = name_ref t, %t -// CHECK:STDOUT: %T.ref.loc26: %facet_type = name_ref T, %T.loc22_15.2 [symbolic = %T.loc22_15.1 (constants.%T)] +// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc22_27.1 (%T.as_type.0fb) = name_ref t, %t +// CHECK:STDOUT: %T.ref.loc26: %facet_type.f2a = name_ref T, %T.loc22_15.2 [symbolic = %T.loc22_15.1 (constants.%T.c7f)] // CHECK:STDOUT: %I.ref.loc26_21: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] // CHECK:STDOUT: %I.facet.loc26_18.1: %I.type = facet_value %T.as_type.loc26, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)] // CHECK:STDOUT: %.loc26_18: %I.type = converted %T.ref.loc26, %I.facet.loc26_18.1 [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)] // CHECK:STDOUT: %.loc26_27: type = type_literal type [concrete = type] -// CHECK:STDOUT: %as_type.loc26_24: type = facet_access_type %.loc26_18 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc26_24: type = converted %.loc26_18, %as_type.loc26_24 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %as_type.loc26_24: type = facet_access_type %.loc26_18 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] +// CHECK:STDOUT: %.loc26_24: type = converted %.loc26_18, %as_type.loc26_24 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] // CHECK:STDOUT: %J.ref.loc26_36: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %J.facet.loc26_33.1: %J.type = facet_value %.loc26_24, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] // CHECK:STDOUT: %.loc26_33: %J.type = converted %.loc26_24, %J.facet.loc26_33.1 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] // CHECK:STDOUT: %.loc26_42: type = type_literal type [concrete = type] -// CHECK:STDOUT: %as_type.loc26_39: type = facet_access_type %.loc26_33 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc26_39: type = converted %.loc26_33, %as_type.loc26_39 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %as_type.loc26_39: type = facet_access_type %.loc26_33 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] +// CHECK:STDOUT: %.loc26_39: type = converted %.loc26_33, %as_type.loc26_39 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] // CHECK:STDOUT: %I.ref.loc26_51: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %I.facet.loc26_48: %I.type = facet_value %.loc26_39, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)] // CHECK:STDOUT: %.loc26_48: %I.type = converted %.loc26_39, %I.facet.loc26_48 [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.d3d)] // CHECK:STDOUT: %.loc26_57: type = type_literal type [concrete = type] -// CHECK:STDOUT: %as_type.loc26_54: type = facet_access_type %.loc26_48 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc26_54: type = converted %.loc26_48, %as_type.loc26_54 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %as_type.loc26_54: type = facet_access_type %.loc26_48 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] +// CHECK:STDOUT: %.loc26_54: type = converted %.loc26_48, %as_type.loc26_54 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] // CHECK:STDOUT: %J.ref.loc26_66: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %J.facet.loc26_63: %J.type = facet_value %.loc26_54, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] // CHECK:STDOUT: %.loc26_63: %J.type = converted %.loc26_54, %J.facet.loc26_63 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] -// CHECK:STDOUT: %as_type.loc26_67: type = facet_access_type %.loc26_63 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc26_67: type = converted %.loc26_63, %as_type.loc26_67 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type)] +// CHECK:STDOUT: %as_type.loc26_67: type = facet_access_type %.loc26_63 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] +// CHECK:STDOUT: %.loc26_67: type = converted %.loc26_63, %as_type.loc26_67 [symbolic = %T.as_type.loc22_27.1 (constants.%T.as_type.0fb)] // CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.WithSelf.%assoc0 [concrete = constants.%assoc0.89d] // CHECK:STDOUT: %impl.elem0.loc26_69.1: @F.%.loc26_69 (%.b3e) = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0.228)] // CHECK:STDOUT: %bound_method.loc26_69: = bound_method %t.ref, %impl.elem0.loc26_69.1 -// CHECK:STDOUT: %J.facet.loc26_73.1: %J.type = facet_value constants.%T.as_type, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] -// CHECK:STDOUT: %.loc26_73.1: %J.type = converted constants.%T.as_type, %J.facet.loc26_73.1 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] -// CHECK:STDOUT: %J.facet.loc26_73.2: %J.type = facet_value constants.%T.as_type, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] -// CHECK:STDOUT: %.loc26_73.2: %J.type = converted constants.%T.as_type, %J.facet.loc26_73.2 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] +// CHECK:STDOUT: %J.facet.loc26_73.1: %J.type = facet_value constants.%T.as_type.0fb, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] +// CHECK:STDOUT: %.loc26_73.1: %J.type = converted constants.%T.as_type.0fb, %J.facet.loc26_73.1 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] +// CHECK:STDOUT: %J.facet.loc26_73.2: %J.type = facet_value constants.%T.as_type.0fb, (constants.%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] +// CHECK:STDOUT: %.loc26_73.2: %J.type = converted constants.%T.as_type.0fb, %J.facet.loc26_73.2 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.cbc)] // CHECK:STDOUT: %specific_impl_fn.loc26_69.1: = specific_impl_function %impl.elem0.loc26_69.1, @J.WithSelf.JJ(constants.%J.facet.cbc) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn.02b)] // CHECK:STDOUT: %bound_method.loc26_73: = bound_method %t.ref, %specific_impl_fn.loc26_69.1 // CHECK:STDOUT: %J.WithSelf.JJ.call: init %empty_tuple.type = call %bound_method.loc26_73(%t.ref) @@ -479,7 +447,12 @@ fn G() { // CHECK:STDOUT: %bound_method: = bound_method %.loc40_8.2, %impl.elem0 [concrete = constants.%C.as.J.impl.JJ.bound] // CHECK:STDOUT: %.loc40_8.3: %C = acquire_value %.loc40_8.2 [concrete = constants.%C.val] // CHECK:STDOUT: %C.as.J.impl.JJ.call: init %empty_tuple.type = call %bound_method(%.loc40_8.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc40: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.5d3) +// CHECK:STDOUT: %Destroy.facet.loc40_8.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.de6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc40_8.4: %Destroy.type = converted constants.%C, %Destroy.facet.loc40_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc40_8.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.de6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc40_8.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc40_8.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc40: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc40_8.2) // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %C.ref.loc46_5: type = name_ref C, %C.decl [concrete = constants.%C] // CHECK:STDOUT: %.loc46_9.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] @@ -487,17 +460,22 @@ fn G() { // CHECK:STDOUT: %.loc46_9.2: ref %C = temporary_storage // CHECK:STDOUT: %.loc46_9.3: init %C to %.loc46_9.2 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc46_11.1: init %C = converted %.loc46_9.1, %.loc46_9.3 [concrete = constants.%C.val] -// CHECK:STDOUT: %facet_value.loc46_15.1: %facet_type = facet_value %C.ref.loc46_5, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value] -// CHECK:STDOUT: %.loc46_15.1: %facet_type = converted %C.ref.loc46_5, %facet_value.loc46_15.1 [concrete = constants.%facet_value] -// CHECK:STDOUT: %facet_value.loc46_15.2: %facet_type = facet_value constants.%C, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value] -// CHECK:STDOUT: %.loc46_15.2: %facet_type = converted constants.%C, %facet_value.loc46_15.2 [concrete = constants.%facet_value] -// CHECK:STDOUT: %facet_value.loc46_15.3: %facet_type = facet_value constants.%C, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value] -// CHECK:STDOUT: %.loc46_15.3: %facet_type = converted constants.%C, %facet_value.loc46_15.3 [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value.loc46_15.1: %facet_type.f2a = facet_value %C.ref.loc46_5, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc46_15.1: %facet_type.f2a = converted %C.ref.loc46_5, %facet_value.loc46_15.1 [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value.loc46_15.2: %facet_type.f2a = facet_value constants.%C, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc46_15.2: %facet_type.f2a = converted constants.%C, %facet_value.loc46_15.2 [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value.loc46_15.3: %facet_type.f2a = facet_value constants.%C, (constants.%I.impl_witness, constants.%J.impl_witness) [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc46_15.3: %facet_type.f2a = converted constants.%C, %facet_value.loc46_15.3 [concrete = constants.%facet_value] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%facet_value) [concrete = constants.%F.specific_fn] // CHECK:STDOUT: %.loc46_11.2: ref %C = temporary %.loc46_9.2, %.loc46_11.1 [concrete = constants.%.5d3] // CHECK:STDOUT: %.loc46_11.3: %C = acquire_value %.loc46_11.2 [concrete = constants.%C.val] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.specific_fn(%.loc46_11.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc46: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.5d3) +// CHECK:STDOUT: %Destroy.facet.loc46_11.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.de6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc46_11.4: %Destroy.type = converted constants.%C, %Destroy.facet.loc46_11.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc46_11.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.de6, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc46_11.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc46_11.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc46: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc46_11.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -511,27 +489,9 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc40_8.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc40_8.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc40_8.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc40_8.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc40_8.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc40_8.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%Self.37e) { // CHECK:STDOUT: !definition: @@ -563,25 +523,25 @@ fn G() { // CHECK:STDOUT: %self.patt.loc19_9.2 => constants.%self.patt.f35 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc22_15.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc22_15.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc22_27.1 => constants.%T.as_type +// CHECK:STDOUT: specific @F(constants.%T.c7f) { +// CHECK:STDOUT: %T.patt.loc22_15.2 => constants.%T.patt.3e5 +// CHECK:STDOUT: %T.loc22_15.1 => constants.%T.c7f +// CHECK:STDOUT: %T.as_type.loc22_27.1 => constants.%T.as_type.0fb // CHECK:STDOUT: %pattern_type => constants.%pattern_type.936 // CHECK:STDOUT: %t.param_patt.loc22_25.2 => constants.%t.param_patt.ed4 // CHECK:STDOUT: %t.patt.loc22_25.2 => constants.%t.patt.4c5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf(constants.%T) { +// CHECK:STDOUT: specific @I.WithSelf(constants.%T.c7f) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%T +// CHECK:STDOUT: %Self => constants.%T.c7f // CHECK:STDOUT: %I.WithSelf.II.type => constants.%I.WithSelf.II.type.42e // CHECK:STDOUT: %I.WithSelf.II => constants.%I.WithSelf.II.6c1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.WithSelf(constants.%T) { +// CHECK:STDOUT: specific @J.WithSelf(constants.%T.c7f) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%T +// CHECK:STDOUT: %Self => constants.%T.c7f // CHECK:STDOUT: %J.WithSelf.JJ.type => constants.%J.WithSelf.JJ.type.ff5 // CHECK:STDOUT: %J.WithSelf.JJ => constants.%J.WithSelf.JJ.bdc // CHECK:STDOUT: } @@ -595,7 +555,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: specific @J.WithSelf.JJ(constants.%J.facet.cbc) { // CHECK:STDOUT: %Self => constants.%J.facet.cbc -// CHECK:STDOUT: %Self.as_type.loc19_9.1 => constants.%T.as_type +// CHECK:STDOUT: %Self.as_type.loc19_9.1 => constants.%T.as_type.0fb // CHECK:STDOUT: %pattern_type => constants.%pattern_type.936 // CHECK:STDOUT: %self.param_patt.loc19_9.2 => constants.%self.param_patt.ad3 // CHECK:STDOUT: %self.patt.loc19_9.2 => constants.%self.patt.527 @@ -646,7 +606,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%facet_value) { -// CHECK:STDOUT: %T.patt.loc22_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc22_15.2 => constants.%T.patt.3e5 // CHECK:STDOUT: %T.loc22_15.1 => constants.%facet_value // CHECK:STDOUT: %T.as_type.loc22_27.1 => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f79 diff --git a/toolchain/check/testdata/impl/lookup/fail_poison_custom_witness.carbon b/toolchain/check/testdata/impl/lookup/fail_poison_custom_witness.carbon index 42ebaf5249fd..d8b6d4f911ea 100644 --- a/toolchain/check/testdata/impl/lookup/fail_poison_custom_witness.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_poison_custom_witness.carbon @@ -14,30 +14,25 @@ package Core library "destroy"; -// TODO: uncomment when `require impls` adds a witness table entry. -// interface SubobjectDestroy { -// final fn Op(ref self) = "subobject.destroy"; -// } +interface SubobjectDestroy { + fn Op(ref self); +} -interface Destroy { +impl forall [T: type] T as SubobjectDestroy { + fn Op(unused ref self) {} +} + +// TODO: rename to `Destroy` when `require impls` adds a witness table entry. +interface DestroyImpl { // TODO: uncomment when `require impls` adds a witness table entry. // require impls SubobjectDestroy; // TODO: change `Self` to `partial Self`. fn Op(ref self); +} - // TODO: remove when `require impls` adds a witness table entry. - final fn SubobjectDestroy(unused ref self) { - // This function body is ignored by the toolchain. We can't use - // a built-in because the compiler treats it as an error. We - // should address this at some point, but it's not a high - // priority right now. - } - - final fn SelfDestruct(ref self) { - self.Op(); - self.SubobjectDestroy(); - } +impl forall [T: SubobjectDestroy] T as DestroyImpl { + fn Op(ref self) = "no_op"; } // TODO: uncomment when `require impls` adds a witness table entry. @@ -45,9 +40,7 @@ interface Destroy { // alias Op = T.Op; // } -impl forall [T: type] T as Destroy { - fn Op(unused ref self) {} -} +fn SelfDestruct[T: DestroyImpl](unused ref t: T) {} // --- fail_poison_custom_witness.carbon @@ -63,9 +56,9 @@ struct A { }; '''; -// CHECK:STDERR: fail_poison_custom_witness.carbon:[[@LINE+4]]:1-9: error: found `impl` for Cpp.A as Destroy, which has a custom witness [PoisonedImplLookupCustomResult] +// CHECK:STDERR: fail_poison_custom_witness.carbon:[[@LINE+4]]:1-9: error: found `impl` for Cpp.A as SubobjectDestroy, which has a custom witness [PoisonedImplLookupCustomResult] // CHECK:STDERR: imported from: fail_poison_custom_witness.carbon:[[@LINE-12]]:1 [InImport] -// CHECK:STDERR: destroy.carbon:35:1-36: note: the use tried to select the `impl` here, but a custom witness was already chosen [PoisonedImplLookupCustomResultNoteBadImpl] +// CHECK:STDERR: destroy.carbon:8:1-45: note: the use tried to select the `impl` here, but a custom witness was already chosen [PoisonedImplLookupCustomResultNoteBadImpl] // CHECK:STDERR: class B { extend base: Cpp.A; diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index 6c6bd48bec52..f41f630f03d6 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -1753,8 +1753,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %U.patt: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %U.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %GenericInterface.type.cd1: type = generic_interface_type @GenericInterface [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -1765,11 +1765,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %X: %T = symbolic_binding X, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %X: %T.67d = symbolic_binding X, 1 [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %X.patt.9f0: %pattern_type.51d = symbolic_binding_pattern X, 1 [symbolic] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.ed9: type = pattern_type %GenericInterface.type.cd1 [concrete] // CHECK:STDOUT: %X.patt.ff8: %pattern_type.ed9 = symbolic_binding_pattern X, 1 [symbolic] // CHECK:STDOUT: %AnyParam.c70: type = class_type @AnyParam, @AnyParam(%GenericInterface.type.cd1, %GenericInterface.generic) [concrete] @@ -1801,27 +1801,25 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] // CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.b81 [concrete] // CHECK:STDOUT: %.b1b: type = fn_type_with_self_type %Y.WithSelf.K.type.347, %Y.facet [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc13_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2e8: %pattern_type.17c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a0c: %pattern_type.17c = wrapper_binding_pattern self, %self.param_patt.2e8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc13_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a33: %SubobjectDestroy.type = facet_value %AnyParam.c70, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.536: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a33) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.c70, (%DestroyImpl.impl_witness.536, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1833,46 +1831,17 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageHasParam.import_ref.87c = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)] -// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T.67d)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T.67d) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] // CHECK:STDOUT: %PackageHasParam.import_ref.705: %Y.assoc_type = import_ref PackageHasParam//default, loc7_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageHasParam.K: @Y.WithSelf.%Y.WithSelf.K.type (%Y.WithSelf.K.type.1c9) = import_ref PackageHasParam//default, K, loaded [symbolic = @Y.WithSelf.%Y.WithSelf.K (constants.%Y.WithSelf.K.1d5)] // CHECK:STDOUT: %PackageHasParam.import_ref.fa191b.2: %Y.type = import_ref PackageHasParam//default, loc6_13, loaded [symbolic = constants.%Self.aff] // CHECK:STDOUT: %PackageHasParam.import_ref.2ff5 = import_ref PackageHasParam//default, loc6_13, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.b81: @Y.WithSelf.%Y.WithSelf.K.type (%Y.WithSelf.K.type.1c9) = import_ref PackageHasParam//default, loc7_21, loaded [symbolic = @Y.WithSelf.%Y.WithSelf.K (constants.%Y.WithSelf.K.1d5)] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc13_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.17c = ref_param_pattern [concrete = constants.%self.param_patt.2e8] -// CHECK:STDOUT: %self.patt: %pattern_type.17c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a0c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AnyParam.c70 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AnyParam.c70 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc13_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.17c = ref_param_pattern [concrete = constants.%self.param_patt.2e8] -// CHECK:STDOUT: %self.patt: %pattern_type.17c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a0c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AnyParam.c70 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AnyParam.c70 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1885,7 +1854,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %PackageHasParam.import = import PackageHasParam // CHECK:STDOUT: %GenericInterface.decl: %GenericInterface.type.cd1 = interface_decl @GenericInterface [concrete = constants.%GenericInterface.generic] { -// CHECK:STDOUT: %U.patt.loc6_29.1: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_29.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc6_29.1: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_29.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc6_31.1: type = splice_block %.loc6_31.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -1906,7 +1875,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @GenericInterface(%U.loc6_29.2: type) { -// CHECK:STDOUT: %U.patt.loc6_29.2: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_29.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc6_29.2: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_29.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc6_29.1: type = symbolic_binding U, 0 [symbolic = %U.loc6_29.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1952,12 +1921,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: witness = %Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.b3b: type, imports.%PackageHasParam.import_ref.b42: @AnyParam.%T (%T)) [from "has_param.carbon"] { -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.b3b: type, imports.%PackageHasParam.import_ref.b42: @AnyParam.%T (%T.67d)) [from "has_param.carbon"] { +// CHECK:STDOUT: %T.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] // CHECK:STDOUT: %X.patt: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt (constants.%X.patt.9f0)] -// CHECK:STDOUT: %X: @AnyParam.%T (%T) = symbolic_binding X, 1 [symbolic = %X (constants.%X)] +// CHECK:STDOUT: %X: @AnyParam.%T (%T.67d) = symbolic_binding X, 1 [symbolic = %X (constants.%X)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1992,8 +1961,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %obj.var: ref %AnyParam.c70 = var_storage %obj.var_patt // CHECK:STDOUT: %.loc13_58.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc13_58.2: init %AnyParam.c70 to %obj.var = class_init () [concrete = constants.%AnyParam.val] -// CHECK:STDOUT: %.loc13_3: init %AnyParam.c70 = converted %.loc13_58.1, %.loc13_58.2 [concrete = constants.%AnyParam.val] -// CHECK:STDOUT: assign %obj.var, %.loc13_3 +// CHECK:STDOUT: %.loc13_3.1: init %AnyParam.c70 = converted %.loc13_58.1, %.loc13_58.2 [concrete = constants.%AnyParam.val] +// CHECK:STDOUT: assign %obj.var, %.loc13_3.1 // CHECK:STDOUT: %.loc13_53: type = splice_block %AnyParam [concrete = constants.%AnyParam.c70] { // CHECK:STDOUT: %PackageHasParam.ref.loc13: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%PackageHasParam.AnyParam [concrete = constants.%AnyParam.generic] @@ -2013,32 +1982,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc14: %AnyParam.c70 = acquire_value %obj.ref // CHECK:STDOUT: %AnyParam.as.Y.impl.K.call: init %empty_tuple.type = call %bound_method(%.loc14) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %obj.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%obj.var) +// CHECK:STDOUT: %Destroy.facet.loc13_3.1: %Destroy.type = facet_value constants.%AnyParam.c70, (constants.%DestroyImpl.impl_witness.536, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_3.2: %Destroy.type = converted constants.%AnyParam.c70, %Destroy.facet.loc13_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc13_3.2: %Destroy.type = facet_value constants.%AnyParam.c70, (constants.%DestroyImpl.impl_witness.536, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_3.3: %Destroy.type = converted constants.%AnyParam.c70, %Destroy.facet.loc13_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%obj.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.2(%self.param: ref %AnyParam.c70) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_3.2(%self.param: ref %AnyParam.c70) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_3.2(%self.param: ref %AnyParam.c70) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_3.2(%self.param: ref %AnyParam.c70) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericInterface(constants.%U) { // CHECK:STDOUT: %U.patt.loc6_29.2 => constants.%U.patt @@ -2047,16 +2002,16 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericInterface.WithSelf(constants.%U, constants.%Self.2d4) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) { -// CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @AnyParam(constants.%T.67d, constants.%X) { +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: %X.patt => constants.%X.patt.9f0 // CHECK:STDOUT: %X => constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AnyParam(constants.%GenericInterface.type.cd1, constants.%GenericInterface.generic) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T => constants.%GenericInterface.type.cd1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.ed9 // CHECK:STDOUT: %X.patt => constants.%X.patt.ff8 @@ -2106,17 +2061,17 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %X: %T = symbolic_binding X, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %X: %T.67d = symbolic_binding X, 1 [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %X.patt.9f0: %pattern_type.51d = symbolic_binding_pattern X, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %GenericInterface.type.cd1: type = generic_interface_type @GenericInterface [concrete] // CHECK:STDOUT: %GenericInterface.generic: %GenericInterface.type.cd1 = struct_value () [concrete] // CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %GenericInterface.type.5f5: type = facet_type <@GenericInterface, @GenericInterface(%U)> [symbolic] -// CHECK:STDOUT: %U.patt: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic] +// CHECK:STDOUT: %U.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %Self.395: %GenericInterface.type.5f5 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %pattern_type.ed9: type = pattern_type %GenericInterface.type.cd1 [concrete] // CHECK:STDOUT: %X.patt.ff8: %pattern_type.ed9 = symbolic_binding_pattern X, 1 [symbolic] @@ -2144,27 +2099,25 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %.273: type = fn_type_with_self_type %Y.WithSelf.K.type.9af, %Y.facet [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K.type: type = fn_type @AnyParam.as.Y.impl.K [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K: %AnyParam.as.Y.impl.K.type = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2e8: %pattern_type.17c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a0c: %pattern_type.17c = wrapper_binding_pattern self, %self.param_patt.2e8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a33: %SubobjectDestroy.type = facet_value %AnyParam.c70, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.536: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a33) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.c70, (%DestroyImpl.impl_witness.536, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2180,8 +2133,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageHasParam.import_ref.87c = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)] -// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T.67d)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T.67d) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageGenericInterface.GenericInterface: %GenericInterface.type.cd1 = import_ref PackageGenericInterface//default, GenericInterface, loaded [concrete = constants.%GenericInterface.generic] // CHECK:STDOUT: %PackageGenericInterface.import_ref.b88 = import_ref PackageGenericInterface//default, loc6_37, unloaded // CHECK:STDOUT: %PackageGenericInterface.import_ref.b3bc94.2: type = import_ref PackageGenericInterface//default, loc6_29, loaded [symbolic = @GenericInterface.%U (constants.%U)] @@ -2196,38 +2149,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageGenericInterface.import_ref.482: type = import_ref PackageGenericInterface//default, loc8_67, loaded [concrete = constants.%Y.type] // CHECK:STDOUT: %PackageGenericInterface.import_ref.49f: %AnyParam.as.Y.impl.K.type = import_ref PackageGenericInterface//default, loc9_21, loaded [concrete = constants.%AnyParam.as.Y.impl.K] // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (%PackageGenericInterface.import_ref.49f), @AnyParam.as.Y.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.17c = ref_param_pattern [concrete = constants.%self.param_patt.2e8] -// CHECK:STDOUT: %self.patt: %pattern_type.17c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a0c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AnyParam.c70 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AnyParam.c70 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.17c = ref_param_pattern [concrete = constants.%self.param_patt.2e8] -// CHECK:STDOUT: %self.patt: %pattern_type.17c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a0c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AnyParam.c70 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AnyParam.c70 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -2244,7 +2168,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @GenericInterface(imports.%PackageGenericInterface.import_ref.b3bc94.2: type) [from "has_generic_interface.carbon"] { -// CHECK:STDOUT: %U.patt: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt (constants.%U.patt)] +// CHECK:STDOUT: %U.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic = %U.patt (constants.%U.patt)] // CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic = %U (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2274,12 +2198,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: witness = imports.%PackageGenericInterface.import_ref.71f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.b3b: type, imports.%PackageHasParam.import_ref.b42: @AnyParam.%T (%T)) [from "has_param.carbon"] { -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.b3b: type, imports.%PackageHasParam.import_ref.b42: @AnyParam.%T (%T.67d)) [from "has_param.carbon"] { +// CHECK:STDOUT: %T.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] // CHECK:STDOUT: %X.patt: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt (constants.%X.patt.9f0)] -// CHECK:STDOUT: %X: @AnyParam.%T (%T) = symbolic_binding X, 1 [symbolic = %X (constants.%X)] +// CHECK:STDOUT: %X: @AnyParam.%T (%T.67d) = symbolic_binding X, 1 [symbolic = %X (constants.%X)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -2296,8 +2220,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %obj.var: ref %AnyParam.c70 = var_storage %obj.var_patt // CHECK:STDOUT: %.loc9_50.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_50.2: init %AnyParam.c70 to %obj.var = class_init () [concrete = constants.%AnyParam.val] -// CHECK:STDOUT: %.loc8: init %AnyParam.c70 = converted %.loc9_50.1, %.loc9_50.2 [concrete = constants.%AnyParam.val] -// CHECK:STDOUT: assign %obj.var, %.loc8 +// CHECK:STDOUT: %.loc8_3.1: init %AnyParam.c70 = converted %.loc9_50.1, %.loc9_50.2 [concrete = constants.%AnyParam.val] +// CHECK:STDOUT: assign %obj.var, %.loc8_3.1 // CHECK:STDOUT: %.loc9_45: type = splice_block %AnyParam [concrete = constants.%AnyParam.c70] { // CHECK:STDOUT: %PackageHasParam.ref.loc8: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%PackageHasParam.AnyParam [concrete = constants.%AnyParam.generic] @@ -2318,8 +2242,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc10: %AnyParam.c70 = acquire_value %obj.ref // CHECK:STDOUT: %AnyParam.as.Y.impl.K.call: init %empty_tuple.type = call %bound_method(%.loc10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %obj.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%obj.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%AnyParam.c70, (constants.%DestroyImpl.impl_witness.536, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%AnyParam.c70, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%AnyParam.c70, (constants.%DestroyImpl.impl_witness.536, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%AnyParam.c70, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%obj.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2338,31 +2266,13 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @AnyParam.as.Y.impl.K [from "has_generic_interface.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %AnyParam.c70) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %AnyParam.c70) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %AnyParam.c70) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %AnyParam.c70) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) { -// CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @AnyParam(constants.%T.67d, constants.%X) { +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: %X.patt => constants.%X.patt.9f0 // CHECK:STDOUT: %X => constants.%X @@ -2376,7 +2286,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: specific @GenericInterface.WithSelf(constants.%U, constants.%Self.395) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @AnyParam(constants.%GenericInterface.type.cd1, constants.%GenericInterface.generic) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T => constants.%GenericInterface.type.cd1 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.ed9 // CHECK:STDOUT: %X.patt => constants.%X.patt.ff8 @@ -2412,8 +2322,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %U.patt: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %U.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %GenericClass.type: type = parameterized_class_name_type @GenericClass [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -2423,11 +2333,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %AnyParam.type: type = parameterized_class_name_type @AnyParam [concrete] // CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [concrete] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %X: %T = symbolic_binding X, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %X: %T.67d = symbolic_binding X, 1 [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %X.patt.9f0: %pattern_type.51d = symbolic_binding_pattern X, 1 [symbolic] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.e92: type = pattern_type %GenericClass.type [concrete] // CHECK:STDOUT: %X.patt.739: %pattern_type.e92 = symbolic_binding_pattern X, 1 [symbolic] // CHECK:STDOUT: %AnyParam.a54: type = class_type @AnyParam, @AnyParam(%GenericClass.type, %GenericClass.generic) [concrete] @@ -2459,27 +2369,25 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] // CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.b81 [concrete] // CHECK:STDOUT: %.1b2: type = fn_type_with_self_type %Y.WithSelf.K.type.54e, %Y.facet [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc13_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8cd: %pattern_type.5e9 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f22: %pattern_type.5e9 = wrapper_binding_pattern self, %self.param_patt.8cd [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc13_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d65: %SubobjectDestroy.type = facet_value %AnyParam.a54, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e65: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d65) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.a54, (%DestroyImpl.impl_witness.e65, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2491,46 +2399,17 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageHasParam.import_ref.87c = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)] -// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T.67d)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T.67d) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] // CHECK:STDOUT: %PackageHasParam.import_ref.705: %Y.assoc_type = import_ref PackageHasParam//default, loc7_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageHasParam.K: @Y.WithSelf.%Y.WithSelf.K.type (%Y.WithSelf.K.type.1c9) = import_ref PackageHasParam//default, K, loaded [symbolic = @Y.WithSelf.%Y.WithSelf.K (constants.%Y.WithSelf.K.1d5)] // CHECK:STDOUT: %PackageHasParam.import_ref.fa191b.2: %Y.type = import_ref PackageHasParam//default, loc6_13, loaded [symbolic = constants.%Self.aff] // CHECK:STDOUT: %PackageHasParam.import_ref.2ff5 = import_ref PackageHasParam//default, loc6_13, unloaded // CHECK:STDOUT: %PackageHasParam.import_ref.b81: @Y.WithSelf.%Y.WithSelf.K.type (%Y.WithSelf.K.type.1c9) = import_ref PackageHasParam//default, loc7_21, loaded [symbolic = @Y.WithSelf.%Y.WithSelf.K (constants.%Y.WithSelf.K.1d5)] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc13_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5e9 = ref_param_pattern [concrete = constants.%self.param_patt.8cd] -// CHECK:STDOUT: %self.patt: %pattern_type.5e9 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f22] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AnyParam.a54 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AnyParam.a54 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc13_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5e9 = ref_param_pattern [concrete = constants.%self.param_patt.8cd] -// CHECK:STDOUT: %self.patt: %pattern_type.5e9 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f22] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AnyParam.a54 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AnyParam.a54 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -2543,7 +2422,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %PackageHasParam.import = import PackageHasParam // CHECK:STDOUT: %GenericClass.decl: %GenericClass.type = class_decl @GenericClass [concrete = constants.%GenericClass.generic] { -// CHECK:STDOUT: %U.patt.loc6_21.1: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_21.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc6_21.1: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_21.2 (constants.%U.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc6_23.1: type = splice_block %.loc6_23.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -2591,7 +2470,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @GenericClass(%U.loc6_21.2: type) { -// CHECK:STDOUT: %U.patt.loc6_21.2: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_21.2 (constants.%U.patt)] +// CHECK:STDOUT: %U.patt.loc6_21.2: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc6_21.2 (constants.%U.patt)] // CHECK:STDOUT: %U.loc6_21.1: type = symbolic_binding U, 0 [symbolic = %U.loc6_21.1 (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2605,12 +2484,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.b3b: type, imports.%PackageHasParam.import_ref.b42: @AnyParam.%T (%T)) [from "has_param.carbon"] { -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.b3b: type, imports.%PackageHasParam.import_ref.b42: @AnyParam.%T (%T.67d)) [from "has_param.carbon"] { +// CHECK:STDOUT: %T.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] // CHECK:STDOUT: %X.patt: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt (constants.%X.patt.9f0)] -// CHECK:STDOUT: %X: @AnyParam.%T (%T) = symbolic_binding X, 1 [symbolic = %X (constants.%X)] +// CHECK:STDOUT: %X: @AnyParam.%T (%T.67d) = symbolic_binding X, 1 [symbolic = %X (constants.%X)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -2645,8 +2524,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %obj.var: ref %AnyParam.a54 = var_storage %obj.var_patt // CHECK:STDOUT: %.loc13_54.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc13_54.2: init %AnyParam.a54 to %obj.var = class_init () [concrete = constants.%AnyParam.val] -// CHECK:STDOUT: %.loc13_3: init %AnyParam.a54 = converted %.loc13_54.1, %.loc13_54.2 [concrete = constants.%AnyParam.val] -// CHECK:STDOUT: assign %obj.var, %.loc13_3 +// CHECK:STDOUT: %.loc13_3.1: init %AnyParam.a54 = converted %.loc13_54.1, %.loc13_54.2 [concrete = constants.%AnyParam.val] +// CHECK:STDOUT: assign %obj.var, %.loc13_3.1 // CHECK:STDOUT: %.loc13_49: type = splice_block %AnyParam [concrete = constants.%AnyParam.a54] { // CHECK:STDOUT: %PackageHasParam.ref.loc13: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%PackageHasParam.AnyParam [concrete = constants.%AnyParam.generic] @@ -2666,48 +2545,34 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc14: %AnyParam.a54 = acquire_value %obj.ref // CHECK:STDOUT: %AnyParam.as.Y.impl.K.call: init %empty_tuple.type = call %bound_method(%.loc14) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %obj.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%obj.var) +// CHECK:STDOUT: %Destroy.facet.loc13_3.1: %Destroy.type = facet_value constants.%AnyParam.a54, (constants.%DestroyImpl.impl_witness.e65, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_3.2: %Destroy.type = converted constants.%AnyParam.a54, %Destroy.facet.loc13_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc13_3.2: %Destroy.type = facet_value constants.%AnyParam.a54, (constants.%DestroyImpl.impl_witness.e65, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_3.3: %Destroy.type = converted constants.%AnyParam.a54, %Destroy.facet.loc13_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%obj.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13_3.2(%self.param: ref %AnyParam.a54) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13_3.2(%self.param: ref %AnyParam.a54) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13_3.2(%self.param: ref %AnyParam.a54) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13_3.2(%self.param: ref %AnyParam.a54) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericClass(constants.%U) { // CHECK:STDOUT: %U.patt.loc6_21.2 => constants.%U.patt // CHECK:STDOUT: %U.loc6_21.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) { -// CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @AnyParam(constants.%T.67d, constants.%X) { +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: %X.patt => constants.%X.patt.9f0 // CHECK:STDOUT: %X => constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AnyParam(constants.%GenericClass.type, constants.%GenericClass.generic) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T => constants.%GenericClass.type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e92 // CHECK:STDOUT: %X.patt => constants.%X.patt.739 @@ -2757,16 +2622,16 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %X: %T = symbolic_binding X, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %X: %T.67d = symbolic_binding X, 1 [symbolic] +// CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %X.patt.9f0: %pattern_type.51d = symbolic_binding_pattern X, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %GenericClass.type: type = parameterized_class_name_type @GenericClass [concrete] // CHECK:STDOUT: %GenericClass.generic: %GenericClass.type = struct_value () [concrete] // CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic] -// CHECK:STDOUT: %U.patt: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic] +// CHECK:STDOUT: %U.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.e92: type = pattern_type %GenericClass.type [concrete] // CHECK:STDOUT: %X.patt.739: %pattern_type.e92 = symbolic_binding_pattern X, 1 [symbolic] // CHECK:STDOUT: %AnyParam.a54: type = class_type @AnyParam, @AnyParam(%GenericClass.type, %GenericClass.generic) [concrete] @@ -2793,27 +2658,25 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %.5bc: type = fn_type_with_self_type %Y.WithSelf.K.type.de0, %Y.facet [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K.type: type = fn_type @AnyParam.as.Y.impl.K [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K: %AnyParam.as.Y.impl.K.type = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8cd: %pattern_type.5e9 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f22: %pattern_type.5e9 = wrapper_binding_pattern self, %self.param_patt.8cd [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d65: %SubobjectDestroy.type = facet_value %AnyParam.a54, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e65: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d65) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %AnyParam.a54, (%DestroyImpl.impl_witness.e65, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2829,8 +2692,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.AnyParam: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [concrete = constants.%AnyParam.generic] // CHECK:STDOUT: %PackageHasParam.import_ref.8f2: = import_ref PackageHasParam//default, loc4_32, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageHasParam.import_ref.87c = import_ref PackageHasParam//default, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T)] -// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_17, loaded [symbolic = @AnyParam.%T (constants.%T.67d)] +// CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T.67d) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageGenericClass.GenericClass: %GenericClass.type = import_ref PackageGenericClass//default, GenericClass, loaded [concrete = constants.%GenericClass.generic] // CHECK:STDOUT: %PackageGenericClass.import_ref.8f2: = import_ref PackageGenericClass//default, loc6_30, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageGenericClass.import_ref.0cd = import_ref PackageGenericClass//default, inst{{[0-9A-F]+}} [no loc], unloaded @@ -2846,38 +2709,9 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageGenericClass.import_ref.482: type = import_ref PackageGenericClass//default, loc8_63, loaded [concrete = constants.%Y.type] // CHECK:STDOUT: %PackageGenericClass.import_ref.64c: %AnyParam.as.Y.impl.K.type = import_ref PackageGenericClass//default, loc9_21, loaded [concrete = constants.%AnyParam.as.Y.impl.K] // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (%PackageGenericClass.import_ref.64c), @AnyParam.as.Y.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5e9 = ref_param_pattern [concrete = constants.%self.param_patt.8cd] -// CHECK:STDOUT: %self.patt: %pattern_type.5e9 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f22] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AnyParam.a54 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AnyParam.a54 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5e9 = ref_param_pattern [concrete = constants.%self.param_patt.8cd] -// CHECK:STDOUT: %self.patt: %pattern_type.5e9 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f22] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %AnyParam.a54 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %AnyParam.a54 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -2907,12 +2741,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: witness = imports.%PackageGenericClass.import_ref.4ae // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.b3b: type, imports.%PackageHasParam.import_ref.b42: @AnyParam.%T (%T)) [from "has_param.carbon"] { -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic class @AnyParam(imports.%PackageHasParam.import_ref.b3b: type, imports.%PackageHasParam.import_ref.b42: @AnyParam.%T (%T.67d)) [from "has_param.carbon"] { +// CHECK:STDOUT: %T.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] // CHECK:STDOUT: %X.patt: @AnyParam.%pattern_type (%pattern_type.51d) = symbolic_binding_pattern X, 1 [symbolic = %X.patt (constants.%X.patt.9f0)] -// CHECK:STDOUT: %X: @AnyParam.%T (%T) = symbolic_binding X, 1 [symbolic = %X (constants.%X)] +// CHECK:STDOUT: %X: @AnyParam.%T (%T.67d) = symbolic_binding X, 1 [symbolic = %X (constants.%X)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -2925,7 +2759,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @GenericClass(imports.%PackageGenericClass.import_ref.b3b: type) [from "has_generic_class.carbon"] { -// CHECK:STDOUT: %U.patt: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt (constants.%U.patt)] +// CHECK:STDOUT: %U.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic = %U.patt (constants.%U.patt)] // CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic = %U (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2943,8 +2777,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %obj.var: ref %AnyParam.a54 = var_storage %obj.var_patt // CHECK:STDOUT: %.loc8_74.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_74.2: init %AnyParam.a54 to %obj.var = class_init () [concrete = constants.%AnyParam.val] -// CHECK:STDOUT: %.loc8_3: init %AnyParam.a54 = converted %.loc8_74.1, %.loc8_74.2 [concrete = constants.%AnyParam.val] -// CHECK:STDOUT: assign %obj.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %AnyParam.a54 = converted %.loc8_74.1, %.loc8_74.2 [concrete = constants.%AnyParam.val] +// CHECK:STDOUT: assign %obj.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_69: type = splice_block %AnyParam [concrete = constants.%AnyParam.a54] { // CHECK:STDOUT: %PackageHasParam.ref.loc8: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%PackageHasParam.AnyParam [concrete = constants.%AnyParam.generic] @@ -2965,8 +2799,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc9: %AnyParam.a54 = acquire_value %obj.ref // CHECK:STDOUT: %AnyParam.as.Y.impl.K.call: init %empty_tuple.type = call %bound_method(%.loc9) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %obj.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%obj.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%AnyParam.a54, (constants.%DestroyImpl.impl_witness.e65, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%AnyParam.a54, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%AnyParam.a54, (constants.%DestroyImpl.impl_witness.e65, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%AnyParam.a54, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%obj.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2985,31 +2823,13 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @AnyParam.as.Y.impl.K [from "has_generic_class.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %AnyParam.a54) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %AnyParam.a54) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %AnyParam.a54) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %AnyParam.a54) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) { -// CHECK:STDOUT: %T.patt => constants.%T.patt -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @AnyParam(constants.%T.67d, constants.%X) { +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: %X.patt => constants.%X.patt.9f0 // CHECK:STDOUT: %X => constants.%X @@ -3021,7 +2841,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AnyParam(constants.%GenericClass.type, constants.%GenericClass.generic) { -// CHECK:STDOUT: %T.patt => constants.%T.patt +// CHECK:STDOUT: %T.patt => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T => constants.%GenericClass.type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e92 // CHECK:STDOUT: %X.patt => constants.%X.patt.739 diff --git a/toolchain/check/testdata/impl/lookup/transitive.carbon b/toolchain/check/testdata/impl/lookup/transitive.carbon index 01e33558494d..45829b2be219 100644 --- a/toolchain/check/testdata/impl/lookup/transitive.carbon +++ b/toolchain/check/testdata/impl/lookup/transitive.carbon @@ -327,7 +327,6 @@ fn Call() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %pattern_type.98b: type = pattern_type %C [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.dda: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I.WithSelf.F.type.eae: type = fn_type @I.WithSelf.F, @I.WithSelf(%Self.dda) [symbolic] @@ -345,29 +344,27 @@ fn Call() { // CHECK:STDOUT: %.07b: type = fn_type_with_self_type %I.WithSelf.F.type.925, %I.facet [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.Get: %Get.type = import_ref Main//get, Get, loaded [concrete = constants.%Get] // CHECK:STDOUT: %Main.I: type = import_ref Main//i, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -383,38 +380,9 @@ fn Call() { // CHECK:STDOUT: %Main.import_ref.e90: type = import_ref Main//c, loc7_11, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.import_ref.0d0: %C.as.I.impl.F.type = import_ref Main//c, loc7_33, loaded [concrete = constants.%C.as.I.impl.F] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.0d0), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -462,8 +430,12 @@ fn Call() { // CHECK:STDOUT: %.loc9_7.2: ref %C = temporary %.loc9_7.1, %Get.call // CHECK:STDOUT: %.loc9_7.3: %C = acquire_value %.loc9_7.2 // CHECK:STDOUT: %C.as.I.impl.F.call: init %empty_tuple.type = call %bound_method(%.loc9_7.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc9_7.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc9_7.2) +// CHECK:STDOUT: %Destroy.facet.loc9_7.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_7.4: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_7.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_7.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc9_7.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -481,27 +453,9 @@ fn Call() { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.I.impl.F [from "c.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_7.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_7.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_7.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_7.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_7.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_7.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%Self.dda) { // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index 4d0efb6e3d55..a0fc5ba4065f 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -76,7 +76,6 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3bd: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] @@ -108,31 +107,34 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.776: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.7fa: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_4.6bf: %i32 = int_value 4 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.6cc: %pattern_type.7dc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a12: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt.6cc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc21 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc21 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc21 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e31: %pattern_type.d4e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6c6: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt.e31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc21 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d4d: %SubobjectDestroy.type = facet_value %ptr.a17, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b8f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d4d) [concrete] +// CHECK:STDOUT: %Destroy.facet.abb: %Destroy.type = facet_value %ptr.a17, (%DestroyImpl.impl_witness.b8f, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.690: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.abb) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.79c: %SubobjectDestroy.type = facet_value %Array.95c, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.90e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.79c) [concrete] +// CHECK:STDOUT: %Destroy.facet.416: %Destroy.type = facet_value %Array.95c, (%DestroyImpl.impl_witness.90e, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.cd8: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.416) [concrete] // CHECK:STDOUT: %b.patt.e038c1.2: %pattern_type.d4e = wrapper_binding_pattern b, %b.param_patt [concrete] // CHECK:STDOUT: %ValueBinding.type: type = fn_type @ValueBinding [concrete] // CHECK:STDOUT: %ValueBinding: %ValueBinding.type = struct_value () [concrete] @@ -144,7 +146,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -156,52 +158,9 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.06a: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.20f) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.f12)] // CHECK:STDOUT: %Copy.impl_witness_table.fb0 = impl_witness_table (%Core.import_ref.06a), @ptr.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc21 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc21 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc18_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d4e = ref_param_pattern [concrete = constants.%self.param_patt.e31] -// CHECK:STDOUT: %self.patt: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.95c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.95c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc18_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d4e = ref_param_pattern [concrete = constants.%self.param_patt.e31] -// CHECK:STDOUT: %self.patt: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.95c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.95c = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -286,8 +245,8 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc18_34.9: ref %i32 = array_index %a.var, %int_2.loc18_34 // CHECK:STDOUT: %.loc18_34.10: init %i32 to %.loc18_34.9 = in_place_init %.loc18_34.8 [concrete = constants.%int_3.9f3] // CHECK:STDOUT: %.loc18_34.11: init %Array.95c to %a.var = array_init (%.loc18_34.4, %.loc18_34.7, %.loc18_34.10) [concrete = constants.%array] -// CHECK:STDOUT: %.loc18_3: init %Array.95c = converted %.loc18_34.1, %.loc18_34.11 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc18_3 +// CHECK:STDOUT: %.loc18_3.1: init %Array.95c = converted %.loc18_34.1, %.loc18_34.11 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc18_3.1 // CHECK:STDOUT: %.loc18_22: type = splice_block %Array.loc18 [concrete = constants.%Array.95c] { // CHECK:STDOUT: %i32.loc18: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_3.loc18_21: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -343,58 +302,51 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_8: init %i32 = call %bound_method.loc22_8.2(%int_4) [concrete = constants.%int_4.6bf] // CHECK:STDOUT: %.loc22_8: init %i32 = converted %int_4, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_8 [concrete = constants.%int_4.6bf] // CHECK:STDOUT: assign %.loc22_6, %.loc22_8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21: = bound_method %pa.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21(%pa.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc21_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc21_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc21_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc21_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc21_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc21_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abb) [concrete = constants.%SelfDestruct.specific_fn.690] +// CHECK:STDOUT: %SelfDestruct.call.loc21: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%pa.var) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.416) [concrete = constants.%SelfDestruct.specific_fn.cd8] +// CHECK:STDOUT: %SelfDestruct.call.loc18: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc21(%self.param: ref %ptr.a17) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc21(%self.param: ref %ptr.a17) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc21(%self.param: ref %ptr.a17) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc21(%self.param: ref %ptr.a17) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %Array.95c) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_3.2(%self.param: ref %Array.95c) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc18_3.1: ref %i32 = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_3.1: = bound_method %.loc18_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_3.1(%.loc18_3.1) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc18_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc18_3.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %.loc18_3.2: ref %i32 = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_3.2: = bound_method %.loc18_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_3.2(%.loc18_3.2) +// CHECK:STDOUT: %.loc18_3.4: ref %i32 = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc18_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc18_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc18_3.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc18_3.3: ref %i32 = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_3.3: = bound_method %.loc18_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_3.3(%.loc18_3.3) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.2(%self.param: ref %Array.95c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_3.2(%self.param: ref %Array.95c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc18_3.7: ref %i32 = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc18_3.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.8: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_3.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.9: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc18_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc18_3.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -433,8 +385,8 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc26_34.9: ref %i32 = array_index %a.var, %int_2.loc26_34 // CHECK:STDOUT: %.loc26_34.10: init %i32 to %.loc26_34.9 = in_place_init %.loc26_34.8 [concrete = constants.%int_3.9f3] // CHECK:STDOUT: %.loc26_34.11: init %Array.95c to %a.var = array_init (%.loc26_34.4, %.loc26_34.7, %.loc26_34.10) [concrete = constants.%array] -// CHECK:STDOUT: %.loc26_3: init %Array.95c = converted %.loc26_34.1, %.loc26_34.11 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc26_3 +// CHECK:STDOUT: %.loc26_3.1: init %Array.95c = converted %.loc26_34.1, %.loc26_34.11 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc26_3.1 // CHECK:STDOUT: %.loc26_22: type = splice_block %Array.loc26 [concrete = constants.%Array.95c] { // CHECK:STDOUT: %i32.loc26: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %int_3.loc26_21: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -481,10 +433,18 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc32_7.2: %i32 = converted %int_0.loc32, %.loc32_7.1 [concrete = constants.%int_0.753] // CHECK:STDOUT: %.loc32_8.1: ref %i32 = array_index %.loc32_5.2, %.loc32_7.2 // CHECK:STDOUT: %.loc32_8.2: %i32 = acquire_value %.loc32_8.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc32: = bound_method %.loc32_5.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc32: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc32(%.loc32_5.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc26: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc26: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc26(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc32_5.1: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc32_5.3: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc32_5.1 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %Destroy.facet.loc32_5.2: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc32_5.4: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc32_5.2 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.416) [concrete = constants.%SelfDestruct.specific_fn.cd8] +// CHECK:STDOUT: %SelfDestruct.call.loc32: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc32_5.2) +// CHECK:STDOUT: %Destroy.facet.loc26_3.1: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc26_3.2: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc26_3.1 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %Destroy.facet.loc26_3.2: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc26_3.3: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc26_3.2 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.416) [concrete = constants.%SelfDestruct.specific_fn.cd8] +// CHECK:STDOUT: %SelfDestruct.call.loc26: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index e37ae9dc276d..ef3700a8694d 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -75,7 +75,6 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.762: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.036: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.753: %i32 = int_value 0 [concrete] @@ -95,33 +94,36 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %int_4.6bf: %i32 = int_value 4 [concrete] // CHECK:STDOUT: %pf.patt: %pattern_type.7dc = ref_binding_pattern pf [concrete] // CHECK:STDOUT: %pf.var_patt: %pattern_type.7dc = var_pattern %pf.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc33_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc33_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc33_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e31: %pattern_type.d4e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6c6: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt.e31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc33_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc33_5.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc33_5.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc33_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc33_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.6cc: %pattern_type.7dc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a12: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt.6cc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc30 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc30 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc30 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.79c: %SubobjectDestroy.type = facet_value %Array.95c, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.90e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.79c) [concrete] +// CHECK:STDOUT: %Destroy.facet.416: %Destroy.type = facet_value %Array.95c, (%DestroyImpl.impl_witness.90e, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.cd8: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.416) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc30 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d4d: %SubobjectDestroy.type = facet_value %ptr.a17, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b8f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d4d) [concrete] +// CHECK:STDOUT: %Destroy.facet.abb: %Destroy.type = facet_value %ptr.a17, (%DestroyImpl.impl_witness.b8f, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.690: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.abb) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -130,7 +132,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: .Array = %Core.Array // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -142,52 +144,9 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.06a: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.20f) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.f12)] // CHECK:STDOUT: %Copy.impl_witness_table.fb0 = impl_witness_table (%Core.import_ref.06a), @ptr.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc33_5.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc33_5.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc33_5.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d4e = ref_param_pattern [concrete = constants.%self.param_patt.e31] -// CHECK:STDOUT: %self.patt: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.95c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.95c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc33_5.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d4e = ref_param_pattern [concrete = constants.%self.param_patt.e31] -// CHECK:STDOUT: %self.patt: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.95c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.95c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc30 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc30 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -328,62 +287,63 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc33_10: init %i32 = call %bound_method.loc33_10.2(%int_4.loc33) [concrete = constants.%int_4.6bf] // CHECK:STDOUT: %.loc33_10: init %i32 = converted %int_4.loc33, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc33_10 [concrete = constants.%int_4.6bf] // CHECK:STDOUT: assign %.loc33_8.2, %.loc33_10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc33: = bound_method %.loc33_5.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc33: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc33(%.loc33_5.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc30_28: = bound_method %.loc30_28.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc30_28: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc30_28(%.loc30_28.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc30_3: = bound_method %pf.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc30_3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc30_3(%pf.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21: = bound_method %pb.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21(%pb.var) +// CHECK:STDOUT: %Destroy.facet.loc33_5.1: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc33_5.3: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc33_5.1 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %Destroy.facet.loc33_5.2: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc33_5.4: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc33_5.2 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.416) [concrete = constants.%SelfDestruct.specific_fn.cd8] +// CHECK:STDOUT: %SelfDestruct.call.loc33: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc33_5.2) +// CHECK:STDOUT: %Destroy.facet.loc30_28.1: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc30_28.3: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc30_28.1 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %Destroy.facet.loc30_28.2: %Destroy.type = facet_value constants.%Array.95c, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %.loc30_28.4: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc30_28.2 [concrete = constants.%Destroy.facet.416] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.416) [concrete = constants.%SelfDestruct.specific_fn.cd8] +// CHECK:STDOUT: %SelfDestruct.call.loc30_28: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc30_28.2) +// CHECK:STDOUT: %Destroy.facet.loc30_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc30_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc30_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc30_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc30_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc30_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abb) [concrete = constants.%SelfDestruct.specific_fn.690] +// CHECK:STDOUT: %SelfDestruct.call.loc30_3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%pf.var) +// CHECK:STDOUT: %Destroy.facet.loc21_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc21_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc21_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc21_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc21_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc21_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.4: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abb) [concrete = constants.%SelfDestruct.specific_fn.690] +// CHECK:STDOUT: %SelfDestruct.call.loc21: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%pb.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc33_5.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc33_5.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc33_5.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc33_5.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc33_5.2(%self.param: ref %Array.95c) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc33_5.2(%self.param: ref %Array.95c) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %.loc33_5.1: ref %i32 = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc33_5.1: = bound_method %.loc33_5.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc33_5.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc33_5.1(%.loc33_5.1) +// CHECK:STDOUT: %Destroy.facet.loc33_5.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_5.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_5.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc33_5.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_5.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_5.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc33_5.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc33_5.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc33_5.2: ref %i32 = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc33_5.2: = bound_method %.loc33_5.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc33_5.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc33_5.2(%.loc33_5.2) +// CHECK:STDOUT: %.loc33_5.4: ref %i32 = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc33_5.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_5.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_5.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc33_5.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_5.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_5.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc33_5.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc33_5.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc33_5.3: ref %i32 = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc33_5.3: = bound_method %.loc33_5.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc33_5.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc33_5.3(%.loc33_5.3) +// CHECK:STDOUT: %.loc33_5.7: ref %i32 = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc33_5.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_5.8: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_5.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc33_5.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc33_5.9: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_5.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc33_5.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc33_5.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc33_5.2(%self.param: ref %Array.95c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc33_5.2(%self.param: ref %Array.95c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc30(%self.param: ref %ptr.a17) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc30(%self.param: ref %ptr.a17) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc30(%self.param: ref %ptr.a17) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc30(%self.param: ref %ptr.a17) = "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 eae94349d3bb..e7034470293a 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -33,43 +33,33 @@ fn Main() { // CHECK:STDOUT: %b.patt: %pattern_type.d94 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.d94 = var_pattern %b.patt [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc18 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -94,19 +84,14 @@ fn Main() { // CHECK:STDOUT: %b.patt: %pattern_type.d94 = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.d94 = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%b.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/as_type_of_type.carbon b/toolchain/check/testdata/interface/as_type_of_type.carbon index 9b69b5709607..abca5c56b6d4 100644 --- a/toolchain/check/testdata/interface/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/as_type_of_type.carbon @@ -56,24 +56,27 @@ fn F(generic T: Empty) { // CHECK:STDOUT: %.8b0: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type.343, %DefaultOrUnformed.facet [symbolic] // CHECK:STDOUT: %impl.elem0.fbe: %.8b0 = impl_witness_access %DefaultOrUnformed.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.87e: = specific_impl_function %impl.elem0.fbe, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet) [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.91e: = lookup_impl_witness %ptr, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr, (%Destroy.lookup_impl_witness.91e) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.9f3: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet) [symbolic] -// CHECK:STDOUT: %.585: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.9f3, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem2: %.585 = impl_witness_access %Destroy.lookup_impl_witness.91e, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.dab: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.bfc: = lookup_impl_witness %ptr, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.a87: = lookup_impl_witness %ptr, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.8cb: %SubobjectDestroy.type = facet_value %ptr, (%SubobjectDestroy.lookup_impl_witness.a87) [symbolic] +// CHECK:STDOUT: %.7e3: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.8cb) [symbolic] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr, (%DestroyImpl.lookup_impl_witness.bfc, %SubobjectDestroy.lookup_impl_witness.a87) [symbolic] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -148,12 +151,12 @@ fn F(generic T: Empty) { // CHECK:STDOUT: %.loc22_19.4: type = fn_type_with_self_type %DefaultOrUnformed.WithSelf.Op.type, %DefaultOrUnformed.facet.loc22_19.2 [symbolic = %.loc22_19.4 (constants.%.8b0)] // CHECK:STDOUT: %impl.elem0.loc22_19.2: @F.%.loc22_19.4 (%.8b0) = impl_witness_access %DefaultOrUnformed.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_19.2 (constants.%impl.elem0.fbe)] // CHECK:STDOUT: %specific_impl_fn.loc22_19.2: = specific_impl_function %impl.elem0.loc22_19.2, @DefaultOrUnformed.WithSelf.Op(%DefaultOrUnformed.facet.loc22_19.2) [symbolic = %specific_impl_fn.loc22_19.2 (constants.%specific_impl_fn.87e)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc22_18.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.91e)] -// CHECK:STDOUT: %Destroy.facet.loc22_3.3: %Destroy.type = facet_value %ptr.loc22_18.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc22_3.3 (constants.%Destroy.facet)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct, @Destroy.WithSelf(%Destroy.facet.loc22_3.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.9f3)] -// CHECK:STDOUT: %.loc22_3.3: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc22_3.3 [symbolic = %.loc22_3.3 (constants.%.585)] -// CHECK:STDOUT: %impl.elem2.loc22_3.2: @F.%.loc22_3.3 (%.585) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc22_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc22_3.2: = specific_impl_function %impl.elem2.loc22_3.2, @Destroy.WithSelf.SelfDestruct(%Destroy.facet.loc22_3.3) [symbolic = %specific_impl_fn.loc22_3.2 (constants.%specific_impl_fn.dab)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc22_18.2, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.a87)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %ptr.loc22_18.2, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.8cb)] +// CHECK:STDOUT: %.loc22_3.3: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc22_3.3 (constants.%.7e3)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %ptr.loc22_18.2, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.bfc)] +// CHECK:STDOUT: %Destroy.facet.loc22_3.3: %Destroy.type = facet_value %ptr.loc22_18.2, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc22_3.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(%Destroy.facet.loc22_3.3) [symbolic = %SelfDestruct.specific_fn.2 (constants.%SelfDestruct.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -177,15 +180,12 @@ fn F(generic T: Empty) { // CHECK:STDOUT: %x.patt.loc22_15.1: @F.%pattern_type (%pattern_type.777) = ref_binding_pattern x [symbolic = %x.patt.loc22_15.2 (constants.%x.patt)] // CHECK:STDOUT: %x.var_patt.loc22_3.1: @F.%pattern_type (%pattern_type.777) = var_pattern %x.patt.loc22_15.1 [symbolic = %x.var_patt.loc22_3.2 (constants.%x.var_patt)] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem2.loc22_3.1: @F.%.loc22_3.3 (%.585) = impl_witness_access constants.%Destroy.lookup_impl_witness.91e, element2 [symbolic = %impl.elem2.loc22_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %x.var, %impl.elem2.loc22_3.1 -// CHECK:STDOUT: %Destroy.facet.loc22_3.1: %Destroy.type = facet_value constants.%ptr, (constants.%Destroy.lookup_impl_witness.91e) [symbolic = %Destroy.facet.loc22_3.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %Destroy.facet.loc22_3.1: %Destroy.type = facet_value constants.%ptr, (constants.%DestroyImpl.lookup_impl_witness.bfc, constants.%SubobjectDestroy.lookup_impl_witness.a87) [symbolic = %Destroy.facet.loc22_3.3 (constants.%Destroy.facet)] // CHECK:STDOUT: %.loc22_3.1: %Destroy.type = converted constants.%ptr, %Destroy.facet.loc22_3.1 [symbolic = %Destroy.facet.loc22_3.3 (constants.%Destroy.facet)] -// CHECK:STDOUT: %Destroy.facet.loc22_3.2: %Destroy.type = facet_value constants.%ptr, (constants.%Destroy.lookup_impl_witness.91e) [symbolic = %Destroy.facet.loc22_3.3 (constants.%Destroy.facet)] +// CHECK:STDOUT: %Destroy.facet.loc22_3.2: %Destroy.type = facet_value constants.%ptr, (constants.%DestroyImpl.lookup_impl_witness.bfc, constants.%SubobjectDestroy.lookup_impl_witness.a87) [symbolic = %Destroy.facet.loc22_3.3 (constants.%Destroy.facet)] // CHECK:STDOUT: %.loc22_3.2: %Destroy.type = converted constants.%ptr, %Destroy.facet.loc22_3.2 [symbolic = %Destroy.facet.loc22_3.3 (constants.%Destroy.facet)] -// CHECK:STDOUT: %specific_impl_fn.loc22_3.1: = specific_impl_function %impl.elem2.loc22_3.1, @Destroy.WithSelf.SelfDestruct(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc22_3.2 (constants.%specific_impl_fn.dab)] -// CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %x.var, %specific_impl_fn.loc22_3.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc22_3.2(%x.var) +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [symbolic = %SelfDestruct.specific_fn.2 (constants.%SelfDestruct.specific_fn)] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%x.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/default_fn.carbon b/toolchain/check/testdata/interface/default_fn.carbon index f6dabd15c337..7df7d0492b86 100644 --- a/toolchain/check/testdata/interface/default_fn.carbon +++ b/toolchain/check/testdata/interface/default_fn.carbon @@ -82,52 +82,22 @@ fn Call() { ().(I.G)(); } // CHECK:STDOUT: %self.param_patt.303: %pattern_type.98b = value_param_pattern [concrete] // CHECK:STDOUT: %self.patt.36a: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.303 [concrete] // CHECK:STDOUT: %I.WithSelf.F.specific_fn: = specific_function %I.WithSelf.F.a34, @I.WithSelf.F(%I.facet) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { @@ -202,8 +172,8 @@ fn Call() { ().(I.G)(); } // CHECK:STDOUT: %c.var: ref %C = var_storage %c.var_patt // CHECK:STDOUT: %.loc9_19.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_19.2: init %C to %c.var = class_init () [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc9_7: init %C = converted %.loc9_19.1, %.loc9_19.2 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %c.var, %.loc9_7 +// CHECK:STDOUT: %.loc9_7.1: init %C = converted %.loc9_19.1, %.loc9_19.2 [concrete = constants.%C.val] +// CHECK:STDOUT: assign %c.var, %.loc9_7.1 // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %c: ref %C = wrapper_binding c, %c.var // CHECK:STDOUT: name_binding_decl { @@ -223,33 +193,19 @@ fn Call() { ().(I.G)(); } // CHECK:STDOUT: %bound_method.loc10_15: = bound_method %c.ref, %specific_fn // CHECK:STDOUT: %.loc10_7: %C = acquire_value %c.ref // CHECK:STDOUT: %I.WithSelf.F.call: init %empty_tuple.type = call %bound_method.loc10_15(%.loc10_7) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc9_7.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_7.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_7.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_7.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%c.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_7.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_7.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_7.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_7.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_7.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_7.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf(constants.%Self.4e9) { // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/interface/fail_incorrect_destroy_method_declarations.carbon b/toolchain/check/testdata/interface/fail_incorrect_destroy_method_declarations.carbon deleted file mode 100644 index 1f71e94ae2e8..000000000000 --- a/toolchain/check/testdata/interface/fail_incorrect_destroy_method_declarations.carbon +++ /dev/null @@ -1,281 +0,0 @@ -// Part of the Carbon Language project, under the Apache License v2.0 with LLVM -// Exceptions. See /LICENSE for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon -// -// AUTOUPDATE -// TIP: To test this file alone, run: -// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interface/fail_incorrect_destroy_method_declarations.carbon -// TIP: To dump output, run: -// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_incorrect_destroy_method_declarations.carbon - -// TODO: remove `SubobjectDestroy` when `require impls` adds a witness table entry. - -// --- fail_too_few_assoc_functions_declared.carbon - -package Core library "too_few_assoc_functions_declared"; - -// CHECK:STDERR: fail_too_few_assoc_functions_declared.carbon:[[@LINE+2]]:1-19: error: semantics TODO: `interface `Core.Destroy` needs exactly 3 associated functions` [SemanticsTodo] -// CHECK:STDERR: -interface Destroy { - final fn SubobjectDestroy(ref self) {} - final fn SelfDestruct(unused ref self) {} -} - -// --- fail_too_many_assoc_functions_declared.carbon - -package Core library "too_many_assoc_functions_declared"; - -// CHECK:STDERR: fail_too_many_assoc_functions_declared.carbon:[[@LINE+2]]:1-19: error: semantics TODO: `interface `Core.Destroy` needs exactly 3 associated functions` [SemanticsTodo] -// CHECK:STDERR: -interface Destroy { - fn Op(ref self); - final fn SubobjectDestroy(ref self) {} - final fn SelfDestruct(unused ref self) {} - fn Extra(ref self) {} -} - -// --- fail_op_associated_type.carbon - -package Core library "op_associated_type"; - -interface Destroy { - // CHECK:STDERR: fail_op_associated_type.carbon:[[@LINE+2]]:7-14: error: semantics TODO: `associated entity must be a method` [SemanticsTodo] - // CHECK:STDERR: - let Op: type; - final fn SubobjectDestroy(ref self) {} - final fn SelfDestruct(unused ref self) {} -} - -// --- fail_op_wrong_name.carbon - -package Core library "op_wrong_name"; - -interface Destroy { - // CHECK:STDERR: fail_op_wrong_name.carbon:[[@LINE+2]]:3-39: error: semantics TODO: `associated function #1 must be named `Op`` [SemanticsTodo] - // CHECK:STDERR: - final fn SubobjectDestroy(ref self) {} - fn Op(ref self); - final fn SelfDestruct(unused ref self) {} -} - -// --- fail_op_no_params.carbon - -package Core library "op_no_params"; - -interface Destroy { - // CHECK:STDERR: fail_op_no_params.carbon:[[@LINE+2]]:3-10: error: semantics TODO: `associated function must have exactly 1 parameter` [SemanticsTodo] - // CHECK:STDERR: - fn Op(); - final fn SubobjectDestroy(unused ref self) {} - final fn SelfDestruct(unused ref self) {} -} - -// --- fail_op_two_params.carbon - -package Core library "op_two_params"; - -interface Destroy { - // CHECK:STDERR: fail_op_two_params.carbon:[[@LINE+2]]:3-27: error: semantics TODO: `associated function must have exactly 1 parameter` [SemanticsTodo] - // CHECK:STDERR: - fn Op(ref self, x: Self); - final fn SubobjectDestroy(unused ref self) {} - final fn SelfDestruct(unused ref self) {} -} - -// --- fail_op_param_not_self.carbon - -package Core library "op_param_not_self"; - -class C {} - -interface Destroy { - // CHECK:STDERR: fail_op_param_not_self.carbon:[[@LINE+2]]:3-14: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] - // CHECK:STDERR: - fn Op(c: C); - final fn SubobjectDestroy(unused ref self) {} - final fn SelfDestruct(unused ref self) {} -} - -// --- fail_op_param_is_generic.carbon - -package Core library "op_param_is_generic"; - -interface Destroy { - // CHECK:STDERR: fail_op_param_is_generic.carbon:[[@LINE+2]]:3-27: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] - // CHECK:STDERR: - fn Op[T: type](ref c: T); - final fn SubobjectDestroy(unused ref self) {} - final fn SelfDestruct(unused ref self) {} -} - -// --- fail_op_self_param_not_reference.carbon - -package Core library "op_self_param_not_reference"; - -interface Destroy { - // CHECK:STDERR: fail_op_self_param_not_reference.carbon:[[@LINE+2]]:3-14: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] - // CHECK:STDERR: - fn Op(self); - final fn SubobjectDestroy(unused ref self) {} - final fn SelfDestruct(unused ref self) {} -} - -// --- fail_op_explicit_self_type.carbon - -package Core library "op_explicit_self_type"; - -interface Destroy { - // CHECK:STDERR: fail_op_explicit_self_type.carbon:[[@LINE+2]]:3-21: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] - // CHECK:STDERR: - fn Op(ref s: Self); - final fn SubobjectDestroy(unused ref self) {} - final fn SelfDestruct(unused ref self) {} -} - -// --- fail_op_final.carbon - -package Core library "op_final"; - -interface Destroy { - // CHECK:STDERR: fail_op_final.carbon:[[@LINE+2]]:3-32: error: semantics TODO: `associated function must not have an interface modifier` [SemanticsTodo] - // CHECK:STDERR: - final fn Op(unused ref self) {} - final fn SubobjectDestroy(unused ref self) {} - final fn SelfDestruct(unused ref self) {} -} - -// --- fail_op_default.carbon - -package Core library "op_default"; - -interface Destroy { - // CHECK:STDERR: fail_op_default.carbon:[[@LINE+2]]:3-34: error: semantics TODO: `associated function must not have an interface modifier` [SemanticsTodo] - // CHECK:STDERR: - default fn Op(unused ref self) {} - final fn SubobjectDestroy(unused ref self) {} - final fn SelfDestruct(unused ref self) {} -} - -// --- fail_self_destruct_associated_type.carbon - -package Core library "self_destruct_associated_type"; - -interface Destroy { - fn Op(ref self); - final fn SubobjectDestroy(unused ref self) {} - // CHECK:STDERR: fail_self_destruct_associated_type.carbon:[[@LINE+2]]:7-24: error: semantics TODO: `associated entity must be a method` [SemanticsTodo] - // CHECK:STDERR: - let SelfDestruct: type; -} - -// --- fail_self_destruct_wrong_name.carbon - -package Core library "self_destruct_wrong_name"; - -interface Destroy { - fn Op(ref self); - final fn SubobjectDestroy(unused ref self) {} - // CHECK:STDERR: fail_self_destruct_wrong_name.carbon:[[@LINE+2]]:3-42: error: semantics TODO: `associated function #3 must be named `SelfDestruct`` [SemanticsTodo] - // CHECK:STDERR: - final fn selfDestruct(unused ref self) {} -} - -// --- fail_self_destruct_no_params.carbon - -package Core library "self_destruct_no_params"; - -interface Destroy { - fn Op(ref self); - final fn SubobjectDestroy(unused ref self) {} - // CHECK:STDERR: fail_self_destruct_no_params.carbon:[[@LINE+2]]:3-27: error: semantics TODO: `associated function must have exactly 1 parameter` [SemanticsTodo] - // CHECK:STDERR: - final fn SelfDestruct() {} -} - -// --- fail_self_destruct_two_params.carbon - -package Core library "self_destruct_two_params"; - -interface Destroy { - fn Op(ref self); - final fn SubobjectDestroy(unused ref self) {} - // CHECK:STDERR: fail_self_destruct_two_params.carbon:[[@LINE+2]]:3-58: error: semantics TODO: `associated function must have exactly 1 parameter` [SemanticsTodo] - // CHECK:STDERR: - final fn SelfDestruct(unused ref self, unused x: Self) {} -} - -// --- fail_self_destruct_param_not_self.carbon - -package Core library "self_destruct_param_not_self"; - -class C {} - -interface Destroy { - fn Op(ref self); - final fn SubobjectDestroy(unused ref self) {} - // CHECK:STDERR: fail_self_destruct_param_not_self.carbon:[[@LINE+2]]:3-42: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] - // CHECK:STDERR: - final fn SelfDestruct(unused ref c: C) {} -} - -// --- fail_self_destruct_param_is_generic.carbon - -package Core library "self_destruct_param_is_generic"; - -interface Destroy { - fn Op(ref self); - final fn SubobjectDestroy(unused ref self) {} - // CHECK:STDERR: fail_self_destruct_param_is_generic.carbon:[[@LINE+2]]:3-51: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] - // CHECK:STDERR: - final fn SelfDestruct[T: type](unused ref c: T) {} -} - -// --- fail_self_destruct_self_param_not_reference.carbon - -package Core library "self_destruct_self_param_not_reference"; - -interface Destroy { - fn Op(ref self); - final fn SubobjectDestroy(unused ref self) {} - // CHECK:STDERR: fail_self_destruct_self_param_not_reference.carbon:[[@LINE+2]]:3-38: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] - // CHECK:STDERR: - final fn SelfDestruct(unused self) {} -} - -// --- fail_self_destruct_explicit_self_type.carbon - -package Core library "self_destruct_explicit_self_type"; - -interface Destroy { - fn Op(ref self); - final fn SubobjectDestroy(unused ref self) {} - // CHECK:STDERR: fail_self_destruct_explicit_self_type.carbon:[[@LINE+2]]:3-45: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] - // CHECK:STDERR: - final fn SelfDestruct(unused ref s: Self) {} -} - -// --- fail_self_destruct_not_final.carbon - -package Core library "self_destruct_not_final"; - -interface Destroy { - fn Op(ref self); - final fn SubobjectDestroy(unused ref self) {} - // CHECK:STDERR: fail_self_destruct_not_final.carbon:[[@LINE+2]]:3-36: error: semantics TODO: `associated function must be `final`` [SemanticsTodo] - // CHECK:STDERR: - fn SelfDestruct(unused ref self) {} -} - -// --- fail_self_destruct_default.carbon - -package Core library "self_destruct_default"; - -interface Destroy { - fn Op(ref self); - final fn SubobjectDestroy(unused ref self) {} - // CHECK:STDERR: fail_self_destruct_default.carbon:[[@LINE+2]]:3-44: error: semantics TODO: `associated function must be `final`` [SemanticsTodo] - // CHECK:STDERR: - default fn SelfDestruct(unused ref self) {} -} diff --git a/toolchain/check/testdata/interface/fail_incorrect_subobject_destroy_method_declarations.carbon b/toolchain/check/testdata/interface/fail_incorrect_subobject_destroy_method_declarations.carbon index 519f08e04dd9..e0b93f3152d7 100644 --- a/toolchain/check/testdata/interface/fail_incorrect_subobject_destroy_method_declarations.carbon +++ b/toolchain/check/testdata/interface/fail_incorrect_subobject_destroy_method_declarations.carbon @@ -10,65 +10,65 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_incorrect_subobject_destroy_method_declarations.carbon -// TODO: change to `SubobjectDestroy` when `require impls` adds a witness table entry. -// --- fail_op_not_declared.carbon +// --- fail_too_few_assoc_functions_declared.carbon -package Core library "op_not_declared"; +package Core library "too_few_assoc_functions_declared"; -// CHECK:STDERR: fail_op_not_declared.carbon:[[@LINE+2]]:1-19: error: semantics TODO: `interface `Core.Destroy` needs exactly 3 associated functions` [SemanticsTodo] +// CHECK:STDERR: fail_too_few_assoc_functions_declared.carbon:[[@LINE+2]]:1-28: error: semantics TODO: `interface `Core.SubobjectDestroy` needs exactly 1 associated function` [SemanticsTodo] // CHECK:STDERR: -interface Destroy { +interface SubobjectDestroy { +} + +// --- fail_too_many_assoc_functions_declared.carbon + +package Core library "too_many_assoc_functions_declared"; + +// CHECK:STDERR: fail_too_many_assoc_functions_declared.carbon:[[@LINE+2]]:1-28: error: semantics TODO: `interface `Core.SubobjectDestroy` needs exactly 1 associated function` [SemanticsTodo] +// CHECK:STDERR: +interface SubobjectDestroy { fn Op(ref self); - final fn SelfDestruct(unused ref self) {} + fn Extra(ref self) {} } // --- fail_op_associated_type.carbon package Core library "op_associated_type"; -interface Destroy { - fn Op(ref self); - // CHECK:STDERR: fail_op_associated_type.carbon:[[@LINE+2]]:7-28: error: semantics TODO: `associated entity must be a method` [SemanticsTodo] +interface SubobjectDestroy { + // CHECK:STDERR: fail_op_associated_type.carbon:[[@LINE+2]]:7-14: error: semantics TODO: `associated entity must be a method` [SemanticsTodo] // CHECK:STDERR: - let SubobjectDestroy: type; - final fn SelfDestruct(unused ref self) {} + let Op: type; } // --- fail_op_wrong_name.carbon package Core library "op_wrong_name"; -interface Destroy { - fn Op(ref self); - // CHECK:STDERR: fail_op_wrong_name.carbon:[[@LINE+2]]:3-42: error: semantics TODO: `associated function #2 must be named `SubobjectDestroy`` [SemanticsTodo] +interface SubobjectDestroy { + // CHECK:STDERR: fail_op_wrong_name.carbon:[[@LINE+2]]:3-39: error: semantics TODO: `associated function #1 must be named `Op`` [SemanticsTodo] // CHECK:STDERR: - final fn SelfDestruct(unused ref self) {} - final fn SubobjectDestroy(unused ref self) {} + final fn SubobjectDestroy(ref self) {} } // --- fail_op_no_params.carbon package Core library "op_no_params"; -interface Destroy { - fn Op(ref self); - // CHECK:STDERR: fail_op_no_params.carbon:[[@LINE+2]]:3-31: error: semantics TODO: `associated function must have exactly 1 parameter` [SemanticsTodo] +interface SubobjectDestroy { + // CHECK:STDERR: fail_op_no_params.carbon:[[@LINE+2]]:3-10: error: semantics TODO: `associated function must have exactly 1 parameter` [SemanticsTodo] // CHECK:STDERR: - final fn SubobjectDestroy() {} - final fn SelfDestruct(unused ref self) {} + fn Op(); } // --- fail_op_two_params.carbon package Core library "op_two_params"; -interface Destroy { - fn Op(ref self); - // CHECK:STDERR: fail_op_two_params.carbon:[[@LINE+2]]:3-62: error: semantics TODO: `associated function must have exactly 1 parameter` [SemanticsTodo] +interface SubobjectDestroy { + // CHECK:STDERR: fail_op_two_params.carbon:[[@LINE+2]]:3-27: error: semantics TODO: `associated function must have exactly 1 parameter` [SemanticsTodo] // CHECK:STDERR: - final fn SubobjectDestroy(unused ref self, unused x: Self) {} - final fn SelfDestruct(unused ref self) {} + fn Op(ref self, x: Self); } // --- fail_op_param_not_self.carbon @@ -77,70 +77,58 @@ package Core library "op_param_not_self"; class C {} -interface Destroy { - fn Op(ref self); - // CHECK:STDERR: fail_op_param_not_self.carbon:[[@LINE+2]]:3-46: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] +interface SubobjectDestroy { + // CHECK:STDERR: fail_op_param_not_self.carbon:[[@LINE+2]]:3-14: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] // CHECK:STDERR: - final fn SubobjectDestroy(unused ref c: C) {} - final fn SelfDestruct(unused ref self) {} + fn Op(c: C); } // --- fail_op_param_is_generic.carbon package Core library "op_param_is_generic"; -interface Destroy { - fn Op(ref self); - // CHECK:STDERR: fail_op_param_is_generic.carbon:[[@LINE+2]]:3-55: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] +interface SubobjectDestroy { + // CHECK:STDERR: fail_op_param_is_generic.carbon:[[@LINE+2]]:3-27: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] // CHECK:STDERR: - final fn SubobjectDestroy[T: type](unused ref c: T) {} - final fn SelfDestruct(unused ref self) {} + fn Op[T: type](ref c: T); } // --- fail_op_self_param_not_reference.carbon package Core library "op_self_param_not_reference"; -interface Destroy { - fn Op(ref self); - // CHECK:STDERR: fail_op_self_param_not_reference.carbon:[[@LINE+2]]:3-42: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] +interface SubobjectDestroy { + // CHECK:STDERR: fail_op_self_param_not_reference.carbon:[[@LINE+2]]:3-14: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] // CHECK:STDERR: - final fn SubobjectDestroy(unused self) {} - final fn SelfDestruct(unused ref self) {} + fn Op(self); } // --- fail_op_explicit_self_type.carbon package Core library "op_explicit_self_type"; -interface Destroy { - fn Op(ref self); - // CHECK:STDERR: fail_op_explicit_self_type.carbon:[[@LINE+2]]:3-49: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] +interface SubobjectDestroy { + // CHECK:STDERR: fail_op_explicit_self_type.carbon:[[@LINE+2]]:3-21: error: semantics TODO: `associated function must take `ref self` as its parameter` [SemanticsTodo] // CHECK:STDERR: - final fn SubobjectDestroy(unused ref s: Self) {} - final fn SelfDestruct(unused ref self) {} + fn Op(ref s: Self); } -// --- fail_op_not_final.carbon +// --- fail_op_final.carbon -package Core library "op_not_final"; +package Core library "op_final"; -interface Destroy { - fn Op(ref self); - // CHECK:STDERR: fail_op_not_final.carbon:[[@LINE+2]]:3-40: error: semantics TODO: `associated function must be `final`` [SemanticsTodo] +interface SubobjectDestroy { + // CHECK:STDERR: fail_op_final.carbon:[[@LINE+2]]:3-32: error: semantics TODO: `associated function must not have an interface modifier` [SemanticsTodo] // CHECK:STDERR: - fn SubobjectDestroy(unused ref self) {} - final fn SelfDestruct(unused ref self) {} + final fn Op(unused ref self) {} } // --- fail_op_default.carbon package Core library "op_default"; -interface Destroy { - fn Op(ref self); - // CHECK:STDERR: fail_op_default.carbon:[[@LINE+2]]:3-48: error: semantics TODO: `associated function must be `final`` [SemanticsTodo] +interface SubobjectDestroy { + // CHECK:STDERR: fail_op_default.carbon:[[@LINE+2]]:3-34: error: semantics TODO: `associated function must not have an interface modifier` [SemanticsTodo] // CHECK:STDERR: - default fn SubobjectDestroy(unused ref self) {} - final fn SelfDestruct(unused ref self) {} + default fn Op(unused ref self) {} } diff --git a/toolchain/check/testdata/interface/fail_member_lookup.carbon b/toolchain/check/testdata/interface/fail_member_lookup.carbon index 2ab4d6de1ee6..c85a6ce45b99 100644 --- a/toolchain/check/testdata/interface/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/fail_member_lookup.carbon @@ -53,7 +53,8 @@ fn G(generic U: Different) -> U.(Interface.T); // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Different.type: type = facet_type <@Different> [concrete] // CHECK:STDOUT: %Self.8ba: %Different.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] @@ -68,12 +69,12 @@ fn G(generic U: Different) -> U.(Interface.T); // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/interface/generic_method.carbon b/toolchain/check/testdata/interface/generic_method.carbon index 6ef154a56c9e..0935b4a0bd73 100644 --- a/toolchain/check/testdata/interface/generic_method.carbon +++ b/toolchain/check/testdata/interface/generic_method.carbon @@ -89,15 +89,15 @@ fn CallIndirect() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %A.type.55a: type = generic_interface_type @A [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %A.generic: %A.type.55a = struct_value () [concrete] // CHECK:STDOUT: %A.type.fa0: type = facet_type <@A, @A(%T.67d)> [symbolic] // CHECK:STDOUT: %Self.5d3: %A.type.fa0 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %U.patt.5c4: %pattern_type.9a5 = symbolic_binding_pattern U, 2 [symbolic] +// CHECK:STDOUT: %U.patt.5c4: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 2 [symbolic] // CHECK:STDOUT: %U.4e7: type = symbolic_binding U, 2 [symbolic] // CHECK:STDOUT: %ptr.8f6: type = ptr_type %U.4e7 [symbolic] // CHECK:STDOUT: %pattern_type.986: type = pattern_type %ptr.8f6 [symbolic] @@ -128,7 +128,7 @@ fn CallIndirect() { // CHECK:STDOUT: %A.WithSelf.F.f8c: %A.WithSelf.F.type.457 = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type.7e3: type = assoc_entity_type @A, @A(%X) [concrete] // CHECK:STDOUT: %assoc0.299: %A.assoc_type.7e3 = assoc_entity element0, @A.WithSelf.%A.WithSelf.F.decl [concrete] -// CHECK:STDOUT: %U.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic] +// CHECK:STDOUT: %U.patt.3a0: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f8f9.1: type = ptr_type %U.67d [symbolic] // CHECK:STDOUT: %pattern_type.4f4b84.1: type = pattern_type %ptr.e8f8f9.1 [symbolic] @@ -189,64 +189,54 @@ fn CallIndirect() { // CHECK:STDOUT: %return.param_patt.75d: %pattern_type.b33 = out_param_pattern [concrete] // CHECK:STDOUT: %return.patt.8bb: %pattern_type.b33 = return_slot_pattern %return.param_patt.75d, %tuple.type.2cd [concrete] // CHECK:STDOUT: %Y.as.A.impl.F.specific_fn: = specific_function %Y.as.A.impl.F, @Y.as.A.impl.F(%Z) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_22.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc23_22.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.6cb: type = pattern_type %X [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_22.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc23_22.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_22.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.7ab: type = pattern_type %Y [concrete] -// CHECK:STDOUT: %self.param_patt.1fb: %pattern_type.7ab = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eee: %pattern_type.7ab = wrapper_binding_pattern self, %self.param_patt.1fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_22.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc23_22.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_22.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.3: = custom_witness (%Destroy.WithSelf.Op.403171.3, %Destroy.WithSelf.SubobjectDestroy.d01daf.3, %Destroy.WithSelf.SelfDestruct.db3fdb.3), @Destroy [concrete] -// CHECK:STDOUT: %self.param_patt.bff: %pattern_type.b4b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eb4: %pattern_type.b4b = wrapper_binding_pattern self, %self.param_patt.bff [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_22.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc23_22.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_22.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.64d: %pattern_type.b33 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a7a: %pattern_type.b33 = wrapper_binding_pattern self, %self.param_patt.64d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_22.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_22.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_22.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_22.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_22.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ceb: %SubobjectDestroy.type = facet_value %ptr.415, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.011: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ceb) [concrete] +// CHECK:STDOUT: %complete_type.458: = complete_type_witness %ptr.415 [concrete] +// CHECK:STDOUT: %Destroy.facet.95d: %Destroy.type = facet_value %ptr.415, (%DestroyImpl.impl_witness.011, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3fb: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.95d) [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.8db: %SubobjectDestroy.type = facet_value %Y, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a90: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.8db) [concrete] +// CHECK:STDOUT: %Destroy.facet.911: %Destroy.type = facet_value %Y, (%DestroyImpl.impl_witness.a90, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2cf: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.911) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc23_22.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_22.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.5: = custom_witness (%Destroy.WithSelf.Op.403171.5, %Destroy.WithSelf.SubobjectDestroy.d01daf.5, %Destroy.WithSelf.SelfDestruct.db3fdb.5), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.6e7: %Destroy.type = facet_value %tuple.type.2cd, (%custom_witness.f8f19d.5) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.d8a: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.6e7) [concrete] -// CHECK:STDOUT: %.0dd: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.d8a, %Destroy.facet.6e7 [concrete] -// CHECK:STDOUT: %self.param_patt.37e: %pattern_type.34e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f3f: %pattern_type.34e = wrapper_binding_pattern self, %self.param_patt.37e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc5) [concrete] +// CHECK:STDOUT: %Destroy.facet.689: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.e12, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.399: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.689) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c56: %SubobjectDestroy.type = facet_value %tuple.type.2cd, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.289: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c56) [concrete] +// CHECK:STDOUT: %complete_type.dec: = complete_type_witness %tuple.type.2cd [concrete] +// CHECK:STDOUT: %.db9: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c56) [concrete] +// CHECK:STDOUT: %Destroy.facet.079: %Destroy.type = facet_value %tuple.type.2cd, (%DestroyImpl.impl_witness.289, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.7c9: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.079) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.6: type = fn_type @SubobjectDestroy.WithSelf.Op.loc22 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.6: %SubobjectDestroy.WithSelf.Op.type.6870fd.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.6: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.6), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.5d5: %SubobjectDestroy.type = facet_value %Z, (%custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6a0: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.5d5) [concrete] +// CHECK:STDOUT: %Destroy.facet.2ca: %Destroy.type = facet_value %Z, (%DestroyImpl.impl_witness.6a0, %custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.29c: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.2ca) [concrete] // CHECK:STDOUT: %BitAndWith.type.a06: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.a06 = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.7f7: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] @@ -257,41 +247,39 @@ fn CallIndirect() { // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %A.type.e51, %type.as.BitAndWith.impl.Op [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@A, @A(%X) & @Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.442: type = pattern_type %facet_type [concrete] -// CHECK:STDOUT: %T.patt.018: %pattern_type.442 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T.381: %facet_type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %facet_type.e51: type = facet_type <@A, @A(%X) & @Destroy> [concrete] +// CHECK:STDOUT: %pattern_type.c6b: type = pattern_type %facet_type.e51 [concrete] +// CHECK:STDOUT: %T.patt.0e0: %pattern_type.c6b = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.646: %facet_type.e51 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete] -// CHECK:STDOUT: %A.WithSelf.F.type.bde: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %T.381) [symbolic] -// CHECK:STDOUT: %A.WithSelf.F.3e2: %A.WithSelf.F.type.bde = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.6e4: type = facet_access_type %T.381 [symbolic] -// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.381, @A, @A(%X) [symbolic] -// CHECK:STDOUT: %A.facet.89c: %A.type.e51 = facet_value %T.as_type.6e4, (%A.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %A.WithSelf.F.type.e56: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %A.facet.89c) [symbolic] -// CHECK:STDOUT: %A.WithSelf.F.03c: %A.WithSelf.F.type.e56 = struct_value () [symbolic] -// CHECK:STDOUT: %.66b: type = fn_type_with_self_type %A.WithSelf.F.type.e56, %A.facet.89c [symbolic] -// CHECK:STDOUT: %impl.elem0.a46: %.66b = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %tuple.602: %tuple.type.924 = tuple_value (%X, %A.facet.89c, %ptr.415) [symbolic] -// CHECK:STDOUT: %tuple.type.05a: type = tuple_type (%X, %T.as_type.6e4, %ptr.415) [symbolic] -// CHECK:STDOUT: %.f9f: Core.Form = init_form %tuple.type.05a [symbolic] -// CHECK:STDOUT: %pattern_type.671: type = pattern_type %tuple.type.05a [symbolic] -// CHECK:STDOUT: %return.param_patt.7a4: %pattern_type.671 = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.0f7: %pattern_type.671 = return_slot_pattern %return.param_patt.7a4, %tuple.type.05a [symbolic] -// CHECK:STDOUT: %specific_impl_fn.189: = specific_impl_function %impl.elem0.a46, @A.WithSelf.F(%X, %A.facet.89c, %Z) [symbolic] -// CHECK:STDOUT: %require_complete.8c3: = require_complete_type %tuple.type.05a [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.263: = lookup_impl_witness %tuple.type.05a, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.944: %Destroy.type = facet_value %tuple.type.05a, (%Destroy.lookup_impl_witness.263) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.216: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.944) [symbolic] -// CHECK:STDOUT: %.fe1: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.216, %Destroy.facet.944 [symbolic] -// CHECK:STDOUT: %impl.elem2: %.fe1 = impl_witness_access %Destroy.lookup_impl_witness.263, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.073: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.944) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.type.566: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %T.646) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.879: %A.WithSelf.F.type.566 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.407: type = facet_access_type %T.646 [symbolic] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.646, @A, @A(%X) [symbolic] +// CHECK:STDOUT: %A.facet.7c2: %A.type.e51 = facet_value %T.as_type.407, (%A.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.type.1e4: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %A.facet.7c2) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.085: %A.WithSelf.F.type.1e4 = struct_value () [symbolic] +// CHECK:STDOUT: %.2a6: type = fn_type_with_self_type %A.WithSelf.F.type.1e4, %A.facet.7c2 [symbolic] +// CHECK:STDOUT: %impl.elem0.907: %.2a6 = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %tuple.c5e: %tuple.type.924 = tuple_value (%X, %A.facet.7c2, %ptr.415) [symbolic] +// CHECK:STDOUT: %tuple.type.d80: type = tuple_type (%X, %T.as_type.407, %ptr.415) [symbolic] +// CHECK:STDOUT: %.394: Core.Form = init_form %tuple.type.d80 [symbolic] +// CHECK:STDOUT: %pattern_type.dd9: type = pattern_type %tuple.type.d80 [symbolic] +// CHECK:STDOUT: %return.param_patt.dd6: %pattern_type.dd9 = out_param_pattern [symbolic] +// CHECK:STDOUT: %return.patt.921: %pattern_type.dd9 = return_slot_pattern %return.param_patt.dd6, %tuple.type.d80 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bf9: = specific_impl_function %impl.elem0.907, @A.WithSelf.F(%X, %A.facet.7c2, %Z) [symbolic] +// CHECK:STDOUT: %require_complete.d1b: = require_complete_type %tuple.type.d80 [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.ec9: = lookup_impl_witness %tuple.type.d80, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.a22: = lookup_impl_witness %tuple.type.d80, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.2b2: %SubobjectDestroy.type = facet_value %tuple.type.d80, (%SubobjectDestroy.lookup_impl_witness.a22) [symbolic] +// CHECK:STDOUT: %.d3f: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.2b2) [symbolic] +// CHECK:STDOUT: %Destroy.facet.ae3: %Destroy.type = facet_value %tuple.type.d80, (%DestroyImpl.lookup_impl_witness.ec9, %SubobjectDestroy.lookup_impl_witness.a22) [symbolic] +// CHECK:STDOUT: %SelfDestruct.specific_fn.e0e: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.ae3) [symbolic] // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete] // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete] -// CHECK:STDOUT: %facet_value: %facet_type = facet_value %Y, (%A.impl_witness, %custom_witness.f8f19d.3) [concrete] +// CHECK:STDOUT: %facet_value: %facet_type.e51 = facet_value %Y, (%A.impl_witness, %DestroyImpl.impl_witness.a90, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric, @CallGeneric(%facet_value) [concrete] -// CHECK:STDOUT: %complete_type.458: = complete_type_witness %ptr.415 [concrete] -// CHECK:STDOUT: %complete_type.dec: = complete_type_witness %tuple.type.2cd [concrete] // CHECK:STDOUT: %tuple.type.2c5: type = tuple_type (%empty_struct_type, %empty_struct_type, %ptr.415) [concrete] // CHECK:STDOUT: %Copy.impl_witness.99b: = impl_witness imports.%Copy.impl_witness_table.fb0, @ptr.as.Copy.impl(%Z) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.a7d: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Z) [concrete] @@ -308,6 +296,7 @@ fn CallIndirect() { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude @@ -319,99 +308,15 @@ fn CallIndirect() { // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] // CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.a06 = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] // CHECK:STDOUT: %Core.import_ref.9c3: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.9c3), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_22.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc23_22.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_22.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc23_22.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_22.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7ab = ref_param_pattern [concrete = constants.%self.param_patt.1fb] -// CHECK:STDOUT: %self.patt: %pattern_type.7ab = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eee] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc23_22.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7ab = ref_param_pattern [concrete = constants.%self.param_patt.1fb] -// CHECK:STDOUT: %self.patt: %pattern_type.7ab = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eee] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_22.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b4b = ref_param_pattern [concrete = constants.%self.param_patt.bff] -// CHECK:STDOUT: %self.patt: %pattern_type.b4b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.415 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.415 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc23_22.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b4b = ref_param_pattern [concrete = constants.%self.param_patt.bff] -// CHECK:STDOUT: %self.patt: %pattern_type.b4b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.415 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.415 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_22.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b33 = ref_param_pattern [concrete = constants.%self.param_patt.64d] -// CHECK:STDOUT: %self.patt: %pattern_type.b33 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a7a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.2cd = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.2cd = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc23_22.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b33 = ref_param_pattern [concrete = constants.%self.param_patt.64d] -// CHECK:STDOUT: %self.patt: %pattern_type.b33 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a7a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.2cd = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.2cd = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.34e = ref_param_pattern [concrete = constants.%self.param_patt.37e] -// CHECK:STDOUT: %self.patt: %pattern_type.34e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f3f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Z = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Z = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.34e = ref_param_pattern [concrete = constants.%self.param_patt.37e] -// CHECK:STDOUT: %self.patt: %pattern_type.34e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f3f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Z = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Z = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -425,7 +330,7 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: %A.type.55a = interface_decl @A [concrete = constants.%A.generic] { -// CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc5_16.1: type = splice_block %.loc5_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -445,9 +350,9 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc13: = impl_self_witness @Y.as.A.impl.%Y.ref, @A, @A(constants.%X) [concrete = constants.%.276] // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {} // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] { -// CHECK:STDOUT: %T.patt.loc26_25.1: %pattern_type.442 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_25.2 (constants.%T.patt.018)] +// CHECK:STDOUT: %T.patt.loc26_25.1: %pattern_type.c6b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_25.2 (constants.%T.patt.0e0)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc26_32.1: type = splice_block %.loc26_32.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %.loc26_32.1: type = splice_block %.loc26_32.3 [concrete = constants.%facet_type.e51] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] @@ -455,18 +360,18 @@ fn CallIndirect() { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Destroy.ref: type = name_ref Destroy, imports.%Core.Destroy [concrete = constants.%Destroy.type] // CHECK:STDOUT: %impl.elem0.loc26: %.b4e = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method.loc26: = bound_method %A.type, %impl.elem0.loc26 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc26(%A.type, %Destroy.ref) [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc26_32.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc26_32.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc26_32.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: %bound_method: = bound_method %A.type, %impl.elem0.loc26 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%A.type, %Destroy.ref) [concrete = constants.%facet_type.e51] +// CHECK:STDOUT: %.loc26_32.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.e51] +// CHECK:STDOUT: %.loc26_32.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc26_32.2 [concrete = constants.%facet_type.e51] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc26_25.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc26_25.1 (constants.%T.381)] +// CHECK:STDOUT: %T.loc26_25.2: %facet_type.e51 = symbolic_binding T, 0 [symbolic = %T.loc26_25.1 (constants.%T.646)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @A(%T.loc5_14.2: type) { -// CHECK:STDOUT: %T.patt.loc5_14.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc5_14.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %T.loc5_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -479,7 +384,7 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %A.WithSelf.F.decl: @A.WithSelf.%A.WithSelf.F.type (%A.WithSelf.F.type.c0d) = fn_decl @A.WithSelf.F [symbolic = @A.WithSelf.%A.WithSelf.F (constants.%A.WithSelf.F.e79)] { -// CHECK:STDOUT: %U.patt.loc6_17.1: %pattern_type.9a5 = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.5c4)] +// CHECK:STDOUT: %U.patt.loc6_17.1: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.5c4)] // CHECK:STDOUT: %u.param_patt.loc6_26.1: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.986) = value_param_pattern [symbolic = %u.param_patt.loc6_26.2 (constants.%u.param_patt.a01)] // CHECK:STDOUT: %u.patt.loc6_26.1: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.986) = wrapper_binding_pattern u, %u.param_patt.loc6_26.1 [symbolic = %u.patt.loc6_26.2 (constants.%u.patt.d42)] // CHECK:STDOUT: %return.param_patt.loc6_47.1: @A.WithSelf.F.%pattern_type.loc6_47 (%pattern_type.60c) = out_param_pattern [symbolic = %return.param_patt.loc6_47.2 (constants.%return.param_patt.e9c)] @@ -527,7 +432,7 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: impl @Y.as.A.impl: %Y.ref as %A.type { // CHECK:STDOUT: %Y.as.A.impl.F.decl: %Y.as.A.impl.F.type = fn_decl @Y.as.A.impl.F [concrete = constants.%Y.as.A.impl.F] { -// CHECK:STDOUT: %U.patt.loc16_17.1: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc16_17.2 (constants.%U.patt.3a0)] +// CHECK:STDOUT: %U.patt.loc16_17.1: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc16_17.2 (constants.%U.patt.3a0)] // CHECK:STDOUT: %u.param_patt.loc16_26.1: @Y.as.A.impl.F.%pattern_type.loc16_26 (%pattern_type.4f4b84.1) = value_param_pattern [symbolic = %u.param_patt.loc16_26.2 (constants.%u.param_patt.58b)] // CHECK:STDOUT: %u.patt.loc16_26.1: @Y.as.A.impl.F.%pattern_type.loc16_26 (%pattern_type.4f4b84.1) = wrapper_binding_pattern u, %u.param_patt.loc16_26.1 [symbolic = %u.patt.loc16_26.2 (constants.%u.patt.60f)] // CHECK:STDOUT: %return.param_patt.loc16_44.1: @Y.as.A.impl.F.%pattern_type.loc16_44 (%pattern_type.178) = out_param_pattern [symbolic = %return.param_patt.loc16_44.2 (constants.%return.param_patt.b96)] @@ -590,7 +495,7 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_14.2: type, @A.%Self.loc5_22.1: @A.%A.type (%A.type.fa0), %U.loc6_17.2: type) { -// CHECK:STDOUT: %U.patt.loc6_17.2: %pattern_type.9a5 = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.5c4)] +// CHECK:STDOUT: %U.patt.loc6_17.2: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.5c4)] // CHECK:STDOUT: %U.loc6_17.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)] // CHECK:STDOUT: %ptr.loc6_29.1: type = ptr_type %U.loc6_17.1 [symbolic = %ptr.loc6_29.1 (constants.%ptr.8f6)] // CHECK:STDOUT: %pattern_type.loc6_26: type = pattern_type %ptr.loc6_29.1 [symbolic = %pattern_type.loc6_26 (constants.%pattern_type.986)] @@ -612,7 +517,7 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Y.as.A.impl.F(%U.loc16_17.2: type) { -// CHECK:STDOUT: %U.patt.loc16_17.2: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc16_17.2 (constants.%U.patt.3a0)] +// CHECK:STDOUT: %U.patt.loc16_17.2: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc16_17.2 (constants.%U.patt.3a0)] // CHECK:STDOUT: %U.loc16_17.1: type = symbolic_binding U, 0 [symbolic = %U.loc16_17.1 (constants.%U.67d)] // CHECK:STDOUT: %ptr.loc16_29.1: type = ptr_type %U.loc16_17.1 [symbolic = %ptr.loc16_29.1 (constants.%ptr.e8f8f9.1)] // CHECK:STDOUT: %pattern_type.loc16_26: type = pattern_type %ptr.loc16_29.1 [symbolic = %pattern_type.loc16_26 (constants.%pattern_type.4f4b84.1)] @@ -674,8 +579,8 @@ fn CallIndirect() { // CHECK:STDOUT: %as_type.loc22: type = facet_access_type %.loc22_11.1 [concrete = constants.%Z] // CHECK:STDOUT: %.loc22_11.2: type = converted %.loc22_11.1, %as_type.loc22 [concrete = constants.%Z] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.2e7, @T.as.DefaultOrUnformed.impl.Op(constants.%Z) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] -// CHECK:STDOUT: %.loc22_3: ref %Z = splice_block %u.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Z to %.loc22_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc22_3.1: ref %Z = splice_block %u.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Z to %.loc22_3.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %u.var, %T.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %Z.ref.loc22: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %u: ref %Z = wrapper_binding u, %u.var @@ -701,114 +606,80 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc23_22.1: ref %tuple.type.2cd = temporary_storage // CHECK:STDOUT: %Y.as.A.impl.F.call: init %tuple.type.2cd to %.loc23_22.1 = call %specific_fn(%addr) // CHECK:STDOUT: %.loc23_22.2: ref %tuple.type.2cd = temporary %.loc23_22.1, %Y.as.A.impl.F.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23: = bound_method %.loc23_22.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23(%.loc23_22.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %u.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%u.var) +// CHECK:STDOUT: %Destroy.facet.loc23_22.1: %Destroy.type = facet_value constants.%tuple.type.2cd, (constants.%DestroyImpl.impl_witness.289, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.079] +// CHECK:STDOUT: %.loc23_22.3: %Destroy.type = converted constants.%tuple.type.2cd, %Destroy.facet.loc23_22.1 [concrete = constants.%Destroy.facet.079] +// CHECK:STDOUT: %Destroy.facet.loc23_22.2: %Destroy.type = facet_value constants.%tuple.type.2cd, (constants.%DestroyImpl.impl_witness.289, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.079] +// CHECK:STDOUT: %.loc23_22.4: %Destroy.type = converted constants.%tuple.type.2cd, %Destroy.facet.loc23_22.2 [concrete = constants.%Destroy.facet.079] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.079) [concrete = constants.%SelfDestruct.specific_fn.7c9] +// CHECK:STDOUT: %SelfDestruct.call.loc23: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc23_22.2) +// CHECK:STDOUT: %Destroy.facet.loc22_3.1: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc22_3.2: %Destroy.type = converted constants.%Z, %Destroy.facet.loc22_3.1 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %Destroy.facet.loc22_3.2: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc22_3.3: %Destroy.type = converted constants.%Z, %Destroy.facet.loc22_3.2 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.2ca) [concrete = constants.%SelfDestruct.specific_fn.29c] +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%u.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_22.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_22.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_22.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_22.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_22.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_22.3(%self.param: ref %Y) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_22.2(%self.param: ref %X) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_22.4(%self.param: ref %ptr.415) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_22.2(%self.param: ref %X) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_22.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_22.3(%self.param: ref %Y) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_22.4(%self.param: ref %ptr.415) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_22.4(%self.param: ref %ptr.415) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_22.4(%self.param: ref %ptr.415) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_22.5(%self.param: ref %tuple.type.2cd) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_22.5(%self.param: ref %tuple.type.2cd) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %tuple.elem2: ref %ptr.415 = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23_22.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23_22.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23_22.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc23_22.1: %Destroy.type = facet_value constants.%ptr.415, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %.loc23_22.1: %Destroy.type = converted constants.%ptr.415, %Destroy.facet.loc23_22.1 [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %Destroy.facet.loc23_22.2: %Destroy.type = facet_value constants.%ptr.415, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %.loc23_22.2: %Destroy.type = converted constants.%ptr.415, %Destroy.facet.loc23_22.2 [concrete = constants.%Destroy.facet.95d] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.95d) [concrete = constants.%SelfDestruct.specific_fn.3fb] +// CHECK:STDOUT: %SelfDestruct.call.loc23_22.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %Y = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23_22.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23_22.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23_22.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc23_22.3: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc23_22.3: %Destroy.type = converted constants.%Y, %Destroy.facet.loc23_22.3 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %Destroy.facet.loc23_22.4: %Destroy.type = facet_value constants.%Y, (constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %.loc23_22.4: %Destroy.type = converted constants.%Y, %Destroy.facet.loc23_22.4 [concrete = constants.%Destroy.facet.911] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.911) [concrete = constants.%SelfDestruct.specific_fn.2cf] +// CHECK:STDOUT: %SelfDestruct.call.loc23_22.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %X = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23_22.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23_22.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23_22.3(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc23_22.5: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc23_22.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc23_22.5 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc23_22.6: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc23_22.6: %Destroy.type = converted constants.%X, %Destroy.facet.loc23_22.6 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.689) [concrete = constants.%SelfDestruct.specific_fn.399] +// CHECK:STDOUT: %SelfDestruct.call.loc23_22.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_22.5(%self.param: ref %tuple.type.2cd) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22(%self.param: ref %Z) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_22.5(%self.param: ref %tuple.type.2cd) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22(%self.param: ref %Z) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGeneric(%T.loc26_25.2: %facet_type) { -// CHECK:STDOUT: %T.patt.loc26_25.2: %pattern_type.442 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_25.2 (constants.%T.patt.018)] -// CHECK:STDOUT: %T.loc26_25.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc26_25.1 (constants.%T.381)] +// CHECK:STDOUT: generic fn @CallGeneric(%T.loc26_25.2: %facet_type.e51) { +// CHECK:STDOUT: %T.patt.loc26_25.2: %pattern_type.c6b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc26_25.2 (constants.%T.patt.0e0)] +// CHECK:STDOUT: %T.loc26_25.1: %facet_type.e51 = symbolic_binding T, 0 [symbolic = %T.loc26_25.1 (constants.%T.646)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc28_4.2: type = facet_access_type %T.loc26_25.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.6e4)] +// CHECK:STDOUT: %T.as_type.loc28_4.2: type = facet_access_type %T.loc26_25.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.407)] // CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc26_25.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] -// CHECK:STDOUT: %A.facet: %A.type.e51 = facet_value %T.as_type.loc28_4.2, (%A.lookup_impl_witness) [symbolic = %A.facet (constants.%A.facet.89c)] -// CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A.WithSelf(constants.%X, %A.facet) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.e56)] -// CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %A.facet [symbolic = %.loc28_4.3 (constants.%.66b)] -// CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.66b) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.a46)] -// CHECK:STDOUT: %specific_impl_fn.loc28_4.2: = specific_impl_function %impl.elem0.loc28_4.2, @A.WithSelf.F(constants.%X, %A.facet, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.189)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc28_4.2, constants.%ptr.415) [symbolic = %tuple.type (constants.%tuple.type.05a)] -// CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.8c3)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.263)] -// CHECK:STDOUT: %Destroy.facet.loc28_12.3: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.944)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc28_12.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.216)] -// CHECK:STDOUT: %.loc28_12.5: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc28_12.3 [symbolic = %.loc28_12.5 (constants.%.fe1)] -// CHECK:STDOUT: %impl.elem2.loc28_12.2: @CallGeneric.%.loc28_12.5 (%.fe1) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc28_12.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc28_12.2: = specific_impl_function %impl.elem2.loc28_12.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc28_12.3) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.073)] +// CHECK:STDOUT: %A.facet: %A.type.e51 = facet_value %T.as_type.loc28_4.2, (%A.lookup_impl_witness) [symbolic = %A.facet (constants.%A.facet.7c2)] +// CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A.WithSelf(constants.%X, %A.facet) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.1e4)] +// CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %A.facet [symbolic = %.loc28_4.3 (constants.%.2a6)] +// CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.2a6) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.907)] +// CHECK:STDOUT: %specific_impl_fn.loc28_4.2: = specific_impl_function %impl.elem0.loc28_4.2, @A.WithSelf.F(constants.%X, %A.facet, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.bf9)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc28_4.2, constants.%ptr.415) [symbolic = %tuple.type (constants.%tuple.type.d80)] +// CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.d1b)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %tuple.type, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.a22)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %tuple.type, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.2b2)] +// CHECK:STDOUT: %.loc28_12.5: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc28_12.5 (constants.%.d3f)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %tuple.type, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.ec9)] +// CHECK:STDOUT: %Destroy.facet.loc28_12.3: %Destroy.type = facet_value %tuple.type, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.ae3)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(%Destroy.facet.loc28_12.3) [symbolic = %SelfDestruct.specific_fn.3 (constants.%SelfDestruct.specific_fn.e0e)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -818,8 +689,8 @@ fn CallIndirect() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc27_11.1 [concrete = constants.%Z] // CHECK:STDOUT: %.loc27_11.2: type = converted %.loc27_11.1, %as_type [concrete = constants.%Z] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.2e7, @T.as.DefaultOrUnformed.impl.Op(constants.%Z) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] -// CHECK:STDOUT: %.loc27_3: ref %Z = splice_block %u.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Z to %.loc27_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc27_3.1: ref %Z = splice_block %u.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %Z to %.loc27_3.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %u.var, %T.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %Z.ref.loc27: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %u: ref %Z = wrapper_binding u, %u.var @@ -827,30 +698,31 @@ fn CallIndirect() { // CHECK:STDOUT: %u.patt: %pattern_type.34e = ref_binding_pattern u [concrete = constants.%u.patt.352] // CHECK:STDOUT: %u.var_patt: %pattern_type.34e = var_pattern %u.patt [concrete = constants.%u.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.ref: %facet_type = name_ref T, %T.loc26_25.2 [symbolic = %T.loc26_25.1 (constants.%T.381)] -// CHECK:STDOUT: %T.as_type.loc28_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.6e4)] -// CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type.loc28_4.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.6e4)] -// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.7e3 = specific_constant @A.WithSelf.%assoc0.loc6_48.1, @A.WithSelf(constants.%X, constants.%T.381) [concrete = constants.%assoc0.299] +// CHECK:STDOUT: %T.ref: %facet_type.e51 = name_ref T, %T.loc26_25.2 [symbolic = %T.loc26_25.1 (constants.%T.646)] +// CHECK:STDOUT: %T.as_type.loc28_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.407)] +// CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type.loc28_4.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.407)] +// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.7e3 = specific_constant @A.WithSelf.%assoc0.loc6_48.1, @A.WithSelf(constants.%X, constants.%T.646) [concrete = constants.%assoc0.299] // CHECK:STDOUT: %F.ref: %A.assoc_type.7e3 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.299] -// CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.66b) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.a46)] +// CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.2a6) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.907)] // CHECK:STDOUT: %Z.ref.loc28: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %u.ref: ref %Z = name_ref u, %u // CHECK:STDOUT: %addr: %ptr.415 = addr_of %u.ref -// CHECK:STDOUT: %specific_impl_fn.loc28_4.1: = specific_impl_function %impl.elem0.loc28_4.1, @A.WithSelf.F(constants.%X, constants.%A.facet.89c, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.189)] -// CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.05a) = temporary_storage -// CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.05a) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%addr) -// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.05a) = temporary %.loc28_12.1, %A.WithSelf.F.call -// CHECK:STDOUT: %impl.elem2.loc28_12.1: @CallGeneric.%.loc28_12.5 (%.fe1) = impl_witness_access constants.%Destroy.lookup_impl_witness.263, element2 [symbolic = %impl.elem2.loc28_12.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc28_12.1: = bound_method %.loc28_12.2, %impl.elem2.loc28_12.1 -// CHECK:STDOUT: %Destroy.facet.loc28_12.1: %Destroy.type = facet_value constants.%tuple.type.05a, (constants.%Destroy.lookup_impl_witness.263) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.944)] -// CHECK:STDOUT: %.loc28_12.3: %Destroy.type = converted constants.%tuple.type.05a, %Destroy.facet.loc28_12.1 [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.944)] -// CHECK:STDOUT: %Destroy.facet.loc28_12.2: %Destroy.type = facet_value constants.%tuple.type.05a, (constants.%Destroy.lookup_impl_witness.263) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.944)] -// CHECK:STDOUT: %.loc28_12.4: %Destroy.type = converted constants.%tuple.type.05a, %Destroy.facet.loc28_12.2 [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.944)] -// CHECK:STDOUT: %specific_impl_fn.loc28_12.1: = specific_impl_function %impl.elem2.loc28_12.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.944) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.073)] -// CHECK:STDOUT: %bound_method.loc28_12.2: = bound_method %.loc28_12.2, %specific_impl_fn.loc28_12.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc28: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %u.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%u.var) +// CHECK:STDOUT: %specific_impl_fn.loc28_4.1: = specific_impl_function %impl.elem0.loc28_4.1, @A.WithSelf.F(constants.%X, constants.%A.facet.7c2, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.bf9)] +// CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.d80) = temporary_storage +// CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.d80) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%addr) +// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.d80) = temporary %.loc28_12.1, %A.WithSelf.F.call +// CHECK:STDOUT: %Destroy.facet.loc28_12.1: %Destroy.type = facet_value constants.%tuple.type.d80, (constants.%DestroyImpl.lookup_impl_witness.ec9, constants.%SubobjectDestroy.lookup_impl_witness.a22) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.ae3)] +// CHECK:STDOUT: %.loc28_12.3: %Destroy.type = converted constants.%tuple.type.d80, %Destroy.facet.loc28_12.1 [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.ae3)] +// CHECK:STDOUT: %Destroy.facet.loc28_12.2: %Destroy.type = facet_value constants.%tuple.type.d80, (constants.%DestroyImpl.lookup_impl_witness.ec9, constants.%SubobjectDestroy.lookup_impl_witness.a22) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.ae3)] +// CHECK:STDOUT: %.loc28_12.4: %Destroy.type = converted constants.%tuple.type.d80, %Destroy.facet.loc28_12.2 [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.ae3)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.ae3) [symbolic = %SelfDestruct.specific_fn.3 (constants.%SelfDestruct.specific_fn.e0e)] +// CHECK:STDOUT: %SelfDestruct.call.loc28: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc28_12.2) +// CHECK:STDOUT: %Destroy.facet.loc27_3.1: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc27_3.2: %Destroy.type = converted constants.%Z, %Destroy.facet.loc27_3.1 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %Destroy.facet.loc27_3.2: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc27_3.3: %Destroy.type = converted constants.%Z, %Destroy.facet.loc27_3.2 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.2ca) [concrete = constants.%SelfDestruct.specific_fn.29c] +// CHECK:STDOUT: %SelfDestruct.call.loc27: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%u.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -859,15 +731,15 @@ fn CallIndirect() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %CallGeneric.ref: %CallGeneric.type = name_ref CallGeneric, file.%CallGeneric.decl [concrete = constants.%CallGeneric] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y] -// CHECK:STDOUT: %facet_value: %facet_type = facet_value %Y.ref, (constants.%A.impl_witness, constants.%custom_witness.f8f19d.3) [concrete = constants.%facet_value] -// CHECK:STDOUT: %.loc32: %facet_type = converted %Y.ref, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value: %facet_type.e51 = facet_value %Y.ref, (constants.%A.impl_witness, constants.%DestroyImpl.impl_witness.a90, constants.%custom_witness.b80ef6.3) [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc32: %facet_type.e51 = converted %Y.ref, %facet_value [concrete = constants.%facet_value] // CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric.ref, @CallGeneric(constants.%facet_value) [concrete = constants.%CallGeneric.specific_fn] // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc5_14.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: @@ -894,7 +766,7 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%X) { -// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc5_14.1 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -986,34 +858,34 @@ fn CallIndirect() { // CHECK:STDOUT: %specific_impl_fn.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CallGeneric(constants.%T.381) { -// CHECK:STDOUT: %T.patt.loc26_25.2 => constants.%T.patt.018 -// CHECK:STDOUT: %T.loc26_25.1 => constants.%T.381 +// CHECK:STDOUT: specific @CallGeneric(constants.%T.646) { +// CHECK:STDOUT: %T.patt.loc26_25.2 => constants.%T.patt.0e0 +// CHECK:STDOUT: %T.loc26_25.1 => constants.%T.646 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%T.381) { +// CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%T.646) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.e51 -// CHECK:STDOUT: %Self => constants.%T.381 -// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.bde -// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.3e2 +// CHECK:STDOUT: %Self => constants.%T.646 +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.566 +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.879 // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.7e3 // CHECK:STDOUT: %assoc0.loc6_48.2 => constants.%assoc0.299 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.89c) { +// CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.7c2) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.e51 -// CHECK:STDOUT: %Self => constants.%A.facet.89c -// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.e56 -// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.03c +// CHECK:STDOUT: %Self => constants.%A.facet.7c2 +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.1e4 +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.085 // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.7e3 // CHECK:STDOUT: %assoc0.loc6_48.2 => constants.%assoc0.299 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.89c, constants.%Z) { +// CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.7c2, constants.%Z) { // CHECK:STDOUT: %U.patt.loc6_17.2 => constants.%U.patt.5c4 // CHECK:STDOUT: %U.loc6_17.1 => constants.%Z // CHECK:STDOUT: %ptr.loc6_29.1 => constants.%ptr.415 @@ -1022,19 +894,19 @@ fn CallIndirect() { // CHECK:STDOUT: %u.patt.loc6_26.2 => constants.%u.patt.d7f // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.e51 -// CHECK:STDOUT: %Self => constants.%A.facet.89c +// CHECK:STDOUT: %Self => constants.%A.facet.7c2 // CHECK:STDOUT: %tuple.type.loc6_47.1 => constants.%tuple.type.924 -// CHECK:STDOUT: %tuple => constants.%tuple.602 -// CHECK:STDOUT: %Self.as_type.loc6_47.1 => constants.%T.as_type.6e4 -// CHECK:STDOUT: %tuple.type.loc6_47.2 => constants.%tuple.type.05a -// CHECK:STDOUT: %.loc6_47.1 => constants.%.f9f -// CHECK:STDOUT: %pattern_type.loc6_47 => constants.%pattern_type.671 -// CHECK:STDOUT: %return.param_patt.loc6_47.2 => constants.%return.param_patt.7a4 -// CHECK:STDOUT: %return.patt.loc6_32.2 => constants.%return.patt.0f7 +// CHECK:STDOUT: %tuple => constants.%tuple.c5e +// CHECK:STDOUT: %Self.as_type.loc6_47.1 => constants.%T.as_type.407 +// CHECK:STDOUT: %tuple.type.loc6_47.2 => constants.%tuple.type.d80 +// CHECK:STDOUT: %.loc6_47.1 => constants.%.394 +// CHECK:STDOUT: %pattern_type.loc6_47 => constants.%pattern_type.dd9 +// CHECK:STDOUT: %return.param_patt.loc6_47.2 => constants.%return.param_patt.dd6 +// CHECK:STDOUT: %return.patt.loc6_32.2 => constants.%return.patt.921 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%facet_value) { -// CHECK:STDOUT: %T.patt.loc26_25.2 => constants.%T.patt.018 +// CHECK:STDOUT: %T.patt.loc26_25.2 => constants.%T.patt.0e0 // CHECK:STDOUT: %T.loc26_25.1 => constants.%facet_value // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1047,12 +919,12 @@ fn CallIndirect() { // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%Y.as.A.impl.F.specific_fn // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2cd // CHECK:STDOUT: %require_complete => constants.%complete_type.dec -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.5 -// CHECK:STDOUT: %Destroy.facet.loc28_12.3 => constants.%Destroy.facet.6e7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.d8a -// CHECK:STDOUT: %.loc28_12.5 => constants.%.0dd -// CHECK:STDOUT: %impl.elem2.loc28_12.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness => constants.%custom_witness.b80ef6.5 +// CHECK:STDOUT: %SubobjectDestroy.facet => constants.%SubobjectDestroy.facet.c56 +// CHECK:STDOUT: %.loc28_12.5 => constants.%.db9 +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness => constants.%DestroyImpl.impl_witness.289 +// CHECK:STDOUT: %Destroy.facet.loc28_12.3 => constants.%Destroy.facet.079 +// CHECK:STDOUT: %SelfDestruct.specific_fn.3 => constants.%SelfDestruct.specific_fn.7c9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.091, constants.%Z) { @@ -1080,15 +952,15 @@ fn CallIndirect() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %A.type.55a: type = generic_interface_type @A [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %A.generic: %A.type.55a = struct_value () [concrete] // CHECK:STDOUT: %A.type.fa0: type = facet_type <@A, @A(%T.67d)> [symbolic] // CHECK:STDOUT: %Self.5d3: %A.type.fa0 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %U.patt.5c4: %pattern_type.9a5 = symbolic_binding_pattern U, 2 [symbolic] +// CHECK:STDOUT: %U.patt.5c4: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 2 [symbolic] // CHECK:STDOUT: %U.4e7: type = symbolic_binding U, 2 [symbolic] // CHECK:STDOUT: %pattern_type.62e: type = pattern_type %U.4e7 [symbolic] // CHECK:STDOUT: %u.param_patt.6ef: %pattern_type.62e = value_param_pattern [symbolic] @@ -1111,11 +983,11 @@ fn CallIndirect() { // CHECK:STDOUT: %Y1: type = class_type @Y1 [concrete] // CHECK:STDOUT: %Y2: type = class_type @Y2 [concrete] // CHECK:STDOUT: %Z: type = class_type @Z [concrete] -// CHECK:STDOUT: %V1.patt: %pattern_type.9a5 = symbolic_binding_pattern V1, 0 [symbolic] +// CHECK:STDOUT: %V1.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern V1, 0 [symbolic] // CHECK:STDOUT: %V1: type = symbolic_binding V1, 0 [symbolic] -// CHECK:STDOUT: %V2.patt: %pattern_type.9a5 = symbolic_binding_pattern V2, 1 [symbolic] +// CHECK:STDOUT: %V2.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern V2, 1 [symbolic] // CHECK:STDOUT: %V2: type = symbolic_binding V2, 1 [symbolic] -// CHECK:STDOUT: %W.patt: %pattern_type.9a5 = symbolic_binding_pattern W, 2 [symbolic] +// CHECK:STDOUT: %W.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern W, 2 [symbolic] // CHECK:STDOUT: %W: type = symbolic_binding W, 2 [symbolic] // CHECK:STDOUT: %tuple.type.693: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.fa2: %tuple.type.693 = tuple_value (%V1, %V2) [symbolic] @@ -1129,7 +1001,7 @@ fn CallIndirect() { // CHECK:STDOUT: %A.assoc_type.18b: type = assoc_entity_type @A, @A(%W) [symbolic] // CHECK:STDOUT: %assoc0.018: %A.assoc_type.18b = assoc_entity element0, @A.WithSelf.%A.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %require_complete.b3d: = require_complete_type %A.type.eae [symbolic] -// CHECK:STDOUT: %U.patt.755: %pattern_type.9a5 = symbolic_binding_pattern U, 3 [symbolic] +// CHECK:STDOUT: %U.patt.755: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 3 [symbolic] // CHECK:STDOUT: %U.ce4: type = symbolic_binding U, 3 [symbolic] // CHECK:STDOUT: %pattern_type.e4a: type = pattern_type %U.ce4 [symbolic] // CHECK:STDOUT: %u.param_patt.afe: %pattern_type.e4a = value_param_pattern [symbolic] @@ -1137,7 +1009,7 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.649: type = tuple_type (type, %tuple.type.693, type) [concrete] // CHECK:STDOUT: %tuple.cd3: %tuple.type.649 = tuple_value (%W, %tuple.fa2, %U.ce4) [symbolic] // CHECK:STDOUT: %tuple.type.897: type = tuple_type (%W, %tuple.type.a5e, %U.ce4) [symbolic] -// CHECK:STDOUT: %.f8e: Core.Form = init_form %tuple.type.897 [symbolic] +// CHECK:STDOUT: %.f8ea: Core.Form = init_form %tuple.type.897 [symbolic] // CHECK:STDOUT: %pattern_type.5cc: type = pattern_type %tuple.type.897 [symbolic] // CHECK:STDOUT: %return.param_patt.b1c: %pattern_type.5cc = out_param_pattern [symbolic] // CHECK:STDOUT: %return.patt.bad9: %pattern_type.5cc = return_slot_pattern %return.param_patt.b1c, %tuple.type.897 [symbolic] @@ -1183,75 +1055,60 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.dac: = specific_function %tuple.type.as.A.impl.F.a00, @tuple.type.as.A.impl.F(%Y1, %Y2, %X, %Z) [concrete] // CHECK:STDOUT: %Z.val: %Z = struct_value () [concrete] // CHECK:STDOUT: %.7dc: ref %Z = temporary invalid, %Z.val [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_39.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc24_39.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.6cb: type = pattern_type %X [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_39.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_39.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_39.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.8d8: type = pattern_type %Y1 [concrete] -// CHECK:STDOUT: %self.param_patt.8d0: %pattern_type.8d8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ed1: %pattern_type.8d8 = wrapper_binding_pattern self, %self.param_patt.8d0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_39.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc24_39.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_39.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.dd0: type = pattern_type %Y2 [concrete] -// CHECK:STDOUT: %self.param_patt.56b: %pattern_type.dd0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.27b: %pattern_type.dd0 = wrapper_binding_pattern self, %self.param_patt.56b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_39.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc24_39.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_39.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.5df: type = pattern_type %tuple.type.59f [concrete] -// CHECK:STDOUT: %self.param_patt.c06: %pattern_type.5df = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9dc: %pattern_type.5df = wrapper_binding_pattern self, %self.param_patt.c06 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_39.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_39.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_39.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_39.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_39.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e85: %SubobjectDestroy.type = facet_value %Y2, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3c3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e85) [concrete] +// CHECK:STDOUT: %Destroy.facet.e3b: %Destroy.type = facet_value %Y2, (%DestroyImpl.impl_witness.3c3, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c79: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.e3b) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc24_39.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_39.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.5: = custom_witness (%Destroy.WithSelf.Op.403171.5, %Destroy.WithSelf.SubobjectDestroy.d01daf.5, %Destroy.WithSelf.SelfDestruct.db3fdb.5), @Destroy [concrete] -// CHECK:STDOUT: %self.param_patt.37e: %pattern_type.34e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f3f: %pattern_type.34e = wrapper_binding_pattern self, %self.param_patt.37e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_39.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc24_39.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_39.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.220: %pattern_type.6a8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ce6: %pattern_type.6a8 = wrapper_binding_pattern self, %self.param_patt.220 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_39.7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.920: %SubobjectDestroy.type = facet_value %Y1, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.709: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.920) [concrete] +// CHECK:STDOUT: %Destroy.facet.42b: %Destroy.type = facet_value %Y1, (%DestroyImpl.impl_witness.709, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8cf: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.42b) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.6: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_39.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.6: %SubobjectDestroy.WithSelf.Op.type.6870fd.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.6: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.6), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_39.7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc24_39.7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_39.7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.7: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.7: = custom_witness (%Destroy.WithSelf.Op.403171.7, %Destroy.WithSelf.SubobjectDestroy.d01daf.7, %Destroy.WithSelf.SelfDestruct.db3fdb.7), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.3dc: %Destroy.type = facet_value %tuple.type.d40, (%custom_witness.f8f19d.7) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.ff5: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.3dc) [concrete] -// CHECK:STDOUT: %.916: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.ff5, %Destroy.facet.3dc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.7dc, %Destroy.WithSelf.SelfDestruct.db3fdb.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.5d5: %SubobjectDestroy.type = facet_value %Z, (%custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6a0: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.5d5) [concrete] +// CHECK:STDOUT: %Destroy.facet.2ca: %Destroy.type = facet_value %Z, (%DestroyImpl.impl_witness.6a0, %custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.29c: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.2ca) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d46: %SubobjectDestroy.type = facet_value %tuple.type.59f, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.55e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d46) [concrete] +// CHECK:STDOUT: %Destroy.facet.851: %Destroy.type = facet_value %tuple.type.59f, (%DestroyImpl.impl_witness.55e, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.fe3: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.851) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc5) [concrete] +// CHECK:STDOUT: %Destroy.facet.689: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.e12, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.399: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.689) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.392: %SubobjectDestroy.type = facet_value %tuple.type.d40, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.bff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.392) [concrete] +// CHECK:STDOUT: %complete_type.8f6: = complete_type_witness %tuple.type.d40 [concrete] +// CHECK:STDOUT: %.ee1: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.392) [concrete] +// CHECK:STDOUT: %Destroy.facet.40b: %Destroy.type = facet_value %tuple.type.d40, (%DestroyImpl.impl_witness.bff, %custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3da: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.40b) [concrete] // CHECK:STDOUT: %BitAndWith.type.a06: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.a06 = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.7f7: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] @@ -1262,158 +1119,60 @@ fn CallIndirect() { // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %A.type.e51, %type.as.BitAndWith.impl.Op [concrete] -// CHECK:STDOUT: %facet_type: type = facet_type <@A, @A(%X) & @Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.442: type = pattern_type %facet_type [concrete] -// CHECK:STDOUT: %T.patt.018: %pattern_type.442 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T.381: %facet_type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %facet_type.e51: type = facet_type <@A, @A(%X) & @Destroy> [concrete] +// CHECK:STDOUT: %pattern_type.c6b: type = pattern_type %facet_type.e51 [concrete] +// CHECK:STDOUT: %T.patt.0e0: %pattern_type.c6b = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.646: %facet_type.e51 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete] -// CHECK:STDOUT: %A.WithSelf.F.type.bde: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %T.381) [symbolic] -// CHECK:STDOUT: %A.WithSelf.F.3e2: %A.WithSelf.F.type.bde = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.381 [symbolic] -// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.381, @A, @A(%X) [symbolic] -// CHECK:STDOUT: %A.facet.89c: %A.type.e51 = facet_value %T.as_type, (%A.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %A.WithSelf.F.type.e56: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %A.facet.89c) [symbolic] -// CHECK:STDOUT: %A.WithSelf.F.03c: %A.WithSelf.F.type.e56 = struct_value () [symbolic] -// CHECK:STDOUT: %.66b: type = fn_type_with_self_type %A.WithSelf.F.type.e56, %A.facet.89c [symbolic] -// CHECK:STDOUT: %impl.elem0.a46: %.66b = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.type.566: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %T.646) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.879: %A.WithSelf.F.type.566 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.407: type = facet_access_type %T.646 [symbolic] +// CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.646, @A, @A(%X) [symbolic] +// CHECK:STDOUT: %A.facet.7c2: %A.type.e51 = facet_value %T.as_type.407, (%A.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.type.1e4: type = fn_type @A.WithSelf.F, @A.WithSelf(%X, %A.facet.7c2) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.085: %A.WithSelf.F.type.1e4 = struct_value () [symbolic] +// CHECK:STDOUT: %.2a6: type = fn_type_with_self_type %A.WithSelf.F.type.1e4, %A.facet.7c2 [symbolic] +// CHECK:STDOUT: %impl.elem0.907: %.2a6 = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %tuple.type.924: type = tuple_type (type, %A.type.e51, type) [concrete] -// CHECK:STDOUT: %tuple.f65: %tuple.type.924 = tuple_value (%X, %A.facet.89c, %Z) [symbolic] -// CHECK:STDOUT: %tuple.type.e9f: type = tuple_type (%X, %T.as_type, %Z) [symbolic] -// CHECK:STDOUT: %.bd3: Core.Form = init_form %tuple.type.e9f [symbolic] -// CHECK:STDOUT: %pattern_type.d56: type = pattern_type %tuple.type.e9f [symbolic] -// CHECK:STDOUT: %return.param_patt.add: %pattern_type.d56 = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.82b: %pattern_type.d56 = return_slot_pattern %return.param_patt.add, %tuple.type.e9f [symbolic] -// CHECK:STDOUT: %specific_impl_fn.189: = specific_impl_function %impl.elem0.a46, @A.WithSelf.F(%X, %A.facet.89c, %Z) [symbolic] -// CHECK:STDOUT: %require_complete.bff: = require_complete_type %tuple.type.e9f [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.3bf: = lookup_impl_witness %tuple.type.e9f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.924: %Destroy.type = facet_value %tuple.type.e9f, (%Destroy.lookup_impl_witness.3bf) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.dba: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.924) [symbolic] -// CHECK:STDOUT: %.4ff: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.dba, %Destroy.facet.924 [symbolic] -// CHECK:STDOUT: %impl.elem2: %.4ff = impl_witness_access %Destroy.lookup_impl_witness.3bf, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.d20: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.924) [symbolic] +// CHECK:STDOUT: %tuple.03a: %tuple.type.924 = tuple_value (%X, %A.facet.7c2, %Z) [symbolic] +// CHECK:STDOUT: %tuple.type.93b: type = tuple_type (%X, %T.as_type.407, %Z) [symbolic] +// CHECK:STDOUT: %.905: Core.Form = init_form %tuple.type.93b [symbolic] +// CHECK:STDOUT: %pattern_type.9c0: type = pattern_type %tuple.type.93b [symbolic] +// CHECK:STDOUT: %return.param_patt.169: %pattern_type.9c0 = out_param_pattern [symbolic] +// CHECK:STDOUT: %return.patt.fc2: %pattern_type.9c0 = return_slot_pattern %return.param_patt.169, %tuple.type.93b [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bf9: = specific_impl_function %impl.elem0.907, @A.WithSelf.F(%X, %A.facet.7c2, %Z) [symbolic] +// CHECK:STDOUT: %require_complete.0eb: = require_complete_type %tuple.type.93b [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.f6e: = lookup_impl_witness %tuple.type.93b, @DestroyImpl [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.a22: = lookup_impl_witness %tuple.type.93b, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.facet.ef4: %SubobjectDestroy.type = facet_value %tuple.type.93b, (%SubobjectDestroy.lookup_impl_witness.a22) [symbolic] +// CHECK:STDOUT: %.463: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ef4) [symbolic] +// CHECK:STDOUT: %Destroy.facet.b56: %Destroy.type = facet_value %tuple.type.93b, (%DestroyImpl.lookup_impl_witness.f6e, %SubobjectDestroy.lookup_impl_witness.a22) [symbolic] +// CHECK:STDOUT: %SelfDestruct.specific_fn.ba5: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.b56) [symbolic] // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete] // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete] -// CHECK:STDOUT: %facet_value: %facet_type = facet_value %tuple.type.59f, (%A.impl_witness.84c, %custom_witness.f8f19d.5) [concrete] +// CHECK:STDOUT: %facet_value: %facet_type.e51 = facet_value %tuple.type.59f, (%A.impl_witness.84c, %DestroyImpl.impl_witness.55e, %custom_witness.b80ef6.5) [concrete] // CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric, @CallGeneric(%facet_value) [concrete] -// CHECK:STDOUT: %complete_type.8f6: = complete_type_witness %tuple.type.d40 [concrete] // CHECK:STDOUT: %tuple.571: %tuple.type.924 = tuple_value (%X, %A.facet.9d8, %Z) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .Destroy = %Core.Destroy // CHECK:STDOUT: .BitAndWith = %Core.BitAndWith // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: %Core.BitAndWith: %BitAndWith.type.a06 = import_ref Core//prelude/parts/as, BitAndWith, loaded [concrete = constants.%BitAndWith.generic] // CHECK:STDOUT: %Core.import_ref.9c3: %type.as.BitAndWith.impl.Op.type = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.9c3), @type.as.BitAndWith.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_39.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc24_39.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_39.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_39.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_39.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8d8 = ref_param_pattern [concrete = constants.%self.param_patt.8d0] -// CHECK:STDOUT: %self.patt: %pattern_type.8d8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ed1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc24_39.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8d8 = ref_param_pattern [concrete = constants.%self.param_patt.8d0] -// CHECK:STDOUT: %self.patt: %pattern_type.8d8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ed1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_39.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dd0 = ref_param_pattern [concrete = constants.%self.param_patt.56b] -// CHECK:STDOUT: %self.patt: %pattern_type.dd0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.27b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc24_39.4 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dd0 = ref_param_pattern [concrete = constants.%self.param_patt.56b] -// CHECK:STDOUT: %self.patt: %pattern_type.dd0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.27b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_39.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5df = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.5df = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9dc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.59f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.59f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc24_39.5 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5df = ref_param_pattern [concrete = constants.%self.param_patt.c06] -// CHECK:STDOUT: %self.patt: %pattern_type.5df = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9dc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.59f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.59f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_39.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.34e = ref_param_pattern [concrete = constants.%self.param_patt.37e] -// CHECK:STDOUT: %self.patt: %pattern_type.34e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f3f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Z = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Z = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc24_39.6 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.34e = ref_param_pattern [concrete = constants.%self.param_patt.37e] -// CHECK:STDOUT: %self.patt: %pattern_type.34e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f3f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Z = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Z = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_39.7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6a8 = ref_param_pattern [concrete = constants.%self.param_patt.220] -// CHECK:STDOUT: %self.patt: %pattern_type.6a8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ce6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.d40 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.d40 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc24_39.7 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6a8 = ref_param_pattern [concrete = constants.%self.param_patt.220] -// CHECK:STDOUT: %self.patt: %pattern_type.6a8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ce6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.d40 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.d40 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -1428,7 +1187,7 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: %A.type.55a = interface_decl @A [concrete = constants.%A.generic] { -// CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc5_14.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc5_16.1: type = splice_block %.loc5_16.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] @@ -1441,9 +1200,9 @@ fn CallIndirect() { // CHECK:STDOUT: %Y2.decl: type = class_decl @Y2 [concrete = constants.%Y2] {} {} // CHECK:STDOUT: %Z.decl: type = class_decl @Z [concrete = constants.%Z] {} {} // CHECK:STDOUT: impl_decl @tuple.type.as.A.impl [concrete] { -// CHECK:STDOUT: %V1.patt.loc14_16.1: %pattern_type.9a5 = symbolic_binding_pattern V1, 0 [symbolic = %V1.patt.loc14_16.2 (constants.%V1.patt)] -// CHECK:STDOUT: %V2.patt.loc14_26.1: %pattern_type.9a5 = symbolic_binding_pattern V2, 1 [symbolic = %V2.patt.loc14_26.2 (constants.%V2.patt)] -// CHECK:STDOUT: %W.patt.loc14_35.1: %pattern_type.9a5 = symbolic_binding_pattern W, 2 [symbolic = %W.patt.loc14_35.2 (constants.%W.patt)] +// CHECK:STDOUT: %V1.patt.loc14_16.1: %pattern_type.9a587c.1 = symbolic_binding_pattern V1, 0 [symbolic = %V1.patt.loc14_16.2 (constants.%V1.patt)] +// CHECK:STDOUT: %V2.patt.loc14_26.1: %pattern_type.9a587c.1 = symbolic_binding_pattern V2, 1 [symbolic = %V2.patt.loc14_26.2 (constants.%V2.patt)] +// CHECK:STDOUT: %W.patt.loc14_35.1: %pattern_type.9a587c.1 = symbolic_binding_pattern W, 2 [symbolic = %W.patt.loc14_35.2 (constants.%W.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %V1.ref: type = name_ref V1, %V1.loc14_16.2 [symbolic = %V1.loc14_16.1 (constants.%V1)] // CHECK:STDOUT: %V2.ref: type = name_ref V2, %V2.loc14_26.2 [symbolic = %V2.loc14_26.1 (constants.%V2)] @@ -1471,9 +1230,9 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc14: = impl_self_witness @tuple.type.as.A.impl.%.loc14_50.2, @A, @A(constants.%W) [symbolic = @tuple.type.as.A.impl.%.loc14_60 (constants.%.06e)] // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [concrete = constants.%Call] {} {} // CHECK:STDOUT: %CallGeneric.decl: %CallGeneric.type = fn_decl @CallGeneric [concrete = constants.%CallGeneric] { -// CHECK:STDOUT: %T.patt.loc27_25.1: %pattern_type.442 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_25.2 (constants.%T.patt.018)] +// CHECK:STDOUT: %T.patt.loc27_25.1: %pattern_type.c6b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_25.2 (constants.%T.patt.0e0)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc27_32.1: type = splice_block %.loc27_32.3 [concrete = constants.%facet_type] { +// CHECK:STDOUT: %.loc27_32.1: type = splice_block %.loc27_32.3 [concrete = constants.%facet_type.e51] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %A.ref: %A.type.55a = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [concrete = constants.%X] @@ -1481,18 +1240,18 @@ fn CallIndirect() { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Destroy.ref: type = name_ref Destroy, imports.%Core.Destroy [concrete = constants.%Destroy.type] // CHECK:STDOUT: %impl.elem0.loc27: %.b4e = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] -// CHECK:STDOUT: %bound_method.loc27: = bound_method %A.type, %impl.elem0.loc27 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] -// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc27(%A.type, %Destroy.ref) [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc27_32.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] -// CHECK:STDOUT: %.loc27_32.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc27_32.2 [concrete = constants.%facet_type] +// CHECK:STDOUT: %bound_method: = bound_method %A.type, %impl.elem0.loc27 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] +// CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%A.type, %Destroy.ref) [concrete = constants.%facet_type.e51] +// CHECK:STDOUT: %.loc27_32.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.e51] +// CHECK:STDOUT: %.loc27_32.3: type = converted %type.as.BitAndWith.impl.Op.call, %.loc27_32.2 [concrete = constants.%facet_type.e51] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc27_25.2: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc27_25.1 (constants.%T.381)] +// CHECK:STDOUT: %T.loc27_25.2: %facet_type.e51 = symbolic_binding T, 0 [symbolic = %T.loc27_25.1 (constants.%T.646)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallIndirect.decl: %CallIndirect.type = fn_decl @CallIndirect [concrete = constants.%CallIndirect] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @A(%T.loc5_14.2: type) { -// CHECK:STDOUT: %T.patt.loc5_14.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc5_14.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc5_14.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %T.loc5_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1505,7 +1264,7 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: !with Self: // CHECK:STDOUT: %A.WithSelf.F.decl: @A.WithSelf.%A.WithSelf.F.type (%A.WithSelf.F.type.c0d) = fn_decl @A.WithSelf.F [symbolic = @A.WithSelf.%A.WithSelf.F (constants.%A.WithSelf.F.e79)] { -// CHECK:STDOUT: %U.patt.loc6_17.1: %pattern_type.9a5 = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.5c4)] +// CHECK:STDOUT: %U.patt.loc6_17.1: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.5c4)] // CHECK:STDOUT: %u.param_patt.loc6_26.1: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.62e) = value_param_pattern [symbolic = %u.param_patt.loc6_26.2 (constants.%u.param_patt.6ef)] // CHECK:STDOUT: %u.patt.loc6_26.1: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.62e) = wrapper_binding_pattern u, %u.param_patt.loc6_26.1 [symbolic = %u.patt.loc6_26.2 (constants.%u.patt.9b1)] // CHECK:STDOUT: %return.param_patt.loc6_45.1: @A.WithSelf.F.%pattern_type.loc6_45 (%pattern_type.47c) = out_param_pattern [symbolic = %return.param_patt.loc6_45.2 (constants.%return.param_patt.550)] @@ -1549,11 +1308,11 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @tuple.type.as.A.impl(%V1.loc14_16.2: type, %V2.loc14_26.2: type, %W.loc14_35.2: type) { -// CHECK:STDOUT: %V1.patt.loc14_16.2: %pattern_type.9a5 = symbolic_binding_pattern V1, 0 [symbolic = %V1.patt.loc14_16.2 (constants.%V1.patt)] +// CHECK:STDOUT: %V1.patt.loc14_16.2: %pattern_type.9a587c.1 = symbolic_binding_pattern V1, 0 [symbolic = %V1.patt.loc14_16.2 (constants.%V1.patt)] // CHECK:STDOUT: %V1.loc14_16.1: type = symbolic_binding V1, 0 [symbolic = %V1.loc14_16.1 (constants.%V1)] -// CHECK:STDOUT: %V2.patt.loc14_26.2: %pattern_type.9a5 = symbolic_binding_pattern V2, 1 [symbolic = %V2.patt.loc14_26.2 (constants.%V2.patt)] +// CHECK:STDOUT: %V2.patt.loc14_26.2: %pattern_type.9a587c.1 = symbolic_binding_pattern V2, 1 [symbolic = %V2.patt.loc14_26.2 (constants.%V2.patt)] // CHECK:STDOUT: %V2.loc14_26.1: type = symbolic_binding V2, 1 [symbolic = %V2.loc14_26.1 (constants.%V2)] -// CHECK:STDOUT: %W.patt.loc14_35.2: %pattern_type.9a5 = symbolic_binding_pattern W, 2 [symbolic = %W.patt.loc14_35.2 (constants.%W.patt)] +// CHECK:STDOUT: %W.patt.loc14_35.2: %pattern_type.9a587c.1 = symbolic_binding_pattern W, 2 [symbolic = %W.patt.loc14_35.2 (constants.%W.patt)] // CHECK:STDOUT: %W.loc14_35.1: type = symbolic_binding W, 2 [symbolic = %W.loc14_35.1 (constants.%W)] // CHECK:STDOUT: %tuple: %tuple.type.693 = tuple_value (%V1.loc14_16.1, %V2.loc14_26.1) [symbolic = %tuple (constants.%tuple.fa2)] // CHECK:STDOUT: %tuple.type: type = tuple_type (%V1.loc14_16.1, %V2.loc14_26.1) [symbolic = %tuple.type (constants.%tuple.type.a5e)] @@ -1568,7 +1327,7 @@ fn CallIndirect() { // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc14_50.2 as %A.type.loc14_58.2 { // CHECK:STDOUT: %tuple.type.as.A.impl.F.decl: @tuple.type.as.A.impl.%tuple.type.as.A.impl.F.type (%tuple.type.as.A.impl.F.type.8ca) = fn_decl @tuple.type.as.A.impl.F [symbolic = @tuple.type.as.A.impl.%tuple.type.as.A.impl.F (constants.%tuple.type.as.A.impl.F.644)] { -// CHECK:STDOUT: %U.patt.loc17_17.1: %pattern_type.9a5 = symbolic_binding_pattern U, 3 [symbolic = %U.patt.loc17_17.2 (constants.%U.patt.755)] +// CHECK:STDOUT: %U.patt.loc17_17.1: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 3 [symbolic = %U.patt.loc17_17.2 (constants.%U.patt.755)] // CHECK:STDOUT: %u.param_patt.loc17_26.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_26 (%pattern_type.e4a) = value_param_pattern [symbolic = %u.param_patt.loc17_26.2 (constants.%u.param_patt.afe)] // CHECK:STDOUT: %u.patt.loc17_26.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_26 (%pattern_type.e4a) = wrapper_binding_pattern u, %u.param_patt.loc17_26.1 [symbolic = %u.patt.loc17_26.2 (constants.%u.patt.60c)] // CHECK:STDOUT: %return.param_patt.loc17_49.1: @tuple.type.as.A.impl.F.%pattern_type.loc17_49 (%pattern_type.5cc) = out_param_pattern [symbolic = %return.param_patt.loc17_49.2 (constants.%return.param_patt.b1c)] @@ -1585,7 +1344,7 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc17_49.3: %tuple.type.649 = tuple_literal (%W.ref, %.loc17_45, %U.ref.loc17_48) [symbolic = %tuple.loc17_49 (constants.%tuple.cd3)] // CHECK:STDOUT: %.loc17_49.4: type = converted constants.%tuple.fa2, constants.%tuple.type.a5e [symbolic = %tuple.type.loc17_49.1 (constants.%tuple.type.a5e)] // CHECK:STDOUT: %.loc17_49.5: type = converted %.loc17_49.3, constants.%tuple.type.897 [symbolic = %tuple.type.loc17_49.2 (constants.%tuple.type.897)] -// CHECK:STDOUT: %.loc17_49.6: Core.Form = init_form %.loc17_49.5 [symbolic = %.loc17_49.2 (constants.%.f8e)] +// CHECK:STDOUT: %.loc17_49.6: Core.Form = init_form %.loc17_49.5 [symbolic = %.loc17_49.2 (constants.%.f8ea)] // CHECK:STDOUT: %.loc17_19.1: type = splice_block %.loc17_19.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc17_19.2: type = type_literal type [concrete = type] @@ -1643,7 +1402,7 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_14.2: type, @A.%Self.loc5_22.1: @A.%A.type (%A.type.fa0), %U.loc6_17.2: type) { -// CHECK:STDOUT: %U.patt.loc6_17.2: %pattern_type.9a5 = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.5c4)] +// CHECK:STDOUT: %U.patt.loc6_17.2: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 2 [symbolic = %U.patt.loc6_17.2 (constants.%U.patt.5c4)] // CHECK:STDOUT: %U.loc6_17.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_17.1 (constants.%U.4e7)] // CHECK:STDOUT: %pattern_type.loc6_26: type = pattern_type %U.loc6_17.1 [symbolic = %pattern_type.loc6_26 (constants.%pattern_type.62e)] // CHECK:STDOUT: %u.param_patt.loc6_26.2: @A.WithSelf.F.%pattern_type.loc6_26 (%pattern_type.62e) = value_param_pattern [symbolic = %u.param_patt.loc6_26.2 (constants.%u.param_patt.6ef)] @@ -1664,7 +1423,7 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @tuple.type.as.A.impl.F(@tuple.type.as.A.impl.%V1.loc14_16.2: type, @tuple.type.as.A.impl.%V2.loc14_26.2: type, @tuple.type.as.A.impl.%W.loc14_35.2: type, %U.loc17_17.2: type) { -// CHECK:STDOUT: %U.patt.loc17_17.2: %pattern_type.9a5 = symbolic_binding_pattern U, 3 [symbolic = %U.patt.loc17_17.2 (constants.%U.patt.755)] +// CHECK:STDOUT: %U.patt.loc17_17.2: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 3 [symbolic = %U.patt.loc17_17.2 (constants.%U.patt.755)] // CHECK:STDOUT: %U.loc17_17.1: type = symbolic_binding U, 3 [symbolic = %U.loc17_17.1 (constants.%U.ce4)] // CHECK:STDOUT: %pattern_type.loc17_26: type = pattern_type %U.loc17_17.1 [symbolic = %pattern_type.loc17_26 (constants.%pattern_type.e4a)] // CHECK:STDOUT: %u.param_patt.loc17_26.2: @tuple.type.as.A.impl.F.%pattern_type.loc17_26 (%pattern_type.e4a) = value_param_pattern [symbolic = %u.param_patt.loc17_26.2 (constants.%u.param_patt.afe)] @@ -1676,7 +1435,7 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.loc17_49: %tuple.type.649 = tuple_value (%W, %tuple.loc17_45, %U.loc17_17.1) [symbolic = %tuple.loc17_49 (constants.%tuple.cd3)] // CHECK:STDOUT: %tuple.type.loc17_49.1: type = tuple_type (%V1, %V2) [symbolic = %tuple.type.loc17_49.1 (constants.%tuple.type.a5e)] // CHECK:STDOUT: %tuple.type.loc17_49.2: type = tuple_type (%W, %tuple.type.loc17_49.1, %U.loc17_17.1) [symbolic = %tuple.type.loc17_49.2 (constants.%tuple.type.897)] -// CHECK:STDOUT: %.loc17_49.2: Core.Form = init_form %tuple.type.loc17_49.2 [symbolic = %.loc17_49.2 (constants.%.f8e)] +// CHECK:STDOUT: %.loc17_49.2: Core.Form = init_form %tuple.type.loc17_49.2 [symbolic = %.loc17_49.2 (constants.%.f8ea)] // CHECK:STDOUT: %pattern_type.loc17_49: type = pattern_type %tuple.type.loc17_49.2 [symbolic = %pattern_type.loc17_49 (constants.%pattern_type.5cc)] // CHECK:STDOUT: %return.param_patt.loc17_49.2: @tuple.type.as.A.impl.F.%pattern_type.loc17_49 (%pattern_type.5cc) = out_param_pattern [symbolic = %return.param_patt.loc17_49.2 (constants.%return.param_patt.b1c)] // CHECK:STDOUT: %return.patt.loc17_31.2: @tuple.type.as.A.impl.F.%pattern_type.loc17_49 (%pattern_type.5cc) = return_slot_pattern %return.param_patt.loc17_49.2, %tuple.type.loc17_49.2 [symbolic = %return.patt.loc17_31.2 (constants.%return.patt.bad9)] @@ -1729,165 +1488,133 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc24_38.6: %Z = acquire_value %.loc24_38.5 [concrete = constants.%Z.val] // CHECK:STDOUT: %tuple.type.as.A.impl.F.call: init %tuple.type.d40 to %.loc24_39.1 = call %specific_fn(%.loc24_38.6) // CHECK:STDOUT: %.loc24_39.2: ref %tuple.type.d40 = temporary %.loc24_39.1, %tuple.type.as.A.impl.F.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc24_39.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_39: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc24_39.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_38: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.7dc) +// CHECK:STDOUT: %Destroy.facet.loc24_39.1: %Destroy.type = facet_value constants.%tuple.type.d40, (constants.%DestroyImpl.impl_witness.bff, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.40b] +// CHECK:STDOUT: %.loc24_39.3: %Destroy.type = converted constants.%tuple.type.d40, %Destroy.facet.loc24_39.1 [concrete = constants.%Destroy.facet.40b] +// CHECK:STDOUT: %Destroy.facet.loc24_39.2: %Destroy.type = facet_value constants.%tuple.type.d40, (constants.%DestroyImpl.impl_witness.bff, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.40b] +// CHECK:STDOUT: %.loc24_39.4: %Destroy.type = converted constants.%tuple.type.d40, %Destroy.facet.loc24_39.2 [concrete = constants.%Destroy.facet.40b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.40b) [concrete = constants.%SelfDestruct.specific_fn.3da] +// CHECK:STDOUT: %SelfDestruct.call.loc24_39: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc24_39.2) +// CHECK:STDOUT: %Destroy.facet.loc24_38.1: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc24_38.7: %Destroy.type = converted constants.%Z, %Destroy.facet.loc24_38.1 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %Destroy.facet.loc24_38.2: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc24_38.8: %Destroy.type = converted constants.%Z, %Destroy.facet.loc24_38.2 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.2ca) [concrete = constants.%SelfDestruct.specific_fn.29c] +// CHECK:STDOUT: %SelfDestruct.call.loc24_38: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc24_38.5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_39.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_39.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_39.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_39.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_39.3(%self.param: ref %Y1) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.2(%self.param: ref %X) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_39.4(%self.param: ref %Y2) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_39.2(%self.param: ref %X) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_39.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_39.3(%self.param: ref %Y1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_39.4(%self.param: ref %Y2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.5(%self.param: ref %tuple.type.59f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_39.5(%self.param: ref %tuple.type.59f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %Y2 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_39.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_39.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_39.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc24_39.1: %Destroy.type = facet_value constants.%Y2, (constants.%DestroyImpl.impl_witness.3c3, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.e3b] +// CHECK:STDOUT: %.loc24_39.1: %Destroy.type = converted constants.%Y2, %Destroy.facet.loc24_39.1 [concrete = constants.%Destroy.facet.e3b] +// CHECK:STDOUT: %Destroy.facet.loc24_39.2: %Destroy.type = facet_value constants.%Y2, (constants.%DestroyImpl.impl_witness.3c3, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.e3b] +// CHECK:STDOUT: %.loc24_39.2: %Destroy.type = converted constants.%Y2, %Destroy.facet.loc24_39.2 [concrete = constants.%Destroy.facet.e3b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.e3b) [concrete = constants.%SelfDestruct.specific_fn.c79] +// CHECK:STDOUT: %SelfDestruct.call.loc24_39.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %Y1 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_39.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_39.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_39.2(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc24_39.3: %Destroy.type = facet_value constants.%Y1, (constants.%DestroyImpl.impl_witness.709, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.42b] +// CHECK:STDOUT: %.loc24_39.3: %Destroy.type = converted constants.%Y1, %Destroy.facet.loc24_39.3 [concrete = constants.%Destroy.facet.42b] +// CHECK:STDOUT: %Destroy.facet.loc24_39.4: %Destroy.type = facet_value constants.%Y1, (constants.%DestroyImpl.impl_witness.709, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.42b] +// CHECK:STDOUT: %.loc24_39.4: %Destroy.type = converted constants.%Y1, %Destroy.facet.loc24_39.4 [concrete = constants.%Destroy.facet.42b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.42b) [concrete = constants.%SelfDestruct.specific_fn.8cf] +// CHECK:STDOUT: %SelfDestruct.call.loc24_39.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_39.5(%self.param: ref %tuple.type.59f) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_39.6(%self.param: ref %Z) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_39.5(%self.param: ref %tuple.type.59f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_39.6(%self.param: ref %Z) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_39.7(%self.param: ref %tuple.type.d40) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_39.7(%self.param: ref %tuple.type.d40) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %tuple.elem2: ref %Z = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_39.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_39.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_39.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc24_39.1: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc24_39.1: %Destroy.type = converted constants.%Z, %Destroy.facet.loc24_39.1 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %Destroy.facet.loc24_39.2: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc24_39.2: %Destroy.type = converted constants.%Z, %Destroy.facet.loc24_39.2 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.2ca) [concrete = constants.%SelfDestruct.specific_fn.29c] +// CHECK:STDOUT: %SelfDestruct.call.loc24_39.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %tuple.type.59f = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_39.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_39.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_39.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc24_39.3: %Destroy.type = facet_value constants.%tuple.type.59f, (constants.%DestroyImpl.impl_witness.55e, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.851] +// CHECK:STDOUT: %.loc24_39.3: %Destroy.type = converted constants.%tuple.type.59f, %Destroy.facet.loc24_39.3 [concrete = constants.%Destroy.facet.851] +// CHECK:STDOUT: %Destroy.facet.loc24_39.4: %Destroy.type = facet_value constants.%tuple.type.59f, (constants.%DestroyImpl.impl_witness.55e, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.851] +// CHECK:STDOUT: %.loc24_39.4: %Destroy.type = converted constants.%tuple.type.59f, %Destroy.facet.loc24_39.4 [concrete = constants.%Destroy.facet.851] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.851) [concrete = constants.%SelfDestruct.specific_fn.fe3] +// CHECK:STDOUT: %SelfDestruct.call.loc24_39.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %X = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_39.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_39.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_39.3(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc24_39.5: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc24_39.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc24_39.5 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc24_39.6: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc24_39.6: %Destroy.type = converted constants.%X, %Destroy.facet.loc24_39.6 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.689) [concrete = constants.%SelfDestruct.specific_fn.399] +// CHECK:STDOUT: %SelfDestruct.call.loc24_39.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_39.7(%self.param: ref %tuple.type.d40) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_39.7(%self.param: ref %tuple.type.d40) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.7(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @CallGeneric(%T.loc27_25.2: %facet_type) { -// CHECK:STDOUT: %T.patt.loc27_25.2: %pattern_type.442 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_25.2 (constants.%T.patt.018)] -// CHECK:STDOUT: %T.loc27_25.1: %facet_type = symbolic_binding T, 0 [symbolic = %T.loc27_25.1 (constants.%T.381)] +// CHECK:STDOUT: generic fn @CallGeneric(%T.loc27_25.2: %facet_type.e51) { +// CHECK:STDOUT: %T.patt.loc27_25.2: %pattern_type.c6b = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_25.2 (constants.%T.patt.0e0)] +// CHECK:STDOUT: %T.loc27_25.1: %facet_type.e51 = symbolic_binding T, 0 [symbolic = %T.loc27_25.1 (constants.%T.646)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc28_4.2: type = facet_access_type %T.loc27_25.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)] +// CHECK:STDOUT: %T.as_type.loc28_4.2: type = facet_access_type %T.loc27_25.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.407)] // CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc27_25.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] -// CHECK:STDOUT: %A.facet: %A.type.e51 = facet_value %T.as_type.loc28_4.2, (%A.lookup_impl_witness) [symbolic = %A.facet (constants.%A.facet.89c)] -// CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A.WithSelf(constants.%X, %A.facet) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.e56)] -// CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %A.facet [symbolic = %.loc28_4.3 (constants.%.66b)] -// CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.66b) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.a46)] -// CHECK:STDOUT: %specific_impl_fn.loc28_4.2: = specific_impl_function %impl.elem0.loc28_4.2, @A.WithSelf.F(constants.%X, %A.facet, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.189)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc28_4.2, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.e9f)] -// CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.bff)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.3bf)] -// CHECK:STDOUT: %Destroy.facet.loc28_12.3: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.924)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.loc28_12.3) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.dba)] -// CHECK:STDOUT: %.loc28_12.5: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Destroy.facet.loc28_12.3 [symbolic = %.loc28_12.5 (constants.%.4ff)] -// CHECK:STDOUT: %impl.elem2.loc28_12.2: @CallGeneric.%.loc28_12.5 (%.4ff) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc28_12.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc28_12.2: = specific_impl_function %impl.elem2.loc28_12.2, @Destroy.WithSelf.SelfDestruct.1(%Destroy.facet.loc28_12.3) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.d20)] +// CHECK:STDOUT: %A.facet: %A.type.e51 = facet_value %T.as_type.loc28_4.2, (%A.lookup_impl_witness) [symbolic = %A.facet (constants.%A.facet.7c2)] +// CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A.WithSelf(constants.%X, %A.facet) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.1e4)] +// CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %A.facet [symbolic = %.loc28_4.3 (constants.%.2a6)] +// CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.2a6) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.907)] +// CHECK:STDOUT: %specific_impl_fn.loc28_4.2: = specific_impl_function %impl.elem0.loc28_4.2, @A.WithSelf.F(constants.%X, %A.facet, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.bf9)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.as_type.loc28_4.2, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.93b)] +// CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.0eb)] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: = lookup_impl_witness %tuple.type, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.a22)] +// CHECK:STDOUT: %SubobjectDestroy.facet: %SubobjectDestroy.type = facet_value %tuple.type, (%SubobjectDestroy.lookup_impl_witness) [symbolic = %SubobjectDestroy.facet (constants.%SubobjectDestroy.facet.ef4)] +// CHECK:STDOUT: %.loc28_12.5: require_specific_def_type = require_specific_def @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet) [symbolic = %.loc28_12.5 (constants.%.463)] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: = lookup_impl_witness %tuple.type, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.f6e)] +// CHECK:STDOUT: %Destroy.facet.loc28_12.3: %Destroy.type = facet_value %tuple.type, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.b56)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(%Destroy.facet.loc28_12.3) [symbolic = %SelfDestruct.specific_fn.3 (constants.%SelfDestruct.specific_fn.ba5)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: %facet_type = name_ref T, %T.loc27_25.2 [symbolic = %T.loc27_25.1 (constants.%T.381)] -// CHECK:STDOUT: %T.as_type.loc28_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type.loc28_4.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.7e3 = specific_constant @A.WithSelf.%assoc0.loc6_46.1, @A.WithSelf(constants.%X, constants.%T.381) [concrete = constants.%assoc0.299] +// CHECK:STDOUT: %T.ref: %facet_type.e51 = name_ref T, %T.loc27_25.2 [symbolic = %T.loc27_25.1 (constants.%T.646)] +// CHECK:STDOUT: %T.as_type.loc28_4.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.407)] +// CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type.loc28_4.1 [symbolic = %T.as_type.loc28_4.2 (constants.%T.as_type.407)] +// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.7e3 = specific_constant @A.WithSelf.%assoc0.loc6_46.1, @A.WithSelf(constants.%X, constants.%T.646) [concrete = constants.%assoc0.299] // CHECK:STDOUT: %F.ref: %A.assoc_type.7e3 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.299] -// CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.66b) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.a46)] +// CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.2a6) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.907)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %.loc28_11.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %specific_impl_fn.loc28_4.1: = specific_impl_function %impl.elem0.loc28_4.1, @A.WithSelf.F(constants.%X, constants.%A.facet.89c, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.189)] -// CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.e9f) = temporary_storage +// CHECK:STDOUT: %specific_impl_fn.loc28_4.1: = specific_impl_function %impl.elem0.loc28_4.1, @A.WithSelf.F(constants.%X, constants.%A.facet.7c2, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.bf9)] +// CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.93b) = temporary_storage // CHECK:STDOUT: %.loc28_11.2: ref %Z = temporary_storage // CHECK:STDOUT: %.loc28_11.3: init %Z to %.loc28_11.2 = class_init () [concrete = constants.%Z.val] // CHECK:STDOUT: %.loc28_11.4: init %Z = converted %.loc28_11.1, %.loc28_11.3 [concrete = constants.%Z.val] // CHECK:STDOUT: %.loc28_11.5: ref %Z = temporary %.loc28_11.2, %.loc28_11.4 [concrete = constants.%.7dc] // CHECK:STDOUT: %.loc28_11.6: %Z = acquire_value %.loc28_11.5 [concrete = constants.%Z.val] -// CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.e9f) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%.loc28_11.6) -// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.e9f) = temporary %.loc28_12.1, %A.WithSelf.F.call -// CHECK:STDOUT: %impl.elem2.loc28_12.1: @CallGeneric.%.loc28_12.5 (%.4ff) = impl_witness_access constants.%Destroy.lookup_impl_witness.3bf, element2 [symbolic = %impl.elem2.loc28_12.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc28_12.1: = bound_method %.loc28_12.2, %impl.elem2.loc28_12.1 -// CHECK:STDOUT: %Destroy.facet.loc28_12.1: %Destroy.type = facet_value constants.%tuple.type.e9f, (constants.%Destroy.lookup_impl_witness.3bf) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.924)] -// CHECK:STDOUT: %.loc28_12.3: %Destroy.type = converted constants.%tuple.type.e9f, %Destroy.facet.loc28_12.1 [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.924)] -// CHECK:STDOUT: %Destroy.facet.loc28_12.2: %Destroy.type = facet_value constants.%tuple.type.e9f, (constants.%Destroy.lookup_impl_witness.3bf) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.924)] -// CHECK:STDOUT: %.loc28_12.4: %Destroy.type = converted constants.%tuple.type.e9f, %Destroy.facet.loc28_12.2 [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.924)] -// CHECK:STDOUT: %specific_impl_fn.loc28_12.1: = specific_impl_function %impl.elem2.loc28_12.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Destroy.facet.924) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.d20)] -// CHECK:STDOUT: %bound_method.loc28_12.2: = bound_method %.loc28_12.2, %specific_impl_fn.loc28_12.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc28_12: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc28_11: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.7dc) +// CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.93b) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%.loc28_11.6) +// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.93b) = temporary %.loc28_12.1, %A.WithSelf.F.call +// CHECK:STDOUT: %Destroy.facet.loc28_12.1: %Destroy.type = facet_value constants.%tuple.type.93b, (constants.%DestroyImpl.lookup_impl_witness.f6e, constants.%SubobjectDestroy.lookup_impl_witness.a22) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.b56)] +// CHECK:STDOUT: %.loc28_12.3: %Destroy.type = converted constants.%tuple.type.93b, %Destroy.facet.loc28_12.1 [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.b56)] +// CHECK:STDOUT: %Destroy.facet.loc28_12.2: %Destroy.type = facet_value constants.%tuple.type.93b, (constants.%DestroyImpl.lookup_impl_witness.f6e, constants.%SubobjectDestroy.lookup_impl_witness.a22) [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.b56)] +// CHECK:STDOUT: %.loc28_12.4: %Destroy.type = converted constants.%tuple.type.93b, %Destroy.facet.loc28_12.2 [symbolic = %Destroy.facet.loc28_12.3 (constants.%Destroy.facet.b56)] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.b56) [symbolic = %SelfDestruct.specific_fn.3 (constants.%SelfDestruct.specific_fn.ba5)] +// CHECK:STDOUT: %SelfDestruct.call.loc28_12: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc28_12.2) +// CHECK:STDOUT: %Destroy.facet.loc28_11.1: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc28_11.7: %Destroy.type = converted constants.%Z, %Destroy.facet.loc28_11.1 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %Destroy.facet.loc28_11.2: %Destroy.type = facet_value constants.%Z, (constants.%DestroyImpl.impl_witness.6a0, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %.loc28_11.8: %Destroy.type = converted constants.%Z, %Destroy.facet.loc28_11.2 [concrete = constants.%Destroy.facet.2ca] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.2ca) [concrete = constants.%SelfDestruct.specific_fn.29c] +// CHECK:STDOUT: %SelfDestruct.call.loc28_11: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc28_11.5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1900,15 +1627,15 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc33_22: %tuple.type.693 = tuple_literal (%Y1.ref, %Y2.ref) [concrete = constants.%tuple.71f] // CHECK:STDOUT: %.loc33_27: type = type_literal type [concrete = type] // CHECK:STDOUT: %.loc33_24: type = converted %.loc33_22, constants.%tuple.type.59f [concrete = constants.%tuple.type.59f] -// CHECK:STDOUT: %facet_value: %facet_type = facet_value %.loc33_24, (constants.%A.impl_witness.84c, constants.%custom_witness.f8f19d.5) [concrete = constants.%facet_value] -// CHECK:STDOUT: %.loc33_31: %facet_type = converted %.loc33_24, %facet_value [concrete = constants.%facet_value] +// CHECK:STDOUT: %facet_value: %facet_type.e51 = facet_value %.loc33_24, (constants.%A.impl_witness.84c, constants.%DestroyImpl.impl_witness.55e, constants.%custom_witness.b80ef6.5) [concrete = constants.%facet_value] +// CHECK:STDOUT: %.loc33_31: %facet_type.e51 = converted %.loc33_24, %facet_value [concrete = constants.%facet_value] // CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric.ref, @CallGeneric(constants.%facet_value) [concrete = constants.%CallGeneric.specific_fn] // CHECK:STDOUT: %CallGeneric.call: init %empty_tuple.type = call %CallGeneric.specific_fn() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc5_14.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1934,7 +1661,7 @@ fn CallIndirect() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%W) { -// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc5_14.1 => constants.%W // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1985,7 +1712,7 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.loc17_49 => constants.%tuple.cd3 // CHECK:STDOUT: %tuple.type.loc17_49.1 => constants.%tuple.type.a5e // CHECK:STDOUT: %tuple.type.loc17_49.2 => constants.%tuple.type.897 -// CHECK:STDOUT: %.loc17_49.2 => constants.%.f8e +// CHECK:STDOUT: %.loc17_49.2 => constants.%.f8ea // CHECK:STDOUT: %pattern_type.loc17_49 => constants.%pattern_type.5cc // CHECK:STDOUT: %return.param_patt.loc17_49.2 => constants.%return.param_patt.b1c // CHECK:STDOUT: %return.patt.loc17_31.2 => constants.%return.patt.bad9 @@ -2022,14 +1749,14 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple => constants.%tuple.2fe // CHECK:STDOUT: %Self.as_type.loc6_45.1 => constants.%tuple.type.a5e // CHECK:STDOUT: %tuple.type.loc6_45.2 => constants.%tuple.type.897 -// CHECK:STDOUT: %.loc6_45.1 => constants.%.f8e +// CHECK:STDOUT: %.loc6_45.1 => constants.%.f8ea // CHECK:STDOUT: %pattern_type.loc6_45 => constants.%pattern_type.5cc // CHECK:STDOUT: %return.param_patt.loc6_45.2 => constants.%return.param_patt.b1c // CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.bad9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%X) { -// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc5_14.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc5_14.1 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2104,34 +1831,34 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.dac // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @CallGeneric(constants.%T.381) { -// CHECK:STDOUT: %T.patt.loc27_25.2 => constants.%T.patt.018 -// CHECK:STDOUT: %T.loc27_25.1 => constants.%T.381 +// CHECK:STDOUT: specific @CallGeneric(constants.%T.646) { +// CHECK:STDOUT: %T.patt.loc27_25.2 => constants.%T.patt.0e0 +// CHECK:STDOUT: %T.loc27_25.1 => constants.%T.646 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%T.381) { +// CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%T.646) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.e51 -// CHECK:STDOUT: %Self => constants.%T.381 -// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.bde -// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.3e2 +// CHECK:STDOUT: %Self => constants.%T.646 +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.566 +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.879 // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.7e3 // CHECK:STDOUT: %assoc0.loc6_46.2 => constants.%assoc0.299 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.89c) { +// CHECK:STDOUT: specific @A.WithSelf(constants.%X, constants.%A.facet.7c2) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.e51 -// CHECK:STDOUT: %Self => constants.%A.facet.89c -// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.e56 -// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.03c +// CHECK:STDOUT: %Self => constants.%A.facet.7c2 +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.1e4 +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.085 // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.7e3 // CHECK:STDOUT: %assoc0.loc6_46.2 => constants.%assoc0.299 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.89c, constants.%Z) { +// CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.7c2, constants.%Z) { // CHECK:STDOUT: %U.patt.loc6_17.2 => constants.%U.patt.5c4 // CHECK:STDOUT: %U.loc6_17.1 => constants.%Z // CHECK:STDOUT: %pattern_type.loc6_26 => constants.%pattern_type.34e @@ -2139,19 +1866,19 @@ fn CallIndirect() { // CHECK:STDOUT: %u.patt.loc6_26.2 => constants.%u.patt.5d3 // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %A.type => constants.%A.type.e51 -// CHECK:STDOUT: %Self => constants.%A.facet.89c +// CHECK:STDOUT: %Self => constants.%A.facet.7c2 // CHECK:STDOUT: %tuple.type.loc6_45.1 => constants.%tuple.type.924 -// CHECK:STDOUT: %tuple => constants.%tuple.f65 -// CHECK:STDOUT: %Self.as_type.loc6_45.1 => constants.%T.as_type -// CHECK:STDOUT: %tuple.type.loc6_45.2 => constants.%tuple.type.e9f -// CHECK:STDOUT: %.loc6_45.1 => constants.%.bd3 -// CHECK:STDOUT: %pattern_type.loc6_45 => constants.%pattern_type.d56 -// CHECK:STDOUT: %return.param_patt.loc6_45.2 => constants.%return.param_patt.add -// CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.82b +// CHECK:STDOUT: %tuple => constants.%tuple.03a +// CHECK:STDOUT: %Self.as_type.loc6_45.1 => constants.%T.as_type.407 +// CHECK:STDOUT: %tuple.type.loc6_45.2 => constants.%tuple.type.93b +// CHECK:STDOUT: %.loc6_45.1 => constants.%.905 +// CHECK:STDOUT: %pattern_type.loc6_45 => constants.%pattern_type.9c0 +// CHECK:STDOUT: %return.param_patt.loc6_45.2 => constants.%return.param_patt.169 +// CHECK:STDOUT: %return.patt.loc6_31.2 => constants.%return.patt.fc2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%facet_value) { -// CHECK:STDOUT: %T.patt.loc27_25.2 => constants.%T.patt.018 +// CHECK:STDOUT: %T.patt.loc27_25.2 => constants.%T.patt.0e0 // CHECK:STDOUT: %T.loc27_25.1 => constants.%facet_value // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2164,12 +1891,12 @@ fn CallIndirect() { // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%tuple.type.as.A.impl.F.specific_fn.dac // CHECK:STDOUT: %tuple.type => constants.%tuple.type.d40 // CHECK:STDOUT: %require_complete => constants.%complete_type.8f6 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.7 -// CHECK:STDOUT: %Destroy.facet.loc28_12.3 => constants.%Destroy.facet.3dc -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.ff5 -// CHECK:STDOUT: %.loc28_12.5 => constants.%.916 -// CHECK:STDOUT: %impl.elem2.loc28_12.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness => constants.%custom_witness.b80ef6.7 +// CHECK:STDOUT: %SubobjectDestroy.facet => constants.%SubobjectDestroy.facet.392 +// CHECK:STDOUT: %.loc28_12.5 => constants.%.ee1 +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness => constants.%DestroyImpl.impl_witness.bff +// CHECK:STDOUT: %Destroy.facet.loc28_12.3 => constants.%Destroy.facet.40b +// CHECK:STDOUT: %SelfDestruct.specific_fn.3 => constants.%SelfDestruct.specific_fn.3da // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.9d8, constants.%Z) { diff --git a/toolchain/check/testdata/interface/modifiers.carbon b/toolchain/check/testdata/interface/modifiers.carbon index 8f582d33f4b0..123432b2af64 100644 --- a/toolchain/check/testdata/interface/modifiers.carbon +++ b/toolchain/check/testdata/interface/modifiers.carbon @@ -844,58 +844,24 @@ interface C { // CHECK:STDOUT: %CallMethod.type: type = fn_type @CallMethod [concrete] // CHECK:STDOUT: %CallMethod: %CallMethod.type = struct_value () [concrete] // CHECK:STDOUT: %CallMethod.specific_fn: = specific_function %CallMethod, @CallMethod(%DefaultMethod.facet) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_15.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_15.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.115, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_15.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.DefaultMethod: type = import_ref Main//default_interfaces, DefaultMethod, loaded [concrete = constants.%DefaultMethod.type] // CHECK:STDOUT: %Main.CallMethod: %CallMethod.type = import_ref Main//default_interfaces, CallMethod, loaded [concrete = constants.%CallMethod] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_15.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_15.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_15.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_15.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -948,31 +914,18 @@ interface C { // CHECK:STDOUT: %.loc12_15.2: %DefaultMethod.type = converted constants.%C, %DefaultMethod.facet.loc12_15.2 [concrete = constants.%DefaultMethod.facet] // CHECK:STDOUT: %CallMethod.specific_fn: = specific_function %CallMethod.ref, @CallMethod(constants.%DefaultMethod.facet) [concrete = constants.%CallMethod.specific_fn] // CHECK:STDOUT: %CallMethod.call: init %empty_tuple.type = call %CallMethod.specific_fn(%c.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.115) +// CHECK:STDOUT: %Destroy.facet.loc11_15.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_15.7: %Destroy.type = converted constants.%C, %Destroy.facet.loc11_15.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_15.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_15.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc11_15.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_15.5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_15.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_15.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_15.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_15.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_15.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_15.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- default_function_overridden.carbon // CHECK:STDOUT: @@ -1089,58 +1042,24 @@ interface C { // CHECK:STDOUT: %CallMethod.type: type = fn_type @CallMethod [concrete] // CHECK:STDOUT: %CallMethod: %CallMethod.type = struct_value () [concrete] // CHECK:STDOUT: %CallMethod.specific_fn: = specific_function %CallMethod, @CallMethod(%DefaultMethod.facet) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_15.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc14_15.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc14_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.115, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_15.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.DefaultMethod: type = import_ref Main//default_interfaces, DefaultMethod, loaded [concrete = constants.%DefaultMethod.type] // CHECK:STDOUT: %Main.CallMethod: %CallMethod.type = import_ref Main//default_interfaces, CallMethod, loaded [concrete = constants.%CallMethod] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_15.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc14_15.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_15.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc14_15.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1224,31 +1143,18 @@ interface C { // CHECK:STDOUT: %.loc15_15.2: %DefaultMethod.type = converted constants.%C, %DefaultMethod.facet.loc15_15.2 [concrete = constants.%DefaultMethod.facet] // CHECK:STDOUT: %CallMethod.specific_fn: = specific_function %CallMethod.ref, @CallMethod(constants.%DefaultMethod.facet) [concrete = constants.%CallMethod.specific_fn] // CHECK:STDOUT: %CallMethod.call: init %empty_tuple.type = call %CallMethod.specific_fn(%c.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.115) +// CHECK:STDOUT: %Destroy.facet.loc14_15.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_15.7: %Destroy.type = converted constants.%C, %Destroy.facet.loc14_15.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc14_15.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_15.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc14_15.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc14_15.5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_15.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_15.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_15.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_15.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_15.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_15.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- final_function.carbon // CHECK:STDOUT: @@ -1340,58 +1246,24 @@ interface C { // CHECK:STDOUT: %CallMethod.type: type = fn_type @CallMethod [concrete] // CHECK:STDOUT: %CallMethod: %CallMethod.type = struct_value () [concrete] // CHECK:STDOUT: %CallMethod.specific_fn: = specific_function %CallMethod, @CallMethod(%FinalMethod.facet) [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_15.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_15.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.115, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_15.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.FinalMethod: type = import_ref Main//final_interfaces, FinalMethod, loaded [concrete = constants.%FinalMethod.type] // CHECK:STDOUT: %Main.CallMethod: %CallMethod.type = import_ref Main//final_interfaces, CallMethod, loaded [concrete = constants.%CallMethod] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_15.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_15.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_15.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_15.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1444,29 +1316,16 @@ interface C { // CHECK:STDOUT: %.loc12_15.2: %FinalMethod.type = converted constants.%C, %FinalMethod.facet.loc12_15.2 [concrete = constants.%FinalMethod.facet] // CHECK:STDOUT: %CallMethod.specific_fn: = specific_function %CallMethod.ref, @CallMethod(constants.%FinalMethod.facet) [concrete = constants.%CallMethod.specific_fn] // CHECK:STDOUT: %CallMethod.call: init %empty_tuple.type = call %CallMethod.specific_fn(%c.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.115) +// CHECK:STDOUT: %Destroy.facet.loc11_15.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_15.7: %Destroy.type = converted constants.%C, %Destroy.facet.loc11_15.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_15.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_15.8: %Destroy.type = converted constants.%C, %Destroy.facet.loc11_15.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_15.5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_15.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_15.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_15.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_15.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_15.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_15.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/observe.carbon b/toolchain/check/testdata/interface/observe.carbon index d52b4ab59ccc..92c7661a073f 100644 --- a/toolchain/check/testdata/interface/observe.carbon +++ b/toolchain/check/testdata/interface/observe.carbon @@ -38,7 +38,7 @@ import library "transitive"; fn F[T: Transitive](t: T) { var a: T.A = t.GetA(); - // CHECK:STDERR: fail_todo_equivalent.carbon:[[@LINE+4]]:3-13: error: cannot convert type `T.(Transitive.A)` that implements `Core.Destroy & P` into type implementing `Core.Destroy & R where...` [ConversionFailureFacetToFacet] + // CHECK:STDERR: fail_todo_equivalent.carbon:[[@LINE+4]]:3-13: error: cannot convert type `T.(Transitive.A)` that implements `P & Core.Destroy` into type implementing `R & Core.Destroy where...` [ConversionFailureFacetToFacet] // CHECK:STDERR: imported from: fail_todo_equivalent.carbon:[[@LINE-6]]:1 [InImport] // CHECK:STDERR: transitive.carbon:14:3-24: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: @@ -146,7 +146,7 @@ fn F[U: Z](t: U.Z1) { var a: U.Z1.A = t.GetA(); // Depends on the observe statement in Transitive, which is the type of `Z1`. - // CHECK:STDERR: fail_todo_observe_from_type_of_assoc_constant.carbon:[[@LINE+4]]:3-13: error: cannot convert type `U.(Z.Z1).(Transitive.A)` that implements `Core.Destroy & P` into type implementing `Core.Destroy & R where...` [ConversionFailureFacetToFacet] + // CHECK:STDERR: fail_todo_observe_from_type_of_assoc_constant.carbon:[[@LINE+4]]:3-13: error: cannot convert type `U.(Z.Z1).(Transitive.A)` that implements `P & Core.Destroy` into type implementing `R & Core.Destroy where...` [ConversionFailureFacetToFacet] // CHECK:STDERR: imported from: fail_todo_observe_from_type_of_assoc_constant.carbon:[[@LINE-12]]:1 [InImport] // CHECK:STDERR: transitive.carbon:14:3-24: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: @@ -419,7 +419,7 @@ import library "generic_observe"; fn F[W: A, X: I(W)](x: X) { var v: X.V = x.GetV(); - // CHECK:STDERR: fail_todo_generic_import.carbon:[[@LINE+4]]:3-13: error: cannot convert type `X.(I(W).V)` that implements `Core.Destroy & C where...` into type implementing `A` [ConversionFailureFacetToFacet] + // CHECK:STDERR: fail_todo_generic_import.carbon:[[@LINE+4]]:3-13: error: cannot convert type `X.(I(W).V)` that implements `C & Core.Destroy where...` into type implementing `A` [ConversionFailureFacetToFacet] // CHECK:STDERR: imported from: fail_todo_generic_import.carbon:[[@LINE-6]]:1 [InImport] // CHECK:STDERR: generic_observe.carbon:12:3-24: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: @@ -432,37 +432,37 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Transitive.type: type = facet_type <@Transitive> [concrete] // CHECK:STDOUT: %Self.77c: %Transitive.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %facet_type.b1b: type = facet_type <@P & @Destroy> [concrete] +// CHECK:STDOUT: %facet_type.6ce: type = facet_type <@P & @Destroy> [concrete] // CHECK:STDOUT: %Transitive.assoc_type: type = assoc_entity_type @Transitive [concrete] -// CHECK:STDOUT: %assoc0.1be: %Transitive.assoc_type = assoc_entity element0, @Transitive.WithSelf.%A [concrete] +// CHECK:STDOUT: %assoc0.c48: %Transitive.assoc_type = assoc_entity element0, @Transitive.WithSelf.%A [concrete] // CHECK:STDOUT: %Transitive.lookup_impl_witness: = lookup_impl_witness %Self.77c, @Transitive [symbolic] -// CHECK:STDOUT: %impl.elem0.b02: %facet_type.b1b = impl_witness_access %Transitive.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %facet_type.130: type = facet_type <@Q & @Destroy where TODO> [concrete] +// CHECK:STDOUT: %impl.elem0: %facet_type.6ce = impl_witness_access %Transitive.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %facet_type.40a: type = facet_type <@Q & @Destroy where TODO> [concrete] // CHECK:STDOUT: %assoc1: %Transitive.assoc_type = assoc_entity element1, @Transitive.WithSelf.%B [concrete] -// CHECK:STDOUT: %impl.elem1.1d6: %facet_type.130 = impl_witness_access %Transitive.lookup_impl_witness, element1 [symbolic] -// CHECK:STDOUT: %facet_type.4c8: type = facet_type <@R & @Destroy where TODO> [concrete] +// CHECK:STDOUT: %impl.elem1: %facet_type.40a = impl_witness_access %Transitive.lookup_impl_witness, element1 [symbolic] +// CHECK:STDOUT: %facet_type.afd: type = facet_type <@R & @Destroy where TODO> [concrete] // CHECK:STDOUT: %assoc2: %Transitive.assoc_type = assoc_entity element2, @Transitive.WithSelf.%C [concrete] // CHECK:STDOUT: %Self.as_type.7f2: type = facet_access_type %Self.77c [symbolic] // CHECK:STDOUT: %pattern_type.b5c: type = pattern_type %Self.as_type.7f2 [symbolic] // CHECK:STDOUT: %self.param_patt.ae9: %pattern_type.b5c = value_param_pattern [symbolic] // CHECK:STDOUT: %self.patt.03f: %pattern_type.b5c = wrapper_binding_pattern self, %self.param_patt.ae9 [symbolic] -// CHECK:STDOUT: %as_type.d30: type = facet_access_type %impl.elem0.b02 [symbolic] -// CHECK:STDOUT: %.117: Core.Form = init_form %as_type.d30 [symbolic] -// CHECK:STDOUT: %pattern_type.51a: type = pattern_type %as_type.d30 [symbolic] -// CHECK:STDOUT: %return.param_patt.931: %pattern_type.51a = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.680: %pattern_type.51a = return_slot_pattern %return.param_patt.931, %as_type.d30 [symbolic] +// CHECK:STDOUT: %as_type.e89: type = facet_access_type %impl.elem0 [symbolic] +// CHECK:STDOUT: %.33f: Core.Form = init_form %as_type.e89 [symbolic] +// CHECK:STDOUT: %pattern_type.46d: type = pattern_type %as_type.e89 [symbolic] +// CHECK:STDOUT: %return.param_patt.758: %pattern_type.46d = out_param_pattern [symbolic] +// CHECK:STDOUT: %return.patt.917: %pattern_type.46d = return_slot_pattern %return.param_patt.758, %as_type.e89 [symbolic] // CHECK:STDOUT: %Transitive.WithSelf.GetA.type: type = fn_type @Transitive.WithSelf.GetA, @Transitive.WithSelf(%Self.77c) [symbolic] // CHECK:STDOUT: %Transitive.WithSelf.GetA: %Transitive.WithSelf.GetA.type = struct_value () [symbolic] // CHECK:STDOUT: %assoc3: %Transitive.assoc_type = assoc_entity element3, @Transitive.WithSelf.%Transitive.WithSelf.GetA.decl [concrete] -// CHECK:STDOUT: %impl.elem2: %facet_type.4c8 = impl_witness_access %Transitive.lookup_impl_witness, element2 [symbolic] -// CHECK:STDOUT: %as_type.472: type = facet_access_type %impl.elem2 [symbolic] -// CHECK:STDOUT: %pattern_type.007: type = pattern_type %as_type.472 [symbolic] -// CHECK:STDOUT: %c.param_patt: %pattern_type.007 = value_param_pattern [symbolic] -// CHECK:STDOUT: %c.patt: %pattern_type.007 = wrapper_binding_pattern c, %c.param_patt [symbolic] +// CHECK:STDOUT: %impl.elem2: %facet_type.afd = impl_witness_access %Transitive.lookup_impl_witness, element2 [symbolic] +// CHECK:STDOUT: %as_type.95b: type = facet_access_type %impl.elem2 [symbolic] +// CHECK:STDOUT: %pattern_type.95b: type = pattern_type %as_type.95b [symbolic] +// CHECK:STDOUT: %c.param_patt: %pattern_type.95b = value_param_pattern [symbolic] +// CHECK:STDOUT: %c.patt: %pattern_type.95b = wrapper_binding_pattern c, %c.param_patt [symbolic] // CHECK:STDOUT: %Transitive.WithSelf.TakesC.type: type = fn_type @Transitive.WithSelf.TakesC, @Transitive.WithSelf(%Self.77c) [symbolic] // CHECK:STDOUT: %Transitive.WithSelf.TakesC: %Transitive.WithSelf.TakesC.type = struct_value () [symbolic] // CHECK:STDOUT: %assoc4: %Transitive.assoc_type = assoc_entity element4, @Transitive.WithSelf.%Transitive.WithSelf.TakesC.decl [concrete] -// CHECK:STDOUT: %as_type.aed: type = facet_access_type %impl.elem1.1d6 [symbolic] +// CHECK:STDOUT: %as_type.a97: type = facet_access_type %impl.elem1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -474,26 +474,26 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %Transitive.WithSelf.decl = interface_with_self_decl @Transitive [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %A: %facet_type.b1b = assoc_const_decl @A [concrete] { -// CHECK:STDOUT: %assoc0: %Transitive.assoc_type = assoc_entity element0, @Transitive.WithSelf.%A [concrete = constants.%assoc0.1be] +// CHECK:STDOUT: %A: %facet_type.6ce = assoc_const_decl @A [concrete] { +// CHECK:STDOUT: %assoc0: %Transitive.assoc_type = assoc_entity element0, @Transitive.WithSelf.%A [concrete = constants.%assoc0.c48] // CHECK:STDOUT: } -// CHECK:STDOUT: %B: %facet_type.130 = assoc_const_decl @B [concrete] { +// CHECK:STDOUT: %B: %facet_type.40a = assoc_const_decl @B [concrete] { // CHECK:STDOUT: %assoc1: %Transitive.assoc_type = assoc_entity element1, @Transitive.WithSelf.%B [concrete = constants.%assoc1] // CHECK:STDOUT: } -// CHECK:STDOUT: %C: %facet_type.4c8 = assoc_const_decl @C [concrete] { +// CHECK:STDOUT: %C: %facet_type.afd = assoc_const_decl @C [concrete] { // CHECK:STDOUT: %assoc2: %Transitive.assoc_type = assoc_entity element2, @Transitive.WithSelf.%C [concrete = constants.%assoc2] // CHECK:STDOUT: } // CHECK:STDOUT: %Transitive.WithSelf.GetA.decl: @Transitive.WithSelf.%Transitive.WithSelf.GetA.type (%Transitive.WithSelf.GetA.type) = fn_decl @Transitive.WithSelf.GetA [symbolic = @Transitive.WithSelf.%Transitive.WithSelf.GetA (constants.%Transitive.WithSelf.GetA)] { // CHECK:STDOUT: %self.param_patt.loc13_11.1: @Transitive.WithSelf.GetA.%pattern_type.loc13_11 (%pattern_type.b5c) = value_param_pattern [symbolic = %self.param_patt.loc13_11.2 (constants.%self.param_patt.ae9)] // CHECK:STDOUT: %self.patt.loc13_11.1: @Transitive.WithSelf.GetA.%pattern_type.loc13_11 (%pattern_type.b5c) = wrapper_binding_pattern self, %self.param_patt.loc13_11.1 [symbolic = %self.patt.loc13_11.2 (constants.%self.patt.03f)] -// CHECK:STDOUT: %return.param_patt.loc13_20.1: @Transitive.WithSelf.GetA.%pattern_type.loc13_20 (%pattern_type.51a) = out_param_pattern [symbolic = %return.param_patt.loc13_20.2 (constants.%return.param_patt.931)] -// CHECK:STDOUT: %return.patt.loc13_17.1: @Transitive.WithSelf.GetA.%pattern_type.loc13_20 (%pattern_type.51a) = return_slot_pattern %return.param_patt.loc13_20.1, %.loc13_20.2 [symbolic = %return.patt.loc13_17.2 (constants.%return.patt.680)] +// CHECK:STDOUT: %return.param_patt.loc13_20.1: @Transitive.WithSelf.GetA.%pattern_type.loc13_20 (%pattern_type.46d) = out_param_pattern [symbolic = %return.param_patt.loc13_20.2 (constants.%return.param_patt.758)] +// CHECK:STDOUT: %return.patt.loc13_17.1: @Transitive.WithSelf.GetA.%pattern_type.loc13_20 (%pattern_type.46d) = return_slot_pattern %return.param_patt.loc13_20.1, %.loc13_20.2 [symbolic = %return.patt.loc13_17.2 (constants.%return.patt.917)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem0.loc13_20.2: %facet_type.b1b = impl_witness_access constants.%Transitive.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_20.1 (constants.%impl.elem0.b02)] -// CHECK:STDOUT: %A.ref: %facet_type.b1b = name_ref A, %impl.elem0.loc13_20.2 [symbolic = %impl.elem0.loc13_20.1 (constants.%impl.elem0.b02)] -// CHECK:STDOUT: %A.as_type: type = facet_access_type %A.ref [symbolic = %as_type (constants.%as_type.d30)] -// CHECK:STDOUT: %.loc13_20.2: type = converted %A.ref, %A.as_type [symbolic = %as_type (constants.%as_type.d30)] -// CHECK:STDOUT: %.loc13_20.3: Core.Form = init_form %.loc13_20.2 [symbolic = %.loc13_20.1 (constants.%.117)] +// CHECK:STDOUT: %impl.elem0.loc13_20.2: %facet_type.6ce = impl_witness_access constants.%Transitive.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_20.1 (constants.%impl.elem0)] +// CHECK:STDOUT: %A.ref: %facet_type.6ce = name_ref A, %impl.elem0.loc13_20.2 [symbolic = %impl.elem0.loc13_20.1 (constants.%impl.elem0)] +// CHECK:STDOUT: %A.as_type: type = facet_access_type %A.ref [symbolic = %as_type (constants.%as_type.e89)] +// CHECK:STDOUT: %.loc13_20.2: type = converted %A.ref, %A.as_type [symbolic = %as_type (constants.%as_type.e89)] +// CHECK:STDOUT: %.loc13_20.3: Core.Form = init_form %.loc13_20.2 [symbolic = %.loc13_20.1 (constants.%.33f)] // CHECK:STDOUT: %self.param: @Transitive.WithSelf.GetA.%Self.as_type.loc13_11.1 (%Self.as_type.7f2) = value_param call_param0 // CHECK:STDOUT: %.loc13_11.1: type = splice_block %.loc13_11.2 [symbolic = %Self.as_type.loc13_11.1 (constants.%Self.as_type.7f2)] { // CHECK:STDOUT: %Self.ref: %Transitive.type = name_ref Self, @Transitive.%Self [symbolic = %Self (constants.%Self.77c)] @@ -501,15 +501,15 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %.loc13_11.2: type = converted %Self.ref, %Self.as_type.loc13_11.2 [symbolic = %Self.as_type.loc13_11.1 (constants.%Self.as_type.7f2)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @Transitive.WithSelf.GetA.%Self.as_type.loc13_11.1 (%Self.as_type.7f2) = wrapper_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @Transitive.WithSelf.GetA.%as_type (%as_type.d30) = out_param call_param1 -// CHECK:STDOUT: %return: ref @Transitive.WithSelf.GetA.%as_type (%as_type.d30) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @Transitive.WithSelf.GetA.%as_type (%as_type.e89) = out_param call_param1 +// CHECK:STDOUT: %return: ref @Transitive.WithSelf.GetA.%as_type (%as_type.e89) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc3: %Transitive.assoc_type = assoc_entity element3, %Transitive.WithSelf.GetA.decl [concrete = constants.%assoc3] // CHECK:STDOUT: %Transitive.WithSelf.TakesC.decl: @Transitive.WithSelf.%Transitive.WithSelf.TakesC.type (%Transitive.WithSelf.TakesC.type) = fn_decl @Transitive.WithSelf.TakesC [symbolic = @Transitive.WithSelf.%Transitive.WithSelf.TakesC (constants.%Transitive.WithSelf.TakesC)] { // CHECK:STDOUT: %self.param_patt.loc14_13.1: @Transitive.WithSelf.TakesC.%pattern_type.loc14_13 (%pattern_type.b5c) = value_param_pattern [symbolic = %self.param_patt.loc14_13.2 (constants.%self.param_patt.ae9)] // CHECK:STDOUT: %self.patt.loc14_13.1: @Transitive.WithSelf.TakesC.%pattern_type.loc14_13 (%pattern_type.b5c) = wrapper_binding_pattern self, %self.param_patt.loc14_13.1 [symbolic = %self.patt.loc14_13.2 (constants.%self.patt.03f)] -// CHECK:STDOUT: %c.param_patt.loc14_20.1: @Transitive.WithSelf.TakesC.%pattern_type.loc14_20 (%pattern_type.007) = value_param_pattern [symbolic = %c.param_patt.loc14_20.2 (constants.%c.param_patt)] -// CHECK:STDOUT: %c.patt.loc14_20.1: @Transitive.WithSelf.TakesC.%pattern_type.loc14_20 (%pattern_type.007) = wrapper_binding_pattern c, %c.param_patt.loc14_20.1 [symbolic = %c.patt.loc14_20.2 (constants.%c.patt)] +// CHECK:STDOUT: %c.param_patt.loc14_20.1: @Transitive.WithSelf.TakesC.%pattern_type.loc14_20 (%pattern_type.95b) = value_param_pattern [symbolic = %c.param_patt.loc14_20.2 (constants.%c.param_patt)] +// CHECK:STDOUT: %c.patt.loc14_20.1: @Transitive.WithSelf.TakesC.%pattern_type.loc14_20 (%pattern_type.95b) = wrapper_binding_pattern c, %c.param_patt.loc14_20.1 [symbolic = %c.patt.loc14_20.2 (constants.%c.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: @Transitive.WithSelf.TakesC.%Self.as_type.loc14_13.1 (%Self.as_type.7f2) = value_param call_param0 // CHECK:STDOUT: %.loc14_13.1: type = splice_block %.loc14_13.2 [symbolic = %Self.as_type.loc14_13.1 (constants.%Self.as_type.7f2)] { @@ -518,30 +518,30 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %.loc14_13.2: type = converted %Self.ref, %Self.as_type.loc14_13.2 [symbolic = %Self.as_type.loc14_13.1 (constants.%Self.as_type.7f2)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @Transitive.WithSelf.TakesC.%Self.as_type.loc14_13.1 (%Self.as_type.7f2) = wrapper_binding self, %self.param -// CHECK:STDOUT: %c.param: @Transitive.WithSelf.TakesC.%as_type (%as_type.472) = value_param call_param1 -// CHECK:STDOUT: %.loc14_22.1: type = splice_block %.loc14_22.2 [symbolic = %as_type (constants.%as_type.472)] { -// CHECK:STDOUT: %impl.elem2.loc14_22.2: %facet_type.4c8 = impl_witness_access constants.%Transitive.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc14_22.1 (constants.%impl.elem2)] -// CHECK:STDOUT: %C.ref: %facet_type.4c8 = name_ref C, %impl.elem2.loc14_22.2 [symbolic = %impl.elem2.loc14_22.1 (constants.%impl.elem2)] -// CHECK:STDOUT: %C.as_type: type = facet_access_type %C.ref [symbolic = %as_type (constants.%as_type.472)] -// CHECK:STDOUT: %.loc14_22.2: type = converted %C.ref, %C.as_type [symbolic = %as_type (constants.%as_type.472)] +// CHECK:STDOUT: %c.param: @Transitive.WithSelf.TakesC.%as_type (%as_type.95b) = value_param call_param1 +// CHECK:STDOUT: %.loc14_22.1: type = splice_block %.loc14_22.2 [symbolic = %as_type (constants.%as_type.95b)] { +// CHECK:STDOUT: %impl.elem2.loc14_22.2: %facet_type.afd = impl_witness_access constants.%Transitive.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc14_22.1 (constants.%impl.elem2)] +// CHECK:STDOUT: %C.ref: %facet_type.afd = name_ref C, %impl.elem2.loc14_22.2 [symbolic = %impl.elem2.loc14_22.1 (constants.%impl.elem2)] +// CHECK:STDOUT: %C.as_type: type = facet_access_type %C.ref [symbolic = %as_type (constants.%as_type.95b)] +// CHECK:STDOUT: %.loc14_22.2: type = converted %C.ref, %C.as_type [symbolic = %as_type (constants.%as_type.95b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %c: @Transitive.WithSelf.TakesC.%as_type (%as_type.472) = wrapper_binding c, %c.param +// CHECK:STDOUT: %c: @Transitive.WithSelf.TakesC.%as_type (%as_type.95b) = wrapper_binding c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc4: %Transitive.assoc_type = assoc_entity element4, %Transitive.WithSelf.TakesC.decl [concrete = constants.%assoc4] -// CHECK:STDOUT: %impl.elem0.loc16: %facet_type.b1b = impl_witness_access constants.%Transitive.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10 (constants.%impl.elem0.b02)] -// CHECK:STDOUT: %A.ref: %facet_type.b1b = name_ref A, %impl.elem0.loc16 [symbolic = %impl.elem0.loc10 (constants.%impl.elem0.b02)] -// CHECK:STDOUT: %impl.elem1.loc16: %facet_type.130 = impl_witness_access constants.%Transitive.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11 (constants.%impl.elem1.1d6)] -// CHECK:STDOUT: %B.ref: %facet_type.130 = name_ref B, %impl.elem1.loc16 [symbolic = %impl.elem1.loc11 (constants.%impl.elem1.1d6)] -// CHECK:STDOUT: %B.as_type.loc16_16.1: type = facet_access_type %B.ref [symbolic = %as_type.loc16_16 (constants.%as_type.aed)] -// CHECK:STDOUT: %.loc16_16.1: type = converted %B.ref, %B.as_type.loc16_16.1 [symbolic = %as_type.loc16_16 (constants.%as_type.aed)] -// CHECK:STDOUT: %A.as_type: type = facet_access_type %A.ref [symbolic = %as_type.loc16_11 (constants.%as_type.d30)] -// CHECK:STDOUT: %.loc16_11: type = converted %A.ref, %A.as_type [symbolic = %as_type.loc16_11 (constants.%as_type.d30)] -// CHECK:STDOUT: %impl.elem2.loc16_21.1: %facet_type.4c8 = impl_witness_access constants.%Transitive.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc16_21.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %C.ref: %facet_type.4c8 = name_ref C, %impl.elem2.loc16_21.1 [symbolic = %impl.elem2.loc16_21.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %C.as_type: type = facet_access_type %C.ref [symbolic = %as_type.loc16_21 (constants.%as_type.472)] -// CHECK:STDOUT: %.loc16_21: type = converted %C.ref, %C.as_type [symbolic = %as_type.loc16_21 (constants.%as_type.472)] -// CHECK:STDOUT: %B.as_type.loc16_16.2: type = facet_access_type %B.ref [symbolic = %as_type.loc16_16 (constants.%as_type.aed)] -// CHECK:STDOUT: %.loc16_16.2: type = converted %B.ref, %B.as_type.loc16_16.2 [symbolic = %as_type.loc16_16 (constants.%as_type.aed)] +// CHECK:STDOUT: %impl.elem0.loc16: %facet_type.6ce = impl_witness_access constants.%Transitive.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10 (constants.%impl.elem0)] +// CHECK:STDOUT: %A.ref: %facet_type.6ce = name_ref A, %impl.elem0.loc16 [symbolic = %impl.elem0.loc10 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem1.loc16: %facet_type.40a = impl_witness_access constants.%Transitive.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11 (constants.%impl.elem1)] +// CHECK:STDOUT: %B.ref: %facet_type.40a = name_ref B, %impl.elem1.loc16 [symbolic = %impl.elem1.loc11 (constants.%impl.elem1)] +// CHECK:STDOUT: %B.as_type.loc16_16.1: type = facet_access_type %B.ref [symbolic = %as_type.loc16_16 (constants.%as_type.a97)] +// CHECK:STDOUT: %.loc16_16.1: type = converted %B.ref, %B.as_type.loc16_16.1 [symbolic = %as_type.loc16_16 (constants.%as_type.a97)] +// CHECK:STDOUT: %A.as_type: type = facet_access_type %A.ref [symbolic = %as_type.loc16_11 (constants.%as_type.e89)] +// CHECK:STDOUT: %.loc16_11: type = converted %A.ref, %A.as_type [symbolic = %as_type.loc16_11 (constants.%as_type.e89)] +// CHECK:STDOUT: %impl.elem2.loc16_21.1: %facet_type.afd = impl_witness_access constants.%Transitive.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc16_21.2 (constants.%impl.elem2)] +// CHECK:STDOUT: %C.ref: %facet_type.afd = name_ref C, %impl.elem2.loc16_21.1 [symbolic = %impl.elem2.loc16_21.2 (constants.%impl.elem2)] +// CHECK:STDOUT: %C.as_type: type = facet_access_type %C.ref [symbolic = %as_type.loc16_21 (constants.%as_type.95b)] +// CHECK:STDOUT: %.loc16_21: type = converted %C.ref, %C.as_type [symbolic = %as_type.loc16_21 (constants.%as_type.95b)] +// CHECK:STDOUT: %B.as_type.loc16_16.2: type = facet_access_type %B.ref [symbolic = %as_type.loc16_16 (constants.%as_type.a97)] +// CHECK:STDOUT: %.loc16_16.2: type = converted %B.ref, %B.as_type.loc16_16.2 [symbolic = %as_type.loc16_16 (constants.%as_type.a97)] // CHECK:STDOUT: %Transitive.observe.decl = observe_decl @Transitive.observe [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -563,7 +563,7 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: @Transitive.observe { -// CHECK:STDOUT: observe constants.%impl.elem0.b02 == constants.%impl.elem1.1d6 == constants.%impl.elem2 +// CHECK:STDOUT: observe constants.%impl.elem0 == constants.%impl.elem1 == constants.%impl.elem2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -574,14 +574,14 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %self.param_patt.loc13_11.2: @Transitive.WithSelf.GetA.%pattern_type.loc13_11 (%pattern_type.b5c) = value_param_pattern [symbolic = %self.param_patt.loc13_11.2 (constants.%self.param_patt.ae9)] // CHECK:STDOUT: %self.patt.loc13_11.2: @Transitive.WithSelf.GetA.%pattern_type.loc13_11 (%pattern_type.b5c) = wrapper_binding_pattern self, %self.param_patt.loc13_11.2 [symbolic = %self.patt.loc13_11.2 (constants.%self.patt.03f)] // CHECK:STDOUT: %Transitive.lookup_impl_witness: = lookup_impl_witness %Self, @Transitive [symbolic = %Transitive.lookup_impl_witness (constants.%Transitive.lookup_impl_witness)] -// CHECK:STDOUT: %impl.elem0.loc13_20.1: %facet_type.b1b = impl_witness_access %Transitive.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_20.1 (constants.%impl.elem0.b02)] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc13_20.1 [symbolic = %as_type (constants.%as_type.d30)] -// CHECK:STDOUT: %.loc13_20.1: Core.Form = init_form %as_type [symbolic = %.loc13_20.1 (constants.%.117)] -// CHECK:STDOUT: %pattern_type.loc13_20: type = pattern_type %as_type [symbolic = %pattern_type.loc13_20 (constants.%pattern_type.51a)] -// CHECK:STDOUT: %return.param_patt.loc13_20.2: @Transitive.WithSelf.GetA.%pattern_type.loc13_20 (%pattern_type.51a) = out_param_pattern [symbolic = %return.param_patt.loc13_20.2 (constants.%return.param_patt.931)] -// CHECK:STDOUT: %return.patt.loc13_17.2: @Transitive.WithSelf.GetA.%pattern_type.loc13_20 (%pattern_type.51a) = return_slot_pattern %return.param_patt.loc13_20.2, %as_type [symbolic = %return.patt.loc13_17.2 (constants.%return.patt.680)] +// CHECK:STDOUT: %impl.elem0.loc13_20.1: %facet_type.6ce = impl_witness_access %Transitive.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_20.1 (constants.%impl.elem0)] +// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc13_20.1 [symbolic = %as_type (constants.%as_type.e89)] +// CHECK:STDOUT: %.loc13_20.1: Core.Form = init_form %as_type [symbolic = %.loc13_20.1 (constants.%.33f)] +// CHECK:STDOUT: %pattern_type.loc13_20: type = pattern_type %as_type [symbolic = %pattern_type.loc13_20 (constants.%pattern_type.46d)] +// CHECK:STDOUT: %return.param_patt.loc13_20.2: @Transitive.WithSelf.GetA.%pattern_type.loc13_20 (%pattern_type.46d) = out_param_pattern [symbolic = %return.param_patt.loc13_20.2 (constants.%return.param_patt.758)] +// CHECK:STDOUT: %return.patt.loc13_17.2: @Transitive.WithSelf.GetA.%pattern_type.loc13_20 (%pattern_type.46d) = return_slot_pattern %return.param_patt.loc13_20.2, %as_type [symbolic = %return.patt.loc13_17.2 (constants.%return.patt.917)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Transitive.WithSelf.GetA.%Self.as_type.loc13_11.1 (%Self.as_type.7f2)) -> out %return.param: @Transitive.WithSelf.GetA.%as_type (%as_type.d30); +// CHECK:STDOUT: fn(%self.param: @Transitive.WithSelf.GetA.%Self.as_type.loc13_11.1 (%Self.as_type.7f2)) -> out %return.param: @Transitive.WithSelf.GetA.%as_type (%as_type.e89); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Transitive.WithSelf.TakesC(@Transitive.%Self: %Transitive.type) { @@ -591,13 +591,13 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %self.param_patt.loc14_13.2: @Transitive.WithSelf.TakesC.%pattern_type.loc14_13 (%pattern_type.b5c) = value_param_pattern [symbolic = %self.param_patt.loc14_13.2 (constants.%self.param_patt.ae9)] // CHECK:STDOUT: %self.patt.loc14_13.2: @Transitive.WithSelf.TakesC.%pattern_type.loc14_13 (%pattern_type.b5c) = wrapper_binding_pattern self, %self.param_patt.loc14_13.2 [symbolic = %self.patt.loc14_13.2 (constants.%self.patt.03f)] // CHECK:STDOUT: %Transitive.lookup_impl_witness: = lookup_impl_witness %Self, @Transitive [symbolic = %Transitive.lookup_impl_witness (constants.%Transitive.lookup_impl_witness)] -// CHECK:STDOUT: %impl.elem2.loc14_22.1: %facet_type.4c8 = impl_witness_access %Transitive.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc14_22.1 (constants.%impl.elem2)] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem2.loc14_22.1 [symbolic = %as_type (constants.%as_type.472)] -// CHECK:STDOUT: %pattern_type.loc14_20: type = pattern_type %as_type [symbolic = %pattern_type.loc14_20 (constants.%pattern_type.007)] -// CHECK:STDOUT: %c.param_patt.loc14_20.2: @Transitive.WithSelf.TakesC.%pattern_type.loc14_20 (%pattern_type.007) = value_param_pattern [symbolic = %c.param_patt.loc14_20.2 (constants.%c.param_patt)] -// CHECK:STDOUT: %c.patt.loc14_20.2: @Transitive.WithSelf.TakesC.%pattern_type.loc14_20 (%pattern_type.007) = wrapper_binding_pattern c, %c.param_patt.loc14_20.2 [symbolic = %c.patt.loc14_20.2 (constants.%c.patt)] +// CHECK:STDOUT: %impl.elem2.loc14_22.1: %facet_type.afd = impl_witness_access %Transitive.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc14_22.1 (constants.%impl.elem2)] +// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem2.loc14_22.1 [symbolic = %as_type (constants.%as_type.95b)] +// CHECK:STDOUT: %pattern_type.loc14_20: type = pattern_type %as_type [symbolic = %pattern_type.loc14_20 (constants.%pattern_type.95b)] +// CHECK:STDOUT: %c.param_patt.loc14_20.2: @Transitive.WithSelf.TakesC.%pattern_type.loc14_20 (%pattern_type.95b) = value_param_pattern [symbolic = %c.param_patt.loc14_20.2 (constants.%c.param_patt)] +// CHECK:STDOUT: %c.patt.loc14_20.2: @Transitive.WithSelf.TakesC.%pattern_type.loc14_20 (%pattern_type.95b) = wrapper_binding_pattern c, %c.param_patt.loc14_20.2 [symbolic = %c.patt.loc14_20.2 (constants.%c.patt)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Transitive.WithSelf.TakesC.%Self.as_type.loc14_13.1 (%Self.as_type.7f2), %c.param: @Transitive.WithSelf.TakesC.%as_type (%as_type.472)); +// CHECK:STDOUT: fn(%self.param: @Transitive.WithSelf.TakesC.%Self.as_type.loc14_13.1 (%Self.as_type.7f2), %c.param: @Transitive.WithSelf.TakesC.%as_type (%as_type.95b)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Transitive.WithSelf(constants.%Self.77c) {} @@ -609,12 +609,12 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %self.param_patt.loc13_11.2 => constants.%self.param_patt.ae9 // CHECK:STDOUT: %self.patt.loc13_11.2 => constants.%self.patt.03f // CHECK:STDOUT: %Transitive.lookup_impl_witness => constants.%Transitive.lookup_impl_witness -// CHECK:STDOUT: %impl.elem0.loc13_20.1 => constants.%impl.elem0.b02 -// CHECK:STDOUT: %as_type => constants.%as_type.d30 -// CHECK:STDOUT: %.loc13_20.1 => constants.%.117 -// CHECK:STDOUT: %pattern_type.loc13_20 => constants.%pattern_type.51a -// CHECK:STDOUT: %return.param_patt.loc13_20.2 => constants.%return.param_patt.931 -// CHECK:STDOUT: %return.patt.loc13_17.2 => constants.%return.patt.680 +// CHECK:STDOUT: %impl.elem0.loc13_20.1 => constants.%impl.elem0 +// CHECK:STDOUT: %as_type => constants.%as_type.e89 +// CHECK:STDOUT: %.loc13_20.1 => constants.%.33f +// CHECK:STDOUT: %pattern_type.loc13_20 => constants.%pattern_type.46d +// CHECK:STDOUT: %return.param_patt.loc13_20.2 => constants.%return.param_patt.758 +// CHECK:STDOUT: %return.patt.loc13_17.2 => constants.%return.patt.917 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Transitive.WithSelf.TakesC(constants.%Self.77c) { @@ -625,8 +625,8 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %self.patt.loc14_13.2 => constants.%self.patt.03f // CHECK:STDOUT: %Transitive.lookup_impl_witness => constants.%Transitive.lookup_impl_witness // CHECK:STDOUT: %impl.elem2.loc14_22.1 => constants.%impl.elem2 -// CHECK:STDOUT: %as_type => constants.%as_type.472 -// CHECK:STDOUT: %pattern_type.loc14_20 => constants.%pattern_type.007 +// CHECK:STDOUT: %as_type => constants.%as_type.95b +// CHECK:STDOUT: %pattern_type.loc14_20 => constants.%pattern_type.95b // CHECK:STDOUT: %c.param_patt.loc14_20.2 => constants.%c.param_patt // CHECK:STDOUT: %c.patt.loc14_20.2 => constants.%c.patt // CHECK:STDOUT: } @@ -999,23 +999,23 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %I.generic: %I.type.335 = struct_value () [concrete] // CHECK:STDOUT: %I.type.414: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self.c6a: %I.type.414 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %facet_type.208: type = facet_type <@B & @Destroy where TODO> [concrete] +// CHECK:STDOUT: %facet_type.dee: type = facet_type <@B & @Destroy where TODO> [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %assoc0.6a9: %I.assoc_type = assoc_entity element0, @I.WithSelf.%U [symbolic] +// CHECK:STDOUT: %assoc0.9cc: %I.assoc_type = assoc_entity element0, @I.WithSelf.%U [symbolic] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self.c6a, @I, @I(%T) [symbolic] -// CHECK:STDOUT: %impl.elem0.87a: %facet_type.208 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %facet_type.392: type = facet_type <@C & @Destroy where TODO> [concrete] +// CHECK:STDOUT: %impl.elem0: %facet_type.dee = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %facet_type.93f: type = facet_type <@C & @Destroy where TODO> [concrete] // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.WithSelf.%V [symbolic] // CHECK:STDOUT: %Self.as_type.a01: type = facet_access_type %Self.c6a [symbolic] // CHECK:STDOUT: %pattern_type.4f3: type = pattern_type %Self.as_type.a01 [symbolic] // CHECK:STDOUT: %self.param_patt.dbe: %pattern_type.4f3 = value_param_pattern [symbolic] // CHECK:STDOUT: %self.patt.e5a: %pattern_type.4f3 = wrapper_binding_pattern self, %self.param_patt.dbe [symbolic] -// CHECK:STDOUT: %impl.elem1.6d1: %facet_type.392 = impl_witness_access %I.lookup_impl_witness, element1 [symbolic] -// CHECK:STDOUT: %as_type.eff: type = facet_access_type %impl.elem1.6d1 [symbolic] -// CHECK:STDOUT: %.bf8: Core.Form = init_form %as_type.eff [symbolic] -// CHECK:STDOUT: %pattern_type.5ec: type = pattern_type %as_type.eff [symbolic] -// CHECK:STDOUT: %return.param_patt.e69: %pattern_type.5ec = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.f75: %pattern_type.5ec = return_slot_pattern %return.param_patt.e69, %as_type.eff [symbolic] +// CHECK:STDOUT: %impl.elem1: %facet_type.93f = impl_witness_access %I.lookup_impl_witness, element1 [symbolic] +// CHECK:STDOUT: %as_type.05f: type = facet_access_type %impl.elem1 [symbolic] +// CHECK:STDOUT: %.e19: Core.Form = init_form %as_type.05f [symbolic] +// CHECK:STDOUT: %pattern_type.c84: type = pattern_type %as_type.05f [symbolic] +// CHECK:STDOUT: %return.param_patt.3e7: %pattern_type.c84 = out_param_pattern [symbolic] +// CHECK:STDOUT: %return.patt.140: %pattern_type.c84 = return_slot_pattern %return.param_patt.3e7, %as_type.05f [symbolic] // CHECK:STDOUT: %I.WithSelf.GetV.type: type = fn_type @I.WithSelf.GetV, @I.WithSelf(%T, %Self.c6a) [symbolic] // CHECK:STDOUT: %I.WithSelf.GetV: %I.WithSelf.GetV.type = struct_value () [symbolic] // CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.WithSelf.%I.WithSelf.GetV.decl [symbolic] @@ -1026,7 +1026,7 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %I.WithSelf.TakesT.type: type = fn_type @I.WithSelf.TakesT, @I.WithSelf(%T, %Self.c6a) [symbolic] // CHECK:STDOUT: %I.WithSelf.TakesT: %I.WithSelf.TakesT.type = struct_value () [symbolic] // CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.WithSelf.%I.WithSelf.TakesT.decl [symbolic] -// CHECK:STDOUT: %as_type.4fe: type = facet_access_type %impl.elem0.87a [symbolic] +// CHECK:STDOUT: %as_type.a64: type = facet_access_type %impl.elem0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1054,23 +1054,23 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %I.WithSelf.decl = interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !with Self: -// CHECK:STDOUT: %U: %facet_type.208 = assoc_const_decl @U [concrete] { -// CHECK:STDOUT: %assoc0: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element0, @I.WithSelf.%U [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.6a9)] +// CHECK:STDOUT: %U: %facet_type.dee = assoc_const_decl @U [concrete] { +// CHECK:STDOUT: %assoc0: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element0, @I.WithSelf.%U [symbolic = @I.WithSelf.%assoc0 (constants.%assoc0.9cc)] // CHECK:STDOUT: } -// CHECK:STDOUT: %V: %facet_type.392 = assoc_const_decl @V [concrete] { +// CHECK:STDOUT: %V: %facet_type.93f = assoc_const_decl @V [concrete] { // CHECK:STDOUT: %assoc1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element1, @I.WithSelf.%V [symbolic = @I.WithSelf.%assoc1 (constants.%assoc1)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.WithSelf.GetV.decl: @I.WithSelf.%I.WithSelf.GetV.type (%I.WithSelf.GetV.type) = fn_decl @I.WithSelf.GetV [symbolic = @I.WithSelf.%I.WithSelf.GetV (constants.%I.WithSelf.GetV)] { // CHECK:STDOUT: %self.param_patt.loc11_11.1: @I.WithSelf.GetV.%pattern_type.loc11_11 (%pattern_type.4f3) = value_param_pattern [symbolic = %self.param_patt.loc11_11.2 (constants.%self.param_patt.dbe)] // CHECK:STDOUT: %self.patt.loc11_11.1: @I.WithSelf.GetV.%pattern_type.loc11_11 (%pattern_type.4f3) = wrapper_binding_pattern self, %self.param_patt.loc11_11.1 [symbolic = %self.patt.loc11_11.2 (constants.%self.patt.e5a)] -// CHECK:STDOUT: %return.param_patt.loc11_20.1: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.5ec) = out_param_pattern [symbolic = %return.param_patt.loc11_20.2 (constants.%return.param_patt.e69)] -// CHECK:STDOUT: %return.patt.loc11_17.1: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.5ec) = return_slot_pattern %return.param_patt.loc11_20.1, %.loc11_20.2 [symbolic = %return.patt.loc11_17.2 (constants.%return.patt.f75)] +// CHECK:STDOUT: %return.param_patt.loc11_20.1: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.c84) = out_param_pattern [symbolic = %return.param_patt.loc11_20.2 (constants.%return.param_patt.3e7)] +// CHECK:STDOUT: %return.patt.loc11_17.1: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.c84) = return_slot_pattern %return.param_patt.loc11_20.1, %.loc11_20.2 [symbolic = %return.patt.loc11_17.2 (constants.%return.patt.140)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %impl.elem1.loc11_20.2: %facet_type.392 = impl_witness_access constants.%I.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_20.1 (constants.%impl.elem1.6d1)] -// CHECK:STDOUT: %V.ref: %facet_type.392 = name_ref V, %impl.elem1.loc11_20.2 [symbolic = %impl.elem1.loc11_20.1 (constants.%impl.elem1.6d1)] -// CHECK:STDOUT: %V.as_type: type = facet_access_type %V.ref [symbolic = %as_type (constants.%as_type.eff)] -// CHECK:STDOUT: %.loc11_20.2: type = converted %V.ref, %V.as_type [symbolic = %as_type (constants.%as_type.eff)] -// CHECK:STDOUT: %.loc11_20.3: Core.Form = init_form %.loc11_20.2 [symbolic = %.loc11_20.1 (constants.%.bf8)] +// CHECK:STDOUT: %impl.elem1.loc11_20.2: %facet_type.93f = impl_witness_access constants.%I.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_20.1 (constants.%impl.elem1)] +// CHECK:STDOUT: %V.ref: %facet_type.93f = name_ref V, %impl.elem1.loc11_20.2 [symbolic = %impl.elem1.loc11_20.1 (constants.%impl.elem1)] +// CHECK:STDOUT: %V.as_type: type = facet_access_type %V.ref [symbolic = %as_type (constants.%as_type.05f)] +// CHECK:STDOUT: %.loc11_20.2: type = converted %V.ref, %V.as_type [symbolic = %as_type (constants.%as_type.05f)] +// CHECK:STDOUT: %.loc11_20.3: Core.Form = init_form %.loc11_20.2 [symbolic = %.loc11_20.1 (constants.%.e19)] // CHECK:STDOUT: %self.param: @I.WithSelf.GetV.%Self.as_type.loc11_11.1 (%Self.as_type.a01) = value_param call_param0 // CHECK:STDOUT: %.loc11_11.1: type = splice_block %.loc11_11.3 [symbolic = %Self.as_type.loc11_11.1 (constants.%Self.as_type.a01)] { // CHECK:STDOUT: %.loc11_11.2: @I.WithSelf.GetV.%I.type (%I.type.414) = specific_constant @I.%Self.loc7_19.1, @I(constants.%T) [symbolic = %Self (constants.%Self.c6a)] @@ -1079,8 +1079,8 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %.loc11_11.3: type = converted %Self.ref, %Self.as_type.loc11_11.2 [symbolic = %Self.as_type.loc11_11.1 (constants.%Self.as_type.a01)] // CHECK:STDOUT: } // CHECK:STDOUT: %self: @I.WithSelf.GetV.%Self.as_type.loc11_11.1 (%Self.as_type.a01) = wrapper_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @I.WithSelf.GetV.%as_type (%as_type.eff) = out_param call_param1 -// CHECK:STDOUT: %return: ref @I.WithSelf.GetV.%as_type (%as_type.eff) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @I.WithSelf.GetV.%as_type (%as_type.05f) = out_param call_param1 +// CHECK:STDOUT: %return: ref @I.WithSelf.GetV.%as_type (%as_type.05f) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc2.loc11_21.1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element2, %I.WithSelf.GetV.decl [symbolic = %assoc2.loc11_21.2 (constants.%assoc2)] // CHECK:STDOUT: %I.WithSelf.TakesT.decl: @I.WithSelf.%I.WithSelf.TakesT.type (%I.WithSelf.TakesT.type) = fn_decl @I.WithSelf.TakesT [symbolic = @I.WithSelf.%I.WithSelf.TakesT (constants.%I.WithSelf.TakesT)] { @@ -1109,18 +1109,18 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %assoc3.loc12_24.1: @I.WithSelf.%I.assoc_type (%I.assoc_type) = assoc_entity element3, %I.WithSelf.TakesT.decl [symbolic = %assoc3.loc12_24.2 (constants.%assoc3)] // CHECK:STDOUT: %.loc14_11.1: %A.type = specific_constant @I.%T.loc7_14.2, @I(constants.%T) [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.ref: %A.type = name_ref T, %.loc14_11.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %impl.elem0.loc14: %facet_type.208 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9 (constants.%impl.elem0.87a)] -// CHECK:STDOUT: %U.ref: %facet_type.208 = name_ref U, %impl.elem0.loc14 [symbolic = %impl.elem0.loc9 (constants.%impl.elem0.87a)] -// CHECK:STDOUT: %U.as_type.loc14_16.1: type = facet_access_type %U.ref [symbolic = %as_type.loc14_16 (constants.%as_type.4fe)] -// CHECK:STDOUT: %.loc14_16.1: type = converted %U.ref, %U.as_type.loc14_16.1 [symbolic = %as_type.loc14_16 (constants.%as_type.4fe)] +// CHECK:STDOUT: %impl.elem0.loc14: %facet_type.dee = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9 (constants.%impl.elem0)] +// CHECK:STDOUT: %U.ref: %facet_type.dee = name_ref U, %impl.elem0.loc14 [symbolic = %impl.elem0.loc9 (constants.%impl.elem0)] +// CHECK:STDOUT: %U.as_type.loc14_16.1: type = facet_access_type %U.ref [symbolic = %as_type.loc14_16 (constants.%as_type.a64)] +// CHECK:STDOUT: %.loc14_16.1: type = converted %U.ref, %U.as_type.loc14_16.1 [symbolic = %as_type.loc14_16 (constants.%as_type.a64)] // CHECK:STDOUT: %T.as_type.loc14_11.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc14_11.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc14_11.2: type = converted %T.ref, %T.as_type.loc14_11.1 [symbolic = %T.as_type.loc14_11.2 (constants.%T.as_type)] -// CHECK:STDOUT: %impl.elem1.loc14_21.1: %facet_type.392 = impl_witness_access constants.%I.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc14_21.2 (constants.%impl.elem1.6d1)] -// CHECK:STDOUT: %V.ref: %facet_type.392 = name_ref V, %impl.elem1.loc14_21.1 [symbolic = %impl.elem1.loc14_21.2 (constants.%impl.elem1.6d1)] -// CHECK:STDOUT: %V.as_type: type = facet_access_type %V.ref [symbolic = %as_type.loc14_21 (constants.%as_type.eff)] -// CHECK:STDOUT: %.loc14_21: type = converted %V.ref, %V.as_type [symbolic = %as_type.loc14_21 (constants.%as_type.eff)] -// CHECK:STDOUT: %U.as_type.loc14_16.2: type = facet_access_type %U.ref [symbolic = %as_type.loc14_16 (constants.%as_type.4fe)] -// CHECK:STDOUT: %.loc14_16.2: type = converted %U.ref, %U.as_type.loc14_16.2 [symbolic = %as_type.loc14_16 (constants.%as_type.4fe)] +// CHECK:STDOUT: %impl.elem1.loc14_21.1: %facet_type.93f = impl_witness_access constants.%I.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc14_21.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %V.ref: %facet_type.93f = name_ref V, %impl.elem1.loc14_21.1 [symbolic = %impl.elem1.loc14_21.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %V.as_type: type = facet_access_type %V.ref [symbolic = %as_type.loc14_21 (constants.%as_type.05f)] +// CHECK:STDOUT: %.loc14_21: type = converted %V.ref, %V.as_type [symbolic = %as_type.loc14_21 (constants.%as_type.05f)] +// CHECK:STDOUT: %U.as_type.loc14_16.2: type = facet_access_type %U.ref [symbolic = %as_type.loc14_16 (constants.%as_type.a64)] +// CHECK:STDOUT: %.loc14_16.2: type = converted %U.ref, %U.as_type.loc14_16.2 [symbolic = %as_type.loc14_16 (constants.%as_type.a64)] // CHECK:STDOUT: %I.observe.decl = observe_decl @I.observe [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -1141,7 +1141,7 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: // CHECK:STDOUT: !observes: // CHECK:STDOUT: @I.observe { -// CHECK:STDOUT: observe constants.%T == constants.%impl.elem0.87a == constants.%impl.elem1.6d1 +// CHECK:STDOUT: observe constants.%T == constants.%impl.elem0 == constants.%impl.elem1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1155,14 +1155,14 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %self.param_patt.loc11_11.2: @I.WithSelf.GetV.%pattern_type.loc11_11 (%pattern_type.4f3) = value_param_pattern [symbolic = %self.param_patt.loc11_11.2 (constants.%self.param_patt.dbe)] // CHECK:STDOUT: %self.patt.loc11_11.2: @I.WithSelf.GetV.%pattern_type.loc11_11 (%pattern_type.4f3) = wrapper_binding_pattern self, %self.param_patt.loc11_11.2 [symbolic = %self.patt.loc11_11.2 (constants.%self.patt.e5a)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self, @I, @I(%T) [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %impl.elem1.loc11_20.1: %facet_type.392 = impl_witness_access %I.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_20.1 (constants.%impl.elem1.6d1)] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem1.loc11_20.1 [symbolic = %as_type (constants.%as_type.eff)] -// CHECK:STDOUT: %.loc11_20.1: Core.Form = init_form %as_type [symbolic = %.loc11_20.1 (constants.%.bf8)] -// CHECK:STDOUT: %pattern_type.loc11_20: type = pattern_type %as_type [symbolic = %pattern_type.loc11_20 (constants.%pattern_type.5ec)] -// CHECK:STDOUT: %return.param_patt.loc11_20.2: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.5ec) = out_param_pattern [symbolic = %return.param_patt.loc11_20.2 (constants.%return.param_patt.e69)] -// CHECK:STDOUT: %return.patt.loc11_17.2: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.5ec) = return_slot_pattern %return.param_patt.loc11_20.2, %as_type [symbolic = %return.patt.loc11_17.2 (constants.%return.patt.f75)] +// CHECK:STDOUT: %impl.elem1.loc11_20.1: %facet_type.93f = impl_witness_access %I.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_20.1 (constants.%impl.elem1)] +// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem1.loc11_20.1 [symbolic = %as_type (constants.%as_type.05f)] +// CHECK:STDOUT: %.loc11_20.1: Core.Form = init_form %as_type [symbolic = %.loc11_20.1 (constants.%.e19)] +// CHECK:STDOUT: %pattern_type.loc11_20: type = pattern_type %as_type [symbolic = %pattern_type.loc11_20 (constants.%pattern_type.c84)] +// CHECK:STDOUT: %return.param_patt.loc11_20.2: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.c84) = out_param_pattern [symbolic = %return.param_patt.loc11_20.2 (constants.%return.param_patt.3e7)] +// CHECK:STDOUT: %return.patt.loc11_17.2: @I.WithSelf.GetV.%pattern_type.loc11_20 (%pattern_type.c84) = return_slot_pattern %return.param_patt.loc11_20.2, %as_type [symbolic = %return.patt.loc11_17.2 (constants.%return.patt.140)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.WithSelf.GetV.%Self.as_type.loc11_11.1 (%Self.as_type.a01)) -> out %return.param: @I.WithSelf.GetV.%as_type (%as_type.eff); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.GetV.%Self.as_type.loc11_11.1 (%Self.as_type.a01)) -> out %return.param: @I.WithSelf.GetV.%as_type (%as_type.05f); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @I.WithSelf.TakesT(@I.%T.loc7_14.2: %A.type, @I.%Self.loc7_19.1: @I.%I.type (%I.type.414)) { @@ -1197,12 +1197,12 @@ fn F[W: A, X: I(W)](x: X) { // CHECK:STDOUT: %self.param_patt.loc11_11.2 => constants.%self.param_patt.dbe // CHECK:STDOUT: %self.patt.loc11_11.2 => constants.%self.patt.e5a // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness -// CHECK:STDOUT: %impl.elem1.loc11_20.1 => constants.%impl.elem1.6d1 -// CHECK:STDOUT: %as_type => constants.%as_type.eff -// CHECK:STDOUT: %.loc11_20.1 => constants.%.bf8 -// CHECK:STDOUT: %pattern_type.loc11_20 => constants.%pattern_type.5ec -// CHECK:STDOUT: %return.param_patt.loc11_20.2 => constants.%return.param_patt.e69 -// CHECK:STDOUT: %return.patt.loc11_17.2 => constants.%return.patt.f75 +// CHECK:STDOUT: %impl.elem1.loc11_20.1 => constants.%impl.elem1 +// CHECK:STDOUT: %as_type => constants.%as_type.05f +// CHECK:STDOUT: %.loc11_20.1 => constants.%.e19 +// CHECK:STDOUT: %pattern_type.loc11_20 => constants.%pattern_type.c84 +// CHECK:STDOUT: %return.param_patt.loc11_20.2 => constants.%return.param_patt.3e7 +// CHECK:STDOUT: %return.patt.loc11_17.2 => constants.%return.patt.140 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I.WithSelf.TakesT(constants.%T, constants.%Self.c6a) { diff --git a/toolchain/check/testdata/interop/cpp/basics/import/indirect.carbon b/toolchain/check/testdata/interop/cpp/basics/import/indirect.carbon index 61c772615e43..95ad68500ca9 100644 --- a/toolchain/check/testdata/interop/cpp/basics/import/indirect.carbon +++ b/toolchain/check/testdata/interop/cpp/basics/import/indirect.carbon @@ -150,7 +150,6 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] -// CHECK:STDOUT: %pattern_type.88a: type = pattern_type %X [concrete] // CHECK:STDOUT: %X.elem: type = unbound_element_type %X, %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] @@ -162,14 +161,17 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %self.param_patt.d52: %pattern_type.88a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b78: %pattern_type.88a = wrapper_binding_pattern self, %self.param_patt.d52 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %X.cpp_destructor.type: type = fn_type @X.cpp_destructor [concrete] // CHECK:STDOUT: %X.cpp_destructor: %X.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.4c1: = custom_witness (%X.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.4d5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.4c1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.945: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.4d5) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.945, %custom_witness.4c1) [concrete] // CHECK:STDOUT: %X.g.cpp_overload_set.type: type = cpp_overload_set_type @X.g.cpp_overload_set [concrete] // CHECK:STDOUT: %X.g.cpp_overload_set.value: %X.g.cpp_overload_set.type = cpp_overload_set_value @X.g.cpp_overload_set [concrete] // CHECK:STDOUT: %X.g.type: type = fn_type @X.g [concrete] @@ -180,11 +182,8 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %Main.F: %F.type = import_ref Main//direct_import, F, loaded [concrete = constants.%F] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %X.cpp_destructor.decl: %X.cpp_destructor.type = fn_decl @X.cpp_destructor [concrete = constants.%X.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %X.g.cpp_overload_set.value: %X.g.cpp_overload_set.type = cpp_overload_set_value @X.g.cpp_overload_set [concrete = constants.%X.g.cpp_overload_set.value] // CHECK:STDOUT: %X.g.decl: %X.g.type = fn_decl @X.g [concrete = constants.%X.g] { // CHECK:STDOUT: @@ -193,16 +192,6 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.88a = ref_param_pattern [concrete = constants.%self.param_patt.d52] -// CHECK:STDOUT: %self.patt: %pattern_type.88a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b78] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @Field() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%Main.F [concrete = constants.%F] @@ -217,20 +206,15 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc10_13.2: = bound_method %.loc10_13.2, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc10_13.2(%.loc10_13.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc10_12.2, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc10_12.2) +// CHECK:STDOUT: %Destroy.facet.loc10_12.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.945, constants.%custom_witness.4c1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_12.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc10_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_12.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.945, constants.%custom_witness.4c1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_12.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc10_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc10_12.2) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %X) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %X.cpp_destructor.call: init %empty_tuple.type = call imports.%X.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @Function() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%Main.F [concrete = constants.%F] @@ -241,8 +225,12 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %bound_method: = bound_method %.loc16_12.2, %g.ref // CHECK:STDOUT: %.loc16_12.3: %X = acquire_value %.loc16_12.2 // CHECK:STDOUT: %X.g.call: init %i32 = call imports.%X.g.decl(%.loc16_12.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc16_12.2, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc16_12.2) +// CHECK:STDOUT: %Destroy.facet.loc16_12.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.945, constants.%custom_witness.4c1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_12.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc16_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_12.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.945, constants.%custom_witness.4c1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_12.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc16_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc16_12.2) // CHECK:STDOUT: return %X.g.call // CHECK:STDOUT: } // CHECK:STDOUT: @@ -280,8 +268,6 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %X.g.cpp_overload_set.type: type = cpp_overload_set_type @X.g.cpp_overload_set [concrete] // CHECK:STDOUT: %X.g.cpp_overload_set.value: %X.g.cpp_overload_set.type = cpp_overload_set_value @X.g.cpp_overload_set [concrete] -// CHECK:STDOUT: %self.param_patt.d52: %pattern_type.88a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b78: %pattern_type.88a = wrapper_binding_pattern self, %self.param_patt.d52 [concrete] // CHECK:STDOUT: %X.g.type: type = fn_type @X.g [concrete] // CHECK:STDOUT: %X.g: %X.g.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] @@ -294,12 +280,17 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %X.cpp_destructor.type: type = fn_type @X.cpp_destructor [concrete] // CHECK:STDOUT: %X.cpp_destructor: %X.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.4c1: = custom_witness (%X.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.4d5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.4c1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.945: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.4d5) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.945, %custom_witness.4c1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -319,21 +310,8 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %X.cpp_destructor.decl: %X.cpp_destructor.type = fn_decl @X.cpp_destructor [concrete = constants.%X.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.88a = ref_param_pattern [concrete = constants.%self.param_patt.d52] -// CHECK:STDOUT: %self.patt: %pattern_type.88a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b78] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Use() -> out %return.param: %tuple.type.35f { @@ -379,20 +357,15 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %.loc10_23.3: init %i32 to %tuple.elem1 = in_place_init %X.g.call // CHECK:STDOUT: %.loc10_23.4: init %tuple.type.35f to %return.param = tuple_init (%.loc10_23.2, %.loc10_23.3) // CHECK:STDOUT: %.loc10_24: init %tuple.type.35f = converted %.loc10_23.1, %.loc10_23.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %ax.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%ax.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.945, constants.%custom_witness.4c1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.945, constants.%custom_witness.4c1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%ax.var) // CHECK:STDOUT: return %.loc10_24 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %X) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %X.cpp_destructor.call: init %empty_tuple.type = call imports.%X.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- import_template.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -404,7 +377,6 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %Y.90c: type = class_type @Y.1 [concrete] -// CHECK:STDOUT: %pattern_type.fa7: type = pattern_type %Y.90c [concrete] // CHECK:STDOUT: %Y.elem.9cb: type = unbound_element_type %Y.90c, %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] @@ -416,19 +388,21 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.95d) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %self.param_patt.770: %pattern_type.fa7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4ee: %pattern_type.fa7 = wrapper_binding_pattern self, %self.param_patt.770 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %Y.cpp_destructor.type.0df797.1: type = fn_type @Y.cpp_destructor.1 [concrete] // CHECK:STDOUT: %Y.cpp_destructor.be1864.1: %Y.cpp_destructor.type.0df797.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.4c1ff7.1: = custom_witness (%Y.cpp_destructor.be1864.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a0c: %SubobjectDestroy.type = facet_value %Y.90c, (%custom_witness.4c1ff7.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d3e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a0c) [concrete] +// CHECK:STDOUT: %Destroy.facet.8ad: %Destroy.type = facet_value %Y.90c, (%DestroyImpl.impl_witness.d3e, %custom_witness.4c1ff7.1) [concrete] // CHECK:STDOUT: %Z: type = class_type @Z [concrete] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] // CHECK:STDOUT: %Y.e8d: type = class_type @Y.2 [concrete] -// CHECK:STDOUT: %pattern_type.586: type = pattern_type %Y.e8d [concrete] // CHECK:STDOUT: %Y.elem.9a6: type = unbound_element_type %Y.e8d, %Z [concrete] // CHECK:STDOUT: %Z.Z.type: type = fn_type @Z.Z [concrete] // CHECK:STDOUT: %Z.Z: %Z.Z.type = struct_value () [concrete] @@ -443,14 +417,12 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %Copy.facet.ca1: %Copy.type = facet_value %Z, (%custom_witness.f88) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.983: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.ca1) [concrete] // CHECK:STDOUT: %.3c7: type = fn_type_with_self_type %Copy.WithSelf.Op.type.983, %Copy.facet.ca1 [concrete] -// CHECK:STDOUT: %self.param_patt.c0b: %pattern_type.586 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d1c: %pattern_type.586 = wrapper_binding_pattern self, %self.param_patt.c0b [concrete] // CHECK:STDOUT: %Y.cpp_destructor.type.0df797.2: type = fn_type @Y.cpp_destructor.2 [concrete] // CHECK:STDOUT: %Y.cpp_destructor.be1864.2: %Y.cpp_destructor.type.0df797.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.4c1ff7.2: = custom_witness (%Y.cpp_destructor.be1864.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.285: %SubobjectDestroy.type = facet_value %Y.e8d, (%custom_witness.4c1ff7.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.29e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.285) [concrete] +// CHECK:STDOUT: %Destroy.facet.0ef: %Destroy.type = facet_value %Y.e8d, (%DestroyImpl.impl_witness.29e, %custom_witness.4c1ff7.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -458,11 +430,8 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %Main.H: %H.type = import_ref Main//direct_import, H, loaded [concrete = constants.%H] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Y.cpp_destructor.decl.ab2aab.1: %Y.cpp_destructor.type.0df797.1 = fn_decl @Y.cpp_destructor.1 [concrete = constants.%Y.cpp_destructor.be1864.1] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Z.Z.decl: %Z.Z.type = fn_decl @Z.Z [concrete = constants.%Z.Z] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -473,28 +442,6 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Y.cpp_destructor.decl.ab2aab.2: %Y.cpp_destructor.type.0df797.2 = fn_decl @Y.cpp_destructor.2 [concrete = constants.%Y.cpp_destructor.be1864.2] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fa7 = ref_param_pattern [concrete = constants.%self.param_patt.770] -// CHECK:STDOUT: %self.patt: %pattern_type.fa7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4ee] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y.90c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y.90c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc15 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.586 = ref_param_pattern [concrete = constants.%self.param_patt.c0b] -// CHECK:STDOUT: %self.patt: %pattern_type.586 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d1c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Y.e8d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Y.e8d = wrapper_binding self, %self.param -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Use() -> out %return.param: %i32 { @@ -511,20 +458,15 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_13.2: = bound_method %.loc9_13.2, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc9_13.2(%.loc9_13.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc9_12.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc9_12.2) +// CHECK:STDOUT: %Destroy.facet.loc9_12.1: %Destroy.type = facet_value constants.%Y.90c, (constants.%DestroyImpl.impl_witness.d3e, constants.%custom_witness.4c1ff7.1) [concrete = constants.%Destroy.facet.8ad] +// CHECK:STDOUT: %.loc9_12.3: %Destroy.type = converted constants.%Y.90c, %Destroy.facet.loc9_12.1 [concrete = constants.%Destroy.facet.8ad] +// CHECK:STDOUT: %Destroy.facet.loc9_12.2: %Destroy.type = facet_value constants.%Y.90c, (constants.%DestroyImpl.impl_witness.d3e, constants.%custom_witness.4c1ff7.1) [concrete = constants.%Destroy.facet.8ad] +// CHECK:STDOUT: %.loc9_12.4: %Destroy.type = converted constants.%Y.90c, %Destroy.facet.loc9_12.2 [concrete = constants.%Destroy.facet.8ad] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc9_12.2) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %Y.90c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %Y.90c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Y.cpp_destructor.call: init %empty_tuple.type = call imports.%Y.cpp_destructor.decl.ab2aab.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @UseZ() -> out %return.param: %Z { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %H.ref: %H.type = name_ref H, imports.%Main.H [concrete = constants.%H] @@ -547,17 +489,12 @@ fn UseZ() -> Cpp.A.Z { // CHECK:STDOUT: %addr.loc15_13.2: %ptr.df4 = addr_of %.loc13_19.1 // CHECK:STDOUT: %Z__carbon_thunk.call: init %empty_tuple.type = call imports.%Z__carbon_thunk.decl(%.loc15_13.6, %addr.loc15_13.2) // CHECK:STDOUT: %.loc15_13.7: init %Z to %.loc13_19.1 = mark_in_place_init %Z__carbon_thunk.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc15_12.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc15_12.2) +// CHECK:STDOUT: %Destroy.facet.loc15_12.1: %Destroy.type = facet_value constants.%Y.e8d, (constants.%DestroyImpl.impl_witness.29e, constants.%custom_witness.4c1ff7.2) [concrete = constants.%Destroy.facet.0ef] +// CHECK:STDOUT: %.loc15_12.3: %Destroy.type = converted constants.%Y.e8d, %Destroy.facet.loc15_12.1 [concrete = constants.%Destroy.facet.0ef] +// CHECK:STDOUT: %Destroy.facet.loc15_12.2: %Destroy.type = facet_value constants.%Y.e8d, (constants.%DestroyImpl.impl_witness.29e, constants.%custom_witness.4c1ff7.2) [concrete = constants.%Destroy.facet.0ef] +// CHECK:STDOUT: %.loc15_12.4: %Destroy.type = converted constants.%Y.e8d, %Destroy.facet.loc15_12.2 [concrete = constants.%Destroy.facet.0ef] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_12.2) // CHECK:STDOUT: return %.loc15_13.7 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15(%self.param: ref %Y.e8d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15(%self.param: ref %Y.e8d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Y.cpp_destructor.call: init %empty_tuple.type = call imports.%Y.cpp_destructor.decl.ab2aab.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/class/export/base.carbon b/toolchain/check/testdata/interop/cpp/class/export/base.carbon index 0b0540736d77..25c792a66096 100644 --- a/toolchain/check/testdata/interop/cpp/class/export/base.carbon +++ b/toolchain/check/testdata/interop/cpp/class/export/base.carbon @@ -80,7 +80,8 @@ struct VirtualDestructor { }; '''; -// CHECK:STDERR: fail_abstract.carbon:[[@LINE+2]]:1-34: error: cannot access member of interface `Core.Destroy` in type `AbstractWithVdtor` that does not implement that interface [MissingImplInMemberAccess] +// CHECK:STDERR: fail_abstract.carbon:[[@LINE+3]]:1-34: error: cannot convert type `AbstractWithVdtor` into type implementing `Core.Destroy` [ConversionFailureTypeToFacet] +// CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: abstract class AbstractWithVdtor { extend base: Cpp.VirtualDestructor; @@ -100,9 +101,10 @@ import Cpp; // TODO: Find a way to export this to C++ as an abstract class, despite not // having a vptr. -// CHECK:STDERR: fail_todo_abstract_nonvirtual_dtor.carbon:[[@LINE+4]]:1-39: error: semantics TODO: `exporting abstract class with no abstract methods and non-virtual destructor to C++` [SemanticsTodo] +// CHECK:STDERR: fail_todo_abstract_nonvirtual_dtor.carbon:[[@LINE+5]]:1-39: error: semantics TODO: `exporting abstract class with no abstract methods and non-virtual destructor to C++` [SemanticsTodo] // CHECK:STDERR: -// CHECK:STDERR: fail_todo_abstract_nonvirtual_dtor.carbon:[[@LINE+2]]:1-39: error: cannot access member of interface `Core.Destroy` in type `AbstractNonvirtualDtor` that does not implement that interface [MissingImplInMemberAccess] +// CHECK:STDERR: fail_todo_abstract_nonvirtual_dtor.carbon:[[@LINE+3]]:1-39: error: cannot convert type `AbstractNonvirtualDtor` into type implementing `Core.Destroy` [ConversionFailureTypeToFacet] +// CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: abstract class AbstractNonvirtualDtor {} @@ -118,7 +120,8 @@ import Cpp; // TODO: We should support generating a base subobject destructor for an // abstract class, even though we refuse to generate a complete object // destructor. -// CHECK:STDERR: fail_todo_abstract_nonvirtual_dtor_but_virtual_fns.carbon:[[@LINE+2]]:1-41: error: cannot access member of interface `Core.Destroy` in type `AbstractWithMethodNoVptr` that does not implement that interface [MissingImplInMemberAccess] +// CHECK:STDERR: fail_todo_abstract_nonvirtual_dtor_but_virtual_fns.carbon:[[@LINE+3]]:1-41: error: cannot convert type `AbstractWithMethodNoVptr` into type implementing `Core.Destroy` [ConversionFailureTypeToFacet] +// CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: abstract class AbstractWithMethodNoVptr { abstract fn F(self); @@ -137,7 +140,8 @@ import Cpp; // TODO: We should support generating a base subobject destructor for an // abstract class, even though we refuse to generate a complete object // destructor. -// CHECK:STDERR: fail_variable_with_abstract_method.carbon:[[@LINE+2]]:1-35: error: cannot access member of interface `Core.Destroy` in type `AbstractWithMethod` that does not implement that interface [MissingImplInMemberAccess] +// CHECK:STDERR: fail_variable_with_abstract_method.carbon:[[@LINE+3]]:1-35: error: cannot convert type `AbstractWithMethod` into type implementing `Core.Destroy` [ConversionFailureTypeToFacet] +// CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: abstract class AbstractWithMethod { abstract fn F(self); @@ -158,7 +162,8 @@ import Cpp; // TODO: We should support generating a base subobject destructor for an // abstract class, even though we refuse to generate a complete object // destructor. -// CHECK:STDERR: fail_todo_abstract_method_overridden_in_cpp.carbon:[[@LINE+2]]:1-35: error: cannot access member of interface `Core.Destroy` in type `AbstractToOverride` that does not implement that interface [MissingImplInMemberAccess] +// CHECK:STDERR: fail_todo_abstract_method_overridden_in_cpp.carbon:[[@LINE+3]]:1-35: error: cannot convert type `AbstractToOverride` into type implementing `Core.Destroy` [ConversionFailureTypeToFacet] +// CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: abstract class AbstractToOverride { abstract fn F(ref self); diff --git a/toolchain/check/testdata/interop/cpp/class/import/access.carbon b/toolchain/check/testdata/interop/cpp/class/import/access.carbon index aba3c707eec7..f9c8606724a9 100644 --- a/toolchain/check/testdata/interop/cpp/class/import/access.carbon +++ b/toolchain/check/testdata/interop/cpp/class/import/access.carbon @@ -1550,30 +1550,29 @@ class B { // CHECK:STDOUT: %PublicCall: type = class_type @PublicCall [concrete] // CHECK:STDOUT: %PublicCall.PublicCall.cpp_overload_set.type: type = cpp_overload_set_type @PublicCall.PublicCall.cpp_overload_set [concrete] // CHECK:STDOUT: %PublicCall.PublicCall.cpp_overload_set.value: %PublicCall.PublicCall.cpp_overload_set.type = cpp_overload_set_value @PublicCall.PublicCall.cpp_overload_set [concrete] -// CHECK:STDOUT: %pattern_type.871: type = pattern_type %PublicCall [concrete] // CHECK:STDOUT: %ptr.d0a: type = ptr_type %PublicCall [concrete] // CHECK:STDOUT: %PublicCall__carbon_thunk.type: type = fn_type @PublicCall__carbon_thunk [concrete] // CHECK:STDOUT: %PublicCall__carbon_thunk: %PublicCall__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.60e: type = pattern_type %OverloadSet [concrete] // CHECK:STDOUT: %ptr.4a0: type = ptr_type %OverloadSet [concrete] // CHECK:STDOUT: %OverloadSet__carbon_thunk.type: type = fn_type @OverloadSet__carbon_thunk [concrete] // CHECK:STDOUT: %OverloadSet__carbon_thunk: %OverloadSet__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.add: %pattern_type.60e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.986: %pattern_type.60e = wrapper_binding_pattern self, %self.param_patt.add [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %OverloadSet.cpp_destructor.type: type = fn_type @OverloadSet.cpp_destructor [concrete] // CHECK:STDOUT: %OverloadSet.cpp_destructor: %OverloadSet.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_58 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_58 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ced: %pattern_type.871 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d01: %pattern_type.871 = wrapper_binding_pattern self, %self.param_patt.ced [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%OverloadSet.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9f1: %SubobjectDestroy.type = facet_value %OverloadSet, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.61a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9f1) [concrete] +// CHECK:STDOUT: %Destroy.facet.f72: %Destroy.type = facet_value %OverloadSet, (%DestroyImpl.impl_witness.61a, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %PublicCall.cpp_destructor.type: type = fn_type @PublicCall.cpp_destructor [concrete] // CHECK:STDOUT: %PublicCall.cpp_destructor: %PublicCall.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_57 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_57 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%PublicCall.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f87: %SubobjectDestroy.type = facet_value %PublicCall, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cf8: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f87) [concrete] +// CHECK:STDOUT: %Destroy.facet.85f: %Destroy.type = facet_value %PublicCall, (%DestroyImpl.impl_witness.cf8, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: %OverloadSet.Overload.cpp_overload_set.type: type = cpp_overload_set_type @OverloadSet.Overload.cpp_overload_set [concrete] // CHECK:STDOUT: %OverloadSet.Overload.cpp_overload_set.value: %OverloadSet.Overload.cpp_overload_set.type = cpp_overload_set_value @OverloadSet.Overload.cpp_overload_set [concrete] // CHECK:STDOUT: %Overload__carbon_thunk.type: type = fn_type @Overload__carbon_thunk [concrete] @@ -1600,16 +1599,8 @@ class B { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %OverloadSet.cpp_destructor.decl: %OverloadSet.cpp_destructor.type = fn_decl @OverloadSet.cpp_destructor [concrete = constants.%OverloadSet.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %PublicCall.cpp_destructor.decl: %PublicCall.cpp_destructor.type = fn_decl @PublicCall.cpp_destructor [concrete = constants.%PublicCall.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %OverloadSet.Overload.cpp_overload_set.value: %OverloadSet.Overload.cpp_overload_set.type = cpp_overload_set_value @OverloadSet.Overload.cpp_overload_set [concrete = constants.%OverloadSet.Overload.cpp_overload_set.value] // CHECK:STDOUT: %Overload__carbon_thunk.decl: %Overload__carbon_thunk.type = fn_decl @Overload__carbon_thunk [concrete = constants.%Overload__carbon_thunk] { // CHECK:STDOUT: @@ -1618,23 +1609,6 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_58 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.60e = ref_param_pattern [concrete = constants.%self.param_patt.add] -// CHECK:STDOUT: %self.patt: %pattern_type.60e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.986] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %OverloadSet = ref_param call_param0 -// CHECK:STDOUT: %self: ref %OverloadSet = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_57 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.871 = ref_param_pattern [concrete = constants.%self.param_patt.ced] -// CHECK:STDOUT: %self.patt: %pattern_type.871 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d01] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %PublicCall = ref_param call_param0 -// CHECK:STDOUT: %self: ref %PublicCall = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Cpp.ref.loc8_3: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1656,10 +1630,18 @@ class B { // CHECK:STDOUT: %OverloadSet__carbon_thunk.call: init %empty_tuple.type = call imports.%OverloadSet__carbon_thunk.decl(%addr.loc8_58.1, %addr.loc8_58.2) // CHECK:STDOUT: %.loc8_58.2: init %OverloadSet to %.loc8_58.1 = mark_in_place_init %OverloadSet__carbon_thunk.call // CHECK:STDOUT: %.loc8_58.3: ref %OverloadSet = temporary %.loc8_58.1, %.loc8_58.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_58: = bound_method %.loc8_58.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_58: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_58(%.loc8_58.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_57: = bound_method %.loc8_57.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_57: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_57(%.loc8_57.3) +// CHECK:STDOUT: %Destroy.facet.loc8_58.1: %Destroy.type = facet_value constants.%OverloadSet, (constants.%DestroyImpl.impl_witness.61a, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.f72] +// CHECK:STDOUT: %.loc8_58.4: %Destroy.type = converted constants.%OverloadSet, %Destroy.facet.loc8_58.1 [concrete = constants.%Destroy.facet.f72] +// CHECK:STDOUT: %Destroy.facet.loc8_58.2: %Destroy.type = facet_value constants.%OverloadSet, (constants.%DestroyImpl.impl_witness.61a, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.f72] +// CHECK:STDOUT: %.loc8_58.5: %Destroy.type = converted constants.%OverloadSet, %Destroy.facet.loc8_58.2 [concrete = constants.%Destroy.facet.f72] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_58: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc8_58.3) +// CHECK:STDOUT: %Destroy.facet.loc8_57.1: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc8_57.6: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc8_57.1 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %Destroy.facet.loc8_57.2: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc8_57.7: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc8_57.2 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_57: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc8_57.3) // CHECK:STDOUT: %Cpp.ref.loc9_3: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %OverloadSet.ref.loc9: type = name_ref OverloadSet, imports.%OverloadSet.decl [concrete = constants.%OverloadSet] // CHECK:STDOUT: %Overload.ref: %OverloadSet.Overload.cpp_overload_set.type = name_ref Overload, imports.%OverloadSet.Overload.cpp_overload_set.value [concrete = constants.%OverloadSet.Overload.cpp_overload_set.value] @@ -1675,27 +1657,13 @@ class B { // CHECK:STDOUT: %.loc9_54.5: ref %PublicCall = value_as_ref %.loc9_54.4 // CHECK:STDOUT: %addr.loc9_55: %ptr.d0a = addr_of %.loc9_54.5 // CHECK:STDOUT: %Overload__carbon_thunk.call: init %empty_tuple.type = call imports.%Overload__carbon_thunk.decl(%addr.loc9_55) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_54.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_54.3) +// CHECK:STDOUT: %Destroy.facet.loc9_54.1: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc9_54.6: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc9_54.1 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %Destroy.facet.loc9_54.2: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc9_54.7: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc9_54.2 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc9_54.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_58(%self.param: ref %OverloadSet) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_58(%self.param: ref %OverloadSet) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %OverloadSet.cpp_destructor.call: init %empty_tuple.type = call imports.%OverloadSet.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_57(%self.param: ref %PublicCall) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_57(%self.param: ref %PublicCall) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %PublicCall.cpp_destructor.call: init %empty_tuple.type = call imports.%PublicCall.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_overload_set_protected_base.carbon @@ -1711,7 +1679,6 @@ class B { // CHECK:STDOUT: %PublicCall: type = class_type @PublicCall [concrete] // CHECK:STDOUT: %PublicCall.PublicCall.cpp_overload_set.type: type = cpp_overload_set_type @PublicCall.PublicCall.cpp_overload_set [concrete] // CHECK:STDOUT: %PublicCall.PublicCall.cpp_overload_set.value: %PublicCall.PublicCall.cpp_overload_set.type = cpp_overload_set_value @PublicCall.PublicCall.cpp_overload_set [concrete] -// CHECK:STDOUT: %pattern_type.871: type = pattern_type %PublicCall [concrete] // CHECK:STDOUT: %ptr.d0a: type = ptr_type %PublicCall [concrete] // CHECK:STDOUT: %PublicCall__carbon_thunk.type: type = fn_type @PublicCall__carbon_thunk [concrete] // CHECK:STDOUT: %PublicCall__carbon_thunk: %PublicCall__carbon_thunk.type = struct_value () [concrete] @@ -1719,31 +1686,31 @@ class B { // CHECK:STDOUT: %OverloadSet__carbon_thunk.type.c7f6eb.1: type = fn_type @OverloadSet__carbon_thunk.1 [concrete] // CHECK:STDOUT: %OverloadSet__carbon_thunk.e50482.1: %OverloadSet__carbon_thunk.type.c7f6eb.1 = struct_value () [concrete] // CHECK:STDOUT: %.244: type = partial_type %OverloadSet [concrete] -// CHECK:STDOUT: %self.param_patt.ced: %pattern_type.871 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d01: %pattern_type.871 = wrapper_binding_pattern self, %self.param_patt.ced [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %PublicCall.cpp_destructor.type: type = fn_type @PublicCall.cpp_destructor [concrete] // CHECK:STDOUT: %PublicCall.cpp_destructor: %PublicCall.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%PublicCall.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f87: %SubobjectDestroy.type = facet_value %PublicCall, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cf8: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f87) [concrete] +// CHECK:STDOUT: %Destroy.facet.85f: %Destroy.type = facet_value %PublicCall, (%DestroyImpl.impl_witness.cf8, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %ProtectedCall: type = class_type @ProtectedCall [concrete] // CHECK:STDOUT: %ProtectedCall.ProtectedCall.cpp_overload_set.type: type = cpp_overload_set_type @ProtectedCall.ProtectedCall.cpp_overload_set [concrete] // CHECK:STDOUT: %ProtectedCall.ProtectedCall.cpp_overload_set.value: %ProtectedCall.ProtectedCall.cpp_overload_set.type = cpp_overload_set_value @ProtectedCall.ProtectedCall.cpp_overload_set [concrete] -// CHECK:STDOUT: %pattern_type.5fa: type = pattern_type %ProtectedCall [concrete] // CHECK:STDOUT: %ptr.bc1: type = ptr_type %ProtectedCall [concrete] // CHECK:STDOUT: %ProtectedCall__carbon_thunk.type: type = fn_type @ProtectedCall__carbon_thunk [concrete] // CHECK:STDOUT: %ProtectedCall__carbon_thunk: %ProtectedCall__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %OverloadSet__carbon_thunk.type.c7f6eb.2: type = fn_type @OverloadSet__carbon_thunk.2 [concrete] // CHECK:STDOUT: %OverloadSet__carbon_thunk.e50482.2: %OverloadSet__carbon_thunk.type.c7f6eb.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.204: %pattern_type.5fa = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.47c: %pattern_type.5fa = wrapper_binding_pattern self, %self.param_patt.204 [concrete] // CHECK:STDOUT: %ProtectedCall.cpp_destructor.type: type = fn_type @ProtectedCall.cpp_destructor [concrete] // CHECK:STDOUT: %ProtectedCall.cpp_destructor: %ProtectedCall.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%ProtectedCall.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6e5: %SubobjectDestroy.type = facet_value %ProtectedCall, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f5c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6e5) [concrete] +// CHECK:STDOUT: %Destroy.facet.5a7: %Destroy.type = facet_value %ProtectedCall, (%DestroyImpl.impl_witness.f5c, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: %OverloadSet.Overload.cpp_overload_set.type: type = cpp_overload_set_type @OverloadSet.Overload.cpp_overload_set [concrete] // CHECK:STDOUT: %OverloadSet.Overload.cpp_overload_set.value: %OverloadSet.Overload.cpp_overload_set.type = cpp_overload_set_value @OverloadSet.Overload.cpp_overload_set [concrete] // CHECK:STDOUT: %Overload__carbon_thunk.type.3dd392.1: type = fn_type @Overload__carbon_thunk.1 [concrete] @@ -1773,11 +1740,8 @@ class B { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %PublicCall.cpp_destructor.decl: %PublicCall.cpp_destructor.type = fn_decl @PublicCall.cpp_destructor [concrete = constants.%PublicCall.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %ProtectedCall.decl: type = class_decl @ProtectedCall [concrete = constants.%ProtectedCall] {} {} // CHECK:STDOUT: %ProtectedCall.ProtectedCall.cpp_overload_set.value: %ProtectedCall.ProtectedCall.cpp_overload_set.type = cpp_overload_set_value @ProtectedCall.ProtectedCall.cpp_overload_set [concrete = constants.%ProtectedCall.ProtectedCall.cpp_overload_set.value] // CHECK:STDOUT: %ProtectedCall__carbon_thunk.decl: %ProtectedCall__carbon_thunk.type = fn_decl @ProtectedCall__carbon_thunk [concrete = constants.%ProtectedCall__carbon_thunk] { @@ -1790,11 +1754,6 @@ class B { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %ProtectedCall.cpp_destructor.decl: %ProtectedCall.cpp_destructor.type = fn_decl @ProtectedCall.cpp_destructor [concrete = constants.%ProtectedCall.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %OverloadSet.Overload.cpp_overload_set.value: %OverloadSet.Overload.cpp_overload_set.type = cpp_overload_set_value @OverloadSet.Overload.cpp_overload_set [concrete = constants.%OverloadSet.Overload.cpp_overload_set.value] // CHECK:STDOUT: %Overload__carbon_thunk.decl.c2f84f.1: %Overload__carbon_thunk.type.3dd392.1 = fn_decl @Overload__carbon_thunk.1 [concrete = constants.%Overload__carbon_thunk.1c804c.1] { // CHECK:STDOUT: @@ -1808,23 +1767,6 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.871 = ref_param_pattern [concrete = constants.%self.param_patt.ced] -// CHECK:STDOUT: %self.patt: %pattern_type.871 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d01] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %PublicCall = ref_param call_param0 -// CHECK:STDOUT: %self: ref %PublicCall = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc17 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5fa = ref_param_pattern [concrete = constants.%self.param_patt.204] -// CHECK:STDOUT: %self.patt: %pattern_type.5fa = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.47c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ProtectedCall = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ProtectedCall = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: class @D { // CHECK:STDOUT: // CHECK:STDOUT: complete_type_witness = %complete_type @@ -1866,8 +1808,12 @@ class B { // CHECK:STDOUT: %.loc11_61.5: init %OverloadSet = as_compatible %.loc11_61.4 // CHECK:STDOUT: %.loc11_61.6: init %D to %return.param = class_init (%.loc11_61.5) // CHECK:STDOUT: %.loc11_62: init %D = converted %.loc11_61.2, %.loc11_61.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc11_59.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc11_59.3) +// CHECK:STDOUT: %Destroy.facet.loc11_59.1: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc11_59.6: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc11_59.1 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %Destroy.facet.loc11_59.2: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc11_59.7: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc11_59.2 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_59.3) // CHECK:STDOUT: return %.loc11_62 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1895,8 +1841,12 @@ class B { // CHECK:STDOUT: %.loc17_67.5: init %OverloadSet = as_compatible %.loc17_67.4 // CHECK:STDOUT: %.loc17_67.6: init %D to %return.param = class_init (%.loc17_67.5) // CHECK:STDOUT: %.loc17_68: init %D = converted %.loc17_67.2, %.loc17_67.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc17_65.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc17_65.3) +// CHECK:STDOUT: %Destroy.facet.loc17_65.1: %Destroy.type = facet_value constants.%ProtectedCall, (constants.%DestroyImpl.impl_witness.f5c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %.loc17_65.6: %Destroy.type = converted constants.%ProtectedCall, %Destroy.facet.loc17_65.1 [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %Destroy.facet.loc17_65.2: %Destroy.type = facet_value constants.%ProtectedCall, (constants.%DestroyImpl.impl_witness.f5c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %.loc17_65.7: %Destroy.type = converted constants.%ProtectedCall, %Destroy.facet.loc17_65.2 [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc17_65.3) // CHECK:STDOUT: return %.loc17_68 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1915,8 +1865,12 @@ class B { // CHECK:STDOUT: %.loc23_40.5: ref %PublicCall = value_as_ref %.loc23_40.4 // CHECK:STDOUT: %addr.loc23_41: %ptr.d0a = addr_of %.loc23_40.5 // CHECK:STDOUT: %Overload__carbon_thunk.call: init %empty_tuple.type = call imports.%Overload__carbon_thunk.decl.c2f84f.1(%addr.loc23_41) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc23_40.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc23_40.3) +// CHECK:STDOUT: %Destroy.facet.loc23_40.1: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc23_40.6: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc23_40.1 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %Destroy.facet.loc23_40.2: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc23_40.7: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc23_40.2 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc23_40.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1935,27 +1889,13 @@ class B { // CHECK:STDOUT: %.loc29_46.5: ref %ProtectedCall = value_as_ref %.loc29_46.4 // CHECK:STDOUT: %addr.loc29_47: %ptr.bc1 = addr_of %.loc29_46.5 // CHECK:STDOUT: %Overload__carbon_thunk.call: init %empty_tuple.type = call imports.%Overload__carbon_thunk.decl.c2f84f.2(%addr.loc29_47) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc29_46.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc29_46.3) +// CHECK:STDOUT: %Destroy.facet.loc29_46.1: %Destroy.type = facet_value constants.%ProtectedCall, (constants.%DestroyImpl.impl_witness.f5c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %.loc29_46.6: %Destroy.type = converted constants.%ProtectedCall, %Destroy.facet.loc29_46.1 [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %Destroy.facet.loc29_46.2: %Destroy.type = facet_value constants.%ProtectedCall, (constants.%DestroyImpl.impl_witness.f5c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %.loc29_46.7: %Destroy.type = converted constants.%ProtectedCall, %Destroy.facet.loc29_46.2 [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc29_46.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %PublicCall) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %PublicCall) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %PublicCall.cpp_destructor.call: init %empty_tuple.type = call imports.%PublicCall.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17(%self.param: ref %ProtectedCall) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17(%self.param: ref %ProtectedCall) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %ProtectedCall.cpp_destructor.call: init %empty_tuple.type = call imports.%ProtectedCall.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_overload_set_public_base_class_call_public.carbon @@ -1969,20 +1909,22 @@ class B { // CHECK:STDOUT: %PublicCall: type = class_type @PublicCall [concrete] // CHECK:STDOUT: %PublicCall.PublicCall.cpp_overload_set.type: type = cpp_overload_set_type @PublicCall.PublicCall.cpp_overload_set [concrete] // CHECK:STDOUT: %PublicCall.PublicCall.cpp_overload_set.value: %PublicCall.PublicCall.cpp_overload_set.type = cpp_overload_set_value @PublicCall.PublicCall.cpp_overload_set [concrete] -// CHECK:STDOUT: %pattern_type.871: type = pattern_type %PublicCall [concrete] // CHECK:STDOUT: %ptr.d0a: type = ptr_type %PublicCall [concrete] // CHECK:STDOUT: %PublicCall__carbon_thunk.type: type = fn_type @PublicCall__carbon_thunk [concrete] // CHECK:STDOUT: %PublicCall__carbon_thunk: %PublicCall__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Overload__carbon_thunk.type: type = fn_type @Overload__carbon_thunk [concrete] // CHECK:STDOUT: %Overload__carbon_thunk: %Overload__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ced: %pattern_type.871 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d01: %pattern_type.871 = wrapper_binding_pattern self, %self.param_patt.ced [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %PublicCall.cpp_destructor.type: type = fn_type @PublicCall.cpp_destructor [concrete] // CHECK:STDOUT: %PublicCall.cpp_destructor: %PublicCall.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%PublicCall.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f87: %SubobjectDestroy.type = facet_value %PublicCall, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cf8: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f87) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %PublicCall, (%DestroyImpl.impl_witness.cf8, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2005,21 +1947,8 @@ class B { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %PublicCall.cpp_destructor.decl: %PublicCall.cpp_destructor.type = fn_decl @PublicCall.cpp_destructor [concrete = constants.%PublicCall.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.871 = ref_param_pattern [concrete = constants.%self.param_patt.ced] -// CHECK:STDOUT: %self.patt: %pattern_type.871 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d01] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %PublicCall = ref_param call_param0 -// CHECK:STDOUT: %self: ref %PublicCall = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2039,18 +1968,13 @@ class B { // CHECK:STDOUT: %.loc8_57.5: ref %PublicCall = value_as_ref %.loc8_57.4 // CHECK:STDOUT: %addr.loc8_58: %ptr.d0a = addr_of %.loc8_57.5 // CHECK:STDOUT: %Overload__carbon_thunk.call: init %empty_tuple.type = call imports.%Overload__carbon_thunk.decl(%addr.loc8_58) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_57.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_57.3) +// CHECK:STDOUT: %Destroy.facet.loc8_57.1: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_57.6: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc8_57.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_57.2: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_57.7: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc8_57.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_57.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %PublicCall) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %PublicCall) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %PublicCall.cpp_destructor.call: init %empty_tuple.type = call imports.%PublicCall.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_overload_set_public_base_class_derived_call_non_private.carbon @@ -2065,37 +1989,36 @@ class B { // CHECK:STDOUT: %PublicCall: type = class_type @PublicCall [concrete] // CHECK:STDOUT: %PublicCall.PublicCall.cpp_overload_set.type: type = cpp_overload_set_type @PublicCall.PublicCall.cpp_overload_set [concrete] // CHECK:STDOUT: %PublicCall.PublicCall.cpp_overload_set.value: %PublicCall.PublicCall.cpp_overload_set.type = cpp_overload_set_value @PublicCall.PublicCall.cpp_overload_set [concrete] -// CHECK:STDOUT: %pattern_type.871: type = pattern_type %PublicCall [concrete] // CHECK:STDOUT: %ptr.d0a: type = ptr_type %PublicCall [concrete] // CHECK:STDOUT: %PublicCall__carbon_thunk.type: type = fn_type @PublicCall__carbon_thunk [concrete] // CHECK:STDOUT: %PublicCall__carbon_thunk: %PublicCall__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Overload__carbon_thunk.type.3dd392.1: type = fn_type @Overload__carbon_thunk.1 [concrete] // CHECK:STDOUT: %Overload__carbon_thunk.1c804c.1: %Overload__carbon_thunk.type.3dd392.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ced: %pattern_type.871 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d01: %pattern_type.871 = wrapper_binding_pattern self, %self.param_patt.ced [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %PublicCall.cpp_destructor.type: type = fn_type @PublicCall.cpp_destructor [concrete] // CHECK:STDOUT: %PublicCall.cpp_destructor: %PublicCall.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%PublicCall.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f87: %SubobjectDestroy.type = facet_value %PublicCall, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cf8: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f87) [concrete] +// CHECK:STDOUT: %Destroy.facet.85f: %Destroy.type = facet_value %PublicCall, (%DestroyImpl.impl_witness.cf8, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %ProtectedCall: type = class_type @ProtectedCall [concrete] // CHECK:STDOUT: %ProtectedCall.ProtectedCall.cpp_overload_set.type: type = cpp_overload_set_type @ProtectedCall.ProtectedCall.cpp_overload_set [concrete] // CHECK:STDOUT: %ProtectedCall.ProtectedCall.cpp_overload_set.value: %ProtectedCall.ProtectedCall.cpp_overload_set.type = cpp_overload_set_value @ProtectedCall.ProtectedCall.cpp_overload_set [concrete] -// CHECK:STDOUT: %pattern_type.5fa: type = pattern_type %ProtectedCall [concrete] // CHECK:STDOUT: %ptr.bc1: type = ptr_type %ProtectedCall [concrete] // CHECK:STDOUT: %ProtectedCall__carbon_thunk.type: type = fn_type @ProtectedCall__carbon_thunk [concrete] // CHECK:STDOUT: %ProtectedCall__carbon_thunk: %ProtectedCall__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Overload__carbon_thunk.type.3dd392.2: type = fn_type @Overload__carbon_thunk.2 [concrete] // CHECK:STDOUT: %Overload__carbon_thunk.1c804c.2: %Overload__carbon_thunk.type.3dd392.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.204: %pattern_type.5fa = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.47c: %pattern_type.5fa = wrapper_binding_pattern self, %self.param_patt.204 [concrete] // CHECK:STDOUT: %ProtectedCall.cpp_destructor.type: type = fn_type @ProtectedCall.cpp_destructor [concrete] // CHECK:STDOUT: %ProtectedCall.cpp_destructor: %ProtectedCall.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%ProtectedCall.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6e5: %SubobjectDestroy.type = facet_value %ProtectedCall, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f5c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6e5) [concrete] +// CHECK:STDOUT: %Destroy.facet.5a7: %Destroy.type = facet_value %ProtectedCall, (%DestroyImpl.impl_witness.f5c, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2119,11 +2042,8 @@ class B { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %PublicCall.cpp_destructor.decl: %PublicCall.cpp_destructor.type = fn_decl @PublicCall.cpp_destructor [concrete = constants.%PublicCall.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %ProtectedCall.decl: type = class_decl @ProtectedCall [concrete = constants.%ProtectedCall] {} {} // CHECK:STDOUT: %ProtectedCall.ProtectedCall.cpp_overload_set.value: %ProtectedCall.ProtectedCall.cpp_overload_set.type = cpp_overload_set_value @ProtectedCall.ProtectedCall.cpp_overload_set [concrete = constants.%ProtectedCall.ProtectedCall.cpp_overload_set.value] // CHECK:STDOUT: %ProtectedCall__carbon_thunk.decl: %ProtectedCall__carbon_thunk.type = fn_decl @ProtectedCall__carbon_thunk [concrete = constants.%ProtectedCall__carbon_thunk] { @@ -2136,28 +2056,6 @@ class B { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %ProtectedCall.cpp_destructor.decl: %ProtectedCall.cpp_destructor.type = fn_decl @ProtectedCall.cpp_destructor [concrete = constants.%ProtectedCall.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.871 = ref_param_pattern [concrete = constants.%self.param_patt.ced] -// CHECK:STDOUT: %self.patt: %pattern_type.871 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d01] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %PublicCall = ref_param call_param0 -// CHECK:STDOUT: %self: ref %PublicCall = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc12 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5fa = ref_param_pattern [concrete = constants.%self.param_patt.204] -// CHECK:STDOUT: %self.patt: %pattern_type.5fa = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.47c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ProtectedCall = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ProtectedCall = wrapper_binding self, %self.param -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { @@ -2187,8 +2085,12 @@ class B { // CHECK:STDOUT: %.loc11_40.5: ref %PublicCall = value_as_ref %.loc11_40.4 // CHECK:STDOUT: %addr.loc11_41: %ptr.d0a = addr_of %.loc11_40.5 // CHECK:STDOUT: %Overload__carbon_thunk.call.loc11: init %empty_tuple.type = call imports.%Overload__carbon_thunk.decl.c2f84f.1(%addr.loc11_41) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %.loc11_40.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%.loc11_40.3) +// CHECK:STDOUT: %Destroy.facet.loc11_40.1: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc11_40.6: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc11_40.1 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %Destroy.facet.loc11_40.2: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc11_40.7: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc11_40.2 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc11_40.3) // CHECK:STDOUT: %Overload.ref.loc12: %OverloadPublic.Overload.cpp_overload_set.type = name_ref Overload, imports.%OverloadPublic.Overload.cpp_overload_set.value [concrete = constants.%OverloadPublic.Overload.cpp_overload_set.value] // CHECK:STDOUT: %Cpp.ref.loc12: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %ProtectedCall.ref.loc12_17: type = name_ref ProtectedCall, imports.%ProtectedCall.decl [concrete = constants.%ProtectedCall] @@ -2202,27 +2104,13 @@ class B { // CHECK:STDOUT: %.loc12_46.5: ref %ProtectedCall = value_as_ref %.loc12_46.4 // CHECK:STDOUT: %addr.loc12_47: %ptr.bc1 = addr_of %.loc12_46.5 // CHECK:STDOUT: %Overload__carbon_thunk.call.loc12: init %empty_tuple.type = call imports.%Overload__carbon_thunk.decl.c2f84f.2(%addr.loc12_47) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: = bound_method %.loc12_46.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%.loc12_46.3) +// CHECK:STDOUT: %Destroy.facet.loc12_46.1: %Destroy.type = facet_value constants.%ProtectedCall, (constants.%DestroyImpl.impl_witness.f5c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %.loc12_46.6: %Destroy.type = converted constants.%ProtectedCall, %Destroy.facet.loc12_46.1 [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %Destroy.facet.loc12_46.2: %Destroy.type = facet_value constants.%ProtectedCall, (constants.%DestroyImpl.impl_witness.f5c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %.loc12_46.7: %Destroy.type = converted constants.%ProtectedCall, %Destroy.facet.loc12_46.2 [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc12_46.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %PublicCall) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %PublicCall) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %PublicCall.cpp_destructor.call: init %empty_tuple.type = call imports.%PublicCall.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %ProtectedCall) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12(%self.param: ref %ProtectedCall) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %ProtectedCall.cpp_destructor.call: init %empty_tuple.type = call imports.%ProtectedCall.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_overload_set_protected_base_class_derived_call_non_private.carbon @@ -2237,37 +2125,36 @@ class B { // CHECK:STDOUT: %PublicCall: type = class_type @PublicCall [concrete] // CHECK:STDOUT: %PublicCall.PublicCall.cpp_overload_set.type: type = cpp_overload_set_type @PublicCall.PublicCall.cpp_overload_set [concrete] // CHECK:STDOUT: %PublicCall.PublicCall.cpp_overload_set.value: %PublicCall.PublicCall.cpp_overload_set.type = cpp_overload_set_value @PublicCall.PublicCall.cpp_overload_set [concrete] -// CHECK:STDOUT: %pattern_type.871: type = pattern_type %PublicCall [concrete] // CHECK:STDOUT: %ptr.d0a: type = ptr_type %PublicCall [concrete] // CHECK:STDOUT: %PublicCall__carbon_thunk.type: type = fn_type @PublicCall__carbon_thunk [concrete] // CHECK:STDOUT: %PublicCall__carbon_thunk: %PublicCall__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Overload__carbon_thunk.type.3dd392.1: type = fn_type @Overload__carbon_thunk.1 [concrete] // CHECK:STDOUT: %Overload__carbon_thunk.1c804c.1: %Overload__carbon_thunk.type.3dd392.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ced: %pattern_type.871 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d01: %pattern_type.871 = wrapper_binding_pattern self, %self.param_patt.ced [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %PublicCall.cpp_destructor.type: type = fn_type @PublicCall.cpp_destructor [concrete] // CHECK:STDOUT: %PublicCall.cpp_destructor: %PublicCall.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%PublicCall.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f87: %SubobjectDestroy.type = facet_value %PublicCall, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cf8: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f87) [concrete] +// CHECK:STDOUT: %Destroy.facet.85f: %Destroy.type = facet_value %PublicCall, (%DestroyImpl.impl_witness.cf8, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %ProtectedCall: type = class_type @ProtectedCall [concrete] // CHECK:STDOUT: %ProtectedCall.ProtectedCall.cpp_overload_set.type: type = cpp_overload_set_type @ProtectedCall.ProtectedCall.cpp_overload_set [concrete] // CHECK:STDOUT: %ProtectedCall.ProtectedCall.cpp_overload_set.value: %ProtectedCall.ProtectedCall.cpp_overload_set.type = cpp_overload_set_value @ProtectedCall.ProtectedCall.cpp_overload_set [concrete] -// CHECK:STDOUT: %pattern_type.5fa: type = pattern_type %ProtectedCall [concrete] // CHECK:STDOUT: %ptr.bc1: type = ptr_type %ProtectedCall [concrete] // CHECK:STDOUT: %ProtectedCall__carbon_thunk.type: type = fn_type @ProtectedCall__carbon_thunk [concrete] // CHECK:STDOUT: %ProtectedCall__carbon_thunk: %ProtectedCall__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Overload__carbon_thunk.type.3dd392.2: type = fn_type @Overload__carbon_thunk.2 [concrete] // CHECK:STDOUT: %Overload__carbon_thunk.1c804c.2: %Overload__carbon_thunk.type.3dd392.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.204: %pattern_type.5fa = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.47c: %pattern_type.5fa = wrapper_binding_pattern self, %self.param_patt.204 [concrete] // CHECK:STDOUT: %ProtectedCall.cpp_destructor.type: type = fn_type @ProtectedCall.cpp_destructor [concrete] // CHECK:STDOUT: %ProtectedCall.cpp_destructor: %ProtectedCall.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%ProtectedCall.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6e5: %SubobjectDestroy.type = facet_value %ProtectedCall, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f5c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6e5) [concrete] +// CHECK:STDOUT: %Destroy.facet.5a7: %Destroy.type = facet_value %ProtectedCall, (%DestroyImpl.impl_witness.f5c, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2291,11 +2178,8 @@ class B { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %PublicCall.cpp_destructor.decl: %PublicCall.cpp_destructor.type = fn_decl @PublicCall.cpp_destructor [concrete = constants.%PublicCall.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %ProtectedCall.decl: type = class_decl @ProtectedCall [concrete = constants.%ProtectedCall] {} {} // CHECK:STDOUT: %ProtectedCall.ProtectedCall.cpp_overload_set.value: %ProtectedCall.ProtectedCall.cpp_overload_set.type = cpp_overload_set_value @ProtectedCall.ProtectedCall.cpp_overload_set [concrete = constants.%ProtectedCall.ProtectedCall.cpp_overload_set.value] // CHECK:STDOUT: %ProtectedCall__carbon_thunk.decl: %ProtectedCall__carbon_thunk.type = fn_decl @ProtectedCall__carbon_thunk [concrete = constants.%ProtectedCall__carbon_thunk] { @@ -2308,28 +2192,6 @@ class B { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %ProtectedCall.cpp_destructor.decl: %ProtectedCall.cpp_destructor.type = fn_decl @ProtectedCall.cpp_destructor [concrete = constants.%ProtectedCall.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.871 = ref_param_pattern [concrete = constants.%self.param_patt.ced] -// CHECK:STDOUT: %self.patt: %pattern_type.871 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d01] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %PublicCall = ref_param call_param0 -// CHECK:STDOUT: %self: ref %PublicCall = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc12 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5fa = ref_param_pattern [concrete = constants.%self.param_patt.204] -// CHECK:STDOUT: %self.patt: %pattern_type.5fa = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.47c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ProtectedCall = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ProtectedCall = wrapper_binding self, %self.param -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { @@ -2359,8 +2221,12 @@ class B { // CHECK:STDOUT: %.loc11_40.5: ref %PublicCall = value_as_ref %.loc11_40.4 // CHECK:STDOUT: %addr.loc11_41: %ptr.d0a = addr_of %.loc11_40.5 // CHECK:STDOUT: %Overload__carbon_thunk.call.loc11: init %empty_tuple.type = call imports.%Overload__carbon_thunk.decl.c2f84f.1(%addr.loc11_41) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %.loc11_40.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%.loc11_40.3) +// CHECK:STDOUT: %Destroy.facet.loc11_40.1: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc11_40.6: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc11_40.1 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %Destroy.facet.loc11_40.2: %Destroy.type = facet_value constants.%PublicCall, (constants.%DestroyImpl.impl_witness.cf8, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: %.loc11_40.7: %Destroy.type = converted constants.%PublicCall, %Destroy.facet.loc11_40.2 [concrete = constants.%Destroy.facet.85f] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc11_40.3) // CHECK:STDOUT: %Overload.ref.loc12: %OverloadProtected.Overload.cpp_overload_set.type = name_ref Overload, imports.%OverloadProtected.Overload.cpp_overload_set.value [concrete = constants.%OverloadProtected.Overload.cpp_overload_set.value] // CHECK:STDOUT: %Cpp.ref.loc12: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %ProtectedCall.ref.loc12_17: type = name_ref ProtectedCall, imports.%ProtectedCall.decl [concrete = constants.%ProtectedCall] @@ -2374,27 +2240,13 @@ class B { // CHECK:STDOUT: %.loc12_46.5: ref %ProtectedCall = value_as_ref %.loc12_46.4 // CHECK:STDOUT: %addr.loc12_47: %ptr.bc1 = addr_of %.loc12_46.5 // CHECK:STDOUT: %Overload__carbon_thunk.call.loc12: init %empty_tuple.type = call imports.%Overload__carbon_thunk.decl.c2f84f.2(%addr.loc12_47) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: = bound_method %.loc12_46.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%.loc12_46.3) +// CHECK:STDOUT: %Destroy.facet.loc12_46.1: %Destroy.type = facet_value constants.%ProtectedCall, (constants.%DestroyImpl.impl_witness.f5c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %.loc12_46.6: %Destroy.type = converted constants.%ProtectedCall, %Destroy.facet.loc12_46.1 [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %Destroy.facet.loc12_46.2: %Destroy.type = facet_value constants.%ProtectedCall, (constants.%DestroyImpl.impl_witness.f5c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: %.loc12_46.7: %Destroy.type = converted constants.%ProtectedCall, %Destroy.facet.loc12_46.2 [concrete = constants.%Destroy.facet.5a7] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc12_46.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %PublicCall) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %PublicCall) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %PublicCall.cpp_destructor.call: init %empty_tuple.type = call imports.%PublicCall.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %ProtectedCall) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12(%self.param: ref %ProtectedCall) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %ProtectedCall.cpp_destructor.call: init %empty_tuple.type = call imports.%ProtectedCall.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- base_class_public_access_allowed.carbon diff --git a/toolchain/check/testdata/interop/cpp/class/import/constructor.carbon b/toolchain/check/testdata/interop/cpp/class/import/constructor.carbon index 9930edec5b8b..91f1b51e315a 100644 --- a/toolchain/check/testdata/interop/cpp/class/import/constructor.carbon +++ b/toolchain/check/testdata/interop/cpp/class/import/constructor.carbon @@ -305,14 +305,17 @@ fn F() { // CHECK:STDOUT: %ptr.d69: type = ptr_type %DefaultC [concrete] // CHECK:STDOUT: %DefaultC__carbon_thunk.type: type = fn_type @DefaultC__carbon_thunk [concrete] // CHECK:STDOUT: %DefaultC__carbon_thunk: %DefaultC__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.950: %pattern_type.903 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.659: %pattern_type.903 = wrapper_binding_pattern self, %self.param_patt.950 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %DefaultC.cpp_destructor.type: type = fn_type @DefaultC.cpp_destructor [concrete] // CHECK:STDOUT: %DefaultC.cpp_destructor: %DefaultC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%DefaultC.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.195: %SubobjectDestroy.type = facet_value %DefaultC, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4b5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.195) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %DefaultC, (%DestroyImpl.impl_witness.4b5, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -327,21 +330,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %DefaultC.cpp_destructor.decl: %DefaultC.cpp_destructor.type = fn_decl @DefaultC.cpp_destructor [concrete = constants.%DefaultC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.903 = ref_param_pattern [concrete = constants.%self.param_patt.950] -// CHECK:STDOUT: %self.patt: %pattern_type.903 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.659] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultC = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -363,18 +353,13 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c.patt: %pattern_type.903 = value_binding_pattern c [concrete = constants.%c.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_54.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_54.3) +// CHECK:STDOUT: %Destroy.facet.loc8_54.1: %Destroy.type = facet_value constants.%DefaultC, (constants.%DestroyImpl.impl_witness.4b5, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_54.5: %Destroy.type = converted constants.%DefaultC, %Destroy.facet.loc8_54.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_54.2: %Destroy.type = facet_value constants.%DefaultC, (constants.%DestroyImpl.impl_witness.4b5, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_54.6: %Destroy.type = converted constants.%DefaultC, %Destroy.facet.loc8_54.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_54.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %DefaultC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %DefaultC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %DefaultC.cpp_destructor.call: init %empty_tuple.type = call imports.%DefaultC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- implicit_default.carbon @@ -388,8 +373,8 @@ fn F() { // CHECK:STDOUT: %c.var_patt: %pattern_type.903 = var_pattern %c.patt [concrete] // CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete] // CHECK:STDOUT: %Default.type: type = facet_type <@Default> [concrete] -// CHECK:STDOUT: %T.b09: %Default.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.type.4da: type = fn_type @T.as_type.as.DefaultOrUnformed.impl.Op, @T.as_type.as.DefaultOrUnformed.impl(%T.b09) [symbolic] +// CHECK:STDOUT: %T.b098ed.1: %Default.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.type.4da: type = fn_type @T.as_type.as.DefaultOrUnformed.impl.Op, @T.as_type.as.DefaultOrUnformed.impl(%T.b098ed.1) [symbolic] // CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.79f: %T.as_type.as.DefaultOrUnformed.impl.Op.type.4da = struct_value () [symbolic] // CHECK:STDOUT: %DefaultC.Op.type: type = fn_type @DefaultC.Op [concrete] // CHECK:STDOUT: %DefaultC.Op: %DefaultC.Op.type = struct_value () [concrete] @@ -397,14 +382,17 @@ fn F() { // CHECK:STDOUT: %Default.facet.53e: %Default.type = facet_value %DefaultC, (%custom_witness.9b4) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.c99: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.162, @T.as_type.as.DefaultOrUnformed.impl(%Default.facet.53e) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet.a86: %DefaultOrUnformed.type = facet_value %DefaultC, (%DefaultOrUnformed.impl_witness.c99) [concrete] -// CHECK:STDOUT: %self.param_patt.950: %pattern_type.903 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.659: %pattern_type.903 = wrapper_binding_pattern self, %self.param_patt.950 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %DefaultC.cpp_destructor.type: type = fn_type @DefaultC.cpp_destructor [concrete] // CHECK:STDOUT: %DefaultC.cpp_destructor: %DefaultC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%DefaultC.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.195: %SubobjectDestroy.type = facet_value %DefaultC, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4b5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.195) [concrete] +// CHECK:STDOUT: %Destroy.facet.9ee: %Destroy.type = facet_value %DefaultC, (%DestroyImpl.impl_witness.4b5, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -415,21 +403,8 @@ fn F() { // CHECK:STDOUT: %DefaultC.decl: type = class_decl @DefaultC [concrete = constants.%DefaultC] {} {} // CHECK:STDOUT: %Core.import_ref.288: @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op.type (%T.as_type.as.DefaultOrUnformed.impl.Op.type.4da) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op (constants.%T.as_type.as.DefaultOrUnformed.impl.Op.79f)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.162 = impl_witness_table (%Core.import_ref.288), @T.as_type.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %DefaultC.cpp_destructor.decl: %DefaultC.cpp_destructor.type = fn_decl @DefaultC.cpp_destructor [concrete = constants.%DefaultC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.903 = ref_param_pattern [concrete = constants.%self.param_patt.950] -// CHECK:STDOUT: %self.patt: %pattern_type.903 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.659] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultC = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -440,8 +415,8 @@ fn F() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc8_29.1 [concrete = constants.%DefaultC] // CHECK:STDOUT: %.loc8_29.2: type = converted %.loc8_29.1, %as_type [concrete = constants.%DefaultC] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc8_3: ref %DefaultC = splice_block %c.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %DefaultC to %.loc8_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc8_3.1: ref %DefaultC = splice_block %c.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %DefaultC to %.loc8_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %c.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc8_20: type = splice_block %DefaultC.ref [concrete = constants.%DefaultC] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -452,18 +427,13 @@ fn F() { // CHECK:STDOUT: %c.patt: %pattern_type.903 = ref_binding_pattern c [concrete = constants.%c.patt] // CHECK:STDOUT: %c.var_patt: %pattern_type.903 = var_pattern %c.patt [concrete = constants.%c.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%DefaultC, (constants.%DestroyImpl.impl_witness.4b5, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.9ee] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%DefaultC, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.9ee] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%DefaultC, (constants.%DestroyImpl.impl_witness.4b5, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.9ee] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%DefaultC, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.9ee] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%c.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %DefaultC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %DefaultC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %DefaultC.cpp_destructor.call: init %empty_tuple.type = call imports.%DefaultC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_non_default.carbon @@ -500,14 +470,17 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.385: = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.e51: = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_456.c03: %i32 = int_value 456 [concrete] -// CHECK:STDOUT: %self.param_patt.409: %pattern_type.714 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f57: %pattern_type.714 = wrapper_binding_pattern self, %self.param_patt.409 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %NonDefaultC.cpp_destructor.type: type = fn_type @NonDefaultC.cpp_destructor [concrete] // CHECK:STDOUT: %NonDefaultC.cpp_destructor: %NonDefaultC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%NonDefaultC.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f15: %SubobjectDestroy.type = facet_value %NonDefaultC, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.143: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f15) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %NonDefaultC, (%DestroyImpl.impl_witness.143, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -524,21 +497,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %NonDefaultC.cpp_destructor.decl: %NonDefaultC.cpp_destructor.type = fn_decl @NonDefaultC.cpp_destructor [concrete = constants.%NonDefaultC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.714 = ref_param_pattern [concrete = constants.%self.param_patt.409] -// CHECK:STDOUT: %self.patt: %pattern_type.714 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f57] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %NonDefaultC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %NonDefaultC = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -576,18 +536,13 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c.patt: %pattern_type.714 = value_binding_pattern c [concrete = constants.%c.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_71.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_71.3) +// CHECK:STDOUT: %Destroy.facet.loc8_71.1: %Destroy.type = facet_value constants.%NonDefaultC, (constants.%DestroyImpl.impl_witness.143, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_71.5: %Destroy.type = converted constants.%NonDefaultC, %Destroy.facet.loc8_71.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_71.2: %Destroy.type = facet_value constants.%NonDefaultC, (constants.%DestroyImpl.impl_witness.143, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_71.6: %Destroy.type = converted constants.%NonDefaultC, %Destroy.facet.loc8_71.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_71.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %NonDefaultC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %NonDefaultC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %NonDefaultC.cpp_destructor.call: init %empty_tuple.type = call imports.%NonDefaultC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_multiple.carbon @@ -627,14 +582,17 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.385: = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.e51: = bound_method %int_456.010, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_456.c03: %i32 = int_value 456 [concrete] -// CHECK:STDOUT: %self.param_patt.cf3: %pattern_type.56a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f8: %pattern_type.56a = wrapper_binding_pattern self, %self.param_patt.cf3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %MultipleC.cpp_destructor.type: type = fn_type @MultipleC.cpp_destructor [concrete] // CHECK:STDOUT: %MultipleC.cpp_destructor: %MultipleC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%MultipleC.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.1e7: %SubobjectDestroy.type = facet_value %MultipleC, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.5a8: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.1e7) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %MultipleC, (%DestroyImpl.impl_witness.5a8, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -656,21 +614,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %MultipleC.cpp_destructor.decl: %MultipleC.cpp_destructor.type = fn_decl @MultipleC.cpp_destructor [concrete = constants.%MultipleC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.56a = ref_param_pattern [concrete = constants.%self.param_patt.cf3] -// CHECK:STDOUT: %self.patt: %pattern_type.56a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MultipleC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MultipleC = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -725,20 +670,19 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c2.patt: %pattern_type.56a = value_binding_pattern c2 [concrete = constants.%c2.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_66.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_66.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_58.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_58.3) +// CHECK:STDOUT: %Destroy.facet.loc9_66.1: %Destroy.type = facet_value constants.%MultipleC, (constants.%DestroyImpl.impl_witness.5a8, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_66.5: %Destroy.type = converted constants.%MultipleC, %Destroy.facet.loc9_66.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_66.2: %Destroy.type = facet_value constants.%MultipleC, (constants.%DestroyImpl.impl_witness.5a8, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_66.6: %Destroy.type = converted constants.%MultipleC, %Destroy.facet.loc9_66.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_66.3) +// CHECK:STDOUT: %Destroy.facet.loc8_58.1: %Destroy.type = facet_value constants.%MultipleC, (constants.%DestroyImpl.impl_witness.5a8, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_58.5: %Destroy.type = converted constants.%MultipleC, %Destroy.facet.loc8_58.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_58.2: %Destroy.type = facet_value constants.%MultipleC, (constants.%DestroyImpl.impl_witness.5a8, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_58.6: %Destroy.type = converted constants.%MultipleC, %Destroy.facet.loc8_58.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc8_58.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %MultipleC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %MultipleC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %MultipleC.cpp_destructor.call: init %empty_tuple.type = call imports.%MultipleC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_default_arguments.carbon @@ -778,14 +722,17 @@ fn F() { // CHECK:STDOUT: %c2.patt: %pattern_type.52d = value_binding_pattern c2 [concrete] // CHECK:STDOUT: %DefaultArgsC__carbon_thunk.type.4c24d7.2: type = fn_type @DefaultArgsC__carbon_thunk.2 [concrete] // CHECK:STDOUT: %DefaultArgsC__carbon_thunk.137e61.2: %DefaultArgsC__carbon_thunk.type.4c24d7.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.32c: %pattern_type.52d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.8dd: %pattern_type.52d = wrapper_binding_pattern self, %self.param_patt.32c [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %DefaultArgsC.cpp_destructor.type: type = fn_type @DefaultArgsC.cpp_destructor [concrete] // CHECK:STDOUT: %DefaultArgsC.cpp_destructor: %DefaultArgsC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%DefaultArgsC.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.848: %SubobjectDestroy.type = facet_value %DefaultArgsC, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ffe: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.848) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %DefaultArgsC, (%DestroyImpl.impl_witness.ffe, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -807,21 +754,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %DefaultArgsC.cpp_destructor.decl: %DefaultArgsC.cpp_destructor.type = fn_decl @DefaultArgsC.cpp_destructor [concrete = constants.%DefaultArgsC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.52d = ref_param_pattern [concrete = constants.%self.param_patt.32c] -// CHECK:STDOUT: %self.patt: %pattern_type.52d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8dd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultArgsC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultArgsC = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -884,20 +818,19 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c2.patt: %pattern_type.52d = value_binding_pattern c2 [concrete = constants.%c2.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_68.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_68.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_71.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_71.3) +// CHECK:STDOUT: %Destroy.facet.loc9_68.1: %Destroy.type = facet_value constants.%DefaultArgsC, (constants.%DestroyImpl.impl_witness.ffe, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_68.5: %Destroy.type = converted constants.%DefaultArgsC, %Destroy.facet.loc9_68.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_68.2: %Destroy.type = facet_value constants.%DefaultArgsC, (constants.%DestroyImpl.impl_witness.ffe, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_68.6: %Destroy.type = converted constants.%DefaultArgsC, %Destroy.facet.loc9_68.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_68.3) +// CHECK:STDOUT: %Destroy.facet.loc8_71.1: %Destroy.type = facet_value constants.%DefaultArgsC, (constants.%DestroyImpl.impl_witness.ffe, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_71.5: %Destroy.type = converted constants.%DefaultArgsC, %Destroy.facet.loc8_71.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_71.2: %Destroy.type = facet_value constants.%DefaultArgsC, (constants.%DestroyImpl.impl_witness.ffe, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_71.6: %Destroy.type = converted constants.%DefaultArgsC, %Destroy.facet.loc8_71.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc8_71.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %DefaultArgsC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %DefaultArgsC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %DefaultArgsC.cpp_destructor.call: init %empty_tuple.type = call imports.%DefaultArgsC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_template.carbon @@ -934,7 +867,6 @@ fn F() { // CHECK:STDOUT: %c2.patt: %pattern_type.f20 = ref_binding_pattern c2 [concrete] // CHECK:STDOUT: %c2.var_patt: %pattern_type.f20 = var_pattern %c2.patt [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete] // CHECK:STDOUT: %TemplateC__carbon_thunk.type.7462cf.2: type = fn_type @TemplateC__carbon_thunk.2 [concrete] // CHECK:STDOUT: %TemplateC__carbon_thunk.a4007a.2: %TemplateC__carbon_thunk.type.7462cf.2 = struct_value () [concrete] @@ -952,23 +884,23 @@ fn F() { // CHECK:STDOUT: %c3.var_patt: %pattern_type.f20 = var_pattern %c3.patt [concrete] // CHECK:STDOUT: %TemplateC__carbon_thunk.type.7462cf.3: type = fn_type @TemplateC__carbon_thunk.3 [concrete] // CHECK:STDOUT: %TemplateC__carbon_thunk.a4007a.3: %TemplateC__carbon_thunk.type.7462cf.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b59: %pattern_type.f20 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9d4: %pattern_type.f20 = wrapper_binding_pattern self, %self.param_patt.b59 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %TemplateC.cpp_destructor.type: type = fn_type @TemplateC.cpp_destructor [concrete] // CHECK:STDOUT: %TemplateC.cpp_destructor: %TemplateC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.e3b, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%TemplateC.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.4b8: %SubobjectDestroy.type = facet_value %TemplateC, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.534: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.4b8) [concrete] +// CHECK:STDOUT: %Destroy.facet.943: %Destroy.type = facet_value %TemplateC, (%DestroyImpl.impl_witness.534, %custom_witness.fe1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -997,35 +929,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %TemplateC.cpp_destructor.decl: %TemplateC.cpp_destructor.type = fn_decl @TemplateC.cpp_destructor [concrete = constants.%TemplateC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f20 = ref_param_pattern [concrete = constants.%self.param_patt.b59] -// CHECK:STDOUT: %self.patt: %pattern_type.f20 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9d4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %TemplateC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %TemplateC = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1035,7 +940,7 @@ fn F() { // CHECK:STDOUT: %TemplateC.ref.loc8_30: type = name_ref TemplateC, imports.%TemplateC.decl [concrete = constants.%TemplateC] // CHECK:STDOUT: %TemplateC.ref.loc8_40: %TemplateC.TemplateC.cpp_overload_set.type = name_ref TemplateC, imports.%TemplateC.TemplateC.cpp_overload_set.value [concrete = constants.%TemplateC.TemplateC.cpp_overload_set.value] // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff] -// CHECK:STDOUT: %.loc8_3: ref %TemplateC = splice_block %c1.var {} +// CHECK:STDOUT: %.loc8_3.1: ref %TemplateC = splice_block %c1.var {} // CHECK:STDOUT: %impl.elem0.loc8: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60] // CHECK:STDOUT: %bound_method.loc8_51.1: = bound_method %int_123, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] @@ -1043,9 +948,9 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc8_51.2(%int_123) [concrete = constants.%int_123.c07] // CHECK:STDOUT: %.loc8_51.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_123.c07] // CHECK:STDOUT: %.loc8_51.2: %i32 = converted %int_123, %.loc8_51.1 [concrete = constants.%int_123.c07] -// CHECK:STDOUT: %addr.loc8: %ptr.588 = addr_of %.loc8_3 +// CHECK:STDOUT: %addr.loc8: %ptr.588 = addr_of %.loc8_3.1 // CHECK:STDOUT: %TemplateC__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%TemplateC__carbon_thunk.decl.a5784e.1(%.loc8_51.2, %addr.loc8) -// CHECK:STDOUT: %.loc8_54: init %TemplateC to %.loc8_3 = mark_in_place_init %TemplateC__carbon_thunk.call.loc8 +// CHECK:STDOUT: %.loc8_54: init %TemplateC to %.loc8_3.1 = mark_in_place_init %TemplateC__carbon_thunk.call.loc8 // CHECK:STDOUT: assign %c1.var, %.loc8_54 // CHECK:STDOUT: %.loc8_14: type = splice_block %TemplateC.ref.loc8_14 [concrete = constants.%TemplateC] { // CHECK:STDOUT: %Cpp.ref.loc8_11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1061,16 +966,16 @@ fn F() { // CHECK:STDOUT: %TemplateC.ref.loc9_37: type = name_ref TemplateC, imports.%TemplateC.decl [concrete = constants.%TemplateC] // CHECK:STDOUT: %TemplateC.ref.loc9_47: %TemplateC.TemplateC.cpp_overload_set.type = name_ref TemplateC, imports.%TemplateC.TemplateC.cpp_overload_set.value [concrete = constants.%TemplateC.TemplateC.cpp_overload_set.value] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %.loc9_3: ref %TemplateC = splice_block %c2.var {} +// CHECK:STDOUT: %.loc9_3.1: ref %TemplateC = splice_block %c2.var {} // CHECK:STDOUT: %impl.elem0.loc9: %.68a = impl_witness_access constants.%Copy.impl_witness.5e1, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc9: = bound_method %true, %impl.elem0.loc9 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method.loc9(%true) [concrete = constants.%true] // CHECK:STDOUT: %.loc9_58.1: ref bool = temporary_storage // CHECK:STDOUT: %.loc9_58.2: ref bool = temporary %.loc9_58.1, %bool.as.Copy.impl.Op.call [concrete = constants.%.e3b] // CHECK:STDOUT: %addr.loc9_62.1: %ptr.bb2 = addr_of %.loc9_58.2 [concrete = constants.%addr] -// CHECK:STDOUT: %addr.loc9_62.2: %ptr.588 = addr_of %.loc9_3 +// CHECK:STDOUT: %addr.loc9_62.2: %ptr.588 = addr_of %.loc9_3.1 // CHECK:STDOUT: %TemplateC__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%TemplateC__carbon_thunk.decl.a5784e.2(%addr.loc9_62.1, %addr.loc9_62.2) -// CHECK:STDOUT: %.loc9_62: init %TemplateC to %.loc9_3 = mark_in_place_init %TemplateC__carbon_thunk.call.loc9 +// CHECK:STDOUT: %.loc9_62: init %TemplateC to %.loc9_3.1 = mark_in_place_init %TemplateC__carbon_thunk.call.loc9 // CHECK:STDOUT: assign %c2.var, %.loc9_62 // CHECK:STDOUT: %.loc9_21: type = splice_block %TemplateC.ref.loc9_21 [concrete = constants.%TemplateC] { // CHECK:STDOUT: %Cpp.ref.loc9_18: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1087,10 +992,10 @@ fn F() { // CHECK:STDOUT: %TemplateC.ref.loc10_47: %TemplateC.TemplateC.cpp_overload_set.type = name_ref TemplateC, imports.%TemplateC.TemplateC.cpp_overload_set.value [concrete = constants.%TemplateC.TemplateC.cpp_overload_set.value] // CHECK:STDOUT: %c1.ref: ref %TemplateC = name_ref c1, %c1 // CHECK:STDOUT: %addr.loc10_58: %ptr.588 = addr_of %c1.ref -// CHECK:STDOUT: %.loc10_3: ref %TemplateC = splice_block %c3.var {} -// CHECK:STDOUT: %addr.loc10_61: %ptr.588 = addr_of %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: ref %TemplateC = splice_block %c3.var {} +// CHECK:STDOUT: %addr.loc10_61: %ptr.588 = addr_of %.loc10_3.1 // CHECK:STDOUT: %TemplateC__carbon_thunk.call.loc10: init %empty_tuple.type = call imports.%TemplateC__carbon_thunk.decl.a5784e.3(%addr.loc10_58, %addr.loc10_61) -// CHECK:STDOUT: %.loc10_61: init %TemplateC to %.loc10_3 = mark_in_place_init %TemplateC__carbon_thunk.call.loc10 +// CHECK:STDOUT: %.loc10_61: init %TemplateC to %.loc10_3.1 = mark_in_place_init %TemplateC__carbon_thunk.call.loc10 // CHECK:STDOUT: assign %c3.var, %.loc10_61 // CHECK:STDOUT: %.loc10_21: type = splice_block %TemplateC.ref.loc10_21 [concrete = constants.%TemplateC] { // CHECK:STDOUT: %Cpp.ref.loc10_18: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1101,35 +1006,34 @@ fn F() { // CHECK:STDOUT: %c3.patt: %pattern_type.f20 = ref_binding_pattern c3 [concrete = constants.%c3.patt] // CHECK:STDOUT: %c3.var_patt: %pattern_type.f20 = var_pattern %c3.patt [concrete = constants.%c3.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %c3.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%c3.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_58: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.e3b) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %c2.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9_3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%c2.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %c1.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%c1.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%TemplateC, (constants.%DestroyImpl.impl_witness.534, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%TemplateC, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%TemplateC, (constants.%DestroyImpl.impl_witness.534, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%TemplateC, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%c3.var) +// CHECK:STDOUT: %Destroy.facet.loc9_58.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc9_58.3: %Destroy.type = converted bool, %Destroy.facet.loc9_58.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc9_58.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc9_58.4: %Destroy.type = converted bool, %Destroy.facet.loc9_58.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_58: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_58.2) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%TemplateC, (constants.%DestroyImpl.impl_witness.534, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%TemplateC, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%TemplateC, (constants.%DestroyImpl.impl_witness.534, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%TemplateC, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9_3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%c2.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%TemplateC, (constants.%DestroyImpl.impl_witness.534, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%TemplateC, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%TemplateC, (constants.%DestroyImpl.impl_witness.534, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%TemplateC, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.943] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%c1.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %TemplateC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %TemplateC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %TemplateC.cpp_destructor.call: init %empty_tuple.type = call imports.%TemplateC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_implicit_single_argument.carbon // CHECK:STDOUT: @@ -1174,14 +1078,17 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.94f [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.94f, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f31: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %self.param_patt.e73: %pattern_type.bac = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a03: %pattern_type.bac = wrapper_binding_pattern self, %self.param_patt.e73 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %SingleArgC.cpp_destructor.type: type = fn_type @SingleArgC.cpp_destructor [concrete] // CHECK:STDOUT: %SingleArgC.cpp_destructor: %SingleArgC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%SingleArgC.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.036: %SubobjectDestroy.type = facet_value %SingleArgC, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.bfd: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.036) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %SingleArgC, (%DestroyImpl.impl_witness.bfd, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1200,21 +1107,8 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.9e0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.396) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.84a)] // CHECK:STDOUT: %As.impl_witness_table.1c2 = impl_witness_table (%Core.import_ref.9e0), @Core.IntLiteral.as.As.impl [concrete] -// CHECK:STDOUT: %SingleArgC.cpp_destructor.decl: %SingleArgC.cpp_destructor.type = fn_decl @SingleArgC.cpp_destructor [concrete = constants.%SingleArgC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bac = ref_param_pattern [concrete = constants.%self.param_patt.e73] -// CHECK:STDOUT: %self.patt: %pattern_type.bac = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a03] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %SingleArgC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %SingleArgC = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1268,20 +1162,19 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c2.patt: %pattern_type.bac = value_binding_pattern c2 [concrete = constants.%c2.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_37.6, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_37.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_62.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_62.3) +// CHECK:STDOUT: %Destroy.facet.loc9_37.1: %Destroy.type = facet_value constants.%SingleArgC, (constants.%DestroyImpl.impl_witness.bfd, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_37.8: %Destroy.type = converted constants.%SingleArgC, %Destroy.facet.loc9_37.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_37.2: %Destroy.type = facet_value constants.%SingleArgC, (constants.%DestroyImpl.impl_witness.bfd, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_37.9: %Destroy.type = converted constants.%SingleArgC, %Destroy.facet.loc9_37.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_37.6) +// CHECK:STDOUT: %Destroy.facet.loc8_62.1: %Destroy.type = facet_value constants.%SingleArgC, (constants.%DestroyImpl.impl_witness.bfd, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_62.5: %Destroy.type = converted constants.%SingleArgC, %Destroy.facet.loc8_62.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_62.2: %Destroy.type = facet_value constants.%SingleArgC, (constants.%DestroyImpl.impl_witness.bfd, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_62.6: %Destroy.type = converted constants.%SingleArgC, %Destroy.facet.loc8_62.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc8_62.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %SingleArgC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %SingleArgC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %SingleArgC.cpp_destructor.call: init %empty_tuple.type = call imports.%SingleArgC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_implicit_multi_arguments.carbon @@ -1334,14 +1227,17 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.94f [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.94f, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f31: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %self.param_patt.fed: %pattern_type.b5c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.585: %pattern_type.b5c = wrapper_binding_pattern self, %self.param_patt.fed [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %MultiArgC.cpp_destructor.type: type = fn_type @MultiArgC.cpp_destructor [concrete] // CHECK:STDOUT: %MultiArgC.cpp_destructor: %MultiArgC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%MultiArgC.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.676: %SubobjectDestroy.type = facet_value %MultiArgC, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.171: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.676) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %MultiArgC, (%DestroyImpl.impl_witness.171, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1365,21 +1261,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.9e0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.396) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.84a)] // CHECK:STDOUT: %As.impl_witness_table.1c2 = impl_witness_table (%Core.import_ref.9e0), @Core.IntLiteral.as.As.impl [concrete] -// CHECK:STDOUT: %MultiArgC.cpp_destructor.decl: %MultiArgC.cpp_destructor.type = fn_decl @MultiArgC.cpp_destructor [concrete = constants.%MultiArgC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b5c = ref_param_pattern [concrete = constants.%self.param_patt.fed] -// CHECK:STDOUT: %self.patt: %pattern_type.b5c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.585] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MultiArgC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MultiArgC = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1466,21 +1349,24 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c3.patt: %pattern_type.b5c = value_binding_pattern c3 [concrete = constants.%c3.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_36.6, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_36.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_59.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_59.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_62.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_62.3) +// CHECK:STDOUT: %Destroy.facet.loc10_36.1: %Destroy.type = facet_value constants.%MultiArgC, (constants.%DestroyImpl.impl_witness.171, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_36.8: %Destroy.type = converted constants.%MultiArgC, %Destroy.facet.loc10_36.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_36.2: %Destroy.type = facet_value constants.%MultiArgC, (constants.%DestroyImpl.impl_witness.171, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_36.9: %Destroy.type = converted constants.%MultiArgC, %Destroy.facet.loc10_36.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_36.6) +// CHECK:STDOUT: %Destroy.facet.loc9_59.1: %Destroy.type = facet_value constants.%MultiArgC, (constants.%DestroyImpl.impl_witness.171, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_59.5: %Destroy.type = converted constants.%MultiArgC, %Destroy.facet.loc9_59.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_59.2: %Destroy.type = facet_value constants.%MultiArgC, (constants.%DestroyImpl.impl_witness.171, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_59.6: %Destroy.type = converted constants.%MultiArgC, %Destroy.facet.loc9_59.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_59.3) +// CHECK:STDOUT: %Destroy.facet.loc8_62.1: %Destroy.type = facet_value constants.%MultiArgC, (constants.%DestroyImpl.impl_witness.171, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_62.5: %Destroy.type = converted constants.%MultiArgC, %Destroy.facet.loc8_62.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_62.2: %Destroy.type = facet_value constants.%MultiArgC, (constants.%DestroyImpl.impl_witness.171, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_62.6: %Destroy.type = converted constants.%MultiArgC, %Destroy.facet.loc8_62.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc8_62.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %MultiArgC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %MultiArgC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %MultiArgC.cpp_destructor.call: init %empty_tuple.type = call imports.%MultiArgC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/class/import/field.carbon b/toolchain/check/testdata/interop/cpp/class/import/field.carbon index 7c94d1bbf5aa..263c802b9971 100644 --- a/toolchain/check/testdata/interop/cpp/class/import/field.carbon +++ b/toolchain/check/testdata/interop/cpp/class/import/field.carbon @@ -205,9 +205,10 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Get.type.790: type = fn_type @ptr.as.OptionalStorage.impl.Get, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Get.50b: %ptr.as.OptionalStorage.impl.Get.type.790 = struct_value () [symbolic] // CHECK:STDOUT: %OptionalStorage.impl_witness.d72: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%i32) [concrete] @@ -226,18 +227,18 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %Int.as.Copy.impl.Op.cae: %Int.as.Copy.impl.Op.type.648 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.95d: %Copy.type = facet_value %i32, (%Copy.impl_witness.8af) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.95d) [concrete] -// CHECK:STDOUT: %.2b93: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] +// CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.814 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.a1a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.5c0: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Get.type (%ptr.as.OptionalStorage.impl.Get.type.790) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Get (constants.%ptr.as.OptionalStorage.impl.Get.50b)] // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.814, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.5c0, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.814, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.5c0, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] // CHECK:STDOUT: %Core.import_ref.e50: @Optional.%Optional.Get.type (%Optional.Get.type.786) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.2d0)] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] @@ -277,14 +278,14 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %.loc8_41.2: %const.f38 = acquire_value %.loc8_41.1 // CHECK:STDOUT: %.loc8_39.1: ref %i32 = deref %.loc8_41.2 // CHECK:STDOUT: %.loc8_43.1: %tuple.type.77f = tuple_literal (%.loc8_12.2, %.loc8_17.2, %.loc8_21.1, %.loc8_27.1, %.loc8_39.1) -// CHECK:STDOUT: %impl.elem0.loc8_12: %.2b93 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] +// CHECK:STDOUT: %impl.elem0.loc8_12: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] // CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0.loc8_12 // CHECK:STDOUT: %specific_fn.loc8_12: = specific_function %impl.elem0.loc8_12, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn.loc8_12 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc8_12: init %i32 = call %bound_method.loc8_12.2(%.loc8_12.2) // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return.param, element0 // CHECK:STDOUT: %.loc8_43.2: init %i32 to %tuple.elem0 = in_place_init %Int.as.Copy.impl.Op.call.loc8_12 -// CHECK:STDOUT: %impl.elem0.loc8_17: %.2b93 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] +// CHECK:STDOUT: %impl.elem0.loc8_17: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] // CHECK:STDOUT: %bound_method.loc8_17.1: = bound_method %.loc8_17.2, %impl.elem0.loc8_17 // CHECK:STDOUT: %specific_fn.loc8_17: = specific_function %impl.elem0.loc8_17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_17.2: = bound_method %.loc8_17.2, %specific_fn.loc8_17 @@ -292,7 +293,7 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %return.param, element1 // CHECK:STDOUT: %.loc8_43.3: init %i32 to %tuple.elem1 = in_place_init %Int.as.Copy.impl.Op.call.loc8_17 // CHECK:STDOUT: %.loc8_21.2: %i32 = acquire_value %.loc8_21.1 -// CHECK:STDOUT: %impl.elem0.loc8_21: %.2b93 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] +// CHECK:STDOUT: %impl.elem0.loc8_21: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] // CHECK:STDOUT: %bound_method.loc8_21.1: = bound_method %.loc8_21.2, %impl.elem0.loc8_21 // CHECK:STDOUT: %specific_fn.loc8_21: = specific_function %impl.elem0.loc8_21, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_21.2: = bound_method %.loc8_21.2, %specific_fn.loc8_21 @@ -300,7 +301,7 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %return.param, element2 // CHECK:STDOUT: %.loc8_43.4: init %i32 to %tuple.elem2 = in_place_init %Int.as.Copy.impl.Op.call.loc8_21 // CHECK:STDOUT: %.loc8_27.2: %i32 = acquire_value %.loc8_27.1 -// CHECK:STDOUT: %impl.elem0.loc8_27: %.2b93 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] +// CHECK:STDOUT: %impl.elem0.loc8_27: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] // CHECK:STDOUT: %bound_method.loc8_27.1: = bound_method %.loc8_27.2, %impl.elem0.loc8_27 // CHECK:STDOUT: %specific_fn.loc8_27: = specific_function %impl.elem0.loc8_27, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_27.2: = bound_method %.loc8_27.2, %specific_fn.loc8_27 @@ -308,7 +309,7 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %tuple.elem3: ref %i32 = tuple_access %return.param, element3 // CHECK:STDOUT: %.loc8_43.5: init %i32 to %tuple.elem3 = in_place_init %Int.as.Copy.impl.Op.call.loc8_27 // CHECK:STDOUT: %.loc8_39.2: %i32 = acquire_value %.loc8_39.1 -// CHECK:STDOUT: %impl.elem0.loc8_39: %.2b93 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] +// CHECK:STDOUT: %impl.elem0.loc8_39: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] // CHECK:STDOUT: %bound_method.loc8_39.1: = bound_method %.loc8_39.2, %impl.elem0.loc8_39 // CHECK:STDOUT: %specific_fn.loc8_39: = specific_function %impl.elem0.loc8_39, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_39.2: = bound_method %.loc8_39.2, %specific_fn.loc8_39 diff --git a/toolchain/check/testdata/interop/cpp/class/import/method.carbon b/toolchain/check/testdata/interop/cpp/class/import/method.carbon index 2e01230ccea3..53b3e65fafe8 100644 --- a/toolchain/check/testdata/interop/cpp/class/import/method.carbon +++ b/toolchain/check/testdata/interop/cpp/class/import/method.carbon @@ -242,7 +242,6 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %HasQualifiers: type = class_type @HasQualifiers [concrete] -// CHECK:STDOUT: %pattern_type.933: type = pattern_type %HasQualifiers [concrete] // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] @@ -261,8 +260,6 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: %const_ref_ref_this__carbon_thunk: %const_ref_ref_this__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %HasQualifiers.plain.cpp_overload_set.type: type = cpp_overload_set_type @HasQualifiers.plain.cpp_overload_set [concrete] // CHECK:STDOUT: %HasQualifiers.plain.cpp_overload_set.value: %HasQualifiers.plain.cpp_overload_set.type = cpp_overload_set_value @HasQualifiers.plain.cpp_overload_set [concrete] -// CHECK:STDOUT: %self.param_patt.64a: %pattern_type.933 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.181: %pattern_type.933 = wrapper_binding_pattern self, %self.param_patt.64a [concrete] // CHECK:STDOUT: %HasQualifiers.plain.type.99c640.1: type = fn_type @HasQualifiers.plain.1 [concrete] // CHECK:STDOUT: %HasQualifiers.plain.cdd9ec.1: %HasQualifiers.plain.type.99c640.1 = struct_value () [concrete] // CHECK:STDOUT: %HasQualifiers.ref_this.cpp_overload_set.type: type = cpp_overload_set_type @HasQualifiers.ref_this.cpp_overload_set [concrete] @@ -271,12 +268,17 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: %HasQualifiers.ref_this: %HasQualifiers.ref_this.type = struct_value () [concrete] // CHECK:STDOUT: %HasQualifiers.plain.type.99c640.2: type = fn_type @HasQualifiers.plain.2 [concrete] // CHECK:STDOUT: %HasQualifiers.plain.cdd9ec.2: %HasQualifiers.plain.type.99c640.2 = struct_value () [concrete] -// CHECK:STDOUT: %HasQualifiers.cpp_destructor.type: type = fn_type @HasQualifiers.cpp_destructor [concrete] -// CHECK:STDOUT: %HasQualifiers.cpp_destructor: %HasQualifiers.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %HasQualifiers.Op.type.83af6e.1: type = fn_type @HasQualifiers.Op.1 [concrete] +// CHECK:STDOUT: %HasQualifiers.Op.4dca31.1: %HasQualifiers.Op.type.83af6e.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%HasQualifiers.Op.4dca31.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a3a: %SubobjectDestroy.type = facet_value %HasQualifiers, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.658: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a3a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %HasQualifiers, (%DestroyImpl.impl_witness.658, %custom_witness.576) [concrete] // CHECK:STDOUT: %HasQualifiers.ref_ref_this.cpp_overload_set.type: type = cpp_overload_set_type @HasQualifiers.ref_ref_this.cpp_overload_set [concrete] // CHECK:STDOUT: %HasQualifiers.ref_ref_this.cpp_overload_set.value: %HasQualifiers.ref_ref_this.cpp_overload_set.type = cpp_overload_set_value @HasQualifiers.ref_ref_this.cpp_overload_set [concrete] // CHECK:STDOUT: %ref_ref_this__carbon_thunk.type: type = fn_type @ref_ref_this__carbon_thunk [concrete] @@ -288,9 +290,9 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: %ptr.e71: type = ptr_type %const.ba8 [concrete] // CHECK:STDOUT: %HasQualifiers__carbon_thunk.type: type = fn_type @HasQualifiers__carbon_thunk [concrete] // CHECK:STDOUT: %HasQualifiers__carbon_thunk: %HasQualifiers__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %HasQualifiers.Op.type: type = fn_type @HasQualifiers.Op [concrete] -// CHECK:STDOUT: %HasQualifiers.Op: %HasQualifiers.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.d0d: = custom_witness (%HasQualifiers.Op), @Copy [concrete] +// CHECK:STDOUT: %HasQualifiers.Op.type.83af6e.2: type = fn_type @HasQualifiers.Op.2 [concrete] +// CHECK:STDOUT: %HasQualifiers.Op.4dca31.2: %HasQualifiers.Op.type.83af6e.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.d0d: = custom_witness (%HasQualifiers.Op.4dca31.2), @Copy [concrete] // CHECK:STDOUT: %Copy.facet.11b: %Copy.type = facet_value %HasQualifiers, (%custom_witness.d0d) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.feb: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.11b) [concrete] // CHECK:STDOUT: %.973: type = fn_type_with_self_type %Copy.WithSelf.Op.type.feb, %Copy.facet.11b [concrete] @@ -332,11 +334,8 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %HasQualifiers.cpp_destructor.decl: %HasQualifiers.cpp_destructor.type = fn_decl @HasQualifiers.cpp_destructor [concrete = constants.%HasQualifiers.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %HasQualifiers.ref_ref_this.cpp_overload_set.value: %HasQualifiers.ref_ref_this.cpp_overload_set.type = cpp_overload_set_value @HasQualifiers.ref_ref_this.cpp_overload_set [concrete = constants.%HasQualifiers.ref_ref_this.cpp_overload_set.value] // CHECK:STDOUT: %ref_ref_this__carbon_thunk.decl: %ref_ref_this__carbon_thunk.type = fn_decl @ref_ref_this__carbon_thunk [concrete = constants.%ref_ref_this__carbon_thunk] { // CHECK:STDOUT: @@ -355,16 +354,6 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc19 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.933 = ref_param_pattern [concrete = constants.%self.param_patt.64a] -// CHECK:STDOUT: %self.patt: %pattern_type.933 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.181] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %HasQualifiers = ref_param call_param0 -// CHECK:STDOUT: %self: ref %HasQualifiers = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @F(%v.param: %HasQualifiers, %p.param: %ptr.102) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.ref.loc10: %HasQualifiers = name_ref v, %v @@ -409,9 +398,12 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: %bound_method.loc19: = bound_method %.loc19_8.2, %plain.ref.loc19 // CHECK:STDOUT: %.loc19_8.3: %HasQualifiers = acquire_value %.loc19_8.2 // CHECK:STDOUT: %HasQualifiers.plain.call.loc19: init %empty_tuple.type = call imports.%HasQualifiers.plain.decl.3d4ba8.2(%.loc19_8.3) +// CHECK:STDOUT: %Destroy.facet.loc19_8.1: %Destroy.type = facet_value constants.%HasQualifiers, (constants.%DestroyImpl.impl_witness.658, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc19_8.4: %Destroy.type = converted constants.%HasQualifiers, %Destroy.facet.loc19_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc19_8.2: %Destroy.type = facet_value constants.%HasQualifiers, (constants.%DestroyImpl.impl_witness.658, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc19_8.5: %Destroy.type = converted constants.%HasQualifiers, %Destroy.facet.loc19_8.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %.loc19_8.2, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%.loc19_8.2) +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc19_8.2) // CHECK:STDOUT: %Make.ref.loc20: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc20_8.1: ref %HasQualifiers = temporary_storage // CHECK:STDOUT: %Make.call.loc20: init %HasQualifiers to %.loc20_8.1 = call %Make.ref.loc20() @@ -420,8 +412,12 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: %bound_method.loc20: = bound_method %.loc20_8.2, %const_this.ref.loc20 // CHECK:STDOUT: %.loc20_8.3: %HasQualifiers = acquire_value %.loc20_8.2 // CHECK:STDOUT: %const_this__carbon_thunk.call.loc20: init %empty_tuple.type = call imports.%const_this__carbon_thunk.decl(%.loc20_8.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc20: = bound_method %.loc20_8.2, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc20(%.loc20_8.2) +// CHECK:STDOUT: %Destroy.facet.loc20_8.1: %Destroy.type = facet_value constants.%HasQualifiers, (constants.%DestroyImpl.impl_witness.658, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_8.4: %Destroy.type = converted constants.%HasQualifiers, %Destroy.facet.loc20_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc20_8.2: %Destroy.type = facet_value constants.%HasQualifiers, (constants.%DestroyImpl.impl_witness.658, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_8.5: %Destroy.type = converted constants.%HasQualifiers, %Destroy.facet.loc20_8.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc20: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc20_8.2) // CHECK:STDOUT: %Make.ref.loc21: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc21_8.1: ref %HasQualifiers = temporary_storage // CHECK:STDOUT: %Make.call.loc21: init %HasQualifiers to %.loc21_8.1 = call %Make.ref.loc21() @@ -430,8 +426,12 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: %bound_method.loc21: = bound_method %.loc21_8.2, %const_ref_this.ref.loc21 // CHECK:STDOUT: %.loc21_8.3: %HasQualifiers = acquire_value %.loc21_8.2 // CHECK:STDOUT: %const_ref_this__carbon_thunk.call.loc21: init %empty_tuple.type = call imports.%const_ref_this__carbon_thunk.decl(%.loc21_8.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21: = bound_method %.loc21_8.2, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21(%.loc21_8.2) +// CHECK:STDOUT: %Destroy.facet.loc21_8.1: %Destroy.type = facet_value constants.%HasQualifiers, (constants.%DestroyImpl.impl_witness.658, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc21_8.4: %Destroy.type = converted constants.%HasQualifiers, %Destroy.facet.loc21_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc21_8.2: %Destroy.type = facet_value constants.%HasQualifiers, (constants.%DestroyImpl.impl_witness.658, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc21_8.5: %Destroy.type = converted constants.%HasQualifiers, %Destroy.facet.loc21_8.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc21: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc21_8.2) // CHECK:STDOUT: %Make.ref.loc22: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc22_8.1: ref %HasQualifiers = temporary_storage // CHECK:STDOUT: %Make.call.loc22: init %HasQualifiers to %.loc22_8.1 = call %Make.ref.loc22() @@ -440,7 +440,7 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: %bound_method.loc22_9: = bound_method %.loc22_8.2, %ref_ref_this.ref // CHECK:STDOUT: %.loc22_8.3: %HasQualifiers = acquire_value %.loc22_8.2 // CHECK:STDOUT: -// CHECK:STDOUT: %impl.elem0: %.973 = impl_witness_access constants.%custom_witness.d0d, element0 [concrete = constants.%HasQualifiers.Op] +// CHECK:STDOUT: %impl.elem0: %.973 = impl_witness_access constants.%custom_witness.d0d, element0 [concrete = constants.%HasQualifiers.Op.4dca31.2] // CHECK:STDOUT: %bound_method.loc22_8: = bound_method %.loc22_8.3, %impl.elem0 // CHECK:STDOUT: %.loc22_8.4: ref %HasQualifiers = temporary_storage // CHECK:STDOUT: %Op.ref: %HasQualifiers.HasQualifiers.type = name_ref Op, imports.%HasQualifiers.HasQualifiers.decl [concrete = constants.%HasQualifiers.HasQualifiers] @@ -455,8 +455,12 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: // CHECK:STDOUT: %ref_ref_this__carbon_thunk.call: init %empty_tuple.type = call imports.%ref_ref_this__carbon_thunk.decl(%self.var) // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %.loc22_8.2, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%.loc22_8.2) +// CHECK:STDOUT: %Destroy.facet.loc22_8.1: %Destroy.type = facet_value constants.%HasQualifiers, (constants.%DestroyImpl.impl_witness.658, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc22_8.9: %Destroy.type = converted constants.%HasQualifiers, %Destroy.facet.loc22_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc22_8.2: %Destroy.type = facet_value constants.%HasQualifiers, (constants.%DestroyImpl.impl_witness.658, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc22_8.10: %Destroy.type = converted constants.%HasQualifiers, %Destroy.facet.loc22_8.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc22_8.2) // CHECK:STDOUT: %Make.ref.loc23: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc23_8.1: ref %HasQualifiers = temporary_storage // CHECK:STDOUT: %Make.call.loc23: init %HasQualifiers to %.loc23_8.1 = call %Make.ref.loc23() @@ -465,18 +469,13 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: %bound_method.loc23: = bound_method %.loc23_8.2, %const_ref_ref_this.ref.loc23 // CHECK:STDOUT: %.loc23_8.3: %HasQualifiers = acquire_value %.loc23_8.2 // CHECK:STDOUT: %const_ref_ref_this__carbon_thunk.call.loc23: init %empty_tuple.type = call imports.%const_ref_ref_this__carbon_thunk.decl(%.loc23_8.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23: = bound_method %.loc23_8.2, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23(%.loc23_8.2) +// CHECK:STDOUT: %Destroy.facet.loc23_8.1: %Destroy.type = facet_value constants.%HasQualifiers, (constants.%DestroyImpl.impl_witness.658, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_8.4: %Destroy.type = converted constants.%HasQualifiers, %Destroy.facet.loc23_8.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc23_8.2: %Destroy.type = facet_value constants.%HasQualifiers, (constants.%DestroyImpl.impl_witness.658, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc23_8.5: %Destroy.type = converted constants.%HasQualifiers, %Destroy.facet.loc23_8.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc23: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%.loc23_8.2) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19(%self.param: ref %HasQualifiers) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19(%self.param: ref %HasQualifiers) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %HasQualifiers.cpp_destructor.call: init %empty_tuple.type = call imports.%HasQualifiers.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- use_object_param_qualifiers_overloaded.carbon @@ -501,22 +500,23 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: %b.var_patt.91c254.1: %pattern_type.7dc = var_pattern %b.patt.4a7b07.1 [concrete] // CHECK:STDOUT: %NoRefQualifier.F.type.8b6eff.2: type = fn_type @NoRefQualifier.F.2 [concrete] // CHECK:STDOUT: %NoRefQualifier.F.dbb5f5.2: %NoRefQualifier.F.type.8b6eff.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.6cc: %pattern_type.7dc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a12: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt.6cc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d4d: %SubobjectDestroy.type = facet_value %ptr.a17, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b8f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d4d) [concrete] +// CHECK:STDOUT: %Destroy.facet.abb: %Destroy.type = facet_value %ptr.a17, (%DestroyImpl.impl_witness.b8f, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %WithRefQualifier: type = class_type @WithRefQualifier [concrete] // CHECK:STDOUT: %ptr.90c: type = ptr_type %WithRefQualifier [concrete] // CHECK:STDOUT: %a.patt.1ddf80.2: %pattern_type.d94 = ref_binding_pattern a [concrete] @@ -543,6 +543,8 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %WithRefQualifier.F.cpp_overload_set.value: %WithRefQualifier.F.cpp_overload_set.type = cpp_overload_set_value @WithRefQualifier.F.cpp_overload_set [concrete = constants.%WithRefQualifier.F.cpp_overload_set.value] // CHECK:STDOUT: %F__carbon_thunk.decl.828b0d.2: %F__carbon_thunk.type.8cce43.2 = fn_decl @F__carbon_thunk.2 [concrete = constants.%F__carbon_thunk.a92106.2] { // CHECK:STDOUT: @@ -556,37 +558,6 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @CallFNoRefQualifier(%v.param: %NoRefQualifier, %p.param: %ptr.f7d) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.var: ref %i32 = var_storage %a.var_patt @@ -617,34 +588,24 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: %b.patt: %pattern_type.7dc = ref_binding_pattern b [concrete = constants.%b.patt.4a7b07.1] // CHECK:STDOUT: %b.var_patt: %pattern_type.7dc = var_pattern %b.patt [concrete = constants.%b.var_patt.91c254.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %ptr.a17) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %ptr.a17) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %ptr.a17) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %ptr.a17) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @CallFWithRefQualifier(%v.param: %WithRefQualifier, %p.param: %ptr.90c) { // CHECK:STDOUT: !entry: @@ -676,10 +637,18 @@ fn Call(e: Cpp.ExplicitObjectParamOverloaded, n: i32, a: Cpp.AnotherOverloaded) // CHECK:STDOUT: %b.patt: %pattern_type.7dc = ref_binding_pattern b [concrete = constants.%b.patt.4a7b07.2] // CHECK:STDOUT: %b.var_patt: %pattern_type.7dc = var_pattern %b.patt [concrete = constants.%b.var_patt.91c254.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc16_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/class/import/template.carbon b/toolchain/check/testdata/interop/cpp/class/import/template.carbon index e6ebd4b628ee..f2ba333f02ad 100644 --- a/toolchain/check/testdata/interop/cpp/class/import/template.carbon +++ b/toolchain/check/testdata/interop/cpp/class/import/template.carbon @@ -695,15 +695,15 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %E.type: type = cpp_type_template_type E [concrete] // CHECK:STDOUT: %E.template: %E.type = struct_value () [concrete] -// CHECK:STDOUT: %.a92: type = template_inst %T [template] +// CHECK:STDOUT: %.a92: type = template_inst %T.67d [template] // CHECK:STDOUT: %.3844e2.1: type = type_of_inst @F.%.loc10_24.5 [template] // CHECK:STDOUT: %.d48a93.1: %.3844e2.1 = splice_inst @F.%.loc10_24.5 [template] // CHECK:STDOUT: %.537: type = splice_inst @F.%.loc10_24.8 [template] @@ -719,16 +719,12 @@ fn G() { // CHECK:STDOUT: %.e0a: %.5d0 = splice_inst @F.%.loc10_39.3 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.5d6: %.537 = splice_inst @F.%tuple.elem0 [template] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.869: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.c97: %Destroy.WithSelf.SelfDestruct.type.869 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.df0 [concrete] -// CHECK:STDOUT: %.8cb: type = type_of_inst @F.%.loc10_3.8 [template] -// CHECK:STDOUT: %.c23: %.8cb = splice_inst @F.%.loc10_3.8 [template] -// CHECK:STDOUT: %.57c: type = type_of_inst @F.%.loc10_3.11 [template] -// CHECK:STDOUT: %.e63: %.57c = splice_inst @F.%.loc10_3.11 [template] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %.700: type = type_of_inst @F.%.loc10_3.6 [template] +// CHECK:STDOUT: %.180: %.700 = splice_inst @F.%.loc10_3.6 [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] @@ -766,28 +762,26 @@ fn G() { // CHECK:STDOUT: %.476: init %E = splice_block %.2c5 {} // CHECK:STDOUT: } // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%inst.splice_block.426619.5) [concrete] -// CHECK:STDOUT: %self.param_patt.6c0: %pattern_type.9ed = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1b3: %pattern_type.9ed = wrapper_binding_pattern self, %self.param_patt.6c0 [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %E.cpp_destructor.type: type = fn_type @E.cpp_destructor [concrete] // CHECK:STDOUT: %E.cpp_destructor: %E.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.842: = custom_witness (%Destroy.WithSelf.Op.403, %E.cpp_destructor, %Destroy.WithSelf.SelfDestruct.db3), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.f9b: %Destroy.type = facet_value %E, (%custom_witness.842) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.ec8: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.f9b) [concrete] -// CHECK:STDOUT: %.ea4: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.ec8, %Destroy.facet.f9b [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%E.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.09b: %SubobjectDestroy.type = facet_value %E, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.09b) [concrete] +// CHECK:STDOUT: %Destroy.facet.ac4b54.1: %Destroy.type = facet_value %E, (%DestroyImpl.impl_witness.6e5, %custom_witness.fe1) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.6: = inst_value [concrete] { -// CHECK:STDOUT: %.6ee: = splice_block %bound_method { +// CHECK:STDOUT: %.79f: init %empty_tuple.type = splice_block %SelfDestruct.call { // CHECK:STDOUT: %.efc445.1: ref %E = specific_inst @F.%a.var, @F(%i32) -// CHECK:STDOUT: %impl.elem2: %.ea4 = impl_witness_access %custom_witness.842, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3] -// CHECK:STDOUT: %bound_method: = bound_method %.efc445.1, %impl.elem2 +// CHECK:STDOUT: %Destroy.facet.ac4b54.2: %Destroy.type = facet_value %E, (%DestroyImpl.impl_witness.6e5, %custom_witness.fe1) [concrete = %Destroy.facet.ac4b54.1] +// CHECK:STDOUT: %.8fdcd6.1: %Destroy.type = converted %E, %Destroy.facet.ac4b54.2 [concrete = %Destroy.facet.ac4b54.1] +// CHECK:STDOUT: %Destroy.facet.ac4b54.3: %Destroy.type = facet_value %E, (%DestroyImpl.impl_witness.6e5, %custom_witness.fe1) [concrete = %Destroy.facet.ac4b54.1] +// CHECK:STDOUT: %.8fdcd6.2: %Destroy.type = converted %E, %Destroy.facet.ac4b54.3 [concrete = %Destroy.facet.ac4b54.1] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1f11d4.2(%.efc445.1) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %.6ee(%.efc445.1) -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -796,7 +790,6 @@ fn G() { // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } // CHECK:STDOUT: %E.template: %E.type = struct_value () [concrete = constants.%E.template] -// CHECK:STDOUT: %Core.import_ref.df0: @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct.type (%Destroy.WithSelf.SelfDestruct.type.869) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct (constants.%Destroy.WithSelf.SelfDestruct.c97)] // CHECK:STDOUT: %E.decl: type = class_decl @E [concrete = constants.%E] {} {} // CHECK:STDOUT: %E.E.cpp_overload_set.value: %E.E.cpp_overload_set.type = cpp_overload_set_value @E.E.cpp_overload_set [concrete = constants.%E.E.cpp_overload_set.value] // CHECK:STDOUT: %E__carbon_thunk.decl: %E__carbon_thunk.type = fn_decl @E__carbon_thunk [concrete = constants.%E__carbon_thunk] { @@ -804,38 +797,25 @@ fn G() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %E.cpp_destructor.decl: %E.cpp_destructor.type = fn_decl @E.cpp_destructor [concrete = constants.%E.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ed = ref_param_pattern [concrete = constants.%self.param_patt.6c0] -// CHECK:STDOUT: %self.patt: %pattern_type.9ed = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1b3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %E = ref_param call_param0 -// CHECK:STDOUT: %self: ref %E = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc9_15.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.2 [concrete = type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %.loc9_17.2: type = type_literal type [concrete = type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc9_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T)] +// CHECK:STDOUT: %T.loc9_15.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T.67d)] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc9_15.2: type) { -// CHECK:STDOUT: %T.patt.loc9_15.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc9_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc9_15.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_15.2 (constants.%T.patt.3a0592.1)] +// CHECK:STDOUT: %T.loc9_15.1: type = symbolic_binding T, 0 [symbolic = %T.loc9_15.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc10_23.2: type = template_inst %T.loc9_15.1 [template = %.loc10_23.2 (constants.%.a92)] @@ -857,22 +837,19 @@ fn G() { // CHECK:STDOUT: %.loc10_39.3: = call_action (%.loc10_36.2), false [template] // CHECK:STDOUT: %.loc10_39.4: type = type_of_inst %.loc10_39.3 [template = %.loc10_39.4 (constants.%.5d0)] // CHECK:STDOUT: %.loc10_39.5: @F.%.loc10_39.4 (%.5d0) = splice_inst %.loc10_39.3 [template = %.loc10_39.5 (constants.%.e0a)] -// CHECK:STDOUT: %.loc10_3.6: %tuple.type = initialize_action %.loc10_39.2, %.loc10_24.9, %a.var, none, false [template] -// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc10_3.6, element0 [template] -// CHECK:STDOUT: %.loc10_3.7: @F.%.loc10_24.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc10_3.7 (constants.%.5d6)] -// CHECK:STDOUT: %.loc10_3.8: = compound_member_access_action %a.var, constants.%assoc2 [template] -// CHECK:STDOUT: %.loc10_3.9: type = type_of_inst %.loc10_3.8 [template = %.loc10_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc10_3.10: @F.%.loc10_3.9 (%.8cb) = splice_inst %.loc10_3.8 [template = %.loc10_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc10_3.11: = call_action (%.loc10_3.3), true [template] -// CHECK:STDOUT: %.loc10_3.12: type = type_of_inst %.loc10_3.11 [template = %.loc10_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc10_3.13: @F.%.loc10_3.12 (%.57c) = splice_inst %.loc10_3.11 [template = %.loc10_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc10_3.4: %tuple.type = initialize_action %.loc10_39.2, %.loc10_24.9, %a.var, none, false [template] +// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc10_3.4, element0 [template] +// CHECK:STDOUT: %.loc10_3.5: @F.%.loc10_24.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc10_3.5 (constants.%.5d6)] +// CHECK:STDOUT: %.loc10_3.6: = call_action (constants.%SelfDestruct, %a.var), true [template] +// CHECK:STDOUT: %.loc10_3.7: type = type_of_inst %.loc10_3.6 [template = %.loc10_3.7 (constants.%.700)] +// CHECK:STDOUT: %.loc10_3.8: @F.%.loc10_3.7 (%.700) = splice_inst %.loc10_3.6 [template = %.loc10_3.8 (constants.%.180)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.var: ref @F.%.loc10_24.9 (%.537) = var_storage %a.var_patt.loc10_3.1 // CHECK:STDOUT: %Cpp.ref.loc10_28: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %E.ref.loc10_31: %E.type = name_ref E, imports.%E.template [concrete = constants.%E.template] -// CHECK:STDOUT: %T.ref.loc10_34: type = name_ref T, %T.loc9_15.2 [symbolic = %T.loc9_15.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc10_34: type = name_ref T, %T.loc9_15.2 [symbolic = %T.loc9_15.1 (constants.%T.67d)] // CHECK:STDOUT: %.loc10_34: type = template_inst %T.ref.loc10_34 [template = %.loc10_23.2 (constants.%.a92)] // CHECK:STDOUT: %.loc10_35.1: type = type_of_inst %.loc10_35.3 [template = %.loc10_35.4 (constants.%.3844e2.2)] // CHECK:STDOUT: %.loc10_35.2: @F.%.loc10_35.4 (%.3844e2.2) = splice_inst %.loc10_35.3 [template = %.loc10_35.5 (constants.%.d48a93.2)] @@ -880,12 +857,12 @@ fn G() { // CHECK:STDOUT: %.loc10_36.2: @F.%.loc10_36.4 (%.9f0) = splice_inst %.loc10_36.3 [template = %.loc10_36.5 (constants.%.e5d)] // CHECK:STDOUT: %.loc10_39.1: type = type_of_inst %.loc10_39.3 [template = %.loc10_39.4 (constants.%.5d0)] // CHECK:STDOUT: %.loc10_39.2: @F.%.loc10_39.4 (%.5d0) = splice_inst %.loc10_39.3 [template = %.loc10_39.5 (constants.%.e0a)] -// CHECK:STDOUT: %.loc10_3.1: @F.%.loc10_24.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc10_3.7 (constants.%.5d6)] +// CHECK:STDOUT: %.loc10_3.1: @F.%.loc10_24.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc10_3.5 (constants.%.5d6)] // CHECK:STDOUT: assign %a.var, %.loc10_3.1 // CHECK:STDOUT: %.loc10_24.1: type = splice_block %.loc10_24.4 [template = %.loc10_24.9 (constants.%.537)] { // CHECK:STDOUT: %Cpp.ref.loc10_17: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %E.ref.loc10_20: %E.type = name_ref E, imports.%E.template [concrete = constants.%E.template] -// CHECK:STDOUT: %T.ref.loc10_23: type = name_ref T, %T.loc9_15.2 [symbolic = %T.loc9_15.1 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc10_23: type = name_ref T, %T.loc9_15.2 [symbolic = %T.loc9_15.1 (constants.%T.67d)] // CHECK:STDOUT: %.loc10_23.1: type = template_inst %T.ref.loc10_23 [template = %.loc10_23.2 (constants.%.a92)] // CHECK:STDOUT: %.loc10_24.2: type = type_of_inst %.loc10_24.5 [template = %.loc10_24.6 (constants.%.3844e2.1)] // CHECK:STDOUT: %.loc10_24.3: @F.%.loc10_24.6 (%.3844e2.1) = splice_inst %.loc10_24.5 [template = %.loc10_24.7 (constants.%.d48a93.1)] @@ -896,30 +873,19 @@ fn G() { // CHECK:STDOUT: %a.patt.loc10_15.1: @F.%pattern_type (%pattern_type.fcb) = ref_binding_pattern a [template = %a.patt.loc10_15.2 (constants.%a.patt.970)] // CHECK:STDOUT: %a.var_patt.loc10_3.1: @F.%pattern_type (%pattern_type.fcb) = var_pattern %a.patt.loc10_15.1 [template = %a.var_patt.loc10_3.2 (constants.%a.var_patt.98f)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_3.2: type = type_of_inst %.loc10_3.8 [template = %.loc10_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc10_3.3: @F.%.loc10_3.9 (%.8cb) = splice_inst %.loc10_3.8 [template = %.loc10_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc10_3.4: type = type_of_inst %.loc10_3.11 [template = %.loc10_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc10_3.5: @F.%.loc10_3.12 (%.57c) = splice_inst %.loc10_3.11 [template = %.loc10_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc10_3.2: type = type_of_inst %.loc10_3.6 [template = %.loc10_3.7 (constants.%.700)] +// CHECK:STDOUT: %.loc10_3.3: @F.%.loc10_3.7 (%.700) = splice_inst %.loc10_3.6 [template = %.loc10_3.8 (constants.%.180)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %E) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %E) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %E.cpp_destructor.call: init %empty_tuple.type = call imports.%E.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc9_15.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc9_15.1 => constants.%T +// CHECK:STDOUT: specific @F(constants.%T.67d) { +// CHECK:STDOUT: %T.patt.loc9_15.2 => constants.%T.patt.3a0592.1 +// CHECK:STDOUT: %T.loc9_15.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%i32) { -// CHECK:STDOUT: %T.patt.loc9_15.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc9_15.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc9_15.1 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -942,14 +908,11 @@ fn G() { // CHECK:STDOUT: %.loc10_39.3 => constants.%inst.splice_block.426619.4 // CHECK:STDOUT: %.loc10_39.4 => constants.%E // CHECK:STDOUT: %.loc10_39.5 => -// CHECK:STDOUT: %.loc10_3.6 => constants.%tuple +// CHECK:STDOUT: %.loc10_3.4 => constants.%tuple // CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.5 -// CHECK:STDOUT: %.loc10_3.7 => -// CHECK:STDOUT: %.loc10_3.8 => constants.%inst.splice_block.426619.6 -// CHECK:STDOUT: %.loc10_3.9 => -// CHECK:STDOUT: %.loc10_3.10 => -// CHECK:STDOUT: %.loc10_3.11 => constants.%inst.call -// CHECK:STDOUT: %.loc10_3.12 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc10_3.13 => +// CHECK:STDOUT: %.loc10_3.5 => +// CHECK:STDOUT: %.loc10_3.6 => constants.%inst.splice_block.426619.6 +// CHECK:STDOUT: %.loc10_3.7 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc10_3.8 => // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/enum/anonymous.carbon b/toolchain/check/testdata/interop/cpp/enum/anonymous.carbon index 62ab51636324..409f1be9f7ca 100644 --- a/toolchain/check/testdata/interop/cpp/enum/anonymous.carbon +++ b/toolchain/check/testdata/interop/cpp/enum/anonymous.carbon @@ -53,7 +53,6 @@ fn G() { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %C.C.cpp_overload_set.type: type = cpp_overload_set_type @C.C.cpp_overload_set [concrete] // CHECK:STDOUT: %C.C.cpp_overload_set.value: %C.C.cpp_overload_set.type = cpp_overload_set_value @C.C.cpp_overload_set [concrete] -// CHECK:STDOUT: %pattern_type.bbc: type = pattern_type %C [concrete] // CHECK:STDOUT: %ptr.0a2: type = ptr_type %C [concrete] // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete] // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] @@ -63,14 +62,17 @@ fn G() { // CHECK:STDOUT: %int_1.1fb: %.2b9 = int_value 1 [concrete] // CHECK:STDOUT: %C.F.type: type = fn_type @C.F [concrete] // CHECK:STDOUT: %C.F: %C.F.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e2f: %pattern_type.bbc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.790: %pattern_type.bbc = wrapper_binding_pattern self, %self.param_patt.e2f [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %C.cpp_destructor.type: type = fn_type @C.cpp_destructor [concrete] // CHECK:STDOUT: %C.cpp_destructor: %C.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%C.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e40: %SubobjectDestroy.type = facet_value %C, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.eb3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e40) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.eb3, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -101,21 +103,8 @@ fn G() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C.cpp_destructor.decl: %C.cpp_destructor.type = fn_decl @C.cpp_destructor [concrete = constants.%C.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bbc = ref_param_pattern [concrete = constants.%self.param_patt.e2f] -// CHECK:STDOUT: %self.patt: %pattern_type.bbc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.790] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -144,17 +133,12 @@ fn G() { // CHECK:STDOUT: %e.ref: %.2b9 = name_ref e, imports.%int_1.1fb [concrete = constants.%int_1.1fb] // CHECK:STDOUT: %.loc10_11.4: %C = acquire_value %.loc10_11.3 // CHECK:STDOUT: %C.F.call: init %empty_tuple.type = call imports.%C.F.decl(%.loc10_11.4, %e.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc10_11.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc10_11.3) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call imports.%C.cpp_destructor.decl(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc10_11.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.eb3, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_11.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_11.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_11.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.eb3, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_11.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_11.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc10_11.3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/enum/copy.carbon b/toolchain/check/testdata/interop/cpp/enum/copy.carbon index 7548d3dfdacb..ec1849dd52df 100644 --- a/toolchain/check/testdata/interop/cpp/enum/copy.carbon +++ b/toolchain/check/testdata/interop/cpp/enum/copy.carbon @@ -50,14 +50,17 @@ fn F() { // CHECK:STDOUT: %Copy.WithSelf.Op.bound.996: = bound_method %int_0, %Copy.WithSelf.Op.416 [concrete] // CHECK:STDOUT: %int_1: %Enum = int_value 1 [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.bound.1a9: = bound_method %int_1, %Copy.WithSelf.Op.416 [concrete] -// CHECK:STDOUT: %self.param_patt.95d: %pattern_type.926 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.228: %pattern_type.926 = wrapper_binding_pattern self, %self.param_patt.95d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.496: %SubobjectDestroy.type = facet_value %Enum, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.496) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Enum, (%DestroyImpl.impl_witness.e12, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,23 +71,8 @@ fn F() { // CHECK:STDOUT: %Enum.decl: type = class_decl @Enum [concrete = constants.%Enum] {} {} // CHECK:STDOUT: %int_0: %Enum = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %int_1: %Enum = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.926 = ref_param_pattern [concrete = constants.%self.param_patt.95d] -// CHECK:STDOUT: %self.patt: %pattern_type.926 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.228] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Enum = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Enum = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.926 = ref_param_pattern [concrete = constants.%self.param_patt.95d] -// CHECK:STDOUT: %self.patt: %pattern_type.926 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.228] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Enum = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Enum = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -102,7 +90,7 @@ fn F() { // CHECK:STDOUT: %bound_method.loc8: = bound_method %a.ref.loc8, %impl.elem0.loc8 [concrete = constants.%Copy.WithSelf.Op.bound.996] // CHECK:STDOUT: %Copy.WithSelf.Op.call.loc8: init %Enum = call %bound_method.loc8(%a.ref.loc8) [concrete = constants.%int_0] // CHECK:STDOUT: assign %a.var, %Copy.WithSelf.Op.call.loc8 -// CHECK:STDOUT: %.loc8: type = splice_block %Enum.ref.loc8_13 [concrete = constants.%Enum] { +// CHECK:STDOUT: %.loc8_13: type = splice_block %Enum.ref.loc8_13 [concrete = constants.%Enum] { // CHECK:STDOUT: %Cpp.ref.loc8_10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Enum.ref.loc8_13: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum] // CHECK:STDOUT: } @@ -119,19 +107,14 @@ fn F() { // CHECK:STDOUT: %bound_method.loc10: = bound_method %b.ref, %impl.elem0.loc10 [concrete = constants.%Copy.WithSelf.Op.bound.1a9] // CHECK:STDOUT: %Copy.WithSelf.Op.call.loc10: init %Enum = call %bound_method.loc10(%b.ref) [concrete = constants.%int_1] // CHECK:STDOUT: assign %a.ref.loc10, %Copy.WithSelf.Op.call.loc10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Enum, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.1: %Destroy.type = converted constants.%Enum, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Enum, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Enum, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %Enum) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %Enum) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %Enum) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %Enum) = "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 44776c974d0e..cff7c77c0e88 100644 --- a/toolchain/check/testdata/interop/cpp/function/export/generic.carbon +++ b/toolchain/check/testdata/interop/cpp/function/export/generic.carbon @@ -167,13 +167,13 @@ void CallUnsupportedF() { // CHECK:STDOUT: %D.val: %D = struct_value () [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.5d74: type = pattern_type %Z.type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.5d74 = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: %Z.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.4a7: %pattern_type.5d74 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.013: %Z.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %C.type: type = parameterized_class_name_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] -// CHECK:STDOUT: %C.ccf: type = class_type @C, @C(%T) [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.cab: type = pattern_type %T.as_type [symbolic] +// CHECK:STDOUT: %C.ccf: type = class_type @C, @C(%T.013) [symbolic] +// CHECK:STDOUT: %T.as_type.ff1: type = facet_access_type %T.013 [symbolic] +// CHECK:STDOUT: %pattern_type.cab: type = pattern_type %T.as_type.ff1 [symbolic] // CHECK:STDOUT: %t.param_patt.571: %pattern_type.cab = value_param_pattern [symbolic] // CHECK:STDOUT: %t.patt.a08: %pattern_type.cab = wrapper_binding_pattern t, %t.param_patt.571 [symbolic] // CHECK:STDOUT: %.20e: Core.Form = init_form %C.ccf [symbolic] @@ -182,25 +182,21 @@ void CallUnsupportedF() { // CHECK:STDOUT: %return.patt.a2c: %pattern_type.aa1 = return_slot_pattern %return.param_patt.c22, %C.ccf [symbolic] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [concrete] // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.e12: = require_complete_type %T.as_type [symbolic] +// CHECK:STDOUT: %require_complete.e12: = require_complete_type %T.as_type.ff1 [symbolic] // CHECK:STDOUT: %require_complete.f24: = require_complete_type %C.ccf [symbolic] // CHECK:STDOUT: %C.val.d67: %C.ccf = struct_value () [symbolic] // CHECK:STDOUT: %C.a55: type = class_type @C, @C(%Z.facet) [concrete] -// CHECK:STDOUT: %self.param_patt.b8e: %pattern_type.d8d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.86b: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt.b8e [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_9.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_9.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_9.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_9.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_9.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_9.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f61: %SubobjectDestroy.type = facet_value %D, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.30f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f61) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %D, (%DestroyImpl.impl_witness.30f, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %t.param_patt.862: %pattern_type.d8d = value_param_pattern [concrete] // CHECK:STDOUT: %t.patt.0d1: %pattern_type.d8d = wrapper_binding_pattern t, %t.param_patt.862 [concrete] // CHECK:STDOUT: %.c15: Core.Form = init_form %C.a55 [concrete] @@ -215,37 +211,8 @@ void CallUnsupportedF() { // CHECK:STDOUT: %Cpp: = namespace file.%Cpp.import_cpp, [concrete] { // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_9.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_9.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_9.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8d = ref_param_pattern [concrete = constants.%self.param_patt.b8e] -// CHECK:STDOUT: %self.patt: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.86b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_9.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8d = ref_param_pattern [concrete = constants.%self.param_patt.b8e] -// CHECK:STDOUT: %self.patt: %pattern_type.d8d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.86b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %D = ref_param call_param0 -// CHECK:STDOUT: %self: ref %D = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -266,37 +233,37 @@ void CallUnsupportedF() { // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { -// CHECK:STDOUT: %T.patt.loc11_10.1: %pattern_type.5d74 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc11_10.1: %pattern_type.5d74 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt.4a7)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc11_12: type = splice_block %Z.ref [concrete = constants.%Z.type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc11_10.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc11_10.1 (constants.%T)] +// CHECK:STDOUT: %T.loc11_10.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc11_10.1 (constants.%T.013)] // CHECK:STDOUT: } // CHECK:STDOUT: %MakeC.decl: %MakeC.type = fn_decl @MakeC [concrete = constants.%MakeC] { -// CHECK:STDOUT: %T.patt.loc12_11.1: %pattern_type.5d74 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_11.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc12_11.1: %pattern_type.5d74 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_11.2 (constants.%T.patt.4a7)] // CHECK:STDOUT: %t.param_patt.loc12_24.1: @MakeC.%pattern_type.loc12_24 (%pattern_type.cab) = value_param_pattern [symbolic = %t.param_patt.loc12_24.2 (constants.%t.param_patt.571)] // CHECK:STDOUT: %t.patt.loc12_24.1: @MakeC.%pattern_type.loc12_24 (%pattern_type.cab) = wrapper_binding_pattern t, %t.param_patt.loc12_24.1 [symbolic = %t.patt.loc12_24.2 (constants.%t.patt.a08)] // CHECK:STDOUT: %return.param_patt.loc12_35.1: @MakeC.%pattern_type.loc12_35 (%pattern_type.aa1) = out_param_pattern [symbolic = %return.param_patt.loc12_35.2 (constants.%return.param_patt.c22)] // CHECK:STDOUT: %return.patt.loc12_29.1: @MakeC.%pattern_type.loc12_35 (%pattern_type.aa1) = return_slot_pattern %return.param_patt.loc12_35.1, %C.loc12_35.2 [symbolic = %return.patt.loc12_29.2 (constants.%return.patt.a2c)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %T.ref.loc12_34: %Z.type = name_ref T, %T.loc12_11.2 [symbolic = %T.loc12_11.1 (constants.%T)] -// CHECK:STDOUT: %C.loc12_35.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc12_35.1 (constants.%C.ccf)] +// CHECK:STDOUT: %T.ref.loc12_34: %Z.type = name_ref T, %T.loc12_11.2 [symbolic = %T.loc12_11.1 (constants.%T.013)] +// CHECK:STDOUT: %C.loc12_35.2: type = class_type @C, @C(constants.%T.013) [symbolic = %C.loc12_35.1 (constants.%C.ccf)] // CHECK:STDOUT: %.loc12_35.2: Core.Form = init_form %C.loc12_35.2 [symbolic = %.loc12_35.1 (constants.%.20e)] // CHECK:STDOUT: %.loc12_13: type = splice_block %Z.ref [concrete = constants.%Z.type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc12_11.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc12_11.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @MakeC.%T.as_type.loc12_26.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc12_26.1: type = splice_block %.loc12_26.2 [symbolic = %T.as_type.loc12_26.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc12_26: %Z.type = name_ref T, %T.loc12_11.2 [symbolic = %T.loc12_11.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc12_26.2: type = facet_access_type %T.ref.loc12_26 [symbolic = %T.as_type.loc12_26.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc12_26.2: type = converted %T.ref.loc12_26, %T.as_type.loc12_26.2 [symbolic = %T.as_type.loc12_26.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc12_11.2: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc12_11.1 (constants.%T.013)] +// CHECK:STDOUT: %t.param: @MakeC.%T.as_type.loc12_26.1 (%T.as_type.ff1) = value_param call_param0 +// CHECK:STDOUT: %.loc12_26.1: type = splice_block %.loc12_26.2 [symbolic = %T.as_type.loc12_26.1 (constants.%T.as_type.ff1)] { +// CHECK:STDOUT: %T.ref.loc12_26: %Z.type = name_ref T, %T.loc12_11.2 [symbolic = %T.loc12_11.1 (constants.%T.013)] +// CHECK:STDOUT: %T.as_type.loc12_26.2: type = facet_access_type %T.ref.loc12_26 [symbolic = %T.as_type.loc12_26.1 (constants.%T.as_type.ff1)] +// CHECK:STDOUT: %.loc12_26.2: type = converted %T.ref.loc12_26, %T.as_type.loc12_26.2 [symbolic = %T.as_type.loc12_26.1 (constants.%T.as_type.ff1)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @MakeC.%T.as_type.loc12_26.1 (%T.as_type) = wrapper_binding t, %t.param +// CHECK:STDOUT: %t: @MakeC.%T.as_type.loc12_26.1 (%T.as_type.ff1) = wrapper_binding t, %t.param // CHECK:STDOUT: %return.param: ref @MakeC.%C.loc12_35.1 (%C.ccf) = out_param call_param1 // CHECK:STDOUT: %return: ref @MakeC.%C.loc12_35.1 (%C.ccf) = return_slot %return.param // CHECK:STDOUT: } @@ -340,8 +307,8 @@ void CallUnsupportedF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(%T.loc11_10.2: %Z.type) { -// CHECK:STDOUT: %T.patt.loc11_10.2: %pattern_type.5d74 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc11_10.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc11_10.1 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc11_10.2: %pattern_type.5d74 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_10.2 (constants.%T.patt.4a7)] +// CHECK:STDOUT: %T.loc11_10.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc11_10.1 (constants.%T.013)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -372,9 +339,9 @@ void CallUnsupportedF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @MakeC(%T.loc12_11.2: %Z.type) { -// CHECK:STDOUT: %T.patt.loc12_11.2: %pattern_type.5d74 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_11.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc12_11.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc12_11.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc12_26.1: type = facet_access_type %T.loc12_11.1 [symbolic = %T.as_type.loc12_26.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.patt.loc12_11.2: %pattern_type.5d74 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_11.2 (constants.%T.patt.4a7)] +// CHECK:STDOUT: %T.loc12_11.1: %Z.type = symbolic_binding T, 0 [symbolic = %T.loc12_11.1 (constants.%T.013)] +// CHECK:STDOUT: %T.as_type.loc12_26.1: type = facet_access_type %T.loc12_11.1 [symbolic = %T.as_type.loc12_26.1 (constants.%T.as_type.ff1)] // CHECK:STDOUT: %pattern_type.loc12_24: type = pattern_type %T.as_type.loc12_26.1 [symbolic = %pattern_type.loc12_24 (constants.%pattern_type.cab)] // CHECK:STDOUT: %t.param_patt.loc12_24.2: @MakeC.%pattern_type.loc12_24 (%pattern_type.cab) = value_param_pattern [symbolic = %t.param_patt.loc12_24.2 (constants.%t.param_patt.571)] // CHECK:STDOUT: %t.patt.loc12_24.2: @MakeC.%pattern_type.loc12_24 (%pattern_type.cab) = wrapper_binding_pattern t, %t.param_patt.loc12_24.2 [symbolic = %t.patt.loc12_24.2 (constants.%t.patt.a08)] @@ -389,12 +356,12 @@ void CallUnsupportedF() { // CHECK:STDOUT: %require_complete.loc12_29: = require_complete_type %C.loc12_35.1 [symbolic = %require_complete.loc12_29 (constants.%require_complete.f24)] // CHECK:STDOUT: %C.val: @MakeC.%C.loc12_35.1 (%C.ccf) = struct_value () [symbolic = %C.val (constants.%C.val.d67)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @MakeC.%T.as_type.loc12_26.1 (%T.as_type)) -> out %return.param: @MakeC.%C.loc12_35.1 (%C.ccf) { +// CHECK:STDOUT: fn(%t.param: @MakeC.%T.as_type.loc12_26.1 (%T.as_type.ff1)) -> out %return.param: @MakeC.%C.loc12_35.1 (%C.ccf) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc13_11: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %C.ref.loc13: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %T.ref.loc13: %Z.type = name_ref T, %T.loc12_11.2 [symbolic = %T.loc12_11.1 (constants.%T)] -// CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%T) [symbolic = %C.loc12_35.1 (constants.%C.ccf)] +// CHECK:STDOUT: %T.ref.loc13: %Z.type = name_ref T, %T.loc12_11.2 [symbolic = %T.loc12_11.1 (constants.%T.013)] +// CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%T.013) [symbolic = %C.loc12_35.1 (constants.%C.ccf)] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc13_13.1: @MakeC.%C.loc12_35.1 (%C.ccf) = as_compatible %empty_struct [symbolic = %C.val (constants.%C.val.d67)] // CHECK:STDOUT: %.loc13_13.2: @MakeC.%C.loc12_35.1 (%C.ccf) = converted %.loc13_11, %.loc13_13.1 [symbolic = %C.val (constants.%C.val.d67)] @@ -416,32 +383,18 @@ void CallUnsupportedF() { // CHECK:STDOUT: // CHECK:STDOUT: fn @D.__destroy_thunk(%self.param: ref %D) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %self.param, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc7_9.1: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_9.1: %Destroy.type = converted constants.%D, %Destroy.facet.loc7_9.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_9.2: %Destroy.type = facet_value constants.%D, (constants.%DestroyImpl.impl_witness.30f, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_9.2: %Destroy.type = converted constants.%D, %Destroy.facet.loc7_9.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_9.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_9.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_9.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_9.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_9.2(%self.param: ref %D) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_9.2(%self.param: ref %D) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_9.2(%self.param: ref %D) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_9.2(%self.param: ref %D) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeC__carbon_thunk.f705bed865f18cbf(%_.param.loc12_37.1: ref %D, %_.param.loc12_37.2: ref %C.a55) { // CHECK:STDOUT: !entry: @@ -468,17 +421,17 @@ void CallUnsupportedF() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%T) { -// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc11_10.1 => constants.%T +// CHECK:STDOUT: specific @C(constants.%T.013) { +// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt.4a7 +// CHECK:STDOUT: %T.loc11_10.1 => constants.%T.013 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MakeC(constants.%T) { -// CHECK:STDOUT: %T.patt.loc12_11.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc12_11.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc12_26.1 => constants.%T.as_type +// CHECK:STDOUT: specific @MakeC(constants.%T.013) { +// CHECK:STDOUT: %T.patt.loc12_11.2 => constants.%T.patt.4a7 +// CHECK:STDOUT: %T.loc12_11.1 => constants.%T.013 +// CHECK:STDOUT: %T.as_type.loc12_26.1 => constants.%T.as_type.ff1 // CHECK:STDOUT: %pattern_type.loc12_24 => constants.%pattern_type.cab // CHECK:STDOUT: %t.param_patt.loc12_24.2 => constants.%t.param_patt.571 // CHECK:STDOUT: %t.patt.loc12_24.2 => constants.%t.patt.a08 @@ -490,19 +443,19 @@ void CallUnsupportedF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(file.%.loc11) { -// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt.4a7 // CHECK:STDOUT: %T.loc11_10.1 => constants.%Z.facet // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%Z.facet) { -// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc11_10.2 => constants.%T.patt.4a7 // CHECK:STDOUT: %T.loc11_10.1 => constants.%Z.facet // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @MakeC(file.%.loc12) { -// CHECK:STDOUT: %T.patt.loc12_11.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc12_11.2 => constants.%T.patt.4a7 // CHECK:STDOUT: %T.loc12_11.1 => constants.%Z.facet // CHECK:STDOUT: %T.as_type.loc12_26.1 => constants.%D // CHECK:STDOUT: %pattern_type.loc12_24 => constants.%pattern_type.d8d @@ -516,7 +469,7 @@ void CallUnsupportedF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @MakeC(constants.%Z.facet) { -// CHECK:STDOUT: %T.patt.loc12_11.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc12_11.2 => constants.%T.patt.4a7 // CHECK:STDOUT: %T.loc12_11.1 => constants.%Z.facet // CHECK:STDOUT: %T.as_type.loc12_26.1 => constants.%D // CHECK:STDOUT: %pattern_type.loc12_24 => constants.%pattern_type.d8d @@ -587,49 +540,43 @@ void CallUnsupportedF() { // CHECK:STDOUT: %B.val: %B = struct_value () [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %pattern_type.6cb: type = pattern_type %I.type [concrete] -// CHECK:STDOUT: %T.patt: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %T: %I.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type: type = facet_access_type %T [symbolic] -// CHECK:STDOUT: %pattern_type.b3a: type = pattern_type %T.as_type [symbolic] +// CHECK:STDOUT: %T.patt.1df: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.dda: %I.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.b38: type = facet_access_type %T.dda [symbolic] +// CHECK:STDOUT: %pattern_type.b3a: type = pattern_type %T.as_type.b38 [symbolic] // CHECK:STDOUT: %t.param_patt.5db: %pattern_type.b3a = value_param_pattern [symbolic] // CHECK:STDOUT: %t.patt.d48: %pattern_type.b3a = wrapper_binding_pattern t, %t.param_patt.5db [symbolic] -// CHECK:STDOUT: %.0ce: Core.Form = init_form %T.as_type [symbolic] +// CHECK:STDOUT: %.0ce: Core.Form = init_form %T.as_type.b38 [symbolic] // CHECK:STDOUT: %return.param_patt.b82: %pattern_type.b3a = out_param_pattern [symbolic] -// CHECK:STDOUT: %return.patt.2e6: %pattern_type.b3a = return_slot_pattern %return.param_patt.b82, %T.as_type [symbolic] +// CHECK:STDOUT: %return.patt.2e6: %pattern_type.b3a = return_slot_pattern %return.param_patt.b82, %T.as_type.b38 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %require_complete.27c: = require_complete_type %T.as_type [symbolic] -// CHECK:STDOUT: %I.WithSelf.Doit.type.a1c: type = fn_type @I.WithSelf.Doit, @I.WithSelf(%T) [symbolic] +// CHECK:STDOUT: %require_complete.27c: = require_complete_type %T.as_type.b38 [symbolic] +// CHECK:STDOUT: %I.WithSelf.Doit.type.a1c: type = fn_type @I.WithSelf.Doit, @I.WithSelf(%T.dda) [symbolic] // CHECK:STDOUT: %I.WithSelf.Doit.a4e: %I.WithSelf.Doit.type.a1c = struct_value () [symbolic] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] -// CHECK:STDOUT: %.7ed: type = fn_type_with_self_type %I.WithSelf.Doit.type.a1c, %T [symbolic] +// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.dda, @I [symbolic] +// CHECK:STDOUT: %.7ed: type = fn_type_with_self_type %I.WithSelf.Doit.type.a1c, %T.dda [symbolic] // CHECK:STDOUT: %impl.elem0.fa2: %.7ed = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %self.param_patt.58e: %pattern_type.b3a = value_param_pattern [symbolic] // CHECK:STDOUT: %self.patt.b4c: %pattern_type.b3a = wrapper_binding_pattern self, %self.param_patt.58e [symbolic] -// CHECK:STDOUT: %specific_impl_fn.1f8: = specific_impl_function %impl.elem0.fa2, @I.WithSelf.Doit(%T) [symbolic] -// CHECK:STDOUT: %self.param_patt.039: %pattern_type.e39 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.535: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt.039 [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_9.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc16_9.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_9.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc16_9.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16_9.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %specific_impl_fn.1f8: = specific_impl_function %impl.elem0.fa2, @I.WithSelf.Doit(%T.dda) [symbolic] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16_9.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.92e: %SubobjectDestroy.type = facet_value %B, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.131: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.92e) [concrete] +// CHECK:STDOUT: %Destroy.facet.09e: %Destroy.type = facet_value %B, (%DestroyImpl.impl_witness.131, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet.35e: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: %t.param_patt.169: %pattern_type.9ef = value_param_pattern [concrete] // CHECK:STDOUT: %t.patt.490: %pattern_type.9ef = wrapper_binding_pattern t, %t.param_patt.169 [concrete] // CHECK:STDOUT: %F.specific_fn.45a: = specific_function %F, @F(%I.facet.f31) [concrete] @@ -644,51 +591,8 @@ void CallUnsupportedF() { // CHECK:STDOUT: %Cpp: = namespace file.%Cpp.import_cpp, [concrete] { // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_9.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc16_9.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_9.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc16_9.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e39 = ref_param_pattern [concrete = constants.%self.param_patt.039] -// CHECK:STDOUT: %self.patt: %pattern_type.e39 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.535] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %B = ref_param call_param0 -// CHECK:STDOUT: %self: ref %B = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -696,30 +600,30 @@ void CallUnsupportedF() { // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc24_7.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_7.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.patt.loc24_7.1: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_7.2 (constants.%T.patt.1df)] // CHECK:STDOUT: %t.param_patt.loc24_13.1: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %t.param_patt.loc24_13.2 (constants.%t.param_patt.5db)] // CHECK:STDOUT: %t.patt.loc24_13.1: @F.%pattern_type (%pattern_type.b3a) = wrapper_binding_pattern t, %t.param_patt.loc24_13.1 [symbolic = %t.patt.loc24_13.2 (constants.%t.patt.d48)] // CHECK:STDOUT: %return.param_patt.loc24_21.1: @F.%pattern_type (%pattern_type.b3a) = out_param_pattern [symbolic = %return.param_patt.loc24_21.2 (constants.%return.param_patt.b82)] // CHECK:STDOUT: %return.patt.loc24_18.1: @F.%pattern_type (%pattern_type.b3a) = return_slot_pattern %return.param_patt.loc24_21.1, %.loc24_21.3 [symbolic = %return.patt.loc24_18.2 (constants.%return.patt.2e6)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc24_21: %I.type = name_ref T, %T.loc24_7.2 [symbolic = %T.loc24_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc24_21: type = facet_access_type %T.ref.loc24_21 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc24_21.3: type = converted %T.ref.loc24_21, %T.as_type.loc24_21 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.ref.loc24_21: %I.type = name_ref T, %T.loc24_7.2 [symbolic = %T.loc24_7.1 (constants.%T.dda)] +// CHECK:STDOUT: %T.as_type.loc24_21: type = facet_access_type %T.ref.loc24_21 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %.loc24_21.3: type = converted %T.ref.loc24_21, %T.as_type.loc24_21 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type.b38)] // CHECK:STDOUT: %.loc24_21.4: Core.Form = init_form %.loc24_21.3 [symbolic = %.loc24_21.2 (constants.%.0ce)] // CHECK:STDOUT: %.loc24_9: type = splice_block %I.ref [concrete = constants.%I.type] { // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %T.loc24_7.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc24_7.1 (constants.%T)] -// CHECK:STDOUT: %t.param: @F.%T.as_type.loc24_15.1 (%T.as_type) = value_param call_param0 -// CHECK:STDOUT: %.loc24_15.1: type = splice_block %.loc24_15.2 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type)] { -// CHECK:STDOUT: %T.ref.loc24_15: %I.type = name_ref T, %T.loc24_7.2 [symbolic = %T.loc24_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc24_15.2: type = facet_access_type %T.ref.loc24_15 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc24_15.2: type = converted %T.ref.loc24_15, %T.as_type.loc24_15.2 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.loc24_7.2: %I.type = symbolic_binding T, 0 [symbolic = %T.loc24_7.1 (constants.%T.dda)] +// CHECK:STDOUT: %t.param: @F.%T.as_type.loc24_15.1 (%T.as_type.b38) = value_param call_param0 +// CHECK:STDOUT: %.loc24_15.1: type = splice_block %.loc24_15.2 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type.b38)] { +// CHECK:STDOUT: %T.ref.loc24_15: %I.type = name_ref T, %T.loc24_7.2 [symbolic = %T.loc24_7.1 (constants.%T.dda)] +// CHECK:STDOUT: %T.as_type.loc24_15.2: type = facet_access_type %T.ref.loc24_15 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type.b38)] +// CHECK:STDOUT: %.loc24_15.2: type = converted %T.ref.loc24_15, %T.as_type.loc24_15.2 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type.b38)] // CHECK:STDOUT: } -// CHECK:STDOUT: %t: @F.%T.as_type.loc24_15.1 (%T.as_type) = wrapper_binding t, %t.param -// CHECK:STDOUT: %return.param: ref @F.%T.as_type.loc24_15.1 (%T.as_type) = out_param call_param1 -// CHECK:STDOUT: %return: ref @F.%T.as_type.loc24_15.1 (%T.as_type) = return_slot %return.param +// CHECK:STDOUT: %t: @F.%T.as_type.loc24_15.1 (%T.as_type.b38) = wrapper_binding t, %t.param +// CHECK:STDOUT: %return.param: ref @F.%T.as_type.loc24_15.1 (%T.as_type.b38) = out_param call_param1 +// CHECK:STDOUT: %return: ref @F.%T.as_type.loc24_15.1 (%T.as_type.b38) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %I.facet.loc24_23.1: %I.type = facet_value %A.decl, (constants.%I.impl_witness.ca2) [concrete = constants.%I.facet.f31] @@ -872,9 +776,9 @@ void CallUnsupportedF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc24_7.2: %I.type) { -// CHECK:STDOUT: %T.patt.loc24_7.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_7.2 (constants.%T.patt)] -// CHECK:STDOUT: %T.loc24_7.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc24_7.1 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc24_15.1: type = facet_access_type %T.loc24_7.1 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type)] +// CHECK:STDOUT: %T.patt.loc24_7.2: %pattern_type.6cb = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_7.2 (constants.%T.patt.1df)] +// CHECK:STDOUT: %T.loc24_7.1: %I.type = symbolic_binding T, 0 [symbolic = %T.loc24_7.1 (constants.%T.dda)] +// CHECK:STDOUT: %T.as_type.loc24_15.1: type = facet_access_type %T.loc24_7.1 [symbolic = %T.as_type.loc24_15.1 (constants.%T.as_type.b38)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.as_type.loc24_15.1 [symbolic = %pattern_type (constants.%pattern_type.b3a)] // CHECK:STDOUT: %t.param_patt.loc24_13.2: @F.%pattern_type (%pattern_type.b3a) = value_param_pattern [symbolic = %t.param_patt.loc24_13.2 (constants.%t.param_patt.5db)] // CHECK:STDOUT: %t.patt.loc24_13.2: @F.%pattern_type (%pattern_type.b3a) = wrapper_binding_pattern t, %t.param_patt.loc24_13.2 [symbolic = %t.patt.loc24_13.2 (constants.%t.patt.d48)] @@ -890,68 +794,49 @@ void CallUnsupportedF() { // CHECK:STDOUT: %impl.elem0.loc25_11.2: @F.%.loc25_11 (%.7ed) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc25_11.2 (constants.%impl.elem0.fa2)] // CHECK:STDOUT: %specific_impl_fn.loc25_11.2: = specific_impl_function %impl.elem0.loc25_11.2, @I.WithSelf.Doit(%T.loc24_7.1) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn.1f8)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc24_15.1 (%T.as_type)) -> out %return.param: @F.%T.as_type.loc24_15.1 (%T.as_type) { +// CHECK:STDOUT: fn(%t.param: @F.%T.as_type.loc24_15.1 (%T.as_type.b38)) -> out %return.param: @F.%T.as_type.loc24_15.1 (%T.as_type.b38) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc24_15.1 (%T.as_type) = name_ref t, %t +// CHECK:STDOUT: %t.ref: @F.%T.as_type.loc24_15.1 (%T.as_type.b38) = name_ref t, %t // CHECK:STDOUT: %Doit.ref: %I.assoc_type = name_ref Doit, @I.WithSelf.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc25_11.1: @F.%.loc25_11 (%.7ed) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc25_11.2 (constants.%impl.elem0.fa2)] // CHECK:STDOUT: %bound_method.loc25_11: = bound_method %t.ref, %impl.elem0.loc25_11.1 -// CHECK:STDOUT: %.loc25_17.1: %I.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc24_7.1 (constants.%T)] -// CHECK:STDOUT: %.loc25_17.2: %I.type = converted constants.%T.as_type, constants.%T [symbolic = %T.loc24_7.1 (constants.%T)] -// CHECK:STDOUT: %specific_impl_fn.loc25_11.1: = specific_impl_function %impl.elem0.loc25_11.1, @I.WithSelf.Doit(constants.%T) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn.1f8)] +// CHECK:STDOUT: %.loc25_17.1: %I.type = converted constants.%T.as_type.b38, constants.%T.dda [symbolic = %T.loc24_7.1 (constants.%T.dda)] +// CHECK:STDOUT: %.loc25_17.2: %I.type = converted constants.%T.as_type.b38, constants.%T.dda [symbolic = %T.loc24_7.1 (constants.%T.dda)] +// CHECK:STDOUT: %specific_impl_fn.loc25_11.1: = specific_impl_function %impl.elem0.loc25_11.1, @I.WithSelf.Doit(constants.%T.dda) [symbolic = %specific_impl_fn.loc25_11.2 (constants.%specific_impl_fn.1f8)] // CHECK:STDOUT: %bound_method.loc25_17: = bound_method %t.ref, %specific_impl_fn.loc25_11.1 -// CHECK:STDOUT: %.loc24_21.1: ref @F.%T.as_type.loc24_15.1 (%T.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %I.WithSelf.Doit.call: init @F.%T.as_type.loc24_15.1 (%T.as_type) to %.loc24_21.1 = call %bound_method.loc25_17(%t.ref) +// CHECK:STDOUT: %.loc24_21.1: ref @F.%T.as_type.loc24_15.1 (%T.as_type.b38) = splice_block %return.param {} +// CHECK:STDOUT: %I.WithSelf.Doit.call: init @F.%T.as_type.loc24_15.1 (%T.as_type.b38) to %.loc24_21.1 = call %bound_method.loc25_17(%t.ref) // CHECK:STDOUT: return %I.WithSelf.Doit.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B.__destroy_thunk(%self.param: ref %B) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %self.param, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc16_9.1: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc16_9.1: %Destroy.type = converted constants.%B, %Destroy.facet.loc16_9.1 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %Destroy.facet.loc16_9.2: %Destroy.type = facet_value constants.%B, (constants.%DestroyImpl.impl_witness.131, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: %.loc16_9.2: %Destroy.type = converted constants.%B, %Destroy.facet.loc16_9.2 [concrete = constants.%Destroy.facet.09e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_9.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_9.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_9.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_9.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_9.2(%self.param: ref %B) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_9.2(%self.param: ref %B) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @A.__destroy_thunk(%self.param: ref %A) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %self.param, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc9_9.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc9_9.1: %Destroy.type = converted constants.%A, %Destroy.facet.loc9_9.1 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %Destroy.facet.loc9_9.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: %.loc9_9.2: %Destroy.type = converted constants.%A, %Destroy.facet.loc9_9.2 [concrete = constants.%Destroy.facet.35e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @F__carbon_thunk.26f2099a79512a5d(%_.param.loc24_23.1: ref %A, %_.param.loc24_23.2: ref %A) { // CHECK:STDOUT: !entry: @@ -1037,10 +922,10 @@ void CallUnsupportedF() { // CHECK:STDOUT: %return.patt.loc6_17.2 => constants.%return.patt.911 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%T) { -// CHECK:STDOUT: %T.patt.loc24_7.2 => constants.%T.patt -// CHECK:STDOUT: %T.loc24_7.1 => constants.%T -// CHECK:STDOUT: %T.as_type.loc24_15.1 => constants.%T.as_type +// CHECK:STDOUT: specific @F(constants.%T.dda) { +// CHECK:STDOUT: %T.patt.loc24_7.2 => constants.%T.patt.1df +// CHECK:STDOUT: %T.loc24_7.1 => constants.%T.dda +// CHECK:STDOUT: %T.as_type.loc24_15.1 => constants.%T.as_type.b38 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a // CHECK:STDOUT: %t.param_patt.loc24_13.2 => constants.%t.param_patt.5db // CHECK:STDOUT: %t.patt.loc24_13.2 => constants.%t.patt.d48 @@ -1049,16 +934,16 @@ void CallUnsupportedF() { // CHECK:STDOUT: %return.patt.loc24_18.2 => constants.%return.patt.2e6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf(constants.%T) { +// CHECK:STDOUT: specific @I.WithSelf(constants.%T.dda) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Self => constants.%T +// CHECK:STDOUT: %Self => constants.%T.dda // CHECK:STDOUT: %I.WithSelf.Doit.type => constants.%I.WithSelf.Doit.type.a1c // CHECK:STDOUT: %I.WithSelf.Doit => constants.%I.WithSelf.Doit.a4e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.WithSelf.Doit(constants.%T) { -// CHECK:STDOUT: %Self => constants.%T -// CHECK:STDOUT: %Self.as_type.loc6_11.1 => constants.%T.as_type +// CHECK:STDOUT: specific @I.WithSelf.Doit(constants.%T.dda) { +// CHECK:STDOUT: %Self => constants.%T.dda +// CHECK:STDOUT: %Self.as_type.loc6_11.1 => constants.%T.as_type.b38 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b3a // CHECK:STDOUT: %self.param_patt.loc6_11.2 => constants.%self.param_patt.58e // CHECK:STDOUT: %self.patt.loc6_11.2 => constants.%self.patt.b4c @@ -1068,7 +953,7 @@ void CallUnsupportedF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(file.%.loc24_23.1) { -// CHECK:STDOUT: %T.patt.loc24_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc24_7.2 => constants.%T.patt.1df // CHECK:STDOUT: %T.loc24_7.1 => constants.%I.facet.f31 // CHECK:STDOUT: %T.as_type.loc24_15.1 => constants.%A // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9ef @@ -1080,7 +965,7 @@ void CallUnsupportedF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%I.facet.f31) { -// CHECK:STDOUT: %T.patt.loc24_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc24_7.2 => constants.%T.patt.1df // CHECK:STDOUT: %T.loc24_7.1 => constants.%I.facet.f31 // CHECK:STDOUT: %T.as_type.loc24_15.1 => constants.%A // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9ef @@ -1100,7 +985,7 @@ void CallUnsupportedF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(file.%.loc24_23.2) { -// CHECK:STDOUT: %T.patt.loc24_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc24_7.2 => constants.%T.patt.1df // CHECK:STDOUT: %T.loc24_7.1 => constants.%I.facet.a68 // CHECK:STDOUT: %T.as_type.loc24_15.1 => constants.%B // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e39 @@ -1112,7 +997,7 @@ void CallUnsupportedF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%I.facet.a68) { -// CHECK:STDOUT: %T.patt.loc24_7.2 => constants.%T.patt +// CHECK:STDOUT: %T.patt.loc24_7.2 => constants.%T.patt.1df // CHECK:STDOUT: %T.loc24_7.1 => constants.%I.facet.a68 // CHECK:STDOUT: %T.as_type.loc24_15.1 => constants.%B // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e39 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 fe0a3d6e877e..8d01c5461cde 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 @@ -539,7 +539,6 @@ fn F() { // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] @@ -553,15 +552,17 @@ fn F() { // CHECK:STDOUT: %bool.as.Copy.impl.Op.bound: = bound_method %true, %bool.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %.e3b: ref bool = temporary invalid, %true [concrete] // CHECK:STDOUT: %addr: %ptr.bb2 = addr_of %.e3b [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.e3b, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -577,23 +578,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.9c3: %bool.as.Copy.impl.Op.type = import_ref Core//prelude/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.bda = impl_witness_table (%Core.import_ref.9c3), @bool.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -608,20 +594,16 @@ fn F() { // CHECK:STDOUT: %.loc8_11.2: ref bool = temporary %.loc8_11.1, %bool.as.Copy.impl.Op.call [concrete = constants.%.e3b] // CHECK:STDOUT: %addr: %ptr.bb2 = addr_of %.loc8_11.2 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.e3b) +// CHECK:STDOUT: %Destroy.facet.loc8_11.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.3: %Destroy.type = converted bool, %Destroy.facet.loc8_11.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_11.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.4: %Destroy.type = converted bool, %Destroy.facet.loc8_11.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_11.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_bool_param_false.carbon // CHECK:STDOUT: @@ -631,7 +613,6 @@ fn F() { // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %false: bool = bool_literal false [concrete] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %ptr.bb2: type = ptr_type bool [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] @@ -645,15 +626,17 @@ fn F() { // CHECK:STDOUT: %bool.as.Copy.impl.Op.bound: = bound_method %false, %bool.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %.48c: ref bool = temporary invalid, %false [concrete] // CHECK:STDOUT: %addr: %ptr.bb2 = addr_of %.48c [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.48c, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -669,23 +652,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.9c3: %bool.as.Copy.impl.Op.type = import_ref Core//prelude/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.bda = impl_witness_table (%Core.import_ref.9c3), @bool.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -700,20 +668,16 @@ fn F() { // CHECK:STDOUT: %.loc8_11.2: ref bool = temporary %.loc8_11.1, %bool.as.Copy.impl.Op.call [concrete = constants.%.48c] // CHECK:STDOUT: %addr: %ptr.bb2 = addr_of %.loc8_11.2 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.48c) +// CHECK:STDOUT: %Destroy.facet.loc8_11.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.3: %Destroy.type = converted bool, %Destroy.facet.loc8_11.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_11.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.4: %Destroy.type = converted bool, %Destroy.facet.loc8_11.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_11.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_signed_char_param.carbon // CHECK:STDOUT: @@ -735,7 +699,6 @@ fn F() { // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i8: type = class_type @Int, @Int(%int_8) [concrete] -// CHECK:STDOUT: %pattern_type.060: type = pattern_type %i8 [concrete] // CHECK:STDOUT: %ptr.036: type = ptr_type %i8 [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] @@ -767,15 +730,17 @@ fn F() { // CHECK:STDOUT: %bound_method.3ef: = bound_method %int_-1.f9e, %Int.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.615: ref %i8 = temporary invalid, %int_-1.f9e [concrete] // CHECK:STDOUT: %addr: %ptr.036 = addr_of %.615 [concrete] -// CHECK:STDOUT: %self.param_patt.532: %pattern_type.060 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7b1: %pattern_type.060 = wrapper_binding_pattern self, %self.param_patt.532 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.615, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.df9: %SubobjectDestroy.type = facet_value %i8, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d3c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.df9) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i8, (%DestroyImpl.impl_witness.d3c, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -796,23 +761,8 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl.6b6 [concrete] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.060 = ref_param_pattern [concrete = constants.%self.param_patt.532] -// CHECK:STDOUT: %self.patt: %pattern_type.060 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.060 = ref_param_pattern [concrete = constants.%self.param_patt.532] -// CHECK:STDOUT: %self.patt: %pattern_type.060 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -841,20 +791,16 @@ fn F() { // CHECK:STDOUT: %.loc8_11.6: ref %i8 = temporary %.loc8_11.5, %Int.as.Copy.impl.Op.call [concrete = constants.%.615] // CHECK:STDOUT: %addr: %ptr.036 = addr_of %.loc8_11.6 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.615) +// CHECK:STDOUT: %Destroy.facet.loc8_11.1: %Destroy.type = facet_value constants.%i8, (constants.%DestroyImpl.impl_witness.d3c, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.7: %Destroy.type = converted constants.%i8, %Destroy.facet.loc8_11.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_11.2: %Destroy.type = facet_value constants.%i8, (constants.%DestroyImpl.impl_witness.d3c, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.8: %Destroy.type = converted constants.%i8, %Destroy.facet.loc8_11.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_11.6) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i8) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i8) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i8) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i8) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_unsigned_char_param.carbon // CHECK:STDOUT: @@ -867,7 +813,6 @@ fn F() { // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %u8: type = class_type @UInt, @UInt(%int_8) [concrete] -// CHECK:STDOUT: %pattern_type.e53: type = pattern_type %u8 [concrete] // CHECK:STDOUT: %ptr.22f: type = ptr_type %u8 [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] @@ -899,15 +844,17 @@ fn F() { // CHECK:STDOUT: %bound_method.605: = bound_method %int_1.5dc, %UInt.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.fbc: ref %u8 = temporary invalid, %int_1.5dc [concrete] // CHECK:STDOUT: %addr: %ptr.22f = addr_of %.fbc [concrete] -// CHECK:STDOUT: %self.param_patt.bf2: %pattern_type.e53 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d5c: %pattern_type.e53 = wrapper_binding_pattern self, %self.param_patt.bf2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.fbc, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e7f: %SubobjectDestroy.type = facet_value %u8, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.957: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e7f) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %u8, (%DestroyImpl.impl_witness.957, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -925,23 +872,8 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.79a = impl_witness_table (%Core.import_ref.685), @Core.IntLiteral.as.ImplicitAs.impl.bd8 [concrete] // CHECK:STDOUT: %Core.import_ref.079: @UInt.as.Copy.impl.%UInt.as.Copy.impl.Op.type (%UInt.as.Copy.impl.Op.type.97a) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.Copy.impl.%UInt.as.Copy.impl.Op (constants.%UInt.as.Copy.impl.Op.2a0)] // CHECK:STDOUT: %Copy.impl_witness_table.238 = impl_witness_table (%Core.import_ref.079), @UInt.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e53 = ref_param_pattern [concrete = constants.%self.param_patt.bf2] -// CHECK:STDOUT: %self.patt: %pattern_type.e53 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d5c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e53 = ref_param_pattern [concrete = constants.%self.param_patt.bf2] -// CHECK:STDOUT: %self.patt: %pattern_type.e53 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d5c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -965,20 +897,16 @@ fn F() { // CHECK:STDOUT: %.loc8_11.4: ref %u8 = temporary %.loc8_11.3, %UInt.as.Copy.impl.Op.call [concrete = constants.%.fbc] // CHECK:STDOUT: %addr: %ptr.22f = addr_of %.loc8_11.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.fbc) +// CHECK:STDOUT: %Destroy.facet.loc8_11.1: %Destroy.type = facet_value constants.%u8, (constants.%DestroyImpl.impl_witness.957, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.5: %Destroy.type = converted constants.%u8, %Destroy.facet.loc8_11.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_11.2: %Destroy.type = facet_value constants.%u8, (constants.%DestroyImpl.impl_witness.957, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.6: %Destroy.type = converted constants.%u8, %Destroy.facet.loc8_11.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_11.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %u8) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %u8) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %u8) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %u8) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_char_param.carbon // CHECK:STDOUT: @@ -991,7 +919,6 @@ fn F() { // CHECK:STDOUT: %char: type = class_type @Char [concrete] // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [concrete] // CHECK:STDOUT: %u8: type = class_type @UInt, @UInt(%int_8) [concrete] -// CHECK:STDOUT: %pattern_type.2ff: type = pattern_type %char [concrete] // CHECK:STDOUT: %ptr.b46: type = ptr_type %char [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] @@ -1014,22 +941,17 @@ fn F() { // CHECK:STDOUT: %char.as.Copy.impl.Op.bound: = bound_method %int_88, %char.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %.2ff: ref %char = temporary invalid, %int_88 [concrete] // CHECK:STDOUT: %addr: %ptr.b46 = addr_of %.2ff [concrete] -// CHECK:STDOUT: %pattern_type.e53: type = pattern_type %u8 [concrete] -// CHECK:STDOUT: %self.param_patt.bf2: %pattern_type.e53 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d5c: %pattern_type.e53 = wrapper_binding_pattern self, %self.param_patt.bf2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_11.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_11.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.fb2: %pattern_type.2ff = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.da7: %pattern_type.2ff = wrapper_binding_pattern self, %self.param_patt.fb2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_11.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_11.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_11.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.2ff, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_11.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.909: %SubobjectDestroy.type = facet_value %char, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.114: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.909) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %char, (%DestroyImpl.impl_witness.114, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1047,37 +969,8 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.c41 = impl_witness_table (%Core.import_ref.06c), @Core.CharLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.9c3: %char.as.Copy.impl.Op.type = import_ref Core//prelude/types/char, loc{{\d+_\d+}}, loaded [concrete = constants.%char.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.893 = impl_witness_table (%Core.import_ref.9c3), @char.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_11.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e53 = ref_param_pattern [concrete = constants.%self.param_patt.bf2] -// CHECK:STDOUT: %self.patt: %pattern_type.e53 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d5c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_11.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e53 = ref_param_pattern [concrete = constants.%self.param_patt.bf2] -// CHECK:STDOUT: %self.patt: %pattern_type.e53 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d5c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_11.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.2ff = ref_param_pattern [concrete = constants.%self.param_patt.fb2] -// CHECK:STDOUT: %self.patt: %pattern_type.2ff = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.da7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %char = ref_param call_param0 -// CHECK:STDOUT: %self: ref %char = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_11.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.2ff = ref_param_pattern [concrete = constants.%self.param_patt.fb2] -// CHECK:STDOUT: %self.patt: %pattern_type.2ff = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.da7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %char = ref_param call_param0 -// CHECK:STDOUT: %self: ref %char = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1097,31 +990,18 @@ fn F() { // CHECK:STDOUT: %.loc8_11.5: ref %char = temporary %.loc8_11.4, %char.as.Copy.impl.Op.call [concrete = constants.%.2ff] // CHECK:STDOUT: %addr: %ptr.b46 = addr_of %.loc8_11.5 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.2ff) +// CHECK:STDOUT: %Destroy.facet.loc8_11.1: %Destroy.type = facet_value constants.%char, (constants.%DestroyImpl.impl_witness.114, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.6: %Destroy.type = converted constants.%char, %Destroy.facet.loc8_11.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_11.2: %Destroy.type = facet_value constants.%char, (constants.%DestroyImpl.impl_witness.114, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.7: %Destroy.type = converted constants.%char, %Destroy.facet.loc8_11.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_11.5) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.1(%self.param: ref %u8) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_11.1(%self.param: ref %u8) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_11.1(%self.param: ref %u8) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_11.1(%self.param: ref %u8) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_11.2(%self.param: ref %char) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_11.2(%self.param: ref %char) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_11.2(%self.param: ref %char) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_11.2(%self.param: ref %char) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_import_wchar_t_param.carbon // CHECK:STDOUT: @@ -1279,7 +1159,6 @@ fn F() { // CHECK:STDOUT: %As.WithSelf.Convert.type.0b5: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%i16, %As.facet) [concrete] // CHECK:STDOUT: %.f79: type = fn_type_with_self_type %As.WithSelf.Convert.type.0b5, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.262 [concrete] -// CHECK:STDOUT: %pattern_type.9bc: type = pattern_type %i16 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.262, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.1e6: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.6e1: %i16 = int_value 1 [concrete] @@ -1300,15 +1179,17 @@ fn F() { // CHECK:STDOUT: %bound_method.96e: = bound_method %int_1.6e1, %Int.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.c52: ref %i16 = temporary invalid, %int_1.6e1 [concrete] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.c52 [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.c52, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1326,23 +1207,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1367,20 +1233,16 @@ fn F() { // CHECK:STDOUT: %.loc8_13.4: ref %i16 = temporary %.loc8_13.3, %Int.as.Copy.impl.Op.call [concrete = constants.%.c52] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.loc8_13.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c52) +// CHECK:STDOUT: %Destroy.facet.loc8_13.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_13.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_13.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_13.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_13.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_13.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_13.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_short_param_max.carbon // CHECK:STDOUT: @@ -1393,7 +1255,6 @@ fn F() { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete] -// CHECK:STDOUT: %pattern_type.9bc: type = pattern_type %i16 [concrete] // CHECK:STDOUT: %ptr.e14: type = ptr_type %i16 [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] @@ -1425,15 +1286,17 @@ fn F() { // CHECK:STDOUT: %bound_method.1f5: = bound_method %int_32767.15e, %Int.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.f07: ref %i16 = temporary invalid, %int_32767.15e [concrete] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.f07 [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.f07, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1451,23 +1314,8 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl.6b6 [concrete] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1491,20 +1339,16 @@ fn F() { // CHECK:STDOUT: %.loc8_11.4: ref %i16 = temporary %.loc8_11.3, %Int.as.Copy.impl.Op.call [concrete = constants.%.f07] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.loc8_11.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.f07) +// CHECK:STDOUT: %Destroy.facet.loc8_11.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_11.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_11.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_11.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_11.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_short_param_min.carbon // CHECK:STDOUT: @@ -1526,7 +1370,6 @@ fn F() { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete] -// CHECK:STDOUT: %pattern_type.9bc: type = pattern_type %i16 [concrete] // CHECK:STDOUT: %ptr.e14: type = ptr_type %i16 [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] @@ -1558,15 +1401,17 @@ fn F() { // CHECK:STDOUT: %bound_method.a80: = bound_method %int_-32768.827, %Int.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.f11: ref %i16 = temporary invalid, %int_-32768.827 [concrete] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.f11 [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.f11, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1587,23 +1432,8 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl.6b6 [concrete] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1632,20 +1462,16 @@ fn F() { // CHECK:STDOUT: %.loc8_11.6: ref %i16 = temporary %.loc8_11.5, %Int.as.Copy.impl.Op.call [concrete = constants.%.f11] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.loc8_11.6 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.f11) +// CHECK:STDOUT: %Destroy.facet.loc8_11.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.7: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_11.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_11.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.8: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_11.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_11.6) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_short_int_param.carbon // CHECK:STDOUT: @@ -1669,7 +1495,6 @@ fn F() { // CHECK:STDOUT: %As.WithSelf.Convert.type.0b5: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%i16, %As.facet) [concrete] // CHECK:STDOUT: %.f79: type = fn_type_with_self_type %As.WithSelf.Convert.type.0b5, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.262 [concrete] -// CHECK:STDOUT: %pattern_type.9bc: type = pattern_type %i16 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.262, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.1e6: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.6e1: %i16 = int_value 1 [concrete] @@ -1690,15 +1515,17 @@ fn F() { // CHECK:STDOUT: %bound_method.96e: = bound_method %int_1.6e1, %Int.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.c52: ref %i16 = temporary invalid, %int_1.6e1 [concrete] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.c52 [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.c52, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1716,23 +1543,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1757,20 +1569,16 @@ fn F() { // CHECK:STDOUT: %.loc8_13.4: ref %i16 = temporary %.loc8_13.3, %Int.as.Copy.impl.Op.call [concrete = constants.%.c52] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.loc8_13.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c52) +// CHECK:STDOUT: %Destroy.facet.loc8_13.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_13.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_13.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_13.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_13.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_13.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_13.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_signed_short_param.carbon // CHECK:STDOUT: @@ -1794,7 +1602,6 @@ fn F() { // CHECK:STDOUT: %As.WithSelf.Convert.type.0b5: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%i16, %As.facet) [concrete] // CHECK:STDOUT: %.f79: type = fn_type_with_self_type %As.WithSelf.Convert.type.0b5, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.262 [concrete] -// CHECK:STDOUT: %pattern_type.9bc: type = pattern_type %i16 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.262, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.1e6: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.6e1: %i16 = int_value 1 [concrete] @@ -1815,15 +1622,17 @@ fn F() { // CHECK:STDOUT: %bound_method.96e: = bound_method %int_1.6e1, %Int.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.c52: ref %i16 = temporary invalid, %int_1.6e1 [concrete] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.c52 [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.c52, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1841,23 +1650,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1882,20 +1676,16 @@ fn F() { // CHECK:STDOUT: %.loc8_13.4: ref %i16 = temporary %.loc8_13.3, %Int.as.Copy.impl.Op.call [concrete = constants.%.c52] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.loc8_13.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c52) +// CHECK:STDOUT: %Destroy.facet.loc8_13.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_13.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_13.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_13.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_13.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_13.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_13.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_signed_short_int_param.carbon // CHECK:STDOUT: @@ -1919,7 +1709,6 @@ fn F() { // CHECK:STDOUT: %As.WithSelf.Convert.type.0b5: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%i16, %As.facet) [concrete] // CHECK:STDOUT: %.f79: type = fn_type_with_self_type %As.WithSelf.Convert.type.0b5, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.262 [concrete] -// CHECK:STDOUT: %pattern_type.9bc: type = pattern_type %i16 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.262, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.1e6: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.6e1: %i16 = int_value 1 [concrete] @@ -1940,15 +1729,17 @@ fn F() { // CHECK:STDOUT: %bound_method.96e: = bound_method %int_1.6e1, %Int.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.c52: ref %i16 = temporary invalid, %int_1.6e1 [concrete] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.c52 [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.c52, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1966,23 +1757,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2007,20 +1783,16 @@ fn F() { // CHECK:STDOUT: %.loc8_13.4: ref %i16 = temporary %.loc8_13.3, %Int.as.Copy.impl.Op.call [concrete = constants.%.c52] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.loc8_13.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c52) +// CHECK:STDOUT: %Destroy.facet.loc8_13.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_13.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_13.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_13.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_13.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_13.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_13.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_int16_t_param.carbon // CHECK:STDOUT: @@ -2044,7 +1816,6 @@ fn F() { // CHECK:STDOUT: %As.WithSelf.Convert.type.0b5: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%i16, %As.facet) [concrete] // CHECK:STDOUT: %.f79: type = fn_type_with_self_type %As.WithSelf.Convert.type.0b5, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.262 [concrete] -// CHECK:STDOUT: %pattern_type.9bc: type = pattern_type %i16 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.262, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.1e6: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.6e1: %i16 = int_value 1 [concrete] @@ -2065,15 +1836,17 @@ fn F() { // CHECK:STDOUT: %bound_method.96e: = bound_method %int_1.6e1, %Int.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.c52: ref %i16 = temporary invalid, %int_1.6e1 [concrete] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.c52 [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.c52, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2091,23 +1864,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2132,20 +1890,16 @@ fn F() { // CHECK:STDOUT: %.loc8_13.4: ref %i16 = temporary %.loc8_13.3, %Int.as.Copy.impl.Op.call [concrete = constants.%.c52] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.loc8_13.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c52) +// CHECK:STDOUT: %Destroy.facet.loc8_13.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_13.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_13.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_13.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_13.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_13.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_13.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_float16_param.carbon // CHECK:STDOUT: @@ -2168,7 +1922,6 @@ fn F() { // CHECK:STDOUT: %As.WithSelf.Convert.type.4ec: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%f16.727, %As.facet) [concrete] // CHECK:STDOUT: %.045: type = fn_type_with_self_type %As.WithSelf.Convert.type.4ec, %As.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.bound: = bound_method %float.96e, %Core.FloatLiteral.as.As.impl.Convert.e12 [concrete] -// CHECK:STDOUT: %pattern_type.4a8: type = pattern_type %f16.727 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.As.impl.Convert.e12, @Core.FloatLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.d8e: = bound_method %float.96e, %Core.FloatLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.413: %f16.727 = float_value 0.7998 [concrete] @@ -2189,15 +1942,17 @@ fn F() { // CHECK:STDOUT: %bound_method.30a: = bound_method %float.413, %Float.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.d39: ref %f16.727 = temporary invalid, %float.413 [concrete] // CHECK:STDOUT: %addr: %ptr.4bc = addr_of %.d39 [concrete] -// CHECK:STDOUT: %self.param_patt.0b2: %pattern_type.4a8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.358: %pattern_type.4a8 = wrapper_binding_pattern self, %self.param_patt.0b2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.d39, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0f3: %SubobjectDestroy.type = facet_value %f16.727, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.687: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0f3) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %f16.727, (%DestroyImpl.impl_witness.687, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2215,23 +1970,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.19b: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.e8d) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.fe9)] // CHECK:STDOUT: %Copy.impl_witness_table.14d = impl_witness_table (%Core.import_ref.19b), @Float.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4a8 = ref_param_pattern [concrete = constants.%self.param_patt.0b2] -// CHECK:STDOUT: %self.patt: %pattern_type.4a8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.358] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f16.727 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f16.727 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4a8 = ref_param_pattern [concrete = constants.%self.param_patt.0b2] -// CHECK:STDOUT: %self.patt: %pattern_type.4a8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.358] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f16.727 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f16.727 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2256,20 +1996,16 @@ fn F() { // CHECK:STDOUT: %.loc8_15.4: ref %f16.727 = temporary %.loc8_15.3, %Float.as.Copy.impl.Op.call [concrete = constants.%.d39] // CHECK:STDOUT: %addr: %ptr.4bc = addr_of %.loc8_15.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.d39) +// CHECK:STDOUT: %Destroy.facet.loc8_15.1: %Destroy.type = facet_value constants.%f16.727, (constants.%DestroyImpl.impl_witness.687, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_15.5: %Destroy.type = converted constants.%f16.727, %Destroy.facet.loc8_15.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_15.2: %Destroy.type = facet_value constants.%f16.727, (constants.%DestroyImpl.impl_witness.687, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_15.6: %Destroy.type = converted constants.%f16.727, %Destroy.facet.loc8_15.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_15.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %f16.727) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %f16.727) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %f16.727) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %f16.727) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_float_param.carbon // CHECK:STDOUT: @@ -2292,7 +2028,6 @@ fn F() { // CHECK:STDOUT: %As.WithSelf.Convert.type.ce5: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%f32.3bc, %As.facet) [concrete] // CHECK:STDOUT: %.6e3: type = fn_type_with_self_type %As.WithSelf.Convert.type.ce5, %As.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.bound: = bound_method %float.96e, %Core.FloatLiteral.as.As.impl.Convert.4d5 [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.As.impl.Convert.4d5, @Core.FloatLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.aa7: = bound_method %float.96e, %Core.FloatLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.5cc: %f32.3bc = float_value 0.800000011 [concrete] @@ -2313,15 +2048,17 @@ fn F() { // CHECK:STDOUT: %bound_method.4f2: = bound_method %float.5cc, %Float.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.106: ref %f32.3bc = temporary invalid, %float.5cc [concrete] // CHECK:STDOUT: %addr: %ptr.961 = addr_of %.106 [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.106, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2339,23 +2076,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.19b: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.e8d) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.fe9)] // CHECK:STDOUT: %Copy.impl_witness_table.14d = impl_witness_table (%Core.import_ref.19b), @Float.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2380,20 +2102,16 @@ fn F() { // CHECK:STDOUT: %.loc8_15.4: ref %f32.3bc = temporary %.loc8_15.3, %Float.as.Copy.impl.Op.call [concrete = constants.%.106] // CHECK:STDOUT: %addr: %ptr.961 = addr_of %.loc8_15.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.106) +// CHECK:STDOUT: %Destroy.facet.loc8_15.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_15.5: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc8_15.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_15.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_15.6: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc8_15.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_15.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_double_param.carbon // CHECK:STDOUT: @@ -2416,7 +2134,6 @@ fn F() { // CHECK:STDOUT: %As.WithSelf.Convert.type.7fd: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%f64.761, %As.facet) [concrete] // CHECK:STDOUT: %.dac: type = fn_type_with_self_type %As.WithSelf.Convert.type.7fd, %As.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.bound: = bound_method %float.96e, %Core.FloatLiteral.as.As.impl.Convert.882 [concrete] -// CHECK:STDOUT: %pattern_type.667: type = pattern_type %f64.761 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.As.impl.Convert.882, @Core.FloatLiteral.as.As.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.c7d: = bound_method %float.96e, %Core.FloatLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.069: %f64.761 = float_value 0.80000000000000004 [concrete] @@ -2437,15 +2154,17 @@ fn F() { // CHECK:STDOUT: %bound_method.67a: = bound_method %float.069, %Float.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.095: ref %f64.761 = temporary invalid, %float.069 [concrete] // CHECK:STDOUT: %addr: %ptr.6fa = addr_of %.095 [concrete] -// CHECK:STDOUT: %self.param_patt.3f8: %pattern_type.667 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df6: %pattern_type.667 = wrapper_binding_pattern self, %self.param_patt.3f8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.095, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.47f: %SubobjectDestroy.type = facet_value %f64.761, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a23: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.47f) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %f64.761, (%DestroyImpl.impl_witness.a23, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2463,23 +2182,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.19b: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.e8d) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.fe9)] // CHECK:STDOUT: %Copy.impl_witness_table.14d = impl_witness_table (%Core.import_ref.19b), @Float.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.667 = ref_param_pattern [concrete = constants.%self.param_patt.3f8] -// CHECK:STDOUT: %self.patt: %pattern_type.667 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f64.761 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f64.761 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.667 = ref_param_pattern [concrete = constants.%self.param_patt.3f8] -// CHECK:STDOUT: %self.patt: %pattern_type.667 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f64.761 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f64.761 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2504,20 +2208,16 @@ fn F() { // CHECK:STDOUT: %.loc8_15.4: ref %f64.761 = temporary %.loc8_15.3, %Float.as.Copy.impl.Op.call [concrete = constants.%.095] // CHECK:STDOUT: %addr: %ptr.6fa = addr_of %.loc8_15.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.095) +// CHECK:STDOUT: %Destroy.facet.loc8_15.1: %Destroy.type = facet_value constants.%f64.761, (constants.%DestroyImpl.impl_witness.a23, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_15.5: %Destroy.type = converted constants.%f64.761, %Destroy.facet.loc8_15.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_15.2: %Destroy.type = facet_value constants.%f64.761, (constants.%DestroyImpl.impl_witness.a23, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_15.6: %Destroy.type = converted constants.%f64.761, %Destroy.facet.loc8_15.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_15.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %f64.761) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %f64.761) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %f64.761) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %f64.761) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_float128_param.carbon // CHECK:STDOUT: @@ -2540,7 +2240,6 @@ fn F() { // CHECK:STDOUT: %As.WithSelf.Convert.type.631: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%f128.72e, %As.facet) [concrete] // CHECK:STDOUT: %.749: type = fn_type_with_self_type %As.WithSelf.Convert.type.631, %As.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.bound: = bound_method %float.96e, %Core.FloatLiteral.as.As.impl.Convert.d5a [concrete] -// CHECK:STDOUT: %pattern_type.9e5: type = pattern_type %f128.72e [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.As.impl.Convert.d5a, @Core.FloatLiteral.as.As.impl.Convert(%int_128) [concrete] // CHECK:STDOUT: %bound_method.8b0: = bound_method %float.96e, %Core.FloatLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.b2b: %f128.72e = float_value 0.800000000000000000000000000000000039 [concrete] @@ -2561,15 +2260,17 @@ fn F() { // CHECK:STDOUT: %bound_method.00b: = bound_method %float.b2b, %Float.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.315: ref %f128.72e = temporary invalid, %float.b2b [concrete] // CHECK:STDOUT: %addr: %ptr.75e = addr_of %.315 [concrete] -// CHECK:STDOUT: %self.param_patt.380: %pattern_type.9e5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.af5: %pattern_type.9e5 = wrapper_binding_pattern self, %self.param_patt.380 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.315, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.830: %SubobjectDestroy.type = facet_value %f128.72e, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ab9: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.830) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %f128.72e, (%DestroyImpl.impl_witness.ab9, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2587,23 +2288,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.19b: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.e8d) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.fe9)] // CHECK:STDOUT: %Copy.impl_witness_table.14d = impl_witness_table (%Core.import_ref.19b), @Float.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9e5 = ref_param_pattern [concrete = constants.%self.param_patt.380] -// CHECK:STDOUT: %self.patt: %pattern_type.9e5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.af5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f128.72e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f128.72e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9e5 = ref_param_pattern [concrete = constants.%self.param_patt.380] -// CHECK:STDOUT: %self.patt: %pattern_type.9e5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.af5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f128.72e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f128.72e = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2628,20 +2314,16 @@ fn F() { // CHECK:STDOUT: %.loc8_15.4: ref %f128.72e = temporary %.loc8_15.3, %Float.as.Copy.impl.Op.call [concrete = constants.%.315] // CHECK:STDOUT: %addr: %ptr.75e = addr_of %.loc8_15.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.315) +// CHECK:STDOUT: %Destroy.facet.loc8_15.1: %Destroy.type = facet_value constants.%f128.72e, (constants.%DestroyImpl.impl_witness.ab9, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_15.5: %Destroy.type = converted constants.%f128.72e, %Destroy.facet.loc8_15.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_15.2: %Destroy.type = facet_value constants.%f128.72e, (constants.%DestroyImpl.impl_witness.ab9, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_15.6: %Destroy.type = converted constants.%f128.72e, %Destroy.facet.loc8_15.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_15.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %f128.72e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %f128.72e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %f128.72e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %f128.72e) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_bool_return.carbon // CHECK:STDOUT: @@ -2655,14 +2337,17 @@ fn F() { // CHECK:STDOUT: %ptr: type = ptr_type bool [concrete] // CHECK:STDOUT: %foo_bool__carbon_thunk.type: type = fn_type @foo_bool__carbon_thunk [concrete] // CHECK:STDOUT: %foo_bool__carbon_thunk: %foo_bool__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2676,23 +2361,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2710,21 +2380,16 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %pattern_type.831 = value_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_37.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_37.3) +// CHECK:STDOUT: %Destroy.facet.loc8_37.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_37.5: %Destroy.type = converted bool, %Destroy.facet.loc8_37.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_37.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_37.6: %Destroy.type = converted bool, %Destroy.facet.loc8_37.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_37.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_short_return.carbon // CHECK:STDOUT: @@ -2740,14 +2405,17 @@ fn F() { // CHECK:STDOUT: %ptr: type = ptr_type %i16 [concrete] // CHECK:STDOUT: %foo_short__carbon_thunk.type: type = fn_type @foo_short__carbon_thunk [concrete] // CHECK:STDOUT: %foo_short__carbon_thunk: %foo_short__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2761,23 +2429,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2795,21 +2448,16 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %pattern_type.9bc = value_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_37.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_37.3) +// CHECK:STDOUT: %Destroy.facet.loc8_37.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_37.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_37.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_37.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_37.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc8_37.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_37.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_import_bit_int_24_param.carbon // CHECK:STDOUT: @@ -2850,14 +2498,17 @@ fn F() { // CHECK:STDOUT: %ptr: type = ptr_type %f64.761 [concrete] // CHECK:STDOUT: %foo_double__carbon_thunk.type: type = fn_type @foo_double__carbon_thunk [concrete] // CHECK:STDOUT: %foo_double__carbon_thunk: %foo_double__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.3f8: %pattern_type.667 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df6: %pattern_type.667 = wrapper_binding_pattern self, %self.param_patt.3f8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.47f: %SubobjectDestroy.type = facet_value %f64.761, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a23: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.47f) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %f64.761, (%DestroyImpl.impl_witness.a23, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2871,23 +2522,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.667 = ref_param_pattern [concrete = constants.%self.param_patt.3f8] -// CHECK:STDOUT: %self.patt: %pattern_type.667 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f64.761 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f64.761 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.667 = ref_param_pattern [concrete = constants.%self.param_patt.3f8] -// CHECK:STDOUT: %self.patt: %pattern_type.667 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f64.761 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f64.761 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2905,19 +2541,14 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %pattern_type.667 = value_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_38.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_38.3) +// CHECK:STDOUT: %Destroy.facet.loc8_38.1: %Destroy.type = facet_value constants.%f64.761, (constants.%DestroyImpl.impl_witness.a23, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_38.5: %Destroy.type = converted constants.%f64.761, %Destroy.facet.loc8_38.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_38.2: %Destroy.type = facet_value constants.%f64.761, (constants.%DestroyImpl.impl_witness.a23, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_38.6: %Destroy.type = converted constants.%f64.761, %Destroy.facet.loc8_38.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_38.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %f64.761) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %f64.761) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %f64.761) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %f64.761) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/class.carbon b/toolchain/check/testdata/interop/cpp/function/import/class.carbon index 9f6194b5f07f..9b15f0f528b2 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/class.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/class.carbon @@ -738,14 +738,17 @@ fn F() { // CHECK:STDOUT: %Default.facet.9a6: %Default.type = facet_value %InNamespaceClass, (%custom_witness.85f) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.523: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.162, @T.as_type.as.DefaultOrUnformed.impl(%Default.facet.9a6) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %InNamespaceClass, (%DefaultOrUnformed.impl_witness.523) [concrete] -// CHECK:STDOUT: %self.param_patt.5ba: %pattern_type.d8e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.027: %pattern_type.d8e = wrapper_binding_pattern self, %self.param_patt.5ba [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %InNamespaceClass.cpp_destructor.type: type = fn_type @InNamespaceClass.cpp_destructor [concrete] // CHECK:STDOUT: %InNamespaceClass.cpp_destructor: %InNamespaceClass.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.1d5: = custom_witness (%InNamespaceClass.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.2ec: %SubobjectDestroy.type = facet_value %InNamespaceClass, (%custom_witness.1d5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.8af: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.2ec) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %InNamespaceClass, (%DestroyImpl.impl_witness.8af, %custom_witness.1d5) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -767,21 +770,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.288: @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op.type (%T.as_type.as.DefaultOrUnformed.impl.Op.type.4da) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op (constants.%T.as_type.as.DefaultOrUnformed.impl.Op.79f)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.162 = impl_witness_table (%Core.import_ref.288), @T.as_type.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %InNamespaceClass.cpp_destructor.decl: %InNamespaceClass.cpp_destructor.type = fn_decl @InNamespaceClass.cpp_destructor [concrete = constants.%InNamespaceClass.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8e = ref_param_pattern [concrete = constants.%self.param_patt.5ba] -// CHECK:STDOUT: %self.patt: %pattern_type.d8e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.027] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %InNamespaceClass = ref_param call_param0 -// CHECK:STDOUT: %self: ref %InNamespaceClass = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%c.param: %InNamespaceClass) { @@ -798,8 +788,8 @@ fn F() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_39.1 [concrete = constants.%InNamespaceClass] // CHECK:STDOUT: %.loc10_39.2: type = converted %.loc10_39.1, %as_type [concrete = constants.%InNamespaceClass] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc10_3: ref %InNamespaceClass = splice_block %x.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %InNamespaceClass to %.loc10_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc10_3.1: ref %InNamespaceClass = splice_block %x.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %InNamespaceClass to %.loc10_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %x.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc10_22: type = splice_block %InNamespaceClass.ref.loc10 [concrete = constants.%InNamespaceClass] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -811,18 +801,13 @@ fn F() { // CHECK:STDOUT: %x.patt: %pattern_type.d8e = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.d8e = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%InNamespaceClass, (constants.%DestroyImpl.impl_witness.8af, constants.%custom_witness.1d5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%InNamespaceClass, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%InNamespaceClass, (constants.%DestroyImpl.impl_witness.8af, constants.%custom_witness.1d5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%InNamespaceClass, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %InNamespaceClass) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %InNamespaceClass) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %InNamespaceClass.cpp_destructor.call: init %empty_tuple.type = call imports.%InNamespaceClass.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_definition_in_relative_namespace_value_param_type.carbon @@ -899,14 +884,17 @@ fn F() { // CHECK:STDOUT: %Default.facet.3fb: %Default.type = facet_value %OuterClass, (%custom_witness.9b4) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.7d6: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.162, @T.as_type.as.DefaultOrUnformed.impl(%Default.facet.3fb) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %OuterClass, (%DefaultOrUnformed.impl_witness.7d6) [concrete] -// CHECK:STDOUT: %self.param_patt.46e: %pattern_type.dd5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.360: %pattern_type.dd5 = wrapper_binding_pattern self, %self.param_patt.46e [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %OuterClass.cpp_destructor.type: type = fn_type @OuterClass.cpp_destructor [concrete] // CHECK:STDOUT: %OuterClass.cpp_destructor: %OuterClass.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%OuterClass.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f84: %SubobjectDestroy.type = facet_value %OuterClass, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.70f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f84) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %OuterClass, (%DestroyImpl.impl_witness.70f, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -924,21 +912,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.288: @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op.type (%T.as_type.as.DefaultOrUnformed.impl.Op.type.4da) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op (constants.%T.as_type.as.DefaultOrUnformed.impl.Op.79f)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.162 = impl_witness_table (%Core.import_ref.288), @T.as_type.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %OuterClass.cpp_destructor.decl: %OuterClass.cpp_destructor.type = fn_decl @OuterClass.cpp_destructor [concrete = constants.%OuterClass.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dd5 = ref_param_pattern [concrete = constants.%self.param_patt.46e] -// CHECK:STDOUT: %self.patt: %pattern_type.dd5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.360] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %OuterClass = ref_param call_param0 -// CHECK:STDOUT: %self: ref %OuterClass = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%c.param: %InnerClass) { @@ -955,8 +930,8 @@ fn F() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc9_31.1 [concrete = constants.%OuterClass] // CHECK:STDOUT: %.loc9_31.2: type = converted %.loc9_31.1, %as_type [concrete = constants.%OuterClass] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc9_3: ref %OuterClass = splice_block %x.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %OuterClass to %.loc9_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc9_3.1: ref %OuterClass = splice_block %x.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %OuterClass to %.loc9_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %x.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc9_20: type = splice_block %OuterClass.ref.loc9 [concrete = constants.%OuterClass] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -967,18 +942,13 @@ fn F() { // CHECK:STDOUT: %x.patt: %pattern_type.dd5 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.dd5 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%OuterClass, (constants.%DestroyImpl.impl_witness.70f, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%OuterClass, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%OuterClass, (constants.%DestroyImpl.impl_witness.70f, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%OuterClass, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %OuterClass) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %OuterClass) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %OuterClass.cpp_destructor.call: init %empty_tuple.type = call imports.%OuterClass.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_definition_and_static_method_call_before.carbon @@ -1161,18 +1131,20 @@ fn F() { // CHECK:STDOUT: %foo_def_value_return.cpp_overload_set.type: type = cpp_overload_set_type @foo_def_value_return.cpp_overload_set [concrete] // CHECK:STDOUT: %foo_def_value_return.cpp_overload_set.value: %foo_def_value_return.cpp_overload_set.type = cpp_overload_set_value @foo_def_value_return.cpp_overload_set [concrete] // CHECK:STDOUT: %DefValueReturnClass: type = class_type @DefValueReturnClass [concrete] -// CHECK:STDOUT: %pattern_type.7a7: type = pattern_type %DefValueReturnClass [concrete] // CHECK:STDOUT: %ptr.8c3: type = ptr_type %DefValueReturnClass [concrete] // CHECK:STDOUT: %foo_def_value_return__carbon_thunk.type: type = fn_type @foo_def_value_return__carbon_thunk [concrete] // CHECK:STDOUT: %foo_def_value_return__carbon_thunk: %foo_def_value_return__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.da2: %pattern_type.7a7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4d6: %pattern_type.7a7 = wrapper_binding_pattern self, %self.param_patt.da2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %DefValueReturnClass.cpp_destructor.type: type = fn_type @DefValueReturnClass.cpp_destructor [concrete] // CHECK:STDOUT: %DefValueReturnClass.cpp_destructor: %DefValueReturnClass.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%DefValueReturnClass.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ee4: %SubobjectDestroy.type = facet_value %DefValueReturnClass, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7a8: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ee4) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %DefValueReturnClass, (%DestroyImpl.impl_witness.7a8, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1186,21 +1158,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %DefValueReturnClass.cpp_destructor.decl: %DefValueReturnClass.cpp_destructor.type = fn_decl @DefValueReturnClass.cpp_destructor [concrete = constants.%DefValueReturnClass.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7a7 = ref_param_pattern [concrete = constants.%self.param_patt.da2] -// CHECK:STDOUT: %self.patt: %pattern_type.7a7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4d6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefValueReturnClass = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefValueReturnClass = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1212,18 +1171,13 @@ fn F() { // CHECK:STDOUT: %foo_def_value_return__carbon_thunk.call: init %empty_tuple.type = call imports.%foo_def_value_return__carbon_thunk.decl(%addr) // CHECK:STDOUT: %.loc8_28.2: init %DefValueReturnClass to %.loc8_28.1 = mark_in_place_init %foo_def_value_return__carbon_thunk.call // CHECK:STDOUT: %.loc8_28.3: ref %DefValueReturnClass = temporary %.loc8_28.1, %.loc8_28.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_28.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_28.3) +// CHECK:STDOUT: %Destroy.facet.loc8_28.1: %Destroy.type = facet_value constants.%DefValueReturnClass, (constants.%DestroyImpl.impl_witness.7a8, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_28.4: %Destroy.type = converted constants.%DefValueReturnClass, %Destroy.facet.loc8_28.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_28.2: %Destroy.type = facet_value constants.%DefValueReturnClass, (constants.%DestroyImpl.impl_witness.7a8, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_28.5: %Destroy.type = converted constants.%DefValueReturnClass, %Destroy.facet.loc8_28.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_28.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %DefValueReturnClass) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %DefValueReturnClass) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %DefValueReturnClass.cpp_destructor.call: init %empty_tuple.type = call imports.%DefValueReturnClass.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_decl_pointer_return_type.carbon diff --git a/toolchain/check/testdata/interop/cpp/function/import/constexpr.carbon b/toolchain/check/testdata/interop/cpp/function/import/constexpr.carbon index 5de2fc1a9bd1..87642d3c5b9e 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/constexpr.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/constexpr.carbon @@ -180,14 +180,17 @@ let a: array(i32, F()) = (1, 2, 3); // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.95d) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] -// CHECK:STDOUT: %self.param_patt.d94: %pattern_type.3cc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d4e: %pattern_type.3cc = wrapper_binding_pattern self, %self.param_patt.d94 [concrete] -// CHECK:STDOUT: %ConstexprC.cpp_destructor.type: type = fn_type @ConstexprC.cpp_destructor [concrete] -// CHECK:STDOUT: %ConstexprC.cpp_destructor: %ConstexprC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %ConstexprC.Op.type: type = fn_type @ConstexprC.Op [concrete] +// CHECK:STDOUT: %ConstexprC.Op: %ConstexprC.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%ConstexprC.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0ab: %SubobjectDestroy.type = facet_value %ConstexprC, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a0d: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0ab) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ConstexprC, (%DestroyImpl.impl_witness.a0d, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -205,21 +208,8 @@ let a: array(i32, F()) = (1, 2, 3); // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl.6b6 [concrete] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %ConstexprC.cpp_destructor.decl: %ConstexprC.cpp_destructor.type = fn_decl @ConstexprC.cpp_destructor [concrete = constants.%ConstexprC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc17 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3cc = ref_param_pattern [concrete = constants.%self.param_patt.d94] -// CHECK:STDOUT: %self.patt: %pattern_type.3cc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d4e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ConstexprC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ConstexprC = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> out %return.param: %i32 { @@ -256,21 +246,15 @@ let a: array(i32, F()) = (1, 2, 3); // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc18_11.2: = bound_method %.loc18_11.2, %specific_fn.loc18 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc18_11.2(%.loc18_11.2) +// CHECK:STDOUT: %Destroy.facet.loc17_27.1: %Destroy.type = facet_value constants.%ConstexprC, (constants.%DestroyImpl.impl_witness.a0d, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_27.8: %Destroy.type = converted constants.%ConstexprC, %Destroy.facet.loc17_27.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc17_27.2: %Destroy.type = facet_value constants.%ConstexprC, (constants.%DestroyImpl.impl_witness.a0d, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_27.9: %Destroy.type = converted constants.%ConstexprC, %Destroy.facet.loc17_27.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc17_27.6, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc17_27.6) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc17_27.6) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17(%self.param: ref %ConstexprC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17(%self.param: ref %ConstexprC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %ConstexprC.cpp_destructor.call: init %empty_tuple.type = call imports.%ConstexprC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // 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 14763fb4904a..6a14f3caf642 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/decayed_param.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/decayed_param.carbon @@ -74,7 +74,6 @@ fn F() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete] @@ -114,38 +113,40 @@ fn F() { // CHECK:STDOUT: %int_0.753: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %ptr.a17: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.type.b0c: type = fn_type @ptr.as.OptionalStorage.impl.Some, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.bf1: %ptr.as.OptionalStorage.impl.Some.type.b0c = struct_value () [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.None.type.629: type = fn_type @ptr.as.OptionalStorage.impl.None, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.None.f84: %ptr.as.OptionalStorage.impl.None.type.629 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.871: %Destroy.type = facet_value %ptr.a17, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.490: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.871) [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d4d: %SubobjectDestroy.type = facet_value %ptr.a17, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b8f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d4d) [concrete] +// CHECK:STDOUT: %Destroy.facet.553: %Destroy.type = facet_value %ptr.a17, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.b8f) [concrete] +// CHECK:STDOUT: %MaybeUnformed.729: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.553) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.d72: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%i32) [concrete] // CHECK:STDOUT: %.31e: type = maybe_unformed_type %ptr.a17 [concrete] // CHECK:STDOUT: %OptionalStorage.facet.3c0: %OptionalStorage.type = facet_value %ptr.a17, (%OptionalStorage.impl_witness.d72) [concrete] // CHECK:STDOUT: %Optional.785: type = class_type @Optional, @Optional(%OptionalStorage.facet.3c0) [concrete] -// CHECK:STDOUT: %pattern_type.f33: type = pattern_type %Optional.785 [concrete] // CHECK:STDOUT: %TakesArray.type: type = fn_type @TakesArray [concrete] // CHECK:STDOUT: %TakesArray: %TakesArray.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.51c: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.785)> [concrete] -// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220)> [symbolic] +// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220e40.1)> [symbolic] // CHECK:STDOUT: %U.c66: %OptionalAs.type.5bd = symbolic_binding U, 1 [symbolic] -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220, %U.c66) [symbolic] +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220e40.1, %U.c66) [symbolic] // CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.f83: %U.as_type.as.ImplicitAs.impl.Convert.type.c47 = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.type.987: type = facet_type <@OptionalAs, @OptionalAs(%OptionalStorage.facet.3c0)> [concrete] -// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220e40.1) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.c36: %T.as_type.as.OptionalAs.impl.Convert.type.b2a = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.impl_witness.d02: = impl_witness imports.%OptionalAs.impl_witness_table.98f, @T.as_type.as.OptionalAs.impl(%OptionalStorage.facet.3c0) [concrete] // CHECK:STDOUT: %OptionalAs.facet: %OptionalAs.type.987 = facet_value %ptr.a17, (%OptionalAs.impl_witness.d02) [concrete] @@ -156,28 +157,12 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6dc: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Optional.785, %ImplicitAs.facet.7a7) [concrete] // CHECK:STDOUT: %.ed9: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6dc, %ImplicitAs.facet.7a7 [concrete] // CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %U.as_type.as.ImplicitAs.impl.Convert.c03, @U.as_type.as.ImplicitAs.impl.Convert.2(%OptionalStorage.facet.3c0, %OptionalAs.facet) [concrete] -// CHECK:STDOUT: %pattern_type.4b7b: type = pattern_type %.31e [concrete] -// CHECK:STDOUT: %self.param_patt.b24: %pattern_type.4b7b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3c5: %pattern_type.4b7b = wrapper_binding_pattern self, %self.param_patt.b24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_18.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_18.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.3f1: type = pattern_type %MaybeUnformed.490 [concrete] -// CHECK:STDOUT: %self.param_patt.500: %pattern_type.3f1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.aed: %pattern_type.3f1 = wrapper_binding_pattern self, %self.param_patt.500 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_18.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11_18.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c66: %pattern_type.f33 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.76b: %pattern_type.f33 = wrapper_binding_pattern self, %self.param_patt.c66 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_18.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc11_18.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_18.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_18.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b46: %SubobjectDestroy.type = facet_value %Optional.785, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.977: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b46) [concrete] +// CHECK:STDOUT: %Destroy.facet.3a3: %Destroy.type = facet_value %Optional.785, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.977) [concrete] // CHECK:STDOUT: %Cpp.nullptr_t: type = class_type @NullptrT [concrete] // CHECK:STDOUT: %uninit: %Cpp.nullptr_t = uninitialized_value [concrete] // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.type.22d: type = fn_type @Cpp.nullptr_t.as.ImplicitAs.impl.Convert, @Cpp.nullptr_t.as.ImplicitAs.impl(%T.67d) [symbolic] @@ -197,19 +182,15 @@ fn F() { // CHECK:STDOUT: %TakesFunction.type: type = fn_type @TakesFunction [concrete] // CHECK:STDOUT: %TakesFunction: %TakesFunction.type = struct_value () [concrete] // CHECK:STDOUT: %.266: %.659 = cpp_addr_of_fn %G, @G [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.421: %pattern_type.9c3 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt.421 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.6: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.6: %SubobjectDestroy.WithSelf.Op.type.6870fd.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.6: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.6), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.046: %Destroy.type = facet_value %i32, (%custom_witness.b80ef6.6, %DestroyImpl.impl_witness.077) [concrete] // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete] // CHECK:STDOUT: %int_39: Core.IntLiteral = int_value 39 [concrete] // CHECK:STDOUT: %int_38: Core.IntLiteral = int_value 38 [concrete] @@ -249,10 +230,10 @@ fn F() { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.7: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.817: %SubobjectDestroy.type = facet_value %Array.3b5, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.be3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.817) [concrete] +// CHECK:STDOUT: %Destroy.facet.b87: %Destroy.type = facet_value %Array.3b5, (%custom_witness.b80ef6.7, %DestroyImpl.impl_witness.be3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -269,13 +250,15 @@ fn F() { // CHECK:STDOUT: %TakesArray.cpp_overload_set.value: %TakesArray.cpp_overload_set.type = cpp_overload_set_value @TakesArray.cpp_overload_set [concrete = constants.%TakesArray.cpp_overload_set.value] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.6b6.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.6b6.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl.6b6 [concrete] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.9ff: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.None.type (%ptr.as.OptionalStorage.impl.None.type.629) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.None (constants.%ptr.as.OptionalStorage.impl.None.f84)] // CHECK:STDOUT: %Core.import_ref.470: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some.type (%ptr.as.OptionalStorage.impl.Some.type.b0c) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some (constants.%ptr.as.OptionalStorage.impl.Some.bf1)] // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.9ff, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.9ff, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.7b53: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b53), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %TakesArray.decl: %TakesArray.type = fn_decl @TakesArray [concrete = constants.%TakesArray] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -302,79 +285,6 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_18.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7b = ref_param_pattern [concrete = constants.%self.param_patt.b24] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3c5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.31e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.31e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_18.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7b = ref_param_pattern [concrete = constants.%self.param_patt.b24] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3c5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.31e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.31e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_18.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f1 = ref_param_pattern [concrete = constants.%self.param_patt.500] -// CHECK:STDOUT: %self.patt: %pattern_type.3f1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aed] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.490 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.490 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11_18.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f1 = ref_param_pattern [concrete = constants.%self.param_patt.500] -// CHECK:STDOUT: %self.patt: %pattern_type.3f1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aed] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.490 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.490 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_18.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f33 = ref_param_pattern [concrete = constants.%self.param_patt.c66] -// CHECK:STDOUT: %self.patt: %pattern_type.f33 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.76b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.785 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.785 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc11_18.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f33 = ref_param_pattern [concrete = constants.%self.param_patt.c66] -// CHECK:STDOUT: %self.patt: %pattern_type.f33 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.76b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.785 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.785 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc10_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9c3 = ref_param_pattern [concrete = constants.%self.param_patt.421] -// CHECK:STDOUT: %self.patt: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.3b5 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.3b5 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc10_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9c3 = ref_param_pattern [concrete = constants.%self.param_patt.421] -// CHECK:STDOUT: %self.patt: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.3b5 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.3b5 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.var: ref %Array.3b5 = var_storage %n.var_patt @@ -383,8 +293,8 @@ fn F() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_24.1 [concrete = constants.%Array.3b5] // CHECK:STDOUT: %.loc10_24.2: type = converted %.loc10_24.1, %as_type [concrete = constants.%Array.3b5] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc10_3: ref %Array.3b5 = splice_block %n.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %Array.3b5 to %.loc10_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc10_3.1: ref %Array.3b5 = splice_block %n.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %Array.3b5 to %.loc10_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %n.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc10_23: type = splice_block %Array [concrete = constants.%Array.3b5] { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -419,8 +329,12 @@ fn F() { // CHECK:STDOUT: %.loc11_18.3: ref %Optional.785 = temporary %.loc11_18.2, %.loc11_18.1 // CHECK:STDOUT: %.loc11_18.4: %Optional.785 = acquire_value %.loc11_18.3 // CHECK:STDOUT: %TakesArray.call.loc11: init %empty_tuple.type = call imports.%TakesArray.decl(%.loc11_18.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %.loc11_18.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%.loc11_18.3) +// CHECK:STDOUT: %Destroy.facet.loc11_18.1: %Destroy.type = facet_value constants.%Optional.785, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.977) [concrete = constants.%Destroy.facet.3a3] +// CHECK:STDOUT: %.loc11_18.5: %Destroy.type = converted constants.%Optional.785, %Destroy.facet.loc11_18.1 [concrete = constants.%Destroy.facet.3a3] +// CHECK:STDOUT: %Destroy.facet.loc11_18.2: %Destroy.type = facet_value constants.%Optional.785, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.977) [concrete = constants.%Destroy.facet.3a3] +// CHECK:STDOUT: %.loc11_18.6: %Destroy.type = converted constants.%Optional.785, %Destroy.facet.loc11_18.2 [concrete = constants.%Destroy.facet.3a3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc11_18.3) // CHECK:STDOUT: %Cpp.ref.loc13_3: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %TakesArray.ref.loc13: %TakesArray.cpp_overload_set.type = name_ref TakesArray, imports.%TakesArray.cpp_overload_set.value [concrete = constants.%TakesArray.cpp_overload_set.value] // CHECK:STDOUT: %Cpp.ref.loc13_18: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -436,242 +350,373 @@ fn F() { // CHECK:STDOUT: %.loc13_21.3: ref %Optional.785 = temporary %.loc13_21.2, %.loc13_21.1 // CHECK:STDOUT: %.loc13_21.4: %Optional.785 = acquire_value %.loc13_21.3 // CHECK:STDOUT: %TakesArray.call.loc13: init %empty_tuple.type = call imports.%TakesArray.decl(%.loc13_21.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13: = bound_method %.loc13_21.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13(%.loc13_21.3) +// CHECK:STDOUT: %Destroy.facet.loc13_21.1: %Destroy.type = facet_value constants.%Optional.785, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.977) [concrete = constants.%Destroy.facet.3a3] +// CHECK:STDOUT: %.loc13_21.5: %Destroy.type = converted constants.%Optional.785, %Destroy.facet.loc13_21.1 [concrete = constants.%Destroy.facet.3a3] +// CHECK:STDOUT: %Destroy.facet.loc13_21.2: %Destroy.type = facet_value constants.%Optional.785, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.977) [concrete = constants.%Destroy.facet.3a3] +// CHECK:STDOUT: %.loc13_21.6: %Destroy.type = converted constants.%Optional.785, %Destroy.facet.loc13_21.2 [concrete = constants.%Destroy.facet.3a3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc13_21.3) // CHECK:STDOUT: %Cpp.ref.loc15: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %TakesFunction.ref: %TakesFunction.cpp_overload_set.type = name_ref TakesFunction, imports.%TakesFunction.cpp_overload_set.value [concrete = constants.%TakesFunction.cpp_overload_set.value] // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] // CHECK:STDOUT: %.loc15_21.1: %.659 = cpp_addr_of_fn %G.ref, @G [concrete = constants.%.266] // CHECK:STDOUT: %.loc15_21.2: %.659 = converted %G.ref, %.loc15_21.1 [concrete = constants.%.266] // CHECK:STDOUT: %TakesFunction.call: init %empty_tuple.type = call imports.%TakesFunction.decl(%.loc15_21.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %n.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%n.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%Array.3b5, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.be3) [concrete = constants.%Destroy.facet.b87] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%Array.3b5, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.b87] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%Array.3b5, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.be3) [concrete = constants.%Destroy.facet.b87] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%Array.3b5, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.b87] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%n.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_18.1(%self.param: ref %.31e) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_18.1(%self.param: ref %.31e) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_18.1(%self.param: ref %.31e) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_18.2(%self.param: ref %MaybeUnformed.729) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_18.1(%self.param: ref %.31e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_18.3(%self.param: ref %Optional.785) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_18.2(%self.param: ref %MaybeUnformed.490) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_18.2(%self.param: ref %MaybeUnformed.490) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_18.2(%self.param: ref %MaybeUnformed.490) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_18.3(%self.param: ref %Optional.785) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_18.3(%self.param: ref %Optional.785) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_18.3(%self.param: ref %Optional.785) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %Array.3b5) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.2(%self.param: ref %Array.3b5) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete = constants.%int_41] // CHECK:STDOUT: %.loc10_3.1: ref %i32 = array_index %self.param, %int_41 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.1: = bound_method %.loc10_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.1(%.loc10_3.1) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_3.1) // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete = constants.%int_40] -// CHECK:STDOUT: %.loc10_3.2: ref %i32 = array_index %self.param, %int_40 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.2: = bound_method %.loc10_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.2(%.loc10_3.2) +// CHECK:STDOUT: %.loc10_3.4: ref %i32 = array_index %self.param, %int_40 +// CHECK:STDOUT: %Destroy.facet.loc10_3.3: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.3 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.4: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.4 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_3.4) // CHECK:STDOUT: %int_39: Core.IntLiteral = int_value 39 [concrete = constants.%int_39] -// CHECK:STDOUT: %.loc10_3.3: ref %i32 = array_index %self.param, %int_39 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.3: = bound_method %.loc10_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.3(%.loc10_3.3) +// CHECK:STDOUT: %.loc10_3.7: ref %i32 = array_index %self.param, %int_39 +// CHECK:STDOUT: %Destroy.facet.loc10_3.5: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.8: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.5 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.6: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.9: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.6 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc10_3.7) // CHECK:STDOUT: %int_38: Core.IntLiteral = int_value 38 [concrete = constants.%int_38] -// CHECK:STDOUT: %.loc10_3.4: ref %i32 = array_index %self.param, %int_38 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.4: = bound_method %.loc10_3.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.4(%.loc10_3.4) +// CHECK:STDOUT: %.loc10_3.10: ref %i32 = array_index %self.param, %int_38 +// CHECK:STDOUT: %Destroy.facet.loc10_3.7: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.11: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.7 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.8: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.12: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.8 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc10_3.10) // CHECK:STDOUT: %int_37: Core.IntLiteral = int_value 37 [concrete = constants.%int_37] -// CHECK:STDOUT: %.loc10_3.5: ref %i32 = array_index %self.param, %int_37 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.5: = bound_method %.loc10_3.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.5: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.5(%.loc10_3.5) +// CHECK:STDOUT: %.loc10_3.13: ref %i32 = array_index %self.param, %int_37 +// CHECK:STDOUT: %Destroy.facet.loc10_3.9: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.14: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.9 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.10: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.15: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.10 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.5: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc10_3.13) // CHECK:STDOUT: %int_36: Core.IntLiteral = int_value 36 [concrete = constants.%int_36] -// CHECK:STDOUT: %.loc10_3.6: ref %i32 = array_index %self.param, %int_36 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.6: = bound_method %.loc10_3.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.6: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.6(%.loc10_3.6) +// CHECK:STDOUT: %.loc10_3.16: ref %i32 = array_index %self.param, %int_36 +// CHECK:STDOUT: %Destroy.facet.loc10_3.11: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.17: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.11 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.12: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.18: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.12 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.6: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%.loc10_3.16) // CHECK:STDOUT: %int_35: Core.IntLiteral = int_value 35 [concrete = constants.%int_35] -// CHECK:STDOUT: %.loc10_3.7: ref %i32 = array_index %self.param, %int_35 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.7: = bound_method %.loc10_3.7, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.7(%.loc10_3.7) +// CHECK:STDOUT: %.loc10_3.19: ref %i32 = array_index %self.param, %int_35 +// CHECK:STDOUT: %Destroy.facet.loc10_3.13: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.20: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.13 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.14: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.21: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.14 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.7: init %empty_tuple.type = call %SelfDestruct.specific_fn.7(%.loc10_3.19) // CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [concrete = constants.%int_34] -// CHECK:STDOUT: %.loc10_3.8: ref %i32 = array_index %self.param, %int_34 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.8: = bound_method %.loc10_3.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.8(%.loc10_3.8) +// CHECK:STDOUT: %.loc10_3.22: ref %i32 = array_index %self.param, %int_34 +// CHECK:STDOUT: %Destroy.facet.loc10_3.15: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.23: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.15 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.16: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.24: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.16 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.8: init %empty_tuple.type = call %SelfDestruct.specific_fn.8(%.loc10_3.22) // CHECK:STDOUT: %int_33: Core.IntLiteral = int_value 33 [concrete = constants.%int_33] -// CHECK:STDOUT: %.loc10_3.9: ref %i32 = array_index %self.param, %int_33 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.9: = bound_method %.loc10_3.9, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.9(%.loc10_3.9) +// CHECK:STDOUT: %.loc10_3.25: ref %i32 = array_index %self.param, %int_33 +// CHECK:STDOUT: %Destroy.facet.loc10_3.17: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.26: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.17 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.18: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.27: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.18 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.9: init %empty_tuple.type = call %SelfDestruct.specific_fn.9(%.loc10_3.25) // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %.loc10_3.10: ref %i32 = array_index %self.param, %int_32 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.10: = bound_method %.loc10_3.10, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.10(%.loc10_3.10) +// CHECK:STDOUT: %.loc10_3.28: ref %i32 = array_index %self.param, %int_32 +// CHECK:STDOUT: %Destroy.facet.loc10_3.19: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.29: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.19 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.20: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.30: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.20 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.10: init %empty_tuple.type = call %SelfDestruct.specific_fn.10(%.loc10_3.28) // CHECK:STDOUT: %int_31: Core.IntLiteral = int_value 31 [concrete = constants.%int_31] -// CHECK:STDOUT: %.loc10_3.11: ref %i32 = array_index %self.param, %int_31 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.11: = bound_method %.loc10_3.11, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.11(%.loc10_3.11) +// CHECK:STDOUT: %.loc10_3.31: ref %i32 = array_index %self.param, %int_31 +// CHECK:STDOUT: %Destroy.facet.loc10_3.21: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.32: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.21 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.22: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.33: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.22 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.11: init %empty_tuple.type = call %SelfDestruct.specific_fn.11(%.loc10_3.31) // CHECK:STDOUT: %int_30: Core.IntLiteral = int_value 30 [concrete = constants.%int_30] -// CHECK:STDOUT: %.loc10_3.12: ref %i32 = array_index %self.param, %int_30 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.12: = bound_method %.loc10_3.12, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.12(%.loc10_3.12) +// CHECK:STDOUT: %.loc10_3.34: ref %i32 = array_index %self.param, %int_30 +// CHECK:STDOUT: %Destroy.facet.loc10_3.23: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.35: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.23 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.24: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.36: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.24 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.12: init %empty_tuple.type = call %SelfDestruct.specific_fn.12(%.loc10_3.34) // CHECK:STDOUT: %int_29: Core.IntLiteral = int_value 29 [concrete = constants.%int_29] -// CHECK:STDOUT: %.loc10_3.13: ref %i32 = array_index %self.param, %int_29 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.13: = bound_method %.loc10_3.13, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.13(%.loc10_3.13) +// CHECK:STDOUT: %.loc10_3.37: ref %i32 = array_index %self.param, %int_29 +// CHECK:STDOUT: %Destroy.facet.loc10_3.25: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.38: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.25 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.26: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.39: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.26 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.13: init %empty_tuple.type = call %SelfDestruct.specific_fn.13(%.loc10_3.37) // CHECK:STDOUT: %int_28: Core.IntLiteral = int_value 28 [concrete = constants.%int_28] -// CHECK:STDOUT: %.loc10_3.14: ref %i32 = array_index %self.param, %int_28 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.14: = bound_method %.loc10_3.14, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.14: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.14(%.loc10_3.14) +// CHECK:STDOUT: %.loc10_3.40: ref %i32 = array_index %self.param, %int_28 +// CHECK:STDOUT: %Destroy.facet.loc10_3.27: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.41: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.27 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.28: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.42: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.28 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.14: init %empty_tuple.type = call %SelfDestruct.specific_fn.14(%.loc10_3.40) // CHECK:STDOUT: %int_27: Core.IntLiteral = int_value 27 [concrete = constants.%int_27] -// CHECK:STDOUT: %.loc10_3.15: ref %i32 = array_index %self.param, %int_27 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.15: = bound_method %.loc10_3.15, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.15: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.15(%.loc10_3.15) +// CHECK:STDOUT: %.loc10_3.43: ref %i32 = array_index %self.param, %int_27 +// CHECK:STDOUT: %Destroy.facet.loc10_3.29: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.44: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.29 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.30: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.45: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.30 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.15: init %empty_tuple.type = call %SelfDestruct.specific_fn.15(%.loc10_3.43) // CHECK:STDOUT: %int_26: Core.IntLiteral = int_value 26 [concrete = constants.%int_26] -// CHECK:STDOUT: %.loc10_3.16: ref %i32 = array_index %self.param, %int_26 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.16: = bound_method %.loc10_3.16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.16(%.loc10_3.16) +// CHECK:STDOUT: %.loc10_3.46: ref %i32 = array_index %self.param, %int_26 +// CHECK:STDOUT: %Destroy.facet.loc10_3.31: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.47: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.31 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.32: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.48: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.32 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.16: init %empty_tuple.type = call %SelfDestruct.specific_fn.16(%.loc10_3.46) // CHECK:STDOUT: %int_25: Core.IntLiteral = int_value 25 [concrete = constants.%int_25] -// CHECK:STDOUT: %.loc10_3.17: ref %i32 = array_index %self.param, %int_25 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.17: = bound_method %.loc10_3.17, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.17: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.17(%.loc10_3.17) +// CHECK:STDOUT: %.loc10_3.49: ref %i32 = array_index %self.param, %int_25 +// CHECK:STDOUT: %Destroy.facet.loc10_3.33: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.50: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.33 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.34: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.51: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.34 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.17: init %empty_tuple.type = call %SelfDestruct.specific_fn.17(%.loc10_3.49) // CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [concrete = constants.%int_24] -// CHECK:STDOUT: %.loc10_3.18: ref %i32 = array_index %self.param, %int_24 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.18: = bound_method %.loc10_3.18, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.18: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.18(%.loc10_3.18) +// CHECK:STDOUT: %.loc10_3.52: ref %i32 = array_index %self.param, %int_24 +// CHECK:STDOUT: %Destroy.facet.loc10_3.35: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.53: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.35 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.36: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.54: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.36 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.18: init %empty_tuple.type = call %SelfDestruct.specific_fn.18(%.loc10_3.52) // CHECK:STDOUT: %int_23: Core.IntLiteral = int_value 23 [concrete = constants.%int_23] -// CHECK:STDOUT: %.loc10_3.19: ref %i32 = array_index %self.param, %int_23 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.19: = bound_method %.loc10_3.19, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.19(%.loc10_3.19) +// CHECK:STDOUT: %.loc10_3.55: ref %i32 = array_index %self.param, %int_23 +// CHECK:STDOUT: %Destroy.facet.loc10_3.37: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.56: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.37 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.38: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.57: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.38 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.19: init %empty_tuple.type = call %SelfDestruct.specific_fn.19(%.loc10_3.55) // CHECK:STDOUT: %int_22: Core.IntLiteral = int_value 22 [concrete = constants.%int_22] -// CHECK:STDOUT: %.loc10_3.20: ref %i32 = array_index %self.param, %int_22 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.20: = bound_method %.loc10_3.20, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.20: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.20(%.loc10_3.20) +// CHECK:STDOUT: %.loc10_3.58: ref %i32 = array_index %self.param, %int_22 +// CHECK:STDOUT: %Destroy.facet.loc10_3.39: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.59: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.39 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.40: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.60: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.40 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.20: init %empty_tuple.type = call %SelfDestruct.specific_fn.20(%.loc10_3.58) // CHECK:STDOUT: %int_21: Core.IntLiteral = int_value 21 [concrete = constants.%int_21] -// CHECK:STDOUT: %.loc10_3.21: ref %i32 = array_index %self.param, %int_21 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.21: = bound_method %.loc10_3.21, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.21(%.loc10_3.21) +// CHECK:STDOUT: %.loc10_3.61: ref %i32 = array_index %self.param, %int_21 +// CHECK:STDOUT: %Destroy.facet.loc10_3.41: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.62: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.41 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.42: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.63: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.42 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.21: init %empty_tuple.type = call %SelfDestruct.specific_fn.21(%.loc10_3.61) // CHECK:STDOUT: %int_20: Core.IntLiteral = int_value 20 [concrete = constants.%int_20] -// CHECK:STDOUT: %.loc10_3.22: ref %i32 = array_index %self.param, %int_20 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.22: = bound_method %.loc10_3.22, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.22(%.loc10_3.22) +// CHECK:STDOUT: %.loc10_3.64: ref %i32 = array_index %self.param, %int_20 +// CHECK:STDOUT: %Destroy.facet.loc10_3.43: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.65: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.43 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.44: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.66: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.44 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.22: init %empty_tuple.type = call %SelfDestruct.specific_fn.22(%.loc10_3.64) // CHECK:STDOUT: %int_19: Core.IntLiteral = int_value 19 [concrete = constants.%int_19] -// CHECK:STDOUT: %.loc10_3.23: ref %i32 = array_index %self.param, %int_19 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.23: = bound_method %.loc10_3.23, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.23(%.loc10_3.23) +// CHECK:STDOUT: %.loc10_3.67: ref %i32 = array_index %self.param, %int_19 +// CHECK:STDOUT: %Destroy.facet.loc10_3.45: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.68: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.45 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.46: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.69: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.46 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.23: init %empty_tuple.type = call %SelfDestruct.specific_fn.23(%.loc10_3.67) // CHECK:STDOUT: %int_18: Core.IntLiteral = int_value 18 [concrete = constants.%int_18] -// CHECK:STDOUT: %.loc10_3.24: ref %i32 = array_index %self.param, %int_18 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.24: = bound_method %.loc10_3.24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.24(%.loc10_3.24) +// CHECK:STDOUT: %.loc10_3.70: ref %i32 = array_index %self.param, %int_18 +// CHECK:STDOUT: %Destroy.facet.loc10_3.47: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.71: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.47 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.48: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.72: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.48 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.24: init %empty_tuple.type = call %SelfDestruct.specific_fn.24(%.loc10_3.70) // CHECK:STDOUT: %int_17: Core.IntLiteral = int_value 17 [concrete = constants.%int_17] -// CHECK:STDOUT: %.loc10_3.25: ref %i32 = array_index %self.param, %int_17 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.25: = bound_method %.loc10_3.25, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.25: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.25(%.loc10_3.25) +// CHECK:STDOUT: %.loc10_3.73: ref %i32 = array_index %self.param, %int_17 +// CHECK:STDOUT: %Destroy.facet.loc10_3.49: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.74: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.49 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.50: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.75: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.50 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.25: init %empty_tuple.type = call %SelfDestruct.specific_fn.25(%.loc10_3.73) // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] -// CHECK:STDOUT: %.loc10_3.26: ref %i32 = array_index %self.param, %int_16 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.26: = bound_method %.loc10_3.26, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.26: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.26(%.loc10_3.26) +// CHECK:STDOUT: %.loc10_3.76: ref %i32 = array_index %self.param, %int_16 +// CHECK:STDOUT: %Destroy.facet.loc10_3.51: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.77: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.51 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.52: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.78: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.52 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.26: init %empty_tuple.type = call %SelfDestruct.specific_fn.26(%.loc10_3.76) // CHECK:STDOUT: %int_15: Core.IntLiteral = int_value 15 [concrete = constants.%int_15] -// CHECK:STDOUT: %.loc10_3.27: ref %i32 = array_index %self.param, %int_15 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.27: = bound_method %.loc10_3.27, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.27: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.27(%.loc10_3.27) +// CHECK:STDOUT: %.loc10_3.79: ref %i32 = array_index %self.param, %int_15 +// CHECK:STDOUT: %Destroy.facet.loc10_3.53: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.80: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.53 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.54: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.81: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.54 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.27: init %empty_tuple.type = call %SelfDestruct.specific_fn.27(%.loc10_3.79) // CHECK:STDOUT: %int_14: Core.IntLiteral = int_value 14 [concrete = constants.%int_14] -// CHECK:STDOUT: %.loc10_3.28: ref %i32 = array_index %self.param, %int_14 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.28: = bound_method %.loc10_3.28, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.28: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.28(%.loc10_3.28) +// CHECK:STDOUT: %.loc10_3.82: ref %i32 = array_index %self.param, %int_14 +// CHECK:STDOUT: %Destroy.facet.loc10_3.55: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.83: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.55 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.56: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.84: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.56 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.28: init %empty_tuple.type = call %SelfDestruct.specific_fn.28(%.loc10_3.82) // CHECK:STDOUT: %int_13: Core.IntLiteral = int_value 13 [concrete = constants.%int_13] -// CHECK:STDOUT: %.loc10_3.29: ref %i32 = array_index %self.param, %int_13 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.29: = bound_method %.loc10_3.29, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.29: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.29(%.loc10_3.29) +// CHECK:STDOUT: %.loc10_3.85: ref %i32 = array_index %self.param, %int_13 +// CHECK:STDOUT: %Destroy.facet.loc10_3.57: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.86: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.57 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.58: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.87: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.58 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.29: init %empty_tuple.type = call %SelfDestruct.specific_fn.29(%.loc10_3.85) // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12] -// CHECK:STDOUT: %.loc10_3.30: ref %i32 = array_index %self.param, %int_12 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.30: = bound_method %.loc10_3.30, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.30: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.30(%.loc10_3.30) +// CHECK:STDOUT: %.loc10_3.88: ref %i32 = array_index %self.param, %int_12 +// CHECK:STDOUT: %Destroy.facet.loc10_3.59: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.89: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.59 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.60: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.90: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.60 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.30: init %empty_tuple.type = call %SelfDestruct.specific_fn.30(%.loc10_3.88) // CHECK:STDOUT: %int_11: Core.IntLiteral = int_value 11 [concrete = constants.%int_11] -// CHECK:STDOUT: %.loc10_3.31: ref %i32 = array_index %self.param, %int_11 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.31: = bound_method %.loc10_3.31, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.31: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.31(%.loc10_3.31) +// CHECK:STDOUT: %.loc10_3.91: ref %i32 = array_index %self.param, %int_11 +// CHECK:STDOUT: %Destroy.facet.loc10_3.61: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.92: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.61 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.62: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.93: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.62 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.31: init %empty_tuple.type = call %SelfDestruct.specific_fn.31(%.loc10_3.91) // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10] -// CHECK:STDOUT: %.loc10_3.32: ref %i32 = array_index %self.param, %int_10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.32: = bound_method %.loc10_3.32, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.32: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.32(%.loc10_3.32) +// CHECK:STDOUT: %.loc10_3.94: ref %i32 = array_index %self.param, %int_10 +// CHECK:STDOUT: %Destroy.facet.loc10_3.63: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.95: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.63 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.64: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.96: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.64 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.32: init %empty_tuple.type = call %SelfDestruct.specific_fn.32(%.loc10_3.94) // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9] -// CHECK:STDOUT: %.loc10_3.33: ref %i32 = array_index %self.param, %int_9 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.33: = bound_method %.loc10_3.33, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.33: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.33(%.loc10_3.33) +// CHECK:STDOUT: %.loc10_3.97: ref %i32 = array_index %self.param, %int_9 +// CHECK:STDOUT: %Destroy.facet.loc10_3.65: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.98: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.65 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.66: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.99: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.66 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.33: init %empty_tuple.type = call %SelfDestruct.specific_fn.33(%.loc10_3.97) // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8] -// CHECK:STDOUT: %.loc10_3.34: ref %i32 = array_index %self.param, %int_8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.34: = bound_method %.loc10_3.34, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.34: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.34(%.loc10_3.34) +// CHECK:STDOUT: %.loc10_3.100: ref %i32 = array_index %self.param, %int_8 +// CHECK:STDOUT: %Destroy.facet.loc10_3.67: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.101: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.67 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.68: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.102: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.68 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.34: init %empty_tuple.type = call %SelfDestruct.specific_fn.34(%.loc10_3.100) // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7] -// CHECK:STDOUT: %.loc10_3.35: ref %i32 = array_index %self.param, %int_7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.35: = bound_method %.loc10_3.35, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.35: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.35(%.loc10_3.35) +// CHECK:STDOUT: %.loc10_3.103: ref %i32 = array_index %self.param, %int_7 +// CHECK:STDOUT: %Destroy.facet.loc10_3.69: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.104: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.69 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.70: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.105: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.70 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.35: init %empty_tuple.type = call %SelfDestruct.specific_fn.35(%.loc10_3.103) // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6] -// CHECK:STDOUT: %.loc10_3.36: ref %i32 = array_index %self.param, %int_6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.36: = bound_method %.loc10_3.36, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.36: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.36(%.loc10_3.36) +// CHECK:STDOUT: %.loc10_3.106: ref %i32 = array_index %self.param, %int_6 +// CHECK:STDOUT: %Destroy.facet.loc10_3.71: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.107: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.71 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.72: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.108: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.72 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.36: init %empty_tuple.type = call %SelfDestruct.specific_fn.36(%.loc10_3.106) // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] -// CHECK:STDOUT: %.loc10_3.37: ref %i32 = array_index %self.param, %int_5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.37: = bound_method %.loc10_3.37, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.37: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.37(%.loc10_3.37) +// CHECK:STDOUT: %.loc10_3.109: ref %i32 = array_index %self.param, %int_5 +// CHECK:STDOUT: %Destroy.facet.loc10_3.73: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.110: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.73 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.74: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.111: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.74 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.37: init %empty_tuple.type = call %SelfDestruct.specific_fn.37(%.loc10_3.109) // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] -// CHECK:STDOUT: %.loc10_3.38: ref %i32 = array_index %self.param, %int_4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.38: = bound_method %.loc10_3.38, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.38: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.38(%.loc10_3.38) +// CHECK:STDOUT: %.loc10_3.112: ref %i32 = array_index %self.param, %int_4 +// CHECK:STDOUT: %Destroy.facet.loc10_3.75: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.113: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.75 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.76: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.114: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.76 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.38: init %empty_tuple.type = call %SelfDestruct.specific_fn.38(%.loc10_3.112) // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %.loc10_3.39: ref %i32 = array_index %self.param, %int_3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.39: = bound_method %.loc10_3.39, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.39: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.39(%.loc10_3.39) +// CHECK:STDOUT: %.loc10_3.115: ref %i32 = array_index %self.param, %int_3 +// CHECK:STDOUT: %Destroy.facet.loc10_3.77: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.116: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.77 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.78: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.117: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.78 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.39: init %empty_tuple.type = call %SelfDestruct.specific_fn.39(%.loc10_3.115) // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %.loc10_3.40: ref %i32 = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.40: = bound_method %.loc10_3.40, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.40: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.40(%.loc10_3.40) +// CHECK:STDOUT: %.loc10_3.118: ref %i32 = array_index %self.param, %int_2 +// CHECK:STDOUT: %Destroy.facet.loc10_3.79: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.119: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.79 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.80: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.120: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.80 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.40: init %empty_tuple.type = call %SelfDestruct.specific_fn.40(%.loc10_3.118) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc10_3.41: ref %i32 = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.41: = bound_method %.loc10_3.41, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.41: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.41(%.loc10_3.41) +// CHECK:STDOUT: %.loc10_3.121: ref %i32 = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc10_3.81: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.122: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.81 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.82: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.123: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.82 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.41: init %empty_tuple.type = call %SelfDestruct.specific_fn.41(%.loc10_3.121) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc10_3.42: ref %i32 = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_3.42: = bound_method %.loc10_3.42, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_3.42: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_3.42(%.loc10_3.42) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %Array.3b5) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.2(%self.param: ref %Array.3b5) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) +// CHECK:STDOUT: %.loc10_3.124: ref %i32 = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc10_3.83: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.125: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.83 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_3.84: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.6, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_3.126: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_3.84 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_3.42: init %empty_tuple.type = call %SelfDestruct.specific_fn.42(%.loc10_3.124) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -682,7 +727,6 @@ fn F() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %TakesFunction.cpp_overload_set.type: type = cpp_overload_set_type @TakesFunction.cpp_overload_set [concrete] // CHECK:STDOUT: %TakesFunction.cpp_overload_set.value: %TakesFunction.cpp_overload_set.type = cpp_overload_set_value @TakesFunction.cpp_overload_set [concrete] // CHECK:STDOUT: %Function.cpp_overload_set.type: type = cpp_overload_set_type @Function.cpp_overload_set [concrete] @@ -720,23 +764,24 @@ fn F() { // CHECK:STDOUT: %int_0.753: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %ptr.a17: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %Cpp.nullptr_t: type = class_type @NullptrT [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %uninit: %Cpp.nullptr_t = uninitialized_value [concrete] // CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type61000000 [concrete] // CHECK:STDOUT: %TakesFunction.type: type = fn_type @TakesFunction [concrete] // CHECK:STDOUT: %TakesFunction: %TakesFunction.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.421: %pattern_type.9c3 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt.421 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete] // CHECK:STDOUT: %int_39: Core.IntLiteral = int_value 39 [concrete] // CHECK:STDOUT: %int_38: Core.IntLiteral = int_value 38 [concrete] @@ -776,10 +821,10 @@ fn F() { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.817: %SubobjectDestroy.type = facet_value %Array.3b5, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.be3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.817) [concrete] +// CHECK:STDOUT: %Destroy.facet.843: %Destroy.type = facet_value %Array.3b5, (%DestroyImpl.impl_witness.be3, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -797,6 +842,8 @@ fn F() { // CHECK:STDOUT: %UnformedInit.impl_witness_table.6e2 = impl_witness_table (), @Int.as.UnformedInit.impl [concrete] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.6b6.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.6b6.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl.6b6 [concrete] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/cpp/nullptr, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %TakesFunction.decl: %TakesFunction.type = fn_decl @TakesFunction [concrete = constants.%TakesFunction] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -804,37 +851,6 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc14_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9c3 = ref_param_pattern [concrete = constants.%self.param_patt.421] -// CHECK:STDOUT: %self.patt: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.3b5 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.3b5 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc14_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9c3 = ref_param_pattern [concrete = constants.%self.param_patt.421] -// CHECK:STDOUT: %self.patt: %pattern_type.9c3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.3b5 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.3b5 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Cpp.ref.loc12_3: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -847,8 +863,8 @@ fn F() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc14_24.1 [concrete = constants.%Array.3b5] // CHECK:STDOUT: %.loc14_24.2: type = converted %.loc14_24.1, %as_type [concrete = constants.%Array.3b5] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc14_3: ref %Array.3b5 = splice_block %n.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %Array.3b5 to %.loc14_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc14_3.1: ref %Array.3b5 = splice_block %n.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %Array.3b5 to %.loc14_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %n.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc14_23: type = splice_block %Array [concrete = constants.%Array.3b5] { // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -880,201 +896,355 @@ fn F() { // CHECK:STDOUT: %nullptr.ref: %Cpp.nullptr_t = name_ref nullptr, %uninit [concrete = constants.%uninit] // CHECK:STDOUT: %.loc27: %.659 = converted %nullptr.ref, [concrete = ] // CHECK:STDOUT: %TakesFunction.call: init %empty_tuple.type = call imports.%TakesFunction.decl() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %n.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%n.var) +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%Array.3b5, (constants.%DestroyImpl.impl_witness.be3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.843] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%Array.3b5, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet.843] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%Array.3b5, (constants.%DestroyImpl.impl_witness.be3, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.843] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%Array.3b5, %Destroy.facet.loc14_3.2 [concrete = constants.%Destroy.facet.843] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%n.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_3.2(%self.param: ref %Array.3b5) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_3.2(%self.param: ref %Array.3b5) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_41: Core.IntLiteral = int_value 41 [concrete = constants.%int_41] // CHECK:STDOUT: %.loc14_3.1: ref %i32 = array_index %self.param, %int_41 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.1: = bound_method %.loc14_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.1(%.loc14_3.1) +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc14_3.1) // CHECK:STDOUT: %int_40: Core.IntLiteral = int_value 40 [concrete = constants.%int_40] -// CHECK:STDOUT: %.loc14_3.2: ref %i32 = array_index %self.param, %int_40 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.2: = bound_method %.loc14_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.2(%.loc14_3.2) +// CHECK:STDOUT: %.loc14_3.4: ref %i32 = array_index %self.param, %int_40 +// CHECK:STDOUT: %Destroy.facet.loc14_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc14_3.4) // CHECK:STDOUT: %int_39: Core.IntLiteral = int_value 39 [concrete = constants.%int_39] -// CHECK:STDOUT: %.loc14_3.3: ref %i32 = array_index %self.param, %int_39 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.3: = bound_method %.loc14_3.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.3(%.loc14_3.3) +// CHECK:STDOUT: %.loc14_3.7: ref %i32 = array_index %self.param, %int_39 +// CHECK:STDOUT: %Destroy.facet.loc14_3.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.8: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.9: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc14_3.7) // CHECK:STDOUT: %int_38: Core.IntLiteral = int_value 38 [concrete = constants.%int_38] -// CHECK:STDOUT: %.loc14_3.4: ref %i32 = array_index %self.param, %int_38 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.4: = bound_method %.loc14_3.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.4(%.loc14_3.4) +// CHECK:STDOUT: %.loc14_3.10: ref %i32 = array_index %self.param, %int_38 +// CHECK:STDOUT: %Destroy.facet.loc14_3.7: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.11: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.7 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.8: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.12: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.8 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc14_3.10) // CHECK:STDOUT: %int_37: Core.IntLiteral = int_value 37 [concrete = constants.%int_37] -// CHECK:STDOUT: %.loc14_3.5: ref %i32 = array_index %self.param, %int_37 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.5: = bound_method %.loc14_3.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.5: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.5(%.loc14_3.5) +// CHECK:STDOUT: %.loc14_3.13: ref %i32 = array_index %self.param, %int_37 +// CHECK:STDOUT: %Destroy.facet.loc14_3.9: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.14: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.9 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.10: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.15: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.10 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.5: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc14_3.13) // CHECK:STDOUT: %int_36: Core.IntLiteral = int_value 36 [concrete = constants.%int_36] -// CHECK:STDOUT: %.loc14_3.6: ref %i32 = array_index %self.param, %int_36 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.6: = bound_method %.loc14_3.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.6: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.6(%.loc14_3.6) +// CHECK:STDOUT: %.loc14_3.16: ref %i32 = array_index %self.param, %int_36 +// CHECK:STDOUT: %Destroy.facet.loc14_3.11: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.17: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.11 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.12: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.18: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.12 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.6: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%.loc14_3.16) // CHECK:STDOUT: %int_35: Core.IntLiteral = int_value 35 [concrete = constants.%int_35] -// CHECK:STDOUT: %.loc14_3.7: ref %i32 = array_index %self.param, %int_35 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.7: = bound_method %.loc14_3.7, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.7(%.loc14_3.7) +// CHECK:STDOUT: %.loc14_3.19: ref %i32 = array_index %self.param, %int_35 +// CHECK:STDOUT: %Destroy.facet.loc14_3.13: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.20: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.13 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.14: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.21: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.14 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.7: init %empty_tuple.type = call %SelfDestruct.specific_fn.7(%.loc14_3.19) // CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [concrete = constants.%int_34] -// CHECK:STDOUT: %.loc14_3.8: ref %i32 = array_index %self.param, %int_34 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.8: = bound_method %.loc14_3.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.8(%.loc14_3.8) +// CHECK:STDOUT: %.loc14_3.22: ref %i32 = array_index %self.param, %int_34 +// CHECK:STDOUT: %Destroy.facet.loc14_3.15: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.23: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.15 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.16: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.24: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.16 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.8: init %empty_tuple.type = call %SelfDestruct.specific_fn.8(%.loc14_3.22) // CHECK:STDOUT: %int_33: Core.IntLiteral = int_value 33 [concrete = constants.%int_33] -// CHECK:STDOUT: %.loc14_3.9: ref %i32 = array_index %self.param, %int_33 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.9: = bound_method %.loc14_3.9, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.9(%.loc14_3.9) +// CHECK:STDOUT: %.loc14_3.25: ref %i32 = array_index %self.param, %int_33 +// CHECK:STDOUT: %Destroy.facet.loc14_3.17: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.26: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.17 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.18: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.27: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.18 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.9: init %empty_tuple.type = call %SelfDestruct.specific_fn.9(%.loc14_3.25) // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] -// CHECK:STDOUT: %.loc14_3.10: ref %i32 = array_index %self.param, %int_32 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.10: = bound_method %.loc14_3.10, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.10(%.loc14_3.10) +// CHECK:STDOUT: %.loc14_3.28: ref %i32 = array_index %self.param, %int_32 +// CHECK:STDOUT: %Destroy.facet.loc14_3.19: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.29: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.19 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.20: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.30: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.20 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.10: init %empty_tuple.type = call %SelfDestruct.specific_fn.10(%.loc14_3.28) // CHECK:STDOUT: %int_31: Core.IntLiteral = int_value 31 [concrete = constants.%int_31] -// CHECK:STDOUT: %.loc14_3.11: ref %i32 = array_index %self.param, %int_31 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.11: = bound_method %.loc14_3.11, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.11(%.loc14_3.11) +// CHECK:STDOUT: %.loc14_3.31: ref %i32 = array_index %self.param, %int_31 +// CHECK:STDOUT: %Destroy.facet.loc14_3.21: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.32: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.21 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.22: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.33: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.22 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.11: init %empty_tuple.type = call %SelfDestruct.specific_fn.11(%.loc14_3.31) // CHECK:STDOUT: %int_30: Core.IntLiteral = int_value 30 [concrete = constants.%int_30] -// CHECK:STDOUT: %.loc14_3.12: ref %i32 = array_index %self.param, %int_30 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.12: = bound_method %.loc14_3.12, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.12(%.loc14_3.12) +// CHECK:STDOUT: %.loc14_3.34: ref %i32 = array_index %self.param, %int_30 +// CHECK:STDOUT: %Destroy.facet.loc14_3.23: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.35: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.23 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.24: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.36: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.24 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.12: init %empty_tuple.type = call %SelfDestruct.specific_fn.12(%.loc14_3.34) // CHECK:STDOUT: %int_29: Core.IntLiteral = int_value 29 [concrete = constants.%int_29] -// CHECK:STDOUT: %.loc14_3.13: ref %i32 = array_index %self.param, %int_29 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.13: = bound_method %.loc14_3.13, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.13(%.loc14_3.13) +// CHECK:STDOUT: %.loc14_3.37: ref %i32 = array_index %self.param, %int_29 +// CHECK:STDOUT: %Destroy.facet.loc14_3.25: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.38: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.25 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.26: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.39: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.26 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.13: init %empty_tuple.type = call %SelfDestruct.specific_fn.13(%.loc14_3.37) // CHECK:STDOUT: %int_28: Core.IntLiteral = int_value 28 [concrete = constants.%int_28] -// CHECK:STDOUT: %.loc14_3.14: ref %i32 = array_index %self.param, %int_28 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.14: = bound_method %.loc14_3.14, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.14: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.14(%.loc14_3.14) +// CHECK:STDOUT: %.loc14_3.40: ref %i32 = array_index %self.param, %int_28 +// CHECK:STDOUT: %Destroy.facet.loc14_3.27: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.41: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.27 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.28: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.42: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.28 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.14: init %empty_tuple.type = call %SelfDestruct.specific_fn.14(%.loc14_3.40) // CHECK:STDOUT: %int_27: Core.IntLiteral = int_value 27 [concrete = constants.%int_27] -// CHECK:STDOUT: %.loc14_3.15: ref %i32 = array_index %self.param, %int_27 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.15: = bound_method %.loc14_3.15, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.15: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.15(%.loc14_3.15) +// CHECK:STDOUT: %.loc14_3.43: ref %i32 = array_index %self.param, %int_27 +// CHECK:STDOUT: %Destroy.facet.loc14_3.29: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.44: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.29 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.30: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.45: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.30 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.15: init %empty_tuple.type = call %SelfDestruct.specific_fn.15(%.loc14_3.43) // CHECK:STDOUT: %int_26: Core.IntLiteral = int_value 26 [concrete = constants.%int_26] -// CHECK:STDOUT: %.loc14_3.16: ref %i32 = array_index %self.param, %int_26 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.16: = bound_method %.loc14_3.16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.16(%.loc14_3.16) +// CHECK:STDOUT: %.loc14_3.46: ref %i32 = array_index %self.param, %int_26 +// CHECK:STDOUT: %Destroy.facet.loc14_3.31: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.47: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.31 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.32: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.48: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.32 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.16: init %empty_tuple.type = call %SelfDestruct.specific_fn.16(%.loc14_3.46) // CHECK:STDOUT: %int_25: Core.IntLiteral = int_value 25 [concrete = constants.%int_25] -// CHECK:STDOUT: %.loc14_3.17: ref %i32 = array_index %self.param, %int_25 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.17: = bound_method %.loc14_3.17, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.17: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.17(%.loc14_3.17) +// CHECK:STDOUT: %.loc14_3.49: ref %i32 = array_index %self.param, %int_25 +// CHECK:STDOUT: %Destroy.facet.loc14_3.33: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.50: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.33 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.34: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.51: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.34 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.17: init %empty_tuple.type = call %SelfDestruct.specific_fn.17(%.loc14_3.49) // CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [concrete = constants.%int_24] -// CHECK:STDOUT: %.loc14_3.18: ref %i32 = array_index %self.param, %int_24 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.18: = bound_method %.loc14_3.18, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.18: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.18(%.loc14_3.18) +// CHECK:STDOUT: %.loc14_3.52: ref %i32 = array_index %self.param, %int_24 +// CHECK:STDOUT: %Destroy.facet.loc14_3.35: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.53: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.35 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.36: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.54: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.36 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.18: init %empty_tuple.type = call %SelfDestruct.specific_fn.18(%.loc14_3.52) // CHECK:STDOUT: %int_23: Core.IntLiteral = int_value 23 [concrete = constants.%int_23] -// CHECK:STDOUT: %.loc14_3.19: ref %i32 = array_index %self.param, %int_23 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.19: = bound_method %.loc14_3.19, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.19(%.loc14_3.19) +// CHECK:STDOUT: %.loc14_3.55: ref %i32 = array_index %self.param, %int_23 +// CHECK:STDOUT: %Destroy.facet.loc14_3.37: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.56: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.37 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.38: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.57: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.38 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.19: init %empty_tuple.type = call %SelfDestruct.specific_fn.19(%.loc14_3.55) // CHECK:STDOUT: %int_22: Core.IntLiteral = int_value 22 [concrete = constants.%int_22] -// CHECK:STDOUT: %.loc14_3.20: ref %i32 = array_index %self.param, %int_22 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.20: = bound_method %.loc14_3.20, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.20: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.20(%.loc14_3.20) +// CHECK:STDOUT: %.loc14_3.58: ref %i32 = array_index %self.param, %int_22 +// CHECK:STDOUT: %Destroy.facet.loc14_3.39: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.59: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.39 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.40: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.60: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.40 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.20: init %empty_tuple.type = call %SelfDestruct.specific_fn.20(%.loc14_3.58) // CHECK:STDOUT: %int_21: Core.IntLiteral = int_value 21 [concrete = constants.%int_21] -// CHECK:STDOUT: %.loc14_3.21: ref %i32 = array_index %self.param, %int_21 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.21: = bound_method %.loc14_3.21, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.21(%.loc14_3.21) +// CHECK:STDOUT: %.loc14_3.61: ref %i32 = array_index %self.param, %int_21 +// CHECK:STDOUT: %Destroy.facet.loc14_3.41: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.62: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.41 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.42: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.63: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.42 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.21: init %empty_tuple.type = call %SelfDestruct.specific_fn.21(%.loc14_3.61) // CHECK:STDOUT: %int_20: Core.IntLiteral = int_value 20 [concrete = constants.%int_20] -// CHECK:STDOUT: %.loc14_3.22: ref %i32 = array_index %self.param, %int_20 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.22: = bound_method %.loc14_3.22, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.22(%.loc14_3.22) +// CHECK:STDOUT: %.loc14_3.64: ref %i32 = array_index %self.param, %int_20 +// CHECK:STDOUT: %Destroy.facet.loc14_3.43: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.65: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.43 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.44: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.66: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.44 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.22: init %empty_tuple.type = call %SelfDestruct.specific_fn.22(%.loc14_3.64) // CHECK:STDOUT: %int_19: Core.IntLiteral = int_value 19 [concrete = constants.%int_19] -// CHECK:STDOUT: %.loc14_3.23: ref %i32 = array_index %self.param, %int_19 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.23: = bound_method %.loc14_3.23, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.23(%.loc14_3.23) +// CHECK:STDOUT: %.loc14_3.67: ref %i32 = array_index %self.param, %int_19 +// CHECK:STDOUT: %Destroy.facet.loc14_3.45: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.68: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.45 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.46: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.69: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.46 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.23: init %empty_tuple.type = call %SelfDestruct.specific_fn.23(%.loc14_3.67) // CHECK:STDOUT: %int_18: Core.IntLiteral = int_value 18 [concrete = constants.%int_18] -// CHECK:STDOUT: %.loc14_3.24: ref %i32 = array_index %self.param, %int_18 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.24: = bound_method %.loc14_3.24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.24(%.loc14_3.24) +// CHECK:STDOUT: %.loc14_3.70: ref %i32 = array_index %self.param, %int_18 +// CHECK:STDOUT: %Destroy.facet.loc14_3.47: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.71: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.47 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.48: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.72: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.48 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.24: init %empty_tuple.type = call %SelfDestruct.specific_fn.24(%.loc14_3.70) // CHECK:STDOUT: %int_17: Core.IntLiteral = int_value 17 [concrete = constants.%int_17] -// CHECK:STDOUT: %.loc14_3.25: ref %i32 = array_index %self.param, %int_17 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.25: = bound_method %.loc14_3.25, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.25: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.25(%.loc14_3.25) +// CHECK:STDOUT: %.loc14_3.73: ref %i32 = array_index %self.param, %int_17 +// CHECK:STDOUT: %Destroy.facet.loc14_3.49: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.74: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.49 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.50: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.75: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.50 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.25: init %empty_tuple.type = call %SelfDestruct.specific_fn.25(%.loc14_3.73) // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] -// CHECK:STDOUT: %.loc14_3.26: ref %i32 = array_index %self.param, %int_16 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.26: = bound_method %.loc14_3.26, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.26: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.26(%.loc14_3.26) +// CHECK:STDOUT: %.loc14_3.76: ref %i32 = array_index %self.param, %int_16 +// CHECK:STDOUT: %Destroy.facet.loc14_3.51: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.77: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.51 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.52: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.78: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.52 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.26: init %empty_tuple.type = call %SelfDestruct.specific_fn.26(%.loc14_3.76) // CHECK:STDOUT: %int_15: Core.IntLiteral = int_value 15 [concrete = constants.%int_15] -// CHECK:STDOUT: %.loc14_3.27: ref %i32 = array_index %self.param, %int_15 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.27: = bound_method %.loc14_3.27, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.27: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.27(%.loc14_3.27) +// CHECK:STDOUT: %.loc14_3.79: ref %i32 = array_index %self.param, %int_15 +// CHECK:STDOUT: %Destroy.facet.loc14_3.53: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.80: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.53 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.54: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.81: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.54 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.27: init %empty_tuple.type = call %SelfDestruct.specific_fn.27(%.loc14_3.79) // CHECK:STDOUT: %int_14: Core.IntLiteral = int_value 14 [concrete = constants.%int_14] -// CHECK:STDOUT: %.loc14_3.28: ref %i32 = array_index %self.param, %int_14 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.28: = bound_method %.loc14_3.28, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.28: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.28(%.loc14_3.28) +// CHECK:STDOUT: %.loc14_3.82: ref %i32 = array_index %self.param, %int_14 +// CHECK:STDOUT: %Destroy.facet.loc14_3.55: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.83: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.55 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.56: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.84: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.56 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.28: init %empty_tuple.type = call %SelfDestruct.specific_fn.28(%.loc14_3.82) // CHECK:STDOUT: %int_13: Core.IntLiteral = int_value 13 [concrete = constants.%int_13] -// CHECK:STDOUT: %.loc14_3.29: ref %i32 = array_index %self.param, %int_13 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.29: = bound_method %.loc14_3.29, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.29: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.29(%.loc14_3.29) +// CHECK:STDOUT: %.loc14_3.85: ref %i32 = array_index %self.param, %int_13 +// CHECK:STDOUT: %Destroy.facet.loc14_3.57: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.86: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.57 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.58: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.87: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.58 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.29: init %empty_tuple.type = call %SelfDestruct.specific_fn.29(%.loc14_3.85) // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12] -// CHECK:STDOUT: %.loc14_3.30: ref %i32 = array_index %self.param, %int_12 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.30: = bound_method %.loc14_3.30, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.30: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.30(%.loc14_3.30) +// CHECK:STDOUT: %.loc14_3.88: ref %i32 = array_index %self.param, %int_12 +// CHECK:STDOUT: %Destroy.facet.loc14_3.59: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.89: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.59 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.60: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.90: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.60 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.30: init %empty_tuple.type = call %SelfDestruct.specific_fn.30(%.loc14_3.88) // CHECK:STDOUT: %int_11: Core.IntLiteral = int_value 11 [concrete = constants.%int_11] -// CHECK:STDOUT: %.loc14_3.31: ref %i32 = array_index %self.param, %int_11 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.31: = bound_method %.loc14_3.31, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.31: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.31(%.loc14_3.31) +// CHECK:STDOUT: %.loc14_3.91: ref %i32 = array_index %self.param, %int_11 +// CHECK:STDOUT: %Destroy.facet.loc14_3.61: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.92: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.61 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.62: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.93: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.62 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.31: init %empty_tuple.type = call %SelfDestruct.specific_fn.31(%.loc14_3.91) // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10] -// CHECK:STDOUT: %.loc14_3.32: ref %i32 = array_index %self.param, %int_10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.32: = bound_method %.loc14_3.32, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.32: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.32(%.loc14_3.32) +// CHECK:STDOUT: %.loc14_3.94: ref %i32 = array_index %self.param, %int_10 +// CHECK:STDOUT: %Destroy.facet.loc14_3.63: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.95: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.63 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.64: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.96: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.64 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.32: init %empty_tuple.type = call %SelfDestruct.specific_fn.32(%.loc14_3.94) // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9] -// CHECK:STDOUT: %.loc14_3.33: ref %i32 = array_index %self.param, %int_9 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.33: = bound_method %.loc14_3.33, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.33: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.33(%.loc14_3.33) +// CHECK:STDOUT: %.loc14_3.97: ref %i32 = array_index %self.param, %int_9 +// CHECK:STDOUT: %Destroy.facet.loc14_3.65: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.98: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.65 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.66: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.99: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.66 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.33: init %empty_tuple.type = call %SelfDestruct.specific_fn.33(%.loc14_3.97) // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8] -// CHECK:STDOUT: %.loc14_3.34: ref %i32 = array_index %self.param, %int_8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.34: = bound_method %.loc14_3.34, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.34: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.34(%.loc14_3.34) +// CHECK:STDOUT: %.loc14_3.100: ref %i32 = array_index %self.param, %int_8 +// CHECK:STDOUT: %Destroy.facet.loc14_3.67: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.101: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.67 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.68: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.102: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.68 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.34: init %empty_tuple.type = call %SelfDestruct.specific_fn.34(%.loc14_3.100) // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7] -// CHECK:STDOUT: %.loc14_3.35: ref %i32 = array_index %self.param, %int_7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.35: = bound_method %.loc14_3.35, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.35: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.35(%.loc14_3.35) +// CHECK:STDOUT: %.loc14_3.103: ref %i32 = array_index %self.param, %int_7 +// CHECK:STDOUT: %Destroy.facet.loc14_3.69: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.104: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.69 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.70: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.105: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.70 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.35: init %empty_tuple.type = call %SelfDestruct.specific_fn.35(%.loc14_3.103) // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6] -// CHECK:STDOUT: %.loc14_3.36: ref %i32 = array_index %self.param, %int_6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.36: = bound_method %.loc14_3.36, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.36: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.36(%.loc14_3.36) +// CHECK:STDOUT: %.loc14_3.106: ref %i32 = array_index %self.param, %int_6 +// CHECK:STDOUT: %Destroy.facet.loc14_3.71: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.107: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.71 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.72: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.108: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.72 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.36: init %empty_tuple.type = call %SelfDestruct.specific_fn.36(%.loc14_3.106) // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5] -// CHECK:STDOUT: %.loc14_3.37: ref %i32 = array_index %self.param, %int_5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.37: = bound_method %.loc14_3.37, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.37: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.37(%.loc14_3.37) +// CHECK:STDOUT: %.loc14_3.109: ref %i32 = array_index %self.param, %int_5 +// CHECK:STDOUT: %Destroy.facet.loc14_3.73: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.110: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.73 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.74: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.111: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.74 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.37: init %empty_tuple.type = call %SelfDestruct.specific_fn.37(%.loc14_3.109) // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] -// CHECK:STDOUT: %.loc14_3.38: ref %i32 = array_index %self.param, %int_4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.38: = bound_method %.loc14_3.38, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.38: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.38(%.loc14_3.38) +// CHECK:STDOUT: %.loc14_3.112: ref %i32 = array_index %self.param, %int_4 +// CHECK:STDOUT: %Destroy.facet.loc14_3.75: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.113: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.75 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.76: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.114: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.76 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.38: init %empty_tuple.type = call %SelfDestruct.specific_fn.38(%.loc14_3.112) // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %.loc14_3.39: ref %i32 = array_index %self.param, %int_3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.39: = bound_method %.loc14_3.39, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.39: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.39(%.loc14_3.39) +// CHECK:STDOUT: %.loc14_3.115: ref %i32 = array_index %self.param, %int_3 +// CHECK:STDOUT: %Destroy.facet.loc14_3.77: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.116: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.77 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.78: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.117: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.78 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.39: init %empty_tuple.type = call %SelfDestruct.specific_fn.39(%.loc14_3.115) // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] -// CHECK:STDOUT: %.loc14_3.40: ref %i32 = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.40: = bound_method %.loc14_3.40, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.40: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.40(%.loc14_3.40) +// CHECK:STDOUT: %.loc14_3.118: ref %i32 = array_index %self.param, %int_2 +// CHECK:STDOUT: %Destroy.facet.loc14_3.79: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.119: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.79 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.80: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.120: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.80 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.40: init %empty_tuple.type = call %SelfDestruct.specific_fn.40(%.loc14_3.118) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %.loc14_3.41: ref %i32 = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.41: = bound_method %.loc14_3.41, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.41: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.41(%.loc14_3.41) +// CHECK:STDOUT: %.loc14_3.121: ref %i32 = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc14_3.81: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.122: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.81 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.82: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.123: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.82 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.41: init %empty_tuple.type = call %SelfDestruct.specific_fn.41(%.loc14_3.121) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %.loc14_3.42: ref %i32 = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14_3.42: = bound_method %.loc14_3.42, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14_3.42: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14_3.42(%.loc14_3.42) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_3.2(%self.param: ref %Array.3b5) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_3.2(%self.param: ref %Array.3b5) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc14_3.124: ref %i32 = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc14_3.83: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.125: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.83 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc14_3.84: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc14_3.126: %Destroy.type = converted constants.%i32, %Destroy.facet.loc14_3.84 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14_3.42: init %empty_tuple.type = call %SelfDestruct.specific_fn.42(%.loc14_3.124) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/default_arg.carbon b/toolchain/check/testdata/interop/cpp/function/import/default_arg.carbon index 9d217ce283bd..8e7b4f43728c 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/default_arg.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/default_arg.carbon @@ -166,18 +166,19 @@ fn Call() { // CHECK:STDOUT: %X.B.cpp_overload_set.type: type = cpp_overload_set_type @X.B.cpp_overload_set [concrete] // CHECK:STDOUT: %X.B.cpp_overload_set.value: %X.B.cpp_overload_set.type = cpp_overload_set_value @X.B.cpp_overload_set [concrete] // CHECK:STDOUT: %bound_method.f8c: = bound_method %.414, %X.B.cpp_overload_set.value [concrete] -// CHECK:STDOUT: %pattern_type.fa7: type = pattern_type %X [concrete] // CHECK:STDOUT: %X.B.type: type = fn_type @X.B [concrete] // CHECK:STDOUT: %X.B: %X.B.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a14: %pattern_type.fa7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3ab: %pattern_type.fa7 = wrapper_binding_pattern self, %self.param_patt.a14 [concrete] -// CHECK:STDOUT: %X.cpp_destructor.type: type = fn_type @X.cpp_destructor [concrete] -// CHECK:STDOUT: %X.cpp_destructor: %X.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.414, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %X.Op.type: type = fn_type @X.Op [concrete] +// CHECK:STDOUT: %X.Op: %X.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%X.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.79a: %SubobjectDestroy.type = facet_value %X, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a05: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.79a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.a05, %custom_witness.576) [concrete] // CHECK:STDOUT: %X.C.cpp_overload_set.type: type = cpp_overload_set_type @X.C.cpp_overload_set [concrete] // CHECK:STDOUT: %X.C.cpp_overload_set.value: %X.C.cpp_overload_set.type = cpp_overload_set_value @X.C.cpp_overload_set [concrete] // CHECK:STDOUT: %X.C.type: type = fn_type @X.C [concrete] @@ -218,11 +219,8 @@ fn Call() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %X.cpp_destructor.decl: %X.cpp_destructor.type = fn_decl @X.cpp_destructor [concrete = constants.%X.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %X.C.cpp_overload_set.value: %X.C.cpp_overload_set.type = cpp_overload_set_value @X.C.cpp_overload_set [concrete = constants.%X.C.cpp_overload_set.value] // CHECK:STDOUT: %X.C.decl: %X.C.type = fn_decl @X.C [concrete = constants.%X.C] { // CHECK:STDOUT: @@ -237,16 +235,6 @@ fn Call() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fa7 = ref_param_pattern [concrete = constants.%self.param_patt.a14] -// CHECK:STDOUT: %self.patt: %pattern_type.fa7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3ab] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @Call() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -353,8 +341,12 @@ fn Call() { // CHECK:STDOUT: %.loc10_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_22 [concrete = constants.%int_2.2e0] // CHECK:STDOUT: %.loc10_22.2: %i32 = converted %int_2.loc10, %.loc10_22.1 [concrete = constants.%int_2.2e0] // CHECK:STDOUT: %X.B.call: init %empty_tuple.type = call imports.%X.B.decl(%.loc10_7.3, %.loc10_19.2, %.loc10_22.2) +// CHECK:STDOUT: %Destroy.facet.loc10_7.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_7.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc10_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_7.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_7.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc10_7.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.414) +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_7.2) // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %X.ref.loc11: type = name_ref X, imports.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %C.ref: %X.C.cpp_overload_set.type = name_ref C, imports.%X.C.cpp_overload_set.value [concrete = constants.%X.C.cpp_overload_set.value] @@ -404,17 +396,13 @@ fn Call() { // CHECK:STDOUT: %.loc12_7.4: ref %X = value_as_ref %.loc12_7.3 // CHECK:STDOUT: %addr: %ptr.ca1 = addr_of %.loc12_7.4 // CHECK:STDOUT: %D__carbon_thunk.call: init %empty_tuple.type = call imports.%D__carbon_thunk.decl(%addr, %.loc12_19.2, %.loc12_22.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.414) +// CHECK:STDOUT: %Destroy.facet.loc12_7.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_7.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc12_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc12_7.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_7.6: %Destroy.type = converted constants.%X, %Destroy.facet.loc12_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc12_7.2) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %X) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %X.cpp_destructor.call: init %empty_tuple.type = call imports.%X.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- call_with_default.carbon @@ -487,23 +475,29 @@ fn Call() { // CHECK:STDOUT: %this.patt: %pattern_type.fa7 = wrapper_binding_pattern this, %this.param_patt [concrete] // CHECK:STDOUT: %B__carbon_thunk.type: type = fn_type @B__carbon_thunk [concrete] // CHECK:STDOUT: %B__carbon_thunk: %B__carbon_thunk.type = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.050: type = fn_type @Destroy.WithSelf.SubobjectDestroy, @Destroy.WithSelf(%Self.0e7) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.824: %Destroy.WithSelf.SubobjectDestroy.type.050 = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %Self.09f: %SubobjectDestroy.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.cdd: type = fn_type @SubobjectDestroy.WithSelf.Op, @SubobjectDestroy.WithSelf(%Self.09f) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.81c: %SubobjectDestroy.WithSelf.Op.type.cdd = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %self.param_patt.a14: %pattern_type.fa7 = ref_param_pattern [concrete] // CHECK:STDOUT: %self.patt.3ab: %pattern_type.fa7 = wrapper_binding_pattern self, %self.param_patt.a14 [concrete] // CHECK:STDOUT: %X.cpp_destructor.type: type = fn_type @X.cpp_destructor [concrete] // CHECK:STDOUT: %X.cpp_destructor: %X.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.c5a: = custom_witness (), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.761: %Destroy.type = facet_value %X, (%custom_witness.c5a) [concrete] -// CHECK:STDOUT: %X.SubobjectDestroy.type: type = fn_type @X.SubobjectDestroy [concrete] -// CHECK:STDOUT: %X.SubobjectDestroy: %X.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.414, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %custom_witness.867: = custom_witness (), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.51c: %SubobjectDestroy.type = facet_value %X, (%custom_witness.867) [concrete] +// CHECK:STDOUT: %X.Op.type: type = fn_type @X.Op [concrete] +// CHECK:STDOUT: %X.Op: %X.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%X.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.79a: %SubobjectDestroy.type = facet_value %X, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a05: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.79a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.a05, %custom_witness.576) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %X.C.cpp_overload_set.type: type = cpp_overload_set_type @X.C.cpp_overload_set [concrete] // CHECK:STDOUT: %X.C.cpp_overload_set.value: %X.C.cpp_overload_set.type = cpp_overload_set_value @X.C.cpp_overload_set [concrete] // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete] @@ -523,7 +517,7 @@ fn Call() { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -636,8 +630,10 @@ fn Call() { // CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = wrapper_binding a, %a.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.050 = fn_decl @Destroy.WithSelf.SubobjectDestroy [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SubobjectDestroy (constants.%Destroy.WithSelf.SubobjectDestroy.824)] {} {} +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.decl: %SubobjectDestroy.WithSelf.Op.type.cdd = fn_decl @SubobjectDestroy.WithSelf.Op [symbolic = @SubobjectDestroy.WithSelf.%SubobjectDestroy.WithSelf.Op (constants.%SubobjectDestroy.WithSelf.Op.81c)] {} {} +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %X.cpp_destructor.decl: %X.cpp_destructor.type = fn_decl @X.cpp_destructor [concrete = constants.%X.cpp_destructor] { // CHECK:STDOUT: %self.param_patt: %pattern_type.fa7 = ref_param_pattern [concrete = constants.%self.param_patt.a14] // CHECK:STDOUT: %self.patt: %pattern_type.fa7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3ab] @@ -677,16 +673,6 @@ fn Call() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fa7 = ref_param_pattern [concrete = constants.%self.param_patt.a14] -// CHECK:STDOUT: %self.patt: %pattern_type.fa7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3ab] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -805,14 +791,12 @@ fn Call() { // CHECK:STDOUT: %.loc11_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11 [concrete = constants.%int_1.68a] // CHECK:STDOUT: %.loc11_19.2: %i32 = converted %int_1.loc11, %.loc11_19.1 [concrete = constants.%int_1.68a] // CHECK:STDOUT: %B__carbon_thunk.call: init %empty_tuple.type = call imports.%B__carbon_thunk.decl(%.loc11_7.3, %.loc11_19.2) -// CHECK:STDOUT: %X.SubobjectDestroy.decl: %X.SubobjectDestroy.type = fn_decl @X.SubobjectDestroy [concrete = constants.%X.SubobjectDestroy] { -// CHECK:STDOUT: %.1: %pattern_type.fa7 = specific_constant constants.%self.param_patt.a14, @Destroy.WithSelf.SubobjectDestroy(constants.%Destroy.facet.761) [concrete = constants.%self.param_patt.a14] -// CHECK:STDOUT: %self.patt: %pattern_type.fa7 = wrapper_binding_pattern self, %.1 [concrete = constants.%self.patt.3ab] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.414) +// CHECK:STDOUT: %Destroy.facet.loc11_7.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_7.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc11_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_7.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_7.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc11_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc11_7.2) // CHECK:STDOUT: %Cpp.ref.loc12: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %X.ref.loc12: type = name_ref X, imports.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %C.ref: %X.C.cpp_overload_set.type = name_ref C, imports.%X.C.cpp_overload_set.value [concrete = constants.%X.C.cpp_overload_set.value] @@ -846,7 +830,12 @@ fn Call() { // CHECK:STDOUT: %.loc13_7.4: ref %X = value_as_ref %.loc13_7.3 // CHECK:STDOUT: %addr: %ptr.ca1 = addr_of %.loc13_7.4 // CHECK:STDOUT: %D__carbon_thunk.call: init %empty_tuple.type = call imports.%D__carbon_thunk.decl(%addr, %.loc13_19.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.414) +// CHECK:STDOUT: %Destroy.facet.loc13_7.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_7.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc13_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc13_7.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_7.6: %Destroy.type = converted constants.%X, %Destroy.facet.loc13_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc13: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc13_7.2) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -868,19 +857,10 @@ fn Call() { // CHECK:STDOUT: // CHECK:STDOUT: fn @X.cpp_destructor(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %X) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %X) { +// CHECK:STDOUT: fn @X.Op(%self.param: ref %X) [thunk imports.%X.cpp_destructor.decl for imports.%SubobjectDestroy.WithSelf.Op.decl, @SubobjectDestroy.WithSelf.Op(constants.%SubobjectDestroy.facet.51c)] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %X.cpp_destructor.call: init %empty_tuple.type = call imports.%X.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @X.SubobjectDestroy(%self.param: ref %X) [thunk imports.%X.cpp_destructor.decl for imports.%Destroy.WithSelf.SubobjectDestroy.decl, @Destroy.WithSelf.SubobjectDestroy(constants.%Destroy.facet.761)] { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %SubobjectDestroy.ref: %X.cpp_destructor.type = name_ref SubobjectDestroy, imports.%X.cpp_destructor.decl [concrete = constants.%X.cpp_destructor] -// CHECK:STDOUT: %X.cpp_destructor.bound: = bound_method %self.param, %SubobjectDestroy.ref +// CHECK:STDOUT: %Op.ref: %X.cpp_destructor.type = name_ref Op, imports.%X.cpp_destructor.decl [concrete = constants.%X.cpp_destructor] +// CHECK:STDOUT: %X.cpp_destructor.bound: = bound_method %self.param, %Op.ref // CHECK:STDOUT: %X.cpp_destructor.call: init %empty_tuple.type = call %X.cpp_destructor.bound(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -911,16 +891,17 @@ fn Call() { // CHECK:STDOUT: %X.B.cpp_overload_set.type: type = cpp_overload_set_type @X.B.cpp_overload_set [concrete] // CHECK:STDOUT: %X.B.cpp_overload_set.value: %X.B.cpp_overload_set.type = cpp_overload_set_value @X.B.cpp_overload_set [concrete] // CHECK:STDOUT: %bound_method.f8c: = bound_method %.414, %X.B.cpp_overload_set.value [concrete] -// CHECK:STDOUT: %pattern_type.fa7: type = pattern_type %X [concrete] -// CHECK:STDOUT: %self.param_patt.a14: %pattern_type.fa7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3ab: %pattern_type.fa7 = wrapper_binding_pattern self, %self.param_patt.a14 [concrete] -// CHECK:STDOUT: %X.cpp_destructor.type: type = fn_type @X.cpp_destructor [concrete] -// CHECK:STDOUT: %X.cpp_destructor: %X.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc41 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc41 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.414, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %X.Op.type: type = fn_type @X.Op [concrete] +// CHECK:STDOUT: %X.Op: %X.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%X.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.79a: %SubobjectDestroy.type = facet_value %X, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a05: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.79a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.a05, %custom_witness.576) [concrete] // CHECK:STDOUT: %X.C.cpp_overload_set.type: type = cpp_overload_set_type @X.C.cpp_overload_set [concrete] // CHECK:STDOUT: %X.C.cpp_overload_set.value: %X.C.cpp_overload_set.type = cpp_overload_set_value @X.C.cpp_overload_set [concrete] // CHECK:STDOUT: %X.D.cpp_overload_set.type: type = cpp_overload_set_type @X.D.cpp_overload_set [concrete] @@ -939,25 +920,12 @@ fn Call() { // CHECK:STDOUT: %GlobalReturnInt.cpp_overload_set.value: %GlobalReturnInt.cpp_overload_set.type = cpp_overload_set_value @GlobalReturnInt.cpp_overload_set [concrete = constants.%GlobalReturnInt.cpp_overload_set.value] // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} // CHECK:STDOUT: %X.B.cpp_overload_set.value: %X.B.cpp_overload_set.type = cpp_overload_set_value @X.B.cpp_overload_set [concrete = constants.%X.B.cpp_overload_set.value] -// CHECK:STDOUT: %X.cpp_destructor.decl: %X.cpp_destructor.type = fn_decl @X.cpp_destructor [concrete = constants.%X.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %X.C.cpp_overload_set.value: %X.C.cpp_overload_set.type = cpp_overload_set_value @X.C.cpp_overload_set [concrete = constants.%X.C.cpp_overload_set.value] // CHECK:STDOUT: %X.D.cpp_overload_set.value: %X.D.cpp_overload_set.type = cpp_overload_set_value @X.D.cpp_overload_set [concrete = constants.%X.D.cpp_overload_set.value] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc41 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fa7 = ref_param_pattern [concrete = constants.%self.param_patt.a14] -// CHECK:STDOUT: %self.patt: %pattern_type.fa7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3ab] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @Call() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Cpp.ref.loc13: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -979,8 +947,12 @@ fn Call() { // CHECK:STDOUT: %.loc41_7.2: ref %X = temporary %.loc41_5.2, %.loc41_7.1 [concrete = constants.%.414] // CHECK:STDOUT: %B.ref: %X.B.cpp_overload_set.type = name_ref B, imports.%X.B.cpp_overload_set.value [concrete = constants.%X.B.cpp_overload_set.value] // CHECK:STDOUT: %bound_method.loc41: = bound_method %.loc41_7.2, %B.ref [concrete = constants.%bound_method.f8c] +// CHECK:STDOUT: %Destroy.facet.loc41_7.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc41_7.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc41_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc41_7.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc41_7.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc41_7.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc41: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.414) +// CHECK:STDOUT: %SelfDestruct.call.loc41: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc41_7.2) // CHECK:STDOUT: %Cpp.ref.loc48: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %X.ref.loc48: type = name_ref X, imports.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %C.ref: %X.C.cpp_overload_set.type = name_ref C, imports.%X.C.cpp_overload_set.value [concrete = constants.%X.C.cpp_overload_set.value] @@ -993,16 +965,12 @@ fn Call() { // CHECK:STDOUT: %.loc55_7.2: ref %X = temporary %.loc55_5.2, %.loc55_7.1 [concrete = constants.%.414] // CHECK:STDOUT: %D.ref: %X.D.cpp_overload_set.type = name_ref D, imports.%X.D.cpp_overload_set.value [concrete = constants.%X.D.cpp_overload_set.value] // CHECK:STDOUT: %bound_method.loc55: = bound_method %.loc55_7.2, %D.ref [concrete = constants.%bound_method.9a8] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc55: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.414) +// CHECK:STDOUT: %Destroy.facet.loc55_7.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc55_7.3: %Destroy.type = converted constants.%X, %Destroy.facet.loc55_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc55_7.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.a05, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc55_7.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc55_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc55: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc55_7.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc41(%self.param: ref %X) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc41(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %X.cpp_destructor.call: init %empty_tuple.type = call imports.%X.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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 8634f33ccd65..269476ae015a 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/full_semir.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/full_semir.carbon @@ -93,7 +93,6 @@ fn F() { // CHECK:STDOUT: %As.WithSelf.Convert.type.0b5: type = fn_type @As.WithSelf.Convert, @As.WithSelf(%i16, %As.facet) [concrete] // CHECK:STDOUT: %.f79: type = fn_type_with_self_type %As.WithSelf.Convert.type.0b5, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.262 [concrete] -// CHECK:STDOUT: %pattern_type.9bc: type = pattern_type %i16 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.262, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.1e6: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.6e1: %i16 = int_value 1 [concrete] @@ -117,16 +116,20 @@ fn F() { // CHECK:STDOUT: %bound_method.96e: = bound_method %int_1.6e1, %Int.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.c52: ref %i16 = temporary invalid, %int_1.6e1 [concrete] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.c52 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.c52, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -134,7 +137,7 @@ fn F() { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .As = %Core.As // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -162,24 +165,9 @@ fn F() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -217,7 +205,12 @@ fn F() { // CHECK:STDOUT: %.loc7_13.4: ref %i16 = temporary %.loc7_13.3, %Int.as.Copy.impl.Op.call [concrete = constants.%.c52] // CHECK:STDOUT: %addr: %ptr.e14 = addr_of %.loc7_13.4 [concrete = constants.%addr] // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c52) +// CHECK:STDOUT: %Destroy.facet.loc7_13.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_13.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc7_13.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_13.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_13.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc7_13.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc7_13.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -225,16 +218,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @foo__carbon_thunk(%a.param: %ptr.e14); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_int_param.carbon // CHECK:STDOUT: @@ -355,21 +339,26 @@ fn F() { // CHECK:STDOUT: %return.patt.28a: %pattern_type.55f = wrapper_binding_pattern r#return, %return.param_patt.ed6 [concrete] // CHECK:STDOUT: %foo_short__carbon_thunk.type: type = fn_type @foo_short__carbon_thunk [concrete] // CHECK:STDOUT: %foo_short__carbon_thunk: %foo_short__carbon_thunk.type = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -391,24 +380,9 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %return: %ptr = wrapper_binding r#return, %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -439,8 +413,12 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %pattern_type.9bc = value_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc7_37.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc7_37.3) +// CHECK:STDOUT: %Destroy.facet.loc7_37.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_37.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc7_37.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_37.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_37.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc7_37.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc7_37.3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -448,14 +426,5 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @foo_short__carbon_thunk(%return.param: %ptr); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/function_ptr.carbon b/toolchain/check/testdata/interop/cpp/function/import/function_ptr.carbon index 17c332bfb8f7..6ac3f3e64bc6 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/function_ptr.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/function_ptr.carbon @@ -278,14 +278,17 @@ fn F() { // CHECK:STDOUT: %Copy.WithSelf.Op.type.dbb: type = fn_type @Copy.WithSelf.Op.1, @Copy.WithSelf(%Copy.facet.8df) [concrete] // CHECK:STDOUT: %.c79: type = fn_type_with_self_type %Copy.WithSelf.Op.type.dbb, %Copy.facet.8df [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.bound: = bound_method %.fc9, %Copy.WithSelf.Op.416 [concrete] -// CHECK:STDOUT: %self.param_patt.952: %pattern_type.4b7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a35: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt.952 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.886: %SubobjectDestroy.type = facet_value %.659, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.381: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.886) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %.659, (%DestroyImpl.impl_witness.381, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -293,23 +296,8 @@ fn F() { // CHECK:STDOUT: .CallbackType = constants.%.659 // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -332,8 +320,12 @@ fn F() { // CHECK:STDOUT: %fn_ptr.patt: %pattern_type.4b7 = ref_binding_pattern fn_ptr [concrete = constants.%fn_ptr.patt] // CHECK:STDOUT: %fn_ptr.var_patt: %pattern_type.4b7 = var_pattern %fn_ptr.patt [concrete = constants.%fn_ptr.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %fn_ptr.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%fn_ptr.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%.659, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.4: %Destroy.type = converted constants.%.659, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%fn_ptr.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -346,16 +338,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %.659) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %.659) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- pass_fn_ptr.carbon // CHECK:STDOUT: @@ -414,7 +397,6 @@ fn F() { // CHECK:STDOUT: %GetCallback: %GetCallback.type = struct_value () [concrete] // CHECK:STDOUT: %float.6da: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %f32.3bc: type = class_type @Float, @Float(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %ptr.961: type = ptr_type %f32.3bc [concrete] // CHECK:STDOUT: %__invoke__carbon_thunk.type: type = fn_type @__invoke__carbon_thunk [concrete] // CHECK:STDOUT: %__invoke__carbon_thunk: %__invoke__carbon_thunk.type = struct_value () [concrete] @@ -445,23 +427,23 @@ fn F() { // CHECK:STDOUT: %bound_method.acb: = bound_method %float.239, %Float.as.Copy.impl.Op.specific_fn [concrete] // CHECK:STDOUT: %.041: ref %f32.3bc = temporary invalid, %float.239 [concrete] // CHECK:STDOUT: %addr: %ptr.961 = addr_of %.041 [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_41 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_41 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_41 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.041, %Destroy.WithSelf.SelfDestruct.db3fdb.1 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_41 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -484,37 +466,8 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.19b: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.e8d) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.fe9)] // CHECK:STDOUT: %Copy.impl_witness_table.14d = impl_witness_table (%Core.import_ref.19b), @Float.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_41 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_41 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_3 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -549,33 +502,24 @@ fn F() { // CHECK:STDOUT: %x.patt: %pattern_type.d94 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.d94 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_41: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.041) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc7_41.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc7_41.5: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc7_41.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc7_41.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc7_41.6: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc7_41.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_41: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc7_41.4) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%x.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_41(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_41(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_41(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_41(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- relay_complex_fn_ptr.carbon // CHECK:STDOUT: @@ -647,14 +591,17 @@ fn F() { // CHECK:STDOUT: %Copy.WithSelf.Op.type.dbb: type = fn_type @Copy.WithSelf.Op.1, @Copy.WithSelf(%Copy.facet.8df) [concrete] // CHECK:STDOUT: %.c79: type = fn_type_with_self_type %Copy.WithSelf.Op.type.dbb, %Copy.facet.8df [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.bound: = bound_method %.fc9, %Copy.WithSelf.Op.416 [concrete] -// CHECK:STDOUT: %self.param_patt.952: %pattern_type.4b7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a35: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt.952 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.886: %SubobjectDestroy.type = facet_value %.659, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.381: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.886) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %.659, (%DestroyImpl.impl_witness.381, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -664,23 +611,8 @@ fn F() { // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -703,8 +635,12 @@ fn F() { // CHECK:STDOUT: %fn_ptr.patt: %pattern_type.4b7 = ref_binding_pattern fn_ptr [concrete = constants.%fn_ptr.patt] // CHECK:STDOUT: %fn_ptr.var_patt: %pattern_type.4b7 = var_pattern %fn_ptr.patt [concrete = constants.%fn_ptr.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %fn_ptr.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%fn_ptr.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%.659, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.4: %Destroy.type = converted constants.%.659, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%fn_ptr.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -718,16 +654,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %.659) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %.659) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- pass_complex_fn_ptr.carbon // CHECK:STDOUT: @@ -792,14 +719,17 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %__invoke__carbon_thunk.type: type = fn_type @__invoke__carbon_thunk [concrete] // CHECK:STDOUT: %__invoke__carbon_thunk: %__invoke__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e2f: %pattern_type.bbc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.790: %pattern_type.bbc = wrapper_binding_pattern self, %self.param_patt.e2f [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %C.cpp_destructor.type: type = fn_type @C.cpp_destructor [concrete] // CHECK:STDOUT: %C.cpp_destructor: %C.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%C.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e40: %SubobjectDestroy.type = facet_value %C, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.eb3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e40) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.eb3, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -826,21 +756,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C.cpp_destructor.decl: %C.cpp_destructor.type = fn_decl @C.cpp_destructor [concrete = constants.%C.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bbc = ref_param_pattern [concrete = constants.%self.param_patt.e2f] -// CHECK:STDOUT: %self.patt: %pattern_type.bbc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.790] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -856,16 +773,16 @@ fn F() { // CHECK:STDOUT: %addr.loc7_58: %ptr.0a2 = addr_of %.loc7_58.1 // CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc7_58) // CHECK:STDOUT: %.loc7_58.2: init %C to %.loc7_58.1 = mark_in_place_init %C__carbon_thunk.call -// CHECK:STDOUT: %.loc7_3: ref %C = splice_block %x.var {} +// CHECK:STDOUT: %.loc7_3.1: ref %C = splice_block %x.var {} // CHECK:STDOUT: %.loc7_48.1: %.659 = value_of_initializer %GetComplexCallback.call // CHECK:STDOUT: %.loc7_48.2: %.659 = converted %GetComplexCallback.call, %.loc7_48.1 // CHECK:STDOUT: %.loc7_58.3: ref %C = temporary %.loc7_58.1, %.loc7_58.2 // CHECK:STDOUT: %.loc7_58.4: %C = acquire_value %.loc7_58.3 // CHECK:STDOUT: %.loc7_58.5: ref %C = value_as_ref %.loc7_58.4 // CHECK:STDOUT: %addr.loc7_59.1: %ptr.0a2 = addr_of %.loc7_58.5 -// CHECK:STDOUT: %addr.loc7_59.2: %ptr.0a2 = addr_of %.loc7_3 +// CHECK:STDOUT: %addr.loc7_59.2: %ptr.0a2 = addr_of %.loc7_3.1 // CHECK:STDOUT: %__invoke__carbon_thunk.call: init %empty_tuple.type = call imports.%__invoke__carbon_thunk.decl(%.loc7_48.2, %addr.loc7_59.1, %addr.loc7_59.2) -// CHECK:STDOUT: %.loc7_59: init %C to %.loc7_3 = mark_in_place_init %__invoke__carbon_thunk.call +// CHECK:STDOUT: %.loc7_59: init %C to %.loc7_3.1 = mark_in_place_init %__invoke__carbon_thunk.call // CHECK:STDOUT: assign %x.var, %.loc7_59 // CHECK:STDOUT: %.loc7_20: type = splice_block %C.ref.loc7_20 [concrete = constants.%C] { // CHECK:STDOUT: %Cpp.ref.loc7_17: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -876,20 +793,19 @@ fn F() { // CHECK:STDOUT: %x.patt: %pattern_type.bbc = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.bbc = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_58: = bound_method %.loc7_58.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_58: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_58(%.loc7_58.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc7_58.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.eb3, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_58.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc7_58.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_58.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.eb3, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_58.7: %Destroy.type = converted constants.%C, %Destroy.facet.loc7_58.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_58: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc7_58.3) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.eb3, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.eb3, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%x.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call imports.%C.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- mention_forward_decl.carbon @@ -905,14 +821,17 @@ fn F() { // CHECK:STDOUT: %ReturnCallback.cpp_overload_set.value: %ReturnCallback.cpp_overload_set.type = cpp_overload_set_value @ReturnCallback.cpp_overload_set [concrete] // CHECK:STDOUT: %ReturnCallback.type: type = fn_type @ReturnCallback [concrete] // CHECK:STDOUT: %ReturnCallback: %ReturnCallback.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.952: %pattern_type.4b7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a35: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt.952 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.886: %SubobjectDestroy.type = facet_value %.659, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.381: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.886) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %.659, (%DestroyImpl.impl_witness.381, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -927,23 +846,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -953,7 +857,7 @@ fn F() { // CHECK:STDOUT: %ReturnCallback.ref: %ReturnCallback.cpp_overload_set.type = name_ref ReturnCallback, imports.%ReturnCallback.cpp_overload_set.value [concrete = constants.%ReturnCallback.cpp_overload_set.value] // CHECK:STDOUT: %ReturnCallback.call: init %.659 = call imports.%ReturnCallback.decl() // CHECK:STDOUT: assign %callback.var, %ReturnCallback.call -// CHECK:STDOUT: %.loc7: type = splice_block %CallbackType.ref [concrete = constants.%.659] { +// CHECK:STDOUT: %.loc7_27: type = splice_block %CallbackType.ref [concrete = constants.%.659] { // CHECK:STDOUT: %Cpp.ref.loc7_24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %CallbackType.ref: type = name_ref CallbackType, constants.%.659 [concrete = constants.%.659] // CHECK:STDOUT: } @@ -962,19 +866,14 @@ fn F() { // CHECK:STDOUT: %callback.patt: %pattern_type.4b7 = ref_binding_pattern callback [concrete = constants.%callback.patt] // CHECK:STDOUT: %callback.var_patt: %pattern_type.4b7 = var_pattern %callback.patt [concrete = constants.%callback.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %callback.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%callback.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.1: %Destroy.type = converted constants.%.659, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%.659, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%callback.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %.659) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7(%self.param: ref %.659) = "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 f0c524088fc6..1ec3c3130dc7 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/inline.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/inline.carbon @@ -213,15 +213,17 @@ fn MyF() { // CHECK:STDOUT: %ThunkOnBoth.cpp_overload_set.value: %ThunkOnBoth.cpp_overload_set.type = cpp_overload_set_value @ThunkOnBoth.cpp_overload_set [concrete] // CHECK:STDOUT: %ThunkOnBoth__carbon_thunk.type: type = fn_type @ThunkOnBoth__carbon_thunk [concrete] // CHECK:STDOUT: %ThunkOnBoth__carbon_thunk: %ThunkOnBoth__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.c52, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -260,23 +262,8 @@ fn MyF() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @MyF() { @@ -375,23 +362,32 @@ fn MyF() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %r4.patt: %pattern_type.9bc = value_binding_pattern r4 [concrete = constants.%r4.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %.loc16_41.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16_41: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%.loc16_41.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16_40: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c52) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15: = bound_method %.loc15_43.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15(%.loc15_43.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c52) +// CHECK:STDOUT: %Destroy.facet.loc16_41.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_41.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc16_41.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_41.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_41.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc16_41.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16_41: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc16_41.3) +// CHECK:STDOUT: %Destroy.facet.loc16_40.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_40.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc16_40.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_40.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_40.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc16_40.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16_40: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc16_40.4) +// CHECK:STDOUT: %Destroy.facet.loc15_43.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_43.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc15_43.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc15_43.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_43.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc15_43.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc15_43.3) +// CHECK:STDOUT: %Destroy.facet.loc14_39.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_39.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc14_39.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc14_39.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_39.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc14_39.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc14_39.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/method_ptr.carbon b/toolchain/check/testdata/interop/cpp/function/import/method_ptr.carbon index 23497f73e312..8e629d9e774f 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/method_ptr.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/method_ptr.carbon @@ -150,7 +150,6 @@ fn G() { // CHECK:STDOUT: %GetMethodPtr.cpp_overload_set.type: type = cpp_overload_set_type @GetMethodPtr.cpp_overload_set [concrete] // CHECK:STDOUT: %GetMethodPtr.cpp_overload_set.value: %GetMethodPtr.cpp_overload_set.type = cpp_overload_set_value @GetMethodPtr.cpp_overload_set [concrete] // CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type41000000 [concrete] -// CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.659 [concrete] // CHECK:STDOUT: %ptr.796: type = ptr_type %.659 [concrete] // CHECK:STDOUT: %GetMethodPtr__carbon_thunk.type: type = fn_type @GetMethodPtr__carbon_thunk [concrete] // CHECK:STDOUT: %GetMethodPtr__carbon_thunk: %GetMethodPtr__carbon_thunk.type = struct_value () [concrete] @@ -163,14 +162,17 @@ fn G() { // CHECK:STDOUT: %Copy.facet.8df: %Copy.type = facet_value %.659, (%custom_witness.bab) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.dbb: type = fn_type @Copy.WithSelf.Op.1, @Copy.WithSelf(%Copy.facet.8df) [concrete] // CHECK:STDOUT: %.c79: type = fn_type_with_self_type %Copy.WithSelf.Op.type.dbb, %Copy.facet.8df [concrete] -// CHECK:STDOUT: %self.param_patt.952: %pattern_type.4b7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a35: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt.952 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.886: %SubobjectDestroy.type = facet_value %.659, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.381: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.886) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %.659, (%DestroyImpl.impl_witness.381, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -191,23 +193,8 @@ fn G() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -230,23 +217,22 @@ fn G() { // CHECK:STDOUT: %.loc7_38.6: ref %.659 = temporary %.loc7_38.5, %Copy.WithSelf.Op.call // CHECK:STDOUT: %addr.loc7_39: %ptr.796 = addr_of %.loc7_38.6 // CHECK:STDOUT: %TakeMethodPtr__carbon_thunk.call: init %empty_tuple.type = call imports.%TakeMethodPtr__carbon_thunk.decl(%addr.loc7_39) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_38.1: = bound_method %.loc7_38.6, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_38.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_38.1(%.loc7_38.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_38.2: = bound_method %.loc7_38.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_38.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_38.2(%.loc7_38.3) +// CHECK:STDOUT: %Destroy.facet.loc7_38.1: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_38.7: %Destroy.type = converted constants.%.659, %Destroy.facet.loc7_38.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_38.2: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_38.8: %Destroy.type = converted constants.%.659, %Destroy.facet.loc7_38.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_38.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc7_38.6) +// CHECK:STDOUT: %Destroy.facet.loc7_38.3: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_38.9: %Destroy.type = converted constants.%.659, %Destroy.facet.loc7_38.3 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_38.4: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_38.10: %Destroy.type = converted constants.%.659, %Destroy.facet.loc7_38.4 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_38.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc7_38.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %.659) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7(%self.param: ref %.659) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- convert_method_ptr.carbon // CHECK:STDOUT: @@ -260,6 +246,11 @@ fn G() { // CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.659 [concrete] // CHECK:STDOUT: %ptr.patt: %pattern_type.4b7 = ref_binding_pattern ptr [concrete] // CHECK:STDOUT: %ptr.var_patt: %pattern_type.4b7 = var_pattern %ptr.patt [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %.b35: %.659 = cpp_addr_of_fn %C.Method, @C.Method [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.7f5: type = fn_type @Copy.WithSelf.Op.2 [concrete] @@ -269,14 +260,12 @@ fn G() { // CHECK:STDOUT: %Copy.WithSelf.Op.type.dbb: type = fn_type @Copy.WithSelf.Op.1, @Copy.WithSelf(%Copy.facet.8df) [concrete] // CHECK:STDOUT: %.c79: type = fn_type_with_self_type %Copy.WithSelf.Op.type.dbb, %Copy.facet.8df [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.bound: = bound_method %.b35, %Copy.WithSelf.Op.416 [concrete] -// CHECK:STDOUT: %self.param_patt.952: %pattern_type.4b7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a35: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt.952 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc15 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.886: %SubobjectDestroy.type = facet_value %.659, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.381: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.886) [concrete] +// CHECK:STDOUT: %Destroy.facet.f79: %Destroy.type = facet_value %.659, (%DestroyImpl.impl_witness.381, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -284,23 +273,8 @@ fn G() { // CHECK:STDOUT: .MethodPtrType = constants.%.659 // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc15 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc15 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -324,8 +298,12 @@ fn G() { // CHECK:STDOUT: %ptr.patt: %pattern_type.4b7 = ref_binding_pattern ptr [concrete = constants.%ptr.patt] // CHECK:STDOUT: %ptr.var_patt: %pattern_type.4b7 = var_pattern %ptr.patt [concrete = constants.%ptr.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %ptr.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%ptr.var) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%.659, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: %.loc15_3.4: %Destroy.type = converted constants.%.659, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%ptr.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -336,16 +314,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc15(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15(%self.param: ref %.659) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc15(%self.param: ref %.659) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- pass_method_ptr.carbon // CHECK:STDOUT: @@ -357,8 +326,12 @@ fn G() { // CHECK:STDOUT: %C.Method: %C.Method.type = struct_value () [concrete] // CHECK:STDOUT: %TakeGenericMethodPtr.cpp_overload_set.type: type = cpp_overload_set_type @TakeGenericMethodPtr.cpp_overload_set [concrete] // CHECK:STDOUT: %TakeGenericMethodPtr.cpp_overload_set.value: %TakeGenericMethodPtr.cpp_overload_set.type = cpp_overload_set_value @TakeGenericMethodPtr.cpp_overload_set [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %.659: type = cpp_fn_ptr_type clang_function_pointer_type51000000 [concrete] -// CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.659 [concrete] // CHECK:STDOUT: %ptr.796: type = ptr_type %.659 [concrete] // CHECK:STDOUT: %TakeGenericMethodPtr__carbon_thunk.type: type = fn_type @TakeGenericMethodPtr__carbon_thunk [concrete] // CHECK:STDOUT: %TakeGenericMethodPtr__carbon_thunk: %TakeGenericMethodPtr__carbon_thunk.type = struct_value () [concrete] @@ -373,15 +346,12 @@ fn G() { // CHECK:STDOUT: %Copy.WithSelf.Op.bound: = bound_method %.b35, %Copy.WithSelf.Op.416 [concrete] // CHECK:STDOUT: %.fc1: ref %.659 = temporary invalid, %.b35 [concrete] // CHECK:STDOUT: %addr: %ptr.796 = addr_of %.fc1 [concrete] -// CHECK:STDOUT: %self.param_patt.952: %pattern_type.4b7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a35: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt.952 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.fc1, %Destroy.WithSelf.SelfDestruct.db3fdb.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.886: %SubobjectDestroy.type = facet_value %.659, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.381: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.886) [concrete] +// CHECK:STDOUT: %Destroy.facet.f79: %Destroy.type = facet_value %.659, (%DestroyImpl.impl_witness.381, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -390,6 +360,8 @@ fn G() { // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } // CHECK:STDOUT: %TakeGenericMethodPtr.cpp_overload_set.value: %TakeGenericMethodPtr.cpp_overload_set.type = cpp_overload_set_value @TakeGenericMethodPtr.cpp_overload_set [concrete = constants.%TakeGenericMethodPtr.cpp_overload_set.value] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %TakeGenericMethodPtr__carbon_thunk.decl: %TakeGenericMethodPtr__carbon_thunk.type = fn_decl @TakeGenericMethodPtr__carbon_thunk [concrete = constants.%TakeGenericMethodPtr__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -397,23 +369,6 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -430,20 +385,16 @@ fn G() { // CHECK:STDOUT: %.loc11_29.4: ref %.659 = temporary %.loc11_29.3, %Copy.WithSelf.Op.call [concrete = constants.%.fc1] // CHECK:STDOUT: %addr: %ptr.796 = addr_of %.loc11_29.4 [concrete = constants.%addr] // CHECK:STDOUT: %TakeGenericMethodPtr__carbon_thunk.call: init %empty_tuple.type = call imports.%TakeGenericMethodPtr__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.fc1) +// CHECK:STDOUT: %Destroy.facet.loc11_29.1: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: %.loc11_29.5: %Destroy.type = converted constants.%.659, %Destroy.facet.loc11_29.1 [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: %Destroy.facet.loc11_29.2: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: %.loc11_29.6: %Destroy.type = converted constants.%.659, %Destroy.facet.loc11_29.2 [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_29.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %.659) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11(%self.param: ref %.659) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_type_mismatch.carbon // CHECK:STDOUT: @@ -459,14 +410,17 @@ fn G() { // CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.659 [concrete] // CHECK:STDOUT: %ptr.patt: %pattern_type.4b7 = ref_binding_pattern ptr [concrete] // CHECK:STDOUT: %ptr.var_patt: %pattern_type.4b7 = var_pattern %ptr.patt [concrete] -// CHECK:STDOUT: %self.param_patt.952: %pattern_type.4b7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a35: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt.952 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.886: %SubobjectDestroy.type = facet_value %.659, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.381: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.886) [concrete] +// CHECK:STDOUT: %Destroy.facet.f79: %Destroy.type = facet_value %.659, (%DestroyImpl.impl_witness.381, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -474,23 +428,8 @@ fn G() { // CHECK:STDOUT: .MethodPtrType = constants.%.659 // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc18 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.952] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a35] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.659 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.659 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { @@ -499,7 +438,7 @@ fn G() { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Method.ref: %C.Method.type = name_ref Method, @C.%C.Method.decl [concrete = constants.%C.Method] // CHECK:STDOUT: assign %ptr.var, -// CHECK:STDOUT: %.loc18: type = splice_block %MethodPtrType.ref [concrete = constants.%.659] { +// CHECK:STDOUT: %.loc18_22: type = splice_block %MethodPtrType.ref [concrete = constants.%.659] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %MethodPtrType.ref: type = name_ref MethodPtrType, constants.%.659 [concrete = constants.%.659] // CHECK:STDOUT: } @@ -508,8 +447,12 @@ fn G() { // CHECK:STDOUT: %ptr.patt: %pattern_type.4b7 = ref_binding_pattern ptr [concrete = constants.%ptr.patt] // CHECK:STDOUT: %ptr.var_patt: %pattern_type.4b7 = var_pattern %ptr.patt [concrete = constants.%ptr.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %ptr.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%ptr.var) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: %.loc18_3.1: %Destroy.type = converted constants.%.659, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%.659, (constants.%DestroyImpl.impl_witness.381, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%.659, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.f79] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%ptr.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -521,14 +464,5 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18(%self.param: ref %.659) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18(%self.param: ref %.659) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18(%self.param: ref %.659) = "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 338535a56a27..61c25414aa0a 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/pointer.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/pointer.carbon @@ -437,14 +437,17 @@ fn F() { // CHECK:STDOUT: %ptr.1dc: type = ptr_type %NonNullableParamS [concrete] // CHECK:STDOUT: %non_nullable_param_foo.type: type = fn_type @non_nullable_param_foo [concrete] // CHECK:STDOUT: %non_nullable_param_foo: %non_nullable_param_foo.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.4d7: %pattern_type.3b5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.667: %pattern_type.3b5 = wrapper_binding_pattern self, %self.param_patt.4d7 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %NonNullableParamS.cpp_destructor.type: type = fn_type @NonNullableParamS.cpp_destructor [concrete] // CHECK:STDOUT: %NonNullableParamS.cpp_destructor: %NonNullableParamS.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%NonNullableParamS.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b3d: %SubobjectDestroy.type = facet_value %NonNullableParamS, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f1f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b3d) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %NonNullableParamS, (%DestroyImpl.impl_witness.f1f, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -460,21 +463,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %NonNullableParamS.cpp_destructor.decl: %NonNullableParamS.cpp_destructor.type = fn_decl @NonNullableParamS.cpp_destructor [concrete = constants.%NonNullableParamS.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3b5 = ref_param_pattern [concrete = constants.%self.param_patt.4d7] -// CHECK:STDOUT: %self.patt: %pattern_type.3b5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.667] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %NonNullableParamS = ref_param call_param0 -// CHECK:STDOUT: %self: ref %NonNullableParamS = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -482,8 +472,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %NonNullableParamS = var_storage %s.var_patt // CHECK:STDOUT: %.loc8_35.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_35.2: init %NonNullableParamS to %s.var = class_init () [concrete = constants.%NonNullableParamS.val] -// CHECK:STDOUT: %.loc8_3: init %NonNullableParamS = converted %.loc8_35.1, %.loc8_35.2 [concrete = constants.%NonNullableParamS.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %NonNullableParamS = converted %.loc8_35.1, %.loc8_35.2 [concrete = constants.%NonNullableParamS.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %NonNullableParamS.ref [concrete = constants.%NonNullableParamS] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %NonNullableParamS.ref: type = name_ref NonNullableParamS, imports.%NonNullableParamS.decl [concrete = constants.%NonNullableParamS] @@ -498,18 +488,13 @@ fn F() { // CHECK:STDOUT: %s.ref: ref %NonNullableParamS = name_ref s, %s // CHECK:STDOUT: %addr: %ptr.1dc = addr_of %s.ref // CHECK:STDOUT: %non_nullable_param_foo.call: init %empty_tuple.type = call imports.%non_nullable_param_foo.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%NonNullableParamS, (constants.%DestroyImpl.impl_witness.f1f, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%NonNullableParamS, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%NonNullableParamS, (constants.%DestroyImpl.impl_witness.f1f, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%NonNullableParamS, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%s.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %NonNullableParamS) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %NonNullableParamS) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %NonNullableParamS.cpp_destructor.call: init %empty_tuple.type = call imports.%NonNullableParamS.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_non_nullable_pointer_param_using_const_pointer.carbon @@ -529,14 +514,17 @@ fn F() { // CHECK:STDOUT: %non_nullable_param_foo.cpp_overload_set.value: %non_nullable_param_foo.cpp_overload_set.type = cpp_overload_set_value @non_nullable_param_foo.cpp_overload_set [concrete] // CHECK:STDOUT: %non_nullable_param_foo.type: type = fn_type @non_nullable_param_foo [concrete] // CHECK:STDOUT: %non_nullable_param_foo: %non_nullable_param_foo.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ed3: %pattern_type.937 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6ce: %pattern_type.937 = wrapper_binding_pattern self, %self.param_patt.ed3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.32c: %SubobjectDestroy.type = facet_value %const, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.fd5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.32c) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %const, (%DestroyImpl.impl_witness.fd5, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -552,23 +540,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.937 = ref_param_pattern [concrete = constants.%self.param_patt.ed3] -// CHECK:STDOUT: %self.patt: %pattern_type.937 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6ce] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %const = ref_param call_param0 -// CHECK:STDOUT: %self: ref %const = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.937 = ref_param_pattern [concrete = constants.%self.param_patt.ed3] -// CHECK:STDOUT: %self.patt: %pattern_type.937 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6ce] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %const = ref_param call_param0 -// CHECK:STDOUT: %self: ref %const = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -577,7 +550,7 @@ fn F() { // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] // CHECK:STDOUT: %G.call: init %const = call %G.ref() // CHECK:STDOUT: assign %p.var, %G.call -// CHECK:STDOUT: %.loc10: type = splice_block %const [concrete = constants.%const] { +// CHECK:STDOUT: %.loc10_10: type = splice_block %const [concrete = constants.%const] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %NonNullableParamS.ref: type = name_ref NonNullableParamS, imports.%NonNullableParamS.decl [concrete = constants.%NonNullableParamS] // CHECK:STDOUT: %ptr: type = ptr_type %NonNullableParamS.ref [concrete = constants.%ptr] @@ -595,21 +568,16 @@ fn F() { // CHECK:STDOUT: %.loc11_30.2: ref %ptr = converted %p.ref, %.loc11_30.1 // CHECK:STDOUT: %.loc11_30.3: %ptr = acquire_value %.loc11_30.2 // CHECK:STDOUT: %non_nullable_param_foo.call: init %empty_tuple.type = call imports.%non_nullable_param_foo.decl(%.loc11_30.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %p.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%p.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%const, (constants.%DestroyImpl.impl_witness.fd5, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.1: %Destroy.type = converted constants.%const, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%const, (constants.%DestroyImpl.impl_witness.fd5, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%const, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%p.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %const) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %const) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %const) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10(%self.param: ref %const) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_double_non_nullable_pointer_param.carbon // CHECK:STDOUT: @@ -643,22 +611,23 @@ fn F() { // CHECK:STDOUT: %ptr.2a5: type = ptr_type %ptr.40d [concrete] // CHECK:STDOUT: %double_non_nullable_param_foo.type: type = fn_type @double_non_nullable_param_foo [concrete] // CHECK:STDOUT: %double_non_nullable_param_foo: %double_non_nullable_param_foo.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8a2: %pattern_type.4da = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.401: %pattern_type.4da = wrapper_binding_pattern self, %self.param_patt.8a2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e94: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ec6: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.e94 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.07a: %SubobjectDestroy.type = facet_value %ptr.40d, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.aa5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.07a) [concrete] +// CHECK:STDOUT: %Destroy.facet.16e: %Destroy.type = facet_value %ptr.40d, (%DestroyImpl.impl_witness.aa5, %custom_witness.b80) [concrete] // CHECK:STDOUT: %DoubleNonNullableParamS.cpp_destructor.type: type = fn_type @DoubleNonNullableParamS.cpp_destructor [concrete] // CHECK:STDOUT: %DoubleNonNullableParamS.cpp_destructor: %DoubleNonNullableParamS.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%DoubleNonNullableParamS.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.191: %SubobjectDestroy.type = facet_value %DoubleNonNullableParamS, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1ba: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.191) [concrete] +// CHECK:STDOUT: %Destroy.facet.8c9: %Destroy.type = facet_value %DoubleNonNullableParamS, (%DestroyImpl.impl_witness.1ba, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -676,35 +645,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %DoubleNonNullableParamS.cpp_destructor.decl: %DoubleNonNullableParamS.cpp_destructor.type = fn_decl @DoubleNonNullableParamS.cpp_destructor [concrete = constants.%DoubleNonNullableParamS.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4da = ref_param_pattern [concrete = constants.%self.param_patt.8a2] -// CHECK:STDOUT: %self.patt: %pattern_type.4da = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.401] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.40d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.40d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4da = ref_param_pattern [concrete = constants.%self.param_patt.8a2] -// CHECK:STDOUT: %self.patt: %pattern_type.4da = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.401] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.40d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.40d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.e94] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ec6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DoubleNonNullableParamS = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DoubleNonNullableParamS = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -712,8 +654,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %DoubleNonNullableParamS = var_storage %s.var_patt // CHECK:STDOUT: %.loc8_41.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_41.2: init %DoubleNonNullableParamS to %s.var = class_init () [concrete = constants.%DoubleNonNullableParamS.val] -// CHECK:STDOUT: %.loc8_3: init %DoubleNonNullableParamS = converted %.loc8_41.1, %.loc8_41.2 [concrete = constants.%DoubleNonNullableParamS.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %DoubleNonNullableParamS = converted %.loc8_41.1, %.loc8_41.2 [concrete = constants.%DoubleNonNullableParamS.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %DoubleNonNullableParamS.ref.loc8 [concrete = constants.%DoubleNonNullableParamS] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %DoubleNonNullableParamS.ref.loc8: type = name_ref DoubleNonNullableParamS, imports.%DoubleNonNullableParamS.decl [concrete = constants.%DoubleNonNullableParamS] @@ -732,7 +674,7 @@ fn F() { // CHECK:STDOUT: %bound_method.loc9_41.2: = bound_method %addr.loc9, %specific_fn // CHECK:STDOUT: %ptr.as.Copy.impl.Op.call: init %ptr.40d = call %bound_method.loc9_41.2(%addr.loc9) // CHECK:STDOUT: assign %p.var, %ptr.as.Copy.impl.Op.call -// CHECK:STDOUT: %.loc9: type = splice_block %ptr [concrete = constants.%ptr.40d] { +// CHECK:STDOUT: %.loc9_37: type = splice_block %ptr [concrete = constants.%ptr.40d] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %DoubleNonNullableParamS.ref.loc9: type = name_ref DoubleNonNullableParamS, imports.%DoubleNonNullableParamS.decl [concrete = constants.%DoubleNonNullableParamS] // CHECK:STDOUT: %ptr: type = ptr_type %DoubleNonNullableParamS.ref.loc9 [concrete = constants.%ptr.40d] @@ -747,32 +689,22 @@ fn F() { // CHECK:STDOUT: %p.ref: ref %ptr.40d = name_ref p, %p // CHECK:STDOUT: %addr.loc10: %ptr.2a5 = addr_of %p.ref // CHECK:STDOUT: %double_non_nullable_param_foo.call: init %empty_tuple.type = call imports.%double_non_nullable_param_foo.decl(%addr.loc10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %p.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%p.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%ptr.40d, (constants.%DestroyImpl.impl_witness.aa5, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.16e] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%ptr.40d, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.16e] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%ptr.40d, (constants.%DestroyImpl.impl_witness.aa5, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.16e] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%ptr.40d, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.16e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%p.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%DoubleNonNullableParamS, (constants.%DestroyImpl.impl_witness.1ba, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.8c9] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%DoubleNonNullableParamS, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.8c9] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%DoubleNonNullableParamS, (constants.%DestroyImpl.impl_witness.1ba, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.8c9] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%DoubleNonNullableParamS, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.8c9] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%s.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %ptr.40d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %ptr.40d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %ptr.40d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %DoubleNonNullableParamS) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %DoubleNonNullableParamS) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %DoubleNonNullableParamS.cpp_destructor.call: init %empty_tuple.type = call imports.%DoubleNonNullableParamS.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %ptr.40d) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_non_nullable_pointer_to_const_param_using_const.carbon // CHECK:STDOUT: @@ -791,21 +723,17 @@ fn F() { // CHECK:STDOUT: %ptr.62c: type = ptr_type %const [concrete] // CHECK:STDOUT: %non_nullable_to_const_foo.type: type = fn_type @non_nullable_to_const_foo [concrete] // CHECK:STDOUT: %non_nullable_to_const_foo: %non_nullable_to_const_foo.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.2f7: type = pattern_type %NonNullablePointerToConstParamS [concrete] -// CHECK:STDOUT: %self.param_patt.c8e: %pattern_type.2f7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.852: %pattern_type.2f7 = wrapper_binding_pattern self, %self.param_patt.c8e [concrete] -// CHECK:STDOUT: %NonNullablePointerToConstParamS.cpp_destructor.type: type = fn_type @NonNullablePointerToConstParamS.cpp_destructor [concrete] -// CHECK:STDOUT: %NonNullablePointerToConstParamS.cpp_destructor: %NonNullablePointerToConstParamS.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.61c: %pattern_type.291 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.79a: %pattern_type.291 = wrapper_binding_pattern self, %self.param_patt.61c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6e8: %SubobjectDestroy.type = facet_value %const, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.229: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6e8) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %const, (%DestroyImpl.impl_witness.229, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -821,43 +749,16 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %NonNullablePointerToConstParamS.cpp_destructor.decl: %NonNullablePointerToConstParamS.cpp_destructor.type = fn_decl @NonNullablePointerToConstParamS.cpp_destructor [concrete = constants.%NonNullablePointerToConstParamS.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.2f7 = ref_param_pattern [concrete = constants.%self.param_patt.c8e] -// CHECK:STDOUT: %self.patt: %pattern_type.2f7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.852] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %NonNullablePointerToConstParamS = ref_param call_param0 -// CHECK:STDOUT: %self: ref %NonNullablePointerToConstParamS = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.291 = ref_param_pattern [concrete = constants.%self.param_patt.61c] -// CHECK:STDOUT: %self.patt: %pattern_type.291 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.79a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %const = ref_param call_param0 -// CHECK:STDOUT: %self: ref %const = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.291 = ref_param_pattern [concrete = constants.%self.param_patt.61c] -// CHECK:STDOUT: %self.patt: %pattern_type.291 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.79a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %const = ref_param call_param0 -// CHECK:STDOUT: %self: ref %const = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.var: ref %const = var_storage %s.var_patt // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] -// CHECK:STDOUT: %.loc10_3: ref %const = splice_block %s.var {} -// CHECK:STDOUT: %G.call: init %const to %.loc10_3 = call %G.ref() +// CHECK:STDOUT: %.loc10_3.1: ref %const = splice_block %s.var {} +// CHECK:STDOUT: %G.call: init %const to %.loc10_3.1 = call %G.ref() // CHECK:STDOUT: assign %s.var, %G.call // CHECK:STDOUT: %.loc10_10: type = splice_block %const [concrete = constants.%const] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -874,31 +775,17 @@ fn F() { // CHECK:STDOUT: %s.ref: ref %const = name_ref s, %s // CHECK:STDOUT: %addr: %ptr.62c = addr_of %s.ref // CHECK:STDOUT: %non_nullable_to_const_foo.call: init %empty_tuple.type = call imports.%non_nullable_to_const_foo.decl(%addr) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%const, (constants.%DestroyImpl.impl_witness.229, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%const, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%const, (constants.%DestroyImpl.impl_witness.229, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%const, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%s.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.1(%self.param: ref %NonNullablePointerToConstParamS) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.1(%self.param: ref %NonNullablePointerToConstParamS) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10(%self.param: ref %const) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %NonNullablePointerToConstParamS.cpp_destructor.call: init %empty_tuple.type = call imports.%NonNullablePointerToConstParamS.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %const) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %const) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.2(%self.param: ref %const) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -920,14 +807,17 @@ fn F() { // CHECK:STDOUT: %ptr.62c: type = ptr_type %const [concrete] // CHECK:STDOUT: %non_nullable_to_const_foo.type: type = fn_type @non_nullable_to_const_foo [concrete] // CHECK:STDOUT: %non_nullable_to_const_foo: %non_nullable_to_const_foo.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c8e: %pattern_type.2f7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.852: %pattern_type.2f7 = wrapper_binding_pattern self, %self.param_patt.c8e [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %NonNullablePointerToConstParamS.cpp_destructor.type: type = fn_type @NonNullablePointerToConstParamS.cpp_destructor [concrete] // CHECK:STDOUT: %NonNullablePointerToConstParamS.cpp_destructor: %NonNullablePointerToConstParamS.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%NonNullablePointerToConstParamS.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ae7: %SubobjectDestroy.type = facet_value %NonNullablePointerToConstParamS, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.fc5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ae7) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %NonNullablePointerToConstParamS, (%DestroyImpl.impl_witness.fc5, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -943,29 +833,16 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %NonNullablePointerToConstParamS.cpp_destructor.decl: %NonNullablePointerToConstParamS.cpp_destructor.type = fn_decl @NonNullablePointerToConstParamS.cpp_destructor [concrete = constants.%NonNullablePointerToConstParamS.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.2f7 = ref_param_pattern [concrete = constants.%self.param_patt.c8e] -// CHECK:STDOUT: %self.patt: %pattern_type.2f7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.852] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %NonNullablePointerToConstParamS = ref_param call_param0 -// CHECK:STDOUT: %self: ref %NonNullablePointerToConstParamS = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.var: ref %NonNullablePointerToConstParamS = var_storage %s.var_patt // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] -// CHECK:STDOUT: %.loc8_3: ref %NonNullablePointerToConstParamS = splice_block %s.var {} -// CHECK:STDOUT: %G.call: init %NonNullablePointerToConstParamS to %.loc8_3 = call %G.ref() +// CHECK:STDOUT: %.loc8_3.1: ref %NonNullablePointerToConstParamS = splice_block %s.var {} +// CHECK:STDOUT: %G.call: init %NonNullablePointerToConstParamS to %.loc8_3.1 = call %G.ref() // CHECK:STDOUT: assign %s.var, %G.call // CHECK:STDOUT: %.loc8_13: type = splice_block %NonNullablePointerToConstParamS.ref [concrete = constants.%NonNullablePointerToConstParamS] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -983,18 +860,13 @@ fn F() { // CHECK:STDOUT: %.loc9_33.1: %ptr.62c = as_compatible %addr // CHECK:STDOUT: %.loc9_33.2: %ptr.62c = converted %addr, %.loc9_33.1 // CHECK:STDOUT: %non_nullable_to_const_foo.call: init %empty_tuple.type = call imports.%non_nullable_to_const_foo.decl(%.loc9_33.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%NonNullablePointerToConstParamS, (constants.%DestroyImpl.impl_witness.fc5, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%NonNullablePointerToConstParamS, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%NonNullablePointerToConstParamS, (constants.%DestroyImpl.impl_witness.fc5, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%NonNullablePointerToConstParamS, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%s.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %NonNullablePointerToConstParamS) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %NonNullablePointerToConstParamS) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %NonNullablePointerToConstParamS.cpp_destructor.call: init %empty_tuple.type = call imports.%NonNullablePointerToConstParamS.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_const_non_nullable_pointer_param_using_const.carbon @@ -1014,14 +886,17 @@ fn F() { // CHECK:STDOUT: %const_non_nullable_foo.cpp_overload_set.value: %const_non_nullable_foo.cpp_overload_set.type = cpp_overload_set_value @const_non_nullable_foo.cpp_overload_set [concrete] // CHECK:STDOUT: %const_non_nullable_foo.type: type = fn_type @const_non_nullable_foo [concrete] // CHECK:STDOUT: %const_non_nullable_foo: %const_non_nullable_foo.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.d3f: %pattern_type.6b4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.738: %pattern_type.6b4 = wrapper_binding_pattern self, %self.param_patt.d3f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.5e9: %SubobjectDestroy.type = facet_value %const, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a57: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.5e9) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %const, (%DestroyImpl.impl_witness.a57, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1037,23 +912,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6b4 = ref_param_pattern [concrete = constants.%self.param_patt.d3f] -// CHECK:STDOUT: %self.patt: %pattern_type.6b4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.738] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %const = ref_param call_param0 -// CHECK:STDOUT: %self: ref %const = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6b4 = ref_param_pattern [concrete = constants.%self.param_patt.d3f] -// CHECK:STDOUT: %self.patt: %pattern_type.6b4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.738] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %const = ref_param call_param0 -// CHECK:STDOUT: %self: ref %const = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1062,7 +922,7 @@ fn F() { // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] // CHECK:STDOUT: %G.call: init %const = call %G.ref() // CHECK:STDOUT: assign %p.var, %G.call -// CHECK:STDOUT: %.loc10: type = splice_block %const [concrete = constants.%const] { +// CHECK:STDOUT: %.loc10_10: type = splice_block %const [concrete = constants.%const] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %ConstNonNullableParamS.ref: type = name_ref ConstNonNullableParamS, imports.%ConstNonNullableParamS.decl [concrete = constants.%ConstNonNullableParamS] // CHECK:STDOUT: %ptr: type = ptr_type %ConstNonNullableParamS.ref [concrete = constants.%ptr] @@ -1080,21 +940,16 @@ fn F() { // CHECK:STDOUT: %.loc11_30.2: ref %ptr = converted %p.ref, %.loc11_30.1 // CHECK:STDOUT: %.loc11_30.3: %ptr = acquire_value %.loc11_30.2 // CHECK:STDOUT: %const_non_nullable_foo.call: init %empty_tuple.type = call imports.%const_non_nullable_foo.decl(%.loc11_30.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %p.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%p.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%const, (constants.%DestroyImpl.impl_witness.a57, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.1: %Destroy.type = converted constants.%const, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%const, (constants.%DestroyImpl.impl_witness.a57, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%const, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%p.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %const) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %const) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %const) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10(%self.param: ref %const) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_const_non_nullable_pointer_param_using_non_const.carbon // CHECK:STDOUT: @@ -1112,14 +967,17 @@ fn F() { // CHECK:STDOUT: %const_non_nullable_foo.cpp_overload_set.value: %const_non_nullable_foo.cpp_overload_set.type = cpp_overload_set_value @const_non_nullable_foo.cpp_overload_set [concrete] // CHECK:STDOUT: %const_non_nullable_foo.type: type = fn_type @const_non_nullable_foo [concrete] // CHECK:STDOUT: %const_non_nullable_foo: %const_non_nullable_foo.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.d88: %pattern_type.c28 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7b2: %pattern_type.c28 = wrapper_binding_pattern self, %self.param_patt.d88 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0d1: %SubobjectDestroy.type = facet_value %ptr, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e0c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0d1) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr, (%DestroyImpl.impl_witness.e0c, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1135,23 +993,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c28 = ref_param_pattern [concrete = constants.%self.param_patt.d88] -// CHECK:STDOUT: %self.patt: %pattern_type.c28 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7b2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c28 = ref_param_pattern [concrete = constants.%self.param_patt.d88] -// CHECK:STDOUT: %self.patt: %pattern_type.c28 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7b2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1160,7 +1003,7 @@ fn F() { // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] // CHECK:STDOUT: %G.call: init %ptr = call %G.ref() // CHECK:STDOUT: assign %p.var, %G.call -// CHECK:STDOUT: %.loc10: type = splice_block %ptr [concrete = constants.%ptr] { +// CHECK:STDOUT: %.loc10_36: type = splice_block %ptr [concrete = constants.%ptr] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %ConstNonNullableParamS.ref: type = name_ref ConstNonNullableParamS, imports.%ConstNonNullableParamS.decl [concrete = constants.%ConstNonNullableParamS] // CHECK:STDOUT: %ptr: type = ptr_type %ConstNonNullableParamS.ref [concrete = constants.%ptr] @@ -1175,21 +1018,16 @@ fn F() { // CHECK:STDOUT: %p.ref: ref %ptr = name_ref p, %p // CHECK:STDOUT: %.loc11: %ptr = acquire_value %p.ref // CHECK:STDOUT: %const_non_nullable_foo.call: init %empty_tuple.type = call imports.%const_non_nullable_foo.decl(%.loc11) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %p.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%p.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%ptr, (constants.%DestroyImpl.impl_witness.e0c, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.1: %Destroy.type = converted constants.%ptr, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%ptr, (constants.%DestroyImpl.impl_witness.e0c, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%ptr, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%p.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %ptr) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %ptr) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %ptr) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10(%self.param: ref %ptr) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_const_nullable_pointer_param_using_const.carbon // CHECK:STDOUT: @@ -1207,29 +1045,31 @@ fn F() { // CHECK:STDOUT: %const_nullable_foo.cpp_overload_set.type: type = cpp_overload_set_type @const_nullable_foo.cpp_overload_set [concrete] // CHECK:STDOUT: %const_nullable_foo.cpp_overload_set.value: %const_nullable_foo.cpp_overload_set.type = cpp_overload_set_value @const_nullable_foo.cpp_overload_set [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.type.b0c: type = fn_type @ptr.as.OptionalStorage.impl.Some, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.bf1: %ptr.as.OptionalStorage.impl.Some.type.b0c = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.1a9: %Destroy.type = facet_value %ptr.13b, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.84f: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.1a9) [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f99: %SubobjectDestroy.type = facet_value %ptr.13b, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c03: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f99) [concrete] +// CHECK:STDOUT: %Destroy.facet.0a4: %Destroy.type = facet_value %ptr.13b, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.c03) [concrete] +// CHECK:STDOUT: %MaybeUnformed.97c: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.0a4) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.361: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%ConstNullableParamS) [concrete] // CHECK:STDOUT: %.c5e: type = maybe_unformed_type %ptr.13b [concrete] // CHECK:STDOUT: %OptionalStorage.facet.9ab: %OptionalStorage.type = facet_value %ptr.13b, (%OptionalStorage.impl_witness.361) [concrete] // CHECK:STDOUT: %Optional.4b8: type = class_type @Optional, @Optional(%OptionalStorage.facet.9ab) [concrete] -// CHECK:STDOUT: %pattern_type.3f6: type = pattern_type %Optional.4b8 [concrete] // CHECK:STDOUT: %const_nullable_foo.type: type = fn_type @const_nullable_foo [concrete] // CHECK:STDOUT: %const_nullable_foo: %const_nullable_foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.19b: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.4b8)> [concrete] @@ -1237,12 +1077,12 @@ fn F() { // CHECK:STDOUT: %U.862: %ImplicitAs.type.b02b67.2 = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %const.as.ImplicitAs.impl.Convert.type.dba: type = fn_type @const.as.ImplicitAs.impl.Convert, @const.as.ImplicitAs.impl(%T.67d, %U.862) [symbolic] // CHECK:STDOUT: %const.as.ImplicitAs.impl.Convert.de3: %const.as.ImplicitAs.impl.Convert.type.dba = struct_value () [symbolic] -// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220)> [symbolic] +// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220e40.1)> [symbolic] // CHECK:STDOUT: %U.c66: %OptionalAs.type.5bd = symbolic_binding U, 1 [symbolic] -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220, %U.c66) [symbolic] +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220e40.1, %U.c66) [symbolic] // CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.f83: %U.as_type.as.ImplicitAs.impl.Convert.type.c47 = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.type.168: type = facet_type <@OptionalAs, @OptionalAs(%OptionalStorage.facet.9ab)> [concrete] -// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220e40.1) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.c36: %T.as_type.as.OptionalAs.impl.Convert.type.b2a = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.impl_witness.e49: = impl_witness imports.%OptionalAs.impl_witness_table.98f, @T.as_type.as.OptionalAs.impl(%OptionalStorage.facet.9ab) [concrete] // CHECK:STDOUT: %OptionalAs.facet: %OptionalAs.type.168 = facet_value %ptr.13b, (%OptionalAs.impl_witness.e49) [concrete] @@ -1255,36 +1095,18 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.9d7: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Optional.4b8, %ImplicitAs.facet.362) [concrete] // CHECK:STDOUT: %.8ee: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.9d7, %ImplicitAs.facet.362 [concrete] // CHECK:STDOUT: %const.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %const.as.ImplicitAs.impl.Convert.f0b, @const.as.ImplicitAs.impl.Convert(%Optional.4b8, %ImplicitAs.facet.f93) [concrete] -// CHECK:STDOUT: %pattern_type.07f: type = pattern_type %.c5e [concrete] -// CHECK:STDOUT: %self.param_patt.be1: %pattern_type.07f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b05: %pattern_type.07f = wrapper_binding_pattern self, %self.param_patt.be1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a44: type = pattern_type %MaybeUnformed.84f [concrete] -// CHECK:STDOUT: %self.param_patt.c3f: %pattern_type.a44 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7d6: %pattern_type.a44 = wrapper_binding_pattern self, %self.param_patt.c3f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b80: %pattern_type.3f6 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.335: %pattern_type.3f6 = wrapper_binding_pattern self, %self.param_patt.b80 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc11_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.004: %pattern_type.170 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.927: %pattern_type.170 = wrapper_binding_pattern self, %self.param_patt.004 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_26.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f00: %SubobjectDestroy.type = facet_value %Optional.4b8, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.629: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f00) [concrete] +// CHECK:STDOUT: %Destroy.facet.6e2: %Destroy.type = facet_value %Optional.4b8, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.629) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7e8: %SubobjectDestroy.type = facet_value %const.2f4, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b37: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7e8) [concrete] +// CHECK:STDOUT: %Destroy.facet.a52: %Destroy.type = facet_value %const.2f4, (%custom_witness.b80ef6.5, %DestroyImpl.impl_witness.b37) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1295,13 +1117,15 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %ConstNullableParamS.decl: type = class_decl @ConstNullableParamS [concrete = constants.%ConstNullableParamS] {} {} // CHECK:STDOUT: %const_nullable_foo.cpp_overload_set.value: %const_nullable_foo.cpp_overload_set.type = cpp_overload_set_value @const_nullable_foo.cpp_overload_set [concrete = constants.%const_nullable_foo.cpp_overload_set.value] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.814 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.470: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some.type (%ptr.as.OptionalStorage.impl.Some.type.b0c) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some (constants.%ptr.as.OptionalStorage.impl.Some.bf1)] // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.7b53: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b53), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %const_nullable_foo.decl: %const_nullable_foo.type = fn_decl @const_nullable_foo [concrete = constants.%const_nullable_foo] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -1321,72 +1145,13 @@ fn F() { // CHECK:STDOUT: %OptionalAs.impl_witness_table.98f = impl_witness_table (%Core.import_ref.49b), @T.as_type.as.OptionalAs.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_26.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.07f = ref_param_pattern [concrete = constants.%self.param_patt.be1] -// CHECK:STDOUT: %self.patt: %pattern_type.07f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b05] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.c5e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.c5e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_26.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.07f = ref_param_pattern [concrete = constants.%self.param_patt.be1] -// CHECK:STDOUT: %self.patt: %pattern_type.07f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b05] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.c5e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.c5e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_26.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a44 = ref_param_pattern [concrete = constants.%self.param_patt.c3f] -// CHECK:STDOUT: %self.patt: %pattern_type.a44 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7d6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.84f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.84f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11_26.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a44 = ref_param_pattern [concrete = constants.%self.param_patt.c3f] -// CHECK:STDOUT: %self.patt: %pattern_type.a44 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7d6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.84f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.84f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_26.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f6 = ref_param_pattern [concrete = constants.%self.param_patt.b80] -// CHECK:STDOUT: %self.patt: %pattern_type.3f6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.335] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.4b8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.4b8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc11_26.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f6 = ref_param_pattern [concrete = constants.%self.param_patt.b80] -// CHECK:STDOUT: %self.patt: %pattern_type.3f6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.335] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.4b8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.4b8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.170 = ref_param_pattern [concrete = constants.%self.param_patt.004] -// CHECK:STDOUT: %self.patt: %pattern_type.170 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.927] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %const.2f4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %const.2f4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.170 = ref_param_pattern [concrete = constants.%self.param_patt.004] -// CHECK:STDOUT: %self.patt: %pattern_type.170 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.927] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %const.2f4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %const.2f4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.var: ref %const.2f4 = var_storage %p.var_patt // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] // CHECK:STDOUT: %G.call: init %const.2f4 = call %G.ref() // CHECK:STDOUT: assign %p.var, %G.call -// CHECK:STDOUT: %.loc10: type = splice_block %const [concrete = constants.%const.2f4] { +// CHECK:STDOUT: %.loc10_10: type = splice_block %const [concrete = constants.%const.2f4] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %ConstNullableParamS.ref: type = name_ref ConstNullableParamS, imports.%ConstNullableParamS.decl [concrete = constants.%ConstNullableParamS] // CHECK:STDOUT: %ptr: type = ptr_type %ConstNullableParamS.ref [concrete = constants.%ptr.13b] @@ -1411,56 +1176,28 @@ fn F() { // CHECK:STDOUT: %.loc11_26.4: ref %Optional.4b8 = temporary %.loc11_26.3, %.loc11_26.2 // CHECK:STDOUT: %.loc11_26.5: %Optional.4b8 = acquire_value %.loc11_26.4 // CHECK:STDOUT: %const_nullable_foo.call: init %empty_tuple.type = call imports.%const_nullable_foo.decl(%.loc11_26.5) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %.loc11_26.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%.loc11_26.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %p.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%p.var) +// CHECK:STDOUT: %Destroy.facet.loc11_26.1: %Destroy.type = facet_value constants.%Optional.4b8, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.629) [concrete = constants.%Destroy.facet.6e2] +// CHECK:STDOUT: %.loc11_26.6: %Destroy.type = converted constants.%Optional.4b8, %Destroy.facet.loc11_26.1 [concrete = constants.%Destroy.facet.6e2] +// CHECK:STDOUT: %Destroy.facet.loc11_26.2: %Destroy.type = facet_value constants.%Optional.4b8, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.629) [concrete = constants.%Destroy.facet.6e2] +// CHECK:STDOUT: %.loc11_26.7: %Destroy.type = converted constants.%Optional.4b8, %Destroy.facet.loc11_26.2 [concrete = constants.%Destroy.facet.6e2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc11_26.4) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%const.2f4, (constants.%custom_witness.b80ef6.5, constants.%DestroyImpl.impl_witness.b37) [concrete = constants.%Destroy.facet.a52] +// CHECK:STDOUT: %.loc10_3.1: %Destroy.type = converted constants.%const.2f4, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.a52] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%const.2f4, (constants.%custom_witness.b80ef6.5, constants.%DestroyImpl.impl_witness.b37) [concrete = constants.%Destroy.facet.a52] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%const.2f4, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.a52] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%p.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.1(%self.param: ref %.c5e) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_26.1(%self.param: ref %.c5e) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_26.1(%self.param: ref %.c5e) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_26.2(%self.param: ref %MaybeUnformed.97c) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_26.1(%self.param: ref %.c5e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_26.3(%self.param: ref %Optional.4b8) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.2(%self.param: ref %MaybeUnformed.84f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_26.2(%self.param: ref %MaybeUnformed.84f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_26.2(%self.param: ref %MaybeUnformed.84f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.3(%self.param: ref %Optional.4b8) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_26.3(%self.param: ref %Optional.4b8) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_26.3(%self.param: ref %Optional.4b8) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %const.2f4) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %const.2f4) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %const.2f4) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10(%self.param: ref %const.2f4) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_const_nullable_pointer_param_using_non_const.carbon // CHECK:STDOUT: @@ -1477,38 +1214,40 @@ fn F() { // CHECK:STDOUT: %const_nullable_foo.cpp_overload_set.type: type = cpp_overload_set_type @const_nullable_foo.cpp_overload_set [concrete] // CHECK:STDOUT: %const_nullable_foo.cpp_overload_set.value: %const_nullable_foo.cpp_overload_set.type = cpp_overload_set_value @const_nullable_foo.cpp_overload_set [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.type.b0c: type = fn_type @ptr.as.OptionalStorage.impl.Some, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.bf1: %ptr.as.OptionalStorage.impl.Some.type.b0c = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.1a9: %Destroy.type = facet_value %ptr.13b, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.84f: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.1a9) [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f99: %SubobjectDestroy.type = facet_value %ptr.13b, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c03: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f99) [concrete] +// CHECK:STDOUT: %Destroy.facet.0a4: %Destroy.type = facet_value %ptr.13b, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.c03) [concrete] +// CHECK:STDOUT: %MaybeUnformed.97c: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.0a4) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.361: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%ConstNullableParamS) [concrete] // CHECK:STDOUT: %.c5e: type = maybe_unformed_type %ptr.13b [concrete] // CHECK:STDOUT: %OptionalStorage.facet.9ab: %OptionalStorage.type = facet_value %ptr.13b, (%OptionalStorage.impl_witness.361) [concrete] // CHECK:STDOUT: %Optional.4b8: type = class_type @Optional, @Optional(%OptionalStorage.facet.9ab) [concrete] -// CHECK:STDOUT: %pattern_type.3f6: type = pattern_type %Optional.4b8 [concrete] // CHECK:STDOUT: %const_nullable_foo.type: type = fn_type @const_nullable_foo [concrete] // CHECK:STDOUT: %const_nullable_foo: %const_nullable_foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.19b: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.4b8)> [concrete] -// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220)> [symbolic] +// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220e40.1)> [symbolic] // CHECK:STDOUT: %U.c66: %OptionalAs.type.5bd = symbolic_binding U, 1 [symbolic] -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220, %U.c66) [symbolic] +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220e40.1, %U.c66) [symbolic] // CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.f83: %U.as_type.as.ImplicitAs.impl.Convert.type.c47 = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.type.168: type = facet_type <@OptionalAs, @OptionalAs(%OptionalStorage.facet.9ab)> [concrete] -// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220e40.1) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.c36: %T.as_type.as.OptionalAs.impl.Convert.type.b2a = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.impl_witness.e49: = impl_witness imports.%OptionalAs.impl_witness_table.98f, @T.as_type.as.OptionalAs.impl(%OptionalStorage.facet.9ab) [concrete] // CHECK:STDOUT: %OptionalAs.facet: %OptionalAs.type.168 = facet_value %ptr.13b, (%OptionalAs.impl_witness.e49) [concrete] @@ -1519,28 +1258,12 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a91: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Optional.4b8, %ImplicitAs.facet.f93) [concrete] // CHECK:STDOUT: %.56e: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a91, %ImplicitAs.facet.f93 [concrete] // CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %U.as_type.as.ImplicitAs.impl.Convert.311, @U.as_type.as.ImplicitAs.impl.Convert.2(%OptionalStorage.facet.9ab, %OptionalAs.facet) [concrete] -// CHECK:STDOUT: %pattern_type.07f: type = pattern_type %.c5e [concrete] -// CHECK:STDOUT: %self.param_patt.be1: %pattern_type.07f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b05: %pattern_type.07f = wrapper_binding_pattern self, %self.param_patt.be1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a44: type = pattern_type %MaybeUnformed.84f [concrete] -// CHECK:STDOUT: %self.param_patt.c3f: %pattern_type.a44 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7d6: %pattern_type.a44 = wrapper_binding_pattern self, %self.param_patt.c3f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b80: %pattern_type.3f6 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.335: %pattern_type.3f6 = wrapper_binding_pattern self, %self.param_patt.b80 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc11_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_26.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f00: %SubobjectDestroy.type = facet_value %Optional.4b8, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.629: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f00) [concrete] +// CHECK:STDOUT: %Destroy.facet.6e2: %Destroy.type = facet_value %Optional.4b8, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.629) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1551,13 +1274,15 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %ConstNullableParamS.decl: type = class_decl @ConstNullableParamS [concrete = constants.%ConstNullableParamS] {} {} // CHECK:STDOUT: %const_nullable_foo.cpp_overload_set.value: %const_nullable_foo.cpp_overload_set.type = cpp_overload_set_value @const_nullable_foo.cpp_overload_set [concrete = constants.%const_nullable_foo.cpp_overload_set.value] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.814 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.470: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some.type (%ptr.as.OptionalStorage.impl.Some.type.b0c) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some (constants.%ptr.as.OptionalStorage.impl.Some.bf1)] // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.7b53: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b53), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %const_nullable_foo.decl: %const_nullable_foo.type = fn_decl @const_nullable_foo [concrete = constants.%const_nullable_foo] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -1575,58 +1300,13 @@ fn F() { // CHECK:STDOUT: %OptionalAs.impl_witness_table.98f = impl_witness_table (%Core.import_ref.49b), @T.as_type.as.OptionalAs.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_26.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.07f = ref_param_pattern [concrete = constants.%self.param_patt.be1] -// CHECK:STDOUT: %self.patt: %pattern_type.07f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b05] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.c5e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.c5e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_26.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.07f = ref_param_pattern [concrete = constants.%self.param_patt.be1] -// CHECK:STDOUT: %self.patt: %pattern_type.07f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b05] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.c5e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.c5e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_26.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a44 = ref_param_pattern [concrete = constants.%self.param_patt.c3f] -// CHECK:STDOUT: %self.patt: %pattern_type.a44 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7d6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.84f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.84f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11_26.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a44 = ref_param_pattern [concrete = constants.%self.param_patt.c3f] -// CHECK:STDOUT: %self.patt: %pattern_type.a44 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7d6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.84f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.84f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_26.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f6 = ref_param_pattern [concrete = constants.%self.param_patt.b80] -// CHECK:STDOUT: %self.patt: %pattern_type.3f6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.335] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.4b8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.4b8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc11_26.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f6 = ref_param_pattern [concrete = constants.%self.param_patt.b80] -// CHECK:STDOUT: %self.patt: %pattern_type.3f6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.335] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.4b8 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.4b8 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.var: ref %ptr.13b = var_storage %p.var_patt // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] // CHECK:STDOUT: %G.call: init %ptr.13b = call %G.ref() // CHECK:STDOUT: assign %p.var, %G.call -// CHECK:STDOUT: %.loc10: type = splice_block %ptr [concrete = constants.%ptr.13b] { +// CHECK:STDOUT: %.loc10_33: type = splice_block %ptr [concrete = constants.%ptr.13b] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %ConstNullableParamS.ref: type = name_ref ConstNullableParamS, imports.%ConstNullableParamS.decl [concrete = constants.%ConstNullableParamS] // CHECK:STDOUT: %ptr: type = ptr_type %ConstNullableParamS.ref [concrete = constants.%ptr.13b] @@ -1650,45 +1330,26 @@ fn F() { // CHECK:STDOUT: %.loc11_26.4: ref %Optional.4b8 = temporary %.loc11_26.3, %.loc11_26.2 // CHECK:STDOUT: %.loc11_26.5: %Optional.4b8 = acquire_value %.loc11_26.4 // CHECK:STDOUT: %const_nullable_foo.call: init %empty_tuple.type = call imports.%const_nullable_foo.decl(%.loc11_26.5) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %.loc11_26.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%.loc11_26.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %p.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%p.var) +// CHECK:STDOUT: %Destroy.facet.loc11_26.1: %Destroy.type = facet_value constants.%Optional.4b8, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.629) [concrete = constants.%Destroy.facet.6e2] +// CHECK:STDOUT: %.loc11_26.6: %Destroy.type = converted constants.%Optional.4b8, %Destroy.facet.loc11_26.1 [concrete = constants.%Destroy.facet.6e2] +// CHECK:STDOUT: %Destroy.facet.loc11_26.2: %Destroy.type = facet_value constants.%Optional.4b8, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.629) [concrete = constants.%Destroy.facet.6e2] +// CHECK:STDOUT: %.loc11_26.7: %Destroy.type = converted constants.%Optional.4b8, %Destroy.facet.loc11_26.2 [concrete = constants.%Destroy.facet.6e2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc11_26.4) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%ptr.13b, (constants.%custom_witness.b80ef6.1, constants.%DestroyImpl.impl_witness.c03) [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: %.loc10_3.1: %Destroy.type = converted constants.%ptr.13b, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%ptr.13b, (constants.%custom_witness.b80ef6.1, constants.%DestroyImpl.impl_witness.c03) [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%ptr.13b, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%p.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.1(%self.param: ref %.c5e) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_26.1(%self.param: ref %.c5e) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_26.1(%self.param: ref %.c5e) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_26.2(%self.param: ref %MaybeUnformed.97c) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_26.1(%self.param: ref %.c5e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.2(%self.param: ref %MaybeUnformed.84f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_26.2(%self.param: ref %MaybeUnformed.84f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_26.2(%self.param: ref %MaybeUnformed.84f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_26.3(%self.param: ref %Optional.4b8) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_26.3(%self.param: ref %Optional.4b8) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_26.3(%self.param: ref %Optional.4b8) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_26.3(%self.param: ref %Optional.4b8) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_non_nullable_pointer_return.carbon // CHECK:STDOUT: @@ -1843,38 +1504,40 @@ fn F() { // CHECK:STDOUT: %nullable_param_foo.cpp_overload_set.value: %nullable_param_foo.cpp_overload_set.type = cpp_overload_set_value @nullable_param_foo.cpp_overload_set [concrete] // CHECK:STDOUT: %ptr.1f0: type = ptr_type %NullableParamS [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.type.b0c: type = fn_type @ptr.as.OptionalStorage.impl.Some, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.bf1: %ptr.as.OptionalStorage.impl.Some.type.b0c = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.78f: %Destroy.type = facet_value %ptr.1f0, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.c25: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.78f) [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a1d: %SubobjectDestroy.type = facet_value %ptr.1f0, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.82b: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a1d) [concrete] +// CHECK:STDOUT: %Destroy.facet.6e0: %Destroy.type = facet_value %ptr.1f0, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.82b) [concrete] +// CHECK:STDOUT: %MaybeUnformed.b5a: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.6e0) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.b77: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%NullableParamS) [concrete] // CHECK:STDOUT: %.280: type = maybe_unformed_type %ptr.1f0 [concrete] // CHECK:STDOUT: %OptionalStorage.facet.9ba: %OptionalStorage.type = facet_value %ptr.1f0, (%OptionalStorage.impl_witness.b77) [concrete] // CHECK:STDOUT: %Optional.37f: type = class_type @Optional, @Optional(%OptionalStorage.facet.9ba) [concrete] -// CHECK:STDOUT: %pattern_type.958: type = pattern_type %Optional.37f [concrete] // CHECK:STDOUT: %nullable_param_foo.type: type = fn_type @nullable_param_foo [concrete] // CHECK:STDOUT: %nullable_param_foo: %nullable_param_foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.7b3: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.37f)> [concrete] -// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220)> [symbolic] +// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220e40.1)> [symbolic] // CHECK:STDOUT: %U.c66: %OptionalAs.type.5bd = symbolic_binding U, 1 [symbolic] -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220, %U.c66) [symbolic] +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220e40.1, %U.c66) [symbolic] // CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.f83: %U.as_type.as.ImplicitAs.impl.Convert.type.c47 = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.type.300: type = facet_type <@OptionalAs, @OptionalAs(%OptionalStorage.facet.9ba)> [concrete] -// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220e40.1) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.c36: %T.as_type.as.OptionalAs.impl.Convert.type.b2a = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.impl_witness.0b4: = impl_witness imports.%OptionalAs.impl_witness_table.98f, @T.as_type.as.OptionalAs.impl(%OptionalStorage.facet.9ba) [concrete] // CHECK:STDOUT: %OptionalAs.facet: %OptionalAs.type.300 = facet_value %ptr.1f0, (%OptionalAs.impl_witness.0b4) [concrete] @@ -1885,36 +1548,18 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a1f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Optional.37f, %ImplicitAs.facet.162) [concrete] // CHECK:STDOUT: %.94f: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a1f, %ImplicitAs.facet.162 [concrete] // CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %U.as_type.as.ImplicitAs.impl.Convert.d9f, @U.as_type.as.ImplicitAs.impl.Convert.2(%OptionalStorage.facet.9ba, %OptionalAs.facet) [concrete] -// CHECK:STDOUT: %pattern_type.1cc: type = pattern_type %.280 [concrete] -// CHECK:STDOUT: %self.param_patt.01a: %pattern_type.1cc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.44d: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt.01a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.0ba: type = pattern_type %MaybeUnformed.c25 [concrete] -// CHECK:STDOUT: %self.param_patt.882: %pattern_type.0ba = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.74c: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt.882 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.d6c: %pattern_type.958 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9ae: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt.d6c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc9_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.f51: %pattern_type.c3f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.bc4: %pattern_type.c3f = wrapper_binding_pattern self, %self.param_patt.f51 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_26.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6c5: %SubobjectDestroy.type = facet_value %Optional.37f, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.22a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6c5) [concrete] +// CHECK:STDOUT: %Destroy.facet.9ec: %Destroy.type = facet_value %Optional.37f, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.22a) [concrete] // CHECK:STDOUT: %NullableParamS.cpp_destructor.type: type = fn_type @NullableParamS.cpp_destructor [concrete] // CHECK:STDOUT: %NullableParamS.cpp_destructor: %NullableParamS.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%NullableParamS.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.4f7: %SubobjectDestroy.type = facet_value %NullableParamS, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.536: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.4f7) [concrete] +// CHECK:STDOUT: %Destroy.facet.1ca: %Destroy.type = facet_value %NullableParamS, (%custom_witness.fe1, %DestroyImpl.impl_witness.536) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1925,13 +1570,15 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %NullableParamS.decl: type = class_decl @NullableParamS [concrete = constants.%NullableParamS] {} {} // CHECK:STDOUT: %nullable_param_foo.cpp_overload_set.value: %nullable_param_foo.cpp_overload_set.type = cpp_overload_set_value @nullable_param_foo.cpp_overload_set [concrete = constants.%nullable_param_foo.cpp_overload_set.value] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.814 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.470: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some.type (%ptr.as.OptionalStorage.impl.Some.type.b0c) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some (constants.%ptr.as.OptionalStorage.impl.Some.bf1)] // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.7b53: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b53), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %nullable_param_foo.decl: %nullable_param_foo.type = fn_decl @nullable_param_foo [concrete = constants.%nullable_param_foo] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -1947,63 +1594,6 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.653 = impl_witness_table (%Core.import_ref.098), @U.as_type.as.ImplicitAs.impl.0c0 [concrete] // CHECK:STDOUT: %Core.import_ref.49b: @T.as_type.as.OptionalAs.impl.%T.as_type.as.OptionalAs.impl.Convert.type (%T.as_type.as.OptionalAs.impl.Convert.type.b2a) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalAs.impl.%T.as_type.as.OptionalAs.impl.Convert (constants.%T.as_type.as.OptionalAs.impl.Convert.c36)] // CHECK:STDOUT: %OptionalAs.impl_witness_table.98f = impl_witness_table (%Core.import_ref.49b), @T.as_type.as.OptionalAs.impl [concrete] -// CHECK:STDOUT: %NullableParamS.cpp_destructor.decl: %NullableParamS.cpp_destructor.type = fn_decl @NullableParamS.cpp_destructor [concrete = constants.%NullableParamS.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_26.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1cc = ref_param_pattern [concrete = constants.%self.param_patt.01a] -// CHECK:STDOUT: %self.patt: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.44d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.280 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.280 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_26.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1cc = ref_param_pattern [concrete = constants.%self.param_patt.01a] -// CHECK:STDOUT: %self.patt: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.44d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.280 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.280 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_26.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ba = ref_param_pattern [concrete = constants.%self.param_patt.882] -// CHECK:STDOUT: %self.patt: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.74c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.c25 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.c25 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_26.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ba = ref_param_pattern [concrete = constants.%self.param_patt.882] -// CHECK:STDOUT: %self.patt: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.74c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.c25 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.c25 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_26.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.958 = ref_param_pattern [concrete = constants.%self.param_patt.d6c] -// CHECK:STDOUT: %self.patt: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9ae] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.37f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.37f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc9_26.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.958 = ref_param_pattern [concrete = constants.%self.param_patt.d6c] -// CHECK:STDOUT: %self.patt: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9ae] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.37f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.37f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c3f = ref_param_pattern [concrete = constants.%self.param_patt.f51] -// CHECK:STDOUT: %self.patt: %pattern_type.c3f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bc4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %NullableParamS = ref_param call_param0 -// CHECK:STDOUT: %self: ref %NullableParamS = wrapper_binding self, %self.param -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2011,8 +1601,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %NullableParamS = var_storage %s.var_patt // CHECK:STDOUT: %.loc8_32.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_32.2: init %NullableParamS to %s.var = class_init () [concrete = constants.%NullableParamS.val] -// CHECK:STDOUT: %.loc8_3: init %NullableParamS = converted %.loc8_32.1, %.loc8_32.2 [concrete = constants.%NullableParamS.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %NullableParamS = converted %.loc8_32.1, %.loc8_32.2 [concrete = constants.%NullableParamS.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %NullableParamS.ref [concrete = constants.%NullableParamS] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %NullableParamS.ref: type = name_ref NullableParamS, imports.%NullableParamS.decl [concrete = constants.%NullableParamS] @@ -2036,54 +1626,26 @@ fn F() { // CHECK:STDOUT: %.loc9_26.3: ref %Optional.37f = temporary %.loc9_26.2, %.loc9_26.1 // CHECK:STDOUT: %.loc9_26.4: %Optional.37f = acquire_value %.loc9_26.3 // CHECK:STDOUT: %nullable_param_foo.call: init %empty_tuple.type = call imports.%nullable_param_foo.decl(%.loc9_26.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_26.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_26.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc9_26.1: %Destroy.type = facet_value constants.%Optional.37f, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.22a) [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %.loc9_26.5: %Destroy.type = converted constants.%Optional.37f, %Destroy.facet.loc9_26.1 [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %Destroy.facet.loc9_26.2: %Destroy.type = facet_value constants.%Optional.37f, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.22a) [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %.loc9_26.6: %Destroy.type = converted constants.%Optional.37f, %Destroy.facet.loc9_26.2 [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_26.3) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%NullableParamS, (constants.%custom_witness.fe1, constants.%DestroyImpl.impl_witness.536) [concrete = constants.%Destroy.facet.1ca] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%NullableParamS, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.1ca] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%NullableParamS, (constants.%custom_witness.fe1, constants.%DestroyImpl.impl_witness.536) [concrete = constants.%Destroy.facet.1ca] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%NullableParamS, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.1ca] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%s.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_26.1(%self.param: ref %.280) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_26.1(%self.param: ref %.280) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_26.1(%self.param: ref %.280) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_26.2(%self.param: ref %MaybeUnformed.b5a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_26.1(%self.param: ref %.280) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_26.2(%self.param: ref %MaybeUnformed.c25) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_26.2(%self.param: ref %MaybeUnformed.c25) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_26.2(%self.param: ref %MaybeUnformed.c25) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_26.3(%self.param: ref %Optional.37f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_26.3(%self.param: ref %Optional.37f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_26.3(%self.param: ref %Optional.37f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %NullableParamS) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %NullableParamS) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %NullableParamS.cpp_destructor.call: init %empty_tuple.type = call imports.%NullableParamS.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_26.3(%self.param: ref %Optional.37f) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- null_pointer_arg_to_pointer_param.carbon // CHECK:STDOUT: @@ -2099,62 +1661,50 @@ fn F() { // CHECK:STDOUT: %Optional.None.type.626: type = fn_type @Optional.None, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.None.3ad: %Optional.None.type.626 = struct_value () [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.None.type.629: type = fn_type @ptr.as.OptionalStorage.impl.None, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.None.f84: %ptr.as.OptionalStorage.impl.None.type.629 = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %NullableParamS: type = class_type @NullableParamS [concrete] // CHECK:STDOUT: %ptr.1f0: type = ptr_type %NullableParamS [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.78f: %Destroy.type = facet_value %ptr.1f0, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.c25: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.78f) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a1d: %SubobjectDestroy.type = facet_value %ptr.1f0, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.82b: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a1d) [concrete] +// CHECK:STDOUT: %Destroy.facet.6e0: %Destroy.type = facet_value %ptr.1f0, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.82b) [concrete] +// CHECK:STDOUT: %MaybeUnformed.b5a: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.6e0) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.b77: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%NullableParamS) [concrete] // CHECK:STDOUT: %.280: type = maybe_unformed_type %ptr.1f0 [concrete] // CHECK:STDOUT: %OptionalStorage.facet: %OptionalStorage.type = facet_value %ptr.1f0, (%OptionalStorage.impl_witness.b77) [concrete] // CHECK:STDOUT: %Optional.37f: type = class_type @Optional, @Optional(%OptionalStorage.facet) [concrete] // CHECK:STDOUT: %Optional.None.type.2bc: type = fn_type @Optional.None, @Optional(%OptionalStorage.facet) [concrete] // CHECK:STDOUT: %Optional.None.7f6: %Optional.None.type.2bc = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.958: type = pattern_type %Optional.37f [concrete] // CHECK:STDOUT: %Optional.None.specific_fn: = specific_function %Optional.None.7f6, @Optional.None(%OptionalStorage.facet) [concrete] // CHECK:STDOUT: %nullable_param_foo.type: type = fn_type @nullable_param_foo [concrete] // CHECK:STDOUT: %nullable_param_foo: %nullable_param_foo.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.1cc: type = pattern_type %.280 [concrete] -// CHECK:STDOUT: %self.param_patt.01a: %pattern_type.1cc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.44d: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt.01a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_66.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_66.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.0ba: type = pattern_type %MaybeUnformed.c25 [concrete] -// CHECK:STDOUT: %self.param_patt.882: %pattern_type.0ba = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.74c: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt.882 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_66.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc8_66.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.d6c: %pattern_type.958 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9ae: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt.d6c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_66.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc8_66.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_66.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_66.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6c5: %SubobjectDestroy.type = facet_value %Optional.37f, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.22a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6c5) [concrete] +// CHECK:STDOUT: %Destroy.facet.9ec: %Destroy.type = facet_value %Optional.37f, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.22a) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Optional = %Core.Optional -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2165,13 +1715,15 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %nullable_param_foo.cpp_overload_set.value: %nullable_param_foo.cpp_overload_set.type = cpp_overload_set_value @nullable_param_foo.cpp_overload_set [concrete = constants.%nullable_param_foo.cpp_overload_set.value] // CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.9ff: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.None.type (%ptr.as.OptionalStorage.impl.None.type.629) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.None (constants.%ptr.as.OptionalStorage.impl.None.f84)] // CHECK:STDOUT: %Core.import_ref.a1a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.9ff, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.9ff, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.d6d: @Optional.%Optional.None.type (%Optional.None.type.626) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.3ad)] // CHECK:STDOUT: %NullableParamS.decl: type = class_decl @NullableParamS [concrete = constants.%NullableParamS] {} {} // CHECK:STDOUT: %nullable_param_foo.decl: %nullable_param_foo.type = fn_decl @nullable_param_foo [concrete = constants.%nullable_param_foo] { @@ -2185,52 +1737,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_66.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1cc = ref_param_pattern [concrete = constants.%self.param_patt.01a] -// CHECK:STDOUT: %self.patt: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.44d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.280 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.280 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_66.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1cc = ref_param_pattern [concrete = constants.%self.param_patt.01a] -// CHECK:STDOUT: %self.patt: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.44d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.280 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.280 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_66.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ba = ref_param_pattern [concrete = constants.%self.param_patt.882] -// CHECK:STDOUT: %self.patt: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.74c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.c25 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.c25 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc8_66.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ba = ref_param_pattern [concrete = constants.%self.param_patt.882] -// CHECK:STDOUT: %self.patt: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.74c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.c25 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.c25 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_66.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.958 = ref_param_pattern [concrete = constants.%self.param_patt.d6c] -// CHECK:STDOUT: %self.patt: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9ae] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.37f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.37f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc8_66.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.958 = ref_param_pattern [concrete = constants.%self.param_patt.d6c] -// CHECK:STDOUT: %self.patt: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9ae] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.37f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.37f = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2253,43 +1760,20 @@ fn F() { // CHECK:STDOUT: %.loc8_66.2: ref %Optional.37f = temporary %.loc8_66.1, %Optional.None.call // CHECK:STDOUT: %.loc8_66.3: %Optional.37f = acquire_value %.loc8_66.2 // CHECK:STDOUT: %nullable_param_foo.call: init %empty_tuple.type = call imports.%nullable_param_foo.decl(%.loc8_66.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_66.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_66.2) +// CHECK:STDOUT: %Destroy.facet.loc8_66.1: %Destroy.type = facet_value constants.%Optional.37f, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.22a) [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %.loc8_66.4: %Destroy.type = converted constants.%Optional.37f, %Destroy.facet.loc8_66.1 [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %Destroy.facet.loc8_66.2: %Destroy.type = facet_value constants.%Optional.37f, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.22a) [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %.loc8_66.5: %Destroy.type = converted constants.%Optional.37f, %Destroy.facet.loc8_66.2 [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_66.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_66.1(%self.param: ref %.280) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_66.1(%self.param: ref %.280) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_66.1(%self.param: ref %.280) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_66.2(%self.param: ref %MaybeUnformed.b5a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_66.1(%self.param: ref %.280) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_66.2(%self.param: ref %MaybeUnformed.c25) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_66.2(%self.param: ref %MaybeUnformed.c25) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_66.2(%self.param: ref %MaybeUnformed.c25) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_66.3(%self.param: ref %Optional.37f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_66.3(%self.param: ref %Optional.37f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_66.3(%self.param: ref %Optional.37f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_66.3(%self.param: ref %Optional.37f) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- nonnull_pointer_arg_to_pointer_param.carbon // CHECK:STDOUT: @@ -2312,69 +1796,55 @@ fn F() { // CHECK:STDOUT: %Optional.Some.type.63b: type = fn_type @Optional.Some, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.Some.792: %Optional.Some.type.63b = struct_value () [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.type.b0c: type = fn_type @ptr.as.OptionalStorage.impl.Some, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.bf1: %ptr.as.OptionalStorage.impl.Some.type.b0c = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.1f0: type = ptr_type %NullableParamS [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.78f: %Destroy.type = facet_value %ptr.1f0, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.c25: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.78f) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a1d: %SubobjectDestroy.type = facet_value %ptr.1f0, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.82b: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a1d) [concrete] +// CHECK:STDOUT: %Destroy.facet.6e0: %Destroy.type = facet_value %ptr.1f0, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.82b) [concrete] +// CHECK:STDOUT: %MaybeUnformed.b5a: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.6e0) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.b77: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%NullableParamS) [concrete] // CHECK:STDOUT: %.280: type = maybe_unformed_type %ptr.1f0 [concrete] // CHECK:STDOUT: %OptionalStorage.facet: %OptionalStorage.type = facet_value %ptr.1f0, (%OptionalStorage.impl_witness.b77) [concrete] // CHECK:STDOUT: %Optional.37f: type = class_type @Optional, @Optional(%OptionalStorage.facet) [concrete] // CHECK:STDOUT: %Optional.Some.type.683: type = fn_type @Optional.Some, @Optional(%OptionalStorage.facet) [concrete] // CHECK:STDOUT: %Optional.Some.fff: %Optional.Some.type.683 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.958: type = pattern_type %Optional.37f [concrete] // CHECK:STDOUT: %Optional.Some.specific_fn: = specific_function %Optional.Some.fff, @Optional.Some(%OptionalStorage.facet) [concrete] // CHECK:STDOUT: %nullable_param_foo.type: type = fn_type @nullable_param_foo [concrete] // CHECK:STDOUT: %nullable_param_foo: %nullable_param_foo.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.1cc: type = pattern_type %.280 [concrete] -// CHECK:STDOUT: %self.param_patt.01a: %pattern_type.1cc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.44d: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt.01a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_68.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_68.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.0ba: type = pattern_type %MaybeUnformed.c25 [concrete] -// CHECK:STDOUT: %self.param_patt.882: %pattern_type.0ba = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.74c: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt.882 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_68.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc9_68.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.d6c: %pattern_type.958 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9ae: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt.d6c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_68.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc9_68.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_68.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.f51: %pattern_type.c3f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.bc4: %pattern_type.c3f = wrapper_binding_pattern self, %self.param_patt.f51 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_68.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6c5: %SubobjectDestroy.type = facet_value %Optional.37f, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.22a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6c5) [concrete] +// CHECK:STDOUT: %Destroy.facet.9ec: %Destroy.type = facet_value %Optional.37f, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.22a) [concrete] // CHECK:STDOUT: %NullableParamS.cpp_destructor.type: type = fn_type @NullableParamS.cpp_destructor [concrete] // CHECK:STDOUT: %NullableParamS.cpp_destructor: %NullableParamS.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%NullableParamS.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.4f7: %SubobjectDestroy.type = facet_value %NullableParamS, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.536: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.4f7) [concrete] +// CHECK:STDOUT: %Destroy.facet.1ca: %Destroy.type = facet_value %NullableParamS, (%custom_witness.fe1, %DestroyImpl.impl_witness.536) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Optional = %Core.Optional -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2386,13 +1856,15 @@ fn F() { // CHECK:STDOUT: %NullableParamS.decl: type = class_decl @NullableParamS [concrete = constants.%NullableParamS] {} {} // CHECK:STDOUT: %nullable_param_foo.cpp_overload_set.value: %nullable_param_foo.cpp_overload_set.type = cpp_overload_set_value @nullable_param_foo.cpp_overload_set [concrete = constants.%nullable_param_foo.cpp_overload_set.value] // CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.814 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.470: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some.type (%ptr.as.OptionalStorage.impl.Some.type.b0c) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some (constants.%ptr.as.OptionalStorage.impl.Some.bf1)] // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.9b4: @Optional.%Optional.Some.type (%Optional.Some.type.63b) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.792)] // CHECK:STDOUT: %nullable_param_foo.decl: %nullable_param_foo.type = fn_decl @nullable_param_foo [concrete = constants.%nullable_param_foo] { // CHECK:STDOUT: @@ -2405,64 +1877,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %NullableParamS.cpp_destructor.decl: %NullableParamS.cpp_destructor.type = fn_decl @NullableParamS.cpp_destructor [concrete = constants.%NullableParamS.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_68.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1cc = ref_param_pattern [concrete = constants.%self.param_patt.01a] -// CHECK:STDOUT: %self.patt: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.44d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.280 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.280 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_68.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1cc = ref_param_pattern [concrete = constants.%self.param_patt.01a] -// CHECK:STDOUT: %self.patt: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.44d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.280 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.280 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_68.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ba = ref_param_pattern [concrete = constants.%self.param_patt.882] -// CHECK:STDOUT: %self.patt: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.74c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.c25 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.c25 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc9_68.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ba = ref_param_pattern [concrete = constants.%self.param_patt.882] -// CHECK:STDOUT: %self.patt: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.74c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.c25 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.c25 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_68.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.958 = ref_param_pattern [concrete = constants.%self.param_patt.d6c] -// CHECK:STDOUT: %self.patt: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9ae] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.37f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.37f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc9_68.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.958 = ref_param_pattern [concrete = constants.%self.param_patt.d6c] -// CHECK:STDOUT: %self.patt: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9ae] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.37f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.37f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c3f = ref_param_pattern [concrete = constants.%self.param_patt.f51] -// CHECK:STDOUT: %self.patt: %pattern_type.c3f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bc4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %NullableParamS = ref_param call_param0 -// CHECK:STDOUT: %self: ref %NullableParamS = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2470,8 +1885,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %NullableParamS = var_storage %s.var_patt // CHECK:STDOUT: %.loc8_32.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_32.2: init %NullableParamS to %s.var = class_init () [concrete = constants.%NullableParamS.val] -// CHECK:STDOUT: %.loc8_3: init %NullableParamS = converted %.loc8_32.1, %.loc8_32.2 [concrete = constants.%NullableParamS.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %NullableParamS = converted %.loc8_32.1, %.loc8_32.2 [concrete = constants.%NullableParamS.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %NullableParamS.ref.loc8 [concrete = constants.%NullableParamS] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %NullableParamS.ref.loc8: type = name_ref NullableParamS, imports.%NullableParamS.decl [concrete = constants.%NullableParamS] @@ -2505,54 +1920,26 @@ fn F() { // CHECK:STDOUT: %.loc9_68.4: ref %Optional.37f = temporary %.loc9_68.3, %Optional.Some.call // CHECK:STDOUT: %.loc9_68.5: %Optional.37f = acquire_value %.loc9_68.4 // CHECK:STDOUT: %nullable_param_foo.call: init %empty_tuple.type = call imports.%nullable_param_foo.decl(%.loc9_68.5) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_68.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_68.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc9_68.1: %Destroy.type = facet_value constants.%Optional.37f, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.22a) [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %.loc9_68.6: %Destroy.type = converted constants.%Optional.37f, %Destroy.facet.loc9_68.1 [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %Destroy.facet.loc9_68.2: %Destroy.type = facet_value constants.%Optional.37f, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.22a) [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %.loc9_68.7: %Destroy.type = converted constants.%Optional.37f, %Destroy.facet.loc9_68.2 [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_68.4) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%NullableParamS, (constants.%custom_witness.fe1, constants.%DestroyImpl.impl_witness.536) [concrete = constants.%Destroy.facet.1ca] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%NullableParamS, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.1ca] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%NullableParamS, (constants.%custom_witness.fe1, constants.%DestroyImpl.impl_witness.536) [concrete = constants.%Destroy.facet.1ca] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%NullableParamS, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.1ca] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%s.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_68.1(%self.param: ref %.280) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_68.1(%self.param: ref %.280) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_68.1(%self.param: ref %.280) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_68.2(%self.param: ref %MaybeUnformed.b5a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_68.1(%self.param: ref %.280) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_68.2(%self.param: ref %MaybeUnformed.c25) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_68.2(%self.param: ref %MaybeUnformed.c25) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_68.2(%self.param: ref %MaybeUnformed.c25) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_68.3(%self.param: ref %Optional.37f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_68.3(%self.param: ref %Optional.37f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_68.3(%self.param: ref %Optional.37f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %NullableParamS) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %NullableParamS) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %NullableParamS.cpp_destructor.call: init %empty_tuple.type = call imports.%NullableParamS.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_68.3(%self.param: ref %Optional.37f) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- forward_nullable_pointer.carbon // CHECK:STDOUT: @@ -2567,51 +1954,37 @@ fn F() { // CHECK:STDOUT: %ptr.1f0: type = ptr_type %NullableParamS [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.78f: %Destroy.type = facet_value %ptr.1f0, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.c25: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.78f) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a1d: %SubobjectDestroy.type = facet_value %ptr.1f0, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.82b: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a1d) [concrete] +// CHECK:STDOUT: %Destroy.facet.6e0: %Destroy.type = facet_value %ptr.1f0, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.82b) [concrete] +// CHECK:STDOUT: %MaybeUnformed.b5a: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.6e0) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.b77: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%NullableParamS) [concrete] // CHECK:STDOUT: %.280: type = maybe_unformed_type %ptr.1f0 [concrete] // CHECK:STDOUT: %OptionalStorage.facet: %OptionalStorage.type = facet_value %ptr.1f0, (%OptionalStorage.impl_witness.b77) [concrete] // CHECK:STDOUT: %Optional.37f: type = class_type @Optional, @Optional(%OptionalStorage.facet) [concrete] -// CHECK:STDOUT: %pattern_type.958: type = pattern_type %Optional.37f [concrete] // CHECK:STDOUT: %nullable_param_get.type: type = fn_type @nullable_param_get [concrete] // CHECK:STDOUT: %nullable_param_get: %nullable_param_get.type = struct_value () [concrete] // CHECK:STDOUT: %nullable_param_foo.type: type = fn_type @nullable_param_foo [concrete] // CHECK:STDOUT: %nullable_param_foo: %nullable_param_foo.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.1cc: type = pattern_type %.280 [concrete] -// CHECK:STDOUT: %self.param_patt.01a: %pattern_type.1cc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.44d: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt.01a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_49.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_49.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.0ba: type = pattern_type %MaybeUnformed.c25 [concrete] -// CHECK:STDOUT: %self.param_patt.882: %pattern_type.0ba = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.74c: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt.882 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_49.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc8_49.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.d6c: %pattern_type.958 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9ae: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt.d6c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_49.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc8_49.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_49.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_49.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6c5: %SubobjectDestroy.type = facet_value %Optional.37f, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.22a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6c5) [concrete] +// CHECK:STDOUT: %Destroy.facet.9ec: %Destroy.type = facet_value %Optional.37f, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.22a) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2622,13 +1995,15 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %nullable_param_foo.cpp_overload_set.value: %nullable_param_foo.cpp_overload_set.type = cpp_overload_set_value @nullable_param_foo.cpp_overload_set [concrete = constants.%nullable_param_foo.cpp_overload_set.value] // CHECK:STDOUT: %nullable_param_get.cpp_overload_set.value: %nullable_param_get.cpp_overload_set.type = cpp_overload_set_value @nullable_param_get.cpp_overload_set [concrete = constants.%nullable_param_get.cpp_overload_set.value] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.814 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.a1a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.814, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.814, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %nullable_param_get.decl: %nullable_param_get.type = fn_decl @nullable_param_get [concrete = constants.%nullable_param_get] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -2650,51 +2025,6 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_49.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1cc = ref_param_pattern [concrete = constants.%self.param_patt.01a] -// CHECK:STDOUT: %self.patt: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.44d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.280 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.280 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_49.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1cc = ref_param_pattern [concrete = constants.%self.param_patt.01a] -// CHECK:STDOUT: %self.patt: %pattern_type.1cc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.44d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.280 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.280 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_49.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ba = ref_param_pattern [concrete = constants.%self.param_patt.882] -// CHECK:STDOUT: %self.patt: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.74c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.c25 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.c25 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc8_49.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0ba = ref_param_pattern [concrete = constants.%self.param_patt.882] -// CHECK:STDOUT: %self.patt: %pattern_type.0ba = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.74c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.c25 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.c25 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_49.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.958 = ref_param_pattern [concrete = constants.%self.param_patt.d6c] -// CHECK:STDOUT: %self.patt: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9ae] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.37f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.37f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc8_49.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.958 = ref_param_pattern [concrete = constants.%self.param_patt.d6c] -// CHECK:STDOUT: %self.patt: %pattern_type.958 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9ae] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.37f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.37f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Cpp.ref.loc8_3: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -2706,43 +2036,20 @@ fn F() { // CHECK:STDOUT: %.loc8_49.2: ref %Optional.37f = temporary %.loc8_49.1, %nullable_param_get.call // CHECK:STDOUT: %.loc8_49.3: %Optional.37f = acquire_value %.loc8_49.2 // CHECK:STDOUT: %nullable_param_foo.call: init %empty_tuple.type = call imports.%nullable_param_foo.decl(%.loc8_49.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_49.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_49.2) +// CHECK:STDOUT: %Destroy.facet.loc8_49.1: %Destroy.type = facet_value constants.%Optional.37f, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.22a) [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %.loc8_49.4: %Destroy.type = converted constants.%Optional.37f, %Destroy.facet.loc8_49.1 [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %Destroy.facet.loc8_49.2: %Destroy.type = facet_value constants.%Optional.37f, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.22a) [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: %.loc8_49.5: %Destroy.type = converted constants.%Optional.37f, %Destroy.facet.loc8_49.2 [concrete = constants.%Destroy.facet.9ec] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_49.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_49.1(%self.param: ref %.280) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_49.1(%self.param: ref %.280) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_49.1(%self.param: ref %.280) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_49.2(%self.param: ref %MaybeUnformed.b5a) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_49.1(%self.param: ref %.280) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_49.2(%self.param: ref %MaybeUnformed.c25) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_49.2(%self.param: ref %MaybeUnformed.c25) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_49.2(%self.param: ref %MaybeUnformed.c25) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_49.3(%self.param: ref %Optional.37f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_49.3(%self.param: ref %Optional.37f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_49.3(%self.param: ref %Optional.37f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_49.3(%self.param: ref %Optional.37f) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_deduced_any_param_as_pointer.carbon // CHECK:STDOUT: @@ -2763,14 +2070,17 @@ fn F() { // CHECK:STDOUT: %deduced_any_foo.cpp_overload_set.value: %deduced_any_foo.cpp_overload_set.type = cpp_overload_set_value @deduced_any_foo.cpp_overload_set [concrete] // CHECK:STDOUT: %deduced_any_foo.type: type = fn_type @deduced_any_foo [concrete] // CHECK:STDOUT: %deduced_any_foo: %deduced_any_foo.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.77c: %pattern_type.1ad = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9c7: %pattern_type.1ad = wrapper_binding_pattern self, %self.param_patt.77c [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %DeducedAnyS.cpp_destructor.type: type = fn_type @DeducedAnyS.cpp_destructor [concrete] // CHECK:STDOUT: %DeducedAnyS.cpp_destructor: %DeducedAnyS.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%DeducedAnyS.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c3f: %SubobjectDestroy.type = facet_value %DeducedAnyS, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.428: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c3f) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %DeducedAnyS, (%DestroyImpl.impl_witness.428, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2786,21 +2096,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %DeducedAnyS.cpp_destructor.decl: %DeducedAnyS.cpp_destructor.type = fn_decl @DeducedAnyS.cpp_destructor [concrete = constants.%DeducedAnyS.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1ad = ref_param_pattern [concrete = constants.%self.param_patt.77c] -// CHECK:STDOUT: %self.patt: %pattern_type.1ad = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9c7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DeducedAnyS = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DeducedAnyS = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2808,8 +2105,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %DeducedAnyS = var_storage %s.var_patt // CHECK:STDOUT: %.loc8_29.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_29.2: init %DeducedAnyS to %s.var = class_init () [concrete = constants.%DeducedAnyS.val] -// CHECK:STDOUT: %.loc8_3: init %DeducedAnyS = converted %.loc8_29.1, %.loc8_29.2 [concrete = constants.%DeducedAnyS.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %DeducedAnyS = converted %.loc8_29.1, %.loc8_29.2 [concrete = constants.%DeducedAnyS.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %DeducedAnyS.ref.loc8 [concrete = constants.%DeducedAnyS] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %DeducedAnyS.ref.loc8: type = name_ref DeducedAnyS, imports.%DeducedAnyS.decl [concrete = constants.%DeducedAnyS] @@ -2835,18 +2132,13 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %p.patt: %pattern_type.060 = value_binding_pattern p [concrete = constants.%p.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%DeducedAnyS, (constants.%DestroyImpl.impl_witness.428, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%DeducedAnyS, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%DeducedAnyS, (constants.%DestroyImpl.impl_witness.428, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%DeducedAnyS, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%s.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %DeducedAnyS) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %DeducedAnyS) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %DeducedAnyS.cpp_destructor.call: init %empty_tuple.type = call imports.%DeducedAnyS.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_deduced_pointer_param_as_pointer.carbon @@ -2867,24 +2159,29 @@ fn F() { // CHECK:STDOUT: %Optional.type: type = parameterized_class_name_type @Optional [concrete] // CHECK:STDOUT: %Optional.generic: %Optional.type = struct_value () [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.type.b0c: type = fn_type @ptr.as.OptionalStorage.impl.Some, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.bf1: %ptr.as.OptionalStorage.impl.Some.type.b0c = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.26b: %Destroy.type = facet_value %ptr.6cb, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.19f: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.26b) [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.cbc: %SubobjectDestroy.type = facet_value %ptr.6cb, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a4f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cbc) [concrete] +// CHECK:STDOUT: %Destroy.facet.bf2: %Destroy.type = facet_value %ptr.6cb, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.a4f) [concrete] +// CHECK:STDOUT: %MaybeUnformed.fc9: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.bf2) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.9df: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%DeducedPointerS) [concrete] // CHECK:STDOUT: %.fb1: type = maybe_unformed_type %ptr.6cb [concrete] // CHECK:STDOUT: %OptionalStorage.facet.b3a: %OptionalStorage.type = facet_value %ptr.6cb, (%OptionalStorage.impl_witness.9df) [concrete] @@ -2895,12 +2192,12 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.b63: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.1e6)> [concrete] -// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220)> [symbolic] +// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220e40.1)> [symbolic] // CHECK:STDOUT: %U.c66: %OptionalAs.type.5bd = symbolic_binding U, 1 [symbolic] -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220, %U.c66) [symbolic] +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220e40.1, %U.c66) [symbolic] // CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.f83: %U.as_type.as.ImplicitAs.impl.Convert.type.c47 = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.type.51c: type = facet_type <@OptionalAs, @OptionalAs(%OptionalStorage.facet.b3a)> [concrete] -// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220e40.1) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.c36: %T.as_type.as.OptionalAs.impl.Convert.type.b2a = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.impl_witness.957: = impl_witness imports.%OptionalAs.impl_witness_table.98f, @T.as_type.as.OptionalAs.impl(%OptionalStorage.facet.b3a) [concrete] // CHECK:STDOUT: %OptionalAs.facet: %OptionalAs.type.51c = facet_value %ptr.6cb, (%OptionalAs.impl_witness.957) [concrete] @@ -2911,50 +2208,31 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.c06: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Optional.1e6, %ImplicitAs.facet.25a) [concrete] // CHECK:STDOUT: %.d55: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.c06, %ImplicitAs.facet.25a [concrete] // CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %U.as_type.as.ImplicitAs.impl.Convert.c66, @U.as_type.as.ImplicitAs.impl.Convert.2(%OptionalStorage.facet.b3a, %OptionalAs.facet) [concrete] -// CHECK:STDOUT: %pattern_type.50c: type = pattern_type %.fb1 [concrete] -// CHECK:STDOUT: %self.param_patt.919: %pattern_type.50c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.02a: %pattern_type.50c = wrapper_binding_pattern self, %self.param_patt.919 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_14.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_14.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.788: type = pattern_type %MaybeUnformed.19f [concrete] -// CHECK:STDOUT: %self.param_patt.92f: %pattern_type.788 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.04b: %pattern_type.788 = wrapper_binding_pattern self, %self.param_patt.92f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_14.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11_14.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0f3: %pattern_type.7e1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.5b0: %pattern_type.7e1 = wrapper_binding_pattern self, %self.param_patt.0f3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_14.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc11_14.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_14.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_14.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.975: %SubobjectDestroy.type = facet_value %Optional.1e6, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.462: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.975) [concrete] +// CHECK:STDOUT: %Destroy.facet.e27: %Destroy.type = facet_value %Optional.1e6, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.462) [concrete] // CHECK:STDOUT: %a.patt: %pattern_type.7e1 = value_binding_pattern a [concrete] // CHECK:STDOUT: %Indirect.cpp_overload_set.type: type = cpp_overload_set_type @Indirect.cpp_overload_set [concrete] // CHECK:STDOUT: %Indirect.cpp_overload_set.value: %Indirect.cpp_overload_set.type = cpp_overload_set_value @Indirect.cpp_overload_set [concrete] // CHECK:STDOUT: %Indirect__carbon_thunk.type: type = fn_type @Indirect__carbon_thunk [concrete] // CHECK:STDOUT: %Indirect__carbon_thunk: %Indirect__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %.dc4: ref %DeducedPointerS = temporary invalid, %DeducedPointerS.val [concrete] -// CHECK:STDOUT: %self.param_patt.5f8: %pattern_type.36d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a59: %pattern_type.36d = wrapper_binding_pattern self, %self.param_patt.5f8 [concrete] // CHECK:STDOUT: %DeducedPointerS.cpp_destructor.type: type = fn_type @DeducedPointerS.cpp_destructor [concrete] // CHECK:STDOUT: %DeducedPointerS.cpp_destructor: %DeducedPointerS.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.dc4, %Destroy.WithSelf.SelfDestruct.db3fdb.5 [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%DeducedPointerS.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6b6: %SubobjectDestroy.type = facet_value %DeducedPointerS, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ce1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6b6) [concrete] +// CHECK:STDOUT: %Destroy.facet.412: %Destroy.type = facet_value %DeducedPointerS, (%custom_witness.fe1, %DestroyImpl.impl_witness.ce1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Optional = %Core.Optional // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -2967,13 +2245,15 @@ fn F() { // CHECK:STDOUT: %DeducedPointerS.decl: type = class_decl @DeducedPointerS [concrete = constants.%DeducedPointerS] {} {} // CHECK:STDOUT: %Direct.cpp_overload_set.value: %Direct.cpp_overload_set.type = cpp_overload_set_value @Direct.cpp_overload_set [concrete = constants.%Direct.cpp_overload_set.value] // CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.814 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.470: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some.type (%ptr.as.OptionalStorage.impl.Some.type.b0c) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some (constants.%ptr.as.OptionalStorage.impl.Some.bf1)] // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.7b53: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b53), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Direct.decl: %Direct.type = fn_decl @Direct [concrete = constants.%Direct] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -2993,7 +2273,7 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.653 = impl_witness_table (%Core.import_ref.098), @U.as_type.as.ImplicitAs.impl.0c0 [concrete] // CHECK:STDOUT: %Core.import_ref.49b: @T.as_type.as.OptionalAs.impl.%T.as_type.as.OptionalAs.impl.Convert.type (%T.as_type.as.OptionalAs.impl.Convert.type.b2a) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalAs.impl.%T.as_type.as.OptionalAs.impl.Convert (constants.%T.as_type.as.OptionalAs.impl.Convert.c36)] // CHECK:STDOUT: %OptionalAs.impl_witness_table.98f = impl_witness_table (%Core.import_ref.49b), @T.as_type.as.OptionalAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: %Indirect.cpp_overload_set.value: %Indirect.cpp_overload_set.type = cpp_overload_set_value @Indirect.cpp_overload_set [concrete = constants.%Indirect.cpp_overload_set.value] // CHECK:STDOUT: %Indirect__carbon_thunk.decl: %Indirect__carbon_thunk.type = fn_decl @Indirect__carbon_thunk [concrete = constants.%Indirect__carbon_thunk] { // CHECK:STDOUT: @@ -3003,63 +2283,6 @@ fn F() { // CHECK:STDOUT: %Optional: type = class_type @Optional, @Optional(constants.%OptionalStorage.facet.b3a) [concrete = constants.%Optional.1e6] // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %DeducedPointerS.cpp_destructor.decl: %DeducedPointerS.cpp_destructor.type = fn_decl @DeducedPointerS.cpp_destructor [concrete = constants.%DeducedPointerS.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_14.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.50c = ref_param_pattern [concrete = constants.%self.param_patt.919] -// CHECK:STDOUT: %self.patt: %pattern_type.50c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.02a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.fb1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.fb1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_14.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.50c = ref_param_pattern [concrete = constants.%self.param_patt.919] -// CHECK:STDOUT: %self.patt: %pattern_type.50c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.02a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.fb1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.fb1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_14.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.788 = ref_param_pattern [concrete = constants.%self.param_patt.92f] -// CHECK:STDOUT: %self.patt: %pattern_type.788 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.04b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.19f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.19f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11_14.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.788 = ref_param_pattern [concrete = constants.%self.param_patt.92f] -// CHECK:STDOUT: %self.patt: %pattern_type.788 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.04b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.19f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.19f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_14.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7e1 = ref_param_pattern [concrete = constants.%self.param_patt.0f3] -// CHECK:STDOUT: %self.patt: %pattern_type.7e1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.1e6 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.1e6 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc11_14.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7e1 = ref_param_pattern [concrete = constants.%self.param_patt.0f3] -// CHECK:STDOUT: %self.patt: %pattern_type.7e1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5b0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.1e6 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.1e6 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc13 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.36d = ref_param_pattern [concrete = constants.%self.param_patt.5f8] -// CHECK:STDOUT: %self.patt: %pattern_type.36d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a59] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DeducedPointerS = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DeducedPointerS = wrapper_binding self, %self.param -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -3067,8 +2290,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %DeducedPointerS = var_storage %s.var_patt // CHECK:STDOUT: %.loc10_33.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_33.2: init %DeducedPointerS to %s.var = class_init () [concrete = constants.%DeducedPointerS.val] -// CHECK:STDOUT: %.loc10_3: init %DeducedPointerS = converted %.loc10_33.1, %.loc10_33.2 [concrete = constants.%DeducedPointerS.val] -// CHECK:STDOUT: assign %s.var, %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: init %DeducedPointerS = converted %.loc10_33.1, %.loc10_33.2 [concrete = constants.%DeducedPointerS.val] +// CHECK:STDOUT: assign %s.var, %.loc10_3.1 // CHECK:STDOUT: %.loc10_13: type = splice_block %DeducedPointerS.ref.loc10 [concrete = constants.%DeducedPointerS] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %DeducedPointerS.ref.loc10: type = name_ref DeducedPointerS, imports.%DeducedPointerS.decl [concrete = constants.%DeducedPointerS] @@ -3092,8 +2315,12 @@ fn F() { // CHECK:STDOUT: %.loc11_14.3: ref %Optional.1e6 = temporary %.loc11_14.2, %.loc11_14.1 // CHECK:STDOUT: %.loc11_14.4: %Optional.1e6 = acquire_value %.loc11_14.3 // CHECK:STDOUT: %Direct.call: init %Optional.1e6 = call imports.%Direct.decl(%.loc11_14.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %.loc11_14.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%.loc11_14.3) +// CHECK:STDOUT: %Destroy.facet.loc11_14.1: %Destroy.type = facet_value constants.%Optional.1e6, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.462) [concrete = constants.%Destroy.facet.e27] +// CHECK:STDOUT: %.loc11_14.5: %Destroy.type = converted constants.%Optional.1e6, %Destroy.facet.loc11_14.1 [concrete = constants.%Destroy.facet.e27] +// CHECK:STDOUT: %Destroy.facet.loc11_14.2: %Destroy.type = facet_value constants.%Optional.1e6, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.462) [concrete = constants.%Destroy.facet.e27] +// CHECK:STDOUT: %.loc11_14.6: %Destroy.type = converted constants.%Optional.1e6, %Destroy.facet.loc11_14.2 [concrete = constants.%Destroy.facet.e27] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc11_14.3) // CHECK:STDOUT: %Cpp.ref.loc13_55: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %Indirect.ref: %Indirect.cpp_overload_set.type = name_ref Indirect, imports.%Indirect.cpp_overload_set.value [concrete = constants.%Indirect.cpp_overload_set.value] // CHECK:STDOUT: %.loc13_69.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] @@ -3124,53 +2351,30 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %a.patt: %pattern_type.7e1 = value_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13: = bound_method %.loc13_93.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_93: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13(%.loc13_93.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_71: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.dc4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc13_93.1: %Destroy.type = facet_value constants.%Optional.1e6, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.462) [concrete = constants.%Destroy.facet.e27] +// CHECK:STDOUT: %.loc13_93.4: %Destroy.type = converted constants.%Optional.1e6, %Destroy.facet.loc13_93.1 [concrete = constants.%Destroy.facet.e27] +// CHECK:STDOUT: %Destroy.facet.loc13_93.2: %Destroy.type = facet_value constants.%Optional.1e6, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.462) [concrete = constants.%Destroy.facet.e27] +// CHECK:STDOUT: %.loc13_93.5: %Destroy.type = converted constants.%Optional.1e6, %Destroy.facet.loc13_93.2 [concrete = constants.%Destroy.facet.e27] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13_93: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc13_93.2) +// CHECK:STDOUT: %Destroy.facet.loc13_71.1: %Destroy.type = facet_value constants.%DeducedPointerS, (constants.%custom_witness.fe1, constants.%DestroyImpl.impl_witness.ce1) [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: %.loc13_71.5: %Destroy.type = converted constants.%DeducedPointerS, %Destroy.facet.loc13_71.1 [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: %Destroy.facet.loc13_71.2: %Destroy.type = facet_value constants.%DeducedPointerS, (constants.%custom_witness.fe1, constants.%DestroyImpl.impl_witness.ce1) [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: %.loc13_71.6: %Destroy.type = converted constants.%DeducedPointerS, %Destroy.facet.loc13_71.2 [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13_71: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc13_71.2) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%DeducedPointerS, (constants.%custom_witness.fe1, constants.%DestroyImpl.impl_witness.ce1) [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%DeducedPointerS, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%DeducedPointerS, (constants.%custom_witness.fe1, constants.%DestroyImpl.impl_witness.ce1) [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%DeducedPointerS, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.412] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%s.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.1(%self.param: ref %.fb1) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_14.1(%self.param: ref %.fb1) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_14.1(%self.param: ref %.fb1) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_14.2(%self.param: ref %MaybeUnformed.fc9) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_14.1(%self.param: ref %.fb1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.2(%self.param: ref %MaybeUnformed.19f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_14.2(%self.param: ref %MaybeUnformed.19f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_14.2(%self.param: ref %MaybeUnformed.19f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.3(%self.param: ref %Optional.1e6) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_14.3(%self.param: ref %Optional.1e6) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_14.3(%self.param: ref %Optional.1e6) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13(%self.param: ref %DeducedPointerS) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13(%self.param: ref %DeducedPointerS) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %DeducedPointerS.cpp_destructor.call: init %empty_tuple.type = call imports.%DeducedPointerS.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_14.3(%self.param: ref %Optional.1e6) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/qualified_param.carbon b/toolchain/check/testdata/interop/cpp/function/import/qualified_param.carbon index 81c411583fbc..76a1c732c77b 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/qualified_param.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/qualified_param.carbon @@ -73,14 +73,17 @@ fn F() { // CHECK:STDOUT: %TakesConstS__carbon_thunk.type: type = fn_type @TakesConstS__carbon_thunk [concrete] // CHECK:STDOUT: %TakesConstS__carbon_thunk: %TakesConstS__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.037: type = ptr_type %S [concrete] -// CHECK:STDOUT: %self.param_patt.63c: %pattern_type.0f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a18: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt.63c [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %S.cpp_destructor.type: type = fn_type @S.cpp_destructor [concrete] // CHECK:STDOUT: %S.cpp_destructor: %S.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%S.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c01: %SubobjectDestroy.type = facet_value %S, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b60: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c01) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%DestroyImpl.impl_witness.b60, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -105,21 +108,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %S.cpp_destructor.decl: %S.cpp_destructor.type = fn_decl @S.cpp_destructor [concrete = constants.%S.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0f5 = ref_param_pattern [concrete = constants.%self.param_patt.63c] -// CHECK:STDOUT: %self.patt: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a18] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %S = ref_param call_param0 -// CHECK:STDOUT: %self: ref %S = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -138,8 +128,8 @@ fn F() { // CHECK:STDOUT: %s.var: ref %S = var_storage %s.var_patt // CHECK:STDOUT: %.loc10_19.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_19.2: init %S to %s.var = class_init () [concrete = constants.%S.val] -// CHECK:STDOUT: %.loc10_3: init %S = converted %.loc10_19.1, %.loc10_19.2 [concrete = constants.%S.val] -// CHECK:STDOUT: assign %s.var, %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: init %S = converted %.loc10_19.1, %.loc10_19.2 [concrete = constants.%S.val] +// CHECK:STDOUT: assign %s.var, %.loc10_3.1 // CHECK:STDOUT: %.loc10_13: type = splice_block %S.ref [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref: type = name_ref S, imports.%S.decl [concrete = constants.%S] @@ -158,17 +148,12 @@ fn F() { // CHECK:STDOUT: %.loc11_20.1: %ptr.711 = as_compatible %addr // CHECK:STDOUT: %.loc11_20.2: %ptr.711 = converted %addr, %.loc11_20.1 // CHECK:STDOUT: %TakesConstS__carbon_thunk.call: init %empty_tuple.type = call imports.%TakesConstS__carbon_thunk.decl(%.loc11_20.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%S, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%s.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %S) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %S) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %S.cpp_destructor.call: init %empty_tuple.type = call imports.%S.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/reference.carbon b/toolchain/check/testdata/interop/cpp/function/import/reference.carbon index 49e52c92fef5..57e5e6dada87 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/reference.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/reference.carbon @@ -457,14 +457,17 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %TakesLValue.cpp_overload_set.value: %TakesLValue.cpp_overload_set.type = cpp_overload_set_value @TakesLValue.cpp_overload_set [concrete] // CHECK:STDOUT: %TakesLValue.type: type = fn_type @TakesLValue [concrete] // CHECK:STDOUT: %TakesLValue: %TakesLValue.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.63c: %pattern_type.0f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a18: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt.63c [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %S.cpp_destructor.type: type = fn_type @S.cpp_destructor [concrete] // CHECK:STDOUT: %S.cpp_destructor: %S.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%S.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c01: %SubobjectDestroy.type = facet_value %S, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b60: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c01) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%DestroyImpl.impl_witness.b60, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -480,21 +483,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %S.cpp_destructor.decl: %S.cpp_destructor.type = fn_decl @S.cpp_destructor [concrete = constants.%S.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0f5 = ref_param_pattern [concrete = constants.%self.param_patt.63c] -// CHECK:STDOUT: %self.patt: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a18] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %S = ref_param call_param0 -// CHECK:STDOUT: %self: ref %S = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -502,8 +492,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %s.var: ref %S = var_storage %s.var_patt // CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_19.2: init %S to %s.var = class_init () [concrete = constants.%S.val] -// CHECK:STDOUT: %.loc8_3: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref: type = name_ref S, imports.%S.decl [concrete = constants.%S] @@ -518,18 +508,13 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s // CHECK:STDOUT: %.loc9: %S = ref_tag %s.ref // CHECK:STDOUT: %TakesLValue.call: init %empty_tuple.type = call imports.%TakesLValue.decl(%s.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%s.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %S) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %S) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %S.cpp_destructor.call: init %empty_tuple.type = call imports.%S.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_param_lvalue_ref.carbon @@ -558,8 +543,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %const: type = const_type %S [concrete] // CHECK:STDOUT: %T.ed0: type = class_type @T [concrete] // CHECK:STDOUT: %pattern_type.5f6: type = pattern_type %T.ed0 [concrete] -// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete] -// CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt [concrete] +// CHECK:STDOUT: %t.patt.420: %pattern_type.5f6 = ref_binding_pattern t [concrete] +// CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt.420 [concrete] // CHECK:STDOUT: %T.Op.type: type = fn_type @T.Op [concrete] // CHECK:STDOUT: %T.Op: %T.Op.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.9b40fb.2: = custom_witness (%T.Op), @Default [concrete] @@ -568,22 +553,23 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %DefaultOrUnformed.facet.d8b: %DefaultOrUnformed.type = facet_value %T.ed0, (%DefaultOrUnformed.impl_witness.307) [concrete] // CHECK:STDOUT: %u.patt: %pattern_type.0f5 = ref_binding_pattern u [concrete] // CHECK:STDOUT: %u.var_patt: %pattern_type.0f5 = var_pattern %u.patt [concrete] -// CHECK:STDOUT: %self.param_patt.63c: %pattern_type.0f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a18: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt.63c [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %S.cpp_destructor.type: type = fn_type @S.cpp_destructor [concrete] // CHECK:STDOUT: %S.cpp_destructor: %S.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc32 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc32 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0e6: %pattern_type.5f6 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eb3: %pattern_type.5f6 = wrapper_binding_pattern self, %self.param_patt.0e6 [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%S.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c01: %SubobjectDestroy.type = facet_value %S, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b60: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c01) [concrete] +// CHECK:STDOUT: %Destroy.facet.580: %Destroy.type = facet_value %S, (%DestroyImpl.impl_witness.b60, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %T.cpp_destructor.type: type = fn_type @T.cpp_destructor [concrete] // CHECK:STDOUT: %T.cpp_destructor: %T.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%T.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b74: %SubobjectDestroy.type = facet_value %T.ed0, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.68c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b74) [concrete] +// CHECK:STDOUT: %Destroy.facet.8f8: %Destroy.type = facet_value %T.ed0, (%DestroyImpl.impl_witness.68c, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -598,33 +584,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.162 = impl_witness_table (%Core.import_ref.288), @T.as_type.as.DefaultOrUnformed.impl [concrete] // CHECK:STDOUT: %TakesLValue.cpp_overload_set.value: %TakesLValue.cpp_overload_set.type = cpp_overload_set_value @TakesLValue.cpp_overload_set [concrete = constants.%TakesLValue.cpp_overload_set.value] // CHECK:STDOUT: %T.decl: type = class_decl @T [concrete = constants.%T.ed0] {} {} -// CHECK:STDOUT: %S.cpp_destructor.decl: %S.cpp_destructor.type = fn_decl @S.cpp_destructor [concrete = constants.%S.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %T.cpp_destructor.decl: %T.cpp_destructor.type = fn_decl @T.cpp_destructor [concrete = constants.%T.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc32 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0f5 = ref_param_pattern [concrete = constants.%self.param_patt.63c] -// CHECK:STDOUT: %self.patt: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a18] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %S = ref_param call_param0 -// CHECK:STDOUT: %self: ref %S = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f6 = ref_param_pattern [concrete = constants.%self.param_patt.0e6] -// CHECK:STDOUT: %self.patt: %pattern_type.5f6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %T.ed0 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %T.ed0 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -635,8 +596,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %as_type.loc8: type = facet_access_type %.loc8_15.1 [concrete = constants.%S] // CHECK:STDOUT: %.loc8_15.2: type = converted %.loc8_15.1, %as_type.loc8 [concrete = constants.%S] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc8_3: ref %S = splice_block %v.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc8: init %S to %.loc8_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.1() +// CHECK:STDOUT: %.loc8_3.1: ref %S = splice_block %v.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc8: init %S to %.loc8_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.1() // CHECK:STDOUT: assign %v.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc8 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref.loc8 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -674,8 +635,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %as_type.loc24: type = facet_access_type %.loc24_15.1 [concrete = constants.%T.ed0] // CHECK:STDOUT: %.loc24_15.2: type = converted %.loc24_15.1, %as_type.loc24 [concrete = constants.%T.ed0] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc24_3: ref %T.ed0 = splice_block %t.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc24: init %T.ed0 to %.loc24_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2() +// CHECK:STDOUT: %.loc24_3.1: ref %T.ed0 = splice_block %t.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc24: init %T.ed0 to %.loc24_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2() // CHECK:STDOUT: assign %t.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc24 // CHECK:STDOUT: %.loc24_13: type = splice_block %T.ref [concrete = constants.%T.ed0] { // CHECK:STDOUT: %Cpp.ref.loc24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -683,7 +644,7 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: } // CHECK:STDOUT: %t: ref %T.ed0 = wrapper_binding t, %t.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete = constants.%t.patt] +// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete = constants.%t.patt.420] // CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt [concrete = constants.%t.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Cpp.ref.loc30: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -695,8 +656,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %as_type.loc32: type = facet_access_type %.loc32_15.1 [concrete = constants.%S] // CHECK:STDOUT: %.loc32_15.2: type = converted %.loc32_15.1, %as_type.loc32 [concrete = constants.%S] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc32_3: ref %S = splice_block %u.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc32: init %S to %.loc32_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.3() +// CHECK:STDOUT: %.loc32_3.1: ref %S = splice_block %u.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc32: init %S to %.loc32_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.3() // CHECK:STDOUT: assign %u.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc32 // CHECK:STDOUT: %.loc32_13: type = splice_block %S.ref.loc32 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc32: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -715,31 +676,25 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %const.loc38: type = const_type %S.ref.loc38 [concrete = constants.%const] // CHECK:STDOUT: %.loc38_21.1: ref %const = as_compatible %u.ref // CHECK:STDOUT: %.loc38_21.2: ref %const = converted %u.ref, %.loc38_21.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc32: = bound_method %u.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc32: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc32(%u.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %t.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%t.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc32_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %.loc32_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc32_3.1 [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %Destroy.facet.loc32_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %.loc32_3.3: %Destroy.type = converted constants.%S, %Destroy.facet.loc32_3.2 [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc32: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%u.var) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%t.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%v.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32(%self.param: ref %S) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc32(%self.param: ref %S) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %S.cpp_destructor.call: init %empty_tuple.type = call imports.%S.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24(%self.param: ref %T.ed0) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24(%self.param: ref %T.ed0) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %T.cpp_destructor.call: init %empty_tuple.type = call imports.%T.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- call_param_rvalue_ref.carbon @@ -814,8 +769,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %TakesRValue.cpp_overload_set.value: %TakesRValue.cpp_overload_set.type = cpp_overload_set_value @TakesRValue.cpp_overload_set [concrete] // CHECK:STDOUT: %T.ed0: type = class_type @T [concrete] // CHECK:STDOUT: %pattern_type.5f6: type = pattern_type %T.ed0 [concrete] -// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete] -// CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt [concrete] +// CHECK:STDOUT: %t.patt.420: %pattern_type.5f6 = ref_binding_pattern t [concrete] +// CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt.420 [concrete] // CHECK:STDOUT: %T.Op.type: type = fn_type @T.Op [concrete] // CHECK:STDOUT: %T.Op: %T.Op.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.9b40fb.2: = custom_witness (%T.Op), @Default [concrete] @@ -826,22 +781,23 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %S.val: %S = struct_value () [concrete] // CHECK:STDOUT: %const: type = const_type %S [concrete] // CHECK:STDOUT: %empty_struct.674: %const = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0e6: %pattern_type.5f6 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eb3: %pattern_type.5f6 = wrapper_binding_pattern self, %self.param_patt.0e6 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %T.cpp_destructor.type: type = fn_type @T.cpp_destructor [concrete] // CHECK:STDOUT: %T.cpp_destructor: %T.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.63c: %pattern_type.0f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a18: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt.63c [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%T.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b74: %SubobjectDestroy.type = facet_value %T.ed0, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.68c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b74) [concrete] +// CHECK:STDOUT: %Destroy.facet.8f8: %Destroy.type = facet_value %T.ed0, (%DestroyImpl.impl_witness.68c, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %S.cpp_destructor.type: type = fn_type @S.cpp_destructor [concrete] // CHECK:STDOUT: %S.cpp_destructor: %S.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%S.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c01: %SubobjectDestroy.type = facet_value %S, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b60: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c01) [concrete] +// CHECK:STDOUT: %Destroy.facet.580: %Destroy.type = facet_value %S, (%DestroyImpl.impl_witness.b60, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -856,33 +812,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.162 = impl_witness_table (%Core.import_ref.288), @T.as_type.as.DefaultOrUnformed.impl [concrete] // CHECK:STDOUT: %TakesRValue.cpp_overload_set.value: %TakesRValue.cpp_overload_set.type = cpp_overload_set_value @TakesRValue.cpp_overload_set [concrete = constants.%TakesRValue.cpp_overload_set.value] // CHECK:STDOUT: %T.decl: type = class_decl @T [concrete = constants.%T.ed0] {} {} -// CHECK:STDOUT: %T.cpp_destructor.decl: %T.cpp_destructor.type = fn_decl @T.cpp_destructor [concrete = constants.%T.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %S.cpp_destructor.decl: %S.cpp_destructor.type = fn_decl @S.cpp_destructor [concrete = constants.%S.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f6 = ref_param_pattern [concrete = constants.%self.param_patt.0e6] -// CHECK:STDOUT: %self.patt: %pattern_type.5f6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %T.ed0 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %T.ed0 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0f5 = ref_param_pattern [concrete = constants.%self.param_patt.63c] -// CHECK:STDOUT: %self.patt: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a18] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %S = ref_param call_param0 -// CHECK:STDOUT: %self: ref %S = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -893,8 +824,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %as_type.loc8: type = facet_access_type %.loc8_15.1 [concrete = constants.%S] // CHECK:STDOUT: %.loc8_15.2: type = converted %.loc8_15.1, %as_type.loc8 [concrete = constants.%S] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc8_3: ref %S = splice_block %s.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc8: init %S to %.loc8_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.1() +// CHECK:STDOUT: %.loc8_3.1: ref %S = splice_block %s.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc8: init %S to %.loc8_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.1() // CHECK:STDOUT: assign %s.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc8 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref.loc8 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -914,8 +845,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %as_type.loc16: type = facet_access_type %.loc16_15.1 [concrete = constants.%T.ed0] // CHECK:STDOUT: %.loc16_15.2: type = converted %.loc16_15.1, %as_type.loc16 [concrete = constants.%T.ed0] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc16_3: ref %T.ed0 = splice_block %t.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc16: init %T.ed0 to %.loc16_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2() +// CHECK:STDOUT: %.loc16_3.1: ref %T.ed0 = splice_block %t.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc16: init %T.ed0 to %.loc16_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2() // CHECK:STDOUT: assign %t.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc16 // CHECK:STDOUT: %.loc16_13: type = splice_block %T.ref [concrete = constants.%T.ed0] { // CHECK:STDOUT: %Cpp.ref.loc16: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -923,7 +854,7 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: } // CHECK:STDOUT: %t: ref %T.ed0 = wrapper_binding t, %t.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete = constants.%t.patt] +// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete = constants.%t.patt.420] // CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt [concrete = constants.%t.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Cpp.ref.loc22: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -942,29 +873,19 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %const: type = const_type %S.ref.loc29_45 [concrete = constants.%const] // CHECK:STDOUT: %.loc29_33.1: init %const = as_compatible %.loc29_23 [concrete = constants.%empty_struct.674] // CHECK:STDOUT: %.loc29_33.2: init %const = converted %.loc29_23, %.loc29_33.1 [concrete = constants.%empty_struct.674] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %t.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%t.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%t.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%s.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref %T.ed0) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref %T.ed0) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %T.cpp_destructor.call: init %empty_tuple.type = call imports.%T.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %S) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %S) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %S.cpp_destructor.call: init %empty_tuple.type = call imports.%S.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- call_param_const_lvalue_ref_with_ref.carbon @@ -986,14 +907,17 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %TakesConstLValue__carbon_thunk.type: type = fn_type @TakesConstLValue__carbon_thunk [concrete] // CHECK:STDOUT: %TakesConstLValue__carbon_thunk: %TakesConstLValue__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.037: type = ptr_type %S [concrete] -// CHECK:STDOUT: %self.param_patt.63c: %pattern_type.0f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a18: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt.63c [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %S.cpp_destructor.type: type = fn_type @S.cpp_destructor [concrete] // CHECK:STDOUT: %S.cpp_destructor: %S.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%S.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c01: %SubobjectDestroy.type = facet_value %S, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b60: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c01) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%DestroyImpl.impl_witness.b60, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1009,21 +933,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %S.cpp_destructor.decl: %S.cpp_destructor.type = fn_decl @S.cpp_destructor [concrete = constants.%S.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0f5 = ref_param_pattern [concrete = constants.%self.param_patt.63c] -// CHECK:STDOUT: %self.patt: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a18] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %S = ref_param call_param0 -// CHECK:STDOUT: %self: ref %S = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1031,8 +942,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %s.var: ref %S = var_storage %s.var_patt // CHECK:STDOUT: %.loc8_19.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_19.2: init %S to %s.var = class_init () [concrete = constants.%S.val] -// CHECK:STDOUT: %.loc8_3: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] -// CHECK:STDOUT: assign %s.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %S = converted %.loc8_19.1, %.loc8_19.2 [concrete = constants.%S.val] +// CHECK:STDOUT: assign %s.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref.loc8 [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc8: type = name_ref S, imports.%S.decl [concrete = constants.%S] @@ -1067,18 +978,13 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %.loc11_25.1: %ptr.711 = as_compatible %addr.loc11 // CHECK:STDOUT: %.loc11_25.2: %ptr.711 = converted %addr.loc11, %.loc11_25.1 // CHECK:STDOUT: %TakesConstLValue__carbon_thunk.call.loc11: init %empty_tuple.type = call imports.%TakesConstLValue__carbon_thunk.decl(%.loc11_25.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%s.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %S) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %S) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %S.cpp_destructor.call: init %empty_tuple.type = call imports.%S.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- call_param_const_lvalue_ref_with_value.carbon @@ -1100,15 +1006,17 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %TakesConstLValue__carbon_thunk.type: type = fn_type @TakesConstLValue__carbon_thunk [concrete] // CHECK:STDOUT: %TakesConstLValue__carbon_thunk: %TakesConstLValue__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ptr.037: type = ptr_type %S [concrete] -// CHECK:STDOUT: %self.param_patt.63c: %pattern_type.0f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a18: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt.63c [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %S.cpp_destructor.type: type = fn_type @S.cpp_destructor [concrete] // CHECK:STDOUT: %S.cpp_destructor: %S.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.a94, %Destroy.WithSelf.SelfDestruct.db3 [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%S.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c01: %SubobjectDestroy.type = facet_value %S, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b60: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c01) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %S, (%DestroyImpl.impl_witness.b60, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1124,21 +1032,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %S.cpp_destructor.decl: %S.cpp_destructor.type = fn_decl @S.cpp_destructor [concrete = constants.%S.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0f5 = ref_param_pattern [concrete = constants.%self.param_patt.63c] -// CHECK:STDOUT: %self.patt: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a18] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %S = ref_param call_param0 -// CHECK:STDOUT: %self: ref %S = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1180,17 +1075,13 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %.loc11_40.1: %ptr.711 = as_compatible %addr.loc11 // CHECK:STDOUT: %.loc11_40.2: %ptr.711 = converted %addr.loc11, %.loc11_40.1 // CHECK:STDOUT: %TakesConstLValue__carbon_thunk.call.loc11: init %empty_tuple.type = call imports.%TakesConstLValue__carbon_thunk.decl(%.loc11_40.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.a94) +// CHECK:STDOUT: %Destroy.facet.loc8_19.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_19.7: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_19.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_19.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_19.8: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_19.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_19.5) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %S) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %S) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %S.cpp_destructor.call: init %empty_tuple.type = call imports.%S.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- param_value_arg_for_const_rvalue_ref.carbon @@ -1270,30 +1161,31 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %TakesConstRValue.cpp_overload_set.value: %TakesConstRValue.cpp_overload_set.type = cpp_overload_set_value @TakesConstRValue.cpp_overload_set [concrete] // CHECK:STDOUT: %T.ed0: type = class_type @T [concrete] // CHECK:STDOUT: %pattern_type.5f6: type = pattern_type %T.ed0 [concrete] -// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete] -// CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt [concrete] +// CHECK:STDOUT: %t.patt.420: %pattern_type.5f6 = ref_binding_pattern t [concrete] +// CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt.420 [concrete] // CHECK:STDOUT: %T.Op.type: type = fn_type @T.Op [concrete] // CHECK:STDOUT: %T.Op: %T.Op.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.9b40fb.2: = custom_witness (%T.Op), @Default [concrete] // CHECK:STDOUT: %Default.facet.d67: %Default.type = facet_value %T.ed0, (%custom_witness.9b40fb.2) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.307: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.162, @T.as_type.as.DefaultOrUnformed.impl(%Default.facet.d67) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet.d8b: %DefaultOrUnformed.type = facet_value %T.ed0, (%DefaultOrUnformed.impl_witness.307) [concrete] -// CHECK:STDOUT: %self.param_patt.0e6: %pattern_type.5f6 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eb3: %pattern_type.5f6 = wrapper_binding_pattern self, %self.param_patt.0e6 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %T.cpp_destructor.type: type = fn_type @T.cpp_destructor [concrete] // CHECK:STDOUT: %T.cpp_destructor: %T.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.63c: %pattern_type.0f5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a18: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt.63c [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%T.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b74: %SubobjectDestroy.type = facet_value %T.ed0, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.68c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b74) [concrete] +// CHECK:STDOUT: %Destroy.facet.8f8: %Destroy.type = facet_value %T.ed0, (%DestroyImpl.impl_witness.68c, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %S.cpp_destructor.type: type = fn_type @S.cpp_destructor [concrete] // CHECK:STDOUT: %S.cpp_destructor: %S.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%S.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c01: %SubobjectDestroy.type = facet_value %S, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b60: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c01) [concrete] +// CHECK:STDOUT: %Destroy.facet.580: %Destroy.type = facet_value %S, (%DestroyImpl.impl_witness.b60, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1308,33 +1200,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.162 = impl_witness_table (%Core.import_ref.288), @T.as_type.as.DefaultOrUnformed.impl [concrete] // CHECK:STDOUT: %TakesConstRValue.cpp_overload_set.value: %TakesConstRValue.cpp_overload_set.type = cpp_overload_set_value @TakesConstRValue.cpp_overload_set [concrete = constants.%TakesConstRValue.cpp_overload_set.value] // CHECK:STDOUT: %T.decl: type = class_decl @T [concrete = constants.%T.ed0] {} {} -// CHECK:STDOUT: %T.cpp_destructor.decl: %T.cpp_destructor.type = fn_decl @T.cpp_destructor [concrete = constants.%T.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %S.cpp_destructor.decl: %S.cpp_destructor.type = fn_decl @S.cpp_destructor [concrete = constants.%S.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5f6 = ref_param_pattern [concrete = constants.%self.param_patt.0e6] -// CHECK:STDOUT: %self.patt: %pattern_type.5f6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %T.ed0 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %T.ed0 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0f5 = ref_param_pattern [concrete = constants.%self.param_patt.63c] -// CHECK:STDOUT: %self.patt: %pattern_type.0f5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a18] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %S = ref_param call_param0 -// CHECK:STDOUT: %self: ref %S = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1345,8 +1212,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %as_type.loc8: type = facet_access_type %.loc8_15.1 [concrete = constants.%S] // CHECK:STDOUT: %.loc8_15.2: type = converted %.loc8_15.1, %as_type.loc8 [concrete = constants.%S] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc8_3: ref %S = splice_block %s.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc8: init %S to %.loc8_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.1() +// CHECK:STDOUT: %.loc8_3.1: ref %S = splice_block %s.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc8: init %S to %.loc8_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.1() // CHECK:STDOUT: assign %s.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc8 // CHECK:STDOUT: %.loc8_13: type = splice_block %S.ref [concrete = constants.%S] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1366,8 +1233,8 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: %as_type.loc16: type = facet_access_type %.loc16_15.1 [concrete = constants.%T.ed0] // CHECK:STDOUT: %.loc16_15.2: type = converted %.loc16_15.1, %as_type.loc16 [concrete = constants.%T.ed0] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc16_3: ref %T.ed0 = splice_block %t.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc16: init %T.ed0 to %.loc16_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2() +// CHECK:STDOUT: %.loc16_3.1: ref %T.ed0 = splice_block %t.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc16: init %T.ed0 to %.loc16_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn.2() // CHECK:STDOUT: assign %t.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call.loc16 // CHECK:STDOUT: %.loc16_13: type = splice_block %T.ref [concrete = constants.%T.ed0] { // CHECK:STDOUT: %Cpp.ref.loc16: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1375,35 +1242,25 @@ fn PassConstRef(ref x: const XByRef) { // CHECK:STDOUT: } // CHECK:STDOUT: %t: ref %T.ed0 = wrapper_binding t, %t.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete = constants.%t.patt] +// CHECK:STDOUT: %t.patt: %pattern_type.5f6 = ref_binding_pattern t [concrete = constants.%t.patt.420] // CHECK:STDOUT: %t.var_patt: %pattern_type.5f6 = var_pattern %t.patt [concrete = constants.%t.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Cpp.ref.loc22: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %TakesConstRValue.ref.loc22: %TakesConstRValue.cpp_overload_set.type = name_ref TakesConstRValue, imports.%TakesConstRValue.cpp_overload_set.value [concrete = constants.%TakesConstRValue.cpp_overload_set.value] // CHECK:STDOUT: %t.ref: ref %T.ed0 = name_ref t, %t -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %t.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%t.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%T.ed0, (constants.%DestroyImpl.impl_witness.68c, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%T.ed0, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.8f8] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%t.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%S, (constants.%DestroyImpl.impl_witness.b60, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%S, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.580] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%s.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref %T.ed0) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref %T.ed0) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %T.cpp_destructor.call: init %empty_tuple.type = call imports.%T.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %S) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %S) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %S.cpp_destructor.call: init %empty_tuple.type = call imports.%S.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- call_return_lvalue_ref.carbon diff --git a/toolchain/check/testdata/interop/cpp/function/import/return.carbon b/toolchain/check/testdata/interop/cpp/function/import/return.carbon index e8e7d6118951..f44fad4a74c4 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/return.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/return.carbon @@ -109,7 +109,6 @@ fn Var() { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete] -// CHECK:STDOUT: %pattern_type.9bc: type = pattern_type %i16 [concrete] // CHECK:STDOUT: %IngestI16.type: type = fn_type @IngestI16 [concrete] // CHECK:STDOUT: %IngestI16: %IngestI16.type = struct_value () [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -121,14 +120,17 @@ fn Var() { // CHECK:STDOUT: %ptr: type = ptr_type %i16 [concrete] // CHECK:STDOUT: %foo1__carbon_thunk.type: type = fn_type @foo1__carbon_thunk [concrete] // CHECK:STDOUT: %foo1__carbon_thunk: %foo1__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2ee: %pattern_type.9bc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f46: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt.2ee [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] // CHECK:STDOUT: %foo2.cpp_overload_set.type: type = cpp_overload_set_type @foo2.cpp_overload_set [concrete] // CHECK:STDOUT: %foo2.cpp_overload_set.value: %foo2.cpp_overload_set.type = cpp_overload_set_value @foo2.cpp_overload_set [concrete] // CHECK:STDOUT: %foo2.type: type = fn_type @foo2 [concrete] @@ -147,6 +149,8 @@ fn Var() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %foo2.cpp_overload_set.value: %foo2.cpp_overload_set.type = cpp_overload_set_value @foo2.cpp_overload_set [concrete = constants.%foo2.cpp_overload_set.value] // CHECK:STDOUT: %foo2.decl: %foo2.type = fn_decl @foo2 [concrete = constants.%foo2] { // CHECK:STDOUT: @@ -155,23 +159,6 @@ fn Var() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9bc = ref_param_pattern [concrete = constants.%self.param_patt.2ee] -// CHECK:STDOUT: %self.patt: %pattern_type.9bc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f46] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i16 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i16 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %IngestI16.ref: %IngestI16.type = name_ref IngestI16, file.%IngestI16.decl [concrete = constants.%IngestI16] @@ -184,8 +171,12 @@ fn Var() { // CHECK:STDOUT: %.loc11_22.3: ref %i16 = temporary %.loc11_22.1, %.loc11_22.2 // CHECK:STDOUT: %.loc11_22.4: %i16 = acquire_value %.loc11_22.3 // CHECK:STDOUT: %IngestI16.call: init %empty_tuple.type = call %IngestI16.ref(%.loc11_22.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc11_22.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc11_22.3) +// CHECK:STDOUT: %Destroy.facet.loc11_22.1: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_22.5: %Destroy.type = converted constants.%i16, %Destroy.facet.loc11_22.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_22.2: %Destroy.type = facet_value constants.%i16, (constants.%DestroyImpl.impl_witness.dff, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_22.6: %Destroy.type = converted constants.%i16, %Destroy.facet.loc11_22.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_22.3) // CHECK:STDOUT: %IngestI32.ref: %IngestI32.type = name_ref IngestI32, file.%IngestI32.decl [concrete = constants.%IngestI32] // CHECK:STDOUT: %Cpp.ref.loc12: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo2.ref: %foo2.cpp_overload_set.type = name_ref foo2, imports.%foo2.cpp_overload_set.value [concrete = constants.%foo2.cpp_overload_set.value] @@ -196,16 +187,7 @@ fn Var() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %i16) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %i16) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11(%self.param: ref %i16) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- var_from_thunk_param.carbon // CHECK:STDOUT: @@ -213,18 +195,20 @@ fn Var() { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Cpp.nullptr_t: type = class_type @NullptrT [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.void: type = class_type @VoidBase [concrete] // CHECK:STDOUT: %ptr.00a: type = ptr_type %Cpp.void [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.f20: %Destroy.type = facet_value %ptr.00a, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.219: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.f20) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a43: %SubobjectDestroy.type = facet_value %ptr.00a, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e97: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a43) [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %Destroy.facet.1c1: %Destroy.type = facet_value %ptr.00a, (%DestroyImpl.impl_witness.e97, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %MaybeUnformed.74d: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.1c1) [concrete] // CHECK:STDOUT: %.a7d: type = maybe_unformed_type %ptr.00a [concrete] // CHECK:STDOUT: %pattern_type.af6: type = pattern_type %Cpp.nullptr_t [concrete] // CHECK:STDOUT: %c.patt: %pattern_type.af6 = ref_binding_pattern c [concrete] @@ -234,28 +218,12 @@ fn Var() { // CHECK:STDOUT: %ptr.ab6: type = ptr_type %Cpp.nullptr_t [concrete] // CHECK:STDOUT: %ReturnNullPtr__carbon_thunk.type: type = fn_type @ReturnNullPtr__carbon_thunk [concrete] // CHECK:STDOUT: %ReturnNullPtr__carbon_thunk: %ReturnNullPtr__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.651: type = pattern_type %.a7d [concrete] -// CHECK:STDOUT: %self.param_patt.c89: %pattern_type.651 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2bb: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt.c89 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.23c: type = pattern_type %MaybeUnformed.219 [concrete] -// CHECK:STDOUT: %self.param_patt.585: %pattern_type.23c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.32b: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt.585 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c86: %pattern_type.af6 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b2c: %pattern_type.af6 = wrapper_binding_pattern self, %self.param_patt.c86 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc11_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e68: %SubobjectDestroy.type = facet_value %Cpp.nullptr_t, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.452: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e68) [concrete] +// CHECK:STDOUT: %Destroy.facet.e32: %Destroy.type = facet_value %Cpp.nullptr_t, (%DestroyImpl.impl_witness.452, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -264,6 +232,8 @@ fn Var() { // CHECK:STDOUT: .ReturnNullPtr = %ReturnNullPtr.cpp_overload_set.value // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/cpp/nullptr, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %ReturnNullPtr.cpp_overload_set.value: %ReturnNullPtr.cpp_overload_set.type = cpp_overload_set_value @ReturnNullPtr.cpp_overload_set [concrete = constants.%ReturnNullPtr.cpp_overload_set.value] // CHECK:STDOUT: %ReturnNullPtr__carbon_thunk.decl: %ReturnNullPtr__carbon_thunk.type = fn_decl @ReturnNullPtr__carbon_thunk [concrete = constants.%ReturnNullPtr__carbon_thunk] { // CHECK:STDOUT: @@ -272,60 +242,15 @@ fn Var() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.651 = ref_param_pattern [concrete = constants.%self.param_patt.c89] -// CHECK:STDOUT: %self.patt: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2bb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.a7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.a7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.651 = ref_param_pattern [concrete = constants.%self.param_patt.c89] -// CHECK:STDOUT: %self.patt: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2bb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.a7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.a7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.23c = ref_param_pattern [concrete = constants.%self.param_patt.585] -// CHECK:STDOUT: %self.patt: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.32b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.219 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.219 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.23c = ref_param_pattern [concrete = constants.%self.param_patt.585] -// CHECK:STDOUT: %self.patt: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.32b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.219 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.219 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.af6 = ref_param_pattern [concrete = constants.%self.param_patt.c86] -// CHECK:STDOUT: %self.patt: %pattern_type.af6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b2c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.nullptr_t = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.nullptr_t = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc11_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.af6 = ref_param_pattern [concrete = constants.%self.param_patt.c86] -// CHECK:STDOUT: %self.patt: %pattern_type.af6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b2c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.nullptr_t = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.nullptr_t = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @InitializeFromReturn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.var: ref %Cpp.nullptr_t = var_storage %c.var_patt // CHECK:STDOUT: %Cpp.ref.loc11_33: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %ReturnNullPtr.ref: %ReturnNullPtr.cpp_overload_set.type = name_ref ReturnNullPtr, imports.%ReturnNullPtr.cpp_overload_set.value [concrete = constants.%ReturnNullPtr.cpp_overload_set.value] -// CHECK:STDOUT: %.loc11_3: ref %Cpp.nullptr_t = splice_block %c.var {} -// CHECK:STDOUT: %addr: %ptr.ab6 = addr_of %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: ref %Cpp.nullptr_t = splice_block %c.var {} +// CHECK:STDOUT: %addr: %ptr.ab6 = addr_of %.loc11_3.1 // CHECK:STDOUT: %ReturnNullPtr__carbon_thunk.call: init %empty_tuple.type = call imports.%ReturnNullPtr__carbon_thunk.decl(%addr) -// CHECK:STDOUT: %.loc11_51: init %Cpp.nullptr_t to %.loc11_3 = mark_in_place_init %ReturnNullPtr__carbon_thunk.call +// CHECK:STDOUT: %.loc11_51: init %Cpp.nullptr_t to %.loc11_3.1 = mark_in_place_init %ReturnNullPtr__carbon_thunk.call // CHECK:STDOUT: assign %c.var, %.loc11_51 // CHECK:STDOUT: %.loc11_20: type = splice_block %nullptr_t.ref [concrete = constants.%Cpp.nullptr_t] { // CHECK:STDOUT: %Cpp.ref.loc11_17: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -336,43 +261,20 @@ fn Var() { // CHECK:STDOUT: %c.patt: %pattern_type.af6 = ref_binding_pattern c [concrete = constants.%c.patt] // CHECK:STDOUT: %c.var_patt: %pattern_type.af6 = var_pattern %c.patt [concrete = constants.%c.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%Cpp.nullptr_t, (constants.%DestroyImpl.impl_witness.452, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.e32] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%Cpp.nullptr_t, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.e32] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%Cpp.nullptr_t, (constants.%DestroyImpl.impl_witness.452, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.e32] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%Cpp.nullptr_t, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.e32] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%c.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.1(%self.param: ref %.a7d) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.1(%self.param: ref %.a7d) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.1(%self.param: ref %.a7d) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.2(%self.param: ref %MaybeUnformed.74d) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.1(%self.param: ref %.a7d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %MaybeUnformed.219) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %MaybeUnformed.219) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %MaybeUnformed.219) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.3(%self.param: ref %Cpp.nullptr_t) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.3(%self.param: ref %Cpp.nullptr_t) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- return_from_thunk_param.carbon // CHECK:STDOUT: @@ -481,21 +383,26 @@ fn Var() { // CHECK:STDOUT: %return.patt: %pattern_type.129 = return_slot_pattern %return.param_patt, %u32 [concrete] // CHECK:STDOUT: %ReturnU32.type: type = fn_type @ReturnU32 [concrete] // CHECK:STDOUT: %ReturnU32: %ReturnU32.type = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.6f9: %pattern_type.129 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ddd: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt.6f9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.439: %SubobjectDestroy.type = facet_value %u32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ee7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.439) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %u32, (%DestroyImpl.impl_witness.ee7, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .UInt = %Core.UInt -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -515,24 +422,9 @@ fn Var() { // CHECK:STDOUT: %return.param: ref %u32 = out_param call_param0 // CHECK:STDOUT: %return: ref %u32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.129 = ref_param_pattern [concrete = constants.%self.param_patt.6f9] -// CHECK:STDOUT: %self.patt: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.129 = ref_param_pattern [concrete = constants.%self.param_patt.6f9] -// CHECK:STDOUT: %self.patt: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -561,21 +453,16 @@ fn Var() { // CHECK:STDOUT: %my_u32.patt: %pattern_type.129 = ref_binding_pattern my_u32 [concrete = constants.%my_u32.patt] // CHECK:STDOUT: %my_u32.var_patt: %pattern_type.129 = var_pattern %my_u32.patt [concrete = constants.%my_u32.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %my_u32.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%my_u32.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%u32, (constants.%DestroyImpl.impl_witness.ee7, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%u32, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%u32, (constants.%DestroyImpl.impl_witness.ee7, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%u32, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%my_u32.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ReturnU32() -> out %return.param: %u32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %u32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %u32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %u32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/function/import/struct.carbon b/toolchain/check/testdata/interop/cpp/function/import/struct.carbon index 30f80ff7b39d..bdd07d5263cf 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/struct.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/struct.carbon @@ -610,14 +610,17 @@ fn F() { // CHECK:STDOUT: %Default.facet.598: %Default.type = facet_value %InNamespaceStruct, (%custom_witness.85f) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.d85: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.162, @T.as_type.as.DefaultOrUnformed.impl(%Default.facet.598) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %InNamespaceStruct, (%DefaultOrUnformed.impl_witness.d85) [concrete] -// CHECK:STDOUT: %self.param_patt.75b: %pattern_type.d3e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b0d: %pattern_type.d3e = wrapper_binding_pattern self, %self.param_patt.75b [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %InNamespaceStruct.cpp_destructor.type: type = fn_type @InNamespaceStruct.cpp_destructor [concrete] // CHECK:STDOUT: %InNamespaceStruct.cpp_destructor: %InNamespaceStruct.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.1d5: = custom_witness (%InNamespaceStruct.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.3d7: %SubobjectDestroy.type = facet_value %InNamespaceStruct, (%custom_witness.1d5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.461: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.3d7) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %InNamespaceStruct, (%DestroyImpl.impl_witness.461, %custom_witness.1d5) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -639,21 +642,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.288: @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op.type (%T.as_type.as.DefaultOrUnformed.impl.Op.type.4da) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op (constants.%T.as_type.as.DefaultOrUnformed.impl.Op.79f)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.162 = impl_witness_table (%Core.import_ref.288), @T.as_type.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %InNamespaceStruct.cpp_destructor.decl: %InNamespaceStruct.cpp_destructor.type = fn_decl @InNamespaceStruct.cpp_destructor [concrete = constants.%InNamespaceStruct.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d3e = ref_param_pattern [concrete = constants.%self.param_patt.75b] -// CHECK:STDOUT: %self.patt: %pattern_type.d3e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b0d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %InNamespaceStruct = ref_param call_param0 -// CHECK:STDOUT: %self: ref %InNamespaceStruct = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%s.param: %InNamespaceStruct) { @@ -670,8 +660,8 @@ fn F() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_40.1 [concrete = constants.%InNamespaceStruct] // CHECK:STDOUT: %.loc10_40.2: type = converted %.loc10_40.1, %as_type [concrete = constants.%InNamespaceStruct] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc10_3: ref %InNamespaceStruct = splice_block %x.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %InNamespaceStruct to %.loc10_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc10_3.1: ref %InNamespaceStruct = splice_block %x.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %InNamespaceStruct to %.loc10_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %x.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc10_22: type = splice_block %InNamespaceStruct.ref.loc10 [concrete = constants.%InNamespaceStruct] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -683,18 +673,13 @@ fn F() { // CHECK:STDOUT: %x.patt: %pattern_type.d3e = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.d3e = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%InNamespaceStruct, (constants.%DestroyImpl.impl_witness.461, constants.%custom_witness.1d5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%InNamespaceStruct, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%InNamespaceStruct, (constants.%DestroyImpl.impl_witness.461, constants.%custom_witness.1d5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%InNamespaceStruct, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %InNamespaceStruct) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %InNamespaceStruct) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %InNamespaceStruct.cpp_destructor.call: init %empty_tuple.type = call imports.%InNamespaceStruct.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_definition_in_relative_namespace_value_param_type.carbon @@ -771,14 +756,17 @@ fn F() { // CHECK:STDOUT: %Default.facet.e09: %Default.type = facet_value %OuterStruct, (%custom_witness.9b4) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.e0b: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.162, @T.as_type.as.DefaultOrUnformed.impl(%Default.facet.e09) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %OuterStruct, (%DefaultOrUnformed.impl_witness.e0b) [concrete] -// CHECK:STDOUT: %self.param_patt.e6d: %pattern_type.e34 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f0c: %pattern_type.e34 = wrapper_binding_pattern self, %self.param_patt.e6d [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %OuterStruct.cpp_destructor.type: type = fn_type @OuterStruct.cpp_destructor [concrete] // CHECK:STDOUT: %OuterStruct.cpp_destructor: %OuterStruct.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%OuterStruct.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.35e: %SubobjectDestroy.type = facet_value %OuterStruct, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.bf4: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.35e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %OuterStruct, (%DestroyImpl.impl_witness.bf4, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -796,21 +784,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.288: @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op.type (%T.as_type.as.DefaultOrUnformed.impl.Op.type.4da) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op (constants.%T.as_type.as.DefaultOrUnformed.impl.Op.79f)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.162 = impl_witness_table (%Core.import_ref.288), @T.as_type.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %OuterStruct.cpp_destructor.decl: %OuterStruct.cpp_destructor.type = fn_decl @OuterStruct.cpp_destructor [concrete = constants.%OuterStruct.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.e34 = ref_param_pattern [concrete = constants.%self.param_patt.e6d] -// CHECK:STDOUT: %self.patt: %pattern_type.e34 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f0c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %OuterStruct = ref_param call_param0 -// CHECK:STDOUT: %self: ref %OuterStruct = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%s.param: %InnerStruct) { @@ -827,8 +802,8 @@ fn F() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc9_32.1 [concrete = constants.%OuterStruct] // CHECK:STDOUT: %.loc9_32.2: type = converted %.loc9_32.1, %as_type [concrete = constants.%OuterStruct] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc9_3: ref %OuterStruct = splice_block %x.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %OuterStruct to %.loc9_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc9_3.1: ref %OuterStruct = splice_block %x.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %OuterStruct to %.loc9_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %x.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc9_20: type = splice_block %OuterStruct.ref.loc9 [concrete = constants.%OuterStruct] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -839,18 +814,13 @@ fn F() { // CHECK:STDOUT: %x.patt: %pattern_type.e34 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.e34 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%OuterStruct, (constants.%DestroyImpl.impl_witness.bf4, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%OuterStruct, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%OuterStruct, (constants.%DestroyImpl.impl_witness.bf4, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%OuterStruct, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %OuterStruct) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %OuterStruct) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %OuterStruct.cpp_destructor.call: init %empty_tuple.type = call imports.%OuterStruct.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_definition_and_static_method_call_before.carbon @@ -1033,18 +1003,20 @@ fn F() { // CHECK:STDOUT: %foo_def_value_return.cpp_overload_set.type: type = cpp_overload_set_type @foo_def_value_return.cpp_overload_set [concrete] // CHECK:STDOUT: %foo_def_value_return.cpp_overload_set.value: %foo_def_value_return.cpp_overload_set.type = cpp_overload_set_value @foo_def_value_return.cpp_overload_set [concrete] // CHECK:STDOUT: %DefValueReturnStruct: type = class_type @DefValueReturnStruct [concrete] -// CHECK:STDOUT: %pattern_type.f0a: type = pattern_type %DefValueReturnStruct [concrete] // CHECK:STDOUT: %ptr.b68: type = ptr_type %DefValueReturnStruct [concrete] // CHECK:STDOUT: %foo_def_value_return__carbon_thunk.type: type = fn_type @foo_def_value_return__carbon_thunk [concrete] // CHECK:STDOUT: %foo_def_value_return__carbon_thunk: %foo_def_value_return__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.850: %pattern_type.f0a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.de2: %pattern_type.f0a = wrapper_binding_pattern self, %self.param_patt.850 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %DefValueReturnStruct.cpp_destructor.type: type = fn_type @DefValueReturnStruct.cpp_destructor [concrete] // CHECK:STDOUT: %DefValueReturnStruct.cpp_destructor: %DefValueReturnStruct.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%DefValueReturnStruct.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e69: %SubobjectDestroy.type = facet_value %DefValueReturnStruct, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.137: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e69) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %DefValueReturnStruct, (%DestroyImpl.impl_witness.137, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1058,21 +1030,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %DefValueReturnStruct.cpp_destructor.decl: %DefValueReturnStruct.cpp_destructor.type = fn_decl @DefValueReturnStruct.cpp_destructor [concrete = constants.%DefValueReturnStruct.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f0a = ref_param_pattern [concrete = constants.%self.param_patt.850] -// CHECK:STDOUT: %self.patt: %pattern_type.f0a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.de2] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefValueReturnStruct = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefValueReturnStruct = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1084,18 +1043,13 @@ fn F() { // CHECK:STDOUT: %foo_def_value_return__carbon_thunk.call: init %empty_tuple.type = call imports.%foo_def_value_return__carbon_thunk.decl(%addr) // CHECK:STDOUT: %.loc8_28.2: init %DefValueReturnStruct to %.loc8_28.1 = mark_in_place_init %foo_def_value_return__carbon_thunk.call // CHECK:STDOUT: %.loc8_28.3: ref %DefValueReturnStruct = temporary %.loc8_28.1, %.loc8_28.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_28.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_28.3) +// CHECK:STDOUT: %Destroy.facet.loc8_28.1: %Destroy.type = facet_value constants.%DefValueReturnStruct, (constants.%DestroyImpl.impl_witness.137, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_28.4: %Destroy.type = converted constants.%DefValueReturnStruct, %Destroy.facet.loc8_28.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_28.2: %Destroy.type = facet_value constants.%DefValueReturnStruct, (constants.%DestroyImpl.impl_witness.137, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_28.5: %Destroy.type = converted constants.%DefValueReturnStruct, %Destroy.facet.loc8_28.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_28.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %DefValueReturnStruct) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %DefValueReturnStruct) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %DefValueReturnStruct.cpp_destructor.call: init %empty_tuple.type = call imports.%DefValueReturnStruct.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_decl_pointer_return_type.carbon diff --git a/toolchain/check/testdata/interop/cpp/function/import/union.carbon b/toolchain/check/testdata/interop/cpp/function/import/union.carbon index 6fd3060a679e..46417878625a 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/union.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/union.carbon @@ -544,14 +544,17 @@ fn F() { // CHECK:STDOUT: %Default.facet.c4a: %Default.type = facet_value %InNamespaceUnion, (%custom_witness.85f) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.73c: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.162, @T.as_type.as.DefaultOrUnformed.impl(%Default.facet.c4a) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %InNamespaceUnion, (%DefaultOrUnformed.impl_witness.73c) [concrete] -// CHECK:STDOUT: %self.param_patt.ef9: %pattern_type.007 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0ed: %pattern_type.007 = wrapper_binding_pattern self, %self.param_patt.ef9 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %InNamespaceUnion.cpp_destructor.type: type = fn_type @InNamespaceUnion.cpp_destructor [concrete] // CHECK:STDOUT: %InNamespaceUnion.cpp_destructor: %InNamespaceUnion.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.1d5: = custom_witness (%InNamespaceUnion.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.dd0: %SubobjectDestroy.type = facet_value %InNamespaceUnion, (%custom_witness.1d5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.9ba: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.dd0) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %InNamespaceUnion, (%DestroyImpl.impl_witness.9ba, %custom_witness.1d5) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -573,21 +576,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.288: @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op.type (%T.as_type.as.DefaultOrUnformed.impl.Op.type.4da) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op (constants.%T.as_type.as.DefaultOrUnformed.impl.Op.79f)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.162 = impl_witness_table (%Core.import_ref.288), @T.as_type.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %InNamespaceUnion.cpp_destructor.decl: %InNamespaceUnion.cpp_destructor.type = fn_decl @InNamespaceUnion.cpp_destructor [concrete = constants.%InNamespaceUnion.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.007 = ref_param_pattern [concrete = constants.%self.param_patt.ef9] -// CHECK:STDOUT: %self.patt: %pattern_type.007 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0ed] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %InNamespaceUnion = ref_param call_param0 -// CHECK:STDOUT: %self: ref %InNamespaceUnion = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%u.param: %InNamespaceUnion) { @@ -604,8 +594,8 @@ fn F() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_39.1 [concrete = constants.%InNamespaceUnion] // CHECK:STDOUT: %.loc10_39.2: type = converted %.loc10_39.1, %as_type [concrete = constants.%InNamespaceUnion] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc10_3: ref %InNamespaceUnion = splice_block %x.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %InNamespaceUnion to %.loc10_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc10_3.1: ref %InNamespaceUnion = splice_block %x.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %InNamespaceUnion to %.loc10_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %x.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc10_22: type = splice_block %InNamespaceUnion.ref.loc10 [concrete = constants.%InNamespaceUnion] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -617,18 +607,13 @@ fn F() { // CHECK:STDOUT: %x.patt: %pattern_type.007 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.007 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%InNamespaceUnion, (constants.%DestroyImpl.impl_witness.9ba, constants.%custom_witness.1d5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%InNamespaceUnion, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%InNamespaceUnion, (constants.%DestroyImpl.impl_witness.9ba, constants.%custom_witness.1d5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%InNamespaceUnion, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %InNamespaceUnion) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %InNamespaceUnion) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %InNamespaceUnion.cpp_destructor.call: init %empty_tuple.type = call imports.%InNamespaceUnion.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_definition_in_relative_namespace_value_param_type.carbon @@ -705,14 +690,17 @@ fn F() { // CHECK:STDOUT: %Default.facet.a9b: %Default.type = facet_value %OuterUnion, (%custom_witness.9b4) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.9dc: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.162, @T.as_type.as.DefaultOrUnformed.impl(%Default.facet.a9b) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %OuterUnion, (%DefaultOrUnformed.impl_witness.9dc) [concrete] -// CHECK:STDOUT: %self.param_patt.47b: %pattern_type.89d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.67b: %pattern_type.89d = wrapper_binding_pattern self, %self.param_patt.47b [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %OuterUnion.cpp_destructor.type: type = fn_type @OuterUnion.cpp_destructor [concrete] // CHECK:STDOUT: %OuterUnion.cpp_destructor: %OuterUnion.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%OuterUnion.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e07: %SubobjectDestroy.type = facet_value %OuterUnion, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.995: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e07) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %OuterUnion, (%DestroyImpl.impl_witness.995, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -730,21 +718,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import_ref.288: @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op.type (%T.as_type.as.DefaultOrUnformed.impl.Op.type.4da) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op (constants.%T.as_type.as.DefaultOrUnformed.impl.Op.79f)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.162 = impl_witness_table (%Core.import_ref.288), @T.as_type.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %OuterUnion.cpp_destructor.decl: %OuterUnion.cpp_destructor.type = fn_decl @OuterUnion.cpp_destructor [concrete = constants.%OuterUnion.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.89d = ref_param_pattern [concrete = constants.%self.param_patt.47b] -// CHECK:STDOUT: %self.patt: %pattern_type.89d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.67b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %OuterUnion = ref_param call_param0 -// CHECK:STDOUT: %self: ref %OuterUnion = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%u.param: %InnerUnion) { @@ -761,8 +736,8 @@ fn F() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc9_31.1 [concrete = constants.%OuterUnion] // CHECK:STDOUT: %.loc9_31.2: type = converted %.loc9_31.1, %as_type [concrete = constants.%OuterUnion] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc9_3: ref %OuterUnion = splice_block %x.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %OuterUnion to %.loc9_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc9_3.1: ref %OuterUnion = splice_block %x.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %OuterUnion to %.loc9_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %x.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc9_20: type = splice_block %OuterUnion.ref.loc9 [concrete = constants.%OuterUnion] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -773,18 +748,13 @@ fn F() { // CHECK:STDOUT: %x.patt: %pattern_type.89d = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.89d = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%OuterUnion, (constants.%DestroyImpl.impl_witness.995, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%OuterUnion, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%OuterUnion, (constants.%DestroyImpl.impl_witness.995, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%OuterUnion, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %OuterUnion) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %OuterUnion) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %OuterUnion.cpp_destructor.call: init %empty_tuple.type = call imports.%OuterUnion.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_definition_and_static_method_call_before.carbon @@ -967,18 +937,20 @@ fn F() { // CHECK:STDOUT: %foo_def_value_return.cpp_overload_set.type: type = cpp_overload_set_type @foo_def_value_return.cpp_overload_set [concrete] // CHECK:STDOUT: %foo_def_value_return.cpp_overload_set.value: %foo_def_value_return.cpp_overload_set.type = cpp_overload_set_value @foo_def_value_return.cpp_overload_set [concrete] // CHECK:STDOUT: %DefValueReturnUnion: type = class_type @DefValueReturnUnion [concrete] -// CHECK:STDOUT: %pattern_type.133: type = pattern_type %DefValueReturnUnion [concrete] // CHECK:STDOUT: %ptr.5e5: type = ptr_type %DefValueReturnUnion [concrete] // CHECK:STDOUT: %foo_def_value_return__carbon_thunk.type: type = fn_type @foo_def_value_return__carbon_thunk [concrete] // CHECK:STDOUT: %foo_def_value_return__carbon_thunk: %foo_def_value_return__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0ca: %pattern_type.133 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.00d: %pattern_type.133 = wrapper_binding_pattern self, %self.param_patt.0ca [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %DefValueReturnUnion.cpp_destructor.type: type = fn_type @DefValueReturnUnion.cpp_destructor [concrete] // CHECK:STDOUT: %DefValueReturnUnion.cpp_destructor: %DefValueReturnUnion.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%DefValueReturnUnion.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.15a: %SubobjectDestroy.type = facet_value %DefValueReturnUnion, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.82a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.15a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %DefValueReturnUnion, (%DestroyImpl.impl_witness.82a, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -992,21 +964,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %DefValueReturnUnion.cpp_destructor.decl: %DefValueReturnUnion.cpp_destructor.type = fn_decl @DefValueReturnUnion.cpp_destructor [concrete = constants.%DefValueReturnUnion.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.133 = ref_param_pattern [concrete = constants.%self.param_patt.0ca] -// CHECK:STDOUT: %self.patt: %pattern_type.133 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.00d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefValueReturnUnion = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefValueReturnUnion = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1018,18 +977,13 @@ fn F() { // CHECK:STDOUT: %foo_def_value_return__carbon_thunk.call: init %empty_tuple.type = call imports.%foo_def_value_return__carbon_thunk.decl(%addr) // CHECK:STDOUT: %.loc8_28.2: init %DefValueReturnUnion to %.loc8_28.1 = mark_in_place_init %foo_def_value_return__carbon_thunk.call // CHECK:STDOUT: %.loc8_28.3: ref %DefValueReturnUnion = temporary %.loc8_28.1, %.loc8_28.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_28.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_28.3) +// CHECK:STDOUT: %Destroy.facet.loc8_28.1: %Destroy.type = facet_value constants.%DefValueReturnUnion, (constants.%DestroyImpl.impl_witness.82a, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_28.4: %Destroy.type = converted constants.%DefValueReturnUnion, %Destroy.facet.loc8_28.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_28.2: %Destroy.type = facet_value constants.%DefValueReturnUnion, (constants.%DestroyImpl.impl_witness.82a, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_28.5: %Destroy.type = converted constants.%DefValueReturnUnion, %Destroy.facet.loc8_28.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_28.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %DefValueReturnUnion) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %DefValueReturnUnion) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %DefValueReturnUnion.cpp_destructor.call: init %empty_tuple.type = call imports.%DefValueReturnUnion.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_decl_pointer_return_type.carbon 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 b67a2c844a56..4efecb41e9f1 100644 --- a/toolchain/check/testdata/interop/cpp/function/import/void_pointer.carbon +++ b/toolchain/check/testdata/interop/cpp/function/import/void_pointer.carbon @@ -205,38 +205,40 @@ fn F() { // CHECK:STDOUT: %foo_nullable_param.cpp_overload_set.type: type = cpp_overload_set_type @foo_nullable_param.cpp_overload_set [concrete] // CHECK:STDOUT: %foo_nullable_param.cpp_overload_set.value: %foo_nullable_param.cpp_overload_set.type = cpp_overload_set_value @foo_nullable_param.cpp_overload_set [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.type.b0c: type = fn_type @ptr.as.OptionalStorage.impl.Some, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.Some.bf1: %ptr.as.OptionalStorage.impl.Some.type.b0c = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.f20: %Destroy.type = facet_value %ptr.00a, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.219: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.f20) [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a43: %SubobjectDestroy.type = facet_value %ptr.00a, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e97: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a43) [concrete] +// CHECK:STDOUT: %Destroy.facet.44c: %Destroy.type = facet_value %ptr.00a, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.e97) [concrete] +// CHECK:STDOUT: %MaybeUnformed.ecd: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.44c) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.3d3: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%Cpp.void) [concrete] // CHECK:STDOUT: %.a7d: type = maybe_unformed_type %ptr.00a [concrete] // CHECK:STDOUT: %OptionalStorage.facet.9a2: %OptionalStorage.type = facet_value %ptr.00a, (%OptionalStorage.impl_witness.3d3) [concrete] // CHECK:STDOUT: %Optional.7de: type = class_type @Optional, @Optional(%OptionalStorage.facet.9a2) [concrete] -// CHECK:STDOUT: %pattern_type.332: type = pattern_type %Optional.7de [concrete] // CHECK:STDOUT: %foo_nullable_param.type: type = fn_type @foo_nullable_param [concrete] // CHECK:STDOUT: %foo_nullable_param: %foo_nullable_param.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.afd: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.7de)> [concrete] -// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220)> [symbolic] +// CHECK:STDOUT: %OptionalAs.type.5bd: type = facet_type <@OptionalAs, @OptionalAs(%T.220e40.1)> [symbolic] // CHECK:STDOUT: %U.c66: %OptionalAs.type.5bd = symbolic_binding U, 1 [symbolic] -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220, %U.c66) [symbolic] +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.type.c47: type = fn_type @U.as_type.as.ImplicitAs.impl.Convert.2, @U.as_type.as.ImplicitAs.impl.0c0(%T.220e40.1, %U.c66) [symbolic] // CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.f83: %U.as_type.as.ImplicitAs.impl.Convert.type.c47 = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.type.2c3: type = facet_type <@OptionalAs, @OptionalAs(%OptionalStorage.facet.9a2)> [concrete] -// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.type.b2a: type = fn_type @T.as_type.as.OptionalAs.impl.Convert, @T.as_type.as.OptionalAs.impl(%T.220e40.1) [symbolic] // CHECK:STDOUT: %T.as_type.as.OptionalAs.impl.Convert.c36: %T.as_type.as.OptionalAs.impl.Convert.type.b2a = struct_value () [symbolic] // CHECK:STDOUT: %OptionalAs.impl_witness.b96: = impl_witness imports.%OptionalAs.impl_witness_table.98f, @T.as_type.as.OptionalAs.impl(%OptionalStorage.facet.9a2) [concrete] // CHECK:STDOUT: %OptionalAs.facet: %OptionalAs.type.2c3 = facet_value %ptr.00a, (%OptionalAs.impl_witness.b96) [concrete] @@ -247,28 +249,12 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.05b: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Optional.7de, %ImplicitAs.facet.b08) [concrete] // CHECK:STDOUT: %.b42: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.05b, %ImplicitAs.facet.b08 [concrete] // CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %U.as_type.as.ImplicitAs.impl.Convert.f02, @U.as_type.as.ImplicitAs.impl.Convert.2(%OptionalStorage.facet.9a2, %OptionalAs.facet) [concrete] -// CHECK:STDOUT: %pattern_type.651: type = pattern_type %.a7d [concrete] -// CHECK:STDOUT: %self.param_patt.c89: %pattern_type.651 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2bb: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt.c89 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.23c: type = pattern_type %MaybeUnformed.219 [concrete] -// CHECK:STDOUT: %self.param_patt.585: %pattern_type.23c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.32b: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt.585 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7ce: %pattern_type.332 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.34e: %pattern_type.332 = wrapper_binding_pattern self, %self.param_patt.7ce [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_26.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_26.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ff2: %SubobjectDestroy.type = facet_value %Optional.7de, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ce3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ff2) [concrete] +// CHECK:STDOUT: %Destroy.facet.07e: %Destroy.type = facet_value %Optional.7de, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.ce3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -278,13 +264,15 @@ fn F() { // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } // CHECK:STDOUT: %foo_nullable_param.cpp_overload_set.value: %foo_nullable_param.cpp_overload_set.type = cpp_overload_set_value @foo_nullable_param.cpp_overload_set [concrete = constants.%foo_nullable_param.cpp_overload_set.value] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.814 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.470: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some.type (%ptr.as.OptionalStorage.impl.Some.type.b0c) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.Some (constants.%ptr.as.OptionalStorage.impl.Some.bf1)] // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.814, %Core.import_ref.470, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.7b53: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b53), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %foo_nullable_param.decl: %foo_nullable_param.type = fn_decl @foo_nullable_param [concrete = constants.%foo_nullable_param] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -302,51 +290,6 @@ fn F() { // CHECK:STDOUT: %OptionalAs.impl_witness_table.98f = impl_witness_table (%Core.import_ref.49b), @T.as_type.as.OptionalAs.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_26.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.651 = ref_param_pattern [concrete = constants.%self.param_patt.c89] -// CHECK:STDOUT: %self.patt: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2bb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.a7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.a7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_26.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.651 = ref_param_pattern [concrete = constants.%self.param_patt.c89] -// CHECK:STDOUT: %self.patt: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2bb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.a7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.a7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_26.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.23c = ref_param_pattern [concrete = constants.%self.param_patt.585] -// CHECK:STDOUT: %self.patt: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.32b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.219 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.219 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_26.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.23c = ref_param_pattern [concrete = constants.%self.param_patt.585] -// CHECK:STDOUT: %self.patt: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.32b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.219 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.219 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_26.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.332 = ref_param_pattern [concrete = constants.%self.param_patt.7ce] -// CHECK:STDOUT: %self.patt: %pattern_type.332 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.34e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.7de = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.7de = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10_26.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.332 = ref_param_pattern [concrete = constants.%self.param_patt.7ce] -// CHECK:STDOUT: %self.patt: %pattern_type.332 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.34e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.7de = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.7de = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @F(%input.param: %ptr.00a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -362,43 +305,20 @@ fn F() { // CHECK:STDOUT: %.loc10_26.3: ref %Optional.7de = temporary %.loc10_26.2, %.loc10_26.1 // CHECK:STDOUT: %.loc10_26.4: %Optional.7de = acquire_value %.loc10_26.3 // CHECK:STDOUT: %foo_nullable_param.call: init %empty_tuple.type = call imports.%foo_nullable_param.decl(%.loc10_26.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc10_26.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc10_26.3) +// CHECK:STDOUT: %Destroy.facet.loc10_26.1: %Destroy.type = facet_value constants.%Optional.7de, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.ce3) [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %.loc10_26.5: %Destroy.type = converted constants.%Optional.7de, %Destroy.facet.loc10_26.1 [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %Destroy.facet.loc10_26.2: %Destroy.type = facet_value constants.%Optional.7de, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.ce3) [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %.loc10_26.6: %Destroy.type = converted constants.%Optional.7de, %Destroy.facet.loc10_26.2 [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc10_26.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_26.1(%self.param: ref %.a7d) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_26.1(%self.param: ref %.a7d) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_26.1(%self.param: ref %.a7d) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_26.2(%self.param: ref %MaybeUnformed.ecd) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_26.1(%self.param: ref %.a7d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_26.2(%self.param: ref %MaybeUnformed.219) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_26.2(%self.param: ref %MaybeUnformed.219) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_26.2(%self.param: ref %MaybeUnformed.219) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_26.3(%self.param: ref %Optional.7de) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_26.3(%self.param: ref %Optional.7de) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_26.3(%self.param: ref %Optional.7de) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_26.3(%self.param: ref %Optional.7de) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- null_param.carbon // CHECK:STDOUT: @@ -414,63 +334,51 @@ fn F() { // CHECK:STDOUT: %Optional.None.type.626: type = fn_type @Optional.None, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.None.3ad: %Optional.None.type.626 = struct_value () [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.None.type.629: type = fn_type @ptr.as.OptionalStorage.impl.None, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.None.f84: %ptr.as.OptionalStorage.impl.None.type.629 = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.void: type = class_type @VoidBase [concrete] // CHECK:STDOUT: %ptr.00a: type = ptr_type %Cpp.void [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.f20: %Destroy.type = facet_value %ptr.00a, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.219: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.f20) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a43: %SubobjectDestroy.type = facet_value %ptr.00a, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e97: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a43) [concrete] +// CHECK:STDOUT: %Destroy.facet.44c: %Destroy.type = facet_value %ptr.00a, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.e97) [concrete] +// CHECK:STDOUT: %MaybeUnformed.ecd: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.44c) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.3d3: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%Cpp.void) [concrete] // CHECK:STDOUT: %.a7d: type = maybe_unformed_type %ptr.00a [concrete] // CHECK:STDOUT: %OptionalStorage.facet: %OptionalStorage.type = facet_value %ptr.00a, (%OptionalStorage.impl_witness.3d3) [concrete] // CHECK:STDOUT: %Optional.7de: type = class_type @Optional, @Optional(%OptionalStorage.facet) [concrete] // CHECK:STDOUT: %Optional.None.type.f11: type = fn_type @Optional.None, @Optional(%OptionalStorage.facet) [concrete] // CHECK:STDOUT: %Optional.None.6db: %Optional.None.type.f11 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.332: type = pattern_type %Optional.7de [concrete] // CHECK:STDOUT: %Optional.None.specific_fn: = specific_function %Optional.None.6db, @Optional.None(%OptionalStorage.facet) [concrete] // CHECK:STDOUT: %foo_null_param.type: type = fn_type @foo_null_param [concrete] // CHECK:STDOUT: %foo_null_param: %foo_null_param.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.651: type = pattern_type %.a7d [concrete] -// CHECK:STDOUT: %self.param_patt.c89: %pattern_type.651 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2bb: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt.c89 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_52.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_52.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.23c: type = pattern_type %MaybeUnformed.219 [concrete] -// CHECK:STDOUT: %self.param_patt.585: %pattern_type.23c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.32b: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt.585 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_52.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_52.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7ce: %pattern_type.332 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.34e: %pattern_type.332 = wrapper_binding_pattern self, %self.param_patt.7ce [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_52.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10_52.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_52.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_52.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ff2: %SubobjectDestroy.type = facet_value %Optional.7de, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ce3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ff2) [concrete] +// CHECK:STDOUT: %Destroy.facet.07e: %Destroy.type = facet_value %Optional.7de, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.ce3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Optional = %Core.Optional // CHECK:STDOUT: .CppCompat = %CppCompat.f0dbf9.1 -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -481,13 +389,15 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %foo_null_param.cpp_overload_set.value: %foo_null_param.cpp_overload_set.type = cpp_overload_set_value @foo_null_param.cpp_overload_set [concrete = constants.%foo_null_param.cpp_overload_set.value] // CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.9ff: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.None.type (%ptr.as.OptionalStorage.impl.None.type.629) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.None (constants.%ptr.as.OptionalStorage.impl.None.f84)] // CHECK:STDOUT: %Core.import_ref.a1a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.9ff, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.9ff, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.d6d: @Optional.%Optional.None.type (%Optional.None.type.626) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.3ad)] // CHECK:STDOUT: %Core.CppCompat: = import_ref Core//prelude, CppCompat, loaded // CHECK:STDOUT: %CppCompat.f0dbf9.1: = namespace %Core.CppCompat, [concrete] { @@ -507,52 +417,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_52.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.651 = ref_param_pattern [concrete = constants.%self.param_patt.c89] -// CHECK:STDOUT: %self.patt: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2bb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.a7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.a7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_52.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.651 = ref_param_pattern [concrete = constants.%self.param_patt.c89] -// CHECK:STDOUT: %self.patt: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2bb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.a7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.a7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_52.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.23c = ref_param_pattern [concrete = constants.%self.param_patt.585] -// CHECK:STDOUT: %self.patt: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.32b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.219 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.219 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_52.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.23c = ref_param_pattern [concrete = constants.%self.param_patt.585] -// CHECK:STDOUT: %self.patt: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.32b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.219 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.219 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_52.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.332 = ref_param_pattern [concrete = constants.%self.param_patt.7ce] -// CHECK:STDOUT: %self.patt: %pattern_type.332 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.34e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.7de = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.7de = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10_52.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.332 = ref_param_pattern [concrete = constants.%self.param_patt.7ce] -// CHECK:STDOUT: %self.patt: %pattern_type.332 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.34e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.7de = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.7de = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -575,43 +440,20 @@ fn F() { // CHECK:STDOUT: %.loc10_52.2: ref %Optional.7de = temporary %.loc10_52.1, %Optional.None.call // CHECK:STDOUT: %.loc10_52.3: %Optional.7de = acquire_value %.loc10_52.2 // CHECK:STDOUT: %foo_null_param.call: init %empty_tuple.type = call imports.%foo_null_param.decl(%.loc10_52.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc10_52.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc10_52.2) +// CHECK:STDOUT: %Destroy.facet.loc10_52.1: %Destroy.type = facet_value constants.%Optional.7de, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.ce3) [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %.loc10_52.4: %Destroy.type = converted constants.%Optional.7de, %Destroy.facet.loc10_52.1 [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %Destroy.facet.loc10_52.2: %Destroy.type = facet_value constants.%Optional.7de, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.ce3) [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %.loc10_52.5: %Destroy.type = converted constants.%Optional.7de, %Destroy.facet.loc10_52.2 [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc10_52.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_52.1(%self.param: ref %.a7d) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_52.1(%self.param: ref %.a7d) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_52.1(%self.param: ref %.a7d) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_52.2(%self.param: ref %MaybeUnformed.ecd) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_52.1(%self.param: ref %.a7d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_52.2(%self.param: ref %MaybeUnformed.219) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_52.2(%self.param: ref %MaybeUnformed.219) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_52.2(%self.param: ref %MaybeUnformed.219) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_52.3(%self.param: ref %Optional.7de) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_52.3(%self.param: ref %Optional.7de) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_52.3(%self.param: ref %Optional.7de) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_52.3(%self.param: ref %Optional.7de) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- nullable_return_value.carbon // CHECK:STDOUT: @@ -622,22 +464,27 @@ fn F() { // CHECK:STDOUT: %Optional.generic: %Optional.type = struct_value () [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.5f3: %Destroy.type = facet_value %ptr.e8f, (%SubobjectDestroy.lookup_impl_witness.61e, %DestroyImpl.lookup_impl_witness.18b) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.dac: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.5f3) [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.void: type = class_type @VoidBase [concrete] // CHECK:STDOUT: %ptr.00a: type = ptr_type %Cpp.void [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.f20: %Destroy.type = facet_value %ptr.00a, (%custom_witness.f8f19d.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.219: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.f20) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a43: %SubobjectDestroy.type = facet_value %ptr.00a, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e97: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a43) [concrete] +// CHECK:STDOUT: %Destroy.facet.44c: %Destroy.type = facet_value %ptr.00a, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.e97) [concrete] +// CHECK:STDOUT: %MaybeUnformed.ecd: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.44c) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.3d3: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%Cpp.void) [concrete] // CHECK:STDOUT: %.a7d: type = maybe_unformed_type %ptr.00a [concrete] // CHECK:STDOUT: %OptionalStorage.facet: %OptionalStorage.type = facet_value %ptr.00a, (%OptionalStorage.impl_witness.3d3) [concrete] @@ -648,35 +495,19 @@ fn F() { // CHECK:STDOUT: %foo_nullable_return.cpp_overload_set.value: %foo_nullable_return.cpp_overload_set.type = cpp_overload_set_value @foo_nullable_return.cpp_overload_set [concrete] // CHECK:STDOUT: %foo_nullable_return.type: type = fn_type @foo_nullable_return [concrete] // CHECK:STDOUT: %foo_nullable_return: %foo_nullable_return.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.651: type = pattern_type %.a7d [concrete] -// CHECK:STDOUT: %self.param_patt.c89: %pattern_type.651 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2bb: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt.c89 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_73.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_73.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.23c: type = pattern_type %MaybeUnformed.219 [concrete] -// CHECK:STDOUT: %self.param_patt.585: %pattern_type.23c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.32b: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt.585 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_73.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_73.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7ce: %pattern_type.332 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.34e: %pattern_type.332 = wrapper_binding_pattern self, %self.param_patt.7ce [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_73.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10_73.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_73.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_73.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ff2: %SubobjectDestroy.type = facet_value %Optional.7de, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ce3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ff2) [concrete] +// CHECK:STDOUT: %Destroy.facet.07e: %Destroy.type = facet_value %Optional.7de, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.ce3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Optional = %Core.Optional // CHECK:STDOUT: .CppCompat = %CppCompat.f0dbf9.1 -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -686,13 +517,15 @@ fn F() { // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.dac)] // CHECK:STDOUT: %Core.import_ref.814 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.a1a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.814, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.814, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.CppCompat: = import_ref Core//prelude, CppCompat, loaded // CHECK:STDOUT: %CppCompat.f0dbf9.1: = namespace %Core.CppCompat, [concrete] { // CHECK:STDOUT: .VoidBase = %Core.VoidBase @@ -709,52 +542,7 @@ fn F() { // CHECK:STDOUT: %Optional: type = class_type @Optional, @Optional(constants.%OptionalStorage.facet) [concrete = constants.%Optional.7de] // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_73.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.651 = ref_param_pattern [concrete = constants.%self.param_patt.c89] -// CHECK:STDOUT: %self.patt: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2bb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.a7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.a7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_73.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.651 = ref_param_pattern [concrete = constants.%self.param_patt.c89] -// CHECK:STDOUT: %self.patt: %pattern_type.651 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2bb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.a7d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.a7d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_73.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.23c = ref_param_pattern [concrete = constants.%self.param_patt.585] -// CHECK:STDOUT: %self.patt: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.32b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.219 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.219 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_73.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.23c = ref_param_pattern [concrete = constants.%self.param_patt.585] -// CHECK:STDOUT: %self.patt: %pattern_type.23c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.32b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.219 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.219 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_73.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.332 = ref_param_pattern [concrete = constants.%self.param_patt.7ce] -// CHECK:STDOUT: %self.patt: %pattern_type.332 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.34e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.7de = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.7de = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10_73.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.332 = ref_param_pattern [concrete = constants.%self.param_patt.7ce] -// CHECK:STDOUT: %self.patt: %pattern_type.332 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.34e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.7de = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.7de = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -779,43 +567,20 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %output.patt: %pattern_type.332 = value_binding_pattern output [concrete = constants.%output.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc10_73.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc10_73.2) +// CHECK:STDOUT: %Destroy.facet.loc10_73.1: %Destroy.type = facet_value constants.%Optional.7de, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.ce3) [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %.loc10_73.4: %Destroy.type = converted constants.%Optional.7de, %Destroy.facet.loc10_73.1 [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %Destroy.facet.loc10_73.2: %Destroy.type = facet_value constants.%Optional.7de, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.ce3) [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: %.loc10_73.5: %Destroy.type = converted constants.%Optional.7de, %Destroy.facet.loc10_73.2 [concrete = constants.%Destroy.facet.07e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc10_73.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_73.1(%self.param: ref %.a7d) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_73.1(%self.param: ref %.a7d) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_73.1(%self.param: ref %.a7d) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_73.2(%self.param: ref %MaybeUnformed.ecd) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_73.1(%self.param: ref %.a7d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_73.2(%self.param: ref %MaybeUnformed.219) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_73.2(%self.param: ref %MaybeUnformed.219) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_73.2(%self.param: ref %MaybeUnformed.219) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_73.3(%self.param: ref %Optional.7de) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_73.3(%self.param: ref %Optional.7de) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_73.3(%self.param: ref %Optional.7de) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_73.3(%self.param: ref %Optional.7de) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- non_nullable_pointer.carbon // CHECK:STDOUT: @@ -836,14 +601,17 @@ fn F() { // CHECK:STDOUT: %Invoke_pointer.cpp_overload_set.value: %Invoke_pointer.cpp_overload_set.type = cpp_overload_set_value @Invoke_pointer.cpp_overload_set [concrete] // CHECK:STDOUT: %Invoke_pointer.type: type = fn_type @Invoke_pointer [concrete] // CHECK:STDOUT: %Invoke_pointer: %Invoke_pointer.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e2c: %pattern_type.c1e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1b9: %pattern_type.c1e = wrapper_binding_pattern self, %self.param_patt.e2c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.36c: %SubobjectDestroy.type = facet_value %ptr.6f9, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.9e0: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.36c) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.6f9, (%DestroyImpl.impl_witness.9e0, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -865,23 +633,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c1e = ref_param_pattern [concrete = constants.%self.param_patt.e2c] -// CHECK:STDOUT: %self.patt: %pattern_type.c1e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1b9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.6f9 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.6f9 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c1e = ref_param_pattern [concrete = constants.%self.param_patt.e2c] -// CHECK:STDOUT: %self.patt: %pattern_type.c1e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1b9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.6f9 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.6f9 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -891,7 +644,7 @@ fn F() { // CHECK:STDOUT: %Return_pointer.ref: %Return_pointer.cpp_overload_set.type = name_ref Return_pointer, imports.%Return_pointer.cpp_overload_set.value [concrete = constants.%Return_pointer.cpp_overload_set.value] // CHECK:STDOUT: %Return_pointer.call: init %ptr.6f9 = call imports.%Return_pointer.decl() // CHECK:STDOUT: assign %non_nullable_pointer.var, %Return_pointer.call -// CHECK:STDOUT: %.loc11: type = splice_block %ptr.loc11_38 [concrete = constants.%ptr.6f9] { +// CHECK:STDOUT: %.loc11_38: type = splice_block %ptr.loc11_38 [concrete = constants.%ptr.6f9] { // CHECK:STDOUT: %Cpp.ref.loc11_29: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %void.ref: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void] // CHECK:STDOUT: %ptr.loc11_37: type = ptr_type %void.ref [concrete = constants.%ptr.00a] @@ -907,21 +660,16 @@ fn F() { // CHECK:STDOUT: %non_nullable_pointer.ref: ref %ptr.6f9 = name_ref non_nullable_pointer, %non_nullable_pointer // CHECK:STDOUT: %.loc12: %ptr.6f9 = acquire_value %non_nullable_pointer.ref // CHECK:STDOUT: %Invoke_pointer.call: init %empty_tuple.type = call imports.%Invoke_pointer.decl(%.loc12) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %non_nullable_pointer.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%non_nullable_pointer.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%ptr.6f9, (constants.%DestroyImpl.impl_witness.9e0, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_3.1: %Destroy.type = converted constants.%ptr.6f9, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%ptr.6f9, (constants.%DestroyImpl.impl_witness.9e0, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%ptr.6f9, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%non_nullable_pointer.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %ptr.6f9) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %ptr.6f9) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %ptr.6f9) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11(%self.param: ref %ptr.6f9) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- non_nullable_const.carbon // CHECK:STDOUT: @@ -942,14 +690,17 @@ fn F() { // CHECK:STDOUT: %Invoke_const.cpp_overload_set.value: %Invoke_const.cpp_overload_set.type = cpp_overload_set_value @Invoke_const.cpp_overload_set [concrete] // CHECK:STDOUT: %Invoke_const.type: type = fn_type @Invoke_const [concrete] // CHECK:STDOUT: %Invoke_const: %Invoke_const.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.486: %pattern_type.c83 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9b8: %pattern_type.c83 = wrapper_binding_pattern self, %self.param_patt.486 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a8e: %SubobjectDestroy.type = facet_value %ptr, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c5e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a8e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr, (%DestroyImpl.impl_witness.c5e, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -971,23 +722,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c83 = ref_param_pattern [concrete = constants.%self.param_patt.486] -// CHECK:STDOUT: %self.patt: %pattern_type.c83 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9b8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c83 = ref_param_pattern [concrete = constants.%self.param_patt.486] -// CHECK:STDOUT: %self.patt: %pattern_type.c83 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9b8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -997,7 +733,7 @@ fn F() { // CHECK:STDOUT: %Return_const.ref: %Return_const.cpp_overload_set.type = name_ref Return_const, imports.%Return_const.cpp_overload_set.value [concrete = constants.%Return_const.cpp_overload_set.value] // CHECK:STDOUT: %Return_const.call: init %ptr = call imports.%Return_const.decl() // CHECK:STDOUT: assign %const_void_pointer.var, %Return_const.call -// CHECK:STDOUT: %.loc11: type = splice_block %ptr [concrete = constants.%ptr] { +// CHECK:STDOUT: %.loc11_41: type = splice_block %ptr [concrete = constants.%ptr] { // CHECK:STDOUT: %Cpp.ref.loc11_33: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %void.ref: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void] // CHECK:STDOUT: %const: type = const_type %void.ref [concrete = constants.%const] @@ -1013,19 +749,14 @@ fn F() { // CHECK:STDOUT: %const_void_pointer.ref: ref %ptr = name_ref const_void_pointer, %const_void_pointer // CHECK:STDOUT: %.loc12: %ptr = acquire_value %const_void_pointer.ref // CHECK:STDOUT: %Invoke_const.call: init %empty_tuple.type = call imports.%Invoke_const.decl(%.loc12) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %const_void_pointer.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%const_void_pointer.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%ptr, (constants.%DestroyImpl.impl_witness.c5e, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_3.1: %Destroy.type = converted constants.%ptr, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%ptr, (constants.%DestroyImpl.impl_witness.c5e, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%ptr, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%const_void_pointer.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11(%self.param: ref %ptr) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %ptr) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %ptr) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11(%self.param: ref %ptr) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/impls/as.carbon b/toolchain/check/testdata/interop/cpp/impls/as.carbon index eeda5dbffe2c..3becdfe2a5d7 100644 --- a/toolchain/check/testdata/interop/cpp/impls/as.carbon +++ b/toolchain/check/testdata/interop/cpp/impls/as.carbon @@ -132,47 +132,43 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %Source: type = class_type @Source [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Dest: type = class_type @Dest [concrete] -// CHECK:STDOUT: %pattern_type.b72: type = pattern_type %Dest [concrete] // CHECK:STDOUT: %ptr.ca8: type = ptr_type %Dest [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type.eb4c5e.1: type = fn_type @Dest__carbon_thunk.1 [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.c8e433.1: %Dest__carbon_thunk.type.eb4c5e.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.581: %pattern_type.b72 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.48a: %pattern_type.b72 = wrapper_binding_pattern self, %self.param_patt.581 [concrete] -// CHECK:STDOUT: %Dest.cpp_destructor.type: type = fn_type @Dest.cpp_destructor [concrete] -// CHECK:STDOUT: %Dest.cpp_destructor: %Dest.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %Dest.Op.type: type = fn_type @Dest.Op [concrete] +// CHECK:STDOUT: %Dest.Op: %Dest.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.1: = custom_witness (%Dest.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ffa: %SubobjectDestroy.type = facet_value %Dest, (%custom_witness.5760f4.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.771: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ffa) [concrete] +// CHECK:STDOUT: %Destroy.facet.bbf: %Destroy.type = facet_value %Dest, (%DestroyImpl.impl_witness.771, %custom_witness.5760f4.1) [concrete] // CHECK:STDOUT: %Source2: type = class_type @Source2 [concrete] // CHECK:STDOUT: %Dest2: type = class_type @Dest2 [concrete] -// CHECK:STDOUT: %pattern_type.a68: type = pattern_type %Dest2 [concrete] // CHECK:STDOUT: %ptr.0db: type = ptr_type %Source2 [concrete] // CHECK:STDOUT: %ptr.802: type = ptr_type %Dest2 [concrete] // CHECK:STDOUT: %Dest2__carbon_thunk.type: type = fn_type @Dest2__carbon_thunk [concrete] // CHECK:STDOUT: %Dest2__carbon_thunk: %Dest2__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2f7: %pattern_type.a68 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7db: %pattern_type.a68 = wrapper_binding_pattern self, %self.param_patt.2f7 [concrete] -// CHECK:STDOUT: %Dest2.cpp_destructor.type: type = fn_type @Dest2.cpp_destructor [concrete] -// CHECK:STDOUT: %Dest2.cpp_destructor: %Dest2.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc14 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Dest2.Op.type: type = fn_type @Dest2.Op [concrete] +// CHECK:STDOUT: %Dest2.Op: %Dest2.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.2: = custom_witness (%Dest2.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.377: %SubobjectDestroy.type = facet_value %Dest2, (%custom_witness.5760f4.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.db5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.377) [concrete] +// CHECK:STDOUT: %Destroy.facet.04c: %Destroy.type = facet_value %Dest2, (%DestroyImpl.impl_witness.db5, %custom_witness.5760f4.2) [concrete] // CHECK:STDOUT: %ExplicitConstructor: type = class_type @ExplicitConstructor [concrete] -// CHECK:STDOUT: %pattern_type.eae: type = pattern_type %ExplicitConstructor [concrete] // CHECK:STDOUT: %ptr.5f6: type = ptr_type %Source [concrete] // CHECK:STDOUT: %ptr.44f: type = ptr_type %ExplicitConstructor [concrete] // CHECK:STDOUT: %ExplicitConstructor__carbon_thunk.type: type = fn_type @ExplicitConstructor__carbon_thunk [concrete] // CHECK:STDOUT: %ExplicitConstructor__carbon_thunk: %ExplicitConstructor__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.d18: %pattern_type.eae = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.94a: %pattern_type.eae = wrapper_binding_pattern self, %self.param_patt.d18 [concrete] -// CHECK:STDOUT: %ExplicitConstructor.cpp_destructor.type: type = fn_type @ExplicitConstructor.cpp_destructor [concrete] -// CHECK:STDOUT: %ExplicitConstructor.cpp_destructor: %ExplicitConstructor.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %ExplicitConstructor.Op.type: type = fn_type @ExplicitConstructor.Op [concrete] +// CHECK:STDOUT: %ExplicitConstructor.Op: %ExplicitConstructor.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.3: = custom_witness (%ExplicitConstructor.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7f0: %SubobjectDestroy.type = facet_value %ExplicitConstructor, (%custom_witness.5760f4.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.f27: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7f0) [concrete] +// CHECK:STDOUT: %Destroy.facet.ef5: %Destroy.type = facet_value %ExplicitConstructor, (%DestroyImpl.impl_witness.f27, %custom_witness.5760f4.3) [concrete] // CHECK:STDOUT: %ExplicitConversion: type = class_type @ExplicitConversion [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type.eb4c5e.2: type = fn_type @Dest__carbon_thunk.2 [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.c8e433.2: %Dest__carbon_thunk.type.eb4c5e.2 = struct_value () [concrete] @@ -195,11 +191,8 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Dest.cpp_destructor.decl: %Dest.cpp_destructor.type = fn_decl @Dest.cpp_destructor [concrete = constants.%Dest.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Source2.decl: type = class_decl @Source2 [concrete = constants.%Source2] {} {} // CHECK:STDOUT: %Dest2.decl: type = class_decl @Dest2 [concrete = constants.%Dest2] {} {} // CHECK:STDOUT: %Dest2__carbon_thunk.decl: %Dest2__carbon_thunk.type = fn_decl @Dest2__carbon_thunk [concrete = constants.%Dest2__carbon_thunk] { @@ -207,22 +200,12 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Dest2.cpp_destructor.decl: %Dest2.cpp_destructor.type = fn_decl @Dest2.cpp_destructor [concrete = constants.%Dest2.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %ExplicitConstructor.decl: type = class_decl @ExplicitConstructor [concrete = constants.%ExplicitConstructor] {} {} // CHECK:STDOUT: %ExplicitConstructor__carbon_thunk.decl: %ExplicitConstructor__carbon_thunk.type = fn_decl @ExplicitConstructor__carbon_thunk [concrete = constants.%ExplicitConstructor__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %ExplicitConstructor.cpp_destructor.decl: %ExplicitConstructor.cpp_destructor.type = fn_decl @ExplicitConstructor.cpp_destructor [concrete = constants.%ExplicitConstructor.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %ExplicitConversion.decl: type = class_decl @ExplicitConversion [concrete = constants.%ExplicitConversion] {} {} // CHECK:STDOUT: %Dest__carbon_thunk.decl.a8fbc1.2: %Dest__carbon_thunk.type.eb4c5e.2 = fn_decl @Dest__carbon_thunk.2 [concrete = constants.%Dest__carbon_thunk.c8e433.2] { // CHECK:STDOUT: @@ -231,30 +214,6 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b72 = ref_param_pattern [concrete = constants.%self.param_patt.581] -// CHECK:STDOUT: %self.patt: %pattern_type.b72 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.48a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Dest = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Dest = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc14 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a68 = ref_param_pattern [concrete = constants.%self.param_patt.2f7] -// CHECK:STDOUT: %self.patt: %pattern_type.a68 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7db] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Dest2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Dest2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc20 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.eae = ref_param_pattern [concrete = constants.%self.param_patt.d18] -// CHECK:STDOUT: %self.patt: %pattern_type.eae = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.94a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ExplicitConstructor = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ExplicitConstructor = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @UserConversion(%s.param: %Source) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.ref: %Source = name_ref s, %s @@ -266,21 +225,15 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %.loc8_5.2: init %Dest to %.loc8_5.1 = mark_in_place_init %Dest__carbon_thunk.call // CHECK:STDOUT: %.loc8_5.3: init %Dest = converted %s.ref, %.loc8_5.2 // CHECK:STDOUT: %.loc8_5.4: ref %Dest = temporary %.loc8_5.1, %.loc8_5.3 +// CHECK:STDOUT: %Destroy.facet.loc8_5.1: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc8_5.5: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc8_5.1 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %Destroy.facet.loc8_5.2: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc8_5.6: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc8_5.2 [concrete = constants.%Destroy.facet.bbf] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_5.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_5.4) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_5.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %Dest) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %Dest) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Dest.cpp_destructor.call: init %empty_tuple.type = call imports.%Dest.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @ConstructorConversion(%s.param: %Source2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.ref: %Source2 = name_ref s, %s @@ -294,21 +247,15 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %.loc14_5.2: init %Dest2 to %.loc14_5.1 = mark_in_place_init %Dest2__carbon_thunk.call // CHECK:STDOUT: %.loc14_5.3: init %Dest2 = converted %s.ref, %.loc14_5.2 // CHECK:STDOUT: %.loc14_5.4: ref %Dest2 = temporary %.loc14_5.1, %.loc14_5.3 +// CHECK:STDOUT: %Destroy.facet.loc14_5.1: %Destroy.type = facet_value constants.%Dest2, (constants.%DestroyImpl.impl_witness.db5, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.04c] +// CHECK:STDOUT: %.loc14_5.5: %Destroy.type = converted constants.%Dest2, %Destroy.facet.loc14_5.1 [concrete = constants.%Destroy.facet.04c] +// CHECK:STDOUT: %Destroy.facet.loc14_5.2: %Destroy.type = facet_value constants.%Dest2, (constants.%DestroyImpl.impl_witness.db5, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.04c] +// CHECK:STDOUT: %.loc14_5.6: %Destroy.type = converted constants.%Dest2, %Destroy.facet.loc14_5.2 [concrete = constants.%Destroy.facet.04c] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc14_5.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc14_5.4) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc14_5.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14(%self.param: ref %Dest2) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14(%self.param: ref %Dest2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Dest2.cpp_destructor.call: init %empty_tuple.type = call imports.%Dest2.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @ExplicitConstructorTest(%s.param: %Source) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.ref: %Source = name_ref s, %s @@ -322,21 +269,15 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %.loc20_5.2: init %ExplicitConstructor to %.loc20_5.1 = mark_in_place_init %ExplicitConstructor__carbon_thunk.call // CHECK:STDOUT: %.loc20_5.3: init %ExplicitConstructor = converted %s.ref, %.loc20_5.2 // CHECK:STDOUT: %.loc20_5.4: ref %ExplicitConstructor = temporary %.loc20_5.1, %.loc20_5.3 +// CHECK:STDOUT: %Destroy.facet.loc20_5.1: %Destroy.type = facet_value constants.%ExplicitConstructor, (constants.%DestroyImpl.impl_witness.f27, constants.%custom_witness.5760f4.3) [concrete = constants.%Destroy.facet.ef5] +// CHECK:STDOUT: %.loc20_5.5: %Destroy.type = converted constants.%ExplicitConstructor, %Destroy.facet.loc20_5.1 [concrete = constants.%Destroy.facet.ef5] +// CHECK:STDOUT: %Destroy.facet.loc20_5.2: %Destroy.type = facet_value constants.%ExplicitConstructor, (constants.%DestroyImpl.impl_witness.f27, constants.%custom_witness.5760f4.3) [concrete = constants.%Destroy.facet.ef5] +// CHECK:STDOUT: %.loc20_5.6: %Destroy.type = converted constants.%ExplicitConstructor, %Destroy.facet.loc20_5.2 [concrete = constants.%Destroy.facet.ef5] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc20_5.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc20_5.4) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc20_5.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20(%self.param: ref %ExplicitConstructor) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20(%self.param: ref %ExplicitConstructor) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %ExplicitConstructor.cpp_destructor.call: init %empty_tuple.type = call imports.%ExplicitConstructor.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @ExplicitConversionTest(%s.param: %ExplicitConversion) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.ref: %ExplicitConversion = name_ref s, %s @@ -348,8 +289,12 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %.loc26_5.2: init %Dest to %.loc26_5.1 = mark_in_place_init %Dest__carbon_thunk.call // CHECK:STDOUT: %.loc26_5.3: init %Dest = converted %s.ref, %.loc26_5.2 // CHECK:STDOUT: %.loc26_5.4: ref %Dest = temporary %.loc26_5.1, %.loc26_5.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc26_5.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc26_5.4) +// CHECK:STDOUT: %Destroy.facet.loc26_5.1: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc26_5.5: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc26_5.1 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %Destroy.facet.loc26_5.2: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc26_5.6: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc26_5.2 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc26_5.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -366,41 +311,39 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %ptr.bb5: type = ptr_type %ConditionallyExplicit.3cd [concrete] // CHECK:STDOUT: %ConditionallyExplicit__carbon_thunk.type.c9ab94.1: type = fn_type @ConditionallyExplicit__carbon_thunk.1 [concrete] // CHECK:STDOUT: %ConditionallyExplicit__carbon_thunk.924633.1: %ConditionallyExplicit__carbon_thunk.type.c9ab94.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ece: %pattern_type.be2 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ba3: %pattern_type.be2 = wrapper_binding_pattern self, %self.param_patt.ece [concrete] -// CHECK:STDOUT: %ConditionallyExplicit.cpp_destructor.type.634098.1: type = fn_type @ConditionallyExplicit.cpp_destructor.1 [concrete] -// CHECK:STDOUT: %ConditionallyExplicit.cpp_destructor.5dc792.1: %ConditionallyExplicit.cpp_destructor.type.634098.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %ConditionallyExplicit.Op.type.83af6e.1: type = fn_type @ConditionallyExplicit.Op.1 [concrete] +// CHECK:STDOUT: %ConditionallyExplicit.Op.4dca31.1: %ConditionallyExplicit.Op.type.83af6e.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.1: = custom_witness (%ConditionallyExplicit.Op.4dca31.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.474: %SubobjectDestroy.type = facet_value %ConditionallyExplicit.3cd, (%custom_witness.5760f4.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.5a2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.474) [concrete] +// CHECK:STDOUT: %Destroy.facet.03f: %Destroy.type = facet_value %ConditionallyExplicit.3cd, (%DestroyImpl.impl_witness.5a2, %custom_witness.5760f4.1) [concrete] // CHECK:STDOUT: %ConditionallyExplicit.9d4: type = class_type @ConditionallyExplicit.2 [concrete] -// CHECK:STDOUT: %pattern_type.04c: type = pattern_type %ConditionallyExplicit.9d4 [concrete] // CHECK:STDOUT: %ptr.4c0: type = ptr_type %ConditionallyExplicit.9d4 [concrete] // CHECK:STDOUT: %ConditionallyExplicit__carbon_thunk.type.c9ab94.2: type = fn_type @ConditionallyExplicit__carbon_thunk.2 [concrete] // CHECK:STDOUT: %ConditionallyExplicit__carbon_thunk.924633.2: %ConditionallyExplicit__carbon_thunk.type.c9ab94.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.9a8: %pattern_type.04c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.012: %pattern_type.04c = wrapper_binding_pattern self, %self.param_patt.9a8 [concrete] -// CHECK:STDOUT: %ConditionallyExplicit.cpp_destructor.type.634098.2: type = fn_type @ConditionallyExplicit.cpp_destructor.2 [concrete] -// CHECK:STDOUT: %ConditionallyExplicit.cpp_destructor.5dc792.2: %ConditionallyExplicit.cpp_destructor.type.634098.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %ConditionallyExplicit.Op.type.83af6e.2: type = fn_type @ConditionallyExplicit.Op.2 [concrete] +// CHECK:STDOUT: %ConditionallyExplicit.Op.4dca31.2: %ConditionallyExplicit.Op.type.83af6e.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.2: = custom_witness (%ConditionallyExplicit.Op.4dca31.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.451: %SubobjectDestroy.type = facet_value %ConditionallyExplicit.9d4, (%custom_witness.5760f4.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d74: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.451) [concrete] +// CHECK:STDOUT: %Destroy.facet.f46: %Destroy.type = facet_value %ConditionallyExplicit.9d4, (%DestroyImpl.impl_witness.d74, %custom_witness.5760f4.2) [concrete] // CHECK:STDOUT: %Dest: type = class_type @Dest [concrete] // CHECK:STDOUT: %pattern_type.b72: type = pattern_type %Dest [concrete] // CHECK:STDOUT: %_.patt.664: %pattern_type.b72 = value_binding_pattern _ [concrete] // CHECK:STDOUT: %ptr.ca8: type = ptr_type %Dest [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type: type = fn_type @Dest__carbon_thunk [concrete] // CHECK:STDOUT: %Dest__carbon_thunk: %Dest__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.581: %pattern_type.b72 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.48a: %pattern_type.b72 = wrapper_binding_pattern self, %self.param_patt.581 [concrete] -// CHECK:STDOUT: %Dest.cpp_destructor.type: type = fn_type @Dest.cpp_destructor [concrete] -// CHECK:STDOUT: %Dest.cpp_destructor: %Dest.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %Dest.Op.type: type = fn_type @Dest.Op [concrete] +// CHECK:STDOUT: %Dest.Op: %Dest.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.3: = custom_witness (%Dest.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ffa: %SubobjectDestroy.type = facet_value %Dest, (%custom_witness.5760f4.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.771: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ffa) [concrete] +// CHECK:STDOUT: %Destroy.facet.bbf: %Destroy.type = facet_value %Dest, (%DestroyImpl.impl_witness.771, %custom_witness.5760f4.3) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -418,57 +361,20 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %ConditionallyExplicit.cpp_destructor.decl.a7962a.1: %ConditionallyExplicit.cpp_destructor.type.634098.1 = fn_decl @ConditionallyExplicit.cpp_destructor.1 [concrete = constants.%ConditionallyExplicit.cpp_destructor.5dc792.1] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %ConditionallyExplicit.decl.6ab: type = class_decl @ConditionallyExplicit.2 [concrete = constants.%ConditionallyExplicit.9d4] {} {} // CHECK:STDOUT: %ConditionallyExplicit__carbon_thunk.decl.761528.2: %ConditionallyExplicit__carbon_thunk.type.c9ab94.2 = fn_decl @ConditionallyExplicit__carbon_thunk.2 [concrete = constants.%ConditionallyExplicit__carbon_thunk.924633.2] { // CHECK:STDOUT: // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %ConditionallyExplicit.cpp_destructor.decl.a7962a.2: %ConditionallyExplicit.cpp_destructor.type.634098.2 = fn_decl @ConditionallyExplicit.cpp_destructor.2 [concrete = constants.%ConditionallyExplicit.cpp_destructor.5dc792.2] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %Dest.decl: type = class_decl @Dest [concrete = constants.%Dest] {} {} // CHECK:STDOUT: %Dest__carbon_thunk.decl: %Dest__carbon_thunk.type = fn_decl @Dest__carbon_thunk [concrete = constants.%Dest__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Dest.cpp_destructor.decl: %Dest.cpp_destructor.type = fn_decl @Dest.cpp_destructor [concrete = constants.%Dest.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.be2 = ref_param_pattern [concrete = constants.%self.param_patt.ece] -// CHECK:STDOUT: %self.patt: %pattern_type.be2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ba3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ConditionallyExplicit.3cd = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ConditionallyExplicit.3cd = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc15 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.04c = ref_param_pattern [concrete = constants.%self.param_patt.9a8] -// CHECK:STDOUT: %self.patt: %pattern_type.04c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.012] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ConditionallyExplicit.9d4 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ConditionallyExplicit.9d4 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b72 = ref_param_pattern [concrete = constants.%self.param_patt.581] -// CHECK:STDOUT: %self.patt: %pattern_type.b72 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.48a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Dest = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Dest = wrapper_binding self, %self.param -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ConstructorNotExplicit(%s.param: %Source) { @@ -502,21 +408,19 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %.loc9_5.2: init %ConditionallyExplicit.3cd to %.loc9_5.1 = mark_in_place_init %ConditionallyExplicit__carbon_thunk.call.loc9 // CHECK:STDOUT: %.loc9_5.3: init %ConditionallyExplicit.3cd = converted %s.ref.loc9, %.loc9_5.2 // CHECK:STDOUT: %.loc9_5.4: ref %ConditionallyExplicit.3cd = temporary %.loc9_5.1, %.loc9_5.3 +// CHECK:STDOUT: %Destroy.facet.loc9_5.1: %Destroy.type = facet_value constants.%ConditionallyExplicit.3cd, (constants.%DestroyImpl.impl_witness.5a2, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.03f] +// CHECK:STDOUT: %.loc9_5.5: %Destroy.type = converted constants.%ConditionallyExplicit.3cd, %Destroy.facet.loc9_5.1 [concrete = constants.%Destroy.facet.03f] +// CHECK:STDOUT: %Destroy.facet.loc9_5.2: %Destroy.type = facet_value constants.%ConditionallyExplicit.3cd, (constants.%DestroyImpl.impl_witness.5a2, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.03f] +// CHECK:STDOUT: %.loc9_5.6: %Destroy.type = converted constants.%ConditionallyExplicit.3cd, %Destroy.facet.loc9_5.2 [concrete = constants.%Destroy.facet.03f] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_5.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_5.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_43.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_43.5) +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_5.4) +// CHECK:STDOUT: %Destroy.facet.loc8_43.1: %Destroy.type = facet_value constants.%ConditionallyExplicit.3cd, (constants.%DestroyImpl.impl_witness.5a2, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.03f] +// CHECK:STDOUT: %.loc8_43.7: %Destroy.type = converted constants.%ConditionallyExplicit.3cd, %Destroy.facet.loc8_43.1 [concrete = constants.%Destroy.facet.03f] +// CHECK:STDOUT: %Destroy.facet.loc8_43.2: %Destroy.type = facet_value constants.%ConditionallyExplicit.3cd, (constants.%DestroyImpl.impl_witness.5a2, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.03f] +// CHECK:STDOUT: %.loc8_43.8: %Destroy.type = converted constants.%ConditionallyExplicit.3cd, %Destroy.facet.loc8_43.2 [concrete = constants.%Destroy.facet.03f] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc8_43.5) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %ConditionallyExplicit.3cd) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %ConditionallyExplicit.3cd) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %ConditionallyExplicit.cpp_destructor.call: init %empty_tuple.type = call imports.%ConditionallyExplicit.cpp_destructor.decl.a7962a.1(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ConstructorExplicit(%s.param: %Source) { @@ -532,21 +436,15 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %.loc15_5.2: init %ConditionallyExplicit.9d4 to %.loc15_5.1 = mark_in_place_init %ConditionallyExplicit__carbon_thunk.call // CHECK:STDOUT: %.loc15_5.3: init %ConditionallyExplicit.9d4 = converted %s.ref, %.loc15_5.2 // CHECK:STDOUT: %.loc15_5.4: ref %ConditionallyExplicit.9d4 = temporary %.loc15_5.1, %.loc15_5.3 +// CHECK:STDOUT: %Destroy.facet.loc15_5.1: %Destroy.type = facet_value constants.%ConditionallyExplicit.9d4, (constants.%DestroyImpl.impl_witness.d74, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.f46] +// CHECK:STDOUT: %.loc15_5.5: %Destroy.type = converted constants.%ConditionallyExplicit.9d4, %Destroy.facet.loc15_5.1 [concrete = constants.%Destroy.facet.f46] +// CHECK:STDOUT: %Destroy.facet.loc15_5.2: %Destroy.type = facet_value constants.%ConditionallyExplicit.9d4, (constants.%DestroyImpl.impl_witness.d74, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.f46] +// CHECK:STDOUT: %.loc15_5.6: %Destroy.type = converted constants.%ConditionallyExplicit.9d4, %Destroy.facet.loc15_5.2 [concrete = constants.%Destroy.facet.f46] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc15_5.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc15_5.4) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_5.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15(%self.param: ref %ConditionallyExplicit.9d4) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15(%self.param: ref %ConditionallyExplicit.9d4) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %ConditionallyExplicit.cpp_destructor.call: init %empty_tuple.type = call imports.%ConditionallyExplicit.cpp_destructor.decl.a7962a.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @ConversionNotExplicit(%s.param: %ConditionallyExplicit.3cd) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.ref.loc21: %ConditionallyExplicit.3cd = name_ref s, %s @@ -574,21 +472,19 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %.loc22_5.2: init %Dest to %.loc22_5.1 = mark_in_place_init %Dest__carbon_thunk.call.loc22 // CHECK:STDOUT: %.loc22_5.3: init %Dest = converted %s.ref.loc22, %.loc22_5.2 // CHECK:STDOUT: %.loc22_5.4: ref %Dest = temporary %.loc22_5.1, %.loc22_5.3 +// CHECK:STDOUT: %Destroy.facet.loc22_5.1: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.3) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc22_5.5: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc22_5.1 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %Destroy.facet.loc22_5.2: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.3) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc22_5.6: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc22_5.2 [concrete = constants.%Destroy.facet.bbf] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %.loc22_5.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%.loc22_5.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21: = bound_method %.loc21_21.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21(%.loc21_21.4) +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc22_5.4) +// CHECK:STDOUT: %Destroy.facet.loc21_21.1: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.3) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc21_21.6: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc21_21.1 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %Destroy.facet.loc21_21.2: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.3) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc21_21.7: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc21_21.2 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc21: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc21_21.4) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22(%self.param: ref %Dest) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22(%self.param: ref %Dest) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Dest.cpp_destructor.call: init %empty_tuple.type = call imports.%Dest.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ConversionExplicit(%s.param: %ConditionallyExplicit.3cd) { @@ -602,8 +498,12 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %.loc28_5.2: init %Dest to %.loc28_5.1 = mark_in_place_init %Dest__carbon_thunk.call // CHECK:STDOUT: %.loc28_5.3: init %Dest = converted %s.ref, %.loc28_5.2 // CHECK:STDOUT: %.loc28_5.4: ref %Dest = temporary %.loc28_5.1, %.loc28_5.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc28_5.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc28_5.4) +// CHECK:STDOUT: %Destroy.facet.loc28_5.1: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.3) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc28_5.5: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc28_5.1 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %Destroy.facet.loc28_5.2: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.3) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc28_5.6: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc28_5.2 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc28_5.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -623,14 +523,17 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: %ptr.ca8: type = ptr_type %Dest.980 [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type: type = fn_type @Dest__carbon_thunk [concrete] // CHECK:STDOUT: %Dest__carbon_thunk: %Dest__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.581: %pattern_type.b72 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.48a: %pattern_type.b72 = wrapper_binding_pattern self, %self.param_patt.581 [concrete] -// CHECK:STDOUT: %Dest.cpp_destructor.type: type = fn_type @Dest.cpp_destructor [concrete] -// CHECK:STDOUT: %Dest.cpp_destructor: %Dest.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %Dest.Op.type: type = fn_type @Dest.Op [concrete] +// CHECK:STDOUT: %Dest.Op: %Dest.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%Dest.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ffa: %SubobjectDestroy.type = facet_value %Dest.980, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.771: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ffa) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Dest.980, (%DestroyImpl.impl_witness.771, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -650,21 +553,8 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Dest.cpp_destructor.decl: %Dest.cpp_destructor.type = fn_decl @Dest.cpp_destructor [concrete = constants.%Dest.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc17 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b72 = ref_param_pattern [concrete = constants.%self.param_patt.581] -// CHECK:STDOUT: %self.patt: %pattern_type.b72 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.48a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Dest.980 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Dest.980 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ConstructorExplicit(%s.param: %Source) { @@ -700,18 +590,12 @@ fn ConversionExplicit(s: Cpp.ConditionallyExplicitFalse) { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt: %pattern_type.b72 = value_binding_pattern _ [concrete = constants.%_.patt.664] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc17_21.1: %Destroy.type = facet_value constants.%Dest.980, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_21.6: %Destroy.type = converted constants.%Dest.980, %Destroy.facet.loc17_21.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc17_21.2: %Destroy.type = facet_value constants.%Dest.980, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_21.7: %Destroy.type = converted constants.%Dest.980, %Destroy.facet.loc17_21.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc17_21.4, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc17_21.4) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc17_21.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17(%self.param: ref %Dest.980) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17(%self.param: ref %Dest.980) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Dest.cpp_destructor.call: init %empty_tuple.type = call imports.%Dest.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/impls/destroy.carbon b/toolchain/check/testdata/interop/cpp/impls/destroy.carbon index 2e0cad081237..398c4e9f2f2f 100644 --- a/toolchain/check/testdata/interop/cpp/impls/destroy.carbon +++ b/toolchain/check/testdata/interop/cpp/impls/destroy.carbon @@ -77,9 +77,10 @@ class Derived { fn DestroyClassWithProtectedBaseDestructor() { //@dump-sem-ir-begin - // CHECK:STDERR: fail_todo_destroy_protected_base_destructor.carbon:[[@LINE+4]]:3-23: error: cannot access protected member `` of type `Cpp.ProtectedDestructor` [ClassInvalidMemberAccess] + // CHECK:STDERR: fail_todo_destroy_protected_base_destructor.carbon:[[@LINE+5]]:3-23: error: cannot access protected member `` of type `Cpp.ProtectedDestructor` [ClassInvalidMemberAccess] // CHECK:STDERR: included from: fail_todo_destroy_protected_base_destructor.carbon:[[@LINE-9]]:10 [InCppInclude] // CHECK:STDERR: ./types.h:33:3: note: declared here [ClassMemberDeclaration] + // CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: var unused a: Derived = {.base = {}}; //@dump-sem-ir-end @@ -98,9 +99,10 @@ class Derived { fn DestroyClassWithPrivateBaseDestructor() { //@dump-sem-ir-begin // TODO: We should not allow this, as the destructor of the base class is private. - // CHECK:STDERR: fail_destroy_private_base_destructor.carbon:[[@LINE+4]]:3-23: error: cannot access private member `` of type `Cpp.PrivateDestructor` [ClassInvalidMemberAccess] + // CHECK:STDERR: fail_destroy_private_base_destructor.carbon:[[@LINE+5]]:3-23: error: cannot access private member `` of type `Cpp.PrivateDestructor` [ClassInvalidMemberAccess] // CHECK:STDERR: included from: fail_destroy_private_base_destructor.carbon:[[@LINE-10]]:10 [InCppInclude] // CHECK:STDERR: ./types.h:28:3: note: declared here [ClassMemberDeclaration] + // CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: var unused a: Derived = {.base = {}}; //@dump-sem-ir-end @@ -124,25 +126,31 @@ fn AmbiguousDestroy() { } fn DeletedDestroy() { - // CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+4]]:3: error: attempt to use a deleted function [CppInteropParseError] + // CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+8]]:3: error: attempt to use a deleted function [CppInteropParseError] // CHECK:STDERR: included from: fail_destroy_nondestroyable.carbon:[[@LINE-15]]:10 [InCppInclude] // CHECK:STDERR: ./types.h:23:3: note: '~DeletedDestructor' has been explicitly marked deleted here [CppInteropParseNote] + // CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] + // CHECK:STDERR: + // CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+3]]:3-37: error: cannot convert type `Cpp.DeletedDestructor` into type implementing `Core.Destroy` [ConversionFailureTypeToFacet] + // CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: var unused a: Cpp.DeletedDestructor = {}; } fn PrivateDestroy() { - // CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+4]]:3-37: error: cannot access private member `` of type `Cpp.PrivateDestructor` [ClassInvalidMemberAccess] - // CHECK:STDERR: included from: fail_destroy_nondestroyable.carbon:[[@LINE-23]]:10 [InCppInclude] + // CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+5]]:3-37: error: cannot access private member `` of type `Cpp.PrivateDestructor` [ClassInvalidMemberAccess] + // CHECK:STDERR: included from: fail_destroy_nondestroyable.carbon:[[@LINE-27]]:10 [InCppInclude] // CHECK:STDERR: ./types.h:28:3: note: declared here [ClassMemberDeclaration] + // CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: var unused a: Cpp.PrivateDestructor = {}; } fn ProtectedDestroy() { - // CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+4]]:3-39: error: cannot access protected member `` of type `Cpp.ProtectedDestructor` [ClassInvalidMemberAccess] - // CHECK:STDERR: included from: fail_destroy_nondestroyable.carbon:[[@LINE-31]]:10 [InCppInclude] + // CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+5]]:3-39: error: cannot access protected member `` of type `Cpp.ProtectedDestructor` [ClassInvalidMemberAccess] + // CHECK:STDERR: included from: fail_destroy_nondestroyable.carbon:[[@LINE-36]]:10 [InCppInclude] // CHECK:STDERR: ./types.h:33:3: note: declared here [ClassMemberDeclaration] + // CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: var unused a: Cpp.ProtectedDestructor = {}; } @@ -180,9 +188,10 @@ class AdaptNoDestroy { fn Make() -> AdaptNoDestroy; fn F() { - // CHECK:STDERR: fail_no_destroy.carbon:[[@LINE+4]]:3: error: attempt to use a deleted function [CppInteropParseError] + // CHECK:STDERR: fail_no_destroy.carbon:[[@LINE+5]]:3: error: attempt to use a deleted function [CppInteropParseError] // CHECK:STDERR: included from: fail_no_destroy.carbon:[[@LINE-10]]:10 [InCppInclude] // CHECK:STDERR: ./types.h:23:3: note: '~DeletedDestructor' has been explicitly marked deleted here [CppInteropParseNote] + // CHECK:STDERR: min_prelude/parts/destroy.carbon:32:1-39: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: var _: AdaptNoDestroy = Make(); } @@ -202,19 +211,24 @@ fn F() { // CHECK:STDOUT: %a.var_patt.17b: %pattern_type.bdc = var_pattern %a.patt.e26 [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %PublicDestructor.val: %PublicDestructor = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.050: type = fn_type @Destroy.WithSelf.SubobjectDestroy, @Destroy.WithSelf(%Self) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.824: %Destroy.WithSelf.SubobjectDestroy.type.050 = struct_value () [symbolic] -// CHECK:STDOUT: %self.param_patt.5ea: %pattern_type.bdc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.81d: %pattern_type.bdc = wrapper_binding_pattern self, %self.param_patt.5ea [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %Self.09f: %SubobjectDestroy.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.cdd: type = fn_type @SubobjectDestroy.WithSelf.Op, @SubobjectDestroy.WithSelf(%Self.09f) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.81c: %SubobjectDestroy.WithSelf.Op.type.cdd = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %PublicDestructor.cpp_destructor.type: type = fn_type @PublicDestructor.cpp_destructor [concrete] // CHECK:STDOUT: %PublicDestructor.cpp_destructor: %PublicDestructor.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.c5a: = custom_witness (), @Destroy [concrete] +// CHECK:STDOUT: %custom_witness.867: = custom_witness (), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%PublicDestructor.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a76: %SubobjectDestroy.type = facet_value %PublicDestructor, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.981: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a76) [concrete] +// CHECK:STDOUT: %Destroy.facet.f4c: %Destroy.type = facet_value %PublicDestructor, (%DestroyImpl.impl_witness.981, %custom_witness.fe1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8f9: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.f4c) [concrete] // CHECK:STDOUT: %TrivialDestroy.type: type = fn_type @TrivialDestroy [concrete] // CHECK:STDOUT: %TrivialDestroy: %TrivialDestroy.type = struct_value () [concrete] // CHECK:STDOUT: %TrivialDestructor: type = class_type @TrivialDestructor [concrete] @@ -226,18 +240,19 @@ fn F() { // CHECK:STDOUT: %self.patt.01e: %pattern_type.a12 = wrapper_binding_pattern self, %self.param_patt.e73 [concrete] // CHECK:STDOUT: %TrivialDestructor.cpp_destructor.type: type = fn_type @TrivialDestructor.cpp_destructor [concrete] // CHECK:STDOUT: %TrivialDestructor.cpp_destructor: %TrivialDestructor.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc15 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.c09: %Destroy.type = facet_value %TrivialDestructor, (%custom_witness.c5a) [concrete] -// CHECK:STDOUT: %TrivialDestructor.SubobjectDestroy.type: type = fn_type @TrivialDestructor.SubobjectDestroy [concrete] -// CHECK:STDOUT: %TrivialDestructor.SubobjectDestroy: %TrivialDestructor.SubobjectDestroy.type = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ba2: %SubobjectDestroy.type = facet_value %TrivialDestructor, (%custom_witness.867) [concrete] +// CHECK:STDOUT: %TrivialDestructor.Op.type: type = fn_type @TrivialDestructor.Op [concrete] +// CHECK:STDOUT: %TrivialDestructor.Op: %TrivialDestructor.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%TrivialDestructor.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b3b: %SubobjectDestroy.type = facet_value %TrivialDestructor, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.da5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b3b) [concrete] +// CHECK:STDOUT: %Destroy.facet.b68: %Destroy.type = facet_value %TrivialDestructor, (%DestroyImpl.impl_witness.da5, %custom_witness.576) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.026: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.b68) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -247,15 +262,10 @@ fn F() { // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } // CHECK:STDOUT: %PublicDestructor.decl: type = class_decl @PublicDestructor [concrete = constants.%PublicDestructor] {} {} -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.050 = fn_decl @Destroy.WithSelf.SubobjectDestroy [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SubobjectDestroy (constants.%Destroy.WithSelf.SubobjectDestroy.824)] {} {} -// CHECK:STDOUT: %PublicDestructor.cpp_destructor.decl: %PublicDestructor.cpp_destructor.type = fn_decl @PublicDestructor.cpp_destructor [concrete = constants.%PublicDestructor.cpp_destructor] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bdc = ref_param_pattern [concrete = constants.%self.param_patt.5ea] -// CHECK:STDOUT: %self.patt: %pattern_type.bdc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.81d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %PublicDestructor = ref_param call_param0 -// CHECK:STDOUT: %self: ref %PublicDestructor = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.decl: %SubobjectDestroy.WithSelf.Op.type.cdd = fn_decl @SubobjectDestroy.WithSelf.Op [symbolic = @SubobjectDestroy.WithSelf.%SubobjectDestroy.WithSelf.Op (constants.%SubobjectDestroy.WithSelf.Op.81c)] {} {} +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %TrivialDestructor.decl: type = class_decl @TrivialDestructor [concrete = constants.%TrivialDestructor] {} {} // CHECK:STDOUT: %TrivialDestructor.cpp_destructor.decl: %TrivialDestructor.cpp_destructor.type = fn_decl @TrivialDestructor.cpp_destructor [concrete = constants.%TrivialDestructor.cpp_destructor] { // CHECK:STDOUT: %self.param_patt: %pattern_type.a12 = ref_param_pattern [concrete = constants.%self.param_patt.e73] @@ -266,23 +276,6 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bdc = ref_param_pattern [concrete = constants.%self.param_patt.5ea] -// CHECK:STDOUT: %self.patt: %pattern_type.bdc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.81d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %PublicDestructor = ref_param call_param0 -// CHECK:STDOUT: %self: ref %PublicDestructor = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc15 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a12 = ref_param_pattern [concrete = constants.%self.param_patt.e73] -// CHECK:STDOUT: %self.patt: %pattern_type.a12 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.01e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %TrivialDestructor = ref_param call_param0 -// CHECK:STDOUT: %self: ref %TrivialDestructor = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -321,8 +314,8 @@ fn F() { // CHECK:STDOUT: %a.var: ref %PublicDestructor = var_storage %a.var_patt // CHECK:STDOUT: %.loc11_41.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc11_41.2: init %PublicDestructor to %a.var = class_init () [concrete = constants.%PublicDestructor.val] -// CHECK:STDOUT: %.loc11_3: init %PublicDestructor = converted %.loc11_41.1, %.loc11_41.2 [concrete = constants.%PublicDestructor.val] -// CHECK:STDOUT: assign %a.var, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %PublicDestructor = converted %.loc11_41.1, %.loc11_41.2 [concrete = constants.%PublicDestructor.val] +// CHECK:STDOUT: assign %a.var, %.loc11_3.1 // CHECK:STDOUT: %.loc11_20: type = splice_block %PublicDestructor.ref [concrete = constants.%PublicDestructor] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %PublicDestructor.ref: type = name_ref PublicDestructor, imports.%PublicDestructor.decl [concrete = constants.%PublicDestructor] @@ -332,29 +325,24 @@ fn F() { // CHECK:STDOUT: %a.patt: %pattern_type.bdc = ref_binding_pattern a [concrete = constants.%a.patt.e26] // CHECK:STDOUT: %a.var_patt: %pattern_type.bdc = var_pattern %a.patt [concrete = constants.%a.var_patt.17b] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%PublicDestructor, (constants.%DestroyImpl.impl_witness.981, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.f4c] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%PublicDestructor, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.f4c] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%PublicDestructor, (constants.%DestroyImpl.impl_witness.981, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.f4c] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%PublicDestructor, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.f4c] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.f4c) [concrete = constants.%SelfDestruct.specific_fn.8f9] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @PublicDestructor.cpp_destructor(%self.param: ref %PublicDestructor); // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %PublicDestructor) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %PublicDestructor) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %PublicDestructor.cpp_destructor.call: init %empty_tuple.type = call imports.%PublicDestructor.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @TrivialDestroy() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.var: ref %TrivialDestructor = var_storage %a.var_patt // CHECK:STDOUT: %.loc15_42.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc15_42.2: init %TrivialDestructor to %a.var = class_init () [concrete = constants.%TrivialDestructor.val] -// CHECK:STDOUT: %.loc15_3: init %TrivialDestructor = converted %.loc15_42.1, %.loc15_42.2 [concrete = constants.%TrivialDestructor.val] -// CHECK:STDOUT: assign %a.var, %.loc15_3 +// CHECK:STDOUT: %.loc15_3.1: init %TrivialDestructor = converted %.loc15_42.1, %.loc15_42.2 [concrete = constants.%TrivialDestructor.val] +// CHECK:STDOUT: assign %a.var, %.loc15_3.1 // CHECK:STDOUT: %.loc15_20: type = splice_block %TrivialDestructor.ref [concrete = constants.%TrivialDestructor] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %TrivialDestructor.ref: type = name_ref TrivialDestructor, imports.%TrivialDestructor.decl [concrete = constants.%TrivialDestructor] @@ -364,33 +352,21 @@ fn F() { // CHECK:STDOUT: %a.patt: %pattern_type.a12 = ref_binding_pattern a [concrete = constants.%a.patt.b64] // CHECK:STDOUT: %a.var_patt: %pattern_type.a12 = var_pattern %a.patt [concrete = constants.%a.var_patt.d25] // CHECK:STDOUT: } -// CHECK:STDOUT: %TrivialDestructor.SubobjectDestroy.decl: %TrivialDestructor.SubobjectDestroy.type = fn_decl @TrivialDestructor.SubobjectDestroy [concrete = constants.%TrivialDestructor.SubobjectDestroy] { -// CHECK:STDOUT: %.1: %pattern_type.a12 = specific_constant constants.%self.param_patt.e73, @Destroy.WithSelf.SubobjectDestroy(constants.%Destroy.facet.c09) [concrete = constants.%self.param_patt.e73] -// CHECK:STDOUT: %self.patt: %pattern_type.a12 = wrapper_binding_pattern self, %.1 [concrete = constants.%self.patt.01e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %TrivialDestructor = ref_param call_param0 -// CHECK:STDOUT: %self: ref %TrivialDestructor = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%TrivialDestructor, (constants.%DestroyImpl.impl_witness.da5, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.b68] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%TrivialDestructor, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.b68] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%TrivialDestructor, (constants.%DestroyImpl.impl_witness.da5, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.b68] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%TrivialDestructor, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.b68] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.b68) [concrete = constants.%SelfDestruct.specific_fn.026] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @TrivialDestructor.cpp_destructor(%self.param: ref %TrivialDestructor) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc15(%self.param: ref %TrivialDestructor) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc15(%self.param: ref %TrivialDestructor) { +// CHECK:STDOUT: fn @TrivialDestructor.Op(%self.param: ref %TrivialDestructor) [thunk imports.%TrivialDestructor.cpp_destructor.decl for imports.%SubobjectDestroy.WithSelf.Op.decl, @SubobjectDestroy.WithSelf.Op(constants.%SubobjectDestroy.facet.ba2)] { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %TrivialDestructor.cpp_destructor.call: init %empty_tuple.type = call imports.%TrivialDestructor.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @TrivialDestructor.SubobjectDestroy(%self.param: ref %TrivialDestructor) [thunk imports.%TrivialDestructor.cpp_destructor.decl for imports.%Destroy.WithSelf.SubobjectDestroy.decl, @Destroy.WithSelf.SubobjectDestroy(constants.%Destroy.facet.c09)] { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %SubobjectDestroy.ref: %TrivialDestructor.cpp_destructor.type = name_ref SubobjectDestroy, imports.%TrivialDestructor.cpp_destructor.decl [concrete = constants.%TrivialDestructor.cpp_destructor] -// CHECK:STDOUT: %TrivialDestructor.cpp_destructor.bound: = bound_method %self.param, %SubobjectDestroy.ref +// CHECK:STDOUT: %Op.ref: %TrivialDestructor.cpp_destructor.type = name_ref Op, imports.%TrivialDestructor.cpp_destructor.decl [concrete = constants.%TrivialDestructor.cpp_destructor] +// CHECK:STDOUT: %TrivialDestructor.cpp_destructor.bound: = bound_method %self.param, %Op.ref // CHECK:STDOUT: %TrivialDestructor.cpp_destructor.call: init %empty_tuple.type = call %TrivialDestructor.cpp_destructor.bound(%self.param) // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -415,142 +391,79 @@ fn F() { // CHECK:STDOUT: %empty_struct.ec1: %.a6c = struct_value () [concrete] // CHECK:STDOUT: %ProtectedDestructor.val: %ProtectedDestructor = struct_value () [concrete] // CHECK:STDOUT: %Derived.val: %Derived = struct_value (%ProtectedDestructor.val) [concrete] -// CHECK:STDOUT: %pattern_type.b4a: type = pattern_type %ProtectedDestructor [concrete] -// CHECK:STDOUT: %self.param_patt.446: %pattern_type.b4a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.26a: %pattern_type.b4a = wrapper_binding_pattern self, %self.param_patt.446 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %ProtectedDestructor.cpp_destructor.type: type = fn_type @ProtectedDestructor.cpp_destructor [concrete] // CHECK:STDOUT: %ProtectedDestructor.cpp_destructor: %ProtectedDestructor.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc16_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.237: type = pattern_type %struct_type.base.454 [concrete] -// CHECK:STDOUT: %self.param_patt.2b9: %pattern_type.237 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.caa: %pattern_type.237 = wrapper_binding_pattern self, %self.param_patt.2b9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc16_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a2b: %pattern_type.746 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d8a: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt.a2b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc16_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%ProtectedDestructor.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e5d: %SubobjectDestroy.type = facet_value %ProtectedDestructor, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.721: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e5d) [concrete] +// CHECK:STDOUT: %Destroy.facet.fe4: %Destroy.type = facet_value %ProtectedDestructor, (%DestroyImpl.impl_witness.721, %custom_witness.fe1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc17_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.1fc: %SubobjectDestroy.type = facet_value %Derived, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.660: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.1fc) [concrete] +// CHECK:STDOUT: %Destroy.facet.35d: %Destroy.type = facet_value %Derived, (%DestroyImpl.impl_witness.660, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %ProtectedDestructor.cpp_destructor.decl: %ProtectedDestructor.cpp_destructor.type = fn_decl @ProtectedDestructor.cpp_destructor [concrete = constants.%ProtectedDestructor.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc16_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b4a = ref_param_pattern [concrete = constants.%self.param_patt.446] -// CHECK:STDOUT: %self.patt: %pattern_type.b4a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.26a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ProtectedDestructor = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ProtectedDestructor = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.237 = ref_param_pattern [concrete = constants.%self.param_patt.2b9] -// CHECK:STDOUT: %self.patt: %pattern_type.237 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.caa] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.454 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.454 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc16_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.237 = ref_param_pattern [concrete = constants.%self.param_patt.2b9] -// CHECK:STDOUT: %self.patt: %pattern_type.237 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.caa] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.454 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.454 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.746 = ref_param_pattern [concrete = constants.%self.param_patt.a2b] -// CHECK:STDOUT: %self.patt: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d8a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Derived = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Derived = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc16_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.746 = ref_param_pattern [concrete = constants.%self.param_patt.a2b] -// CHECK:STDOUT: %self.patt: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d8a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Derived = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Derived = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyClassWithProtectedBaseDestructor() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.var: ref %Derived = var_storage %a.var_patt -// CHECK:STDOUT: %.loc16_37.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct.a40] -// CHECK:STDOUT: %.loc16_38.1: %struct_type.base.f5e = struct_literal (%.loc16_37.1) [concrete = constants.%struct] -// CHECK:STDOUT: %.loc16_38.2: ref %.a6c = class_element_access %a.var, element0 -// CHECK:STDOUT: %.loc16_37.2: init %.a6c to %.loc16_38.2 = class_init () [concrete = constants.%empty_struct.ec1] -// CHECK:STDOUT: %.loc16_38.3: init %.a6c = converted %.loc16_37.1, %.loc16_37.2 [concrete = constants.%empty_struct.ec1] -// CHECK:STDOUT: %.loc16_38.4: init %ProtectedDestructor = as_compatible %.loc16_38.3 [concrete = constants.%ProtectedDestructor.val] -// CHECK:STDOUT: %.loc16_38.5: init %Derived to %a.var = class_init (%.loc16_38.4) [concrete = constants.%Derived.val] -// CHECK:STDOUT: %.loc16_3: init %Derived = converted %.loc16_38.1, %.loc16_38.5 [concrete = constants.%Derived.val] -// CHECK:STDOUT: assign %a.var, %.loc16_3 +// CHECK:STDOUT: %.loc17_37.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct.a40] +// CHECK:STDOUT: %.loc17_38.1: %struct_type.base.f5e = struct_literal (%.loc17_37.1) [concrete = constants.%struct] +// CHECK:STDOUT: %.loc17_38.2: ref %.a6c = class_element_access %a.var, element0 +// CHECK:STDOUT: %.loc17_37.2: init %.a6c to %.loc17_38.2 = class_init () [concrete = constants.%empty_struct.ec1] +// CHECK:STDOUT: %.loc17_38.3: init %.a6c = converted %.loc17_37.1, %.loc17_37.2 [concrete = constants.%empty_struct.ec1] +// CHECK:STDOUT: %.loc17_38.4: init %ProtectedDestructor = as_compatible %.loc17_38.3 [concrete = constants.%ProtectedDestructor.val] +// CHECK:STDOUT: %.loc17_38.5: init %Derived to %a.var = class_init (%.loc17_38.4) [concrete = constants.%Derived.val] +// CHECK:STDOUT: %.loc17_3.1: init %Derived = converted %.loc17_38.1, %.loc17_38.5 [concrete = constants.%Derived.val] +// CHECK:STDOUT: assign %a.var, %.loc17_3.1 // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived] // CHECK:STDOUT: %a: ref %Derived = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %a.patt: %pattern_type.746 = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.746 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc17_3.1: %Destroy.type = facet_value constants.%Derived, (constants.%DestroyImpl.impl_witness.660, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: %.loc17_3.2: %Destroy.type = converted constants.%Derived, %Destroy.facet.loc17_3.1 [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: %Destroy.facet.loc17_3.2: %Destroy.type = facet_value constants.%Derived, (constants.%DestroyImpl.impl_witness.660, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: %.loc17_3.3: %Destroy.type = converted constants.%Derived, %Destroy.facet.loc17_3.2 [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.1(%self.param: ref %ProtectedDestructor) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.1(%self.param: ref %ProtectedDestructor) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17_3.1(%self.param: ref %struct_type.base.454) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %ProtectedDestructor.cpp_destructor.call: init %empty_tuple.type = call imports.%ProtectedDestructor.cpp_destructor.decl(%self.param) +// CHECK:STDOUT: %.loc17_3.1: ref %ProtectedDestructor = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc17_3.1: %Destroy.type = facet_value constants.%ProtectedDestructor, (constants.%DestroyImpl.impl_witness.721, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.fe4] +// CHECK:STDOUT: %.loc17_3.2: %Destroy.type = converted constants.%ProtectedDestructor, %Destroy.facet.loc17_3.1 [concrete = constants.%Destroy.facet.fe4] +// CHECK:STDOUT: %Destroy.facet.loc17_3.2: %Destroy.type = facet_value constants.%ProtectedDestructor, (constants.%DestroyImpl.impl_witness.721, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.fe4] +// CHECK:STDOUT: %.loc17_3.3: %Destroy.type = converted constants.%ProtectedDestructor, %Destroy.facet.loc17_3.2 [concrete = constants.%Destroy.facet.fe4] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc17_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.1(%self.param: ref %struct_type.base.454) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16: ref %ProtectedDestructor = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc16) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.2(%self.param: ref %struct_type.base.454) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.2(%self.param: ref %struct_type.base.454) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_3.2(%self.param: ref %Derived) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17_3.2(%self.param: ref %Derived) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %base.ref: %Derived.elem = name_ref base, @Derived.%.loc7 [concrete = @Derived.%.loc7] -// CHECK:STDOUT: %.loc16: ref %ProtectedDestructor = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc16) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_3.3(%self.param: ref %Derived) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_3.3(%self.param: ref %Derived) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc17_3.1: ref %ProtectedDestructor = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc17_3.1: %Destroy.type = facet_value constants.%ProtectedDestructor, (constants.%DestroyImpl.impl_witness.721, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.fe4] +// CHECK:STDOUT: %.loc17_3.2: %Destroy.type = converted constants.%ProtectedDestructor, %Destroy.facet.loc17_3.1 [concrete = constants.%Destroy.facet.fe4] +// CHECK:STDOUT: %Destroy.facet.loc17_3.2: %Destroy.type = facet_value constants.%ProtectedDestructor, (constants.%DestroyImpl.impl_witness.721, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.fe4] +// CHECK:STDOUT: %.loc17_3.3: %Destroy.type = converted constants.%ProtectedDestructor, %Destroy.facet.loc17_3.2 [concrete = constants.%Destroy.facet.fe4] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc17_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -574,142 +487,79 @@ fn F() { // CHECK:STDOUT: %empty_struct.d8b: %.c73 = struct_value () [concrete] // CHECK:STDOUT: %PrivateDestructor.val: %PrivateDestructor = struct_value () [concrete] // CHECK:STDOUT: %Derived.val: %Derived = struct_value (%PrivateDestructor.val) [concrete] -// CHECK:STDOUT: %pattern_type.af2: type = pattern_type %PrivateDestructor [concrete] -// CHECK:STDOUT: %self.param_patt.bd1: %pattern_type.af2 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7ec: %pattern_type.af2 = wrapper_binding_pattern self, %self.param_patt.bd1 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %PrivateDestructor.cpp_destructor.type: type = fn_type @PrivateDestructor.cpp_destructor [concrete] // CHECK:STDOUT: %PrivateDestructor.cpp_destructor: %PrivateDestructor.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc17_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.9c9: type = pattern_type %struct_type.base.9aa [concrete] -// CHECK:STDOUT: %self.param_patt.a59: %pattern_type.9c9 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.078: %pattern_type.9c9 = wrapper_binding_pattern self, %self.param_patt.a59 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc17_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a2b: %pattern_type.746 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d8a: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt.a2b [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc17_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%PrivateDestructor.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.be1: %SubobjectDestroy.type = facet_value %PrivateDestructor, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a8a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.be1) [concrete] +// CHECK:STDOUT: %Destroy.facet.75a: %Destroy.type = facet_value %PrivateDestructor, (%DestroyImpl.impl_witness.a8a, %custom_witness.fe1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.1fc: %SubobjectDestroy.type = facet_value %Derived, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.660: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.1fc) [concrete] +// CHECK:STDOUT: %Destroy.facet.35d: %Destroy.type = facet_value %Derived, (%DestroyImpl.impl_witness.660, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %PrivateDestructor.cpp_destructor.decl: %PrivateDestructor.cpp_destructor.type = fn_decl @PrivateDestructor.cpp_destructor [concrete = constants.%PrivateDestructor.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc17_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.af2 = ref_param_pattern [concrete = constants.%self.param_patt.bd1] -// CHECK:STDOUT: %self.patt: %pattern_type.af2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7ec] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %PrivateDestructor = ref_param call_param0 -// CHECK:STDOUT: %self: ref %PrivateDestructor = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9c9 = ref_param_pattern [concrete = constants.%self.param_patt.a59] -// CHECK:STDOUT: %self.patt: %pattern_type.9c9 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.078] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.9aa = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.9aa = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc17_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9c9 = ref_param_pattern [concrete = constants.%self.param_patt.a59] -// CHECK:STDOUT: %self.patt: %pattern_type.9c9 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.078] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.base.9aa = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.base.9aa = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.746 = ref_param_pattern [concrete = constants.%self.param_patt.a2b] -// CHECK:STDOUT: %self.patt: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d8a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Derived = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Derived = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc17_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.746 = ref_param_pattern [concrete = constants.%self.param_patt.a2b] -// CHECK:STDOUT: %self.patt: %pattern_type.746 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d8a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Derived = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Derived = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyClassWithPrivateBaseDestructor() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.var: ref %Derived = var_storage %a.var_patt -// CHECK:STDOUT: %.loc17_37.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct.a40] -// CHECK:STDOUT: %.loc17_38.1: %struct_type.base.f5e = struct_literal (%.loc17_37.1) [concrete = constants.%struct] -// CHECK:STDOUT: %.loc17_38.2: ref %.c73 = class_element_access %a.var, element0 -// CHECK:STDOUT: %.loc17_37.2: init %.c73 to %.loc17_38.2 = class_init () [concrete = constants.%empty_struct.d8b] -// CHECK:STDOUT: %.loc17_38.3: init %.c73 = converted %.loc17_37.1, %.loc17_37.2 [concrete = constants.%empty_struct.d8b] -// CHECK:STDOUT: %.loc17_38.4: init %PrivateDestructor = as_compatible %.loc17_38.3 [concrete = constants.%PrivateDestructor.val] -// CHECK:STDOUT: %.loc17_38.5: init %Derived to %a.var = class_init (%.loc17_38.4) [concrete = constants.%Derived.val] -// CHECK:STDOUT: %.loc17_3: init %Derived = converted %.loc17_38.1, %.loc17_38.5 [concrete = constants.%Derived.val] -// CHECK:STDOUT: assign %a.var, %.loc17_3 +// CHECK:STDOUT: %.loc18_37.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct.a40] +// CHECK:STDOUT: %.loc18_38.1: %struct_type.base.f5e = struct_literal (%.loc18_37.1) [concrete = constants.%struct] +// CHECK:STDOUT: %.loc18_38.2: ref %.c73 = class_element_access %a.var, element0 +// CHECK:STDOUT: %.loc18_37.2: init %.c73 to %.loc18_38.2 = class_init () [concrete = constants.%empty_struct.d8b] +// CHECK:STDOUT: %.loc18_38.3: init %.c73 = converted %.loc18_37.1, %.loc18_37.2 [concrete = constants.%empty_struct.d8b] +// CHECK:STDOUT: %.loc18_38.4: init %PrivateDestructor = as_compatible %.loc18_38.3 [concrete = constants.%PrivateDestructor.val] +// CHECK:STDOUT: %.loc18_38.5: init %Derived to %a.var = class_init (%.loc18_38.4) [concrete = constants.%Derived.val] +// CHECK:STDOUT: %.loc18_3.1: init %Derived = converted %.loc18_38.1, %.loc18_38.5 [concrete = constants.%Derived.val] +// CHECK:STDOUT: assign %a.var, %.loc18_3.1 // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived] // CHECK:STDOUT: %a: ref %Derived = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %a.patt: %pattern_type.746 = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.746 = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%Derived, (constants.%DestroyImpl.impl_witness.660, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%Derived, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%Derived, (constants.%DestroyImpl.impl_witness.660, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%Derived, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.35d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_3.1(%self.param: ref %PrivateDestructor) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_3.1(%self.param: ref %PrivateDestructor) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_3.1(%self.param: ref %struct_type.base.9aa) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %PrivateDestructor.cpp_destructor.call: init %empty_tuple.type = call imports.%PrivateDestructor.cpp_destructor.decl(%self.param) +// CHECK:STDOUT: %.loc18_3.1: ref %PrivateDestructor = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%PrivateDestructor, (constants.%DestroyImpl.impl_witness.a8a, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.75a] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%PrivateDestructor, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.75a] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%PrivateDestructor, (constants.%DestroyImpl.impl_witness.a8a, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.75a] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%PrivateDestructor, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.75a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc18_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_3.1(%self.param: ref %struct_type.base.9aa) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc17: ref %PrivateDestructor = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc17, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc17) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_3.2(%self.param: ref %struct_type.base.9aa) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_3.2(%self.param: ref %struct_type.base.9aa) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17_3.2(%self.param: ref %Derived) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_3.2(%self.param: ref %Derived) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %base.ref: %Derived.elem = name_ref base, @Derived.%.loc7 [concrete = @Derived.%.loc7] -// CHECK:STDOUT: %.loc17: ref %PrivateDestructor = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc17, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc17) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17_3.3(%self.param: ref %Derived) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17_3.3(%self.param: ref %Derived) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc18_3.1: ref %PrivateDestructor = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%PrivateDestructor, (constants.%DestroyImpl.impl_witness.a8a, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.75a] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%PrivateDestructor, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.75a] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%PrivateDestructor, (constants.%DestroyImpl.impl_witness.a8a, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet.75a] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%PrivateDestructor, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.75a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc18_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon b/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon index 397fc1586cd8..cadb3a4ab7d1 100644 --- a/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon +++ b/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon @@ -353,14 +353,17 @@ fn InitFromStruct() { // CHECK:STDOUT: %ptr.ca8: type = ptr_type %Dest [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type.eb4c5e.1: type = fn_type @Dest__carbon_thunk.1 [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.c8e433.1: %Dest__carbon_thunk.type.eb4c5e.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.581: %pattern_type.b72 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.48a: %pattern_type.b72 = wrapper_binding_pattern self, %self.param_patt.581 [concrete] -// CHECK:STDOUT: %Dest.cpp_destructor.type: type = fn_type @Dest.cpp_destructor [concrete] -// CHECK:STDOUT: %Dest.cpp_destructor: %Dest.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %Dest.Op.type: type = fn_type @Dest.Op [concrete] +// CHECK:STDOUT: %Dest.Op: %Dest.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.1: = custom_witness (%Dest.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ffa: %SubobjectDestroy.type = facet_value %Dest, (%custom_witness.5760f4.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.771: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ffa) [concrete] +// CHECK:STDOUT: %Destroy.facet.bbf: %Destroy.type = facet_value %Dest, (%DestroyImpl.impl_witness.771, %custom_witness.5760f4.1) [concrete] // CHECK:STDOUT: %NonConstConversion.689: type = class_type @NonConstConversion.1 [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type.eb4c5e.2: type = fn_type @Dest__carbon_thunk.2 [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.c8e433.2: %Dest__carbon_thunk.type.eb4c5e.2 = struct_value () [concrete] @@ -372,14 +375,12 @@ fn InitFromStruct() { // CHECK:STDOUT: %ptr.802: type = ptr_type %Dest2 [concrete] // CHECK:STDOUT: %Dest2__carbon_thunk.type: type = fn_type @Dest2__carbon_thunk [concrete] // CHECK:STDOUT: %Dest2__carbon_thunk: %Dest2__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2f7: %pattern_type.a68 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7db: %pattern_type.a68 = wrapper_binding_pattern self, %self.param_patt.2f7 [concrete] -// CHECK:STDOUT: %Dest2.cpp_destructor.type: type = fn_type @Dest2.cpp_destructor [concrete] -// CHECK:STDOUT: %Dest2.cpp_destructor: %Dest2.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Dest2.Op.type: type = fn_type @Dest2.Op [concrete] +// CHECK:STDOUT: %Dest2.Op: %Dest2.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.2: = custom_witness (%Dest2.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.377: %SubobjectDestroy.type = facet_value %Dest2, (%custom_witness.5760f4.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.db5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.377) [concrete] +// CHECK:STDOUT: %Destroy.facet.04c: %Destroy.type = facet_value %Dest2, (%DestroyImpl.impl_witness.db5, %custom_witness.5760f4.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -398,11 +399,8 @@ fn InitFromStruct() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Dest.cpp_destructor.decl: %Dest.cpp_destructor.type = fn_decl @Dest.cpp_destructor [concrete = constants.%Dest.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %NonConstConversion.decl: type = class_decl @NonConstConversion.1 [concrete = constants.%NonConstConversion.689] {} {} // CHECK:STDOUT: %Dest__carbon_thunk.decl.a8fbc1.2: %Dest__carbon_thunk.type.eb4c5e.2 = fn_decl @Dest__carbon_thunk.2 [concrete = constants.%Dest__carbon_thunk.c8e433.2] { // CHECK:STDOUT: @@ -416,28 +414,6 @@ fn InitFromStruct() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Dest2.cpp_destructor.decl: %Dest2.cpp_destructor.type = fn_decl @Dest2.cpp_destructor [concrete = constants.%Dest2.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b72 = ref_param_pattern [concrete = constants.%self.param_patt.581] -// CHECK:STDOUT: %self.patt: %pattern_type.b72 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.48a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Dest = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Dest = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc20 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a68 = ref_param_pattern [concrete = constants.%self.param_patt.2f7] -// CHECK:STDOUT: %self.patt: %pattern_type.a68 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7db] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Dest2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Dest2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @UserConversion(%s.param: %Source) { @@ -458,21 +434,15 @@ fn InitFromStruct() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt: %pattern_type.b72 = value_binding_pattern _ [concrete = constants.%_.patt.664] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc8_21.1: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc8_21.6: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc8_21.1 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %Destroy.facet.loc8_21.2: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc8_21.7: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc8_21.2 [concrete = constants.%Destroy.facet.bbf] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_21.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_21.4) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_21.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %Dest) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %Dest) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Dest.cpp_destructor.call: init %empty_tuple.type = call imports.%Dest.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @NonConstConversion.loc12(%s.param: ref %NonConstConversion.689) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.ref: ref %NonConstConversion.689 = name_ref s, %s @@ -491,8 +461,12 @@ fn InitFromStruct() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt: %pattern_type.b72 = value_binding_pattern _ [concrete = constants.%_.patt.664] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc14_21.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc14_21.4) +// CHECK:STDOUT: %Destroy.facet.loc14_21.1: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc14_21.6: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc14_21.1 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %Destroy.facet.loc14_21.2: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc14_21.7: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc14_21.2 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc14_21.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -516,21 +490,15 @@ fn InitFromStruct() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt: %pattern_type.a68 = value_binding_pattern _ [concrete = constants.%_.patt.ff1] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc20_22.1: %Destroy.type = facet_value constants.%Dest2, (constants.%DestroyImpl.impl_witness.db5, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.04c] +// CHECK:STDOUT: %.loc20_22.7: %Destroy.type = converted constants.%Dest2, %Destroy.facet.loc20_22.1 [concrete = constants.%Destroy.facet.04c] +// CHECK:STDOUT: %Destroy.facet.loc20_22.2: %Destroy.type = facet_value constants.%Dest2, (constants.%DestroyImpl.impl_witness.db5, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.04c] +// CHECK:STDOUT: %.loc20_22.8: %Destroy.type = converted constants.%Dest2, %Destroy.facet.loc20_22.2 [concrete = constants.%Destroy.facet.04c] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc20_22.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc20_22.5) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc20_22.5) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc20(%self.param: ref %Dest2) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc20(%self.param: ref %Dest2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Dest2.cpp_destructor.call: init %empty_tuple.type = call imports.%Dest2.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_expr_category.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -579,14 +547,17 @@ fn InitFromStruct() { // CHECK:STDOUT: %ptr.859: type = ptr_type %InaccessibleConstructor [concrete] // CHECK:STDOUT: %InaccessibleConstructor__carbon_thunk.type: type = fn_type @InaccessibleConstructor__carbon_thunk [concrete] // CHECK:STDOUT: %InaccessibleConstructor__carbon_thunk: %InaccessibleConstructor__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.244: %pattern_type.824 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2ae: %pattern_type.824 = wrapper_binding_pattern self, %self.param_patt.244 [concrete] -// CHECK:STDOUT: %InaccessibleConstructor.cpp_destructor.type: type = fn_type @InaccessibleConstructor.cpp_destructor [concrete] -// CHECK:STDOUT: %InaccessibleConstructor.cpp_destructor: %InaccessibleConstructor.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %InaccessibleConstructor.Op.type: type = fn_type @InaccessibleConstructor.Op [concrete] +// CHECK:STDOUT: %InaccessibleConstructor.Op: %InaccessibleConstructor.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.1: = custom_witness (%InaccessibleConstructor.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6bb: %SubobjectDestroy.type = facet_value %InaccessibleConstructor, (%custom_witness.5760f4.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.8e4: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6bb) [concrete] +// CHECK:STDOUT: %Destroy.facet.8e3: %Destroy.type = facet_value %InaccessibleConstructor, (%DestroyImpl.impl_witness.8e4, %custom_witness.5760f4.1) [concrete] // CHECK:STDOUT: %InaccessibleConversion: type = class_type @InaccessibleConversion [concrete] // CHECK:STDOUT: %Dest: type = class_type @Dest [concrete] // CHECK:STDOUT: %pattern_type.b72: type = pattern_type %Dest [concrete] @@ -594,14 +565,12 @@ fn InitFromStruct() { // CHECK:STDOUT: %ptr.ca8: type = ptr_type %Dest [concrete] // CHECK:STDOUT: %Dest__carbon_thunk.type: type = fn_type @Dest__carbon_thunk [concrete] // CHECK:STDOUT: %Dest__carbon_thunk: %Dest__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.581: %pattern_type.b72 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.48a: %pattern_type.b72 = wrapper_binding_pattern self, %self.param_patt.581 [concrete] -// CHECK:STDOUT: %Dest.cpp_destructor.type: type = fn_type @Dest.cpp_destructor [concrete] -// CHECK:STDOUT: %Dest.cpp_destructor: %Dest.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Dest.Op.type: type = fn_type @Dest.Op [concrete] +// CHECK:STDOUT: %Dest.Op: %Dest.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.2: = custom_witness (%Dest.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ffa: %SubobjectDestroy.type = facet_value %Dest, (%custom_witness.5760f4.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.771: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ffa) [concrete] +// CHECK:STDOUT: %Destroy.facet.bbf: %Destroy.type = facet_value %Dest, (%DestroyImpl.impl_witness.771, %custom_witness.5760f4.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -619,11 +588,8 @@ fn InitFromStruct() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %InaccessibleConstructor.cpp_destructor.decl: %InaccessibleConstructor.cpp_destructor.type = fn_decl @InaccessibleConstructor.cpp_destructor [concrete = constants.%InaccessibleConstructor.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %InaccessibleConversion.decl: type = class_decl @InaccessibleConversion [concrete = constants.%InaccessibleConversion] {} {} // CHECK:STDOUT: %Dest.decl: type = class_decl @Dest [concrete = constants.%Dest] {} {} // CHECK:STDOUT: %Dest__carbon_thunk.decl: %Dest__carbon_thunk.type = fn_decl @Dest__carbon_thunk [concrete = constants.%Dest__carbon_thunk] { @@ -631,28 +597,6 @@ fn InitFromStruct() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Dest.cpp_destructor.decl: %Dest.cpp_destructor.type = fn_decl @Dest.cpp_destructor [concrete = constants.%Dest.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc12 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.824 = ref_param_pattern [concrete = constants.%self.param_patt.244] -// CHECK:STDOUT: %self.patt: %pattern_type.824 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2ae] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %InaccessibleConstructor = ref_param call_param0 -// CHECK:STDOUT: %self: ref %InaccessibleConstructor = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b72 = ref_param_pattern [concrete = constants.%self.param_patt.581] -// CHECK:STDOUT: %self.patt: %pattern_type.b72 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.48a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Dest = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Dest = wrapper_binding self, %self.param -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @InaccessibleConstructorTest(%s.param: %Source) { @@ -675,21 +619,15 @@ fn InitFromStruct() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt: %pattern_type.824 = value_binding_pattern _ [concrete = constants.%_.patt.f1f] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc12_40.1: %Destroy.type = facet_value constants.%InaccessibleConstructor, (constants.%DestroyImpl.impl_witness.8e4, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.8e3] +// CHECK:STDOUT: %.loc12_40.7: %Destroy.type = converted constants.%InaccessibleConstructor, %Destroy.facet.loc12_40.1 [concrete = constants.%Destroy.facet.8e3] +// CHECK:STDOUT: %Destroy.facet.loc12_40.2: %Destroy.type = facet_value constants.%InaccessibleConstructor, (constants.%DestroyImpl.impl_witness.8e4, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.8e3] +// CHECK:STDOUT: %.loc12_40.8: %Destroy.type = converted constants.%InaccessibleConstructor, %Destroy.facet.loc12_40.2 [concrete = constants.%Destroy.facet.8e3] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc12_40.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc12_40.5) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc12_40.5) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %InaccessibleConstructor) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12(%self.param: ref %InaccessibleConstructor) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %InaccessibleConstructor.cpp_destructor.call: init %empty_tuple.type = call imports.%InaccessibleConstructor.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @InaccessibleConversionTest(%s.param: %InaccessibleConversion) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %s.ref: %InaccessibleConversion = name_ref s, %s @@ -708,21 +646,15 @@ fn InitFromStruct() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt: %pattern_type.b72 = value_binding_pattern _ [concrete = constants.%_.patt.664] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc22_21.1: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc22_21.6: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc22_21.1 [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %Destroy.facet.loc22_21.2: %Destroy.type = facet_value constants.%Dest, (constants.%DestroyImpl.impl_witness.771, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.bbf] +// CHECK:STDOUT: %.loc22_21.7: %Destroy.type = converted constants.%Dest, %Destroy.facet.loc22_21.2 [concrete = constants.%Destroy.facet.bbf] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc22_21.4, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc22_21.4) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc22_21.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22(%self.param: ref %Dest) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22(%self.param: ref %Dest) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Dest.cpp_destructor.call: init %empty_tuple.type = call imports.%Dest.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_deleted.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -852,14 +784,17 @@ fn InitFromStruct() { // CHECK:STDOUT: %ptr.100: type = ptr_type %IntConstructor.372 [concrete] // CHECK:STDOUT: %IntConstructor__carbon_thunk.type: type = fn_type @IntConstructor__carbon_thunk [concrete] // CHECK:STDOUT: %IntConstructor__carbon_thunk: %IntConstructor__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ab8: %pattern_type.c4e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f11: %pattern_type.c4e = wrapper_binding_pattern self, %self.param_patt.ab8 [concrete] -// CHECK:STDOUT: %IntConstructor.cpp_destructor.type: type = fn_type @IntConstructor.cpp_destructor [concrete] -// CHECK:STDOUT: %IntConstructor.cpp_destructor: %IntConstructor.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %IntConstructor.Op.type: type = fn_type @IntConstructor.Op [concrete] +// CHECK:STDOUT: %IntConstructor.Op: %IntConstructor.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%IntConstructor.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b3e: %SubobjectDestroy.type = facet_value %IntConstructor.372, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1d9: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b3e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %IntConstructor.372, (%DestroyImpl.impl_witness.1d9, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -873,21 +808,8 @@ fn InitFromStruct() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %IntConstructor.cpp_destructor.decl: %IntConstructor.cpp_destructor.type = fn_decl @IntConstructor.cpp_destructor [concrete = constants.%IntConstructor.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c4e = ref_param_pattern [concrete = constants.%self.param_patt.ab8] -// CHECK:STDOUT: %self.patt: %pattern_type.c4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f11] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %IntConstructor.372 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %IntConstructor.372 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IntConstructor.loc6(%i.param: %i32) { @@ -908,21 +830,15 @@ fn InitFromStruct() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt: %pattern_type.c4e = value_binding_pattern _ [concrete = constants.%_.patt.151] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc8_31.1: %Destroy.type = facet_value constants.%IntConstructor.372, (constants.%DestroyImpl.impl_witness.1d9, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_31.6: %Destroy.type = converted constants.%IntConstructor.372, %Destroy.facet.loc8_31.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_31.2: %Destroy.type = facet_value constants.%IntConstructor.372, (constants.%DestroyImpl.impl_witness.1d9, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_31.7: %Destroy.type = converted constants.%IntConstructor.372, %Destroy.facet.loc8_31.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_31.4, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_31.4) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_31.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %IntConstructor.372) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %IntConstructor.372) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %IntConstructor.cpp_destructor.call: init %empty_tuple.type = call imports.%IntConstructor.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_no_u32_to_int_conversion_in_carbon.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -937,14 +853,17 @@ fn InitFromStruct() { // CHECK:STDOUT: %ptr.100: type = ptr_type %IntConstructor [concrete] // CHECK:STDOUT: %IntConstructor__carbon_thunk.type: type = fn_type @IntConstructor__carbon_thunk [concrete] // CHECK:STDOUT: %IntConstructor__carbon_thunk: %IntConstructor__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ab8: %pattern_type.c4e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f11: %pattern_type.c4e = wrapper_binding_pattern self, %self.param_patt.ab8 [concrete] -// CHECK:STDOUT: %IntConstructor.cpp_destructor.type: type = fn_type @IntConstructor.cpp_destructor [concrete] -// CHECK:STDOUT: %IntConstructor.cpp_destructor: %IntConstructor.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %IntConstructor.Op.type: type = fn_type @IntConstructor.Op [concrete] +// CHECK:STDOUT: %IntConstructor.Op: %IntConstructor.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%IntConstructor.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b3e: %SubobjectDestroy.type = facet_value %IntConstructor, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1d9: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b3e) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %IntConstructor, (%DestroyImpl.impl_witness.1d9, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -958,21 +877,8 @@ fn InitFromStruct() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %IntConstructor.cpp_destructor.decl: %IntConstructor.cpp_destructor.type = fn_decl @IntConstructor.cpp_destructor [concrete = constants.%IntConstructor.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc13 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c4e = ref_param_pattern [concrete = constants.%self.param_patt.ab8] -// CHECK:STDOUT: %self.patt: %pattern_type.c4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f11] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %IntConstructor = ref_param call_param0 -// CHECK:STDOUT: %self: ref %IntConstructor = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IntConstructorTest(%u.param: %u32) { @@ -994,21 +900,15 @@ fn InitFromStruct() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt: %pattern_type.c4e = value_binding_pattern _ [concrete = constants.%_.patt.151] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc13_31.1: %Destroy.type = facet_value constants.%IntConstructor, (constants.%DestroyImpl.impl_witness.1d9, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_31.7: %Destroy.type = converted constants.%IntConstructor, %Destroy.facet.loc13_31.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc13_31.2: %Destroy.type = facet_value constants.%IntConstructor, (constants.%DestroyImpl.impl_witness.1d9, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_31.8: %Destroy.type = converted constants.%IntConstructor, %Destroy.facet.loc13_31.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc13_31.5, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc13_31.5) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc13_31.5) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13(%self.param: ref %IntConstructor) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13(%self.param: ref %IntConstructor) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %IntConstructor.cpp_destructor.call: init %empty_tuple.type = call imports.%IntConstructor.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- default_constructor.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1021,14 +921,17 @@ fn InitFromStruct() { // CHECK:STDOUT: %ptr.c09: type = ptr_type %DefaultConstructor [concrete] // CHECK:STDOUT: %DefaultConstructor__carbon_thunk.type: type = fn_type @DefaultConstructor__carbon_thunk [concrete] // CHECK:STDOUT: %DefaultConstructor__carbon_thunk: %DefaultConstructor__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.91e: %pattern_type.be4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.221: %pattern_type.be4 = wrapper_binding_pattern self, %self.param_patt.91e [concrete] -// CHECK:STDOUT: %DefaultConstructor.cpp_destructor.type: type = fn_type @DefaultConstructor.cpp_destructor [concrete] -// CHECK:STDOUT: %DefaultConstructor.cpp_destructor: %DefaultConstructor.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %DefaultConstructor.Op.type: type = fn_type @DefaultConstructor.Op [concrete] +// CHECK:STDOUT: %DefaultConstructor.Op: %DefaultConstructor.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%DefaultConstructor.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.243: %SubobjectDestroy.type = facet_value %DefaultConstructor, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a71: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.243) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %DefaultConstructor, (%DestroyImpl.impl_witness.a71, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1042,21 +945,8 @@ fn InitFromStruct() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %DefaultConstructor.cpp_destructor.decl: %DefaultConstructor.cpp_destructor.type = fn_decl @DefaultConstructor.cpp_destructor [concrete = constants.%DefaultConstructor.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.be4 = ref_param_pattern [concrete = constants.%self.param_patt.91e] -// CHECK:STDOUT: %self.patt: %pattern_type.be4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.221] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultConstructor = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultConstructor = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @DefaultConstructorTest() { @@ -1077,21 +967,15 @@ fn InitFromStruct() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt: %pattern_type.be4 = value_binding_pattern _ [concrete = constants.%_.patt] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc9_36.1: %Destroy.type = facet_value constants.%DefaultConstructor, (constants.%DestroyImpl.impl_witness.a71, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_36.7: %Destroy.type = converted constants.%DefaultConstructor, %Destroy.facet.loc9_36.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_36.2: %Destroy.type = facet_value constants.%DefaultConstructor, (constants.%DestroyImpl.impl_witness.a71, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_36.8: %Destroy.type = converted constants.%DefaultConstructor, %Destroy.facet.loc9_36.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc9_36.5, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc9_36.5) +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc9_36.5) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %DefaultConstructor) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %DefaultConstructor) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %DefaultConstructor.cpp_destructor.call: init %empty_tuple.type = call imports.%DefaultConstructor.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: --- construct_multi_argument.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1140,22 +1024,23 @@ fn InitFromStruct() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.fb0: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.9f3: %i32 = int_value 3 [concrete] -// CHECK:STDOUT: %self.param_patt.ed0: %pattern_type.248 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.dca: %pattern_type.248 = wrapper_binding_pattern self, %self.param_patt.ed0 [concrete] -// CHECK:STDOUT: %ThreeWithDefault.cpp_destructor.type: type = fn_type @ThreeWithDefault.cpp_destructor [concrete] -// CHECK:STDOUT: %ThreeWithDefault.cpp_destructor: %ThreeWithDefault.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.df5: %pattern_type.586 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e0a: %pattern_type.586 = wrapper_binding_pattern self, %self.param_patt.df5 [concrete] -// CHECK:STDOUT: %Two.cpp_destructor.type: type = fn_type @Two.cpp_destructor [concrete] -// CHECK:STDOUT: %Two.cpp_destructor: %Two.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %ThreeWithDefault.Op.type: type = fn_type @ThreeWithDefault.Op [concrete] +// CHECK:STDOUT: %ThreeWithDefault.Op: %ThreeWithDefault.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.1: = custom_witness (%ThreeWithDefault.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.45f: %SubobjectDestroy.type = facet_value %ThreeWithDefault, (%custom_witness.5760f4.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e7f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.45f) [concrete] +// CHECK:STDOUT: %Destroy.facet.2d5: %Destroy.type = facet_value %ThreeWithDefault, (%DestroyImpl.impl_witness.e7f, %custom_witness.5760f4.1) [concrete] +// CHECK:STDOUT: %Two.Op.type: type = fn_type @Two.Op [concrete] +// CHECK:STDOUT: %Two.Op: %Two.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.2: = custom_witness (%Two.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.485: %SubobjectDestroy.type = facet_value %Two, (%custom_witness.5760f4.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c1c: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.485) [concrete] +// CHECK:STDOUT: %Destroy.facet.cc0: %Destroy.type = facet_value %Two, (%DestroyImpl.impl_witness.c1c, %custom_witness.5760f4.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1183,33 +1068,8 @@ fn InitFromStruct() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %ThreeWithDefault.cpp_destructor.decl: %ThreeWithDefault.cpp_destructor.type = fn_decl @ThreeWithDefault.cpp_destructor [concrete = constants.%ThreeWithDefault.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %Two.cpp_destructor.decl: %Two.cpp_destructor.type = fn_decl @Two.cpp_destructor [concrete = constants.%Two.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc12 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.248 = ref_param_pattern [concrete = constants.%self.param_patt.ed0] -// CHECK:STDOUT: %self.patt: %pattern_type.248 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.dca] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ThreeWithDefault = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ThreeWithDefault = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.586 = ref_param_pattern [concrete = constants.%self.param_patt.df5] -// CHECK:STDOUT: %self.patt: %pattern_type.586 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e0a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Two = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Two = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ImplicitConvert() { @@ -1318,33 +1178,25 @@ fn InitFromStruct() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt.loc12: %pattern_type.248 = value_binding_pattern _ [concrete = constants.%_.patt.368] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc12_41.1: %Destroy.type = facet_value constants.%ThreeWithDefault, (constants.%DestroyImpl.impl_witness.e7f, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.2d5] +// CHECK:STDOUT: %.loc12_41.7: %Destroy.type = converted constants.%ThreeWithDefault, %Destroy.facet.loc12_41.1 [concrete = constants.%Destroy.facet.2d5] +// CHECK:STDOUT: %Destroy.facet.loc12_41.2: %Destroy.type = facet_value constants.%ThreeWithDefault, (constants.%DestroyImpl.impl_witness.e7f, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.2d5] +// CHECK:STDOUT: %.loc12_41.8: %Destroy.type = converted constants.%ThreeWithDefault, %Destroy.facet.loc12_41.2 [concrete = constants.%Destroy.facet.2d5] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: = bound_method %.loc12_41.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%.loc12_41.5) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_38.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_38.5) +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc12_41.5) +// CHECK:STDOUT: %Destroy.facet.loc10_38.1: %Destroy.type = facet_value constants.%ThreeWithDefault, (constants.%DestroyImpl.impl_witness.e7f, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.2d5] +// CHECK:STDOUT: %.loc10_38.7: %Destroy.type = converted constants.%ThreeWithDefault, %Destroy.facet.loc10_38.1 [concrete = constants.%Destroy.facet.2d5] +// CHECK:STDOUT: %Destroy.facet.loc10_38.2: %Destroy.type = facet_value constants.%ThreeWithDefault, (constants.%DestroyImpl.impl_witness.e7f, constants.%custom_witness.5760f4.1) [concrete = constants.%Destroy.facet.2d5] +// CHECK:STDOUT: %.loc10_38.8: %Destroy.type = converted constants.%ThreeWithDefault, %Destroy.facet.loc10_38.2 [concrete = constants.%Destroy.facet.2d5] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_25.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_25.5) +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_38.5) +// CHECK:STDOUT: %Destroy.facet.loc8_25.1: %Destroy.type = facet_value constants.%Two, (constants.%DestroyImpl.impl_witness.c1c, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.cc0] +// CHECK:STDOUT: %.loc8_25.7: %Destroy.type = converted constants.%Two, %Destroy.facet.loc8_25.1 [concrete = constants.%Destroy.facet.cc0] +// CHECK:STDOUT: %Destroy.facet.loc8_25.2: %Destroy.type = facet_value constants.%Two, (constants.%DestroyImpl.impl_witness.c1c, constants.%custom_witness.5760f4.2) [concrete = constants.%Destroy.facet.cc0] +// CHECK:STDOUT: %.loc8_25.8: %Destroy.type = converted constants.%Two, %Destroy.facet.loc8_25.2 [concrete = constants.%Destroy.facet.cc0] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc8_25.5) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %ThreeWithDefault) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12(%self.param: ref %ThreeWithDefault) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %ThreeWithDefault.cpp_destructor.call: init %empty_tuple.type = call imports.%ThreeWithDefault.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %Two) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %Two) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Two.cpp_destructor.call: init %empty_tuple.type = call imports.%Two.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_aggregate_from_tuple.carbon @@ -1514,14 +1366,17 @@ fn InitFromStruct() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.a55: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.2e0: %i32 = int_value 2 [concrete] -// CHECK:STDOUT: %self.param_patt.06a: %pattern_type.273 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.968: %pattern_type.273 = wrapper_binding_pattern self, %self.param_patt.06a [concrete] -// CHECK:STDOUT: %NonAggregate.cpp_destructor.type: type = fn_type @NonAggregate.cpp_destructor [concrete] -// CHECK:STDOUT: %NonAggregate.cpp_destructor: %NonAggregate.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %NonAggregate.Op.type: type = fn_type @NonAggregate.Op [concrete] +// CHECK:STDOUT: %NonAggregate.Op: %NonAggregate.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%NonAggregate.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6e1: %SubobjectDestroy.type = facet_value %NonAggregate, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c3e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6e1) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %NonAggregate, (%DestroyImpl.impl_witness.c3e, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1547,21 +1402,8 @@ fn InitFromStruct() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %NonAggregate.cpp_destructor.decl: %NonAggregate.cpp_destructor.type = fn_decl @NonAggregate.cpp_destructor [concrete = constants.%NonAggregate.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.273 = ref_param_pattern [concrete = constants.%self.param_patt.06a] -// CHECK:STDOUT: %self.patt: %pattern_type.273 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.968] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %NonAggregate = ref_param call_param0 -// CHECK:STDOUT: %self: ref %NonAggregate = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @InitFromStruct() { @@ -1638,23 +1480,25 @@ fn InitFromStruct() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt.loc10: %pattern_type.273 = value_binding_pattern _ [concrete = constants.%_.patt] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc10_34.1: %Destroy.type = facet_value constants.%NonAggregate, (constants.%DestroyImpl.impl_witness.c3e, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_34.7: %Destroy.type = converted constants.%NonAggregate, %Destroy.facet.loc10_34.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_34.2: %Destroy.type = facet_value constants.%NonAggregate, (constants.%DestroyImpl.impl_witness.c3e, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_34.8: %Destroy.type = converted constants.%NonAggregate, %Destroy.facet.loc10_34.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_34.5, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_34.5) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_32.5, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_32.5) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_30.5, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_30.5) +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_34.5) +// CHECK:STDOUT: %Destroy.facet.loc9_32.1: %Destroy.type = facet_value constants.%NonAggregate, (constants.%DestroyImpl.impl_witness.c3e, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_32.7: %Destroy.type = converted constants.%NonAggregate, %Destroy.facet.loc9_32.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_32.2: %Destroy.type = facet_value constants.%NonAggregate, (constants.%DestroyImpl.impl_witness.c3e, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_32.8: %Destroy.type = converted constants.%NonAggregate, %Destroy.facet.loc9_32.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_32.5) +// CHECK:STDOUT: %Destroy.facet.loc8_30.1: %Destroy.type = facet_value constants.%NonAggregate, (constants.%DestroyImpl.impl_witness.c3e, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_30.7: %Destroy.type = converted constants.%NonAggregate, %Destroy.facet.loc8_30.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_30.2: %Destroy.type = facet_value constants.%NonAggregate, (constants.%DestroyImpl.impl_witness.c3e, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_30.8: %Destroy.type = converted constants.%NonAggregate, %Destroy.facet.loc8_30.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc8_30.5) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %NonAggregate) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %NonAggregate) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %NonAggregate.cpp_destructor.call: init %empty_tuple.type = call imports.%NonAggregate.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_non_aggregate_from_struct.carbon diff --git a/toolchain/check/testdata/interop/cpp/macros/macros.carbon b/toolchain/check/testdata/interop/cpp/macros/macros.carbon index af8796a12600..9e6f0bbbc270 100644 --- a/toolchain/check/testdata/interop/cpp/macros/macros.carbon +++ b/toolchain/check/testdata/interop/cpp/macros/macros.carbon @@ -1015,22 +1015,23 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %b.patt: %pattern_type.239 = value_binding_pattern b [concrete] // CHECK:STDOUT: %n.patt: %pattern_type.239 = ref_binding_pattern n [concrete] // CHECK:STDOUT: %n.var_patt: %pattern_type.239 = var_pattern %n.patt [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1050,37 +1051,8 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %n.patt: %pattern_type.239 = ref_binding_pattern n [concrete = constants.%n.patt] // CHECK:STDOUT: %n.var_patt: %pattern_type.239 = var_pattern %n.patt [concrete = constants.%n.var_patt] // CHECK:STDOUT: %n.var: ref %f32.3bc = var_storage %n.var_patt [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1098,8 +1070,8 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %.loc10_42.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc10_42.4: init %f32.3bc to %.loc10_42.3 = in_place_init %.loc10_42.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc10_42.5: init %Array.f2e to %a.var = array_init (%.loc10_42.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc10_3: init %Array.f2e = converted %.loc10_42.1, %.loc10_42.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: init %Array.f2e = converted %.loc10_42.1, %.loc10_42.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc10_3.1 // CHECK:STDOUT: %.loc10_33: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32.loc10: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1129,37 +1101,27 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %b.patt: %pattern_type.239 = value_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc10: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc10, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc10) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc10_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc10_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1764,6 +1726,10 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %Cpp.nullptr_t: type = class_type @NullptrT [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %uninit: %Cpp.nullptr_t = uninitialized_value [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] @@ -1772,25 +1738,23 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.781: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.e46: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness.781) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.238: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.e46) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.61e: = lookup_impl_witness %ptr.e8f, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.18b: = lookup_impl_witness %ptr.e8f, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.2cc: %Destroy.type = facet_value %ptr.e8f, (%DestroyImpl.lookup_impl_witness.18b, %SubobjectDestroy.lookup_impl_witness.61e) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.f11: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.2cc) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.None.type.629: type = fn_type @ptr.as.OptionalStorage.impl.None, @ptr.as.OptionalStorage.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.OptionalStorage.impl.None.f84: %ptr.as.OptionalStorage.impl.None.type.629 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.2: = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01daf.2, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.871: %Destroy.type = facet_value %ptr.a17, (%custom_witness.f8f19d.2) [concrete] -// CHECK:STDOUT: %MaybeUnformed.490: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.871) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d4d: %SubobjectDestroy.type = facet_value %ptr.a17, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b8f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d4d) [concrete] +// CHECK:STDOUT: %Destroy.facet.abb: %Destroy.type = facet_value %ptr.a17, (%DestroyImpl.impl_witness.b8f, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %MaybeUnformed.5f0: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.abb) [concrete] // CHECK:STDOUT: %OptionalStorage.impl_witness.d72: = impl_witness imports.%OptionalStorage.impl_witness_table.110, @ptr.as.OptionalStorage.impl(%i32) [concrete] // CHECK:STDOUT: %.31e: type = maybe_unformed_type %ptr.a17 [concrete] // CHECK:STDOUT: %OptionalStorage.facet.3c0: %OptionalStorage.type = facet_value %ptr.a17, (%OptionalStorage.impl_witness.d72) [concrete] // CHECK:STDOUT: %Optional.785: type = class_type @Optional, @Optional(%OptionalStorage.facet.3c0) [concrete] -// CHECK:STDOUT: %pattern_type.f33: type = pattern_type %Optional.785 [concrete] // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.51c: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.785)> [concrete] @@ -1805,28 +1769,12 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.bound: = bound_method %uninit, %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.9fa [concrete] // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.9fa, @Cpp.nullptr_t.as.ImplicitAs.impl.Convert(%i32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %uninit, %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.specific_fn [concrete] -// CHECK:STDOUT: %pattern_type.4b7: type = pattern_type %.31e [concrete] -// CHECK:STDOUT: %self.param_patt.b24: %pattern_type.4b7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3c5: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt.b24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_14.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc11_14.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.3f1: type = pattern_type %MaybeUnformed.490 [concrete] -// CHECK:STDOUT: %self.param_patt.500: %pattern_type.3f1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.aed: %pattern_type.3f1 = wrapper_binding_pattern self, %self.param_patt.500 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_14.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc11_14.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.c66: %pattern_type.f33 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.76b: %pattern_type.f33 = wrapper_binding_pattern self, %self.param_patt.c66 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_14.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc11_14.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_14.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_14.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b46: %SubobjectDestroy.type = facet_value %Optional.785, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.977: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b46) [concrete] +// CHECK:STDOUT: %Destroy.facet.acb: %Destroy.type = facet_value %Optional.785, (%DestroyImpl.impl_witness.977, %custom_witness.b80ef6.5) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1836,13 +1784,15 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete = constants.%foo.cpp_overload_set.value] -// CHECK:STDOUT: %Core.import_ref.0db: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.238)] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/cpp/nullptr, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.30b: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%MaybeUnformed (constants.%MaybeUnformed.f11)] // CHECK:STDOUT: %Core.import_ref.9ff: @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.None.type (%ptr.as.OptionalStorage.impl.None.type.629) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.OptionalStorage.impl.%ptr.as.OptionalStorage.impl.None (constants.%ptr.as.OptionalStorage.impl.None.f84)] // CHECK:STDOUT: %Core.import_ref.a1a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.322 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.0e8 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.713 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.0db, %Core.import_ref.9ff, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.110 = impl_witness_table (%Core.import_ref.30b, %Core.import_ref.9ff, %Core.import_ref.a1a, %Core.import_ref.322, %Core.import_ref.0e8, %Core.import_ref.713), @ptr.as.OptionalStorage.impl [concrete] // CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] { // CHECK:STDOUT: // CHECK:STDOUT: } { @@ -1859,51 +1809,6 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %ImplicitAs.impl_witness_table.71b = impl_witness_table (%Core.import_ref.d46), @Cpp.nullptr_t.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_14.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.b24] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3c5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.31e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.31e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc11_14.1 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4b7 = ref_param_pattern [concrete = constants.%self.param_patt.b24] -// CHECK:STDOUT: %self.patt: %pattern_type.4b7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3c5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.31e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.31e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_14.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f1 = ref_param_pattern [concrete = constants.%self.param_patt.500] -// CHECK:STDOUT: %self.patt: %pattern_type.3f1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aed] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.490 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.490 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc11_14.2 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.3f1 = ref_param_pattern [concrete = constants.%self.param_patt.500] -// CHECK:STDOUT: %self.patt: %pattern_type.3f1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aed] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.490 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.490 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_14.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f33 = ref_param_pattern [concrete = constants.%self.param_patt.c66] -// CHECK:STDOUT: %self.patt: %pattern_type.f33 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.76b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.785 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.785 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc11_14.3 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f33 = ref_param_pattern [concrete = constants.%self.param_patt.c66] -// CHECK:STDOUT: %self.patt: %pattern_type.f33 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.76b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.785 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.785 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Cpp.ref.loc11_3: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1921,43 +1826,20 @@ let _: C(1) = {} as C(Cpp.COUNT); // CHECK:STDOUT: %.loc11_14.3: ref %Optional.785 = temporary %.loc11_14.2, %.loc11_14.1 // CHECK:STDOUT: %.loc11_14.4: %Optional.785 = acquire_value %.loc11_14.3 // CHECK:STDOUT: %foo.call: init %empty_tuple.type = call imports.%foo.decl(%.loc11_14.4) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc11_14.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc11_14.3) +// CHECK:STDOUT: %Destroy.facet.loc11_14.1: %Destroy.type = facet_value constants.%Optional.785, (constants.%DestroyImpl.impl_witness.977, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.acb] +// CHECK:STDOUT: %.loc11_14.5: %Destroy.type = converted constants.%Optional.785, %Destroy.facet.loc11_14.1 [concrete = constants.%Destroy.facet.acb] +// CHECK:STDOUT: %Destroy.facet.loc11_14.2: %Destroy.type = facet_value constants.%Optional.785, (constants.%DestroyImpl.impl_witness.977, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.acb] +// CHECK:STDOUT: %.loc11_14.6: %Destroy.type = converted constants.%Optional.785, %Destroy.facet.loc11_14.2 [concrete = constants.%Destroy.facet.acb] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_14.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.1(%self.param: ref %.31e) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_14.1(%self.param: ref %.31e) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_14.1(%self.param: ref %.31e) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_14.2(%self.param: ref %MaybeUnformed.5f0) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_14.1(%self.param: ref %.31e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.2(%self.param: ref %MaybeUnformed.490) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_14.2(%self.param: ref %MaybeUnformed.490) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_14.2(%self.param: ref %MaybeUnformed.490) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_14.3(%self.param: ref %Optional.785) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_14.3(%self.param: ref %Optional.785) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_14.3(%self.param: ref %Optional.785) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_14.3(%self.param: ref %Optional.785) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- enums.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/namespace/import.carbon b/toolchain/check/testdata/interop/cpp/namespace/import.carbon index bd8bbdbe55d5..6549686ff468 100644 --- a/toolchain/check/testdata/interop/cpp/namespace/import.carbon +++ b/toolchain/check/testdata/interop/cpp/namespace/import.carbon @@ -478,18 +478,20 @@ fn F() { // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] -// CHECK:STDOUT: %pattern_type.b98: type = pattern_type %X [concrete] // CHECK:STDOUT: %ptr.614: type = ptr_type %X [concrete] // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.3ec: %pattern_type.b98 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.200: %pattern_type.b98 = wrapper_binding_pattern self, %self.param_patt.3ec [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %X.cpp_destructor.type: type = fn_type @X.cpp_destructor [concrete] // CHECK:STDOUT: %X.cpp_destructor: %X.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.1d5: = custom_witness (%X.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c4b: %SubobjectDestroy.type = facet_value %X, (%custom_witness.1d5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c08: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c4b) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.c08, %custom_witness.1d5) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -503,21 +505,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %X.cpp_destructor.decl: %X.cpp_destructor.type = fn_decl @X.cpp_destructor [concrete = constants.%X.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b98 = ref_param_pattern [concrete = constants.%self.param_patt.3ec] -// CHECK:STDOUT: %self.patt: %pattern_type.b98 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.200] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @MyF() { @@ -529,18 +518,13 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr) // CHECK:STDOUT: %.loc8_11.2: init %X to %.loc8_11.1 = mark_in_place_init %foo__carbon_thunk.call // CHECK:STDOUT: %.loc8_11.3: ref %X = temporary %.loc8_11.1, %.loc8_11.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc8_11.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc8_11.3) +// CHECK:STDOUT: %Destroy.facet.loc8_11.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.c08, constants.%custom_witness.1d5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.4: %Destroy.type = converted constants.%X, %Destroy.facet.loc8_11.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_11.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.c08, constants.%custom_witness.1d5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_11.5: %Destroy.type = converted constants.%X, %Destroy.facet.loc8_11.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc8_11.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %X) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %X.cpp_destructor.call: init %empty_tuple.type = call imports.%X.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_special_name_call_escpaed.carbon diff --git a/toolchain/check/testdata/interop/cpp/operators/arithmetic_operators.carbon b/toolchain/check/testdata/interop/cpp/operators/arithmetic_operators.carbon index 8230aa21e6b5..d5269197c7e0 100644 --- a/toolchain/check/testdata/interop/cpp/operators/arithmetic_operators.carbon +++ b/toolchain/check/testdata/interop/cpp/operators/arithmetic_operators.carbon @@ -311,197 +311,195 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.429: type = pattern_type %Destroy.type [concrete] -// CHECK:STDOUT: %Result.patt: %pattern_type.429 = symbolic_binding_pattern Result, 0 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type %Destroy.type [concrete] +// CHECK:STDOUT: %Result.patt: %pattern_type.9a587c.1 = symbolic_binding_pattern Result, 0 [symbolic] // CHECK:STDOUT: %Result: %Destroy.type = symbolic_binding Result, 0 [symbolic] -// CHECK:STDOUT: %U.patt.7a2: %pattern_type.429 = symbolic_binding_pattern U, 1 [symbolic] -// CHECK:STDOUT: %U.f40: %Destroy.type = symbolic_binding U, 1 [symbolic] +// CHECK:STDOUT: %U.patt.cb8: %pattern_type.9a587c.1 = symbolic_binding_pattern U, 1 [symbolic] +// CHECK:STDOUT: %U.e1f: %Destroy.type = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Other: type = symbolic_binding Other, 0 [symbolic] // CHECK:STDOUT: %AddWith.type.872: type = facet_type <@AddWith.1, @AddWith.1(%Other)> [symbolic] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] +// CHECK:STDOUT: %pattern_type.9a587c.2: type = pattern_type type [concrete] // CHECK:STDOUT: %Self.958: %AddWith.type.872 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %AddWith.assoc_type.1d5: type = assoc_entity_type @AddWith.1, @AddWith.1(%Other) [symbolic] // CHECK:STDOUT: %AddWith.WithSelf.Op.type.70b: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%Other, %Self.958) [symbolic] // CHECK:STDOUT: %AddWith.WithSelf.Op.bb1: %AddWith.WithSelf.Op.type.70b = struct_value () [symbolic] -// CHECK:STDOUT: %U.as_type.b61: type = facet_access_type %U.f40 [symbolic] -// CHECK:STDOUT: %AddWith.type.d58: type = facet_type <@AddWith.1, @AddWith.1(%U.as_type.b61)> [symbolic] -// CHECK:STDOUT: %facet_type.f36: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%U.as_type.b61)> [symbolic] -// CHECK:STDOUT: %.Self.frozen.03f: %facet_type.f36 = symbolic_binding .Self [symbolic] -// CHECK:STDOUT: %AddWith.assoc_type.964: type = assoc_entity_type @AddWith.1, @AddWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %assoc0.a1a: %AddWith.assoc_type.964 = assoc_entity element0, imports.%Core.import_ref.91f [symbolic] -// CHECK:STDOUT: %assoc1.261: %AddWith.assoc_type.964 = assoc_entity element1, imports.%Core.import_ref.8ad [symbolic] -// CHECK:STDOUT: %require_complete.621: = require_complete_type %facet_type.f36 [symbolic] -// CHECK:STDOUT: %.Self.frozen.as_type.464: type = facet_access_type %.Self.frozen.03f [symbolic] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.99b: = lookup_impl_witness %.Self.frozen.03f, @AddWith.1, @AddWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %impl.elem0.e85: type = impl_witness_access %AddWith.lookup_impl_witness.99b, element0 [symbolic] +// CHECK:STDOUT: %U.as_type.0bd: type = facet_access_type %U.e1f [symbolic] +// CHECK:STDOUT: %AddWith.type.4f5: type = facet_type <@AddWith.1, @AddWith.1(%U.as_type.0bd)> [symbolic] +// CHECK:STDOUT: %facet_type.4f5: type = facet_type <@AddWith.1, @AddWith.1(%U.as_type.0bd) & @Destroy> [symbolic] +// CHECK:STDOUT: %.Self.frozen.136: %facet_type.4f5 = symbolic_binding .Self [symbolic] +// CHECK:STDOUT: %AddWith.assoc_type.71f: type = assoc_entity_type @AddWith.1, @AddWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %assoc0.155: %AddWith.assoc_type.71f = assoc_entity element0, imports.%Core.import_ref.91f [symbolic] +// CHECK:STDOUT: %assoc1.f40: %AddWith.assoc_type.71f = assoc_entity element1, imports.%Core.import_ref.8ad [symbolic] +// CHECK:STDOUT: %require_complete.528878.1: = require_complete_type %facet_type.4f5 [symbolic] +// CHECK:STDOUT: %.Self.frozen.as_type.034: type = facet_access_type %.Self.frozen.136 [symbolic] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.0f3: = lookup_impl_witness %.Self.frozen.136, @AddWith.1, @AddWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %impl.elem0.1cd: type = impl_witness_access %AddWith.lookup_impl_witness.0f3, element0 [symbolic] // CHECK:STDOUT: %Result.as_type: type = facet_access_type %Result [symbolic] -// CHECK:STDOUT: %.Self.787: %facet_type.f36 = symbolic_binding .Self [symbolic] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.405: = lookup_impl_witness %.Self.787, @AddWith.1, @AddWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %impl.elem0.f14: type = impl_witness_access %AddWith.lookup_impl_witness.405, element0 [symbolic] -// CHECK:STDOUT: %facet_type.660: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%U.as_type.b61) where %impl.elem0.f14 = %Result.as_type> [symbolic] -// CHECK:STDOUT: %pattern_type.6b8: type = pattern_type %facet_type.660 [symbolic] -// CHECK:STDOUT: %T.patt.0a9: %pattern_type.6b8 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %T.dd6: %facet_type.660 = symbolic_binding T, 2 [symbolic] -// CHECK:STDOUT: %pattern_type.f4e485.2: type = pattern_type %Result.as_type [symbolic] -// CHECK:STDOUT: %result.param_patt.6ba: %pattern_type.f4e485.2 = value_param_pattern [symbolic] -// CHECK:STDOUT: %result.patt.c73b2c.1: %pattern_type.f4e485.2 = wrapper_binding_pattern result, %result.param_patt.6ba [symbolic] -// CHECK:STDOUT: %T.as_type.fe6: type = facet_access_type %T.dd6 [symbolic] -// CHECK:STDOUT: %pattern_type.0df: type = pattern_type %T.as_type.fe6 [symbolic] -// CHECK:STDOUT: %x.param_patt.018: %pattern_type.0df = value_param_pattern [symbolic] -// CHECK:STDOUT: %x.patt.3b5: %pattern_type.0df = wrapper_binding_pattern x, %x.param_patt.018 [symbolic] -// CHECK:STDOUT: %pattern_type.753: type = pattern_type %U.as_type.b61 [symbolic] -// CHECK:STDOUT: %y.param_patt.740: %pattern_type.753 = value_param_pattern [symbolic] -// CHECK:STDOUT: %y.patt.603: %pattern_type.753 = wrapper_binding_pattern y, %y.param_patt.740 [symbolic] -// CHECK:STDOUT: %require_complete.5dc: = require_complete_type %AddWith.type.d58 [symbolic] +// CHECK:STDOUT: %.Self.354: %facet_type.4f5 = symbolic_binding .Self [symbolic] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.ab5: = lookup_impl_witness %.Self.354, @AddWith.1, @AddWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %impl.elem0.2c2: type = impl_witness_access %AddWith.lookup_impl_witness.ab5, element0 [symbolic] +// CHECK:STDOUT: %facet_type.c17: type = facet_type <@AddWith.1, @AddWith.1(%U.as_type.0bd) & @Destroy where %impl.elem0.2c2 = %Result.as_type> [symbolic] +// CHECK:STDOUT: %pattern_type.fef: type = pattern_type %facet_type.c17 [symbolic] +// CHECK:STDOUT: %T.patt.910: %pattern_type.fef = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %T.21f: %facet_type.c17 = symbolic_binding T, 2 [symbolic] +// CHECK:STDOUT: %pattern_type.86a9db.1: type = pattern_type %Result.as_type [symbolic] +// CHECK:STDOUT: %result.param_patt.f86: %pattern_type.86a9db.1 = value_param_pattern [symbolic] +// CHECK:STDOUT: %result.patt.a71562.1: %pattern_type.86a9db.1 = wrapper_binding_pattern result, %result.param_patt.f86 [symbolic] +// CHECK:STDOUT: %T.as_type.d2e: type = facet_access_type %T.21f [symbolic] +// CHECK:STDOUT: %pattern_type.fab: type = pattern_type %T.as_type.d2e [symbolic] +// CHECK:STDOUT: %x.param_patt.947: %pattern_type.fab = value_param_pattern [symbolic] +// CHECK:STDOUT: %x.patt.edd: %pattern_type.fab = wrapper_binding_pattern x, %x.param_patt.947 [symbolic] +// CHECK:STDOUT: %pattern_type.eff: type = pattern_type %U.as_type.0bd [symbolic] +// CHECK:STDOUT: %y.param_patt.8c7: %pattern_type.eff = value_param_pattern [symbolic] +// CHECK:STDOUT: %y.patt.b5a: %pattern_type.eff = wrapper_binding_pattern y, %y.param_patt.8c7 [symbolic] +// CHECK:STDOUT: %require_complete.528878.2: = require_complete_type %AddWith.type.4f5 [symbolic] // CHECK:STDOUT: %assoc1.84a: %AddWith.assoc_type.1d5 = assoc_entity element1, imports.%Core.import_ref.e9a [symbolic] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.aab: = lookup_impl_witness %T.dd6, @AddWith.1, @AddWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %AddWith.facet.dad: %AddWith.type.d58 = facet_value %T.as_type.fe6, (%AddWith.lookup_impl_witness.aab) [symbolic] -// CHECK:STDOUT: %AddWith.WithSelf.Op.type.081: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%U.as_type.b61, %AddWith.facet.dad) [symbolic] -// CHECK:STDOUT: %.612: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.081, %AddWith.facet.dad [symbolic] -// CHECK:STDOUT: %impl.elem1.9e8: %.612 = impl_witness_access %AddWith.lookup_impl_witness.aab, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.666: = specific_impl_function %impl.elem1.9e8, @AddWith.WithSelf.Op(%U.as_type.b61, %AddWith.facet.dad) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.dfb4c4.2: = lookup_impl_witness %Result, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.869b78.2: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Result) [symbolic] -// CHECK:STDOUT: %.f0c: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.869b78.2, %Result [symbolic] -// CHECK:STDOUT: %impl.elem2: %.f0c = impl_witness_access %Destroy.lookup_impl_witness.dfb4c4.2, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.6f9: = specific_impl_function %impl.elem2, @Destroy.WithSelf.SelfDestruct.1(%Result) [symbolic] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.206: = lookup_impl_witness %T.21f, @AddWith.1, @AddWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %AddWith.facet.880: %AddWith.type.4f5 = facet_value %T.as_type.d2e, (%AddWith.lookup_impl_witness.206) [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type.c00: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%U.as_type.0bd, %AddWith.facet.880) [symbolic] +// CHECK:STDOUT: %.a11: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.c00, %AddWith.facet.880 [symbolic] +// CHECK:STDOUT: %impl.elem1.fe2: %.a11 = impl_witness_access %AddWith.lookup_impl_witness.206, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.896: = specific_impl_function %impl.elem1.fe2, @AddWith.WithSelf.Op(%U.as_type.0bd, %AddWith.facet.880) [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %SubWith.type.73b: type = facet_type <@SubWith.1, @SubWith.1(%Other)> [symbolic] // CHECK:STDOUT: %Self.18a: %SubWith.type.73b = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %SubWith.assoc_type.300: type = assoc_entity_type @SubWith.1, @SubWith.1(%Other) [symbolic] // CHECK:STDOUT: %SubWith.WithSelf.Op.type.028: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%Other, %Self.18a) [symbolic] // CHECK:STDOUT: %SubWith.WithSelf.Op.e84: %SubWith.WithSelf.Op.type.028 = struct_value () [symbolic] -// CHECK:STDOUT: %SubWith.type.d62: type = facet_type <@SubWith.1, @SubWith.1(%U.as_type.b61)> [symbolic] -// CHECK:STDOUT: %facet_type.e74: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%U.as_type.b61)> [symbolic] -// CHECK:STDOUT: %.Self.frozen.d95: %facet_type.e74 = symbolic_binding .Self [symbolic] -// CHECK:STDOUT: %SubWith.assoc_type.378: type = assoc_entity_type @SubWith.1, @SubWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %assoc0.7c6: %SubWith.assoc_type.378 = assoc_entity element0, imports.%Core.import_ref.190 [symbolic] -// CHECK:STDOUT: %assoc1.0a7: %SubWith.assoc_type.378 = assoc_entity element1, imports.%Core.import_ref.2f4 [symbolic] -// CHECK:STDOUT: %require_complete.a5f: = require_complete_type %facet_type.e74 [symbolic] -// CHECK:STDOUT: %.Self.frozen.as_type.319: type = facet_access_type %.Self.frozen.d95 [symbolic] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.d59: = lookup_impl_witness %.Self.frozen.d95, @SubWith.1, @SubWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %impl.elem0.68a: type = impl_witness_access %SubWith.lookup_impl_witness.d59, element0 [symbolic] -// CHECK:STDOUT: %.Self.f1c: %facet_type.e74 = symbolic_binding .Self [symbolic] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.e7f: = lookup_impl_witness %.Self.f1c, @SubWith.1, @SubWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %impl.elem0.a1a: type = impl_witness_access %SubWith.lookup_impl_witness.e7f, element0 [symbolic] -// CHECK:STDOUT: %facet_type.ba3: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%U.as_type.b61) where %impl.elem0.a1a = %Result.as_type> [symbolic] -// CHECK:STDOUT: %pattern_type.500: type = pattern_type %facet_type.ba3 [symbolic] -// CHECK:STDOUT: %T.patt.3ed: %pattern_type.500 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %T.34f: %facet_type.ba3 = symbolic_binding T, 2 [symbolic] -// CHECK:STDOUT: %T.as_type.dfc: type = facet_access_type %T.34f [symbolic] -// CHECK:STDOUT: %pattern_type.c9e: type = pattern_type %T.as_type.dfc [symbolic] -// CHECK:STDOUT: %x.param_patt.bd1: %pattern_type.c9e = value_param_pattern [symbolic] -// CHECK:STDOUT: %x.patt.684: %pattern_type.c9e = wrapper_binding_pattern x, %x.param_patt.bd1 [symbolic] -// CHECK:STDOUT: %require_complete.c6e: = require_complete_type %SubWith.type.d62 [symbolic] +// CHECK:STDOUT: %SubWith.type.769: type = facet_type <@SubWith.1, @SubWith.1(%U.as_type.0bd)> [symbolic] +// CHECK:STDOUT: %facet_type.769: type = facet_type <@SubWith.1, @SubWith.1(%U.as_type.0bd) & @Destroy> [symbolic] +// CHECK:STDOUT: %.Self.frozen.b13: %facet_type.769 = symbolic_binding .Self [symbolic] +// CHECK:STDOUT: %SubWith.assoc_type.5f0: type = assoc_entity_type @SubWith.1, @SubWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %assoc0.a5d: %SubWith.assoc_type.5f0 = assoc_entity element0, imports.%Core.import_ref.190 [symbolic] +// CHECK:STDOUT: %assoc1.a86: %SubWith.assoc_type.5f0 = assoc_entity element1, imports.%Core.import_ref.2f4 [symbolic] +// CHECK:STDOUT: %require_complete.49f499.1: = require_complete_type %facet_type.769 [symbolic] +// CHECK:STDOUT: %.Self.frozen.as_type.d1e: type = facet_access_type %.Self.frozen.b13 [symbolic] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.fe8: = lookup_impl_witness %.Self.frozen.b13, @SubWith.1, @SubWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %impl.elem0.7da: type = impl_witness_access %SubWith.lookup_impl_witness.fe8, element0 [symbolic] +// CHECK:STDOUT: %.Self.4de: %facet_type.769 = symbolic_binding .Self [symbolic] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.354: = lookup_impl_witness %.Self.4de, @SubWith.1, @SubWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %impl.elem0.3dc: type = impl_witness_access %SubWith.lookup_impl_witness.354, element0 [symbolic] +// CHECK:STDOUT: %facet_type.0a9: type = facet_type <@SubWith.1, @SubWith.1(%U.as_type.0bd) & @Destroy where %impl.elem0.3dc = %Result.as_type> [symbolic] +// CHECK:STDOUT: %pattern_type.a14: type = pattern_type %facet_type.0a9 [symbolic] +// CHECK:STDOUT: %T.patt.51b: %pattern_type.a14 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %T.3c5: %facet_type.0a9 = symbolic_binding T, 2 [symbolic] +// CHECK:STDOUT: %T.as_type.4b7: type = facet_access_type %T.3c5 [symbolic] +// CHECK:STDOUT: %pattern_type.ca3: type = pattern_type %T.as_type.4b7 [symbolic] +// CHECK:STDOUT: %x.param_patt.10b: %pattern_type.ca3 = value_param_pattern [symbolic] +// CHECK:STDOUT: %x.patt.7cd: %pattern_type.ca3 = wrapper_binding_pattern x, %x.param_patt.10b [symbolic] +// CHECK:STDOUT: %require_complete.49f499.2: = require_complete_type %SubWith.type.769 [symbolic] // CHECK:STDOUT: %assoc1.b58: %SubWith.assoc_type.300 = assoc_entity element1, imports.%Core.import_ref.124 [symbolic] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.1fa: = lookup_impl_witness %T.34f, @SubWith.1, @SubWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %SubWith.facet.eca: %SubWith.type.d62 = facet_value %T.as_type.dfc, (%SubWith.lookup_impl_witness.1fa) [symbolic] -// CHECK:STDOUT: %SubWith.WithSelf.Op.type.90e: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%U.as_type.b61, %SubWith.facet.eca) [symbolic] -// CHECK:STDOUT: %.844: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.90e, %SubWith.facet.eca [symbolic] -// CHECK:STDOUT: %impl.elem1.fa7: %.844 = impl_witness_access %SubWith.lookup_impl_witness.1fa, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2de: = specific_impl_function %impl.elem1.fa7, @SubWith.WithSelf.Op(%U.as_type.b61, %SubWith.facet.eca) [symbolic] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.725: = lookup_impl_witness %T.3c5, @SubWith.1, @SubWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %SubWith.facet.910: %SubWith.type.769 = facet_value %T.as_type.4b7, (%SubWith.lookup_impl_witness.725) [symbolic] +// CHECK:STDOUT: %SubWith.WithSelf.Op.type.772: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%U.as_type.0bd, %SubWith.facet.910) [symbolic] +// CHECK:STDOUT: %.47a6: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.772, %SubWith.facet.910 [symbolic] +// CHECK:STDOUT: %impl.elem1.415: %.47a6 = impl_witness_access %SubWith.lookup_impl_witness.725, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.a72: = specific_impl_function %impl.elem1.415, @SubWith.WithSelf.Op(%U.as_type.0bd, %SubWith.facet.910) [symbolic] // CHECK:STDOUT: %MulWith.type.616: type = facet_type <@MulWith.1, @MulWith.1(%Other)> [symbolic] // CHECK:STDOUT: %Self.742: %MulWith.type.616 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %MulWith.assoc_type.c81: type = assoc_entity_type @MulWith.1, @MulWith.1(%Other) [symbolic] // CHECK:STDOUT: %MulWith.WithSelf.Op.type.dad: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%Other, %Self.742) [symbolic] // CHECK:STDOUT: %MulWith.WithSelf.Op.507: %MulWith.WithSelf.Op.type.dad = struct_value () [symbolic] -// CHECK:STDOUT: %MulWith.type.5c9: type = facet_type <@MulWith.1, @MulWith.1(%U.as_type.b61)> [symbolic] -// CHECK:STDOUT: %facet_type.945: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%U.as_type.b61)> [symbolic] -// CHECK:STDOUT: %.Self.frozen.10d: %facet_type.945 = symbolic_binding .Self [symbolic] -// CHECK:STDOUT: %MulWith.assoc_type.1d7: type = assoc_entity_type @MulWith.1, @MulWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %assoc0.78b: %MulWith.assoc_type.1d7 = assoc_entity element0, imports.%Core.import_ref.59c [symbolic] -// CHECK:STDOUT: %assoc1.2be: %MulWith.assoc_type.1d7 = assoc_entity element1, imports.%Core.import_ref.fc2 [symbolic] -// CHECK:STDOUT: %require_complete.264: = require_complete_type %facet_type.945 [symbolic] -// CHECK:STDOUT: %.Self.frozen.as_type.f69: type = facet_access_type %.Self.frozen.10d [symbolic] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.fa1: = lookup_impl_witness %.Self.frozen.10d, @MulWith.1, @MulWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %impl.elem0.095: type = impl_witness_access %MulWith.lookup_impl_witness.fa1, element0 [symbolic] -// CHECK:STDOUT: %.Self.cb0: %facet_type.945 = symbolic_binding .Self [symbolic] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.1ff: = lookup_impl_witness %.Self.cb0, @MulWith.1, @MulWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %impl.elem0.ad0: type = impl_witness_access %MulWith.lookup_impl_witness.1ff, element0 [symbolic] -// CHECK:STDOUT: %facet_type.9c7: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%U.as_type.b61) where %impl.elem0.ad0 = %Result.as_type> [symbolic] -// CHECK:STDOUT: %pattern_type.112: type = pattern_type %facet_type.9c7 [symbolic] -// CHECK:STDOUT: %T.patt.9e1: %pattern_type.112 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %T.961: %facet_type.9c7 = symbolic_binding T, 2 [symbolic] -// CHECK:STDOUT: %T.as_type.521: type = facet_access_type %T.961 [symbolic] -// CHECK:STDOUT: %pattern_type.3f7: type = pattern_type %T.as_type.521 [symbolic] -// CHECK:STDOUT: %x.param_patt.a5b: %pattern_type.3f7 = value_param_pattern [symbolic] -// CHECK:STDOUT: %x.patt.eae: %pattern_type.3f7 = wrapper_binding_pattern x, %x.param_patt.a5b [symbolic] -// CHECK:STDOUT: %require_complete.dc1: = require_complete_type %MulWith.type.5c9 [symbolic] +// CHECK:STDOUT: %MulWith.type.b0b: type = facet_type <@MulWith.1, @MulWith.1(%U.as_type.0bd)> [symbolic] +// CHECK:STDOUT: %facet_type.b0b: type = facet_type <@MulWith.1, @MulWith.1(%U.as_type.0bd) & @Destroy> [symbolic] +// CHECK:STDOUT: %.Self.frozen.a62: %facet_type.b0b = symbolic_binding .Self [symbolic] +// CHECK:STDOUT: %MulWith.assoc_type.2e5: type = assoc_entity_type @MulWith.1, @MulWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %assoc0.e89: %MulWith.assoc_type.2e5 = assoc_entity element0, imports.%Core.import_ref.59c [symbolic] +// CHECK:STDOUT: %assoc1.4eb: %MulWith.assoc_type.2e5 = assoc_entity element1, imports.%Core.import_ref.fc2 [symbolic] +// CHECK:STDOUT: %require_complete.8389d3.1: = require_complete_type %facet_type.b0b [symbolic] +// CHECK:STDOUT: %.Self.frozen.as_type.bd3: type = facet_access_type %.Self.frozen.a62 [symbolic] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.136: = lookup_impl_witness %.Self.frozen.a62, @MulWith.1, @MulWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %impl.elem0.16c: type = impl_witness_access %MulWith.lookup_impl_witness.136, element0 [symbolic] +// CHECK:STDOUT: %.Self.a44: %facet_type.b0b = symbolic_binding .Self [symbolic] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.ced: = lookup_impl_witness %.Self.a44, @MulWith.1, @MulWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %impl.elem0.0e8: type = impl_witness_access %MulWith.lookup_impl_witness.ced, element0 [symbolic] +// CHECK:STDOUT: %facet_type.a5f: type = facet_type <@MulWith.1, @MulWith.1(%U.as_type.0bd) & @Destroy where %impl.elem0.0e8 = %Result.as_type> [symbolic] +// CHECK:STDOUT: %pattern_type.3ab: type = pattern_type %facet_type.a5f [symbolic] +// CHECK:STDOUT: %T.patt.170: %pattern_type.3ab = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %T.d03: %facet_type.a5f = symbolic_binding T, 2 [symbolic] +// CHECK:STDOUT: %T.as_type.639: type = facet_access_type %T.d03 [symbolic] +// CHECK:STDOUT: %pattern_type.d7a: type = pattern_type %T.as_type.639 [symbolic] +// CHECK:STDOUT: %x.param_patt.1c9: %pattern_type.d7a = value_param_pattern [symbolic] +// CHECK:STDOUT: %x.patt.080: %pattern_type.d7a = wrapper_binding_pattern x, %x.param_patt.1c9 [symbolic] +// CHECK:STDOUT: %require_complete.8389d3.2: = require_complete_type %MulWith.type.b0b [symbolic] // CHECK:STDOUT: %assoc1.d9e: %MulWith.assoc_type.c81 = assoc_entity element1, imports.%Core.import_ref.29d [symbolic] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.ac6: = lookup_impl_witness %T.961, @MulWith.1, @MulWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %MulWith.facet.cae: %MulWith.type.5c9 = facet_value %T.as_type.521, (%MulWith.lookup_impl_witness.ac6) [symbolic] -// CHECK:STDOUT: %MulWith.WithSelf.Op.type.6df: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%U.as_type.b61, %MulWith.facet.cae) [symbolic] -// CHECK:STDOUT: %.d85: type = fn_type_with_self_type %MulWith.WithSelf.Op.type.6df, %MulWith.facet.cae [symbolic] -// CHECK:STDOUT: %impl.elem1.5cc: %.d85 = impl_witness_access %MulWith.lookup_impl_witness.ac6, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2cd: = specific_impl_function %impl.elem1.5cc, @MulWith.WithSelf.Op(%U.as_type.b61, %MulWith.facet.cae) [symbolic] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.50b: = lookup_impl_witness %T.d03, @MulWith.1, @MulWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %MulWith.facet.756: %MulWith.type.b0b = facet_value %T.as_type.639, (%MulWith.lookup_impl_witness.50b) [symbolic] +// CHECK:STDOUT: %MulWith.WithSelf.Op.type.689: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%U.as_type.0bd, %MulWith.facet.756) [symbolic] +// CHECK:STDOUT: %.7f0: type = fn_type_with_self_type %MulWith.WithSelf.Op.type.689, %MulWith.facet.756 [symbolic] +// CHECK:STDOUT: %impl.elem1.334: %.7f0 = impl_witness_access %MulWith.lookup_impl_witness.50b, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.2bd: = specific_impl_function %impl.elem1.334, @MulWith.WithSelf.Op(%U.as_type.0bd, %MulWith.facet.756) [symbolic] // CHECK:STDOUT: %DivWith.type.472: type = facet_type <@DivWith.1, @DivWith.1(%Other)> [symbolic] // CHECK:STDOUT: %Self.5b3: %DivWith.type.472 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %DivWith.assoc_type.e7d: type = assoc_entity_type @DivWith.1, @DivWith.1(%Other) [symbolic] // CHECK:STDOUT: %DivWith.WithSelf.Op.type.207: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%Other, %Self.5b3) [symbolic] // CHECK:STDOUT: %DivWith.WithSelf.Op.4f1: %DivWith.WithSelf.Op.type.207 = struct_value () [symbolic] -// CHECK:STDOUT: %DivWith.type.e82: type = facet_type <@DivWith.1, @DivWith.1(%U.as_type.b61)> [symbolic] -// CHECK:STDOUT: %facet_type.084: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%U.as_type.b61)> [symbolic] -// CHECK:STDOUT: %.Self.frozen.8e5: %facet_type.084 = symbolic_binding .Self [symbolic] -// CHECK:STDOUT: %DivWith.assoc_type.248: type = assoc_entity_type @DivWith.1, @DivWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %assoc0.b46: %DivWith.assoc_type.248 = assoc_entity element0, imports.%Core.import_ref.dee [symbolic] -// CHECK:STDOUT: %assoc1.6e8: %DivWith.assoc_type.248 = assoc_entity element1, imports.%Core.import_ref.f2f [symbolic] -// CHECK:STDOUT: %require_complete.1ee: = require_complete_type %facet_type.084 [symbolic] -// CHECK:STDOUT: %.Self.frozen.as_type.379: type = facet_access_type %.Self.frozen.8e5 [symbolic] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.cd9: = lookup_impl_witness %.Self.frozen.8e5, @DivWith.1, @DivWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %impl.elem0.76b: type = impl_witness_access %DivWith.lookup_impl_witness.cd9, element0 [symbolic] -// CHECK:STDOUT: %.Self.f43: %facet_type.084 = symbolic_binding .Self [symbolic] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.f1e: = lookup_impl_witness %.Self.f43, @DivWith.1, @DivWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %impl.elem0.bba: type = impl_witness_access %DivWith.lookup_impl_witness.f1e, element0 [symbolic] -// CHECK:STDOUT: %facet_type.89a: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%U.as_type.b61) where %impl.elem0.bba = %Result.as_type> [symbolic] -// CHECK:STDOUT: %pattern_type.658: type = pattern_type %facet_type.89a [symbolic] -// CHECK:STDOUT: %T.patt.506: %pattern_type.658 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %T.d59: %facet_type.89a = symbolic_binding T, 2 [symbolic] -// CHECK:STDOUT: %T.as_type.881: type = facet_access_type %T.d59 [symbolic] -// CHECK:STDOUT: %pattern_type.a65: type = pattern_type %T.as_type.881 [symbolic] -// CHECK:STDOUT: %x.param_patt.8e8: %pattern_type.a65 = value_param_pattern [symbolic] -// CHECK:STDOUT: %x.patt.d40: %pattern_type.a65 = wrapper_binding_pattern x, %x.param_patt.8e8 [symbolic] -// CHECK:STDOUT: %require_complete.4b7: = require_complete_type %DivWith.type.e82 [symbolic] +// CHECK:STDOUT: %DivWith.type.71d: type = facet_type <@DivWith.1, @DivWith.1(%U.as_type.0bd)> [symbolic] +// CHECK:STDOUT: %facet_type.71d: type = facet_type <@DivWith.1, @DivWith.1(%U.as_type.0bd) & @Destroy> [symbolic] +// CHECK:STDOUT: %.Self.frozen.575: %facet_type.71d = symbolic_binding .Self [symbolic] +// CHECK:STDOUT: %DivWith.assoc_type.e65: type = assoc_entity_type @DivWith.1, @DivWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %assoc0.48a: %DivWith.assoc_type.e65 = assoc_entity element0, imports.%Core.import_ref.dee [symbolic] +// CHECK:STDOUT: %assoc1.ed1: %DivWith.assoc_type.e65 = assoc_entity element1, imports.%Core.import_ref.f2f [symbolic] +// CHECK:STDOUT: %require_complete.c4013f.1: = require_complete_type %facet_type.71d [symbolic] +// CHECK:STDOUT: %.Self.frozen.as_type.a77: type = facet_access_type %.Self.frozen.575 [symbolic] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.d5d: = lookup_impl_witness %.Self.frozen.575, @DivWith.1, @DivWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %impl.elem0.e77: type = impl_witness_access %DivWith.lookup_impl_witness.d5d, element0 [symbolic] +// CHECK:STDOUT: %.Self.c58: %facet_type.71d = symbolic_binding .Self [symbolic] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.f1d: = lookup_impl_witness %.Self.c58, @DivWith.1, @DivWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %impl.elem0.af2: type = impl_witness_access %DivWith.lookup_impl_witness.f1d, element0 [symbolic] +// CHECK:STDOUT: %facet_type.351: type = facet_type <@DivWith.1, @DivWith.1(%U.as_type.0bd) & @Destroy where %impl.elem0.af2 = %Result.as_type> [symbolic] +// CHECK:STDOUT: %pattern_type.ae7: type = pattern_type %facet_type.351 [symbolic] +// CHECK:STDOUT: %T.patt.32b: %pattern_type.ae7 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %T.942: %facet_type.351 = symbolic_binding T, 2 [symbolic] +// CHECK:STDOUT: %T.as_type.6cf: type = facet_access_type %T.942 [symbolic] +// CHECK:STDOUT: %pattern_type.c8a: type = pattern_type %T.as_type.6cf [symbolic] +// CHECK:STDOUT: %x.param_patt.795: %pattern_type.c8a = value_param_pattern [symbolic] +// CHECK:STDOUT: %x.patt.818: %pattern_type.c8a = wrapper_binding_pattern x, %x.param_patt.795 [symbolic] +// CHECK:STDOUT: %require_complete.c4013f.2: = require_complete_type %DivWith.type.71d [symbolic] // CHECK:STDOUT: %assoc1.2b8: %DivWith.assoc_type.e7d = assoc_entity element1, imports.%Core.import_ref.94d [symbolic] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.c25: = lookup_impl_witness %T.d59, @DivWith.1, @DivWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %DivWith.facet.7d7: %DivWith.type.e82 = facet_value %T.as_type.881, (%DivWith.lookup_impl_witness.c25) [symbolic] -// CHECK:STDOUT: %DivWith.WithSelf.Op.type.0d7: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%U.as_type.b61, %DivWith.facet.7d7) [symbolic] -// CHECK:STDOUT: %.ba0: type = fn_type_with_self_type %DivWith.WithSelf.Op.type.0d7, %DivWith.facet.7d7 [symbolic] -// CHECK:STDOUT: %impl.elem1.610: %.ba0 = impl_witness_access %DivWith.lookup_impl_witness.c25, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.7d6: = specific_impl_function %impl.elem1.610, @DivWith.WithSelf.Op(%U.as_type.b61, %DivWith.facet.7d7) [symbolic] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.e1e: = lookup_impl_witness %T.942, @DivWith.1, @DivWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %DivWith.facet.538: %DivWith.type.71d = facet_value %T.as_type.6cf, (%DivWith.lookup_impl_witness.e1e) [symbolic] +// CHECK:STDOUT: %DivWith.WithSelf.Op.type.663: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%U.as_type.0bd, %DivWith.facet.538) [symbolic] +// CHECK:STDOUT: %.0f9: type = fn_type_with_self_type %DivWith.WithSelf.Op.type.663, %DivWith.facet.538 [symbolic] +// CHECK:STDOUT: %impl.elem1.44e: %.0f9 = impl_witness_access %DivWith.lookup_impl_witness.e1e, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.ea9: = specific_impl_function %impl.elem1.44e, @DivWith.WithSelf.Op(%U.as_type.0bd, %DivWith.facet.538) [symbolic] // CHECK:STDOUT: %ModWith.type.11e: type = facet_type <@ModWith.1, @ModWith.1(%Other)> [symbolic] // CHECK:STDOUT: %Self.c18: %ModWith.type.11e = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %ModWith.assoc_type.1f1: type = assoc_entity_type @ModWith.1, @ModWith.1(%Other) [symbolic] // CHECK:STDOUT: %ModWith.WithSelf.Op.type.04e: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%Other, %Self.c18) [symbolic] // CHECK:STDOUT: %ModWith.WithSelf.Op.6fb: %ModWith.WithSelf.Op.type.04e = struct_value () [symbolic] -// CHECK:STDOUT: %ModWith.type.475: type = facet_type <@ModWith.1, @ModWith.1(%U.as_type.b61)> [symbolic] -// CHECK:STDOUT: %facet_type.fd4: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%U.as_type.b61)> [symbolic] -// CHECK:STDOUT: %.Self.frozen.fe0: %facet_type.fd4 = symbolic_binding .Self [symbolic] -// CHECK:STDOUT: %ModWith.assoc_type.85f: type = assoc_entity_type @ModWith.1, @ModWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %assoc0.bf1: %ModWith.assoc_type.85f = assoc_entity element0, imports.%Core.import_ref.61a [symbolic] -// CHECK:STDOUT: %assoc1.a6b: %ModWith.assoc_type.85f = assoc_entity element1, imports.%Core.import_ref.9f8f [symbolic] -// CHECK:STDOUT: %require_complete.8f0: = require_complete_type %facet_type.fd4 [symbolic] -// CHECK:STDOUT: %.Self.frozen.as_type.78c: type = facet_access_type %.Self.frozen.fe0 [symbolic] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.448: = lookup_impl_witness %.Self.frozen.fe0, @ModWith.1, @ModWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %impl.elem0.043: type = impl_witness_access %ModWith.lookup_impl_witness.448, element0 [symbolic] -// CHECK:STDOUT: %.Self.dd1: %facet_type.fd4 = symbolic_binding .Self [symbolic] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.4d5: = lookup_impl_witness %.Self.dd1, @ModWith.1, @ModWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %impl.elem0.cb3: type = impl_witness_access %ModWith.lookup_impl_witness.4d5, element0 [symbolic] -// CHECK:STDOUT: %facet_type.247: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%U.as_type.b61) where %impl.elem0.cb3 = %Result.as_type> [symbolic] -// CHECK:STDOUT: %pattern_type.c70: type = pattern_type %facet_type.247 [symbolic] -// CHECK:STDOUT: %T.patt.7fe: %pattern_type.c70 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %T.be8: %facet_type.247 = symbolic_binding T, 2 [symbolic] -// CHECK:STDOUT: %T.as_type.8ce: type = facet_access_type %T.be8 [symbolic] -// CHECK:STDOUT: %pattern_type.5e2: type = pattern_type %T.as_type.8ce [symbolic] -// CHECK:STDOUT: %x.param_patt.41c: %pattern_type.5e2 = value_param_pattern [symbolic] -// CHECK:STDOUT: %x.patt.2de: %pattern_type.5e2 = wrapper_binding_pattern x, %x.param_patt.41c [symbolic] -// CHECK:STDOUT: %require_complete.421: = require_complete_type %ModWith.type.475 [symbolic] +// CHECK:STDOUT: %ModWith.type.68a: type = facet_type <@ModWith.1, @ModWith.1(%U.as_type.0bd)> [symbolic] +// CHECK:STDOUT: %facet_type.68a: type = facet_type <@ModWith.1, @ModWith.1(%U.as_type.0bd) & @Destroy> [symbolic] +// CHECK:STDOUT: %.Self.frozen.e0d: %facet_type.68a = symbolic_binding .Self [symbolic] +// CHECK:STDOUT: %ModWith.assoc_type.9c3: type = assoc_entity_type @ModWith.1, @ModWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %assoc0.cb9: %ModWith.assoc_type.9c3 = assoc_entity element0, imports.%Core.import_ref.61a [symbolic] +// CHECK:STDOUT: %assoc1.3d6: %ModWith.assoc_type.9c3 = assoc_entity element1, imports.%Core.import_ref.9f8f [symbolic] +// CHECK:STDOUT: %require_complete.312803.1: = require_complete_type %facet_type.68a [symbolic] +// CHECK:STDOUT: %.Self.frozen.as_type.01e: type = facet_access_type %.Self.frozen.e0d [symbolic] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.4ec: = lookup_impl_witness %.Self.frozen.e0d, @ModWith.1, @ModWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %impl.elem0.671: type = impl_witness_access %ModWith.lookup_impl_witness.4ec, element0 [symbolic] +// CHECK:STDOUT: %.Self.2c1: %facet_type.68a = symbolic_binding .Self [symbolic] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.930: = lookup_impl_witness %.Self.2c1, @ModWith.1, @ModWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %impl.elem0.e6d: type = impl_witness_access %ModWith.lookup_impl_witness.930, element0 [symbolic] +// CHECK:STDOUT: %facet_type.938: type = facet_type <@ModWith.1, @ModWith.1(%U.as_type.0bd) & @Destroy where %impl.elem0.e6d = %Result.as_type> [symbolic] +// CHECK:STDOUT: %pattern_type.b1e: type = pattern_type %facet_type.938 [symbolic] +// CHECK:STDOUT: %T.patt.721: %pattern_type.b1e = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %T.fdb: %facet_type.938 = symbolic_binding T, 2 [symbolic] +// CHECK:STDOUT: %T.as_type.73e: type = facet_access_type %T.fdb [symbolic] +// CHECK:STDOUT: %pattern_type.70e: type = pattern_type %T.as_type.73e [symbolic] +// CHECK:STDOUT: %x.param_patt.375: %pattern_type.70e = value_param_pattern [symbolic] +// CHECK:STDOUT: %x.patt.f07: %pattern_type.70e = wrapper_binding_pattern x, %x.param_patt.375 [symbolic] +// CHECK:STDOUT: %require_complete.312803.2: = require_complete_type %ModWith.type.68a [symbolic] // CHECK:STDOUT: %assoc1.f4b: %ModWith.assoc_type.1f1 = assoc_entity element1, imports.%Core.import_ref.be00 [symbolic] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.8e1: = lookup_impl_witness %T.be8, @ModWith.1, @ModWith.1(%U.as_type.b61) [symbolic] -// CHECK:STDOUT: %ModWith.facet.204: %ModWith.type.475 = facet_value %T.as_type.8ce, (%ModWith.lookup_impl_witness.8e1) [symbolic] -// CHECK:STDOUT: %ModWith.WithSelf.Op.type.340: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%U.as_type.b61, %ModWith.facet.204) [symbolic] -// CHECK:STDOUT: %.c4c: type = fn_type_with_self_type %ModWith.WithSelf.Op.type.340, %ModWith.facet.204 [symbolic] -// CHECK:STDOUT: %impl.elem1.789: %.c4c = impl_witness_access %ModWith.lookup_impl_witness.8e1, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.87e: = specific_impl_function %impl.elem1.789, @ModWith.WithSelf.Op(%U.as_type.b61, %ModWith.facet.204) [symbolic] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.c4b: = lookup_impl_witness %T.fdb, @ModWith.1, @ModWith.1(%U.as_type.0bd) [symbolic] +// CHECK:STDOUT: %ModWith.facet.297: %ModWith.type.68a = facet_value %T.as_type.73e, (%ModWith.lookup_impl_witness.c4b) [symbolic] +// CHECK:STDOUT: %ModWith.WithSelf.Op.type.639: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%U.as_type.0bd, %ModWith.facet.297) [symbolic] +// CHECK:STDOUT: %.100: type = fn_type_with_self_type %ModWith.WithSelf.Op.type.639, %ModWith.facet.297 [symbolic] +// CHECK:STDOUT: %impl.elem1.b51: %.100 = impl_witness_access %ModWith.lookup_impl_witness.c4b, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.6e9: = specific_impl_function %impl.elem1.b51, @ModWith.WithSelf.Op(%U.as_type.0bd, %ModWith.facet.297) [symbolic] // CHECK:STDOUT: %Int16: type = class_type @Int16 [concrete] // CHECK:STDOUT: %pattern_type.785: type = pattern_type %Int16 [concrete] // CHECK:STDOUT: %Int32: type = class_type @Int32 [concrete] @@ -517,53 +515,51 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %i16.builtin: type = int_type signed, %int_16 [concrete] // CHECK:STDOUT: %complete_type.2da: = complete_type_witness %i16.builtin [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc176_34.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc176_34.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %Int16.SubobjectDestroy.type: type = fn_type @Int16.SubobjectDestroy [concrete] -// CHECK:STDOUT: %Int16.SubobjectDestroy: %Int16.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1bfa2a.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Int16.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.f58: %Destroy.type = facet_value %Int16, (%custom_witness.1bfa2a.1) [concrete] -// CHECK:STDOUT: %facet_type.067: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%Int16)> [concrete] -// CHECK:STDOUT: %.Self.4c6: %facet_type.067 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.5df: = lookup_impl_witness %.Self.4c6, @AddWith.1, @AddWith.1(%Int16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.2cc: type = impl_witness_access %AddWith.lookup_impl_witness.5df, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.754: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%Int16) where %impl.elem0.2cc = %Int16> [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc176 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc176_34.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc176_34.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f: = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %Int16.Op.type.83af6e.1: type = fn_type @Int16.Op.1 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.1: %Int16.Op.type.83af6e.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.1: = custom_witness (%Int16.Op.4dca31.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0fd: %SubobjectDestroy.type = facet_value %Int16, (%custom_witness.5760f4.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6b1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0fd) [concrete] +// CHECK:STDOUT: %Destroy.facet.109: %Destroy.type = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1) [concrete] +// CHECK:STDOUT: %facet_type.e4b: type = facet_type <@AddWith.1, @AddWith.1(%Int16) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.033: %facet_type.e4b = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.73e: = lookup_impl_witness %.Self.033, @AddWith.1, @AddWith.1(%Int16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.08e: type = impl_witness_access %AddWith.lookup_impl_witness.73e, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.5b8: type = facet_type <@AddWith.1, @AddWith.1(%Int16) & @Destroy where %impl.elem0.08e = %Int16> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc176 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c5e: %SubobjectDestroy.type = facet_value %i16, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c5e) [concrete] // CHECK:STDOUT: %AddWith.type.e4b: type = facet_type <@AddWith.1, @AddWith.1(%Int16)> [concrete] // CHECK:STDOUT: %AddWith.assoc_type.86e: type = assoc_entity_type @AddWith.1, @AddWith.1(%Int16) [concrete] // CHECK:STDOUT: %assoc0.30c: %AddWith.assoc_type.86e = assoc_entity element0, imports.%Core.import_ref.91f [concrete] // CHECK:STDOUT: %assoc1.9bf: %AddWith.assoc_type.86e = assoc_entity element1, imports.%Core.import_ref.8ad [concrete] // CHECK:STDOUT: %Op.type.442b68.1: type = fn_type @Op.1 [concrete] // CHECK:STDOUT: %Op.72717c.1: %Op.type.442b68.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.f03: %Destroy.type = facet_value %i16, (%custom_witness.f8f) [concrete] +// CHECK:STDOUT: %Destroy.facet.1b4: %Destroy.type = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80) [concrete] // CHECK:STDOUT: %custom_witness.cba: = custom_witness (%Int16, %Op.72717c.1), @AddWith.1, @AddWith.1(%Int16) [concrete] -// CHECK:STDOUT: %facet_value.1ca: %facet_type.754 = facet_value %i16, (%custom_witness.f8f, %custom_witness.cba) [concrete] -// CHECK:STDOUT: %.Self.frozen.30b: %facet_type.067 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.cd3: = complete_type_witness %facet_type.067 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.bb1: type = facet_access_type %.Self.frozen.30b [symbolic_self] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.b71: = lookup_impl_witness %.Self.frozen.30b, @AddWith.1, @AddWith.1(%Int16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.0bf: type = impl_witness_access %AddWith.lookup_impl_witness.b71, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.9c4: type = pattern_type %facet_type.754 [concrete] -// CHECK:STDOUT: %T.patt.96c: %pattern_type.9c4 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_value.b07: %facet_type.5b8 = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80, %custom_witness.cba) [concrete] +// CHECK:STDOUT: %.Self.frozen.ea9: %facet_type.e4b = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.f37bc8.1: = complete_type_witness %facet_type.e4b [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.ceb: type = facet_access_type %.Self.frozen.ea9 [symbolic_self] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.e18: = lookup_impl_witness %.Self.frozen.ea9, @AddWith.1, @AddWith.1(%Int16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.de3: type = impl_witness_access %AddWith.lookup_impl_witness.e18, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.f83: type = pattern_type %facet_type.5b8 [concrete] +// CHECK:STDOUT: %T.patt.056: %pattern_type.f83 = symbolic_binding_pattern T, 2 [symbolic] // CHECK:STDOUT: %result.param_patt.be6: %pattern_type.785 = value_param_pattern [concrete] // CHECK:STDOUT: %result.patt.a31: %pattern_type.785 = wrapper_binding_pattern result, %result.param_patt.be6 [concrete] // CHECK:STDOUT: %y.param_patt.418: %pattern_type.785 = value_param_pattern [concrete] // CHECK:STDOUT: %y.patt.890: %pattern_type.785 = wrapper_binding_pattern y, %y.param_patt.418 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.610: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.f58) [concrete] -// CHECK:STDOUT: %.348: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.610, %Destroy.facet.f58 [concrete] -// CHECK:STDOUT: %facet_type.90f: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%Int16)> [concrete] -// CHECK:STDOUT: %.Self.565: %facet_type.90f = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.dd3: = lookup_impl_witness %.Self.565, @SubWith.1, @SubWith.1(%Int16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.f92: type = impl_witness_access %SubWith.lookup_impl_witness.dd3, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.7bc: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%Int16) where %impl.elem0.f92 = %Int16> [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.72f: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.109) [concrete] +// CHECK:STDOUT: %facet_type.68d: type = facet_type <@SubWith.1, @SubWith.1(%Int16) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.a10: %facet_type.68d = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.c4d: = lookup_impl_witness %.Self.a10, @SubWith.1, @SubWith.1(%Int16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.22a: type = impl_witness_access %SubWith.lookup_impl_witness.c4d, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.5db: type = facet_type <@SubWith.1, @SubWith.1(%Int16) & @Destroy where %impl.elem0.22a = %Int16> [concrete] // CHECK:STDOUT: %SubWith.type.68d: type = facet_type <@SubWith.1, @SubWith.1(%Int16)> [concrete] // CHECK:STDOUT: %SubWith.assoc_type.dd6: type = assoc_entity_type @SubWith.1, @SubWith.1(%Int16) [concrete] // CHECK:STDOUT: %assoc0.dfb: %SubWith.assoc_type.dd6 = assoc_entity element0, imports.%Core.import_ref.190 [concrete] @@ -571,19 +567,19 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Op.type.442b68.2: type = fn_type @Op.2 [concrete] // CHECK:STDOUT: %Op.72717c.2: %Op.type.442b68.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.354: = custom_witness (%Int16, %Op.72717c.2), @SubWith.1, @SubWith.1(%Int16) [concrete] -// CHECK:STDOUT: %facet_value.2c5: %facet_type.7bc = facet_value %i16, (%custom_witness.f8f, %custom_witness.354) [concrete] -// CHECK:STDOUT: %.Self.frozen.b1a: %facet_type.90f = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.067: = complete_type_witness %facet_type.90f [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.917: type = facet_access_type %.Self.frozen.b1a [symbolic_self] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.135: = lookup_impl_witness %.Self.frozen.b1a, @SubWith.1, @SubWith.1(%Int16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.1d6: type = impl_witness_access %SubWith.lookup_impl_witness.135, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.f9a: type = pattern_type %facet_type.7bc [concrete] -// CHECK:STDOUT: %T.patt.edb: %pattern_type.f9a = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.ab1: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%Int16)> [concrete] -// CHECK:STDOUT: %.Self.1e1: %facet_type.ab1 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.d39: = lookup_impl_witness %.Self.1e1, @MulWith.1, @MulWith.1(%Int16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.979: type = impl_witness_access %MulWith.lookup_impl_witness.d39, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.e2b: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%Int16) where %impl.elem0.979 = %Int16> [concrete] +// CHECK:STDOUT: %facet_value.ca4: %facet_type.5db = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80, %custom_witness.354) [concrete] +// CHECK:STDOUT: %.Self.frozen.0c9: %facet_type.68d = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.8a2f63.1: = complete_type_witness %facet_type.68d [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.471: type = facet_access_type %.Self.frozen.0c9 [symbolic_self] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.379: = lookup_impl_witness %.Self.frozen.0c9, @SubWith.1, @SubWith.1(%Int16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.e78: type = impl_witness_access %SubWith.lookup_impl_witness.379, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.7bf: type = pattern_type %facet_type.5db [concrete] +// CHECK:STDOUT: %T.patt.f08: %pattern_type.7bf = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.f65: type = facet_type <@MulWith.1, @MulWith.1(%Int16) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.1e8: %facet_type.f65 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.b4a: = lookup_impl_witness %.Self.1e8, @MulWith.1, @MulWith.1(%Int16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.088: type = impl_witness_access %MulWith.lookup_impl_witness.b4a, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.1c9: type = facet_type <@MulWith.1, @MulWith.1(%Int16) & @Destroy where %impl.elem0.088 = %Int16> [concrete] // CHECK:STDOUT: %MulWith.type.f65: type = facet_type <@MulWith.1, @MulWith.1(%Int16)> [concrete] // CHECK:STDOUT: %MulWith.assoc_type.4c3: type = assoc_entity_type @MulWith.1, @MulWith.1(%Int16) [concrete] // CHECK:STDOUT: %assoc0.6ec: %MulWith.assoc_type.4c3 = assoc_entity element0, imports.%Core.import_ref.59c [concrete] @@ -591,19 +587,19 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Op.type.442b68.3: type = fn_type @Op.3 [concrete] // CHECK:STDOUT: %Op.72717c.3: %Op.type.442b68.3 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.3c3: = custom_witness (%Int16, %Op.72717c.3), @MulWith.1, @MulWith.1(%Int16) [concrete] -// CHECK:STDOUT: %facet_value.50a: %facet_type.e2b = facet_value %i16, (%custom_witness.f8f, %custom_witness.3c3) [concrete] -// CHECK:STDOUT: %.Self.frozen.752: %facet_type.ab1 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.797: = complete_type_witness %facet_type.ab1 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.3c5: type = facet_access_type %.Self.frozen.752 [symbolic_self] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.25c: = lookup_impl_witness %.Self.frozen.752, @MulWith.1, @MulWith.1(%Int16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.c8f: type = impl_witness_access %MulWith.lookup_impl_witness.25c, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.fbc: type = pattern_type %facet_type.e2b [concrete] -// CHECK:STDOUT: %T.patt.d6f: %pattern_type.fbc = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.b64: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%Int16)> [concrete] -// CHECK:STDOUT: %.Self.315: %facet_type.b64 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.147: = lookup_impl_witness %.Self.315, @DivWith.1, @DivWith.1(%Int16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.17b: type = impl_witness_access %DivWith.lookup_impl_witness.147, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.f21: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%Int16) where %impl.elem0.17b = %Int16> [concrete] +// CHECK:STDOUT: %facet_value.3e5: %facet_type.1c9 = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80, %custom_witness.3c3) [concrete] +// CHECK:STDOUT: %.Self.frozen.aec: %facet_type.f65 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.8c670c.1: = complete_type_witness %facet_type.f65 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.34d: type = facet_access_type %.Self.frozen.aec [symbolic_self] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.94b: = lookup_impl_witness %.Self.frozen.aec, @MulWith.1, @MulWith.1(%Int16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.212: type = impl_witness_access %MulWith.lookup_impl_witness.94b, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.2f6: type = pattern_type %facet_type.1c9 [concrete] +// CHECK:STDOUT: %T.patt.e8a: %pattern_type.2f6 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.b8a: type = facet_type <@DivWith.1, @DivWith.1(%Int16) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.74d: %facet_type.b8a = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.afb: = lookup_impl_witness %.Self.74d, @DivWith.1, @DivWith.1(%Int16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.6cf: type = impl_witness_access %DivWith.lookup_impl_witness.afb, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.ee9: type = facet_type <@DivWith.1, @DivWith.1(%Int16) & @Destroy where %impl.elem0.6cf = %Int16> [concrete] // CHECK:STDOUT: %DivWith.type.b8a: type = facet_type <@DivWith.1, @DivWith.1(%Int16)> [concrete] // CHECK:STDOUT: %DivWith.assoc_type.712: type = assoc_entity_type @DivWith.1, @DivWith.1(%Int16) [concrete] // CHECK:STDOUT: %assoc0.99c: %DivWith.assoc_type.712 = assoc_entity element0, imports.%Core.import_ref.dee [concrete] @@ -611,19 +607,19 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Op.type.442b68.4: type = fn_type @Op.4 [concrete] // CHECK:STDOUT: %Op.72717c.4: %Op.type.442b68.4 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.8d0: = custom_witness (%Int16, %Op.72717c.4), @DivWith.1, @DivWith.1(%Int16) [concrete] -// CHECK:STDOUT: %facet_value.d7d: %facet_type.f21 = facet_value %i16, (%custom_witness.f8f, %custom_witness.8d0) [concrete] -// CHECK:STDOUT: %.Self.frozen.797: %facet_type.b64 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.ca5: = complete_type_witness %facet_type.b64 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.b76: type = facet_access_type %.Self.frozen.797 [symbolic_self] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.60a: = lookup_impl_witness %.Self.frozen.797, @DivWith.1, @DivWith.1(%Int16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.431: type = impl_witness_access %DivWith.lookup_impl_witness.60a, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.7ca: type = pattern_type %facet_type.f21 [concrete] -// CHECK:STDOUT: %T.patt.905: %pattern_type.7ca = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.2c9: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%Int16)> [concrete] -// CHECK:STDOUT: %.Self.7d4: %facet_type.2c9 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.c30: = lookup_impl_witness %.Self.7d4, @ModWith.1, @ModWith.1(%Int16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.e30: type = impl_witness_access %ModWith.lookup_impl_witness.c30, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.76c: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%Int16) where %impl.elem0.e30 = %Int16> [concrete] +// CHECK:STDOUT: %facet_value.318: %facet_type.ee9 = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80, %custom_witness.8d0) [concrete] +// CHECK:STDOUT: %.Self.frozen.ff8: %facet_type.b8a = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.d99d66.1: = complete_type_witness %facet_type.b8a [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.2d9: type = facet_access_type %.Self.frozen.ff8 [symbolic_self] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.483: = lookup_impl_witness %.Self.frozen.ff8, @DivWith.1, @DivWith.1(%Int16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.f9d: type = impl_witness_access %DivWith.lookup_impl_witness.483, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.575: type = pattern_type %facet_type.ee9 [concrete] +// CHECK:STDOUT: %T.patt.257: %pattern_type.575 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.c67: type = facet_type <@ModWith.1, @ModWith.1(%Int16) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.71c: %facet_type.c67 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.c2a: = lookup_impl_witness %.Self.71c, @ModWith.1, @ModWith.1(%Int16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.14c: type = impl_witness_access %ModWith.lookup_impl_witness.c2a, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.fe4: type = facet_type <@ModWith.1, @ModWith.1(%Int16) & @Destroy where %impl.elem0.14c = %Int16> [concrete] // CHECK:STDOUT: %ModWith.type.c67: type = facet_type <@ModWith.1, @ModWith.1(%Int16)> [concrete] // CHECK:STDOUT: %ModWith.assoc_type.5f6: type = assoc_entity_type @ModWith.1, @ModWith.1(%Int16) [concrete] // CHECK:STDOUT: %assoc0.f04: %ModWith.assoc_type.5f6 = assoc_entity element0, imports.%Core.import_ref.61a [concrete] @@ -631,302 +627,297 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Op.type.442b68.5: type = fn_type @Op.5 [concrete] // CHECK:STDOUT: %Op.72717c.5: %Op.type.442b68.5 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.169: = custom_witness (%Int16, %Op.72717c.5), @ModWith.1, @ModWith.1(%Int16) [concrete] -// CHECK:STDOUT: %facet_value.1d0: %facet_type.76c = facet_value %i16, (%custom_witness.f8f, %custom_witness.169) [concrete] -// CHECK:STDOUT: %.Self.frozen.7c6: %facet_type.2c9 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.300: = complete_type_witness %facet_type.2c9 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.c18: type = facet_access_type %.Self.frozen.7c6 [symbolic_self] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.49e: = lookup_impl_witness %.Self.frozen.7c6, @ModWith.1, @ModWith.1(%Int16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.042: type = impl_witness_access %ModWith.lookup_impl_witness.49e, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.976: type = pattern_type %facet_type.76c [concrete] -// CHECK:STDOUT: %T.patt.2a9: %pattern_type.976 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.5ca: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%i16)> [concrete] -// CHECK:STDOUT: %.Self.530: %facet_type.5ca = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.d3c: = lookup_impl_witness %.Self.530, @AddWith.1, @AddWith.1(%i16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.5a1: type = impl_witness_access %AddWith.lookup_impl_witness.d3c, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.653: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%i16) where %impl.elem0.5a1 = %Int16> [concrete] +// CHECK:STDOUT: %facet_value.425: %facet_type.fe4 = facet_value %i16, (%DestroyImpl.impl_witness.dff, %custom_witness.b80, %custom_witness.169) [concrete] +// CHECK:STDOUT: %.Self.frozen.13f: %facet_type.c67 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.7d80e1.1: = complete_type_witness %facet_type.c67 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.cb4: type = facet_access_type %.Self.frozen.13f [symbolic_self] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.0af: = lookup_impl_witness %.Self.frozen.13f, @ModWith.1, @ModWith.1(%Int16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.d91: type = impl_witness_access %ModWith.lookup_impl_witness.0af, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.330: type = pattern_type %facet_type.fe4 [concrete] +// CHECK:STDOUT: %T.patt.5c0: %pattern_type.330 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.2ed: type = facet_type <@AddWith.1, @AddWith.1(%i16) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.737: %facet_type.2ed = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.de0: = lookup_impl_witness %.Self.737, @AddWith.1, @AddWith.1(%i16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.025: type = impl_witness_access %AddWith.lookup_impl_witness.de0, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.9dd: type = facet_type <@AddWith.1, @AddWith.1(%i16) & @Destroy where %impl.elem0.025 = %Int16> [concrete] // CHECK:STDOUT: %AddWith.type.2ed: type = facet_type <@AddWith.1, @AddWith.1(%i16)> [concrete] // CHECK:STDOUT: %AddWith.assoc_type.18f: type = assoc_entity_type @AddWith.1, @AddWith.1(%i16) [concrete] // CHECK:STDOUT: %assoc0.b7d: %AddWith.assoc_type.18f = assoc_entity element0, imports.%Core.import_ref.91f [concrete] // CHECK:STDOUT: %assoc1.e08: %AddWith.assoc_type.18f = assoc_entity element1, imports.%Core.import_ref.8ad [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.2: type = fn_type @Int16.Op.2 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.2: %Int16.Op.type.83af6e.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.b79: = custom_witness (%Int16, %Int16.Op.4dca31.2), @AddWith.1, @AddWith.1(%i16) [concrete] -// CHECK:STDOUT: %facet_value.a7b: %facet_type.653 = facet_value %Int16, (%custom_witness.1bfa2a.1, %custom_witness.b79) [concrete] -// CHECK:STDOUT: %.Self.frozen.97a: %facet_type.5ca = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.696: = complete_type_witness %facet_type.5ca [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.fde: type = facet_access_type %.Self.frozen.97a [symbolic_self] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.b4f: = lookup_impl_witness %.Self.frozen.97a, @AddWith.1, @AddWith.1(%i16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.f8a: type = impl_witness_access %AddWith.lookup_impl_witness.b4f, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.100: type = pattern_type %facet_type.653 [concrete] -// CHECK:STDOUT: %T.patt.781: %pattern_type.100 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %Int16.Op.type.83af6e.3: type = fn_type @Int16.Op.3 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.3: %Int16.Op.type.83af6e.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b79: = custom_witness (%Int16, %Int16.Op.4dca31.3), @AddWith.1, @AddWith.1(%i16) [concrete] +// CHECK:STDOUT: %facet_value.936: %facet_type.9dd = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1, %custom_witness.b79) [concrete] +// CHECK:STDOUT: %.Self.frozen.17a: %facet_type.2ed = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.32de8b.1: = complete_type_witness %facet_type.2ed [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.8c1: type = facet_access_type %.Self.frozen.17a [symbolic_self] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.03c: = lookup_impl_witness %.Self.frozen.17a, @AddWith.1, @AddWith.1(%i16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.719: type = impl_witness_access %AddWith.lookup_impl_witness.03c, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.b6f: type = pattern_type %facet_type.9dd [concrete] +// CHECK:STDOUT: %T.patt.b9b: %pattern_type.b6f = symbolic_binding_pattern T, 2 [symbolic] // CHECK:STDOUT: %x.param_patt.3b0: %pattern_type.785 = value_param_pattern [concrete] // CHECK:STDOUT: %x.patt.869: %pattern_type.785 = wrapper_binding_pattern x, %x.param_patt.3b0 [concrete] // CHECK:STDOUT: %y.param_patt.322: %pattern_type.9bc = value_param_pattern [concrete] // CHECK:STDOUT: %y.patt.a3a: %pattern_type.9bc = wrapper_binding_pattern y, %y.param_patt.322 [concrete] -// CHECK:STDOUT: %facet_type.79c: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%i16)> [concrete] -// CHECK:STDOUT: %.Self.869: %facet_type.79c = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.06f: = lookup_impl_witness %.Self.869, @SubWith.1, @SubWith.1(%i16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.0f8: type = impl_witness_access %SubWith.lookup_impl_witness.06f, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.cd5: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%i16) where %impl.elem0.0f8 = %Int16> [concrete] +// CHECK:STDOUT: %facet_type.606: type = facet_type <@SubWith.1, @SubWith.1(%i16) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.220: %facet_type.606 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.ebb: = lookup_impl_witness %.Self.220, @SubWith.1, @SubWith.1(%i16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.1b2: type = impl_witness_access %SubWith.lookup_impl_witness.ebb, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.1a3: type = facet_type <@SubWith.1, @SubWith.1(%i16) & @Destroy where %impl.elem0.1b2 = %Int16> [concrete] // CHECK:STDOUT: %SubWith.type.606: type = facet_type <@SubWith.1, @SubWith.1(%i16)> [concrete] // CHECK:STDOUT: %SubWith.assoc_type.9c3: type = assoc_entity_type @SubWith.1, @SubWith.1(%i16) [concrete] // CHECK:STDOUT: %assoc0.f66: %SubWith.assoc_type.9c3 = assoc_entity element0, imports.%Core.import_ref.190 [concrete] // CHECK:STDOUT: %assoc1.144: %SubWith.assoc_type.9c3 = assoc_entity element1, imports.%Core.import_ref.2f4 [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.3: type = fn_type @Int16.Op.3 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.3: %Int16.Op.type.83af6e.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1e8: = custom_witness (%Int16, %Int16.Op.4dca31.3), @SubWith.1, @SubWith.1(%i16) [concrete] -// CHECK:STDOUT: %facet_value.b33: %facet_type.cd5 = facet_value %Int16, (%custom_witness.1bfa2a.1, %custom_witness.1e8) [concrete] -// CHECK:STDOUT: %.Self.frozen.ca4: %facet_type.79c = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.00f: = complete_type_witness %facet_type.79c [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.6d3: type = facet_access_type %.Self.frozen.ca4 [symbolic_self] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.b85: = lookup_impl_witness %.Self.frozen.ca4, @SubWith.1, @SubWith.1(%i16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.09d: type = impl_witness_access %SubWith.lookup_impl_witness.b85, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.223: type = pattern_type %facet_type.cd5 [concrete] -// CHECK:STDOUT: %T.patt.bf8: %pattern_type.223 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.aa5: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%i16)> [concrete] -// CHECK:STDOUT: %.Self.a43: %facet_type.aa5 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.4b9: = lookup_impl_witness %.Self.a43, @MulWith.1, @MulWith.1(%i16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.b58: type = impl_witness_access %MulWith.lookup_impl_witness.4b9, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.737: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%i16) where %impl.elem0.b58 = %Int16> [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.4: type = fn_type @Int16.Op.4 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.4: %Int16.Op.type.83af6e.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.1e8: = custom_witness (%Int16, %Int16.Op.4dca31.4), @SubWith.1, @SubWith.1(%i16) [concrete] +// CHECK:STDOUT: %facet_value.cc0: %facet_type.1a3 = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1, %custom_witness.1e8) [concrete] +// CHECK:STDOUT: %.Self.frozen.6eb: %facet_type.606 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.75c188.1: = complete_type_witness %facet_type.606 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.fe6: type = facet_access_type %.Self.frozen.6eb [symbolic_self] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.183: = lookup_impl_witness %.Self.frozen.6eb, @SubWith.1, @SubWith.1(%i16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.cc9: type = impl_witness_access %SubWith.lookup_impl_witness.183, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.8ce: type = pattern_type %facet_type.1a3 [concrete] +// CHECK:STDOUT: %T.patt.88b: %pattern_type.8ce = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.1e2: type = facet_type <@MulWith.1, @MulWith.1(%i16) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.c91: %facet_type.1e2 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.04e: = lookup_impl_witness %.Self.c91, @MulWith.1, @MulWith.1(%i16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.0df: type = impl_witness_access %MulWith.lookup_impl_witness.04e, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.26b: type = facet_type <@MulWith.1, @MulWith.1(%i16) & @Destroy where %impl.elem0.0df = %Int16> [concrete] // CHECK:STDOUT: %MulWith.type.1e2: type = facet_type <@MulWith.1, @MulWith.1(%i16)> [concrete] // CHECK:STDOUT: %MulWith.assoc_type.34c: type = assoc_entity_type @MulWith.1, @MulWith.1(%i16) [concrete] // CHECK:STDOUT: %assoc0.2d4: %MulWith.assoc_type.34c = assoc_entity element0, imports.%Core.import_ref.59c [concrete] // CHECK:STDOUT: %assoc1.635: %MulWith.assoc_type.34c = assoc_entity element1, imports.%Core.import_ref.fc2 [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.4: type = fn_type @Int16.Op.4 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.4: %Int16.Op.type.83af6e.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.e2b: = custom_witness (%Int16, %Int16.Op.4dca31.4), @MulWith.1, @MulWith.1(%i16) [concrete] -// CHECK:STDOUT: %facet_value.252: %facet_type.737 = facet_value %Int16, (%custom_witness.1bfa2a.1, %custom_witness.e2b) [concrete] -// CHECK:STDOUT: %.Self.frozen.44c: %facet_type.aa5 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.38d: = complete_type_witness %facet_type.aa5 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.4d6: type = facet_access_type %.Self.frozen.44c [symbolic_self] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.7e0: = lookup_impl_witness %.Self.frozen.44c, @MulWith.1, @MulWith.1(%i16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.af1: type = impl_witness_access %MulWith.lookup_impl_witness.7e0, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.8fc: type = pattern_type %facet_type.737 [concrete] -// CHECK:STDOUT: %T.patt.9b5: %pattern_type.8fc = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.bf3: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%i16)> [concrete] -// CHECK:STDOUT: %.Self.53f: %facet_type.bf3 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.bca: = lookup_impl_witness %.Self.53f, @DivWith.1, @DivWith.1(%i16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.324: type = impl_witness_access %DivWith.lookup_impl_witness.bca, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.502: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%i16) where %impl.elem0.324 = %Int16> [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.5: type = fn_type @Int16.Op.5 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.5: %Int16.Op.type.83af6e.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.e2b: = custom_witness (%Int16, %Int16.Op.4dca31.5), @MulWith.1, @MulWith.1(%i16) [concrete] +// CHECK:STDOUT: %facet_value.4ed: %facet_type.26b = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1, %custom_witness.e2b) [concrete] +// CHECK:STDOUT: %.Self.frozen.a99: %facet_type.1e2 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.a7adcd.1: = complete_type_witness %facet_type.1e2 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.6f1: type = facet_access_type %.Self.frozen.a99 [symbolic_self] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.7ca: = lookup_impl_witness %.Self.frozen.a99, @MulWith.1, @MulWith.1(%i16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.c79: type = impl_witness_access %MulWith.lookup_impl_witness.7ca, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.2a0: type = pattern_type %facet_type.26b [concrete] +// CHECK:STDOUT: %T.patt.c4b: %pattern_type.2a0 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.45d: type = facet_type <@DivWith.1, @DivWith.1(%i16) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.327: %facet_type.45d = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.851: = lookup_impl_witness %.Self.327, @DivWith.1, @DivWith.1(%i16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.833: type = impl_witness_access %DivWith.lookup_impl_witness.851, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.cb9: type = facet_type <@DivWith.1, @DivWith.1(%i16) & @Destroy where %impl.elem0.833 = %Int16> [concrete] // CHECK:STDOUT: %DivWith.type.45d: type = facet_type <@DivWith.1, @DivWith.1(%i16)> [concrete] // CHECK:STDOUT: %DivWith.assoc_type.5a4: type = assoc_entity_type @DivWith.1, @DivWith.1(%i16) [concrete] // CHECK:STDOUT: %assoc0.156: %DivWith.assoc_type.5a4 = assoc_entity element0, imports.%Core.import_ref.dee [concrete] // CHECK:STDOUT: %assoc1.444: %DivWith.assoc_type.5a4 = assoc_entity element1, imports.%Core.import_ref.f2f [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.5: type = fn_type @Int16.Op.5 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.5: %Int16.Op.type.83af6e.5 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.21db: = custom_witness (%Int16, %Int16.Op.4dca31.5), @DivWith.1, @DivWith.1(%i16) [concrete] -// CHECK:STDOUT: %facet_value.d02: %facet_type.502 = facet_value %Int16, (%custom_witness.1bfa2a.1, %custom_witness.21db) [concrete] -// CHECK:STDOUT: %.Self.frozen.301: %facet_type.bf3 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.29f: = complete_type_witness %facet_type.bf3 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.b24: type = facet_access_type %.Self.frozen.301 [symbolic_self] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.cfc: = lookup_impl_witness %.Self.frozen.301, @DivWith.1, @DivWith.1(%i16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.ede: type = impl_witness_access %DivWith.lookup_impl_witness.cfc, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.afa: type = pattern_type %facet_type.502 [concrete] -// CHECK:STDOUT: %T.patt.3d8: %pattern_type.afa = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.740: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%i16)> [concrete] -// CHECK:STDOUT: %.Self.060: %facet_type.740 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.05c: = lookup_impl_witness %.Self.060, @ModWith.1, @ModWith.1(%i16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.341: type = impl_witness_access %ModWith.lookup_impl_witness.05c, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.cac: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%i16) where %impl.elem0.341 = %Int16> [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.6: type = fn_type @Int16.Op.6 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.6: %Int16.Op.type.83af6e.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.21db: = custom_witness (%Int16, %Int16.Op.4dca31.6), @DivWith.1, @DivWith.1(%i16) [concrete] +// CHECK:STDOUT: %facet_value.69b: %facet_type.cb9 = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1, %custom_witness.21db) [concrete] +// CHECK:STDOUT: %.Self.frozen.52f: %facet_type.45d = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.d57eaf.1: = complete_type_witness %facet_type.45d [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.8c0: type = facet_access_type %.Self.frozen.52f [symbolic_self] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.5df: = lookup_impl_witness %.Self.frozen.52f, @DivWith.1, @DivWith.1(%i16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.967: type = impl_witness_access %DivWith.lookup_impl_witness.5df, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.264: type = pattern_type %facet_type.cb9 [concrete] +// CHECK:STDOUT: %T.patt.19d: %pattern_type.264 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.104: type = facet_type <@ModWith.1, @ModWith.1(%i16) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.6a7: %facet_type.104 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.177: = lookup_impl_witness %.Self.6a7, @ModWith.1, @ModWith.1(%i16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.d83: type = impl_witness_access %ModWith.lookup_impl_witness.177, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.70f: type = facet_type <@ModWith.1, @ModWith.1(%i16) & @Destroy where %impl.elem0.d83 = %Int16> [concrete] // CHECK:STDOUT: %ModWith.type.104: type = facet_type <@ModWith.1, @ModWith.1(%i16)> [concrete] // CHECK:STDOUT: %ModWith.assoc_type.0e9: type = assoc_entity_type @ModWith.1, @ModWith.1(%i16) [concrete] // CHECK:STDOUT: %assoc0.92c: %ModWith.assoc_type.0e9 = assoc_entity element0, imports.%Core.import_ref.61a [concrete] // CHECK:STDOUT: %assoc1.870: %ModWith.assoc_type.0e9 = assoc_entity element1, imports.%Core.import_ref.9f8f [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.6: type = fn_type @Int16.Op.6 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.6: %Int16.Op.type.83af6e.6 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.6dd: = custom_witness (%Int16, %Int16.Op.4dca31.6), @ModWith.1, @ModWith.1(%i16) [concrete] -// CHECK:STDOUT: %facet_value.004: %facet_type.cac = facet_value %Int16, (%custom_witness.1bfa2a.1, %custom_witness.6dd) [concrete] -// CHECK:STDOUT: %.Self.frozen.0d4: %facet_type.740 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.3c9: = complete_type_witness %facet_type.740 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.1a0: type = facet_access_type %.Self.frozen.0d4 [symbolic_self] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.1a7: = lookup_impl_witness %.Self.frozen.0d4, @ModWith.1, @ModWith.1(%i16) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.5b5: type = impl_witness_access %ModWith.lookup_impl_witness.1a7, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.8da: type = pattern_type %facet_type.cac [concrete] -// CHECK:STDOUT: %T.patt.b66: %pattern_type.8da = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc190 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc190 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %Int32.SubobjectDestroy.type: type = fn_type @Int32.SubobjectDestroy [concrete] -// CHECK:STDOUT: %Int32.SubobjectDestroy: %Int32.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1bfa2a.2: = custom_witness (%Destroy.WithSelf.Op.403171.3, %Int32.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.3), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.84d: %Destroy.type = facet_value %Int32, (%custom_witness.1bfa2a.2) [concrete] -// CHECK:STDOUT: %facet_type.5cd: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%Int32)> [concrete] -// CHECK:STDOUT: %.Self.726: %facet_type.5cd = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.bcf: = lookup_impl_witness %.Self.726, @AddWith.1, @AddWith.1(%Int32) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.953: type = impl_witness_access %AddWith.lookup_impl_witness.bcf, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.030: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%Int32) where %impl.elem0.953 = %Int32> [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.7: type = fn_type @Int16.Op.7 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.7: %Int16.Op.type.83af6e.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.6dd: = custom_witness (%Int16, %Int16.Op.4dca31.7), @ModWith.1, @ModWith.1(%i16) [concrete] +// CHECK:STDOUT: %facet_value.0fe: %facet_type.70f = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1, %custom_witness.6dd) [concrete] +// CHECK:STDOUT: %.Self.frozen.b7c: %facet_type.104 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.4d792a.1: = complete_type_witness %facet_type.104 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.e20: type = facet_access_type %.Self.frozen.b7c [symbolic_self] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.a99: = lookup_impl_witness %.Self.frozen.b7c, @ModWith.1, @ModWith.1(%i16) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.b94: type = impl_witness_access %ModWith.lookup_impl_witness.a99, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.4c3: type = pattern_type %facet_type.70f [concrete] +// CHECK:STDOUT: %T.patt.cf6: %pattern_type.4c3 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %Int32.Op.type.83af6e.1: type = fn_type @Int32.Op.1 [concrete] +// CHECK:STDOUT: %Int32.Op.4dca31.1: %Int32.Op.type.83af6e.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.2: = custom_witness (%Int32.Op.4dca31.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.416: %SubobjectDestroy.type = facet_value %Int32, (%custom_witness.5760f4.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.40d: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.416) [concrete] +// CHECK:STDOUT: %Destroy.facet.c63: %Destroy.type = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2) [concrete] +// CHECK:STDOUT: %facet_type.db7: type = facet_type <@AddWith.1, @AddWith.1(%Int32) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.6a9: %facet_type.db7 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.f6c: = lookup_impl_witness %.Self.6a9, @AddWith.1, @AddWith.1(%Int32) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.a74: type = impl_witness_access %AddWith.lookup_impl_witness.f6c, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.bf5: type = facet_type <@AddWith.1, @AddWith.1(%Int32) & @Destroy where %impl.elem0.a74 = %Int32> [concrete] // CHECK:STDOUT: %AddWith.type.db7: type = facet_type <@AddWith.1, @AddWith.1(%Int32)> [concrete] // CHECK:STDOUT: %AddWith.assoc_type.be8: type = assoc_entity_type @AddWith.1, @AddWith.1(%Int32) [concrete] // CHECK:STDOUT: %assoc0.31c: %AddWith.assoc_type.be8 = assoc_entity element0, imports.%Core.import_ref.91f [concrete] // CHECK:STDOUT: %assoc1.86c: %AddWith.assoc_type.be8 = assoc_entity element1, imports.%Core.import_ref.8ad [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.7: type = fn_type @Int16.Op.7 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.7: %Int16.Op.type.83af6e.7 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.513476.1: = custom_witness (%Int32, %Int16.Op.4dca31.7), @AddWith.1, @AddWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.bf4: %facet_type.030 = facet_value %Int16, (%custom_witness.1bfa2a.1, %custom_witness.513476.1) [concrete] -// CHECK:STDOUT: %.Self.frozen.52a: %facet_type.5cd = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.18d: = complete_type_witness %facet_type.5cd [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.988: type = facet_access_type %.Self.frozen.52a [symbolic_self] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.3ac: = lookup_impl_witness %.Self.frozen.52a, @AddWith.1, @AddWith.1(%Int32) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.958: type = impl_witness_access %AddWith.lookup_impl_witness.3ac, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.c1b: type = pattern_type %facet_type.030 [concrete] -// CHECK:STDOUT: %T.patt.16ff: %pattern_type.c1b = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %Int16.Op.type.83af6e.8: type = fn_type @Int16.Op.8 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.8: %Int16.Op.type.83af6e.8 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.513476.1: = custom_witness (%Int32, %Int16.Op.4dca31.8), @AddWith.1, @AddWith.1(%Int32) [concrete] +// CHECK:STDOUT: %facet_value.15a: %facet_type.bf5 = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1, %custom_witness.513476.1) [concrete] +// CHECK:STDOUT: %.Self.frozen.bc4: %facet_type.db7 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.758ea8.1: = complete_type_witness %facet_type.db7 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.447: type = facet_access_type %.Self.frozen.bc4 [symbolic_self] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.a9e: = lookup_impl_witness %.Self.frozen.bc4, @AddWith.1, @AddWith.1(%Int32) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.517: type = impl_witness_access %AddWith.lookup_impl_witness.a9e, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.eea: type = pattern_type %facet_type.bf5 [concrete] +// CHECK:STDOUT: %T.patt.79b: %pattern_type.eea = symbolic_binding_pattern T, 2 [symbolic] // CHECK:STDOUT: %result.param_patt.e81: %pattern_type.8b4 = value_param_pattern [concrete] // CHECK:STDOUT: %result.patt.47f: %pattern_type.8b4 = wrapper_binding_pattern result, %result.param_patt.e81 [concrete] // CHECK:STDOUT: %y.param_patt.e0c: %pattern_type.8b4 = value_param_pattern [concrete] // CHECK:STDOUT: %y.patt.9e1: %pattern_type.8b4 = wrapper_binding_pattern y, %y.param_patt.e0c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.53c: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.84d) [concrete] -// CHECK:STDOUT: %.77c: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.53c, %Destroy.facet.84d [concrete] -// CHECK:STDOUT: %facet_type.393: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%Int32)> [concrete] -// CHECK:STDOUT: %.Self.eac: %facet_type.393 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.0dc: = lookup_impl_witness %.Self.eac, @SubWith.1, @SubWith.1(%Int32) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.bb5a: type = impl_witness_access %SubWith.lookup_impl_witness.0dc, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.767: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%Int32) where %impl.elem0.bb5a = %Int32> [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.195: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c63) [concrete] +// CHECK:STDOUT: %facet_type.120: type = facet_type <@SubWith.1, @SubWith.1(%Int32) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.861: %facet_type.120 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.4cf: = lookup_impl_witness %.Self.861, @SubWith.1, @SubWith.1(%Int32) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.94c: type = impl_witness_access %SubWith.lookup_impl_witness.4cf, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.b03: type = facet_type <@SubWith.1, @SubWith.1(%Int32) & @Destroy where %impl.elem0.94c = %Int32> [concrete] // CHECK:STDOUT: %SubWith.type.120: type = facet_type <@SubWith.1, @SubWith.1(%Int32)> [concrete] // CHECK:STDOUT: %SubWith.assoc_type.dae: type = assoc_entity_type @SubWith.1, @SubWith.1(%Int32) [concrete] // CHECK:STDOUT: %assoc0.fac: %SubWith.assoc_type.dae = assoc_entity element0, imports.%Core.import_ref.190 [concrete] // CHECK:STDOUT: %assoc1.147: %SubWith.assoc_type.dae = assoc_entity element1, imports.%Core.import_ref.2f4 [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.8: type = fn_type @Int16.Op.8 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.8: %Int16.Op.type.83af6e.8 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.32cef1.1: = custom_witness (%Int32, %Int16.Op.4dca31.8), @SubWith.1, @SubWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.436: %facet_type.767 = facet_value %Int16, (%custom_witness.1bfa2a.1, %custom_witness.32cef1.1) [concrete] -// CHECK:STDOUT: %.Self.frozen.36d: %facet_type.393 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.8a6: = complete_type_witness %facet_type.393 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.88b: type = facet_access_type %.Self.frozen.36d [symbolic_self] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.10e: = lookup_impl_witness %.Self.frozen.36d, @SubWith.1, @SubWith.1(%Int32) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.d88: type = impl_witness_access %SubWith.lookup_impl_witness.10e, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.974: type = pattern_type %facet_type.767 [concrete] -// CHECK:STDOUT: %T.patt.3c7: %pattern_type.974 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.ea6: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%Int32)> [concrete] -// CHECK:STDOUT: %.Self.44f: %facet_type.ea6 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.527: = lookup_impl_witness %.Self.44f, @MulWith.1, @MulWith.1(%Int32) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.054: type = impl_witness_access %MulWith.lookup_impl_witness.527, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.9d8: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%Int32) where %impl.elem0.054 = %Int32> [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.9: type = fn_type @Int16.Op.9 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.9: %Int16.Op.type.83af6e.9 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.32cef1.1: = custom_witness (%Int32, %Int16.Op.4dca31.9), @SubWith.1, @SubWith.1(%Int32) [concrete] +// CHECK:STDOUT: %facet_value.771: %facet_type.b03 = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1, %custom_witness.32cef1.1) [concrete] +// CHECK:STDOUT: %.Self.frozen.faf: %facet_type.120 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.46ea3c.1: = complete_type_witness %facet_type.120 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.ea6: type = facet_access_type %.Self.frozen.faf [symbolic_self] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.c4f: = lookup_impl_witness %.Self.frozen.faf, @SubWith.1, @SubWith.1(%Int32) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.b5a: type = impl_witness_access %SubWith.lookup_impl_witness.c4f, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.110: type = pattern_type %facet_type.b03 [concrete] +// CHECK:STDOUT: %T.patt.e31: %pattern_type.110 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.d67b: type = facet_type <@MulWith.1, @MulWith.1(%Int32) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.cb9: %facet_type.d67b = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.4ca: = lookup_impl_witness %.Self.cb9, @MulWith.1, @MulWith.1(%Int32) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.311: type = impl_witness_access %MulWith.lookup_impl_witness.4ca, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.b52: type = facet_type <@MulWith.1, @MulWith.1(%Int32) & @Destroy where %impl.elem0.311 = %Int32> [concrete] // CHECK:STDOUT: %MulWith.type.d67: type = facet_type <@MulWith.1, @MulWith.1(%Int32)> [concrete] // CHECK:STDOUT: %MulWith.assoc_type.ab1: type = assoc_entity_type @MulWith.1, @MulWith.1(%Int32) [concrete] // CHECK:STDOUT: %assoc0.d0a: %MulWith.assoc_type.ab1 = assoc_entity element0, imports.%Core.import_ref.59c [concrete] // CHECK:STDOUT: %assoc1.349: %MulWith.assoc_type.ab1 = assoc_entity element1, imports.%Core.import_ref.fc2 [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.9: type = fn_type @Int16.Op.9 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.9: %Int16.Op.type.83af6e.9 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.3a0675.1: = custom_witness (%Int32, %Int16.Op.4dca31.9), @MulWith.1, @MulWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.1b5: %facet_type.9d8 = facet_value %Int16, (%custom_witness.1bfa2a.1, %custom_witness.3a0675.1) [concrete] -// CHECK:STDOUT: %.Self.frozen.95b: %facet_type.ea6 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.8fe: = complete_type_witness %facet_type.ea6 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.f47: type = facet_access_type %.Self.frozen.95b [symbolic_self] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.675: = lookup_impl_witness %.Self.frozen.95b, @MulWith.1, @MulWith.1(%Int32) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.1de: type = impl_witness_access %MulWith.lookup_impl_witness.675, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.a89: type = pattern_type %facet_type.9d8 [concrete] -// CHECK:STDOUT: %T.patt.144: %pattern_type.a89 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.821: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%Int32)> [concrete] -// CHECK:STDOUT: %.Self.37d: %facet_type.821 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.7ae: = lookup_impl_witness %.Self.37d, @DivWith.1, @DivWith.1(%Int32) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.6c4: type = impl_witness_access %DivWith.lookup_impl_witness.7ae, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%Int32) where %impl.elem0.6c4 = %Int32> [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.10: type = fn_type @Int16.Op.10 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.10: %Int16.Op.type.83af6e.10 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.3a0675.1: = custom_witness (%Int32, %Int16.Op.4dca31.10), @MulWith.1, @MulWith.1(%Int32) [concrete] +// CHECK:STDOUT: %facet_value.294: %facet_type.b52 = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1, %custom_witness.3a0675.1) [concrete] +// CHECK:STDOUT: %.Self.frozen.c7a: %facet_type.d67b = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.920626.1: = complete_type_witness %facet_type.d67b [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.c47: type = facet_access_type %.Self.frozen.c7a [symbolic_self] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.ab5: = lookup_impl_witness %.Self.frozen.c7a, @MulWith.1, @MulWith.1(%Int32) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.6ef: type = impl_witness_access %MulWith.lookup_impl_witness.ab5, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.f70: type = pattern_type %facet_type.b52 [concrete] +// CHECK:STDOUT: %T.patt.040: %pattern_type.f70 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.5a1: type = facet_type <@DivWith.1, @DivWith.1(%Int32) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.208: %facet_type.5a1 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.0ac: = lookup_impl_witness %.Self.208, @DivWith.1, @DivWith.1(%Int32) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.437: type = impl_witness_access %DivWith.lookup_impl_witness.0ac, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.f29: type = facet_type <@DivWith.1, @DivWith.1(%Int32) & @Destroy where %impl.elem0.437 = %Int32> [concrete] // CHECK:STDOUT: %DivWith.type.5a1: type = facet_type <@DivWith.1, @DivWith.1(%Int32)> [concrete] // CHECK:STDOUT: %DivWith.assoc_type.22f: type = assoc_entity_type @DivWith.1, @DivWith.1(%Int32) [concrete] // CHECK:STDOUT: %assoc0.a9d: %DivWith.assoc_type.22f = assoc_entity element0, imports.%Core.import_ref.dee [concrete] // CHECK:STDOUT: %assoc1.004: %DivWith.assoc_type.22f = assoc_entity element1, imports.%Core.import_ref.f2f [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.10: type = fn_type @Int16.Op.10 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.10: %Int16.Op.type.83af6e.10 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.c32685.1: = custom_witness (%Int32, %Int16.Op.4dca31.10), @DivWith.1, @DivWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.f68: %facet_type.f48 = facet_value %Int16, (%custom_witness.1bfa2a.1, %custom_witness.c32685.1) [concrete] -// CHECK:STDOUT: %.Self.frozen.3ed: %facet_type.821 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.5bd: = complete_type_witness %facet_type.821 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.553: type = facet_access_type %.Self.frozen.3ed [symbolic_self] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.1af: = lookup_impl_witness %.Self.frozen.3ed, @DivWith.1, @DivWith.1(%Int32) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a46: type = impl_witness_access %DivWith.lookup_impl_witness.1af, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.4e6: type = pattern_type %facet_type.f48 [concrete] -// CHECK:STDOUT: %T.patt.def: %pattern_type.4e6 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.9c3: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%Int32)> [concrete] -// CHECK:STDOUT: %.Self.f60: %facet_type.9c3 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.9a9: = lookup_impl_witness %.Self.f60, @ModWith.1, @ModWith.1(%Int32) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.522: type = impl_witness_access %ModWith.lookup_impl_witness.9a9, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.115: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%Int32) where %impl.elem0.522 = %Int32> [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.11: type = fn_type @Int16.Op.11 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.11: %Int16.Op.type.83af6e.11 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.c32685.1: = custom_witness (%Int32, %Int16.Op.4dca31.11), @DivWith.1, @DivWith.1(%Int32) [concrete] +// CHECK:STDOUT: %facet_value.f37: %facet_type.f29 = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1, %custom_witness.c32685.1) [concrete] +// CHECK:STDOUT: %.Self.frozen.057: %facet_type.5a1 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.348fba.1: = complete_type_witness %facet_type.5a1 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.cc3: type = facet_access_type %.Self.frozen.057 [symbolic_self] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.ca2: = lookup_impl_witness %.Self.frozen.057, @DivWith.1, @DivWith.1(%Int32) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.14b: type = impl_witness_access %DivWith.lookup_impl_witness.ca2, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.3d3: type = pattern_type %facet_type.f29 [concrete] +// CHECK:STDOUT: %T.patt.db7: %pattern_type.3d3 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.794: type = facet_type <@ModWith.1, @ModWith.1(%Int32) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.618: %facet_type.794 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.01c: = lookup_impl_witness %.Self.618, @ModWith.1, @ModWith.1(%Int32) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.3bb: type = impl_witness_access %ModWith.lookup_impl_witness.01c, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.3d9: type = facet_type <@ModWith.1, @ModWith.1(%Int32) & @Destroy where %impl.elem0.3bb = %Int32> [concrete] // CHECK:STDOUT: %ModWith.type.794: type = facet_type <@ModWith.1, @ModWith.1(%Int32)> [concrete] // CHECK:STDOUT: %ModWith.assoc_type.021: type = assoc_entity_type @ModWith.1, @ModWith.1(%Int32) [concrete] // CHECK:STDOUT: %assoc0.310: %ModWith.assoc_type.021 = assoc_entity element0, imports.%Core.import_ref.61a [concrete] // CHECK:STDOUT: %assoc1.2eb: %ModWith.assoc_type.021 = assoc_entity element1, imports.%Core.import_ref.9f8f [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.11: type = fn_type @Int16.Op.11 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.11: %Int16.Op.type.83af6e.11 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.994c75.1: = custom_witness (%Int32, %Int16.Op.4dca31.11), @ModWith.1, @ModWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.46b: %facet_type.115 = facet_value %Int16, (%custom_witness.1bfa2a.1, %custom_witness.994c75.1) [concrete] -// CHECK:STDOUT: %.Self.frozen.b38: %facet_type.9c3 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.0b7: = complete_type_witness %facet_type.9c3 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.f01: type = facet_access_type %.Self.frozen.b38 [symbolic_self] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.ac5: = lookup_impl_witness %.Self.frozen.b38, @ModWith.1, @ModWith.1(%Int32) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.914: type = impl_witness_access %ModWith.lookup_impl_witness.ac5, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.393: type = pattern_type %facet_type.115 [concrete] -// CHECK:STDOUT: %T.patt.be9: %pattern_type.393 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.788: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%Int16) where %impl.elem0.2cc = %Int32> [concrete] -// CHECK:STDOUT: %Int32.Op.type.83af6e.1: type = fn_type @Int32.Op.1 [concrete] -// CHECK:STDOUT: %Int32.Op.4dca31.1: %Int32.Op.type.83af6e.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.ea1: = custom_witness (%Int32, %Int32.Op.4dca31.1), @AddWith.1, @AddWith.1(%Int16) [concrete] -// CHECK:STDOUT: %facet_value.e86: %facet_type.788 = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.ea1) [concrete] -// CHECK:STDOUT: %pattern_type.dc6: type = pattern_type %facet_type.788 [concrete] -// CHECK:STDOUT: %T.patt.0c1: %pattern_type.dc6 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %x.param_patt.27c: %pattern_type.8b4 = value_param_pattern [concrete] -// CHECK:STDOUT: %x.patt.740: %pattern_type.8b4 = wrapper_binding_pattern x, %x.param_patt.27c [concrete] -// CHECK:STDOUT: %facet_type.1b0: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%Int16) where %impl.elem0.f92 = %Int32> [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.12: type = fn_type @Int16.Op.12 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.12: %Int16.Op.type.83af6e.12 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.994c75.1: = custom_witness (%Int32, %Int16.Op.4dca31.12), @ModWith.1, @ModWith.1(%Int32) [concrete] +// CHECK:STDOUT: %facet_value.951: %facet_type.3d9 = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1, %custom_witness.994c75.1) [concrete] +// CHECK:STDOUT: %.Self.frozen.813: %facet_type.794 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.cc95ce.1: = complete_type_witness %facet_type.794 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.f4a: type = facet_access_type %.Self.frozen.813 [symbolic_self] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.efb: = lookup_impl_witness %.Self.frozen.813, @ModWith.1, @ModWith.1(%Int32) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.e83: type = impl_witness_access %ModWith.lookup_impl_witness.efb, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.f5f: type = pattern_type %facet_type.3d9 [concrete] +// CHECK:STDOUT: %T.patt.27e: %pattern_type.f5f = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.177: type = facet_type <@AddWith.1, @AddWith.1(%Int16) & @Destroy where %impl.elem0.08e = %Int32> [concrete] // CHECK:STDOUT: %Int32.Op.type.83af6e.2: type = fn_type @Int32.Op.2 [concrete] // CHECK:STDOUT: %Int32.Op.4dca31.2: %Int32.Op.type.83af6e.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.576: = custom_witness (%Int32, %Int32.Op.4dca31.2), @SubWith.1, @SubWith.1(%Int16) [concrete] -// CHECK:STDOUT: %facet_value.b78: %facet_type.1b0 = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.576) [concrete] -// CHECK:STDOUT: %pattern_type.6d5: type = pattern_type %facet_type.1b0 [concrete] -// CHECK:STDOUT: %T.patt.282: %pattern_type.6d5 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.ccf: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%Int16) where %impl.elem0.979 = %Int32> [concrete] +// CHECK:STDOUT: %custom_witness.ea1: = custom_witness (%Int32, %Int32.Op.4dca31.2), @AddWith.1, @AddWith.1(%Int16) [concrete] +// CHECK:STDOUT: %facet_value.dd9: %facet_type.177 = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.ea1) [concrete] +// CHECK:STDOUT: %pattern_type.f16: type = pattern_type %facet_type.177 [concrete] +// CHECK:STDOUT: %T.patt.4c6: %pattern_type.f16 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %x.param_patt.27c: %pattern_type.8b4 = value_param_pattern [concrete] +// CHECK:STDOUT: %x.patt.740: %pattern_type.8b4 = wrapper_binding_pattern x, %x.param_patt.27c [concrete] +// CHECK:STDOUT: %facet_type.760: type = facet_type <@SubWith.1, @SubWith.1(%Int16) & @Destroy where %impl.elem0.22a = %Int32> [concrete] // CHECK:STDOUT: %Int32.Op.type.83af6e.3: type = fn_type @Int32.Op.3 [concrete] // CHECK:STDOUT: %Int32.Op.4dca31.3: %Int32.Op.type.83af6e.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.751: = custom_witness (%Int32, %Int32.Op.4dca31.3), @MulWith.1, @MulWith.1(%Int16) [concrete] -// CHECK:STDOUT: %facet_value.191: %facet_type.ccf = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.751) [concrete] -// CHECK:STDOUT: %pattern_type.d9e: type = pattern_type %facet_type.ccf [concrete] -// CHECK:STDOUT: %T.patt.879: %pattern_type.d9e = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.64f: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%Int16) where %impl.elem0.17b = %Int32> [concrete] +// CHECK:STDOUT: %custom_witness.576f: = custom_witness (%Int32, %Int32.Op.4dca31.3), @SubWith.1, @SubWith.1(%Int16) [concrete] +// CHECK:STDOUT: %facet_value.800: %facet_type.760 = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.576f) [concrete] +// CHECK:STDOUT: %pattern_type.524: type = pattern_type %facet_type.760 [concrete] +// CHECK:STDOUT: %T.patt.83d: %pattern_type.524 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.1cc: type = facet_type <@MulWith.1, @MulWith.1(%Int16) & @Destroy where %impl.elem0.088 = %Int32> [concrete] // CHECK:STDOUT: %Int32.Op.type.83af6e.4: type = fn_type @Int32.Op.4 [concrete] // CHECK:STDOUT: %Int32.Op.4dca31.4: %Int32.Op.type.83af6e.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.9ad: = custom_witness (%Int32, %Int32.Op.4dca31.4), @DivWith.1, @DivWith.1(%Int16) [concrete] -// CHECK:STDOUT: %facet_value.211: %facet_type.64f = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.9ad) [concrete] -// CHECK:STDOUT: %pattern_type.b6c: type = pattern_type %facet_type.64f [concrete] -// CHECK:STDOUT: %T.patt.731: %pattern_type.b6c = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.b31: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%Int16) where %impl.elem0.e30 = %Int32> [concrete] +// CHECK:STDOUT: %custom_witness.751: = custom_witness (%Int32, %Int32.Op.4dca31.4), @MulWith.1, @MulWith.1(%Int16) [concrete] +// CHECK:STDOUT: %facet_value.b0b: %facet_type.1cc = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.751) [concrete] +// CHECK:STDOUT: %pattern_type.89d: type = pattern_type %facet_type.1cc [concrete] +// CHECK:STDOUT: %T.patt.b89: %pattern_type.89d = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.8ff: type = facet_type <@DivWith.1, @DivWith.1(%Int16) & @Destroy where %impl.elem0.6cf = %Int32> [concrete] // CHECK:STDOUT: %Int32.Op.type.83af6e.5: type = fn_type @Int32.Op.5 [concrete] // CHECK:STDOUT: %Int32.Op.4dca31.5: %Int32.Op.type.83af6e.5 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.8a2: = custom_witness (%Int32, %Int32.Op.4dca31.5), @ModWith.1, @ModWith.1(%Int16) [concrete] -// CHECK:STDOUT: %facet_value.09f: %facet_type.b31 = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.8a2) [concrete] -// CHECK:STDOUT: %pattern_type.df6: type = pattern_type %facet_type.b31 [concrete] -// CHECK:STDOUT: %T.patt.336: %pattern_type.df6 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %custom_witness.9ad: = custom_witness (%Int32, %Int32.Op.4dca31.5), @DivWith.1, @DivWith.1(%Int16) [concrete] +// CHECK:STDOUT: %facet_value.9ed: %facet_type.8ff = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.9ad) [concrete] +// CHECK:STDOUT: %pattern_type.d01: type = pattern_type %facet_type.8ff [concrete] +// CHECK:STDOUT: %T.patt.832: %pattern_type.d01 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.960: type = facet_type <@ModWith.1, @ModWith.1(%Int16) & @Destroy where %impl.elem0.14c = %Int32> [concrete] // CHECK:STDOUT: %Int32.Op.type.83af6e.6: type = fn_type @Int32.Op.6 [concrete] // CHECK:STDOUT: %Int32.Op.4dca31.6: %Int32.Op.type.83af6e.6 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.513476.2: = custom_witness (%Int32, %Int32.Op.4dca31.6), @AddWith.1, @AddWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.5ed: %facet_type.030 = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.513476.2) [concrete] +// CHECK:STDOUT: %custom_witness.8a2: = custom_witness (%Int32, %Int32.Op.4dca31.6), @ModWith.1, @ModWith.1(%Int16) [concrete] +// CHECK:STDOUT: %facet_value.87f: %facet_type.960 = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.8a2) [concrete] +// CHECK:STDOUT: %pattern_type.3be: type = pattern_type %facet_type.960 [concrete] +// CHECK:STDOUT: %T.patt.c9a: %pattern_type.3be = symbolic_binding_pattern T, 2 [symbolic] // CHECK:STDOUT: %Int32.Op.type.83af6e.7: type = fn_type @Int32.Op.7 [concrete] // CHECK:STDOUT: %Int32.Op.4dca31.7: %Int32.Op.type.83af6e.7 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.32cef1.2: = custom_witness (%Int32, %Int32.Op.4dca31.7), @SubWith.1, @SubWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.889: %facet_type.767 = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.32cef1.2) [concrete] +// CHECK:STDOUT: %custom_witness.513476.2: = custom_witness (%Int32, %Int32.Op.4dca31.7), @AddWith.1, @AddWith.1(%Int32) [concrete] +// CHECK:STDOUT: %facet_value.76f: %facet_type.bf5 = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.513476.2) [concrete] // CHECK:STDOUT: %Int32.Op.type.83af6e.8: type = fn_type @Int32.Op.8 [concrete] // CHECK:STDOUT: %Int32.Op.4dca31.8: %Int32.Op.type.83af6e.8 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.3a0675.2: = custom_witness (%Int32, %Int32.Op.4dca31.8), @MulWith.1, @MulWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.f7d: %facet_type.9d8 = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.3a0675.2) [concrete] +// CHECK:STDOUT: %custom_witness.32cef1.2: = custom_witness (%Int32, %Int32.Op.4dca31.8), @SubWith.1, @SubWith.1(%Int32) [concrete] +// CHECK:STDOUT: %facet_value.930: %facet_type.b03 = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.32cef1.2) [concrete] // CHECK:STDOUT: %Int32.Op.type.83af6e.9: type = fn_type @Int32.Op.9 [concrete] // CHECK:STDOUT: %Int32.Op.4dca31.9: %Int32.Op.type.83af6e.9 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.c32685.2: = custom_witness (%Int32, %Int32.Op.4dca31.9), @DivWith.1, @DivWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.403: %facet_type.f48 = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.c32685.2) [concrete] +// CHECK:STDOUT: %custom_witness.3a0675.2: = custom_witness (%Int32, %Int32.Op.4dca31.9), @MulWith.1, @MulWith.1(%Int32) [concrete] +// CHECK:STDOUT: %facet_value.702: %facet_type.b52 = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.3a0675.2) [concrete] // CHECK:STDOUT: %Int32.Op.type.83af6e.10: type = fn_type @Int32.Op.10 [concrete] // CHECK:STDOUT: %Int32.Op.4dca31.10: %Int32.Op.type.83af6e.10 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.994c75.2: = custom_witness (%Int32, %Int32.Op.4dca31.10), @ModWith.1, @ModWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.559: %facet_type.115 = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.994c75.2) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc211 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc211 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %Int64.SubobjectDestroy.type: type = fn_type @Int64.SubobjectDestroy [concrete] -// CHECK:STDOUT: %Int64.SubobjectDestroy: %Int64.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1bfa2a.3: = custom_witness (%Destroy.WithSelf.Op.403171.4, %Int64.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.4), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.0b4: %Destroy.type = facet_value %Int64, (%custom_witness.1bfa2a.3) [concrete] -// CHECK:STDOUT: %facet_type.e1d: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%Int64)> [concrete] -// CHECK:STDOUT: %.Self.ad4: %facet_type.e1d = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.a60: = lookup_impl_witness %.Self.ad4, @AddWith.1, @AddWith.1(%Int64) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.7fa: type = impl_witness_access %AddWith.lookup_impl_witness.a60, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.37a: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%Int64) where %impl.elem0.7fa = %Int64> [concrete] +// CHECK:STDOUT: %custom_witness.c32685.2: = custom_witness (%Int32, %Int32.Op.4dca31.10), @DivWith.1, @DivWith.1(%Int32) [concrete] +// CHECK:STDOUT: %facet_value.8c1: %facet_type.f29 = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.c32685.2) [concrete] +// CHECK:STDOUT: %Int32.Op.type.83af6e.11: type = fn_type @Int32.Op.11 [concrete] +// CHECK:STDOUT: %Int32.Op.4dca31.11: %Int32.Op.type.83af6e.11 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.994c75.2: = custom_witness (%Int32, %Int32.Op.4dca31.11), @ModWith.1, @ModWith.1(%Int32) [concrete] +// CHECK:STDOUT: %facet_value.50c: %facet_type.3d9 = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.994c75.2) [concrete] +// CHECK:STDOUT: %Int64.Op.type.83af6e.1: type = fn_type @Int64.Op.1 [concrete] +// CHECK:STDOUT: %Int64.Op.4dca31.1: %Int64.Op.type.83af6e.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.3: = custom_witness (%Int64.Op.4dca31.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.26c: %SubobjectDestroy.type = facet_value %Int64, (%custom_witness.5760f4.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4b1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.26c) [concrete] +// CHECK:STDOUT: %Destroy.facet.011: %Destroy.type = facet_value %Int64, (%DestroyImpl.impl_witness.4b1, %custom_witness.5760f4.3) [concrete] +// CHECK:STDOUT: %facet_type.1ff: type = facet_type <@AddWith.1, @AddWith.1(%Int64) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.f92: %facet_type.1ff = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.96d: = lookup_impl_witness %.Self.f92, @AddWith.1, @AddWith.1(%Int64) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.516: type = impl_witness_access %AddWith.lookup_impl_witness.96d, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.dab: type = facet_type <@AddWith.1, @AddWith.1(%Int64) & @Destroy where %impl.elem0.516 = %Int64> [concrete] // CHECK:STDOUT: %y.param_patt.a08: %pattern_type.4aa = value_param_pattern [concrete] // CHECK:STDOUT: %y.patt.069: %pattern_type.4aa = wrapper_binding_pattern y, %y.param_patt.a08 [concrete] // CHECK:STDOUT: %AddWith.type.1ff: type = facet_type <@AddWith.1, @AddWith.1(%Int64)> [concrete] @@ -936,23 +927,22 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Op.type.442b68.6: type = fn_type @Op.6 [concrete] // CHECK:STDOUT: %Op.72717c.6: %Op.type.442b68.6 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.f2f: = custom_witness (%Int64, %Op.72717c.6), @AddWith.1, @AddWith.1(%Int64) [concrete] -// CHECK:STDOUT: %facet_value.806: %facet_type.37a = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.f2f) [concrete] -// CHECK:STDOUT: %.Self.frozen.d58: %facet_type.e1d = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.545: = complete_type_witness %facet_type.e1d [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.f6a: type = facet_access_type %.Self.frozen.d58 [symbolic_self] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.bc0: = lookup_impl_witness %.Self.frozen.d58, @AddWith.1, @AddWith.1(%Int64) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.1e6: type = impl_witness_access %AddWith.lookup_impl_witness.bc0, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.ec3: type = pattern_type %facet_type.37a [concrete] -// CHECK:STDOUT: %T.patt.af0: %pattern_type.ec3 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_value.cb5: %facet_type.dab = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.f2f) [concrete] +// CHECK:STDOUT: %.Self.frozen.91a: %facet_type.1ff = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.57be9d.1: = complete_type_witness %facet_type.1ff [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.a1b: type = facet_access_type %.Self.frozen.91a [symbolic_self] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.30a: = lookup_impl_witness %.Self.frozen.91a, @AddWith.1, @AddWith.1(%Int64) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.b7d: type = impl_witness_access %AddWith.lookup_impl_witness.30a, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.652: type = pattern_type %facet_type.dab [concrete] +// CHECK:STDOUT: %T.patt.cb1: %pattern_type.652 = symbolic_binding_pattern T, 2 [symbolic] // CHECK:STDOUT: %result.param_patt.1e1: %pattern_type.4aa = value_param_pattern [concrete] // CHECK:STDOUT: %result.patt.93b: %pattern_type.4aa = wrapper_binding_pattern result, %result.param_patt.1e1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.36f: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.0b4) [concrete] -// CHECK:STDOUT: %.7aa: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.36f, %Destroy.facet.0b4 [concrete] -// CHECK:STDOUT: %facet_type.6db: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%Int64)> [concrete] -// CHECK:STDOUT: %.Self.b71: %facet_type.6db = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.4b8: = lookup_impl_witness %.Self.b71, @SubWith.1, @SubWith.1(%Int64) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.5e4: type = impl_witness_access %SubWith.lookup_impl_witness.4b8, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.cfa: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%Int64) where %impl.elem0.5e4 = %Int64> [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.b5e: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.011) [concrete] +// CHECK:STDOUT: %facet_type.31c: type = facet_type <@SubWith.1, @SubWith.1(%Int64) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.23f: %facet_type.31c = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.445: = lookup_impl_witness %.Self.23f, @SubWith.1, @SubWith.1(%Int64) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.ee1: type = impl_witness_access %SubWith.lookup_impl_witness.445, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.d68: type = facet_type <@SubWith.1, @SubWith.1(%Int64) & @Destroy where %impl.elem0.ee1 = %Int64> [concrete] // CHECK:STDOUT: %SubWith.type.31c: type = facet_type <@SubWith.1, @SubWith.1(%Int64)> [concrete] // CHECK:STDOUT: %SubWith.assoc_type.4f8: type = assoc_entity_type @SubWith.1, @SubWith.1(%Int64) [concrete] // CHECK:STDOUT: %assoc0.13b: %SubWith.assoc_type.4f8 = assoc_entity element0, imports.%Core.import_ref.190 [concrete] @@ -960,19 +950,19 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Op.type.442b68.7: type = fn_type @Op.7 [concrete] // CHECK:STDOUT: %Op.72717c.7: %Op.type.442b68.7 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.276: = custom_witness (%Int64, %Op.72717c.7), @SubWith.1, @SubWith.1(%Int64) [concrete] -// CHECK:STDOUT: %facet_value.442: %facet_type.cfa = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.276) [concrete] -// CHECK:STDOUT: %.Self.frozen.a3d: %facet_type.6db = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.b70: = complete_type_witness %facet_type.6db [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.f8c: type = facet_access_type %.Self.frozen.a3d [symbolic_self] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.117: = lookup_impl_witness %.Self.frozen.a3d, @SubWith.1, @SubWith.1(%Int64) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.79c: type = impl_witness_access %SubWith.lookup_impl_witness.117, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.16a: type = pattern_type %facet_type.cfa [concrete] -// CHECK:STDOUT: %T.patt.18c: %pattern_type.16a = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.dc5: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%Int64)> [concrete] -// CHECK:STDOUT: %.Self.6e4: %facet_type.dc5 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.977: = lookup_impl_witness %.Self.6e4, @MulWith.1, @MulWith.1(%Int64) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a52: type = impl_witness_access %MulWith.lookup_impl_witness.977, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.48ab: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%Int64) where %impl.elem0.a52 = %Int64> [concrete] +// CHECK:STDOUT: %facet_value.9c9: %facet_type.d68 = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.276) [concrete] +// CHECK:STDOUT: %.Self.frozen.c93: %facet_type.31c = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.cb55bb.1: = complete_type_witness %facet_type.31c [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.7cf: type = facet_access_type %.Self.frozen.c93 [symbolic_self] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.52f: = lookup_impl_witness %.Self.frozen.c93, @SubWith.1, @SubWith.1(%Int64) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.5f9: type = impl_witness_access %SubWith.lookup_impl_witness.52f, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.ea4: type = pattern_type %facet_type.d68 [concrete] +// CHECK:STDOUT: %T.patt.25e: %pattern_type.ea4 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.661: type = facet_type <@MulWith.1, @MulWith.1(%Int64) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.6d9: %facet_type.661 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.74c: = lookup_impl_witness %.Self.6d9, @MulWith.1, @MulWith.1(%Int64) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.4c1: type = impl_witness_access %MulWith.lookup_impl_witness.74c, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.a2e: type = facet_type <@MulWith.1, @MulWith.1(%Int64) & @Destroy where %impl.elem0.4c1 = %Int64> [concrete] // CHECK:STDOUT: %MulWith.type.661: type = facet_type <@MulWith.1, @MulWith.1(%Int64)> [concrete] // CHECK:STDOUT: %MulWith.assoc_type.940: type = assoc_entity_type @MulWith.1, @MulWith.1(%Int64) [concrete] // CHECK:STDOUT: %assoc0.9d9: %MulWith.assoc_type.940 = assoc_entity element0, imports.%Core.import_ref.59c [concrete] @@ -980,19 +970,19 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Op.type.442b68.8: type = fn_type @Op.8 [concrete] // CHECK:STDOUT: %Op.72717c.8: %Op.type.442b68.8 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.8e4: = custom_witness (%Int64, %Op.72717c.8), @MulWith.1, @MulWith.1(%Int64) [concrete] -// CHECK:STDOUT: %facet_value.97e: %facet_type.48ab = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.8e4) [concrete] -// CHECK:STDOUT: %.Self.frozen.1e0: %facet_type.dc5 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.757: = complete_type_witness %facet_type.dc5 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.5a6: type = facet_access_type %.Self.frozen.1e0 [symbolic_self] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.741: = lookup_impl_witness %.Self.frozen.1e0, @MulWith.1, @MulWith.1(%Int64) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.dca: type = impl_witness_access %MulWith.lookup_impl_witness.741, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.307: type = pattern_type %facet_type.48ab [concrete] -// CHECK:STDOUT: %T.patt.23a: %pattern_type.307 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.7ad: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%Int64)> [concrete] -// CHECK:STDOUT: %.Self.7b8: %facet_type.7ad = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.055: = lookup_impl_witness %.Self.7b8, @DivWith.1, @DivWith.1(%Int64) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.212: type = impl_witness_access %DivWith.lookup_impl_witness.055, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.011: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%Int64) where %impl.elem0.212 = %Int64> [concrete] +// CHECK:STDOUT: %facet_value.637: %facet_type.a2e = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.8e4) [concrete] +// CHECK:STDOUT: %.Self.frozen.5fe: %facet_type.661 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.0a6803.1: = complete_type_witness %facet_type.661 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.e09: type = facet_access_type %.Self.frozen.5fe [symbolic_self] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.6c6: = lookup_impl_witness %.Self.frozen.5fe, @MulWith.1, @MulWith.1(%Int64) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.731: type = impl_witness_access %MulWith.lookup_impl_witness.6c6, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.216: type = pattern_type %facet_type.a2e [concrete] +// CHECK:STDOUT: %T.patt.ec6: %pattern_type.216 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.dd8: type = facet_type <@DivWith.1, @DivWith.1(%Int64) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.2e9: %facet_type.dd8 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.14c: = lookup_impl_witness %.Self.2e9, @DivWith.1, @DivWith.1(%Int64) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.d16: type = impl_witness_access %DivWith.lookup_impl_witness.14c, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.89f: type = facet_type <@DivWith.1, @DivWith.1(%Int64) & @Destroy where %impl.elem0.d16 = %Int64> [concrete] // CHECK:STDOUT: %DivWith.type.dd8: type = facet_type <@DivWith.1, @DivWith.1(%Int64)> [concrete] // CHECK:STDOUT: %DivWith.assoc_type.2dc: type = assoc_entity_type @DivWith.1, @DivWith.1(%Int64) [concrete] // CHECK:STDOUT: %assoc0.e8b: %DivWith.assoc_type.2dc = assoc_entity element0, imports.%Core.import_ref.dee [concrete] @@ -1000,19 +990,19 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Op.type.442b68.9: type = fn_type @Op.9 [concrete] // CHECK:STDOUT: %Op.72717c.9: %Op.type.442b68.9 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.099: = custom_witness (%Int64, %Op.72717c.9), @DivWith.1, @DivWith.1(%Int64) [concrete] -// CHECK:STDOUT: %facet_value.585: %facet_type.011 = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.099) [concrete] -// CHECK:STDOUT: %.Self.frozen.216: %facet_type.7ad = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.c23: = complete_type_witness %facet_type.7ad [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.c77: type = facet_access_type %.Self.frozen.216 [symbolic_self] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.958: = lookup_impl_witness %.Self.frozen.216, @DivWith.1, @DivWith.1(%Int64) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.a26: type = impl_witness_access %DivWith.lookup_impl_witness.958, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.5eb: type = pattern_type %facet_type.011 [concrete] -// CHECK:STDOUT: %T.patt.518: %pattern_type.5eb = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.830: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%Int64)> [concrete] -// CHECK:STDOUT: %.Self.23a: %facet_type.830 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.4a5: = lookup_impl_witness %.Self.23a, @ModWith.1, @ModWith.1(%Int64) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.007: type = impl_witness_access %ModWith.lookup_impl_witness.4a5, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.2db: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%Int64) where %impl.elem0.007 = %Int64> [concrete] +// CHECK:STDOUT: %facet_value.46b: %facet_type.89f = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.099) [concrete] +// CHECK:STDOUT: %.Self.frozen.d10: %facet_type.dd8 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.4732f8.1: = complete_type_witness %facet_type.dd8 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.483: type = facet_access_type %.Self.frozen.d10 [symbolic_self] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.531: = lookup_impl_witness %.Self.frozen.d10, @DivWith.1, @DivWith.1(%Int64) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.872: type = impl_witness_access %DivWith.lookup_impl_witness.531, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.fcf: type = pattern_type %facet_type.89f [concrete] +// CHECK:STDOUT: %T.patt.5ce: %pattern_type.fcf = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.c72: type = facet_type <@ModWith.1, @ModWith.1(%Int64) & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.dc4: %facet_type.c72 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.305: = lookup_impl_witness %.Self.dc4, @ModWith.1, @ModWith.1(%Int64) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.9c8: type = impl_witness_access %ModWith.lookup_impl_witness.305, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.573: type = facet_type <@ModWith.1, @ModWith.1(%Int64) & @Destroy where %impl.elem0.9c8 = %Int64> [concrete] // CHECK:STDOUT: %ModWith.type.c72: type = facet_type <@ModWith.1, @ModWith.1(%Int64)> [concrete] // CHECK:STDOUT: %ModWith.assoc_type.ad2: type = assoc_entity_type @ModWith.1, @ModWith.1(%Int64) [concrete] // CHECK:STDOUT: %assoc0.c8a: %ModWith.assoc_type.ad2 = assoc_entity element0, imports.%Core.import_ref.61a [concrete] @@ -1020,52 +1010,52 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Op.type.442b68.10: type = fn_type @Op.10 [concrete] // CHECK:STDOUT: %Op.72717c.10: %Op.type.442b68.10 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.129: = custom_witness (%Int64, %Op.72717c.10), @ModWith.1, @ModWith.1(%Int64) [concrete] -// CHECK:STDOUT: %facet_value.b2a: %facet_type.2db = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.129) [concrete] -// CHECK:STDOUT: %.Self.frozen.5a8: %facet_type.830 = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %complete_type.ecd: = complete_type_witness %facet_type.830 [concrete] -// CHECK:STDOUT: %.Self.frozen.as_type.7bd: type = facet_access_type %.Self.frozen.5a8 [symbolic_self] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.601: = lookup_impl_witness %.Self.frozen.5a8, @ModWith.1, @ModWith.1(%Int64) [symbolic_self] -// CHECK:STDOUT: %impl.elem0.001: type = impl_witness_access %ModWith.lookup_impl_witness.601, element0 [symbolic_self] -// CHECK:STDOUT: %pattern_type.3f3: type = pattern_type %facet_type.2db [concrete] -// CHECK:STDOUT: %T.patt.3de: %pattern_type.3f3 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.223: type = facet_type <@Destroy & @AddWith.1, @AddWith.1(%Int32) where %impl.elem0.953 = %Int64> [concrete] +// CHECK:STDOUT: %facet_value.9bd: %facet_type.573 = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.129) [concrete] +// CHECK:STDOUT: %.Self.frozen.c84: %facet_type.c72 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %complete_type.4d1b1b.1: = complete_type_witness %facet_type.c72 [concrete] +// CHECK:STDOUT: %.Self.frozen.as_type.40c: type = facet_access_type %.Self.frozen.c84 [symbolic_self] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.06d: = lookup_impl_witness %.Self.frozen.c84, @ModWith.1, @ModWith.1(%Int64) [symbolic_self] +// CHECK:STDOUT: %impl.elem0.968: type = impl_witness_access %ModWith.lookup_impl_witness.06d, element0 [symbolic_self] +// CHECK:STDOUT: %pattern_type.6af: type = pattern_type %facet_type.573 [concrete] +// CHECK:STDOUT: %T.patt.6c9: %pattern_type.6af = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.279: type = facet_type <@AddWith.1, @AddWith.1(%Int32) & @Destroy where %impl.elem0.a74 = %Int64> [concrete] // CHECK:STDOUT: %Op.type.442b68.11: type = fn_type @Op.11 [concrete] // CHECK:STDOUT: %Op.72717c.11: %Op.type.442b68.11 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.16b: = custom_witness (%Int64, %Op.72717c.11), @AddWith.1, @AddWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.26c: %facet_type.223 = facet_value %Int64, (%custom_witness.1bfa2a.3, %custom_witness.16b) [concrete] -// CHECK:STDOUT: %pattern_type.2c7: type = pattern_type %facet_type.223 [concrete] -// CHECK:STDOUT: %T.patt.e6f: %pattern_type.2c7 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_value.4aa: %facet_type.279 = facet_value %Int64, (%DestroyImpl.impl_witness.4b1, %custom_witness.5760f4.3, %custom_witness.16b) [concrete] +// CHECK:STDOUT: %pattern_type.95b: type = pattern_type %facet_type.279 [concrete] +// CHECK:STDOUT: %T.patt.cc5: %pattern_type.95b = symbolic_binding_pattern T, 2 [symbolic] // CHECK:STDOUT: %x.param_patt.e68: %pattern_type.4aa = value_param_pattern [concrete] // CHECK:STDOUT: %x.patt.7aa: %pattern_type.4aa = wrapper_binding_pattern x, %x.param_patt.e68 [concrete] -// CHECK:STDOUT: %facet_type.ecd: type = facet_type <@Destroy & @SubWith.1, @SubWith.1(%Int32) where %impl.elem0.bb5a = %Int64> [concrete] +// CHECK:STDOUT: %facet_type.1c5: type = facet_type <@SubWith.1, @SubWith.1(%Int32) & @Destroy where %impl.elem0.94c = %Int64> [concrete] // CHECK:STDOUT: %Op.type.442b68.12: type = fn_type @Op.12 [concrete] // CHECK:STDOUT: %Op.72717c.12: %Op.type.442b68.12 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.21a: = custom_witness (%Int64, %Op.72717c.12), @SubWith.1, @SubWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.d8b: %facet_type.ecd = facet_value %Int64, (%custom_witness.1bfa2a.3, %custom_witness.21a) [concrete] -// CHECK:STDOUT: %pattern_type.ab2: type = pattern_type %facet_type.ecd [concrete] -// CHECK:STDOUT: %T.patt.7e5: %pattern_type.ab2 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.486: type = facet_type <@Destroy & @MulWith.1, @MulWith.1(%Int32) where %impl.elem0.054 = %Int64> [concrete] +// CHECK:STDOUT: %facet_value.82c: %facet_type.1c5 = facet_value %Int64, (%DestroyImpl.impl_witness.4b1, %custom_witness.5760f4.3, %custom_witness.21a) [concrete] +// CHECK:STDOUT: %pattern_type.33d: type = pattern_type %facet_type.1c5 [concrete] +// CHECK:STDOUT: %T.patt.203: %pattern_type.33d = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.ec7: type = facet_type <@MulWith.1, @MulWith.1(%Int32) & @Destroy where %impl.elem0.311 = %Int64> [concrete] // CHECK:STDOUT: %Op.type.442b68.13: type = fn_type @Op.13 [concrete] // CHECK:STDOUT: %Op.72717c.13: %Op.type.442b68.13 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.798: = custom_witness (%Int64, %Op.72717c.13), @MulWith.1, @MulWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.72f: %facet_type.486 = facet_value %Int64, (%custom_witness.1bfa2a.3, %custom_witness.798) [concrete] -// CHECK:STDOUT: %pattern_type.92d: type = pattern_type %facet_type.486 [concrete] -// CHECK:STDOUT: %T.patt.2f0: %pattern_type.92d = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.752: type = facet_type <@Destroy & @DivWith.1, @DivWith.1(%Int32) where %impl.elem0.6c4 = %Int64> [concrete] +// CHECK:STDOUT: %facet_value.780: %facet_type.ec7 = facet_value %Int64, (%DestroyImpl.impl_witness.4b1, %custom_witness.5760f4.3, %custom_witness.798) [concrete] +// CHECK:STDOUT: %pattern_type.537: type = pattern_type %facet_type.ec7 [concrete] +// CHECK:STDOUT: %T.patt.f45: %pattern_type.537 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.da8: type = facet_type <@DivWith.1, @DivWith.1(%Int32) & @Destroy where %impl.elem0.437 = %Int64> [concrete] // CHECK:STDOUT: %Op.type.442b68.14: type = fn_type @Op.14 [concrete] // CHECK:STDOUT: %Op.72717c.14: %Op.type.442b68.14 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.37f: = custom_witness (%Int64, %Op.72717c.14), @DivWith.1, @DivWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.c74: %facet_type.752 = facet_value %Int64, (%custom_witness.1bfa2a.3, %custom_witness.37f) [concrete] -// CHECK:STDOUT: %pattern_type.d51: type = pattern_type %facet_type.752 [concrete] -// CHECK:STDOUT: %T.patt.c8a: %pattern_type.d51 = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %facet_type.088: type = facet_type <@Destroy & @ModWith.1, @ModWith.1(%Int32) where %impl.elem0.522 = %Int64> [concrete] +// CHECK:STDOUT: %facet_value.6d0: %facet_type.da8 = facet_value %Int64, (%DestroyImpl.impl_witness.4b1, %custom_witness.5760f4.3, %custom_witness.37f) [concrete] +// CHECK:STDOUT: %pattern_type.612: type = pattern_type %facet_type.da8 [concrete] +// CHECK:STDOUT: %T.patt.bc3: %pattern_type.612 = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %facet_type.005: type = facet_type <@ModWith.1, @ModWith.1(%Int32) & @Destroy where %impl.elem0.3bb = %Int64> [concrete] // CHECK:STDOUT: %Op.type.442b68.15: type = fn_type @Op.15 [concrete] // CHECK:STDOUT: %Op.72717c.15: %Op.type.442b68.15 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.981: = custom_witness (%Int64, %Op.72717c.15), @ModWith.1, @ModWith.1(%Int32) [concrete] -// CHECK:STDOUT: %facet_value.b3f: %facet_type.088 = facet_value %Int64, (%custom_witness.1bfa2a.3, %custom_witness.981) [concrete] -// CHECK:STDOUT: %pattern_type.fff: type = pattern_type %facet_type.088 [concrete] -// CHECK:STDOUT: %T.patt.1fc: %pattern_type.fff = symbolic_binding_pattern T, 2 [symbolic] -// CHECK:STDOUT: %U.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern U, 0 [symbolic] +// CHECK:STDOUT: %facet_value.22f: %facet_type.005 = facet_value %Int64, (%DestroyImpl.impl_witness.4b1, %custom_witness.5760f4.3, %custom_witness.981) [concrete] +// CHECK:STDOUT: %pattern_type.b4f: type = pattern_type %facet_type.005 [concrete] +// CHECK:STDOUT: %T.patt.0b5: %pattern_type.b4f = symbolic_binding_pattern T, 2 [symbolic] +// CHECK:STDOUT: %U.patt.3a0: %pattern_type.9a587c.2 = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %AddAssignWith.type.3a470e.1: type = facet_type <@AddAssignWith.1, @AddAssignWith.1(%Other)> [symbolic] // CHECK:STDOUT: %Self.73bb96.1: %AddAssignWith.type.3a470e.1 = symbolic_binding Self, 1 [symbolic] @@ -1183,9 +1173,9 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %AddAssignWith.type.803: type = facet_type <@AddAssignWith.1, @AddAssignWith.1(%i16)> [concrete] // CHECK:STDOUT: %AddAssignWith.assoc_type.82a: type = assoc_entity_type @AddAssignWith.1, @AddAssignWith.1(%i16) [concrete] // CHECK:STDOUT: %assoc0.7ab: %AddAssignWith.assoc_type.82a = assoc_entity element0, imports.%Core.import_ref.90f [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.12: type = fn_type @Int16.Op.12 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.12: %Int16.Op.type.83af6e.12 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.2fc: = custom_witness (%Int16.Op.4dca31.12), @AddAssignWith.1, @AddAssignWith.1(%i16) [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.13: type = fn_type @Int16.Op.13 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.13: %Int16.Op.type.83af6e.13 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.2fc: = custom_witness (%Int16.Op.4dca31.13), @AddAssignWith.1, @AddAssignWith.1(%i16) [concrete] // CHECK:STDOUT: %AddAssignWith.facet.213: %AddAssignWith.type.803 = facet_value %Int16, (%custom_witness.2fc) [concrete] // CHECK:STDOUT: %pattern_type.7df: type = pattern_type %AddAssignWith.type.803 [concrete] // CHECK:STDOUT: %T.patt.ec8: %pattern_type.7df = symbolic_binding_pattern T, 1 [symbolic] @@ -1194,45 +1184,45 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %SubAssignWith.type.929: type = facet_type <@SubAssignWith.1, @SubAssignWith.1(%i16)> [concrete] // CHECK:STDOUT: %SubAssignWith.assoc_type.ecb: type = assoc_entity_type @SubAssignWith.1, @SubAssignWith.1(%i16) [concrete] // CHECK:STDOUT: %assoc0.ecb: %SubAssignWith.assoc_type.ecb = assoc_entity element0, imports.%Core.import_ref.8e5 [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.13: type = fn_type @Int16.Op.13 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.13: %Int16.Op.type.83af6e.13 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.21df: = custom_witness (%Int16.Op.4dca31.13), @SubAssignWith.1, @SubAssignWith.1(%i16) [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.14: type = fn_type @Int16.Op.14 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.14: %Int16.Op.type.83af6e.14 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.21df: = custom_witness (%Int16.Op.4dca31.14), @SubAssignWith.1, @SubAssignWith.1(%i16) [concrete] // CHECK:STDOUT: %SubAssignWith.facet.474: %SubAssignWith.type.929 = facet_value %Int16, (%custom_witness.21df) [concrete] // CHECK:STDOUT: %pattern_type.23a: type = pattern_type %SubAssignWith.type.929 [concrete] // CHECK:STDOUT: %T.patt.467: %pattern_type.23a = symbolic_binding_pattern T, 1 [symbolic] // CHECK:STDOUT: %MulAssignWith.type.ba0: type = facet_type <@MulAssignWith.1, @MulAssignWith.1(%i16)> [concrete] // CHECK:STDOUT: %MulAssignWith.assoc_type.89a: type = assoc_entity_type @MulAssignWith.1, @MulAssignWith.1(%i16) [concrete] // CHECK:STDOUT: %assoc0.144: %MulAssignWith.assoc_type.89a = assoc_entity element0, imports.%Core.import_ref.c116 [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.14: type = fn_type @Int16.Op.14 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.14: %Int16.Op.type.83af6e.14 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.81e: = custom_witness (%Int16.Op.4dca31.14), @MulAssignWith.1, @MulAssignWith.1(%i16) [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.15: type = fn_type @Int16.Op.15 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.15: %Int16.Op.type.83af6e.15 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.81e: = custom_witness (%Int16.Op.4dca31.15), @MulAssignWith.1, @MulAssignWith.1(%i16) [concrete] // CHECK:STDOUT: %MulAssignWith.facet.9d6: %MulAssignWith.type.ba0 = facet_value %Int16, (%custom_witness.81e) [concrete] // CHECK:STDOUT: %pattern_type.d7c: type = pattern_type %MulAssignWith.type.ba0 [concrete] // CHECK:STDOUT: %T.patt.32f: %pattern_type.d7c = symbolic_binding_pattern T, 1 [symbolic] // CHECK:STDOUT: %DivAssignWith.type.6b5: type = facet_type <@DivAssignWith.1, @DivAssignWith.1(%i16)> [concrete] // CHECK:STDOUT: %DivAssignWith.assoc_type.fae: type = assoc_entity_type @DivAssignWith.1, @DivAssignWith.1(%i16) [concrete] // CHECK:STDOUT: %assoc0.1d8: %DivAssignWith.assoc_type.fae = assoc_entity element0, imports.%Core.import_ref.ee5 [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.15: type = fn_type @Int16.Op.15 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.15: %Int16.Op.type.83af6e.15 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.787: = custom_witness (%Int16.Op.4dca31.15), @DivAssignWith.1, @DivAssignWith.1(%i16) [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.16: type = fn_type @Int16.Op.16 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.16: %Int16.Op.type.83af6e.16 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.787: = custom_witness (%Int16.Op.4dca31.16), @DivAssignWith.1, @DivAssignWith.1(%i16) [concrete] // CHECK:STDOUT: %DivAssignWith.facet.bed: %DivAssignWith.type.6b5 = facet_value %Int16, (%custom_witness.787) [concrete] // CHECK:STDOUT: %pattern_type.7b9: type = pattern_type %DivAssignWith.type.6b5 [concrete] // CHECK:STDOUT: %T.patt.db5: %pattern_type.7b9 = symbolic_binding_pattern T, 1 [symbolic] // CHECK:STDOUT: %ModAssignWith.type.ddb: type = facet_type <@ModAssignWith.1, @ModAssignWith.1(%i16)> [concrete] // CHECK:STDOUT: %ModAssignWith.assoc_type.725: type = assoc_entity_type @ModAssignWith.1, @ModAssignWith.1(%i16) [concrete] // CHECK:STDOUT: %assoc0.701: %ModAssignWith.assoc_type.725 = assoc_entity element0, imports.%Core.import_ref.97f [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.16: type = fn_type @Int16.Op.16 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.16: %Int16.Op.type.83af6e.16 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.c25: = custom_witness (%Int16.Op.4dca31.16), @ModAssignWith.1, @ModAssignWith.1(%i16) [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.17: type = fn_type @Int16.Op.17 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.17: %Int16.Op.type.83af6e.17 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.c25: = custom_witness (%Int16.Op.4dca31.17), @ModAssignWith.1, @ModAssignWith.1(%i16) [concrete] // CHECK:STDOUT: %ModAssignWith.facet.6d2: %ModAssignWith.type.ddb = facet_value %Int16, (%custom_witness.c25) [concrete] // CHECK:STDOUT: %pattern_type.83d: type = pattern_type %ModAssignWith.type.ddb [concrete] // CHECK:STDOUT: %T.patt.0ba: %pattern_type.83d = symbolic_binding_pattern T, 1 [symbolic] // CHECK:STDOUT: %AddAssignWith.type.eef: type = facet_type <@AddAssignWith.1, @AddAssignWith.1(%Int32)> [concrete] // CHECK:STDOUT: %AddAssignWith.assoc_type.c4c: type = assoc_entity_type @AddAssignWith.1, @AddAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %assoc0.ce4: %AddAssignWith.assoc_type.c4c = assoc_entity element0, imports.%Core.import_ref.90f [concrete] -// CHECK:STDOUT: %Int32.Op.type.83af6e.11: type = fn_type @Int32.Op.11 [concrete] -// CHECK:STDOUT: %Int32.Op.4dca31.11: %Int32.Op.type.83af6e.11 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.17487e.1: = custom_witness (%Int32.Op.4dca31.11), @AddAssignWith.1, @AddAssignWith.1(%Int32) [concrete] +// CHECK:STDOUT: %Int32.Op.type.83af6e.12: type = fn_type @Int32.Op.12 [concrete] +// CHECK:STDOUT: %Int32.Op.4dca31.12: %Int32.Op.type.83af6e.12 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.17487e.1: = custom_witness (%Int32.Op.4dca31.12), @AddAssignWith.1, @AddAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %AddAssignWith.facet.e80: %AddAssignWith.type.eef = facet_value %Int32, (%custom_witness.17487e.1) [concrete] // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %AddAssignWith.type.eef [concrete] // CHECK:STDOUT: %T.patt.034: %pattern_type.1ab = symbolic_binding_pattern T, 1 [symbolic] @@ -1241,60 +1231,60 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %SubAssignWith.type.1c4: type = facet_type <@SubAssignWith.1, @SubAssignWith.1(%Int32)> [concrete] // CHECK:STDOUT: %SubAssignWith.assoc_type.2e9: type = assoc_entity_type @SubAssignWith.1, @SubAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %assoc0.b0e: %SubAssignWith.assoc_type.2e9 = assoc_entity element0, imports.%Core.import_ref.8e5 [concrete] -// CHECK:STDOUT: %Int32.Op.type.83af6e.13: type = fn_type @Int32.Op.13 [concrete] -// CHECK:STDOUT: %Int32.Op.4dca31.13: %Int32.Op.type.83af6e.13 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.ebd70f.1: = custom_witness (%Int32.Op.4dca31.13), @SubAssignWith.1, @SubAssignWith.1(%Int32) [concrete] +// CHECK:STDOUT: %Int32.Op.type.83af6e.14: type = fn_type @Int32.Op.14 [concrete] +// CHECK:STDOUT: %Int32.Op.4dca31.14: %Int32.Op.type.83af6e.14 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.ebd70f.1: = custom_witness (%Int32.Op.4dca31.14), @SubAssignWith.1, @SubAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %SubAssignWith.facet.143: %SubAssignWith.type.1c4 = facet_value %Int32, (%custom_witness.ebd70f.1) [concrete] // CHECK:STDOUT: %pattern_type.303: type = pattern_type %SubAssignWith.type.1c4 [concrete] // CHECK:STDOUT: %T.patt.dc8: %pattern_type.303 = symbolic_binding_pattern T, 1 [symbolic] // CHECK:STDOUT: %MulAssignWith.type.ec7: type = facet_type <@MulAssignWith.1, @MulAssignWith.1(%Int32)> [concrete] // CHECK:STDOUT: %MulAssignWith.assoc_type.cbc: type = assoc_entity_type @MulAssignWith.1, @MulAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %assoc0.e00: %MulAssignWith.assoc_type.cbc = assoc_entity element0, imports.%Core.import_ref.c116 [concrete] -// CHECK:STDOUT: %Int32.Op.type.83af6e.14: type = fn_type @Int32.Op.14 [concrete] -// CHECK:STDOUT: %Int32.Op.4dca31.14: %Int32.Op.type.83af6e.14 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.636b34.1: = custom_witness (%Int32.Op.4dca31.14), @MulAssignWith.1, @MulAssignWith.1(%Int32) [concrete] +// CHECK:STDOUT: %Int32.Op.type.83af6e.15: type = fn_type @Int32.Op.15 [concrete] +// CHECK:STDOUT: %Int32.Op.4dca31.15: %Int32.Op.type.83af6e.15 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.636b34.1: = custom_witness (%Int32.Op.4dca31.15), @MulAssignWith.1, @MulAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %MulAssignWith.facet.1e6: %MulAssignWith.type.ec7 = facet_value %Int32, (%custom_witness.636b34.1) [concrete] // CHECK:STDOUT: %pattern_type.b21: type = pattern_type %MulAssignWith.type.ec7 [concrete] // CHECK:STDOUT: %T.patt.59f: %pattern_type.b21 = symbolic_binding_pattern T, 1 [symbolic] // CHECK:STDOUT: %DivAssignWith.type.12e: type = facet_type <@DivAssignWith.1, @DivAssignWith.1(%Int32)> [concrete] // CHECK:STDOUT: %DivAssignWith.assoc_type.776: type = assoc_entity_type @DivAssignWith.1, @DivAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %assoc0.14c: %DivAssignWith.assoc_type.776 = assoc_entity element0, imports.%Core.import_ref.ee5 [concrete] -// CHECK:STDOUT: %Int32.Op.type.83af6e.15: type = fn_type @Int32.Op.15 [concrete] -// CHECK:STDOUT: %Int32.Op.4dca31.15: %Int32.Op.type.83af6e.15 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.45756b.1: = custom_witness (%Int32.Op.4dca31.15), @DivAssignWith.1, @DivAssignWith.1(%Int32) [concrete] +// CHECK:STDOUT: %Int32.Op.type.83af6e.16: type = fn_type @Int32.Op.16 [concrete] +// CHECK:STDOUT: %Int32.Op.4dca31.16: %Int32.Op.type.83af6e.16 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.45756b.1: = custom_witness (%Int32.Op.4dca31.16), @DivAssignWith.1, @DivAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %DivAssignWith.facet.1ca: %DivAssignWith.type.12e = facet_value %Int32, (%custom_witness.45756b.1) [concrete] // CHECK:STDOUT: %pattern_type.9bf: type = pattern_type %DivAssignWith.type.12e [concrete] // CHECK:STDOUT: %T.patt.b33: %pattern_type.9bf = symbolic_binding_pattern T, 1 [symbolic] // CHECK:STDOUT: %ModAssignWith.type.c90: type = facet_type <@ModAssignWith.1, @ModAssignWith.1(%Int32)> [concrete] // CHECK:STDOUT: %ModAssignWith.assoc_type.7d0: type = assoc_entity_type @ModAssignWith.1, @ModAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %assoc0.f20: %ModAssignWith.assoc_type.7d0 = assoc_entity element0, imports.%Core.import_ref.97f [concrete] -// CHECK:STDOUT: %Int32.Op.type.83af6e.16: type = fn_type @Int32.Op.16 [concrete] -// CHECK:STDOUT: %Int32.Op.4dca31.16: %Int32.Op.type.83af6e.16 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.773f24.1: = custom_witness (%Int32.Op.4dca31.16), @ModAssignWith.1, @ModAssignWith.1(%Int32) [concrete] +// CHECK:STDOUT: %Int32.Op.type.83af6e.17: type = fn_type @Int32.Op.17 [concrete] +// CHECK:STDOUT: %Int32.Op.4dca31.17: %Int32.Op.type.83af6e.17 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.773f24.1: = custom_witness (%Int32.Op.4dca31.17), @ModAssignWith.1, @ModAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %ModAssignWith.facet.715: %ModAssignWith.type.c90 = facet_value %Int32, (%custom_witness.773f24.1) [concrete] // CHECK:STDOUT: %pattern_type.065: type = pattern_type %ModAssignWith.type.c90 [concrete] // CHECK:STDOUT: %T.patt.707: %pattern_type.065 = symbolic_binding_pattern T, 1 [symbolic] -// CHECK:STDOUT: %Int64.Op.type.83af6e.1: type = fn_type @Int64.Op.1 [concrete] -// CHECK:STDOUT: %Int64.Op.4dca31.1: %Int64.Op.type.83af6e.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.17487e.2: = custom_witness (%Int64.Op.4dca31.1), @AddAssignWith.1, @AddAssignWith.1(%Int32) [concrete] +// CHECK:STDOUT: %Int64.Op.type.83af6e.2: type = fn_type @Int64.Op.2 [concrete] +// CHECK:STDOUT: %Int64.Op.4dca31.2: %Int64.Op.type.83af6e.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.17487e.2: = custom_witness (%Int64.Op.4dca31.2), @AddAssignWith.1, @AddAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %AddAssignWith.facet.c6d: %AddAssignWith.type.eef = facet_value %Int64, (%custom_witness.17487e.2) [concrete] // CHECK:STDOUT: %x.patt.ace: %pattern_type.4aa = ref_binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt.b33: %pattern_type.4aa = var_param_pattern %x.patt.ace [concrete] -// CHECK:STDOUT: %Int64.Op.type.83af6e.3: type = fn_type @Int64.Op.3 [concrete] -// CHECK:STDOUT: %Int64.Op.4dca31.3: %Int64.Op.type.83af6e.3 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.ebd70f.2: = custom_witness (%Int64.Op.4dca31.3), @SubAssignWith.1, @SubAssignWith.1(%Int32) [concrete] -// CHECK:STDOUT: %SubAssignWith.facet.74a: %SubAssignWith.type.1c4 = facet_value %Int64, (%custom_witness.ebd70f.2) [concrete] // CHECK:STDOUT: %Int64.Op.type.83af6e.4: type = fn_type @Int64.Op.4 [concrete] // CHECK:STDOUT: %Int64.Op.4dca31.4: %Int64.Op.type.83af6e.4 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.636b34.2: = custom_witness (%Int64.Op.4dca31.4), @MulAssignWith.1, @MulAssignWith.1(%Int32) [concrete] -// CHECK:STDOUT: %MulAssignWith.facet.d5c: %MulAssignWith.type.ec7 = facet_value %Int64, (%custom_witness.636b34.2) [concrete] +// CHECK:STDOUT: %custom_witness.ebd70f.2: = custom_witness (%Int64.Op.4dca31.4), @SubAssignWith.1, @SubAssignWith.1(%Int32) [concrete] +// CHECK:STDOUT: %SubAssignWith.facet.74a: %SubAssignWith.type.1c4 = facet_value %Int64, (%custom_witness.ebd70f.2) [concrete] // CHECK:STDOUT: %Int64.Op.type.83af6e.5: type = fn_type @Int64.Op.5 [concrete] // CHECK:STDOUT: %Int64.Op.4dca31.5: %Int64.Op.type.83af6e.5 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.45756b.2: = custom_witness (%Int64.Op.4dca31.5), @DivAssignWith.1, @DivAssignWith.1(%Int32) [concrete] -// CHECK:STDOUT: %DivAssignWith.facet.c0b: %DivAssignWith.type.12e = facet_value %Int64, (%custom_witness.45756b.2) [concrete] +// CHECK:STDOUT: %custom_witness.636b34.2: = custom_witness (%Int64.Op.4dca31.5), @MulAssignWith.1, @MulAssignWith.1(%Int32) [concrete] +// CHECK:STDOUT: %MulAssignWith.facet.d5c: %MulAssignWith.type.ec7 = facet_value %Int64, (%custom_witness.636b34.2) [concrete] // CHECK:STDOUT: %Int64.Op.type.83af6e.6: type = fn_type @Int64.Op.6 [concrete] // CHECK:STDOUT: %Int64.Op.4dca31.6: %Int64.Op.type.83af6e.6 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.773f24.2: = custom_witness (%Int64.Op.4dca31.6), @ModAssignWith.1, @ModAssignWith.1(%Int32) [concrete] +// CHECK:STDOUT: %custom_witness.45756b.2: = custom_witness (%Int64.Op.4dca31.6), @DivAssignWith.1, @DivAssignWith.1(%Int32) [concrete] +// CHECK:STDOUT: %DivAssignWith.facet.c0b: %DivAssignWith.type.12e = facet_value %Int64, (%custom_witness.45756b.2) [concrete] +// CHECK:STDOUT: %Int64.Op.type.83af6e.7: type = fn_type @Int64.Op.7 [concrete] +// CHECK:STDOUT: %Int64.Op.4dca31.7: %Int64.Op.type.83af6e.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.773f24.2: = custom_witness (%Int64.Op.4dca31.7), @ModAssignWith.1, @ModAssignWith.1(%Int32) [concrete] // CHECK:STDOUT: %ModAssignWith.facet.cf2: %ModAssignWith.type.c90 = facet_value %Int64, (%custom_witness.773f24.2) [concrete] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] // CHECK:STDOUT: %pattern_type.8c1: type = pattern_type %Inc.type [concrete] @@ -1323,112 +1313,112 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %impl.elem0.0b1: %.528 = impl_witness_access %Dec.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %specific_impl_fn.e97: = specific_impl_function %impl.elem0.0b1, @Dec.WithSelf.Op(%T.e8e) [symbolic] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %facet_type.68f: type = facet_type <@Destroy & @Negate> [concrete] -// CHECK:STDOUT: %.Self.718: %facet_type.68f = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %Negate.lookup_impl_witness.cdc: = lookup_impl_witness %.Self.718, @Negate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.e29: type = impl_witness_access %Negate.lookup_impl_witness.cdc, element0 [symbolic_self] -// CHECK:STDOUT: %facet_type.352: type = facet_type <@Destroy & @Negate where %impl.elem0.e29 = %Result.as_type> [symbolic] -// CHECK:STDOUT: %pattern_type.4c2: type = pattern_type %facet_type.352 [symbolic] -// CHECK:STDOUT: %T.patt.c5b: %pattern_type.4c2 = symbolic_binding_pattern T, 1 [symbolic] -// CHECK:STDOUT: %T.e01: %facet_type.352 = symbolic_binding T, 1 [symbolic] -// CHECK:STDOUT: %y.param_patt.023: %pattern_type.f4e485.2 = value_param_pattern [symbolic] -// CHECK:STDOUT: %y.patt.33f: %pattern_type.f4e485.2 = wrapper_binding_pattern y, %y.param_patt.023 [symbolic] -// CHECK:STDOUT: %T.as_type.684: type = facet_access_type %T.e01 [symbolic] -// CHECK:STDOUT: %pattern_type.2dd: type = pattern_type %T.as_type.684 [symbolic] -// CHECK:STDOUT: %x.param_patt.cbc: %pattern_type.2dd = value_param_pattern [symbolic] -// CHECK:STDOUT: %x.patt.ef5: %pattern_type.2dd = wrapper_binding_pattern x, %x.param_patt.cbc [symbolic] -// CHECK:STDOUT: %Negate.lookup_impl_witness.218: = lookup_impl_witness %T.e01, @Negate [symbolic] -// CHECK:STDOUT: %Negate.facet.5e5: %Negate.type = facet_value %T.as_type.684, (%Negate.lookup_impl_witness.218) [symbolic] -// CHECK:STDOUT: %Negate.WithSelf.Op.type.d06: type = fn_type @Negate.WithSelf.Op, @Negate.WithSelf(%Negate.facet.5e5) [symbolic] -// CHECK:STDOUT: %.5a7: type = fn_type_with_self_type %Negate.WithSelf.Op.type.d06, %Negate.facet.5e5 [symbolic] -// CHECK:STDOUT: %impl.elem1.e2e: %.5a7 = impl_witness_access %Negate.lookup_impl_witness.218, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.0c8: = specific_impl_function %impl.elem1.e2e, @Negate.WithSelf.Op(%Negate.facet.5e5) [symbolic] -// CHECK:STDOUT: %Int32.Op.type.83af6e.17: type = fn_type @Int32.Op.17 [concrete] -// CHECK:STDOUT: %Int32.Op.4dca31.17: %Int32.Op.type.83af6e.17 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f3f8: = custom_witness (%Int32.Op.4dca31.17), @Inc [concrete] -// CHECK:STDOUT: %Inc.facet.dd2: %Inc.type = facet_value %Int32, (%custom_witness.f3f8) [concrete] +// CHECK:STDOUT: %facet_type.871: type = facet_type <@Negate & @Destroy> [concrete] +// CHECK:STDOUT: %.Self.c98: %facet_type.871 = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %Negate.lookup_impl_witness.659: = lookup_impl_witness %.Self.c98, @Negate [symbolic_self] +// CHECK:STDOUT: %impl.elem0.2e4: type = impl_witness_access %Negate.lookup_impl_witness.659, element0 [symbolic_self] +// CHECK:STDOUT: %facet_type.86f: type = facet_type <@Negate & @Destroy where %impl.elem0.2e4 = %Result.as_type> [symbolic] +// CHECK:STDOUT: %pattern_type.114: type = pattern_type %facet_type.86f [symbolic] +// CHECK:STDOUT: %T.patt.986: %pattern_type.114 = symbolic_binding_pattern T, 1 [symbolic] +// CHECK:STDOUT: %T.d5e: %facet_type.86f = symbolic_binding T, 1 [symbolic] +// CHECK:STDOUT: %y.param_patt.5b5: %pattern_type.86a9db.1 = value_param_pattern [symbolic] +// CHECK:STDOUT: %y.patt.1d3: %pattern_type.86a9db.1 = wrapper_binding_pattern y, %y.param_patt.5b5 [symbolic] +// CHECK:STDOUT: %T.as_type.735: type = facet_access_type %T.d5e [symbolic] +// CHECK:STDOUT: %pattern_type.66b2: type = pattern_type %T.as_type.735 [symbolic] +// CHECK:STDOUT: %x.param_patt.0a8: %pattern_type.66b2 = value_param_pattern [symbolic] +// CHECK:STDOUT: %x.patt.424: %pattern_type.66b2 = wrapper_binding_pattern x, %x.param_patt.0a8 [symbolic] +// CHECK:STDOUT: %Negate.lookup_impl_witness.75a: = lookup_impl_witness %T.d5e, @Negate [symbolic] +// CHECK:STDOUT: %Negate.facet.b7e: %Negate.type = facet_value %T.as_type.735, (%Negate.lookup_impl_witness.75a) [symbolic] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.4d1: type = fn_type @Negate.WithSelf.Op, @Negate.WithSelf(%Negate.facet.b7e) [symbolic] +// CHECK:STDOUT: %.70d: type = fn_type_with_self_type %Negate.WithSelf.Op.type.4d1, %Negate.facet.b7e [symbolic] +// CHECK:STDOUT: %impl.elem1.466: %.70d = impl_witness_access %Negate.lookup_impl_witness.75a, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.9ba: = specific_impl_function %impl.elem1.466, @Negate.WithSelf.Op(%Negate.facet.b7e) [symbolic] // CHECK:STDOUT: %Int32.Op.type.83af6e.18: type = fn_type @Int32.Op.18 [concrete] // CHECK:STDOUT: %Int32.Op.4dca31.18: %Int32.Op.type.83af6e.18 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.b24: = custom_witness (%Int32.Op.4dca31.18), @Dec [concrete] -// CHECK:STDOUT: %Dec.facet.e1b: %Dec.type = facet_value %Int32, (%custom_witness.b24) [concrete] -// CHECK:STDOUT: %facet_type.d8c: type = facet_type <@Destroy & @Negate where %impl.elem0.e29 = %Int64> [concrete] -// CHECK:STDOUT: %Int16.Op.type.83af6e.17: type = fn_type @Int16.Op.17 [concrete] -// CHECK:STDOUT: %Int16.Op.4dca31.17: %Int16.Op.type.83af6e.17 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.100: = custom_witness (%Int64, %Int16.Op.4dca31.17), @Negate [concrete] -// CHECK:STDOUT: %facet_value.a67: %facet_type.d8c = facet_value %Int16, (%custom_witness.1bfa2a.1, %custom_witness.100) [concrete] -// CHECK:STDOUT: %pattern_type.54c: type = pattern_type %facet_type.d8c [concrete] -// CHECK:STDOUT: %T.patt.16f3: %pattern_type.54c = symbolic_binding_pattern T, 1 [symbolic] -// CHECK:STDOUT: %facet_type.021: type = facet_type <@Destroy & @Negate where %impl.elem0.e29 = %Int32> [concrete] +// CHECK:STDOUT: %custom_witness.f3f8: = custom_witness (%Int32.Op.4dca31.18), @Inc [concrete] +// CHECK:STDOUT: %Inc.facet.dd2: %Inc.type = facet_value %Int32, (%custom_witness.f3f8) [concrete] // CHECK:STDOUT: %Int32.Op.type.83af6e.19: type = fn_type @Int32.Op.19 [concrete] // CHECK:STDOUT: %Int32.Op.4dca31.19: %Int32.Op.type.83af6e.19 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.a85: = custom_witness (%Int32, %Int32.Op.4dca31.19), @Negate [concrete] -// CHECK:STDOUT: %facet_value.73e: %facet_type.021 = facet_value %Int32, (%custom_witness.1bfa2a.2, %custom_witness.a85) [concrete] -// CHECK:STDOUT: %pattern_type.4cd: type = pattern_type %facet_type.021 [concrete] -// CHECK:STDOUT: %T.patt.d74: %pattern_type.4cd = symbolic_binding_pattern T, 1 [symbolic] -// CHECK:STDOUT: %complete_type.f37: = complete_type_witness %AddWith.type.e4b [concrete] +// CHECK:STDOUT: %custom_witness.b24: = custom_witness (%Int32.Op.4dca31.19), @Dec [concrete] +// CHECK:STDOUT: %Dec.facet.e1b: %Dec.type = facet_value %Int32, (%custom_witness.b24) [concrete] +// CHECK:STDOUT: %facet_type.8cf: type = facet_type <@Negate & @Destroy where %impl.elem0.2e4 = %Int64> [concrete] +// CHECK:STDOUT: %Int16.Op.type.83af6e.18: type = fn_type @Int16.Op.18 [concrete] +// CHECK:STDOUT: %Int16.Op.4dca31.18: %Int16.Op.type.83af6e.18 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.100: = custom_witness (%Int64, %Int16.Op.4dca31.18), @Negate [concrete] +// CHECK:STDOUT: %facet_value.4c2: %facet_type.8cf = facet_value %Int16, (%DestroyImpl.impl_witness.6b1, %custom_witness.5760f4.1, %custom_witness.100) [concrete] +// CHECK:STDOUT: %pattern_type.4c7: type = pattern_type %facet_type.8cf [concrete] +// CHECK:STDOUT: %T.patt.0b0: %pattern_type.4c7 = symbolic_binding_pattern T, 1 [symbolic] +// CHECK:STDOUT: %facet_type.517: type = facet_type <@Negate & @Destroy where %impl.elem0.2e4 = %Int32> [concrete] +// CHECK:STDOUT: %Int32.Op.type.83af6e.20: type = fn_type @Int32.Op.20 [concrete] +// CHECK:STDOUT: %Int32.Op.4dca31.20: %Int32.Op.type.83af6e.20 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.a85: = custom_witness (%Int32, %Int32.Op.4dca31.20), @Negate [concrete] +// CHECK:STDOUT: %facet_value.9b8: %facet_type.517 = facet_value %Int32, (%DestroyImpl.impl_witness.40d, %custom_witness.5760f4.2, %custom_witness.a85) [concrete] +// CHECK:STDOUT: %pattern_type.eaa: type = pattern_type %facet_type.517 [concrete] +// CHECK:STDOUT: %T.patt.532: %pattern_type.eaa = symbolic_binding_pattern T, 1 [symbolic] +// CHECK:STDOUT: %complete_type.f37bc8.2: = complete_type_witness %AddWith.type.e4b [concrete] // CHECK:STDOUT: %AddWith.facet.2ce: %AddWith.type.e4b = facet_value %i16, (%custom_witness.cba) [concrete] // CHECK:STDOUT: %AddWith.WithSelf.Op.type.4a0: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%Int16, %AddWith.facet.2ce) [concrete] // CHECK:STDOUT: %.7bc: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.4a0, %AddWith.facet.2ce [concrete] -// CHECK:STDOUT: %complete_type.8a2: = complete_type_witness %SubWith.type.68d [concrete] +// CHECK:STDOUT: %complete_type.8a2f63.2: = complete_type_witness %SubWith.type.68d [concrete] // CHECK:STDOUT: %SubWith.facet.1ef: %SubWith.type.68d = facet_value %i16, (%custom_witness.354) [concrete] // CHECK:STDOUT: %SubWith.WithSelf.Op.type.23f: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%Int16, %SubWith.facet.1ef) [concrete] // CHECK:STDOUT: %.eed: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.23f, %SubWith.facet.1ef [concrete] -// CHECK:STDOUT: %complete_type.8c6: = complete_type_witness %MulWith.type.f65 [concrete] +// CHECK:STDOUT: %complete_type.8c670c.2: = complete_type_witness %MulWith.type.f65 [concrete] // CHECK:STDOUT: %MulWith.facet.d84: %MulWith.type.f65 = facet_value %i16, (%custom_witness.3c3) [concrete] // CHECK:STDOUT: %MulWith.WithSelf.Op.type.131: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%Int16, %MulWith.facet.d84) [concrete] // CHECK:STDOUT: %.010: type = fn_type_with_self_type %MulWith.WithSelf.Op.type.131, %MulWith.facet.d84 [concrete] -// CHECK:STDOUT: %complete_type.d99: = complete_type_witness %DivWith.type.b8a [concrete] +// CHECK:STDOUT: %complete_type.d99d66.2: = complete_type_witness %DivWith.type.b8a [concrete] // CHECK:STDOUT: %DivWith.facet.4ad: %DivWith.type.b8a = facet_value %i16, (%custom_witness.8d0) [concrete] // CHECK:STDOUT: %DivWith.WithSelf.Op.type.edb: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%Int16, %DivWith.facet.4ad) [concrete] // CHECK:STDOUT: %.b5e: type = fn_type_with_self_type %DivWith.WithSelf.Op.type.edb, %DivWith.facet.4ad [concrete] -// CHECK:STDOUT: %complete_type.7d8: = complete_type_witness %ModWith.type.c67 [concrete] +// CHECK:STDOUT: %complete_type.7d80e1.2: = complete_type_witness %ModWith.type.c67 [concrete] // CHECK:STDOUT: %ModWith.facet.ab1: %ModWith.type.c67 = facet_value %i16, (%custom_witness.169) [concrete] // CHECK:STDOUT: %ModWith.WithSelf.Op.type.e29: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%Int16, %ModWith.facet.ab1) [concrete] // CHECK:STDOUT: %.d62: type = fn_type_with_self_type %ModWith.WithSelf.Op.type.e29, %ModWith.facet.ab1 [concrete] -// CHECK:STDOUT: %complete_type.32d: = complete_type_witness %AddWith.type.2ed [concrete] +// CHECK:STDOUT: %complete_type.32de8b.2: = complete_type_witness %AddWith.type.2ed [concrete] // CHECK:STDOUT: %AddWith.facet.11e: %AddWith.type.2ed = facet_value %Int16, (%custom_witness.b79) [concrete] // CHECK:STDOUT: %AddWith.WithSelf.Op.type.eb3: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%i16, %AddWith.facet.11e) [concrete] // CHECK:STDOUT: %.da8: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.eb3, %AddWith.facet.11e [concrete] -// CHECK:STDOUT: %complete_type.75c: = complete_type_witness %SubWith.type.606 [concrete] +// CHECK:STDOUT: %complete_type.75c188.2: = complete_type_witness %SubWith.type.606 [concrete] // CHECK:STDOUT: %SubWith.facet.6fa: %SubWith.type.606 = facet_value %Int16, (%custom_witness.1e8) [concrete] // CHECK:STDOUT: %SubWith.WithSelf.Op.type.bb5: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%i16, %SubWith.facet.6fa) [concrete] // CHECK:STDOUT: %.42a: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.bb5, %SubWith.facet.6fa [concrete] -// CHECK:STDOUT: %complete_type.a7a: = complete_type_witness %MulWith.type.1e2 [concrete] +// CHECK:STDOUT: %complete_type.a7adcd.2: = complete_type_witness %MulWith.type.1e2 [concrete] // CHECK:STDOUT: %MulWith.facet.8b1: %MulWith.type.1e2 = facet_value %Int16, (%custom_witness.e2b) [concrete] // CHECK:STDOUT: %MulWith.WithSelf.Op.type.8f5: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%i16, %MulWith.facet.8b1) [concrete] // CHECK:STDOUT: %.ecc: type = fn_type_with_self_type %MulWith.WithSelf.Op.type.8f5, %MulWith.facet.8b1 [concrete] -// CHECK:STDOUT: %complete_type.d57: = complete_type_witness %DivWith.type.45d [concrete] +// CHECK:STDOUT: %complete_type.d57eaf.2: = complete_type_witness %DivWith.type.45d [concrete] // CHECK:STDOUT: %DivWith.facet.57c: %DivWith.type.45d = facet_value %Int16, (%custom_witness.21db) [concrete] // CHECK:STDOUT: %DivWith.WithSelf.Op.type.37a: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%i16, %DivWith.facet.57c) [concrete] // CHECK:STDOUT: %.5a3: type = fn_type_with_self_type %DivWith.WithSelf.Op.type.37a, %DivWith.facet.57c [concrete] -// CHECK:STDOUT: %complete_type.4d7: = complete_type_witness %ModWith.type.104 [concrete] +// CHECK:STDOUT: %complete_type.4d792a.2: = complete_type_witness %ModWith.type.104 [concrete] // CHECK:STDOUT: %ModWith.facet.f5a5: %ModWith.type.104 = facet_value %Int16, (%custom_witness.6dd) [concrete] // CHECK:STDOUT: %ModWith.WithSelf.Op.type.374: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%i16, %ModWith.facet.f5a5) [concrete] // CHECK:STDOUT: %.52c1: type = fn_type_with_self_type %ModWith.WithSelf.Op.type.374, %ModWith.facet.f5a5 [concrete] -// CHECK:STDOUT: %complete_type.758: = complete_type_witness %AddWith.type.db7 [concrete] +// CHECK:STDOUT: %complete_type.758ea8.2: = complete_type_witness %AddWith.type.db7 [concrete] // CHECK:STDOUT: %AddWith.facet.8f8: %AddWith.type.db7 = facet_value %Int16, (%custom_witness.513476.1) [concrete] // CHECK:STDOUT: %AddWith.WithSelf.Op.type.4cf: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%Int32, %AddWith.facet.8f8) [concrete] // CHECK:STDOUT: %.feb: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.4cf, %AddWith.facet.8f8 [concrete] -// CHECK:STDOUT: %complete_type.46e: = complete_type_witness %SubWith.type.120 [concrete] +// CHECK:STDOUT: %complete_type.46ea3c.2: = complete_type_witness %SubWith.type.120 [concrete] // CHECK:STDOUT: %SubWith.facet.0b0: %SubWith.type.120 = facet_value %Int16, (%custom_witness.32cef1.1) [concrete] // CHECK:STDOUT: %SubWith.WithSelf.Op.type.e1e: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%Int32, %SubWith.facet.0b0) [concrete] // CHECK:STDOUT: %.988: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.e1e, %SubWith.facet.0b0 [concrete] -// CHECK:STDOUT: %complete_type.920: = complete_type_witness %MulWith.type.d67 [concrete] +// CHECK:STDOUT: %complete_type.920626.2: = complete_type_witness %MulWith.type.d67 [concrete] // CHECK:STDOUT: %MulWith.facet.4b9: %MulWith.type.d67 = facet_value %Int16, (%custom_witness.3a0675.1) [concrete] // CHECK:STDOUT: %MulWith.WithSelf.Op.type.8f2: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%Int32, %MulWith.facet.4b9) [concrete] -// CHECK:STDOUT: %.47a: type = fn_type_with_self_type %MulWith.WithSelf.Op.type.8f2, %MulWith.facet.4b9 [concrete] -// CHECK:STDOUT: %complete_type.348: = complete_type_witness %DivWith.type.5a1 [concrete] +// CHECK:STDOUT: %.47a1: type = fn_type_with_self_type %MulWith.WithSelf.Op.type.8f2, %MulWith.facet.4b9 [concrete] +// CHECK:STDOUT: %complete_type.348fba.2: = complete_type_witness %DivWith.type.5a1 [concrete] // CHECK:STDOUT: %DivWith.facet.5c5: %DivWith.type.5a1 = facet_value %Int16, (%custom_witness.c32685.1) [concrete] // CHECK:STDOUT: %DivWith.WithSelf.Op.type.af3: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%Int32, %DivWith.facet.5c5) [concrete] // CHECK:STDOUT: %.836: type = fn_type_with_self_type %DivWith.WithSelf.Op.type.af3, %DivWith.facet.5c5 [concrete] -// CHECK:STDOUT: %complete_type.cc9: = complete_type_witness %ModWith.type.794 [concrete] +// CHECK:STDOUT: %complete_type.cc95ce.2: = complete_type_witness %ModWith.type.794 [concrete] // CHECK:STDOUT: %ModWith.facet.cc5: %ModWith.type.794 = facet_value %Int16, (%custom_witness.994c75.1) [concrete] // CHECK:STDOUT: %ModWith.WithSelf.Op.type.ab7: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%Int32, %ModWith.facet.cc5) [concrete] // CHECK:STDOUT: %.2a3: type = fn_type_with_self_type %ModWith.WithSelf.Op.type.ab7, %ModWith.facet.cc5 [concrete] // CHECK:STDOUT: %AddWith.facet.b31: %AddWith.type.e4b = facet_value %Int32, (%custom_witness.ea1) [concrete] // CHECK:STDOUT: %AddWith.WithSelf.Op.type.faf: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%Int16, %AddWith.facet.b31) [concrete] // CHECK:STDOUT: %.fd6: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.faf, %AddWith.facet.b31 [concrete] -// CHECK:STDOUT: %SubWith.facet.d30: %SubWith.type.68d = facet_value %Int32, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %SubWith.facet.d30: %SubWith.type.68d = facet_value %Int32, (%custom_witness.576f) [concrete] // CHECK:STDOUT: %SubWith.WithSelf.Op.type.6e5: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%Int16, %SubWith.facet.d30) [concrete] // CHECK:STDOUT: %.d1a: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.6e5, %SubWith.facet.d30 [concrete] // CHECK:STDOUT: %MulWith.facet.cd8: %MulWith.type.f65 = facet_value %Int32, (%custom_witness.751) [concrete] @@ -1455,23 +1445,23 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %ModWith.facet.3dc: %ModWith.type.794 = facet_value %Int32, (%custom_witness.994c75.2) [concrete] // CHECK:STDOUT: %ModWith.WithSelf.Op.type.a2a: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%Int32, %ModWith.facet.3dc) [concrete] // CHECK:STDOUT: %.b6d: type = fn_type_with_self_type %ModWith.WithSelf.Op.type.a2a, %ModWith.facet.3dc [concrete] -// CHECK:STDOUT: %complete_type.57b: = complete_type_witness %AddWith.type.1ff [concrete] +// CHECK:STDOUT: %complete_type.57be9d.2: = complete_type_witness %AddWith.type.1ff [concrete] // CHECK:STDOUT: %AddWith.facet.0d8: %AddWith.type.1ff = facet_value %Int32, (%custom_witness.f2f) [concrete] // CHECK:STDOUT: %AddWith.WithSelf.Op.type.a40: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%Int64, %AddWith.facet.0d8) [concrete] // CHECK:STDOUT: %.51d: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.a40, %AddWith.facet.0d8 [concrete] -// CHECK:STDOUT: %complete_type.cb5: = complete_type_witness %SubWith.type.31c [concrete] +// CHECK:STDOUT: %complete_type.cb55bb.2: = complete_type_witness %SubWith.type.31c [concrete] // CHECK:STDOUT: %SubWith.facet.d62: %SubWith.type.31c = facet_value %Int32, (%custom_witness.276) [concrete] // CHECK:STDOUT: %SubWith.WithSelf.Op.type.d39: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%Int64, %SubWith.facet.d62) [concrete] // CHECK:STDOUT: %.e39: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.d39, %SubWith.facet.d62 [concrete] -// CHECK:STDOUT: %complete_type.0a6: = complete_type_witness %MulWith.type.661 [concrete] +// CHECK:STDOUT: %complete_type.0a6803.2: = complete_type_witness %MulWith.type.661 [concrete] // CHECK:STDOUT: %MulWith.facet.4a0: %MulWith.type.661 = facet_value %Int32, (%custom_witness.8e4) [concrete] // CHECK:STDOUT: %MulWith.WithSelf.Op.type.489: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%Int64, %MulWith.facet.4a0) [concrete] // CHECK:STDOUT: %.2e6: type = fn_type_with_self_type %MulWith.WithSelf.Op.type.489, %MulWith.facet.4a0 [concrete] -// CHECK:STDOUT: %complete_type.473: = complete_type_witness %DivWith.type.dd8 [concrete] +// CHECK:STDOUT: %complete_type.4732f8.2: = complete_type_witness %DivWith.type.dd8 [concrete] // CHECK:STDOUT: %DivWith.facet.b29: %DivWith.type.dd8 = facet_value %Int32, (%custom_witness.099) [concrete] // CHECK:STDOUT: %DivWith.WithSelf.Op.type.9fa: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%Int64, %DivWith.facet.b29) [concrete] // CHECK:STDOUT: %.bc2: type = fn_type_with_self_type %DivWith.WithSelf.Op.type.9fa, %DivWith.facet.b29 [concrete] -// CHECK:STDOUT: %complete_type.4d1: = complete_type_witness %ModWith.type.c72 [concrete] +// CHECK:STDOUT: %complete_type.4d1b1b.2: = complete_type_witness %ModWith.type.c72 [concrete] // CHECK:STDOUT: %ModWith.facet.b10: %ModWith.type.c72 = facet_value %Int32, (%custom_witness.129) [concrete] // CHECK:STDOUT: %ModWith.WithSelf.Op.type.1ecc: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%Int64, %ModWith.facet.b10) [concrete] // CHECK:STDOUT: %.bf4: type = fn_type_with_self_type %ModWith.WithSelf.Op.type.1ecc, %ModWith.facet.b10 [concrete] @@ -1563,11 +1553,13 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Core.import_ref.dee: type = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, loaded [concrete = %Result.cb0] // CHECK:STDOUT: %Result.cb0: type = assoc_const_decl @Result.4 [concrete] {} // CHECK:STDOUT: %Core.import_ref.94d = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.ea5: @ModWith.WithSelf.%ModWith.assoc_type (%ModWith.assoc_type.1f1) = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, loaded [symbolic = @ModWith.WithSelf.%assoc1 (constants.%assoc1.f4b)] +// CHECK:STDOUT: %Core.import_ref.ea5e3: @ModWith.WithSelf.%ModWith.assoc_type (%ModWith.assoc_type.1f1) = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, loaded [symbolic = @ModWith.WithSelf.%assoc1 (constants.%assoc1.f4b)] // CHECK:STDOUT: %Core.import_ref.9f8f: @ModWith.WithSelf.%ModWith.WithSelf.Op.type (%ModWith.WithSelf.Op.type.04e) = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, loaded [symbolic = @ModWith.WithSelf.%ModWith.WithSelf.Op (constants.%ModWith.WithSelf.Op.6fb)] // CHECK:STDOUT: %Core.import_ref.61a: type = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, loaded [concrete = %Result.803] // CHECK:STDOUT: %Result.803: type = assoc_const_decl @Result.5 [concrete] {} // CHECK:STDOUT: %Core.import_ref.be00 = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.36d: @AddAssignWith.WithSelf.%AddAssignWith.assoc_type (%AddAssignWith.assoc_type.08473b.1) = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, loaded [symbolic = @AddAssignWith.WithSelf.%assoc0 (constants.%assoc0.3b5)] // CHECK:STDOUT: %Core.import_ref.90f: @AddAssignWith.WithSelf.%AddAssignWith.WithSelf.Op.type (%AddAssignWith.WithSelf.Op.type.9de7cb.1) = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, loaded [symbolic = @AddAssignWith.WithSelf.%AddAssignWith.WithSelf.Op (constants.%AddAssignWith.WithSelf.Op.cfca3c.1)] // CHECK:STDOUT: %Core.import_ref.2783 = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, unloaded @@ -1585,222 +1577,187 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Core.import_ref.ffb = import_ref Core//prelude/operators/arithmetic, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AddWith.loc124(%Result.loc121_9.2: %Destroy.type, %U.loc122_4.2: %Destroy.type, %T.loc123_4.2: @AddWith.loc124.%facet_type.loc123_37 (%facet_type.660)) { +// CHECK:STDOUT: generic fn @AddWith.loc124(%Result.loc121_9.2: %Destroy.type, %U.loc122_4.2: %Destroy.type, %T.loc123_4.2: @AddWith.loc124.%facet_type.loc123_37 (%facet_type.c17)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc126: = require_complete_type %AddWith.type.loc123_35.1 [symbolic = %require_complete.loc126 (constants.%require_complete.5dc)] -// CHECK:STDOUT: %assoc1: @AddWith.loc124.%AddWith.assoc_type (%AddWith.assoc_type.964) = assoc_entity element1, imports.%Core.import_ref.8ad [symbolic = %assoc1 (constants.%assoc1.261)] -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc126: = lookup_impl_witness %T.loc123_4.1, @AddWith.1, @AddWith.1(%U.as_type.loc123_35.1) [symbolic = %AddWith.lookup_impl_witness.loc126 (constants.%AddWith.lookup_impl_witness.aab)] -// CHECK:STDOUT: %AddWith.facet: @AddWith.loc124.%AddWith.type.loc123_35.1 (%AddWith.type.d58) = facet_value %T.as_type.loc124_29.1, (%AddWith.lookup_impl_witness.loc126) [symbolic = %AddWith.facet (constants.%AddWith.facet.dad)] -// CHECK:STDOUT: %AddWith.WithSelf.Op.type: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%U.as_type.loc123_35.1, %AddWith.facet) [symbolic = %AddWith.WithSelf.Op.type (constants.%AddWith.WithSelf.Op.type.081)] -// CHECK:STDOUT: %.loc126_5.6: type = fn_type_with_self_type %AddWith.WithSelf.Op.type, %AddWith.facet [symbolic = %.loc126_5.6 (constants.%.612)] -// CHECK:STDOUT: %impl.elem1.loc126_5.2: @AddWith.loc124.%.loc126_5.6 (%.612) = impl_witness_access %AddWith.lookup_impl_witness.loc126, element1 [symbolic = %impl.elem1.loc126_5.2 (constants.%impl.elem1.9e8)] -// CHECK:STDOUT: %specific_impl_fn.loc126_5.3: = specific_impl_function %impl.elem1.loc126_5.2, @AddWith.WithSelf.Op(%U.as_type.loc123_35.1, %AddWith.facet) [symbolic = %specific_impl_fn.loc126_5.3 (constants.%specific_impl_fn.666)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Result.loc121_9.1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.869b78.2)] -// CHECK:STDOUT: %.loc126_5.7: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Result.loc121_9.1 [symbolic = %.loc126_5.7 (constants.%.f0c)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Result.loc121_9.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.dfb4c4.2)] -// CHECK:STDOUT: %impl.elem2.loc126_5.2: @AddWith.loc124.%.loc126_5.7 (%.f0c) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc126_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc126_5.4: = specific_impl_function %impl.elem2.loc126_5.2, @Destroy.WithSelf.SelfDestruct.1(%Result.loc121_9.1) [symbolic = %specific_impl_fn.loc126_5.4 (constants.%specific_impl_fn.6f9)] +// CHECK:STDOUT: %require_complete.loc126: = require_complete_type %AddWith.type.loc123_35.1 [symbolic = %require_complete.loc126 (constants.%require_complete.528878.2)] +// CHECK:STDOUT: %assoc1: @AddWith.loc124.%AddWith.assoc_type (%AddWith.assoc_type.71f) = assoc_entity element1, imports.%Core.import_ref.8ad [symbolic = %assoc1 (constants.%assoc1.f40)] +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc126: = lookup_impl_witness %T.loc123_4.1, @AddWith.1, @AddWith.1(%U.as_type.loc123_35.1) [symbolic = %AddWith.lookup_impl_witness.loc126 (constants.%AddWith.lookup_impl_witness.206)] +// CHECK:STDOUT: %AddWith.facet: @AddWith.loc124.%AddWith.type.loc123_35.1 (%AddWith.type.4f5) = facet_value %T.as_type.loc124_29.1, (%AddWith.lookup_impl_witness.loc126) [symbolic = %AddWith.facet (constants.%AddWith.facet.880)] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type: type = fn_type @AddWith.WithSelf.Op, @AddWith.WithSelf(%U.as_type.loc123_35.1, %AddWith.facet) [symbolic = %AddWith.WithSelf.Op.type (constants.%AddWith.WithSelf.Op.type.c00)] +// CHECK:STDOUT: %.loc126_5.6: type = fn_type_with_self_type %AddWith.WithSelf.Op.type, %AddWith.facet [symbolic = %.loc126_5.6 (constants.%.a11)] +// CHECK:STDOUT: %impl.elem1.loc126_5.2: @AddWith.loc124.%.loc126_5.6 (%.a11) = impl_witness_access %AddWith.lookup_impl_witness.loc126, element1 [symbolic = %impl.elem1.loc126_5.2 (constants.%impl.elem1.fe2)] +// CHECK:STDOUT: %specific_impl_fn.loc126_5.2: = specific_impl_function %impl.elem1.loc126_5.2, @AddWith.WithSelf.Op(%U.as_type.loc123_35.1, %AddWith.facet) [symbolic = %specific_impl_fn.loc126_5.2 (constants.%specific_impl_fn.896)] +// CHECK:STDOUT: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%result.param: @AddWith.loc124.%Result.as_type.loc123_53.1 (%Result.as_type), %x.param: @AddWith.loc124.%T.as_type.loc124_29.1 (%T.as_type.fe6), %y.param: @AddWith.loc124.%U.as_type.loc123_35.1 (%U.as_type.b61)) { +// CHECK:STDOUT: fn(%result.param: @AddWith.loc124.%Result.as_type.loc123_53.1 (%Result.as_type), %x.param: @AddWith.loc124.%T.as_type.loc124_29.1 (%T.as_type.d2e), %y.param: @AddWith.loc124.%U.as_type.loc123_35.1 (%U.as_type.0bd)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @AddWith.loc124.%T.as_type.loc124_29.1 (%T.as_type.fe6) = name_ref x, %x -// CHECK:STDOUT: %y.ref: @AddWith.loc124.%U.as_type.loc123_35.1 (%U.as_type.b61) = name_ref y, %y -// CHECK:STDOUT: %AddWith.type.loc126: type = facet_type <@AddWith.1, @AddWith.1(constants.%U.as_type.b61)> [symbolic = %AddWith.type.loc123_35.1 (constants.%AddWith.type.d58)] -// CHECK:STDOUT: %.loc126_5.1: @AddWith.loc124.%AddWith.assoc_type (%AddWith.assoc_type.964) = specific_constant imports.%Core.import_ref.5c64, @AddWith.WithSelf(constants.%U.as_type.b61, constants.%Self.958) [symbolic = %assoc1 (constants.%assoc1.261)] -// CHECK:STDOUT: %Op.ref: @AddWith.loc124.%AddWith.assoc_type (%AddWith.assoc_type.964) = name_ref Op, %.loc126_5.1 [symbolic = %assoc1 (constants.%assoc1.261)] -// CHECK:STDOUT: %impl.elem1.loc126_5.1: @AddWith.loc124.%.loc126_5.6 (%.612) = impl_witness_access constants.%AddWith.lookup_impl_witness.aab, element1 [symbolic = %impl.elem1.loc126_5.2 (constants.%impl.elem1.9e8)] +// CHECK:STDOUT: %x.ref: @AddWith.loc124.%T.as_type.loc124_29.1 (%T.as_type.d2e) = name_ref x, %x +// CHECK:STDOUT: %y.ref: @AddWith.loc124.%U.as_type.loc123_35.1 (%U.as_type.0bd) = name_ref y, %y +// CHECK:STDOUT: %AddWith.type.loc126: type = facet_type <@AddWith.1, @AddWith.1(constants.%U.as_type.0bd)> [symbolic = %AddWith.type.loc123_35.1 (constants.%AddWith.type.4f5)] +// CHECK:STDOUT: %.loc126_5.1: @AddWith.loc124.%AddWith.assoc_type (%AddWith.assoc_type.71f) = specific_constant imports.%Core.import_ref.5c64, @AddWith.WithSelf(constants.%U.as_type.0bd, constants.%Self.958) [symbolic = %assoc1 (constants.%assoc1.f40)] +// CHECK:STDOUT: %Op.ref: @AddWith.loc124.%AddWith.assoc_type (%AddWith.assoc_type.71f) = name_ref Op, %.loc126_5.1 [symbolic = %assoc1 (constants.%assoc1.f40)] +// CHECK:STDOUT: %impl.elem1.loc126_5.1: @AddWith.loc124.%.loc126_5.6 (%.a11) = impl_witness_access constants.%AddWith.lookup_impl_witness.206, element1 [symbolic = %impl.elem1.loc126_5.2 (constants.%impl.elem1.fe2)] // CHECK:STDOUT: %bound_method.loc126_5.1: = bound_method %x.ref, %impl.elem1.loc126_5.1 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.1: = specific_impl_function %impl.elem1.loc126_5.1, @AddWith.WithSelf.Op(constants.%U.as_type.b61, constants.%AddWith.facet.dad) [symbolic = %specific_impl_fn.loc126_5.3 (constants.%specific_impl_fn.666)] +// CHECK:STDOUT: %specific_impl_fn.loc126_5.1: = specific_impl_function %impl.elem1.loc126_5.1, @AddWith.WithSelf.Op(constants.%U.as_type.0bd, constants.%AddWith.facet.880) [symbolic = %specific_impl_fn.loc126_5.2 (constants.%specific_impl_fn.896)] // CHECK:STDOUT: %bound_method.loc126_5.2: = bound_method %x.ref, %specific_impl_fn.loc126_5.1 // CHECK:STDOUT: %.loc126_5.2: ref @AddWith.loc124.%Result.as_type.loc123_53.1 (%Result.as_type) = temporary_storage // CHECK:STDOUT: %AddWith.WithSelf.Op.call: init @AddWith.loc124.%Result.as_type.loc123_53.1 (%Result.as_type) to %.loc126_5.2 = call %bound_method.loc126_5.2(%x.ref, %y.ref) // CHECK:STDOUT: %.loc126_5.3: ref @AddWith.loc124.%Result.as_type.loc123_53.1 (%Result.as_type) = temporary %.loc126_5.2, %AddWith.WithSelf.Op.call -// CHECK:STDOUT: %impl.elem2.loc126_5.1: @AddWith.loc124.%.loc126_5.7 (%.f0c) = impl_witness_access constants.%Destroy.lookup_impl_witness.dfb4c4.2, element2 [symbolic = %impl.elem2.loc126_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc126_5.3: = bound_method %.loc126_5.3, %impl.elem2.loc126_5.1 // CHECK:STDOUT: %.loc126_5.4: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc121_9.1 (constants.%Result)] // CHECK:STDOUT: %.loc126_5.5: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc121_9.1 (constants.%Result)] -// CHECK:STDOUT: %specific_impl_fn.loc126_5.2: = specific_impl_function %impl.elem2.loc126_5.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Result) [symbolic = %specific_impl_fn.loc126_5.4 (constants.%specific_impl_fn.6f9)] -// CHECK:STDOUT: %bound_method.loc126_5.4: = bound_method %.loc126_5.3, %specific_impl_fn.loc126_5.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc126_5.4(%.loc126_5.3) +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc126_5.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @SubWith.loc135(%Result.loc132_9.2: %Destroy.type, %U.loc133_4.2: %Destroy.type, %T.loc134_4.2: @SubWith.loc135.%facet_type.loc134_37 (%facet_type.ba3)) { +// CHECK:STDOUT: generic fn @SubWith.loc135(%Result.loc132_9.2: %Destroy.type, %U.loc133_4.2: %Destroy.type, %T.loc134_4.2: @SubWith.loc135.%facet_type.loc134_37 (%facet_type.0a9)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc137: = require_complete_type %SubWith.type.loc134_35.1 [symbolic = %require_complete.loc137 (constants.%require_complete.c6e)] -// CHECK:STDOUT: %assoc1: @SubWith.loc135.%SubWith.assoc_type (%SubWith.assoc_type.378) = assoc_entity element1, imports.%Core.import_ref.2f4 [symbolic = %assoc1 (constants.%assoc1.0a7)] -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137: = lookup_impl_witness %T.loc134_4.1, @SubWith.1, @SubWith.1(%U.as_type.loc134_35.1) [symbolic = %SubWith.lookup_impl_witness.loc137 (constants.%SubWith.lookup_impl_witness.1fa)] -// CHECK:STDOUT: %SubWith.facet: @SubWith.loc135.%SubWith.type.loc134_35.1 (%SubWith.type.d62) = facet_value %T.as_type.loc135_29.1, (%SubWith.lookup_impl_witness.loc137) [symbolic = %SubWith.facet (constants.%SubWith.facet.eca)] -// CHECK:STDOUT: %SubWith.WithSelf.Op.type: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%U.as_type.loc134_35.1, %SubWith.facet) [symbolic = %SubWith.WithSelf.Op.type (constants.%SubWith.WithSelf.Op.type.90e)] -// CHECK:STDOUT: %.loc137_5.6: type = fn_type_with_self_type %SubWith.WithSelf.Op.type, %SubWith.facet [symbolic = %.loc137_5.6 (constants.%.844)] -// CHECK:STDOUT: %impl.elem1.loc137_5.2: @SubWith.loc135.%.loc137_5.6 (%.844) = impl_witness_access %SubWith.lookup_impl_witness.loc137, element1 [symbolic = %impl.elem1.loc137_5.2 (constants.%impl.elem1.fa7)] -// CHECK:STDOUT: %specific_impl_fn.loc137_5.3: = specific_impl_function %impl.elem1.loc137_5.2, @SubWith.WithSelf.Op(%U.as_type.loc134_35.1, %SubWith.facet) [symbolic = %specific_impl_fn.loc137_5.3 (constants.%specific_impl_fn.2de)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Result.loc132_9.1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.869b78.2)] -// CHECK:STDOUT: %.loc137_5.7: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Result.loc132_9.1 [symbolic = %.loc137_5.7 (constants.%.f0c)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Result.loc132_9.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.dfb4c4.2)] -// CHECK:STDOUT: %impl.elem2.loc137_5.2: @SubWith.loc135.%.loc137_5.7 (%.f0c) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc137_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc137_5.4: = specific_impl_function %impl.elem2.loc137_5.2, @Destroy.WithSelf.SelfDestruct.1(%Result.loc132_9.1) [symbolic = %specific_impl_fn.loc137_5.4 (constants.%specific_impl_fn.6f9)] +// CHECK:STDOUT: %require_complete.loc137: = require_complete_type %SubWith.type.loc134_35.1 [symbolic = %require_complete.loc137 (constants.%require_complete.49f499.2)] +// CHECK:STDOUT: %assoc1: @SubWith.loc135.%SubWith.assoc_type (%SubWith.assoc_type.5f0) = assoc_entity element1, imports.%Core.import_ref.2f4 [symbolic = %assoc1 (constants.%assoc1.a86)] +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137: = lookup_impl_witness %T.loc134_4.1, @SubWith.1, @SubWith.1(%U.as_type.loc134_35.1) [symbolic = %SubWith.lookup_impl_witness.loc137 (constants.%SubWith.lookup_impl_witness.725)] +// CHECK:STDOUT: %SubWith.facet: @SubWith.loc135.%SubWith.type.loc134_35.1 (%SubWith.type.769) = facet_value %T.as_type.loc135_29.1, (%SubWith.lookup_impl_witness.loc137) [symbolic = %SubWith.facet (constants.%SubWith.facet.910)] +// CHECK:STDOUT: %SubWith.WithSelf.Op.type: type = fn_type @SubWith.WithSelf.Op, @SubWith.WithSelf(%U.as_type.loc134_35.1, %SubWith.facet) [symbolic = %SubWith.WithSelf.Op.type (constants.%SubWith.WithSelf.Op.type.772)] +// CHECK:STDOUT: %.loc137_5.6: type = fn_type_with_self_type %SubWith.WithSelf.Op.type, %SubWith.facet [symbolic = %.loc137_5.6 (constants.%.47a6)] +// CHECK:STDOUT: %impl.elem1.loc137_5.2: @SubWith.loc135.%.loc137_5.6 (%.47a6) = impl_witness_access %SubWith.lookup_impl_witness.loc137, element1 [symbolic = %impl.elem1.loc137_5.2 (constants.%impl.elem1.415)] +// CHECK:STDOUT: %specific_impl_fn.loc137_5.2: = specific_impl_function %impl.elem1.loc137_5.2, @SubWith.WithSelf.Op(%U.as_type.loc134_35.1, %SubWith.facet) [symbolic = %specific_impl_fn.loc137_5.2 (constants.%specific_impl_fn.a72)] +// CHECK:STDOUT: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%result.param: @SubWith.loc135.%Result.as_type.loc134_53.1 (%Result.as_type), %x.param: @SubWith.loc135.%T.as_type.loc135_29.1 (%T.as_type.dfc), %y.param: @SubWith.loc135.%U.as_type.loc134_35.1 (%U.as_type.b61)) { +// CHECK:STDOUT: fn(%result.param: @SubWith.loc135.%Result.as_type.loc134_53.1 (%Result.as_type), %x.param: @SubWith.loc135.%T.as_type.loc135_29.1 (%T.as_type.4b7), %y.param: @SubWith.loc135.%U.as_type.loc134_35.1 (%U.as_type.0bd)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @SubWith.loc135.%T.as_type.loc135_29.1 (%T.as_type.dfc) = name_ref x, %x -// CHECK:STDOUT: %y.ref: @SubWith.loc135.%U.as_type.loc134_35.1 (%U.as_type.b61) = name_ref y, %y -// CHECK:STDOUT: %SubWith.type.loc137: type = facet_type <@SubWith.1, @SubWith.1(constants.%U.as_type.b61)> [symbolic = %SubWith.type.loc134_35.1 (constants.%SubWith.type.d62)] -// CHECK:STDOUT: %.loc137_5.1: @SubWith.loc135.%SubWith.assoc_type (%SubWith.assoc_type.378) = specific_constant imports.%Core.import_ref.5fe, @SubWith.WithSelf(constants.%U.as_type.b61, constants.%Self.18a) [symbolic = %assoc1 (constants.%assoc1.0a7)] -// CHECK:STDOUT: %Op.ref: @SubWith.loc135.%SubWith.assoc_type (%SubWith.assoc_type.378) = name_ref Op, %.loc137_5.1 [symbolic = %assoc1 (constants.%assoc1.0a7)] -// CHECK:STDOUT: %impl.elem1.loc137_5.1: @SubWith.loc135.%.loc137_5.6 (%.844) = impl_witness_access constants.%SubWith.lookup_impl_witness.1fa, element1 [symbolic = %impl.elem1.loc137_5.2 (constants.%impl.elem1.fa7)] +// CHECK:STDOUT: %x.ref: @SubWith.loc135.%T.as_type.loc135_29.1 (%T.as_type.4b7) = name_ref x, %x +// CHECK:STDOUT: %y.ref: @SubWith.loc135.%U.as_type.loc134_35.1 (%U.as_type.0bd) = name_ref y, %y +// CHECK:STDOUT: %SubWith.type.loc137: type = facet_type <@SubWith.1, @SubWith.1(constants.%U.as_type.0bd)> [symbolic = %SubWith.type.loc134_35.1 (constants.%SubWith.type.769)] +// CHECK:STDOUT: %.loc137_5.1: @SubWith.loc135.%SubWith.assoc_type (%SubWith.assoc_type.5f0) = specific_constant imports.%Core.import_ref.5fe, @SubWith.WithSelf(constants.%U.as_type.0bd, constants.%Self.18a) [symbolic = %assoc1 (constants.%assoc1.a86)] +// CHECK:STDOUT: %Op.ref: @SubWith.loc135.%SubWith.assoc_type (%SubWith.assoc_type.5f0) = name_ref Op, %.loc137_5.1 [symbolic = %assoc1 (constants.%assoc1.a86)] +// CHECK:STDOUT: %impl.elem1.loc137_5.1: @SubWith.loc135.%.loc137_5.6 (%.47a6) = impl_witness_access constants.%SubWith.lookup_impl_witness.725, element1 [symbolic = %impl.elem1.loc137_5.2 (constants.%impl.elem1.415)] // CHECK:STDOUT: %bound_method.loc137_5.1: = bound_method %x.ref, %impl.elem1.loc137_5.1 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.1: = specific_impl_function %impl.elem1.loc137_5.1, @SubWith.WithSelf.Op(constants.%U.as_type.b61, constants.%SubWith.facet.eca) [symbolic = %specific_impl_fn.loc137_5.3 (constants.%specific_impl_fn.2de)] +// CHECK:STDOUT: %specific_impl_fn.loc137_5.1: = specific_impl_function %impl.elem1.loc137_5.1, @SubWith.WithSelf.Op(constants.%U.as_type.0bd, constants.%SubWith.facet.910) [symbolic = %specific_impl_fn.loc137_5.2 (constants.%specific_impl_fn.a72)] // CHECK:STDOUT: %bound_method.loc137_5.2: = bound_method %x.ref, %specific_impl_fn.loc137_5.1 // CHECK:STDOUT: %.loc137_5.2: ref @SubWith.loc135.%Result.as_type.loc134_53.1 (%Result.as_type) = temporary_storage // CHECK:STDOUT: %SubWith.WithSelf.Op.call: init @SubWith.loc135.%Result.as_type.loc134_53.1 (%Result.as_type) to %.loc137_5.2 = call %bound_method.loc137_5.2(%x.ref, %y.ref) // CHECK:STDOUT: %.loc137_5.3: ref @SubWith.loc135.%Result.as_type.loc134_53.1 (%Result.as_type) = temporary %.loc137_5.2, %SubWith.WithSelf.Op.call -// CHECK:STDOUT: %impl.elem2.loc137_5.1: @SubWith.loc135.%.loc137_5.7 (%.f0c) = impl_witness_access constants.%Destroy.lookup_impl_witness.dfb4c4.2, element2 [symbolic = %impl.elem2.loc137_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc137_5.3: = bound_method %.loc137_5.3, %impl.elem2.loc137_5.1 // CHECK:STDOUT: %.loc137_5.4: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc132_9.1 (constants.%Result)] // CHECK:STDOUT: %.loc137_5.5: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc132_9.1 (constants.%Result)] -// CHECK:STDOUT: %specific_impl_fn.loc137_5.2: = specific_impl_function %impl.elem2.loc137_5.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Result) [symbolic = %specific_impl_fn.loc137_5.4 (constants.%specific_impl_fn.6f9)] -// CHECK:STDOUT: %bound_method.loc137_5.4: = bound_method %.loc137_5.3, %specific_impl_fn.loc137_5.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc137_5.4(%.loc137_5.3) +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc137_5.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @MulWith.loc146(%Result.loc143_9.2: %Destroy.type, %U.loc144_4.2: %Destroy.type, %T.loc145_4.2: @MulWith.loc146.%facet_type.loc145_37 (%facet_type.9c7)) { +// CHECK:STDOUT: generic fn @MulWith.loc146(%Result.loc143_9.2: %Destroy.type, %U.loc144_4.2: %Destroy.type, %T.loc145_4.2: @MulWith.loc146.%facet_type.loc145_37 (%facet_type.a5f)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc148: = require_complete_type %MulWith.type.loc145_35.1 [symbolic = %require_complete.loc148 (constants.%require_complete.dc1)] -// CHECK:STDOUT: %assoc1: @MulWith.loc146.%MulWith.assoc_type (%MulWith.assoc_type.1d7) = assoc_entity element1, imports.%Core.import_ref.fc2 [symbolic = %assoc1 (constants.%assoc1.2be)] -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc148: = lookup_impl_witness %T.loc145_4.1, @MulWith.1, @MulWith.1(%U.as_type.loc145_35.1) [symbolic = %MulWith.lookup_impl_witness.loc148 (constants.%MulWith.lookup_impl_witness.ac6)] -// CHECK:STDOUT: %MulWith.facet: @MulWith.loc146.%MulWith.type.loc145_35.1 (%MulWith.type.5c9) = facet_value %T.as_type.loc146_29.1, (%MulWith.lookup_impl_witness.loc148) [symbolic = %MulWith.facet (constants.%MulWith.facet.cae)] -// CHECK:STDOUT: %MulWith.WithSelf.Op.type: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%U.as_type.loc145_35.1, %MulWith.facet) [symbolic = %MulWith.WithSelf.Op.type (constants.%MulWith.WithSelf.Op.type.6df)] -// CHECK:STDOUT: %.loc148_5.6: type = fn_type_with_self_type %MulWith.WithSelf.Op.type, %MulWith.facet [symbolic = %.loc148_5.6 (constants.%.d85)] -// CHECK:STDOUT: %impl.elem1.loc148_5.2: @MulWith.loc146.%.loc148_5.6 (%.d85) = impl_witness_access %MulWith.lookup_impl_witness.loc148, element1 [symbolic = %impl.elem1.loc148_5.2 (constants.%impl.elem1.5cc)] -// CHECK:STDOUT: %specific_impl_fn.loc148_5.3: = specific_impl_function %impl.elem1.loc148_5.2, @MulWith.WithSelf.Op(%U.as_type.loc145_35.1, %MulWith.facet) [symbolic = %specific_impl_fn.loc148_5.3 (constants.%specific_impl_fn.2cd)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Result.loc143_9.1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.869b78.2)] -// CHECK:STDOUT: %.loc148_5.7: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Result.loc143_9.1 [symbolic = %.loc148_5.7 (constants.%.f0c)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Result.loc143_9.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.dfb4c4.2)] -// CHECK:STDOUT: %impl.elem2.loc148_5.2: @MulWith.loc146.%.loc148_5.7 (%.f0c) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc148_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc148_5.4: = specific_impl_function %impl.elem2.loc148_5.2, @Destroy.WithSelf.SelfDestruct.1(%Result.loc143_9.1) [symbolic = %specific_impl_fn.loc148_5.4 (constants.%specific_impl_fn.6f9)] +// CHECK:STDOUT: %require_complete.loc148: = require_complete_type %MulWith.type.loc145_35.1 [symbolic = %require_complete.loc148 (constants.%require_complete.8389d3.2)] +// CHECK:STDOUT: %assoc1: @MulWith.loc146.%MulWith.assoc_type (%MulWith.assoc_type.2e5) = assoc_entity element1, imports.%Core.import_ref.fc2 [symbolic = %assoc1 (constants.%assoc1.4eb)] +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc148: = lookup_impl_witness %T.loc145_4.1, @MulWith.1, @MulWith.1(%U.as_type.loc145_35.1) [symbolic = %MulWith.lookup_impl_witness.loc148 (constants.%MulWith.lookup_impl_witness.50b)] +// CHECK:STDOUT: %MulWith.facet: @MulWith.loc146.%MulWith.type.loc145_35.1 (%MulWith.type.b0b) = facet_value %T.as_type.loc146_29.1, (%MulWith.lookup_impl_witness.loc148) [symbolic = %MulWith.facet (constants.%MulWith.facet.756)] +// CHECK:STDOUT: %MulWith.WithSelf.Op.type: type = fn_type @MulWith.WithSelf.Op, @MulWith.WithSelf(%U.as_type.loc145_35.1, %MulWith.facet) [symbolic = %MulWith.WithSelf.Op.type (constants.%MulWith.WithSelf.Op.type.689)] +// CHECK:STDOUT: %.loc148_5.6: type = fn_type_with_self_type %MulWith.WithSelf.Op.type, %MulWith.facet [symbolic = %.loc148_5.6 (constants.%.7f0)] +// CHECK:STDOUT: %impl.elem1.loc148_5.2: @MulWith.loc146.%.loc148_5.6 (%.7f0) = impl_witness_access %MulWith.lookup_impl_witness.loc148, element1 [symbolic = %impl.elem1.loc148_5.2 (constants.%impl.elem1.334)] +// CHECK:STDOUT: %specific_impl_fn.loc148_5.2: = specific_impl_function %impl.elem1.loc148_5.2, @MulWith.WithSelf.Op(%U.as_type.loc145_35.1, %MulWith.facet) [symbolic = %specific_impl_fn.loc148_5.2 (constants.%specific_impl_fn.2bd)] +// CHECK:STDOUT: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%result.param: @MulWith.loc146.%Result.as_type.loc145_53.1 (%Result.as_type), %x.param: @MulWith.loc146.%T.as_type.loc146_29.1 (%T.as_type.521), %y.param: @MulWith.loc146.%U.as_type.loc145_35.1 (%U.as_type.b61)) { +// CHECK:STDOUT: fn(%result.param: @MulWith.loc146.%Result.as_type.loc145_53.1 (%Result.as_type), %x.param: @MulWith.loc146.%T.as_type.loc146_29.1 (%T.as_type.639), %y.param: @MulWith.loc146.%U.as_type.loc145_35.1 (%U.as_type.0bd)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @MulWith.loc146.%T.as_type.loc146_29.1 (%T.as_type.521) = name_ref x, %x -// CHECK:STDOUT: %y.ref: @MulWith.loc146.%U.as_type.loc145_35.1 (%U.as_type.b61) = name_ref y, %y -// CHECK:STDOUT: %MulWith.type.loc148: type = facet_type <@MulWith.1, @MulWith.1(constants.%U.as_type.b61)> [symbolic = %MulWith.type.loc145_35.1 (constants.%MulWith.type.5c9)] -// CHECK:STDOUT: %.loc148_5.1: @MulWith.loc146.%MulWith.assoc_type (%MulWith.assoc_type.1d7) = specific_constant imports.%Core.import_ref.0a8, @MulWith.WithSelf(constants.%U.as_type.b61, constants.%Self.742) [symbolic = %assoc1 (constants.%assoc1.2be)] -// CHECK:STDOUT: %Op.ref: @MulWith.loc146.%MulWith.assoc_type (%MulWith.assoc_type.1d7) = name_ref Op, %.loc148_5.1 [symbolic = %assoc1 (constants.%assoc1.2be)] -// CHECK:STDOUT: %impl.elem1.loc148_5.1: @MulWith.loc146.%.loc148_5.6 (%.d85) = impl_witness_access constants.%MulWith.lookup_impl_witness.ac6, element1 [symbolic = %impl.elem1.loc148_5.2 (constants.%impl.elem1.5cc)] +// CHECK:STDOUT: %x.ref: @MulWith.loc146.%T.as_type.loc146_29.1 (%T.as_type.639) = name_ref x, %x +// CHECK:STDOUT: %y.ref: @MulWith.loc146.%U.as_type.loc145_35.1 (%U.as_type.0bd) = name_ref y, %y +// CHECK:STDOUT: %MulWith.type.loc148: type = facet_type <@MulWith.1, @MulWith.1(constants.%U.as_type.0bd)> [symbolic = %MulWith.type.loc145_35.1 (constants.%MulWith.type.b0b)] +// CHECK:STDOUT: %.loc148_5.1: @MulWith.loc146.%MulWith.assoc_type (%MulWith.assoc_type.2e5) = specific_constant imports.%Core.import_ref.0a8, @MulWith.WithSelf(constants.%U.as_type.0bd, constants.%Self.742) [symbolic = %assoc1 (constants.%assoc1.4eb)] +// CHECK:STDOUT: %Op.ref: @MulWith.loc146.%MulWith.assoc_type (%MulWith.assoc_type.2e5) = name_ref Op, %.loc148_5.1 [symbolic = %assoc1 (constants.%assoc1.4eb)] +// CHECK:STDOUT: %impl.elem1.loc148_5.1: @MulWith.loc146.%.loc148_5.6 (%.7f0) = impl_witness_access constants.%MulWith.lookup_impl_witness.50b, element1 [symbolic = %impl.elem1.loc148_5.2 (constants.%impl.elem1.334)] // CHECK:STDOUT: %bound_method.loc148_5.1: = bound_method %x.ref, %impl.elem1.loc148_5.1 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.1: = specific_impl_function %impl.elem1.loc148_5.1, @MulWith.WithSelf.Op(constants.%U.as_type.b61, constants.%MulWith.facet.cae) [symbolic = %specific_impl_fn.loc148_5.3 (constants.%specific_impl_fn.2cd)] +// CHECK:STDOUT: %specific_impl_fn.loc148_5.1: = specific_impl_function %impl.elem1.loc148_5.1, @MulWith.WithSelf.Op(constants.%U.as_type.0bd, constants.%MulWith.facet.756) [symbolic = %specific_impl_fn.loc148_5.2 (constants.%specific_impl_fn.2bd)] // CHECK:STDOUT: %bound_method.loc148_5.2: = bound_method %x.ref, %specific_impl_fn.loc148_5.1 // CHECK:STDOUT: %.loc148_5.2: ref @MulWith.loc146.%Result.as_type.loc145_53.1 (%Result.as_type) = temporary_storage // CHECK:STDOUT: %MulWith.WithSelf.Op.call: init @MulWith.loc146.%Result.as_type.loc145_53.1 (%Result.as_type) to %.loc148_5.2 = call %bound_method.loc148_5.2(%x.ref, %y.ref) // CHECK:STDOUT: %.loc148_5.3: ref @MulWith.loc146.%Result.as_type.loc145_53.1 (%Result.as_type) = temporary %.loc148_5.2, %MulWith.WithSelf.Op.call -// CHECK:STDOUT: %impl.elem2.loc148_5.1: @MulWith.loc146.%.loc148_5.7 (%.f0c) = impl_witness_access constants.%Destroy.lookup_impl_witness.dfb4c4.2, element2 [symbolic = %impl.elem2.loc148_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc148_5.3: = bound_method %.loc148_5.3, %impl.elem2.loc148_5.1 // CHECK:STDOUT: %.loc148_5.4: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc143_9.1 (constants.%Result)] // CHECK:STDOUT: %.loc148_5.5: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc143_9.1 (constants.%Result)] -// CHECK:STDOUT: %specific_impl_fn.loc148_5.2: = specific_impl_function %impl.elem2.loc148_5.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Result) [symbolic = %specific_impl_fn.loc148_5.4 (constants.%specific_impl_fn.6f9)] -// CHECK:STDOUT: %bound_method.loc148_5.4: = bound_method %.loc148_5.3, %specific_impl_fn.loc148_5.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc148_5.4(%.loc148_5.3) +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc148_5.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @DivWith.loc157(%Result.loc154_9.2: %Destroy.type, %U.loc155_4.2: %Destroy.type, %T.loc156_4.2: @DivWith.loc157.%facet_type.loc156_37 (%facet_type.89a)) { +// CHECK:STDOUT: generic fn @DivWith.loc157(%Result.loc154_9.2: %Destroy.type, %U.loc155_4.2: %Destroy.type, %T.loc156_4.2: @DivWith.loc157.%facet_type.loc156_37 (%facet_type.351)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc159: = require_complete_type %DivWith.type.loc156_35.1 [symbolic = %require_complete.loc159 (constants.%require_complete.4b7)] -// CHECK:STDOUT: %assoc1: @DivWith.loc157.%DivWith.assoc_type (%DivWith.assoc_type.248) = assoc_entity element1, imports.%Core.import_ref.f2f [symbolic = %assoc1 (constants.%assoc1.6e8)] -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc159: = lookup_impl_witness %T.loc156_4.1, @DivWith.1, @DivWith.1(%U.as_type.loc156_35.1) [symbolic = %DivWith.lookup_impl_witness.loc159 (constants.%DivWith.lookup_impl_witness.c25)] -// CHECK:STDOUT: %DivWith.facet: @DivWith.loc157.%DivWith.type.loc156_35.1 (%DivWith.type.e82) = facet_value %T.as_type.loc157_29.1, (%DivWith.lookup_impl_witness.loc159) [symbolic = %DivWith.facet (constants.%DivWith.facet.7d7)] -// CHECK:STDOUT: %DivWith.WithSelf.Op.type: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%U.as_type.loc156_35.1, %DivWith.facet) [symbolic = %DivWith.WithSelf.Op.type (constants.%DivWith.WithSelf.Op.type.0d7)] -// CHECK:STDOUT: %.loc159_5.6: type = fn_type_with_self_type %DivWith.WithSelf.Op.type, %DivWith.facet [symbolic = %.loc159_5.6 (constants.%.ba0)] -// CHECK:STDOUT: %impl.elem1.loc159_5.2: @DivWith.loc157.%.loc159_5.6 (%.ba0) = impl_witness_access %DivWith.lookup_impl_witness.loc159, element1 [symbolic = %impl.elem1.loc159_5.2 (constants.%impl.elem1.610)] -// CHECK:STDOUT: %specific_impl_fn.loc159_5.3: = specific_impl_function %impl.elem1.loc159_5.2, @DivWith.WithSelf.Op(%U.as_type.loc156_35.1, %DivWith.facet) [symbolic = %specific_impl_fn.loc159_5.3 (constants.%specific_impl_fn.7d6)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Result.loc154_9.1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.869b78.2)] -// CHECK:STDOUT: %.loc159_5.7: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Result.loc154_9.1 [symbolic = %.loc159_5.7 (constants.%.f0c)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Result.loc154_9.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.dfb4c4.2)] -// CHECK:STDOUT: %impl.elem2.loc159_5.2: @DivWith.loc157.%.loc159_5.7 (%.f0c) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc159_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc159_5.4: = specific_impl_function %impl.elem2.loc159_5.2, @Destroy.WithSelf.SelfDestruct.1(%Result.loc154_9.1) [symbolic = %specific_impl_fn.loc159_5.4 (constants.%specific_impl_fn.6f9)] +// CHECK:STDOUT: %require_complete.loc159: = require_complete_type %DivWith.type.loc156_35.1 [symbolic = %require_complete.loc159 (constants.%require_complete.c4013f.2)] +// CHECK:STDOUT: %assoc1: @DivWith.loc157.%DivWith.assoc_type (%DivWith.assoc_type.e65) = assoc_entity element1, imports.%Core.import_ref.f2f [symbolic = %assoc1 (constants.%assoc1.ed1)] +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc159: = lookup_impl_witness %T.loc156_4.1, @DivWith.1, @DivWith.1(%U.as_type.loc156_35.1) [symbolic = %DivWith.lookup_impl_witness.loc159 (constants.%DivWith.lookup_impl_witness.e1e)] +// CHECK:STDOUT: %DivWith.facet: @DivWith.loc157.%DivWith.type.loc156_35.1 (%DivWith.type.71d) = facet_value %T.as_type.loc157_29.1, (%DivWith.lookup_impl_witness.loc159) [symbolic = %DivWith.facet (constants.%DivWith.facet.538)] +// CHECK:STDOUT: %DivWith.WithSelf.Op.type: type = fn_type @DivWith.WithSelf.Op, @DivWith.WithSelf(%U.as_type.loc156_35.1, %DivWith.facet) [symbolic = %DivWith.WithSelf.Op.type (constants.%DivWith.WithSelf.Op.type.663)] +// CHECK:STDOUT: %.loc159_5.6: type = fn_type_with_self_type %DivWith.WithSelf.Op.type, %DivWith.facet [symbolic = %.loc159_5.6 (constants.%.0f9)] +// CHECK:STDOUT: %impl.elem1.loc159_5.2: @DivWith.loc157.%.loc159_5.6 (%.0f9) = impl_witness_access %DivWith.lookup_impl_witness.loc159, element1 [symbolic = %impl.elem1.loc159_5.2 (constants.%impl.elem1.44e)] +// CHECK:STDOUT: %specific_impl_fn.loc159_5.2: = specific_impl_function %impl.elem1.loc159_5.2, @DivWith.WithSelf.Op(%U.as_type.loc156_35.1, %DivWith.facet) [symbolic = %specific_impl_fn.loc159_5.2 (constants.%specific_impl_fn.ea9)] +// CHECK:STDOUT: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%result.param: @DivWith.loc157.%Result.as_type.loc156_53.1 (%Result.as_type), %x.param: @DivWith.loc157.%T.as_type.loc157_29.1 (%T.as_type.881), %y.param: @DivWith.loc157.%U.as_type.loc156_35.1 (%U.as_type.b61)) { +// CHECK:STDOUT: fn(%result.param: @DivWith.loc157.%Result.as_type.loc156_53.1 (%Result.as_type), %x.param: @DivWith.loc157.%T.as_type.loc157_29.1 (%T.as_type.6cf), %y.param: @DivWith.loc157.%U.as_type.loc156_35.1 (%U.as_type.0bd)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @DivWith.loc157.%T.as_type.loc157_29.1 (%T.as_type.881) = name_ref x, %x -// CHECK:STDOUT: %y.ref: @DivWith.loc157.%U.as_type.loc156_35.1 (%U.as_type.b61) = name_ref y, %y -// CHECK:STDOUT: %DivWith.type.loc159: type = facet_type <@DivWith.1, @DivWith.1(constants.%U.as_type.b61)> [symbolic = %DivWith.type.loc156_35.1 (constants.%DivWith.type.e82)] -// CHECK:STDOUT: %.loc159_5.1: @DivWith.loc157.%DivWith.assoc_type (%DivWith.assoc_type.248) = specific_constant imports.%Core.import_ref.972, @DivWith.WithSelf(constants.%U.as_type.b61, constants.%Self.5b3) [symbolic = %assoc1 (constants.%assoc1.6e8)] -// CHECK:STDOUT: %Op.ref: @DivWith.loc157.%DivWith.assoc_type (%DivWith.assoc_type.248) = name_ref Op, %.loc159_5.1 [symbolic = %assoc1 (constants.%assoc1.6e8)] -// CHECK:STDOUT: %impl.elem1.loc159_5.1: @DivWith.loc157.%.loc159_5.6 (%.ba0) = impl_witness_access constants.%DivWith.lookup_impl_witness.c25, element1 [symbolic = %impl.elem1.loc159_5.2 (constants.%impl.elem1.610)] +// CHECK:STDOUT: %x.ref: @DivWith.loc157.%T.as_type.loc157_29.1 (%T.as_type.6cf) = name_ref x, %x +// CHECK:STDOUT: %y.ref: @DivWith.loc157.%U.as_type.loc156_35.1 (%U.as_type.0bd) = name_ref y, %y +// CHECK:STDOUT: %DivWith.type.loc159: type = facet_type <@DivWith.1, @DivWith.1(constants.%U.as_type.0bd)> [symbolic = %DivWith.type.loc156_35.1 (constants.%DivWith.type.71d)] +// CHECK:STDOUT: %.loc159_5.1: @DivWith.loc157.%DivWith.assoc_type (%DivWith.assoc_type.e65) = specific_constant imports.%Core.import_ref.972, @DivWith.WithSelf(constants.%U.as_type.0bd, constants.%Self.5b3) [symbolic = %assoc1 (constants.%assoc1.ed1)] +// CHECK:STDOUT: %Op.ref: @DivWith.loc157.%DivWith.assoc_type (%DivWith.assoc_type.e65) = name_ref Op, %.loc159_5.1 [symbolic = %assoc1 (constants.%assoc1.ed1)] +// CHECK:STDOUT: %impl.elem1.loc159_5.1: @DivWith.loc157.%.loc159_5.6 (%.0f9) = impl_witness_access constants.%DivWith.lookup_impl_witness.e1e, element1 [symbolic = %impl.elem1.loc159_5.2 (constants.%impl.elem1.44e)] // CHECK:STDOUT: %bound_method.loc159_5.1: = bound_method %x.ref, %impl.elem1.loc159_5.1 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.1: = specific_impl_function %impl.elem1.loc159_5.1, @DivWith.WithSelf.Op(constants.%U.as_type.b61, constants.%DivWith.facet.7d7) [symbolic = %specific_impl_fn.loc159_5.3 (constants.%specific_impl_fn.7d6)] +// CHECK:STDOUT: %specific_impl_fn.loc159_5.1: = specific_impl_function %impl.elem1.loc159_5.1, @DivWith.WithSelf.Op(constants.%U.as_type.0bd, constants.%DivWith.facet.538) [symbolic = %specific_impl_fn.loc159_5.2 (constants.%specific_impl_fn.ea9)] // CHECK:STDOUT: %bound_method.loc159_5.2: = bound_method %x.ref, %specific_impl_fn.loc159_5.1 // CHECK:STDOUT: %.loc159_5.2: ref @DivWith.loc157.%Result.as_type.loc156_53.1 (%Result.as_type) = temporary_storage // CHECK:STDOUT: %DivWith.WithSelf.Op.call: init @DivWith.loc157.%Result.as_type.loc156_53.1 (%Result.as_type) to %.loc159_5.2 = call %bound_method.loc159_5.2(%x.ref, %y.ref) // CHECK:STDOUT: %.loc159_5.3: ref @DivWith.loc157.%Result.as_type.loc156_53.1 (%Result.as_type) = temporary %.loc159_5.2, %DivWith.WithSelf.Op.call -// CHECK:STDOUT: %impl.elem2.loc159_5.1: @DivWith.loc157.%.loc159_5.7 (%.f0c) = impl_witness_access constants.%Destroy.lookup_impl_witness.dfb4c4.2, element2 [symbolic = %impl.elem2.loc159_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc159_5.3: = bound_method %.loc159_5.3, %impl.elem2.loc159_5.1 // CHECK:STDOUT: %.loc159_5.4: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc154_9.1 (constants.%Result)] // CHECK:STDOUT: %.loc159_5.5: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc154_9.1 (constants.%Result)] -// CHECK:STDOUT: %specific_impl_fn.loc159_5.2: = specific_impl_function %impl.elem2.loc159_5.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Result) [symbolic = %specific_impl_fn.loc159_5.4 (constants.%specific_impl_fn.6f9)] -// CHECK:STDOUT: %bound_method.loc159_5.4: = bound_method %.loc159_5.3, %specific_impl_fn.loc159_5.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc159_5.4(%.loc159_5.3) +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc159_5.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ModWith.loc168(%Result.loc165_9.2: %Destroy.type, %U.loc166_4.2: %Destroy.type, %T.loc167_4.2: @ModWith.loc168.%facet_type.loc167_37 (%facet_type.247)) { +// CHECK:STDOUT: generic fn @ModWith.loc168(%Result.loc165_9.2: %Destroy.type, %U.loc166_4.2: %Destroy.type, %T.loc167_4.2: @ModWith.loc168.%facet_type.loc167_37 (%facet_type.938)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %require_complete.loc170: = require_complete_type %ModWith.type.loc167_35.1 [symbolic = %require_complete.loc170 (constants.%require_complete.421)] -// CHECK:STDOUT: %assoc1: @ModWith.loc168.%ModWith.assoc_type (%ModWith.assoc_type.85f) = assoc_entity element1, imports.%Core.import_ref.9f8f [symbolic = %assoc1 (constants.%assoc1.a6b)] -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc170: = lookup_impl_witness %T.loc167_4.1, @ModWith.1, @ModWith.1(%U.as_type.loc167_35.1) [symbolic = %ModWith.lookup_impl_witness.loc170 (constants.%ModWith.lookup_impl_witness.8e1)] -// CHECK:STDOUT: %ModWith.facet: @ModWith.loc168.%ModWith.type.loc167_35.1 (%ModWith.type.475) = facet_value %T.as_type.loc168_29.1, (%ModWith.lookup_impl_witness.loc170) [symbolic = %ModWith.facet (constants.%ModWith.facet.204)] -// CHECK:STDOUT: %ModWith.WithSelf.Op.type: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%U.as_type.loc167_35.1, %ModWith.facet) [symbolic = %ModWith.WithSelf.Op.type (constants.%ModWith.WithSelf.Op.type.340)] -// CHECK:STDOUT: %.loc170_5.6: type = fn_type_with_self_type %ModWith.WithSelf.Op.type, %ModWith.facet [symbolic = %.loc170_5.6 (constants.%.c4c)] -// CHECK:STDOUT: %impl.elem1.loc170_5.2: @ModWith.loc168.%.loc170_5.6 (%.c4c) = impl_witness_access %ModWith.lookup_impl_witness.loc170, element1 [symbolic = %impl.elem1.loc170_5.2 (constants.%impl.elem1.789)] -// CHECK:STDOUT: %specific_impl_fn.loc170_5.3: = specific_impl_function %impl.elem1.loc170_5.2, @ModWith.WithSelf.Op(%U.as_type.loc167_35.1, %ModWith.facet) [symbolic = %specific_impl_fn.loc170_5.3 (constants.%specific_impl_fn.87e)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Result.loc165_9.1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.869b78.2)] -// CHECK:STDOUT: %.loc170_5.7: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Result.loc165_9.1 [symbolic = %.loc170_5.7 (constants.%.f0c)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Result.loc165_9.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.dfb4c4.2)] -// CHECK:STDOUT: %impl.elem2.loc170_5.2: @ModWith.loc168.%.loc170_5.7 (%.f0c) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc170_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc170_5.4: = specific_impl_function %impl.elem2.loc170_5.2, @Destroy.WithSelf.SelfDestruct.1(%Result.loc165_9.1) [symbolic = %specific_impl_fn.loc170_5.4 (constants.%specific_impl_fn.6f9)] +// CHECK:STDOUT: %require_complete.loc170: = require_complete_type %ModWith.type.loc167_35.1 [symbolic = %require_complete.loc170 (constants.%require_complete.312803.2)] +// CHECK:STDOUT: %assoc1: @ModWith.loc168.%ModWith.assoc_type (%ModWith.assoc_type.9c3) = assoc_entity element1, imports.%Core.import_ref.9f8f [symbolic = %assoc1 (constants.%assoc1.3d6)] +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc170: = lookup_impl_witness %T.loc167_4.1, @ModWith.1, @ModWith.1(%U.as_type.loc167_35.1) [symbolic = %ModWith.lookup_impl_witness.loc170 (constants.%ModWith.lookup_impl_witness.c4b)] +// CHECK:STDOUT: %ModWith.facet: @ModWith.loc168.%ModWith.type.loc167_35.1 (%ModWith.type.68a) = facet_value %T.as_type.loc168_29.1, (%ModWith.lookup_impl_witness.loc170) [symbolic = %ModWith.facet (constants.%ModWith.facet.297)] +// CHECK:STDOUT: %ModWith.WithSelf.Op.type: type = fn_type @ModWith.WithSelf.Op, @ModWith.WithSelf(%U.as_type.loc167_35.1, %ModWith.facet) [symbolic = %ModWith.WithSelf.Op.type (constants.%ModWith.WithSelf.Op.type.639)] +// CHECK:STDOUT: %.loc170_5.6: type = fn_type_with_self_type %ModWith.WithSelf.Op.type, %ModWith.facet [symbolic = %.loc170_5.6 (constants.%.100)] +// CHECK:STDOUT: %impl.elem1.loc170_5.2: @ModWith.loc168.%.loc170_5.6 (%.100) = impl_witness_access %ModWith.lookup_impl_witness.loc170, element1 [symbolic = %impl.elem1.loc170_5.2 (constants.%impl.elem1.b51)] +// CHECK:STDOUT: %specific_impl_fn.loc170_5.2: = specific_impl_function %impl.elem1.loc170_5.2, @ModWith.WithSelf.Op(%U.as_type.loc167_35.1, %ModWith.facet) [symbolic = %specific_impl_fn.loc170_5.2 (constants.%specific_impl_fn.6e9)] +// CHECK:STDOUT: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%result.param: @ModWith.loc168.%Result.as_type.loc167_53.1 (%Result.as_type), %x.param: @ModWith.loc168.%T.as_type.loc168_29.1 (%T.as_type.8ce), %y.param: @ModWith.loc168.%U.as_type.loc167_35.1 (%U.as_type.b61)) { +// CHECK:STDOUT: fn(%result.param: @ModWith.loc168.%Result.as_type.loc167_53.1 (%Result.as_type), %x.param: @ModWith.loc168.%T.as_type.loc168_29.1 (%T.as_type.73e), %y.param: @ModWith.loc168.%U.as_type.loc167_35.1 (%U.as_type.0bd)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @ModWith.loc168.%T.as_type.loc168_29.1 (%T.as_type.8ce) = name_ref x, %x -// CHECK:STDOUT: %y.ref: @ModWith.loc168.%U.as_type.loc167_35.1 (%U.as_type.b61) = name_ref y, %y -// CHECK:STDOUT: %ModWith.type.loc170: type = facet_type <@ModWith.1, @ModWith.1(constants.%U.as_type.b61)> [symbolic = %ModWith.type.loc167_35.1 (constants.%ModWith.type.475)] -// CHECK:STDOUT: %.loc170_5.1: @ModWith.loc168.%ModWith.assoc_type (%ModWith.assoc_type.85f) = specific_constant imports.%Core.import_ref.ea5, @ModWith.WithSelf(constants.%U.as_type.b61, constants.%Self.c18) [symbolic = %assoc1 (constants.%assoc1.a6b)] -// CHECK:STDOUT: %Op.ref: @ModWith.loc168.%ModWith.assoc_type (%ModWith.assoc_type.85f) = name_ref Op, %.loc170_5.1 [symbolic = %assoc1 (constants.%assoc1.a6b)] -// CHECK:STDOUT: %impl.elem1.loc170_5.1: @ModWith.loc168.%.loc170_5.6 (%.c4c) = impl_witness_access constants.%ModWith.lookup_impl_witness.8e1, element1 [symbolic = %impl.elem1.loc170_5.2 (constants.%impl.elem1.789)] +// CHECK:STDOUT: %x.ref: @ModWith.loc168.%T.as_type.loc168_29.1 (%T.as_type.73e) = name_ref x, %x +// CHECK:STDOUT: %y.ref: @ModWith.loc168.%U.as_type.loc167_35.1 (%U.as_type.0bd) = name_ref y, %y +// CHECK:STDOUT: %ModWith.type.loc170: type = facet_type <@ModWith.1, @ModWith.1(constants.%U.as_type.0bd)> [symbolic = %ModWith.type.loc167_35.1 (constants.%ModWith.type.68a)] +// CHECK:STDOUT: %.loc170_5.1: @ModWith.loc168.%ModWith.assoc_type (%ModWith.assoc_type.9c3) = specific_constant imports.%Core.import_ref.ea5e3, @ModWith.WithSelf(constants.%U.as_type.0bd, constants.%Self.c18) [symbolic = %assoc1 (constants.%assoc1.3d6)] +// CHECK:STDOUT: %Op.ref: @ModWith.loc168.%ModWith.assoc_type (%ModWith.assoc_type.9c3) = name_ref Op, %.loc170_5.1 [symbolic = %assoc1 (constants.%assoc1.3d6)] +// CHECK:STDOUT: %impl.elem1.loc170_5.1: @ModWith.loc168.%.loc170_5.6 (%.100) = impl_witness_access constants.%ModWith.lookup_impl_witness.c4b, element1 [symbolic = %impl.elem1.loc170_5.2 (constants.%impl.elem1.b51)] // CHECK:STDOUT: %bound_method.loc170_5.1: = bound_method %x.ref, %impl.elem1.loc170_5.1 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.1: = specific_impl_function %impl.elem1.loc170_5.1, @ModWith.WithSelf.Op(constants.%U.as_type.b61, constants.%ModWith.facet.204) [symbolic = %specific_impl_fn.loc170_5.3 (constants.%specific_impl_fn.87e)] +// CHECK:STDOUT: %specific_impl_fn.loc170_5.1: = specific_impl_function %impl.elem1.loc170_5.1, @ModWith.WithSelf.Op(constants.%U.as_type.0bd, constants.%ModWith.facet.297) [symbolic = %specific_impl_fn.loc170_5.2 (constants.%specific_impl_fn.6e9)] // CHECK:STDOUT: %bound_method.loc170_5.2: = bound_method %x.ref, %specific_impl_fn.loc170_5.1 // CHECK:STDOUT: %.loc170_5.2: ref @ModWith.loc168.%Result.as_type.loc167_53.1 (%Result.as_type) = temporary_storage // CHECK:STDOUT: %ModWith.WithSelf.Op.call: init @ModWith.loc168.%Result.as_type.loc167_53.1 (%Result.as_type) to %.loc170_5.2 = call %bound_method.loc170_5.2(%x.ref, %y.ref) // CHECK:STDOUT: %.loc170_5.3: ref @ModWith.loc168.%Result.as_type.loc167_53.1 (%Result.as_type) = temporary %.loc170_5.2, %ModWith.WithSelf.Op.call -// CHECK:STDOUT: %impl.elem2.loc170_5.1: @ModWith.loc168.%.loc170_5.7 (%.f0c) = impl_witness_access constants.%Destroy.lookup_impl_witness.dfb4c4.2, element2 [symbolic = %impl.elem2.loc170_5.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc170_5.3: = bound_method %.loc170_5.3, %impl.elem2.loc170_5.1 // CHECK:STDOUT: %.loc170_5.4: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc165_9.1 (constants.%Result)] // CHECK:STDOUT: %.loc170_5.5: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc165_9.1 (constants.%Result)] -// CHECK:STDOUT: %specific_impl_fn.loc170_5.2: = specific_impl_function %impl.elem2.loc170_5.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Result) [symbolic = %specific_impl_fn.loc170_5.4 (constants.%specific_impl_fn.6f9)] -// CHECK:STDOUT: %bound_method.loc170_5.4: = bound_method %.loc170_5.3, %specific_impl_fn.loc170_5.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc170_5.4(%.loc170_5.3) +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc170_5.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -2005,246 +1962,239 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TestNegate(%Result.loc292_9.2: %Destroy.type, %T.loc293_4.2: @TestNegate.%facet_type (%facet_type.352)) { +// CHECK:STDOUT: generic fn @TestNegate(%Result.loc292_9.2: %Destroy.type, %T.loc293_4.2: @TestNegate.%facet_type (%facet_type.86f)) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Negate.lookup_impl_witness: = lookup_impl_witness %T.loc293_4.1, @Negate [symbolic = %Negate.lookup_impl_witness (constants.%Negate.lookup_impl_witness.218)] -// CHECK:STDOUT: %Negate.facet.loc296_3.3: %Negate.type = facet_value %T.as_type.loc294_24.1, (%Negate.lookup_impl_witness) [symbolic = %Negate.facet.loc296_3.3 (constants.%Negate.facet.5e5)] -// CHECK:STDOUT: %Negate.WithSelf.Op.type: type = fn_type @Negate.WithSelf.Op, @Negate.WithSelf(%Negate.facet.loc296_3.3) [symbolic = %Negate.WithSelf.Op.type (constants.%Negate.WithSelf.Op.type.d06)] -// CHECK:STDOUT: %.loc296_3.7: type = fn_type_with_self_type %Negate.WithSelf.Op.type, %Negate.facet.loc296_3.3 [symbolic = %.loc296_3.7 (constants.%.5a7)] -// CHECK:STDOUT: %impl.elem1.loc296_3.2: @TestNegate.%.loc296_3.7 (%.5a7) = impl_witness_access %Negate.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc296_3.2 (constants.%impl.elem1.e2e)] -// CHECK:STDOUT: %specific_impl_fn.loc296_3.3: = specific_impl_function %impl.elem1.loc296_3.2, @Negate.WithSelf.Op(%Negate.facet.loc296_3.3) [symbolic = %specific_impl_fn.loc296_3.3 (constants.%specific_impl_fn.0c8)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Result.loc292_9.1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.869b78.2)] -// CHECK:STDOUT: %.loc296_3.8: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %Result.loc292_9.1 [symbolic = %.loc296_3.8 (constants.%.f0c)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Result.loc292_9.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.dfb4c4.2)] -// CHECK:STDOUT: %impl.elem2.loc296_3.2: @TestNegate.%.loc296_3.8 (%.f0c) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc296_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %specific_impl_fn.loc296_3.4: = specific_impl_function %impl.elem2.loc296_3.2, @Destroy.WithSelf.SelfDestruct.1(%Result.loc292_9.1) [symbolic = %specific_impl_fn.loc296_3.4 (constants.%specific_impl_fn.6f9)] +// CHECK:STDOUT: %Negate.lookup_impl_witness: = lookup_impl_witness %T.loc293_4.1, @Negate [symbolic = %Negate.lookup_impl_witness (constants.%Negate.lookup_impl_witness.75a)] +// CHECK:STDOUT: %Negate.facet.loc296_3.3: %Negate.type = facet_value %T.as_type.loc294_24.1, (%Negate.lookup_impl_witness) [symbolic = %Negate.facet.loc296_3.3 (constants.%Negate.facet.b7e)] +// CHECK:STDOUT: %Negate.WithSelf.Op.type: type = fn_type @Negate.WithSelf.Op, @Negate.WithSelf(%Negate.facet.loc296_3.3) [symbolic = %Negate.WithSelf.Op.type (constants.%Negate.WithSelf.Op.type.4d1)] +// CHECK:STDOUT: %.loc296_3.7: type = fn_type_with_self_type %Negate.WithSelf.Op.type, %Negate.facet.loc296_3.3 [symbolic = %.loc296_3.7 (constants.%.70d)] +// CHECK:STDOUT: %impl.elem1.loc296_3.2: @TestNegate.%.loc296_3.7 (%.70d) = impl_witness_access %Negate.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc296_3.2 (constants.%impl.elem1.466)] +// CHECK:STDOUT: %specific_impl_fn.loc296_3.2: = specific_impl_function %impl.elem1.loc296_3.2, @Negate.WithSelf.Op(%Negate.facet.loc296_3.3) [symbolic = %specific_impl_fn.loc296_3.2 (constants.%specific_impl_fn.9ba)] +// CHECK:STDOUT: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%y.param: @TestNegate.%Result.as_type.loc293_49.1 (%Result.as_type), %x.param: @TestNegate.%T.as_type.loc294_24.1 (%T.as_type.684)) { +// CHECK:STDOUT: fn(%y.param: @TestNegate.%Result.as_type.loc293_49.1 (%Result.as_type), %x.param: @TestNegate.%T.as_type.loc294_24.1 (%T.as_type.735)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @TestNegate.%T.as_type.loc294_24.1 (%T.as_type.684) = name_ref x, %x -// CHECK:STDOUT: %impl.elem1.loc296_3.1: @TestNegate.%.loc296_3.7 (%.5a7) = impl_witness_access constants.%Negate.lookup_impl_witness.218, element1 [symbolic = %impl.elem1.loc296_3.2 (constants.%impl.elem1.e2e)] +// CHECK:STDOUT: %x.ref: @TestNegate.%T.as_type.loc294_24.1 (%T.as_type.735) = name_ref x, %x +// CHECK:STDOUT: %impl.elem1.loc296_3.1: @TestNegate.%.loc296_3.7 (%.70d) = impl_witness_access constants.%Negate.lookup_impl_witness.75a, element1 [symbolic = %impl.elem1.loc296_3.2 (constants.%impl.elem1.466)] // CHECK:STDOUT: %bound_method.loc296_3.1: = bound_method %x.ref, %impl.elem1.loc296_3.1 -// CHECK:STDOUT: %Negate.facet.loc296_3.1: %Negate.type = facet_value constants.%T.as_type.684, (constants.%Negate.lookup_impl_witness.218) [symbolic = %Negate.facet.loc296_3.3 (constants.%Negate.facet.5e5)] -// CHECK:STDOUT: %.loc296_3.1: %Negate.type = converted constants.%T.as_type.684, %Negate.facet.loc296_3.1 [symbolic = %Negate.facet.loc296_3.3 (constants.%Negate.facet.5e5)] -// CHECK:STDOUT: %Negate.facet.loc296_3.2: %Negate.type = facet_value constants.%T.as_type.684, (constants.%Negate.lookup_impl_witness.218) [symbolic = %Negate.facet.loc296_3.3 (constants.%Negate.facet.5e5)] -// CHECK:STDOUT: %.loc296_3.2: %Negate.type = converted constants.%T.as_type.684, %Negate.facet.loc296_3.2 [symbolic = %Negate.facet.loc296_3.3 (constants.%Negate.facet.5e5)] -// CHECK:STDOUT: %specific_impl_fn.loc296_3.1: = specific_impl_function %impl.elem1.loc296_3.1, @Negate.WithSelf.Op(constants.%Negate.facet.5e5) [symbolic = %specific_impl_fn.loc296_3.3 (constants.%specific_impl_fn.0c8)] +// CHECK:STDOUT: %Negate.facet.loc296_3.1: %Negate.type = facet_value constants.%T.as_type.735, (constants.%Negate.lookup_impl_witness.75a) [symbolic = %Negate.facet.loc296_3.3 (constants.%Negate.facet.b7e)] +// CHECK:STDOUT: %.loc296_3.1: %Negate.type = converted constants.%T.as_type.735, %Negate.facet.loc296_3.1 [symbolic = %Negate.facet.loc296_3.3 (constants.%Negate.facet.b7e)] +// CHECK:STDOUT: %Negate.facet.loc296_3.2: %Negate.type = facet_value constants.%T.as_type.735, (constants.%Negate.lookup_impl_witness.75a) [symbolic = %Negate.facet.loc296_3.3 (constants.%Negate.facet.b7e)] +// CHECK:STDOUT: %.loc296_3.2: %Negate.type = converted constants.%T.as_type.735, %Negate.facet.loc296_3.2 [symbolic = %Negate.facet.loc296_3.3 (constants.%Negate.facet.b7e)] +// CHECK:STDOUT: %specific_impl_fn.loc296_3.1: = specific_impl_function %impl.elem1.loc296_3.1, @Negate.WithSelf.Op(constants.%Negate.facet.b7e) [symbolic = %specific_impl_fn.loc296_3.2 (constants.%specific_impl_fn.9ba)] // CHECK:STDOUT: %bound_method.loc296_3.2: = bound_method %x.ref, %specific_impl_fn.loc296_3.1 // CHECK:STDOUT: %.loc296_3.3: ref @TestNegate.%Result.as_type.loc293_49.1 (%Result.as_type) = temporary_storage // CHECK:STDOUT: %Negate.WithSelf.Op.call: init @TestNegate.%Result.as_type.loc293_49.1 (%Result.as_type) to %.loc296_3.3 = call %bound_method.loc296_3.2(%x.ref) // CHECK:STDOUT: %.loc296_3.4: ref @TestNegate.%Result.as_type.loc293_49.1 (%Result.as_type) = temporary %.loc296_3.3, %Negate.WithSelf.Op.call -// CHECK:STDOUT: %impl.elem2.loc296_3.1: @TestNegate.%.loc296_3.8 (%.f0c) = impl_witness_access constants.%Destroy.lookup_impl_witness.dfb4c4.2, element2 [symbolic = %impl.elem2.loc296_3.2 (constants.%impl.elem2)] -// CHECK:STDOUT: %bound_method.loc296_3.3: = bound_method %.loc296_3.4, %impl.elem2.loc296_3.1 // CHECK:STDOUT: %.loc296_3.5: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc292_9.1 (constants.%Result)] // CHECK:STDOUT: %.loc296_3.6: %Destroy.type = converted constants.%Result.as_type, constants.%Result [symbolic = %Result.loc292_9.1 (constants.%Result)] -// CHECK:STDOUT: %specific_impl_fn.loc296_3.2: = specific_impl_function %impl.elem2.loc296_3.1, @Destroy.WithSelf.SelfDestruct.1(constants.%Result) [symbolic = %specific_impl_fn.loc296_3.4 (constants.%specific_impl_fn.6f9)] -// CHECK:STDOUT: %bound_method.loc296_3.4: = bound_method %.loc296_3.4, %specific_impl_fn.loc296_3.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method.loc296_3.4(%.loc296_3.4) +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc296_3.4) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.loc124(constants.%Result, constants.%U.f40, constants.%T.dd6) { +// CHECK:STDOUT: specific @AddWith.loc124(constants.%Result, constants.%U.e1f, constants.%T.21f) { // CHECK:STDOUT: %Result.patt.loc121_9.2 => constants.%Result.patt // CHECK:STDOUT: %Result.loc121_9.1 => constants.%Result -// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc122_4.1 => constants.%U.f40 -// CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%U.as_type.b61 -// CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.d58 -// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.f36 -// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.03f -// CHECK:STDOUT: %require_complete.loc123 => constants.%require_complete.621 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.464 -// CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.964 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.a1a -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.99b -// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.e85 +// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc122_4.1 => constants.%U.e1f +// CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%U.as_type.0bd +// CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.4f5 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.4f5 +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.136 +// CHECK:STDOUT: %require_complete.loc123 => constants.%require_complete.528878.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.034 +// CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.71f +// CHECK:STDOUT: %assoc0 => constants.%assoc0.155 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.0f3 +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.1cd // CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Result.as_type -// CHECK:STDOUT: %.Self => constants.%.Self.787 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.405 -// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.f14 -// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.660 -// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.6b8 -// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.0a9 -// CHECK:STDOUT: %T.loc123_4.1 => constants.%T.dd6 -// CHECK:STDOUT: %pattern_type.loc124_16 => constants.%pattern_type.f4e485.2 -// CHECK:STDOUT: %result.param_patt.loc124_16.2 => constants.%result.param_patt.6ba -// CHECK:STDOUT: %result.patt.loc124_16.2 => constants.%result.patt.c73b2c.1 -// CHECK:STDOUT: %T.as_type.loc124_29.1 => constants.%T.as_type.fe6 -// CHECK:STDOUT: %pattern_type.loc124_27 => constants.%pattern_type.0df -// CHECK:STDOUT: %x.param_patt.loc124_27.2 => constants.%x.param_patt.018 -// CHECK:STDOUT: %x.patt.loc124_27.2 => constants.%x.patt.3b5 -// CHECK:STDOUT: %pattern_type.loc124_33 => constants.%pattern_type.753 -// CHECK:STDOUT: %y.param_patt.loc124_33.2 => constants.%y.param_patt.740 -// CHECK:STDOUT: %y.patt.loc124_33.2 => constants.%y.patt.603 +// CHECK:STDOUT: %.Self => constants.%.Self.354 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.ab5 +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.2c2 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.c17 +// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.fef +// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.910 +// CHECK:STDOUT: %T.loc123_4.1 => constants.%T.21f +// CHECK:STDOUT: %pattern_type.loc124_16 => constants.%pattern_type.86a9db.1 +// CHECK:STDOUT: %result.param_patt.loc124_16.2 => constants.%result.param_patt.f86 +// CHECK:STDOUT: %result.patt.loc124_16.2 => constants.%result.patt.a71562.1 +// CHECK:STDOUT: %T.as_type.loc124_29.1 => constants.%T.as_type.d2e +// CHECK:STDOUT: %pattern_type.loc124_27 => constants.%pattern_type.fab +// CHECK:STDOUT: %x.param_patt.loc124_27.2 => constants.%x.param_patt.947 +// CHECK:STDOUT: %x.patt.loc124_27.2 => constants.%x.patt.edd +// CHECK:STDOUT: %pattern_type.loc124_33 => constants.%pattern_type.eff +// CHECK:STDOUT: %y.param_patt.loc124_33.2 => constants.%y.param_patt.8c7 +// CHECK:STDOUT: %y.patt.loc124_33.2 => constants.%y.patt.b5a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SubWith.loc135(constants.%Result, constants.%U.f40, constants.%T.34f) { +// CHECK:STDOUT: specific @SubWith.loc135(constants.%Result, constants.%U.e1f, constants.%T.3c5) { // CHECK:STDOUT: %Result.patt.loc132_9.2 => constants.%Result.patt // CHECK:STDOUT: %Result.loc132_9.1 => constants.%Result -// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc133_4.1 => constants.%U.f40 -// CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%U.as_type.b61 -// CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.d62 -// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.e74 -// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.d95 -// CHECK:STDOUT: %require_complete.loc134 => constants.%require_complete.a5f -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.319 -// CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.378 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.7c6 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.d59 -// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.68a +// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc133_4.1 => constants.%U.e1f +// CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%U.as_type.0bd +// CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.769 +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.769 +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.b13 +// CHECK:STDOUT: %require_complete.loc134 => constants.%require_complete.49f499.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.d1e +// CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.5f0 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.a5d +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.fe8 +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.7da // CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Result.as_type -// CHECK:STDOUT: %.Self => constants.%.Self.f1c -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.e7f -// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.a1a -// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.ba3 -// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.500 -// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.3ed -// CHECK:STDOUT: %T.loc134_4.1 => constants.%T.34f -// CHECK:STDOUT: %pattern_type.loc135_16 => constants.%pattern_type.f4e485.2 -// CHECK:STDOUT: %result.param_patt.loc135_16.2 => constants.%result.param_patt.6ba -// CHECK:STDOUT: %result.patt.loc135_16.2 => constants.%result.patt.c73b2c.1 -// CHECK:STDOUT: %T.as_type.loc135_29.1 => constants.%T.as_type.dfc -// CHECK:STDOUT: %pattern_type.loc135_27 => constants.%pattern_type.c9e -// CHECK:STDOUT: %x.param_patt.loc135_27.2 => constants.%x.param_patt.bd1 -// CHECK:STDOUT: %x.patt.loc135_27.2 => constants.%x.patt.684 -// CHECK:STDOUT: %pattern_type.loc135_33 => constants.%pattern_type.753 -// CHECK:STDOUT: %y.param_patt.loc135_33.2 => constants.%y.param_patt.740 -// CHECK:STDOUT: %y.patt.loc135_33.2 => constants.%y.patt.603 +// CHECK:STDOUT: %.Self => constants.%.Self.4de +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.354 +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.3dc +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.0a9 +// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.a14 +// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.51b +// CHECK:STDOUT: %T.loc134_4.1 => constants.%T.3c5 +// CHECK:STDOUT: %pattern_type.loc135_16 => constants.%pattern_type.86a9db.1 +// CHECK:STDOUT: %result.param_patt.loc135_16.2 => constants.%result.param_patt.f86 +// CHECK:STDOUT: %result.patt.loc135_16.2 => constants.%result.patt.a71562.1 +// CHECK:STDOUT: %T.as_type.loc135_29.1 => constants.%T.as_type.4b7 +// CHECK:STDOUT: %pattern_type.loc135_27 => constants.%pattern_type.ca3 +// CHECK:STDOUT: %x.param_patt.loc135_27.2 => constants.%x.param_patt.10b +// CHECK:STDOUT: %x.patt.loc135_27.2 => constants.%x.patt.7cd +// CHECK:STDOUT: %pattern_type.loc135_33 => constants.%pattern_type.eff +// CHECK:STDOUT: %y.param_patt.loc135_33.2 => constants.%y.param_patt.8c7 +// CHECK:STDOUT: %y.patt.loc135_33.2 => constants.%y.patt.b5a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MulWith.loc146(constants.%Result, constants.%U.f40, constants.%T.961) { +// CHECK:STDOUT: specific @MulWith.loc146(constants.%Result, constants.%U.e1f, constants.%T.d03) { // CHECK:STDOUT: %Result.patt.loc143_9.2 => constants.%Result.patt // CHECK:STDOUT: %Result.loc143_9.1 => constants.%Result -// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc144_4.1 => constants.%U.f40 -// CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%U.as_type.b61 -// CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.5c9 -// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.945 -// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.10d -// CHECK:STDOUT: %require_complete.loc145 => constants.%require_complete.264 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f69 -// CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.1d7 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.78b -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.fa1 -// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.095 +// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc144_4.1 => constants.%U.e1f +// CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%U.as_type.0bd +// CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.b0b +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.b0b +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.a62 +// CHECK:STDOUT: %require_complete.loc145 => constants.%require_complete.8389d3.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.bd3 +// CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.2e5 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.e89 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.136 +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.16c // CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Result.as_type -// CHECK:STDOUT: %.Self => constants.%.Self.cb0 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.1ff -// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.ad0 -// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.9c7 -// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.112 -// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.9e1 -// CHECK:STDOUT: %T.loc145_4.1 => constants.%T.961 -// CHECK:STDOUT: %pattern_type.loc146_16 => constants.%pattern_type.f4e485.2 -// CHECK:STDOUT: %result.param_patt.loc146_16.2 => constants.%result.param_patt.6ba -// CHECK:STDOUT: %result.patt.loc146_16.2 => constants.%result.patt.c73b2c.1 -// CHECK:STDOUT: %T.as_type.loc146_29.1 => constants.%T.as_type.521 -// CHECK:STDOUT: %pattern_type.loc146_27 => constants.%pattern_type.3f7 -// CHECK:STDOUT: %x.param_patt.loc146_27.2 => constants.%x.param_patt.a5b -// CHECK:STDOUT: %x.patt.loc146_27.2 => constants.%x.patt.eae -// CHECK:STDOUT: %pattern_type.loc146_33 => constants.%pattern_type.753 -// CHECK:STDOUT: %y.param_patt.loc146_33.2 => constants.%y.param_patt.740 -// CHECK:STDOUT: %y.patt.loc146_33.2 => constants.%y.patt.603 +// CHECK:STDOUT: %.Self => constants.%.Self.a44 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.ced +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.0e8 +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.a5f +// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.3ab +// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.170 +// CHECK:STDOUT: %T.loc145_4.1 => constants.%T.d03 +// CHECK:STDOUT: %pattern_type.loc146_16 => constants.%pattern_type.86a9db.1 +// CHECK:STDOUT: %result.param_patt.loc146_16.2 => constants.%result.param_patt.f86 +// CHECK:STDOUT: %result.patt.loc146_16.2 => constants.%result.patt.a71562.1 +// CHECK:STDOUT: %T.as_type.loc146_29.1 => constants.%T.as_type.639 +// CHECK:STDOUT: %pattern_type.loc146_27 => constants.%pattern_type.d7a +// CHECK:STDOUT: %x.param_patt.loc146_27.2 => constants.%x.param_patt.1c9 +// CHECK:STDOUT: %x.patt.loc146_27.2 => constants.%x.patt.080 +// CHECK:STDOUT: %pattern_type.loc146_33 => constants.%pattern_type.eff +// CHECK:STDOUT: %y.param_patt.loc146_33.2 => constants.%y.param_patt.8c7 +// CHECK:STDOUT: %y.patt.loc146_33.2 => constants.%y.patt.b5a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DivWith.loc157(constants.%Result, constants.%U.f40, constants.%T.d59) { +// CHECK:STDOUT: specific @DivWith.loc157(constants.%Result, constants.%U.e1f, constants.%T.942) { // CHECK:STDOUT: %Result.patt.loc154_9.2 => constants.%Result.patt // CHECK:STDOUT: %Result.loc154_9.1 => constants.%Result -// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc155_4.1 => constants.%U.f40 -// CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%U.as_type.b61 -// CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.e82 -// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.084 -// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.8e5 -// CHECK:STDOUT: %require_complete.loc156 => constants.%require_complete.1ee -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.379 -// CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.248 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.b46 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.cd9 -// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.76b +// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc155_4.1 => constants.%U.e1f +// CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%U.as_type.0bd +// CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.71d +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.71d +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.575 +// CHECK:STDOUT: %require_complete.loc156 => constants.%require_complete.c4013f.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.a77 +// CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.e65 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.48a +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.d5d +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.e77 // CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Result.as_type -// CHECK:STDOUT: %.Self => constants.%.Self.f43 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.f1e -// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.bba -// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.89a -// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.658 -// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.506 -// CHECK:STDOUT: %T.loc156_4.1 => constants.%T.d59 -// CHECK:STDOUT: %pattern_type.loc157_16 => constants.%pattern_type.f4e485.2 -// CHECK:STDOUT: %result.param_patt.loc157_16.2 => constants.%result.param_patt.6ba -// CHECK:STDOUT: %result.patt.loc157_16.2 => constants.%result.patt.c73b2c.1 -// CHECK:STDOUT: %T.as_type.loc157_29.1 => constants.%T.as_type.881 -// CHECK:STDOUT: %pattern_type.loc157_27 => constants.%pattern_type.a65 -// CHECK:STDOUT: %x.param_patt.loc157_27.2 => constants.%x.param_patt.8e8 -// CHECK:STDOUT: %x.patt.loc157_27.2 => constants.%x.patt.d40 -// CHECK:STDOUT: %pattern_type.loc157_33 => constants.%pattern_type.753 -// CHECK:STDOUT: %y.param_patt.loc157_33.2 => constants.%y.param_patt.740 -// CHECK:STDOUT: %y.patt.loc157_33.2 => constants.%y.patt.603 +// CHECK:STDOUT: %.Self => constants.%.Self.c58 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.f1d +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.af2 +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.351 +// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.ae7 +// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.32b +// CHECK:STDOUT: %T.loc156_4.1 => constants.%T.942 +// CHECK:STDOUT: %pattern_type.loc157_16 => constants.%pattern_type.86a9db.1 +// CHECK:STDOUT: %result.param_patt.loc157_16.2 => constants.%result.param_patt.f86 +// CHECK:STDOUT: %result.patt.loc157_16.2 => constants.%result.patt.a71562.1 +// CHECK:STDOUT: %T.as_type.loc157_29.1 => constants.%T.as_type.6cf +// CHECK:STDOUT: %pattern_type.loc157_27 => constants.%pattern_type.c8a +// CHECK:STDOUT: %x.param_patt.loc157_27.2 => constants.%x.param_patt.795 +// CHECK:STDOUT: %x.patt.loc157_27.2 => constants.%x.patt.818 +// CHECK:STDOUT: %pattern_type.loc157_33 => constants.%pattern_type.eff +// CHECK:STDOUT: %y.param_patt.loc157_33.2 => constants.%y.param_patt.8c7 +// CHECK:STDOUT: %y.patt.loc157_33.2 => constants.%y.patt.b5a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ModWith.loc168(constants.%Result, constants.%U.f40, constants.%T.be8) { +// CHECK:STDOUT: specific @ModWith.loc168(constants.%Result, constants.%U.e1f, constants.%T.fdb) { // CHECK:STDOUT: %Result.patt.loc165_9.2 => constants.%Result.patt // CHECK:STDOUT: %Result.loc165_9.1 => constants.%Result -// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc166_4.1 => constants.%U.f40 -// CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%U.as_type.b61 -// CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.475 -// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.fd4 -// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.fe0 -// CHECK:STDOUT: %require_complete.loc167 => constants.%require_complete.8f0 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.78c -// CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.85f -// CHECK:STDOUT: %assoc0 => constants.%assoc0.bf1 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.448 -// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.043 +// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc166_4.1 => constants.%U.e1f +// CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%U.as_type.0bd +// CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.68a +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.68a +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.e0d +// CHECK:STDOUT: %require_complete.loc167 => constants.%require_complete.312803.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.01e +// CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.9c3 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.cb9 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.4ec +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.671 // CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Result.as_type -// CHECK:STDOUT: %.Self => constants.%.Self.dd1 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.4d5 -// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.cb3 -// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.247 -// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.c70 -// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.7fe -// CHECK:STDOUT: %T.loc167_4.1 => constants.%T.be8 -// CHECK:STDOUT: %pattern_type.loc168_16 => constants.%pattern_type.f4e485.2 -// CHECK:STDOUT: %result.param_patt.loc168_16.2 => constants.%result.param_patt.6ba -// CHECK:STDOUT: %result.patt.loc168_16.2 => constants.%result.patt.c73b2c.1 -// CHECK:STDOUT: %T.as_type.loc168_29.1 => constants.%T.as_type.8ce -// CHECK:STDOUT: %pattern_type.loc168_27 => constants.%pattern_type.5e2 -// CHECK:STDOUT: %x.param_patt.loc168_27.2 => constants.%x.param_patt.41c -// CHECK:STDOUT: %x.patt.loc168_27.2 => constants.%x.patt.2de -// CHECK:STDOUT: %pattern_type.loc168_33 => constants.%pattern_type.753 -// CHECK:STDOUT: %y.param_patt.loc168_33.2 => constants.%y.param_patt.740 -// CHECK:STDOUT: %y.patt.loc168_33.2 => constants.%y.patt.603 +// CHECK:STDOUT: %.Self => constants.%.Self.2c1 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.930 +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.e6d +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.938 +// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.b1e +// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.721 +// CHECK:STDOUT: %T.loc167_4.1 => constants.%T.fdb +// CHECK:STDOUT: %pattern_type.loc168_16 => constants.%pattern_type.86a9db.1 +// CHECK:STDOUT: %result.param_patt.loc168_16.2 => constants.%result.param_patt.f86 +// CHECK:STDOUT: %result.patt.loc168_16.2 => constants.%result.patt.a71562.1 +// CHECK:STDOUT: %T.as_type.loc168_29.1 => constants.%T.as_type.73e +// CHECK:STDOUT: %pattern_type.loc168_27 => constants.%pattern_type.70e +// CHECK:STDOUT: %x.param_patt.loc168_27.2 => constants.%x.param_patt.375 +// CHECK:STDOUT: %x.patt.loc168_27.2 => constants.%x.patt.f07 +// CHECK:STDOUT: %pattern_type.loc168_33 => constants.%pattern_type.eff +// CHECK:STDOUT: %y.param_patt.loc168_33.2 => constants.%y.param_patt.8c7 +// CHECK:STDOUT: %y.patt.loc168_33.2 => constants.%y.patt.b5a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.f58, constants.%Destroy.facet.f58, constants.%facet_value.1ca) { +// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.109, constants.%Destroy.facet.109, constants.%facet_value.b07) { // CHECK:STDOUT: %Result.patt.loc121_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.f58 -// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.f58 +// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.109 +// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.109 // CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int16 // CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.e4b -// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.067 -// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.30b -// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.cd3 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.bb1 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.e4b +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.ea9 +// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.f37bc8.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.ceb // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.86e // CHECK:STDOUT: %assoc0 => constants.%assoc0.30c -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.b71 -// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.0bf +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.e18 +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.de3 // CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int16 -// CHECK:STDOUT: %.Self => constants.%.Self.4c6 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.5df -// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.2cc -// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.754 -// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.9c4 -// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.96c -// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.1ca +// CHECK:STDOUT: %.Self => constants.%.Self.033 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.73e +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.08e +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.5b8 +// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.f83 +// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.056 +// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.b07 // CHECK:STDOUT: %pattern_type.loc124_16 => constants.%pattern_type.785 // CHECK:STDOUT: %result.param_patt.loc124_16.2 => constants.%result.param_patt.be6 // CHECK:STDOUT: %result.patt.loc124_16.2 => constants.%result.patt.a31 @@ -2260,44 +2210,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc124_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_27 => constants.%complete_type.2da // CHECK:STDOUT: %require_complete.loc124_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.f37 +// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.f37bc8.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.9bf // CHECK:STDOUT: %AddWith.lookup_impl_witness.loc126 => constants.%custom_witness.cba // CHECK:STDOUT: %AddWith.facet => constants.%AddWith.facet.2ce // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.4a0 // CHECK:STDOUT: %.loc126_5.6 => constants.%.7bc // CHECK:STDOUT: %impl.elem1.loc126_5.2 => constants.%Op.72717c.1 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.3 => constants.%Op.72717c.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.610 -// CHECK:STDOUT: %.loc126_5.7 => constants.%.348 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.1 -// CHECK:STDOUT: %impl.elem2.loc126_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %specific_impl_fn.loc126_5.2 => constants.%Op.72717c.1 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.72f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.f58, constants.%Destroy.facet.f58, constants.%facet_value.2c5) { +// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.109, constants.%Destroy.facet.109, constants.%facet_value.ca4) { // CHECK:STDOUT: %Result.patt.loc132_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.f58 -// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.f58 +// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.109 +// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.109 // CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int16 // CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.68d -// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.90f -// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.b1a -// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.067 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.917 +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.68d +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.0c9 +// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.8a2f63.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.471 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.dd6 // CHECK:STDOUT: %assoc0 => constants.%assoc0.dfb -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.135 -// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.1d6 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.379 +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.e78 // CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int16 -// CHECK:STDOUT: %.Self => constants.%.Self.565 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.dd3 -// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.f92 -// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.7bc -// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.f9a -// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.edb -// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.2c5 +// CHECK:STDOUT: %.Self => constants.%.Self.a10 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.c4d +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.22a +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.5db +// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.7bf +// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.f08 +// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.ca4 // CHECK:STDOUT: %pattern_type.loc135_16 => constants.%pattern_type.785 // CHECK:STDOUT: %result.param_patt.loc135_16.2 => constants.%result.param_patt.be6 // CHECK:STDOUT: %result.patt.loc135_16.2 => constants.%result.patt.a31 @@ -2313,44 +2259,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc135_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_27 => constants.%complete_type.2da // CHECK:STDOUT: %require_complete.loc135_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.8a2 +// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.8a2f63.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.ada // CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137 => constants.%custom_witness.354 // CHECK:STDOUT: %SubWith.facet => constants.%SubWith.facet.1ef // CHECK:STDOUT: %SubWith.WithSelf.Op.type => constants.%SubWith.WithSelf.Op.type.23f // CHECK:STDOUT: %.loc137_5.6 => constants.%.eed // CHECK:STDOUT: %impl.elem1.loc137_5.2 => constants.%Op.72717c.2 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.3 => constants.%Op.72717c.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.610 -// CHECK:STDOUT: %.loc137_5.7 => constants.%.348 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.1 -// CHECK:STDOUT: %impl.elem2.loc137_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %specific_impl_fn.loc137_5.2 => constants.%Op.72717c.2 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.72f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.f58, constants.%Destroy.facet.f58, constants.%facet_value.50a) { +// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.109, constants.%Destroy.facet.109, constants.%facet_value.3e5) { // CHECK:STDOUT: %Result.patt.loc143_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.f58 -// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.f58 +// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.109 +// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.109 // CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int16 // CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.f65 -// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.ab1 -// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.752 -// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.797 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.3c5 +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.f65 +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.aec +// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.8c670c.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.34d // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.4c3 // CHECK:STDOUT: %assoc0 => constants.%assoc0.6ec -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.25c -// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.c8f +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.94b +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.212 // CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int16 -// CHECK:STDOUT: %.Self => constants.%.Self.1e1 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.d39 -// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.979 -// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.e2b -// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.fbc -// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.d6f -// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.50a +// CHECK:STDOUT: %.Self => constants.%.Self.1e8 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.b4a +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.088 +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.1c9 +// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.2f6 +// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.e8a +// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.3e5 // CHECK:STDOUT: %pattern_type.loc146_16 => constants.%pattern_type.785 // CHECK:STDOUT: %result.param_patt.loc146_16.2 => constants.%result.param_patt.be6 // CHECK:STDOUT: %result.patt.loc146_16.2 => constants.%result.patt.a31 @@ -2366,44 +2308,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc146_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_27 => constants.%complete_type.2da // CHECK:STDOUT: %require_complete.loc146_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.8c6 +// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.8c670c.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.b14 // CHECK:STDOUT: %MulWith.lookup_impl_witness.loc148 => constants.%custom_witness.3c3 // CHECK:STDOUT: %MulWith.facet => constants.%MulWith.facet.d84 // CHECK:STDOUT: %MulWith.WithSelf.Op.type => constants.%MulWith.WithSelf.Op.type.131 // CHECK:STDOUT: %.loc148_5.6 => constants.%.010 // CHECK:STDOUT: %impl.elem1.loc148_5.2 => constants.%Op.72717c.3 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.3 => constants.%Op.72717c.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.610 -// CHECK:STDOUT: %.loc148_5.7 => constants.%.348 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.1 -// CHECK:STDOUT: %impl.elem2.loc148_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %specific_impl_fn.loc148_5.2 => constants.%Op.72717c.3 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.72f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.f58, constants.%Destroy.facet.f58, constants.%facet_value.d7d) { +// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.109, constants.%Destroy.facet.109, constants.%facet_value.318) { // CHECK:STDOUT: %Result.patt.loc154_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.f58 -// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.f58 +// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.109 +// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.109 // CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int16 // CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.b8a -// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.b64 -// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.797 -// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.ca5 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.b76 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.b8a +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.ff8 +// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.d99d66.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.2d9 // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.712 // CHECK:STDOUT: %assoc0 => constants.%assoc0.99c -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.60a -// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.431 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.483 +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.f9d // CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int16 -// CHECK:STDOUT: %.Self => constants.%.Self.315 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.147 -// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.17b -// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.f21 -// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.7ca -// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.905 -// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.d7d +// CHECK:STDOUT: %.Self => constants.%.Self.74d +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.afb +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.6cf +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.ee9 +// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.575 +// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.257 +// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.318 // CHECK:STDOUT: %pattern_type.loc157_16 => constants.%pattern_type.785 // CHECK:STDOUT: %result.param_patt.loc157_16.2 => constants.%result.param_patt.be6 // CHECK:STDOUT: %result.patt.loc157_16.2 => constants.%result.patt.a31 @@ -2419,44 +2357,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc157_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_27 => constants.%complete_type.2da // CHECK:STDOUT: %require_complete.loc157_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.d99 +// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.d99d66.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.fb6 // CHECK:STDOUT: %DivWith.lookup_impl_witness.loc159 => constants.%custom_witness.8d0 // CHECK:STDOUT: %DivWith.facet => constants.%DivWith.facet.4ad // CHECK:STDOUT: %DivWith.WithSelf.Op.type => constants.%DivWith.WithSelf.Op.type.edb // CHECK:STDOUT: %.loc159_5.6 => constants.%.b5e // CHECK:STDOUT: %impl.elem1.loc159_5.2 => constants.%Op.72717c.4 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.3 => constants.%Op.72717c.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.610 -// CHECK:STDOUT: %.loc159_5.7 => constants.%.348 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.1 -// CHECK:STDOUT: %impl.elem2.loc159_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %specific_impl_fn.loc159_5.2 => constants.%Op.72717c.4 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.72f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.f58, constants.%Destroy.facet.f58, constants.%facet_value.1d0) { +// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.109, constants.%Destroy.facet.109, constants.%facet_value.425) { // CHECK:STDOUT: %Result.patt.loc165_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.f58 -// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.f58 +// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.109 +// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.109 // CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int16 // CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.c67 -// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.2c9 -// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.7c6 -// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.300 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.c18 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.c67 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.13f +// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.7d80e1.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.cb4 // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.5f6 // CHECK:STDOUT: %assoc0 => constants.%assoc0.f04 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.49e -// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.042 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.0af +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.d91 // CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int16 -// CHECK:STDOUT: %.Self => constants.%.Self.7d4 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.c30 -// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.e30 -// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.76c -// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.976 -// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.2a9 -// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.1d0 +// CHECK:STDOUT: %.Self => constants.%.Self.71c +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.c2a +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.14c +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.fe4 +// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.330 +// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.5c0 +// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.425 // CHECK:STDOUT: %pattern_type.loc168_16 => constants.%pattern_type.785 // CHECK:STDOUT: %result.param_patt.loc168_16.2 => constants.%result.param_patt.be6 // CHECK:STDOUT: %result.patt.loc168_16.2 => constants.%result.patt.a31 @@ -2472,44 +2406,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc168_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_27 => constants.%complete_type.2da // CHECK:STDOUT: %require_complete.loc168_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.7d8 +// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.7d80e1.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.d19 // CHECK:STDOUT: %ModWith.lookup_impl_witness.loc170 => constants.%custom_witness.169 // CHECK:STDOUT: %ModWith.facet => constants.%ModWith.facet.ab1 // CHECK:STDOUT: %ModWith.WithSelf.Op.type => constants.%ModWith.WithSelf.Op.type.e29 // CHECK:STDOUT: %.loc170_5.6 => constants.%.d62 // CHECK:STDOUT: %impl.elem1.loc170_5.2 => constants.%Op.72717c.5 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.3 => constants.%Op.72717c.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.610 -// CHECK:STDOUT: %.loc170_5.7 => constants.%.348 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.1 -// CHECK:STDOUT: %impl.elem2.loc170_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %specific_impl_fn.loc170_5.2 => constants.%Op.72717c.5 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.72f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.f58, constants.%Destroy.facet.f03, constants.%facet_value.a7b) { +// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.109, constants.%Destroy.facet.1b4, constants.%facet_value.936) { // CHECK:STDOUT: %Result.patt.loc121_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.f58 -// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.f03 +// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.109 +// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.1b4 // CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%i16 // CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.2ed -// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.5ca -// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.97a -// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.696 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.fde +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.2ed +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.17a +// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.32de8b.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.8c1 // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.18f // CHECK:STDOUT: %assoc0 => constants.%assoc0.b7d -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.b4f -// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.f8a +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.03c +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.719 // CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int16 -// CHECK:STDOUT: %.Self => constants.%.Self.530 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.d3c -// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.5a1 -// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.653 -// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.100 -// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.781 -// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.a7b +// CHECK:STDOUT: %.Self => constants.%.Self.737 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.de0 +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.025 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.9dd +// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.b6f +// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.b9b +// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.936 // CHECK:STDOUT: %pattern_type.loc124_16 => constants.%pattern_type.785 // CHECK:STDOUT: %result.param_patt.loc124_16.2 => constants.%result.param_patt.be6 // CHECK:STDOUT: %result.patt.loc124_16.2 => constants.%result.patt.a31 @@ -2525,44 +2455,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc124_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_33 => constants.%complete_type.2da -// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.32d +// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.32de8b.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.e08 // CHECK:STDOUT: %AddWith.lookup_impl_witness.loc126 => constants.%custom_witness.b79 // CHECK:STDOUT: %AddWith.facet => constants.%AddWith.facet.11e // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.eb3 // CHECK:STDOUT: %.loc126_5.6 => constants.%.da8 -// CHECK:STDOUT: %impl.elem1.loc126_5.2 => constants.%Int16.Op.4dca31.2 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.3 => constants.%Int16.Op.4dca31.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.610 -// CHECK:STDOUT: %.loc126_5.7 => constants.%.348 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.1 -// CHECK:STDOUT: %impl.elem2.loc126_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %impl.elem1.loc126_5.2 => constants.%Int16.Op.4dca31.3 +// CHECK:STDOUT: %specific_impl_fn.loc126_5.2 => constants.%Int16.Op.4dca31.3 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.72f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.f58, constants.%Destroy.facet.f03, constants.%facet_value.b33) { +// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.109, constants.%Destroy.facet.1b4, constants.%facet_value.cc0) { // CHECK:STDOUT: %Result.patt.loc132_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.f58 -// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.f03 +// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.109 +// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.1b4 // CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%i16 // CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.606 -// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.79c -// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.ca4 -// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.00f -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.6d3 +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.606 +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.6eb +// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.75c188.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.fe6 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.9c3 // CHECK:STDOUT: %assoc0 => constants.%assoc0.f66 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.b85 -// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.09d +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.183 +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.cc9 // CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int16 -// CHECK:STDOUT: %.Self => constants.%.Self.869 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.06f -// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.0f8 -// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.cd5 -// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.223 -// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.bf8 -// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.b33 +// CHECK:STDOUT: %.Self => constants.%.Self.220 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.ebb +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.1b2 +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.1a3 +// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.8ce +// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.88b +// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.cc0 // CHECK:STDOUT: %pattern_type.loc135_16 => constants.%pattern_type.785 // CHECK:STDOUT: %result.param_patt.loc135_16.2 => constants.%result.param_patt.be6 // CHECK:STDOUT: %result.patt.loc135_16.2 => constants.%result.patt.a31 @@ -2578,44 +2504,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc135_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_33 => constants.%complete_type.2da -// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.75c +// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.75c188.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.144 // CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137 => constants.%custom_witness.1e8 // CHECK:STDOUT: %SubWith.facet => constants.%SubWith.facet.6fa // CHECK:STDOUT: %SubWith.WithSelf.Op.type => constants.%SubWith.WithSelf.Op.type.bb5 // CHECK:STDOUT: %.loc137_5.6 => constants.%.42a -// CHECK:STDOUT: %impl.elem1.loc137_5.2 => constants.%Int16.Op.4dca31.3 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.3 => constants.%Int16.Op.4dca31.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.610 -// CHECK:STDOUT: %.loc137_5.7 => constants.%.348 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.1 -// CHECK:STDOUT: %impl.elem2.loc137_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %impl.elem1.loc137_5.2 => constants.%Int16.Op.4dca31.4 +// CHECK:STDOUT: %specific_impl_fn.loc137_5.2 => constants.%Int16.Op.4dca31.4 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.72f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.f58, constants.%Destroy.facet.f03, constants.%facet_value.252) { +// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.109, constants.%Destroy.facet.1b4, constants.%facet_value.4ed) { // CHECK:STDOUT: %Result.patt.loc143_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.f58 -// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.f03 +// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.109 +// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.1b4 // CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%i16 // CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.1e2 -// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.aa5 -// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.44c -// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.38d -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.4d6 +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.1e2 +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.a99 +// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.a7adcd.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.6f1 // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.34c // CHECK:STDOUT: %assoc0 => constants.%assoc0.2d4 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.7e0 -// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.af1 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.7ca +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.c79 // CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int16 -// CHECK:STDOUT: %.Self => constants.%.Self.a43 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.4b9 -// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.b58 -// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.737 -// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.8fc -// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.9b5 -// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.252 +// CHECK:STDOUT: %.Self => constants.%.Self.c91 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.04e +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.0df +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.26b +// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.2a0 +// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.c4b +// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.4ed // CHECK:STDOUT: %pattern_type.loc146_16 => constants.%pattern_type.785 // CHECK:STDOUT: %result.param_patt.loc146_16.2 => constants.%result.param_patt.be6 // CHECK:STDOUT: %result.patt.loc146_16.2 => constants.%result.patt.a31 @@ -2631,44 +2553,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc146_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_33 => constants.%complete_type.2da -// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.a7a +// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.a7adcd.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.635 // CHECK:STDOUT: %MulWith.lookup_impl_witness.loc148 => constants.%custom_witness.e2b // CHECK:STDOUT: %MulWith.facet => constants.%MulWith.facet.8b1 // CHECK:STDOUT: %MulWith.WithSelf.Op.type => constants.%MulWith.WithSelf.Op.type.8f5 // CHECK:STDOUT: %.loc148_5.6 => constants.%.ecc -// CHECK:STDOUT: %impl.elem1.loc148_5.2 => constants.%Int16.Op.4dca31.4 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.3 => constants.%Int16.Op.4dca31.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.610 -// CHECK:STDOUT: %.loc148_5.7 => constants.%.348 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.1 -// CHECK:STDOUT: %impl.elem2.loc148_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %impl.elem1.loc148_5.2 => constants.%Int16.Op.4dca31.5 +// CHECK:STDOUT: %specific_impl_fn.loc148_5.2 => constants.%Int16.Op.4dca31.5 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.72f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.f58, constants.%Destroy.facet.f03, constants.%facet_value.d02) { +// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.109, constants.%Destroy.facet.1b4, constants.%facet_value.69b) { // CHECK:STDOUT: %Result.patt.loc154_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.f58 -// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.f03 +// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.109 +// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.1b4 // CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%i16 // CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.45d -// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.bf3 -// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.301 -// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.29f -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.b24 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.45d +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.52f +// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.d57eaf.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.8c0 // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.5a4 // CHECK:STDOUT: %assoc0 => constants.%assoc0.156 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.cfc -// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.ede +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.5df +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.967 // CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int16 -// CHECK:STDOUT: %.Self => constants.%.Self.53f -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.bca -// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.324 -// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.502 -// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.afa -// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.3d8 -// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.d02 +// CHECK:STDOUT: %.Self => constants.%.Self.327 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.851 +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.833 +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.cb9 +// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.264 +// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.19d +// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.69b // CHECK:STDOUT: %pattern_type.loc157_16 => constants.%pattern_type.785 // CHECK:STDOUT: %result.param_patt.loc157_16.2 => constants.%result.param_patt.be6 // CHECK:STDOUT: %result.patt.loc157_16.2 => constants.%result.patt.a31 @@ -2684,44 +2602,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc157_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_33 => constants.%complete_type.2da -// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.d57 +// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.d57eaf.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.444 // CHECK:STDOUT: %DivWith.lookup_impl_witness.loc159 => constants.%custom_witness.21db // CHECK:STDOUT: %DivWith.facet => constants.%DivWith.facet.57c // CHECK:STDOUT: %DivWith.WithSelf.Op.type => constants.%DivWith.WithSelf.Op.type.37a // CHECK:STDOUT: %.loc159_5.6 => constants.%.5a3 -// CHECK:STDOUT: %impl.elem1.loc159_5.2 => constants.%Int16.Op.4dca31.5 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.3 => constants.%Int16.Op.4dca31.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.610 -// CHECK:STDOUT: %.loc159_5.7 => constants.%.348 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.1 -// CHECK:STDOUT: %impl.elem2.loc159_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %impl.elem1.loc159_5.2 => constants.%Int16.Op.4dca31.6 +// CHECK:STDOUT: %specific_impl_fn.loc159_5.2 => constants.%Int16.Op.4dca31.6 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.72f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.f58, constants.%Destroy.facet.f03, constants.%facet_value.004) { +// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.109, constants.%Destroy.facet.1b4, constants.%facet_value.0fe) { // CHECK:STDOUT: %Result.patt.loc165_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.f58 -// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.f03 +// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.109 +// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.1b4 // CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%i16 // CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.104 -// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.740 -// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.0d4 -// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.3c9 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.1a0 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.104 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.b7c +// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.4d792a.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.e20 // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.0e9 // CHECK:STDOUT: %assoc0 => constants.%assoc0.92c -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.1a7 -// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.5b5 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.a99 +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.b94 // CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int16 -// CHECK:STDOUT: %.Self => constants.%.Self.060 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.05c -// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.341 -// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.cac -// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.8da -// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.b66 -// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.004 +// CHECK:STDOUT: %.Self => constants.%.Self.6a7 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.177 +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.d83 +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.70f +// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.4c3 +// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.cf6 +// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.0fe // CHECK:STDOUT: %pattern_type.loc168_16 => constants.%pattern_type.785 // CHECK:STDOUT: %result.param_patt.loc168_16.2 => constants.%result.param_patt.be6 // CHECK:STDOUT: %result.patt.loc168_16.2 => constants.%result.patt.a31 @@ -2737,44 +2651,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc168_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_33 => constants.%complete_type.2da -// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.4d7 +// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.4d792a.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.870 // CHECK:STDOUT: %ModWith.lookup_impl_witness.loc170 => constants.%custom_witness.6dd // CHECK:STDOUT: %ModWith.facet => constants.%ModWith.facet.f5a5 // CHECK:STDOUT: %ModWith.WithSelf.Op.type => constants.%ModWith.WithSelf.Op.type.374 // CHECK:STDOUT: %.loc170_5.6 => constants.%.52c1 -// CHECK:STDOUT: %impl.elem1.loc170_5.2 => constants.%Int16.Op.4dca31.6 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.3 => constants.%Int16.Op.4dca31.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.610 -// CHECK:STDOUT: %.loc170_5.7 => constants.%.348 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.1 -// CHECK:STDOUT: %impl.elem2.loc170_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 +// CHECK:STDOUT: %impl.elem1.loc170_5.2 => constants.%Int16.Op.4dca31.7 +// CHECK:STDOUT: %specific_impl_fn.loc170_5.2 => constants.%Int16.Op.4dca31.7 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.72f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.84d, constants.%Destroy.facet.84d, constants.%facet_value.bf4) { +// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.c63, constants.%Destroy.facet.c63, constants.%facet_value.15a) { // CHECK:STDOUT: %Result.patt.loc121_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int32 // CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.db7 -// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.5cd -// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.52a -// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.18d -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.988 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.db7 +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.bc4 +// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.758ea8.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.447 // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.be8 // CHECK:STDOUT: %assoc0 => constants.%assoc0.31c -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.3ac -// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.958 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.a9e +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.517 // CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.726 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.bcf -// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.953 -// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.030 -// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.c1b -// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.16ff -// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.bf4 +// CHECK:STDOUT: %.Self => constants.%.Self.6a9 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.f6c +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.a74 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.bf5 +// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.eea +// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.79b +// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.15a // CHECK:STDOUT: %pattern_type.loc124_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc124_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc124_16.2 => constants.%result.patt.47f @@ -2790,44 +2700,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc124_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.758 +// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.758ea8.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.86c // CHECK:STDOUT: %AddWith.lookup_impl_witness.loc126 => constants.%custom_witness.513476.1 // CHECK:STDOUT: %AddWith.facet => constants.%AddWith.facet.8f8 // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.4cf // CHECK:STDOUT: %.loc126_5.6 => constants.%.feb -// CHECK:STDOUT: %impl.elem1.loc126_5.2 => constants.%Int16.Op.4dca31.7 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.3 => constants.%Int16.Op.4dca31.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc126_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc126_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc126_5.2 => constants.%Int16.Op.4dca31.8 +// CHECK:STDOUT: %specific_impl_fn.loc126_5.2 => constants.%Int16.Op.4dca31.8 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.84d, constants.%Destroy.facet.84d, constants.%facet_value.436) { +// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.c63, constants.%Destroy.facet.c63, constants.%facet_value.771) { // CHECK:STDOUT: %Result.patt.loc132_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int32 // CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.120 -// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.393 -// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.36d -// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.8a6 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.88b +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.120 +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.faf +// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.46ea3c.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.ea6 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.dae // CHECK:STDOUT: %assoc0 => constants.%assoc0.fac -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.10e -// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.d88 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.c4f +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.b5a // CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.eac -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.0dc -// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.bb5a -// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.767 -// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.974 -// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.3c7 -// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.436 +// CHECK:STDOUT: %.Self => constants.%.Self.861 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.4cf +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.94c +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.b03 +// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.110 +// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.e31 +// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.771 // CHECK:STDOUT: %pattern_type.loc135_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc135_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc135_16.2 => constants.%result.patt.47f @@ -2843,44 +2749,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc135_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.46e +// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.46ea3c.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.147 // CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137 => constants.%custom_witness.32cef1.1 // CHECK:STDOUT: %SubWith.facet => constants.%SubWith.facet.0b0 // CHECK:STDOUT: %SubWith.WithSelf.Op.type => constants.%SubWith.WithSelf.Op.type.e1e // CHECK:STDOUT: %.loc137_5.6 => constants.%.988 -// CHECK:STDOUT: %impl.elem1.loc137_5.2 => constants.%Int16.Op.4dca31.8 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.3 => constants.%Int16.Op.4dca31.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc137_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc137_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc137_5.2 => constants.%Int16.Op.4dca31.9 +// CHECK:STDOUT: %specific_impl_fn.loc137_5.2 => constants.%Int16.Op.4dca31.9 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.84d, constants.%Destroy.facet.84d, constants.%facet_value.1b5) { +// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.c63, constants.%Destroy.facet.c63, constants.%facet_value.294) { // CHECK:STDOUT: %Result.patt.loc143_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int32 // CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.d67 -// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.ea6 -// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.95b -// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.8fe -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f47 +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.d67b +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.c7a +// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.920626.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.c47 // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.ab1 // CHECK:STDOUT: %assoc0 => constants.%assoc0.d0a -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.675 -// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.1de +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.ab5 +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.6ef // CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.44f -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.527 -// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.054 -// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.9d8 -// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.a89 -// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.144 -// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.1b5 +// CHECK:STDOUT: %.Self => constants.%.Self.cb9 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.4ca +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.311 +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.b52 +// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.f70 +// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.040 +// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.294 // CHECK:STDOUT: %pattern_type.loc146_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc146_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc146_16.2 => constants.%result.patt.47f @@ -2896,44 +2798,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc146_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.920 +// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.920626.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.349 // CHECK:STDOUT: %MulWith.lookup_impl_witness.loc148 => constants.%custom_witness.3a0675.1 // CHECK:STDOUT: %MulWith.facet => constants.%MulWith.facet.4b9 // CHECK:STDOUT: %MulWith.WithSelf.Op.type => constants.%MulWith.WithSelf.Op.type.8f2 -// CHECK:STDOUT: %.loc148_5.6 => constants.%.47a -// CHECK:STDOUT: %impl.elem1.loc148_5.2 => constants.%Int16.Op.4dca31.9 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.3 => constants.%Int16.Op.4dca31.9 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc148_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc148_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %.loc148_5.6 => constants.%.47a1 +// CHECK:STDOUT: %impl.elem1.loc148_5.2 => constants.%Int16.Op.4dca31.10 +// CHECK:STDOUT: %specific_impl_fn.loc148_5.2 => constants.%Int16.Op.4dca31.10 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.84d, constants.%Destroy.facet.84d, constants.%facet_value.f68) { +// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.c63, constants.%Destroy.facet.c63, constants.%facet_value.f37) { // CHECK:STDOUT: %Result.patt.loc154_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int32 // CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.5a1 -// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.821 -// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.3ed -// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.5bd -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.553 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.5a1 +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.057 +// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.348fba.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.cc3 // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.22f // CHECK:STDOUT: %assoc0 => constants.%assoc0.a9d -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.1af -// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.a46 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.ca2 +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.14b // CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.37d -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.7ae -// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.6c4 -// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.f48 -// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.4e6 -// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.def -// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.f68 +// CHECK:STDOUT: %.Self => constants.%.Self.208 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.0ac +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.437 +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.f29 +// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.3d3 +// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.db7 +// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.f37 // CHECK:STDOUT: %pattern_type.loc157_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc157_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc157_16.2 => constants.%result.patt.47f @@ -2949,44 +2847,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc157_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.348 +// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.348fba.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.004 // CHECK:STDOUT: %DivWith.lookup_impl_witness.loc159 => constants.%custom_witness.c32685.1 // CHECK:STDOUT: %DivWith.facet => constants.%DivWith.facet.5c5 // CHECK:STDOUT: %DivWith.WithSelf.Op.type => constants.%DivWith.WithSelf.Op.type.af3 // CHECK:STDOUT: %.loc159_5.6 => constants.%.836 -// CHECK:STDOUT: %impl.elem1.loc159_5.2 => constants.%Int16.Op.4dca31.10 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.3 => constants.%Int16.Op.4dca31.10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc159_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc159_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc159_5.2 => constants.%Int16.Op.4dca31.11 +// CHECK:STDOUT: %specific_impl_fn.loc159_5.2 => constants.%Int16.Op.4dca31.11 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.84d, constants.%Destroy.facet.84d, constants.%facet_value.46b) { +// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.c63, constants.%Destroy.facet.c63, constants.%facet_value.951) { // CHECK:STDOUT: %Result.patt.loc165_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int32 // CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.794 -// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.9c3 -// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.b38 -// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.0b7 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f01 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.794 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.813 +// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.cc95ce.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f4a // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.021 // CHECK:STDOUT: %assoc0 => constants.%assoc0.310 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.ac5 -// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.914 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.efb +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.e83 // CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.f60 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.9a9 -// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.522 -// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.115 -// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.393 -// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.be9 -// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.46b +// CHECK:STDOUT: %.Self => constants.%.Self.618 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.01c +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.3bb +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.3d9 +// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.f5f +// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.27e +// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.951 // CHECK:STDOUT: %pattern_type.loc168_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc168_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc168_16.2 => constants.%result.patt.47f @@ -3002,44 +2896,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc168_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.cc9 +// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.cc95ce.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.2eb // CHECK:STDOUT: %ModWith.lookup_impl_witness.loc170 => constants.%custom_witness.994c75.1 // CHECK:STDOUT: %ModWith.facet => constants.%ModWith.facet.cc5 // CHECK:STDOUT: %ModWith.WithSelf.Op.type => constants.%ModWith.WithSelf.Op.type.ab7 // CHECK:STDOUT: %.loc170_5.6 => constants.%.2a3 -// CHECK:STDOUT: %impl.elem1.loc170_5.2 => constants.%Int16.Op.4dca31.11 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.3 => constants.%Int16.Op.4dca31.11 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc170_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc170_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc170_5.2 => constants.%Int16.Op.4dca31.12 +// CHECK:STDOUT: %specific_impl_fn.loc170_5.2 => constants.%Int16.Op.4dca31.12 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.84d, constants.%Destroy.facet.f58, constants.%facet_value.e86) { +// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.c63, constants.%Destroy.facet.109, constants.%facet_value.dd9) { // CHECK:STDOUT: %Result.patt.loc121_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.f58 +// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.109 // CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int16 // CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.e4b -// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.067 -// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.30b -// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.cd3 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.bb1 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.e4b +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.ea9 +// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.f37bc8.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.ceb // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.86e // CHECK:STDOUT: %assoc0 => constants.%assoc0.30c -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.b71 -// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.0bf +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.e18 +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.de3 // CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.4c6 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.5df -// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.2cc -// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.788 -// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.dc6 -// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.0c1 -// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.e86 +// CHECK:STDOUT: %.Self => constants.%.Self.033 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.73e +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.08e +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.177 +// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.f16 +// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.4c6 +// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.dd9 // CHECK:STDOUT: %pattern_type.loc124_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc124_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc124_16.2 => constants.%result.patt.47f @@ -3055,44 +2945,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc124_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.f37 +// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.f37bc8.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.9bf // CHECK:STDOUT: %AddWith.lookup_impl_witness.loc126 => constants.%custom_witness.ea1 // CHECK:STDOUT: %AddWith.facet => constants.%AddWith.facet.b31 // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.faf // CHECK:STDOUT: %.loc126_5.6 => constants.%.fd6 -// CHECK:STDOUT: %impl.elem1.loc126_5.2 => constants.%Int32.Op.4dca31.1 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.3 => constants.%Int32.Op.4dca31.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc126_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc126_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc126_5.2 => constants.%Int32.Op.4dca31.2 +// CHECK:STDOUT: %specific_impl_fn.loc126_5.2 => constants.%Int32.Op.4dca31.2 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.84d, constants.%Destroy.facet.f58, constants.%facet_value.b78) { +// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.c63, constants.%Destroy.facet.109, constants.%facet_value.800) { // CHECK:STDOUT: %Result.patt.loc132_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.f58 +// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.109 // CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int16 // CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.68d -// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.90f -// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.b1a -// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.067 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.917 +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.68d +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.0c9 +// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.8a2f63.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.471 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.dd6 // CHECK:STDOUT: %assoc0 => constants.%assoc0.dfb -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.135 -// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.1d6 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.379 +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.e78 // CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.565 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.dd3 -// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.f92 -// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.1b0 -// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.6d5 -// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.282 -// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.b78 +// CHECK:STDOUT: %.Self => constants.%.Self.a10 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.c4d +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.22a +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.760 +// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.524 +// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.83d +// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.800 // CHECK:STDOUT: %pattern_type.loc135_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc135_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc135_16.2 => constants.%result.patt.47f @@ -3108,44 +2994,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc135_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.8a2 +// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.8a2f63.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.ada -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137 => constants.%custom_witness.576 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137 => constants.%custom_witness.576f // CHECK:STDOUT: %SubWith.facet => constants.%SubWith.facet.d30 // CHECK:STDOUT: %SubWith.WithSelf.Op.type => constants.%SubWith.WithSelf.Op.type.6e5 // CHECK:STDOUT: %.loc137_5.6 => constants.%.d1a -// CHECK:STDOUT: %impl.elem1.loc137_5.2 => constants.%Int32.Op.4dca31.2 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.3 => constants.%Int32.Op.4dca31.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc137_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc137_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc137_5.2 => constants.%Int32.Op.4dca31.3 +// CHECK:STDOUT: %specific_impl_fn.loc137_5.2 => constants.%Int32.Op.4dca31.3 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.84d, constants.%Destroy.facet.f58, constants.%facet_value.191) { +// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.c63, constants.%Destroy.facet.109, constants.%facet_value.b0b) { // CHECK:STDOUT: %Result.patt.loc143_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.f58 +// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.109 // CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int16 // CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.f65 -// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.ab1 -// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.752 -// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.797 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.3c5 +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.f65 +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.aec +// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.8c670c.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.34d // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.4c3 // CHECK:STDOUT: %assoc0 => constants.%assoc0.6ec -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.25c -// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.c8f +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.94b +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.212 // CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.1e1 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.d39 -// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.979 -// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.ccf -// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.d9e -// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.879 -// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.191 +// CHECK:STDOUT: %.Self => constants.%.Self.1e8 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.b4a +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.088 +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.1cc +// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.89d +// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.b89 +// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.b0b // CHECK:STDOUT: %pattern_type.loc146_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc146_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc146_16.2 => constants.%result.patt.47f @@ -3161,44 +3043,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc146_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.8c6 +// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.8c670c.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.b14 // CHECK:STDOUT: %MulWith.lookup_impl_witness.loc148 => constants.%custom_witness.751 // CHECK:STDOUT: %MulWith.facet => constants.%MulWith.facet.cd8 // CHECK:STDOUT: %MulWith.WithSelf.Op.type => constants.%MulWith.WithSelf.Op.type.31d // CHECK:STDOUT: %.loc148_5.6 => constants.%.ba7 -// CHECK:STDOUT: %impl.elem1.loc148_5.2 => constants.%Int32.Op.4dca31.3 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.3 => constants.%Int32.Op.4dca31.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc148_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc148_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc148_5.2 => constants.%Int32.Op.4dca31.4 +// CHECK:STDOUT: %specific_impl_fn.loc148_5.2 => constants.%Int32.Op.4dca31.4 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.84d, constants.%Destroy.facet.f58, constants.%facet_value.211) { +// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.c63, constants.%Destroy.facet.109, constants.%facet_value.9ed) { // CHECK:STDOUT: %Result.patt.loc154_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.f58 +// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.109 // CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int16 // CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.b8a -// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.b64 -// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.797 -// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.ca5 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.b76 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.b8a +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.ff8 +// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.d99d66.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.2d9 // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.712 // CHECK:STDOUT: %assoc0 => constants.%assoc0.99c -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.60a -// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.431 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.483 +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.f9d // CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.315 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.147 -// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.17b -// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.64f -// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.b6c -// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.731 -// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.211 +// CHECK:STDOUT: %.Self => constants.%.Self.74d +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.afb +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.6cf +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.8ff +// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.d01 +// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.832 +// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.9ed // CHECK:STDOUT: %pattern_type.loc157_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc157_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc157_16.2 => constants.%result.patt.47f @@ -3214,44 +3092,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc157_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.d99 +// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.d99d66.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.fb6 // CHECK:STDOUT: %DivWith.lookup_impl_witness.loc159 => constants.%custom_witness.9ad // CHECK:STDOUT: %DivWith.facet => constants.%DivWith.facet.d6b // CHECK:STDOUT: %DivWith.WithSelf.Op.type => constants.%DivWith.WithSelf.Op.type.b35 // CHECK:STDOUT: %.loc159_5.6 => constants.%.636 -// CHECK:STDOUT: %impl.elem1.loc159_5.2 => constants.%Int32.Op.4dca31.4 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.3 => constants.%Int32.Op.4dca31.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc159_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc159_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc159_5.2 => constants.%Int32.Op.4dca31.5 +// CHECK:STDOUT: %specific_impl_fn.loc159_5.2 => constants.%Int32.Op.4dca31.5 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.84d, constants.%Destroy.facet.f58, constants.%facet_value.09f) { +// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.c63, constants.%Destroy.facet.109, constants.%facet_value.87f) { // CHECK:STDOUT: %Result.patt.loc165_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.f58 +// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.109 // CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int16 // CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.c67 -// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.2c9 -// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.7c6 -// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.300 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.c18 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.c67 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.13f +// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.7d80e1.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.cb4 // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.5f6 // CHECK:STDOUT: %assoc0 => constants.%assoc0.f04 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.49e -// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.042 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.0af +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.d91 // CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.7d4 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.c30 -// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.e30 -// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.b31 -// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.df6 -// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.336 -// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.09f +// CHECK:STDOUT: %.Self => constants.%.Self.71c +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.c2a +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.14c +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.960 +// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.3be +// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.c9a +// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.87f // CHECK:STDOUT: %pattern_type.loc168_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc168_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc168_16.2 => constants.%result.patt.47f @@ -3267,44 +3141,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc168_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.7d8 +// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.7d80e1.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.d19 // CHECK:STDOUT: %ModWith.lookup_impl_witness.loc170 => constants.%custom_witness.8a2 // CHECK:STDOUT: %ModWith.facet => constants.%ModWith.facet.9d1 // CHECK:STDOUT: %ModWith.WithSelf.Op.type => constants.%ModWith.WithSelf.Op.type.e61 // CHECK:STDOUT: %.loc170_5.6 => constants.%.25b -// CHECK:STDOUT: %impl.elem1.loc170_5.2 => constants.%Int32.Op.4dca31.5 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.3 => constants.%Int32.Op.4dca31.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc170_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc170_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc170_5.2 => constants.%Int32.Op.4dca31.6 +// CHECK:STDOUT: %specific_impl_fn.loc170_5.2 => constants.%Int32.Op.4dca31.6 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.84d, constants.%Destroy.facet.84d, constants.%facet_value.5ed) { +// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.c63, constants.%Destroy.facet.c63, constants.%facet_value.76f) { // CHECK:STDOUT: %Result.patt.loc121_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int32 // CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.db7 -// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.5cd -// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.52a -// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.18d -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.988 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.db7 +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.bc4 +// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.758ea8.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.447 // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.be8 // CHECK:STDOUT: %assoc0 => constants.%assoc0.31c -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.3ac -// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.958 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.a9e +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.517 // CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.726 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.bcf -// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.953 -// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.030 -// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.c1b -// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.16ff -// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.5ed +// CHECK:STDOUT: %.Self => constants.%.Self.6a9 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.f6c +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.a74 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.bf5 +// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.eea +// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.79b +// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.76f // CHECK:STDOUT: %pattern_type.loc124_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc124_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc124_16.2 => constants.%result.patt.47f @@ -3320,44 +3190,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc124_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.758 +// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.758ea8.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.86c // CHECK:STDOUT: %AddWith.lookup_impl_witness.loc126 => constants.%custom_witness.513476.2 // CHECK:STDOUT: %AddWith.facet => constants.%AddWith.facet.684 // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.0af // CHECK:STDOUT: %.loc126_5.6 => constants.%.e92 -// CHECK:STDOUT: %impl.elem1.loc126_5.2 => constants.%Int32.Op.4dca31.6 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.3 => constants.%Int32.Op.4dca31.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc126_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc126_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc126_5.2 => constants.%Int32.Op.4dca31.7 +// CHECK:STDOUT: %specific_impl_fn.loc126_5.2 => constants.%Int32.Op.4dca31.7 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.84d, constants.%Destroy.facet.84d, constants.%facet_value.889) { +// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.c63, constants.%Destroy.facet.c63, constants.%facet_value.930) { // CHECK:STDOUT: %Result.patt.loc132_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int32 // CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.120 -// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.393 -// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.36d -// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.8a6 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.88b +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.120 +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.faf +// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.46ea3c.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.ea6 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.dae // CHECK:STDOUT: %assoc0 => constants.%assoc0.fac -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.10e -// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.d88 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.c4f +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.b5a // CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.eac -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.0dc -// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.bb5a -// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.767 -// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.974 -// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.3c7 -// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.889 +// CHECK:STDOUT: %.Self => constants.%.Self.861 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.4cf +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.94c +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.b03 +// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.110 +// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.e31 +// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.930 // CHECK:STDOUT: %pattern_type.loc135_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc135_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc135_16.2 => constants.%result.patt.47f @@ -3373,44 +3239,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc135_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.46e +// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.46ea3c.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.147 // CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137 => constants.%custom_witness.32cef1.2 // CHECK:STDOUT: %SubWith.facet => constants.%SubWith.facet.a46 // CHECK:STDOUT: %SubWith.WithSelf.Op.type => constants.%SubWith.WithSelf.Op.type.1a5 // CHECK:STDOUT: %.loc137_5.6 => constants.%.457 -// CHECK:STDOUT: %impl.elem1.loc137_5.2 => constants.%Int32.Op.4dca31.7 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.3 => constants.%Int32.Op.4dca31.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc137_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc137_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc137_5.2 => constants.%Int32.Op.4dca31.8 +// CHECK:STDOUT: %specific_impl_fn.loc137_5.2 => constants.%Int32.Op.4dca31.8 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.84d, constants.%Destroy.facet.84d, constants.%facet_value.f7d) { +// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.c63, constants.%Destroy.facet.c63, constants.%facet_value.702) { // CHECK:STDOUT: %Result.patt.loc143_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int32 // CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.d67 -// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.ea6 -// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.95b -// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.8fe -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f47 +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.d67b +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.c7a +// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.920626.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.c47 // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.ab1 // CHECK:STDOUT: %assoc0 => constants.%assoc0.d0a -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.675 -// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.1de +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.ab5 +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.6ef // CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.44f -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.527 -// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.054 -// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.9d8 -// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.a89 -// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.144 -// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.f7d +// CHECK:STDOUT: %.Self => constants.%.Self.cb9 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.4ca +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.311 +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.b52 +// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.f70 +// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.040 +// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.702 // CHECK:STDOUT: %pattern_type.loc146_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc146_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc146_16.2 => constants.%result.patt.47f @@ -3426,44 +3288,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc146_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.920 +// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.920626.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.349 // CHECK:STDOUT: %MulWith.lookup_impl_witness.loc148 => constants.%custom_witness.3a0675.2 // CHECK:STDOUT: %MulWith.facet => constants.%MulWith.facet.3ab // CHECK:STDOUT: %MulWith.WithSelf.Op.type => constants.%MulWith.WithSelf.Op.type.2ed // CHECK:STDOUT: %.loc148_5.6 => constants.%.9d6 -// CHECK:STDOUT: %impl.elem1.loc148_5.2 => constants.%Int32.Op.4dca31.8 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.3 => constants.%Int32.Op.4dca31.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc148_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc148_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc148_5.2 => constants.%Int32.Op.4dca31.9 +// CHECK:STDOUT: %specific_impl_fn.loc148_5.2 => constants.%Int32.Op.4dca31.9 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.84d, constants.%Destroy.facet.84d, constants.%facet_value.403) { +// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.c63, constants.%Destroy.facet.c63, constants.%facet_value.8c1) { // CHECK:STDOUT: %Result.patt.loc154_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int32 // CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.5a1 -// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.821 -// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.3ed -// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.5bd -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.553 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.5a1 +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.057 +// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.348fba.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.cc3 // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.22f // CHECK:STDOUT: %assoc0 => constants.%assoc0.a9d -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.1af -// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.a46 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.ca2 +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.14b // CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.37d -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.7ae -// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.6c4 -// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.f48 -// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.4e6 -// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.def -// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.403 +// CHECK:STDOUT: %.Self => constants.%.Self.208 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.0ac +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.437 +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.f29 +// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.3d3 +// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.db7 +// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.8c1 // CHECK:STDOUT: %pattern_type.loc157_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc157_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc157_16.2 => constants.%result.patt.47f @@ -3479,44 +3337,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc157_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.348 +// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.348fba.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.004 // CHECK:STDOUT: %DivWith.lookup_impl_witness.loc159 => constants.%custom_witness.c32685.2 // CHECK:STDOUT: %DivWith.facet => constants.%DivWith.facet.b4a // CHECK:STDOUT: %DivWith.WithSelf.Op.type => constants.%DivWith.WithSelf.Op.type.085 // CHECK:STDOUT: %.loc159_5.6 => constants.%.10c -// CHECK:STDOUT: %impl.elem1.loc159_5.2 => constants.%Int32.Op.4dca31.9 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.3 => constants.%Int32.Op.4dca31.9 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc159_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc159_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc159_5.2 => constants.%Int32.Op.4dca31.10 +// CHECK:STDOUT: %specific_impl_fn.loc159_5.2 => constants.%Int32.Op.4dca31.10 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.84d, constants.%Destroy.facet.84d, constants.%facet_value.559) { +// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.c63, constants.%Destroy.facet.c63, constants.%facet_value.50c) { // CHECK:STDOUT: %Result.patt.loc165_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.84d -// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.c63 +// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int32 // CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.794 -// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.9c3 -// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.b38 -// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.0b7 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f01 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.794 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.813 +// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.cc95ce.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f4a // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.021 // CHECK:STDOUT: %assoc0 => constants.%assoc0.310 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.ac5 -// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.914 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.efb +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.e83 // CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int32 -// CHECK:STDOUT: %.Self => constants.%.Self.f60 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.9a9 -// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.522 -// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.115 -// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.393 -// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.be9 -// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.559 +// CHECK:STDOUT: %.Self => constants.%.Self.618 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.01c +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.3bb +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.3d9 +// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.f5f +// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.27e +// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.50c // CHECK:STDOUT: %pattern_type.loc168_16 => constants.%pattern_type.8b4 // CHECK:STDOUT: %result.param_patt.loc168_16.2 => constants.%result.param_patt.e81 // CHECK:STDOUT: %result.patt.loc168_16.2 => constants.%result.patt.47f @@ -3532,44 +3386,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc168_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.cc9 +// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.cc95ce.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.2eb // CHECK:STDOUT: %ModWith.lookup_impl_witness.loc170 => constants.%custom_witness.994c75.2 // CHECK:STDOUT: %ModWith.facet => constants.%ModWith.facet.3dc // CHECK:STDOUT: %ModWith.WithSelf.Op.type => constants.%ModWith.WithSelf.Op.type.a2a // CHECK:STDOUT: %.loc170_5.6 => constants.%.b6d -// CHECK:STDOUT: %impl.elem1.loc170_5.2 => constants.%Int32.Op.4dca31.10 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.3 => constants.%Int32.Op.4dca31.10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc170_5.7 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc170_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc170_5.2 => constants.%Int32.Op.4dca31.11 +// CHECK:STDOUT: %specific_impl_fn.loc170_5.2 => constants.%Int32.Op.4dca31.11 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.0b4, constants.%Destroy.facet.0b4, constants.%facet_value.806) { +// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.011, constants.%Destroy.facet.011, constants.%facet_value.cb5) { // CHECK:STDOUT: %Result.patt.loc121_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.0b4 -// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.0b4 +// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.011 +// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.011 // CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int64 // CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.1ff -// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.e1d -// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.d58 -// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.545 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f6a +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.1ff +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.91a +// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.57be9d.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.a1b // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.97f // CHECK:STDOUT: %assoc0 => constants.%assoc0.f02 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.bc0 -// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.1e6 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.30a +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.b7d // CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int64 -// CHECK:STDOUT: %.Self => constants.%.Self.ad4 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.a60 -// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.7fa -// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.37a -// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.ec3 -// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.af0 -// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.806 +// CHECK:STDOUT: %.Self => constants.%.Self.f92 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.96d +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.516 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.dab +// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.652 +// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.cb1 +// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.cb5 // CHECK:STDOUT: %pattern_type.loc124_16 => constants.%pattern_type.4aa // CHECK:STDOUT: %result.param_patt.loc124_16.2 => constants.%result.param_patt.1e1 // CHECK:STDOUT: %result.patt.loc124_16.2 => constants.%result.patt.93b @@ -3585,44 +3435,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc124_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.57b +// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.57be9d.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.a75 // CHECK:STDOUT: %AddWith.lookup_impl_witness.loc126 => constants.%custom_witness.f2f // CHECK:STDOUT: %AddWith.facet => constants.%AddWith.facet.0d8 // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.a40 // CHECK:STDOUT: %.loc126_5.6 => constants.%.51d // CHECK:STDOUT: %impl.elem1.loc126_5.2 => constants.%Op.72717c.6 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.3 => constants.%Op.72717c.6 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.36f -// CHECK:STDOUT: %.loc126_5.7 => constants.%.7aa -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.3 -// CHECK:STDOUT: %impl.elem2.loc126_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 +// CHECK:STDOUT: %specific_impl_fn.loc126_5.2 => constants.%Op.72717c.6 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.0b4, constants.%Destroy.facet.0b4, constants.%facet_value.442) { +// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.011, constants.%Destroy.facet.011, constants.%facet_value.9c9) { // CHECK:STDOUT: %Result.patt.loc132_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.0b4 -// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.0b4 +// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.011 +// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.011 // CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int64 // CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.31c -// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.6db -// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.a3d -// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.b70 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f8c +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.31c +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.c93 +// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.cb55bb.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.7cf // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.4f8 // CHECK:STDOUT: %assoc0 => constants.%assoc0.13b -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.117 -// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.79c +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.52f +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.5f9 // CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int64 -// CHECK:STDOUT: %.Self => constants.%.Self.b71 -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.4b8 -// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.5e4 -// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.cfa -// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.16a -// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.18c -// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.442 +// CHECK:STDOUT: %.Self => constants.%.Self.23f +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.445 +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.ee1 +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.d68 +// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.ea4 +// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.25e +// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.9c9 // CHECK:STDOUT: %pattern_type.loc135_16 => constants.%pattern_type.4aa // CHECK:STDOUT: %result.param_patt.loc135_16.2 => constants.%result.param_patt.1e1 // CHECK:STDOUT: %result.patt.loc135_16.2 => constants.%result.patt.93b @@ -3638,44 +3484,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc135_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.cb5 +// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.cb55bb.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.e70 // CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137 => constants.%custom_witness.276 // CHECK:STDOUT: %SubWith.facet => constants.%SubWith.facet.d62 // CHECK:STDOUT: %SubWith.WithSelf.Op.type => constants.%SubWith.WithSelf.Op.type.d39 // CHECK:STDOUT: %.loc137_5.6 => constants.%.e39 // CHECK:STDOUT: %impl.elem1.loc137_5.2 => constants.%Op.72717c.7 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.3 => constants.%Op.72717c.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.36f -// CHECK:STDOUT: %.loc137_5.7 => constants.%.7aa -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.3 -// CHECK:STDOUT: %impl.elem2.loc137_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 +// CHECK:STDOUT: %specific_impl_fn.loc137_5.2 => constants.%Op.72717c.7 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.0b4, constants.%Destroy.facet.0b4, constants.%facet_value.97e) { +// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.011, constants.%Destroy.facet.011, constants.%facet_value.637) { // CHECK:STDOUT: %Result.patt.loc143_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.0b4 -// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.0b4 +// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.011 +// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.011 // CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int64 // CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.661 -// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.dc5 -// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.1e0 -// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.757 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.5a6 +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.661 +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.5fe +// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.0a6803.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.e09 // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.940 // CHECK:STDOUT: %assoc0 => constants.%assoc0.9d9 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.741 -// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.dca +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.6c6 +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.731 // CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int64 -// CHECK:STDOUT: %.Self => constants.%.Self.6e4 -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.977 -// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.a52 -// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.48ab -// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.307 -// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.23a -// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.97e +// CHECK:STDOUT: %.Self => constants.%.Self.6d9 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.74c +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.4c1 +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.a2e +// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.216 +// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.ec6 +// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.637 // CHECK:STDOUT: %pattern_type.loc146_16 => constants.%pattern_type.4aa // CHECK:STDOUT: %result.param_patt.loc146_16.2 => constants.%result.param_patt.1e1 // CHECK:STDOUT: %result.patt.loc146_16.2 => constants.%result.patt.93b @@ -3691,44 +3533,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc146_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.0a6 +// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.0a6803.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.b22 // CHECK:STDOUT: %MulWith.lookup_impl_witness.loc148 => constants.%custom_witness.8e4 // CHECK:STDOUT: %MulWith.facet => constants.%MulWith.facet.4a0 // CHECK:STDOUT: %MulWith.WithSelf.Op.type => constants.%MulWith.WithSelf.Op.type.489 // CHECK:STDOUT: %.loc148_5.6 => constants.%.2e6 // CHECK:STDOUT: %impl.elem1.loc148_5.2 => constants.%Op.72717c.8 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.3 => constants.%Op.72717c.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.36f -// CHECK:STDOUT: %.loc148_5.7 => constants.%.7aa -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.3 -// CHECK:STDOUT: %impl.elem2.loc148_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 +// CHECK:STDOUT: %specific_impl_fn.loc148_5.2 => constants.%Op.72717c.8 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.0b4, constants.%Destroy.facet.0b4, constants.%facet_value.585) { +// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.011, constants.%Destroy.facet.011, constants.%facet_value.46b) { // CHECK:STDOUT: %Result.patt.loc154_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.0b4 -// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.0b4 +// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.011 +// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.011 // CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int64 // CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.dd8 -// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.7ad -// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.216 -// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.c23 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.c77 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.dd8 +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.d10 +// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.4732f8.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.483 // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.2dc // CHECK:STDOUT: %assoc0 => constants.%assoc0.e8b -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.958 -// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.a26 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.531 +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.872 // CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int64 -// CHECK:STDOUT: %.Self => constants.%.Self.7b8 -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.055 -// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.212 -// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.011 -// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.5eb -// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.518 -// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.585 +// CHECK:STDOUT: %.Self => constants.%.Self.2e9 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.14c +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.d16 +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.89f +// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.fcf +// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.5ce +// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.46b // CHECK:STDOUT: %pattern_type.loc157_16 => constants.%pattern_type.4aa // CHECK:STDOUT: %result.param_patt.loc157_16.2 => constants.%result.param_patt.1e1 // CHECK:STDOUT: %result.patt.loc157_16.2 => constants.%result.patt.93b @@ -3744,44 +3582,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc157_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.473 +// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.4732f8.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.8b9 // CHECK:STDOUT: %DivWith.lookup_impl_witness.loc159 => constants.%custom_witness.099 // CHECK:STDOUT: %DivWith.facet => constants.%DivWith.facet.b29 // CHECK:STDOUT: %DivWith.WithSelf.Op.type => constants.%DivWith.WithSelf.Op.type.9fa // CHECK:STDOUT: %.loc159_5.6 => constants.%.bc2 // CHECK:STDOUT: %impl.elem1.loc159_5.2 => constants.%Op.72717c.9 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.3 => constants.%Op.72717c.9 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.36f -// CHECK:STDOUT: %.loc159_5.7 => constants.%.7aa -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.3 -// CHECK:STDOUT: %impl.elem2.loc159_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 +// CHECK:STDOUT: %specific_impl_fn.loc159_5.2 => constants.%Op.72717c.9 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.0b4, constants.%Destroy.facet.0b4, constants.%facet_value.b2a) { +// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.011, constants.%Destroy.facet.011, constants.%facet_value.9bd) { // CHECK:STDOUT: %Result.patt.loc165_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.0b4 -// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.0b4 +// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.011 +// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.011 // CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int64 // CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.c72 -// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.830 -// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.5a8 -// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.ecd -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.7bd +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.c72 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.c84 +// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.4d1b1b.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.40c // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.ad2 // CHECK:STDOUT: %assoc0 => constants.%assoc0.c8a -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.601 -// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.001 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.06d +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.968 // CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int64 -// CHECK:STDOUT: %.Self => constants.%.Self.23a -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.4a5 -// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.007 -// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.2db -// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.3f3 -// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.3de -// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.b2a +// CHECK:STDOUT: %.Self => constants.%.Self.dc4 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.305 +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.9c8 +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.573 +// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.6af +// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.6c9 +// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.9bd // CHECK:STDOUT: %pattern_type.loc168_16 => constants.%pattern_type.4aa // CHECK:STDOUT: %result.param_patt.loc168_16.2 => constants.%result.param_patt.1e1 // CHECK:STDOUT: %result.patt.loc168_16.2 => constants.%result.patt.93b @@ -3797,44 +3631,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc168_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.4d1 +// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.4d1b1b.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.eed // CHECK:STDOUT: %ModWith.lookup_impl_witness.loc170 => constants.%custom_witness.129 // CHECK:STDOUT: %ModWith.facet => constants.%ModWith.facet.b10 // CHECK:STDOUT: %ModWith.WithSelf.Op.type => constants.%ModWith.WithSelf.Op.type.1ecc // CHECK:STDOUT: %.loc170_5.6 => constants.%.bf4 // CHECK:STDOUT: %impl.elem1.loc170_5.2 => constants.%Op.72717c.10 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.3 => constants.%Op.72717c.10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.36f -// CHECK:STDOUT: %.loc170_5.7 => constants.%.7aa -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.3 -// CHECK:STDOUT: %impl.elem2.loc170_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 +// CHECK:STDOUT: %specific_impl_fn.loc170_5.2 => constants.%Op.72717c.10 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.0b4, constants.%Destroy.facet.84d, constants.%facet_value.26c) { +// CHECK:STDOUT: specific @AddWith.loc124(constants.%Destroy.facet.011, constants.%Destroy.facet.c63, constants.%facet_value.4aa) { // CHECK:STDOUT: %Result.patt.loc121_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.0b4 -// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc121_9.1 => constants.%Destroy.facet.011 +// CHECK:STDOUT: %U.patt.loc122_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc122_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc123_35.1 => constants.%Int32 // CHECK:STDOUT: %AddWith.type.loc123_35.1 => constants.%AddWith.type.db7 -// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.5cd -// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.52a -// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.18d -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.988 +// CHECK:STDOUT: %facet_type.loc123_19 => constants.%facet_type.db7 +// CHECK:STDOUT: %.Self.frozen.loc123_37.1 => constants.%.Self.frozen.bc4 +// CHECK:STDOUT: %require_complete.loc123 => constants.%complete_type.758ea8.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.447 // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.be8 // CHECK:STDOUT: %assoc0 => constants.%assoc0.31c -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.3ac -// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.958 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.1 => constants.%AddWith.lookup_impl_witness.a9e +// CHECK:STDOUT: %impl.elem0.loc123_43.1 => constants.%impl.elem0.517 // CHECK:STDOUT: %Result.as_type.loc123_53.1 => constants.%Int64 -// CHECK:STDOUT: %.Self => constants.%.Self.726 -// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.bcf -// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.953 -// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.223 -// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.2c7 -// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.e6f -// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.26c +// CHECK:STDOUT: %.Self => constants.%.Self.6a9 +// CHECK:STDOUT: %AddWith.lookup_impl_witness.loc123_43.2 => constants.%AddWith.lookup_impl_witness.f6c +// CHECK:STDOUT: %impl.elem0.loc123_43.2 => constants.%impl.elem0.a74 +// CHECK:STDOUT: %facet_type.loc123_37 => constants.%facet_type.279 +// CHECK:STDOUT: %pattern_type.loc123 => constants.%pattern_type.95b +// CHECK:STDOUT: %T.patt.loc123_4.2 => constants.%T.patt.cc5 +// CHECK:STDOUT: %T.loc123_4.1 => constants.%facet_value.4aa // CHECK:STDOUT: %pattern_type.loc124_16 => constants.%pattern_type.4aa // CHECK:STDOUT: %result.param_patt.loc124_16.2 => constants.%result.param_patt.1e1 // CHECK:STDOUT: %result.patt.loc124_16.2 => constants.%result.patt.93b @@ -3850,44 +3680,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc124_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc124_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.758 +// CHECK:STDOUT: %require_complete.loc126 => constants.%complete_type.758ea8.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.86c // CHECK:STDOUT: %AddWith.lookup_impl_witness.loc126 => constants.%custom_witness.16b // CHECK:STDOUT: %AddWith.facet => constants.%AddWith.facet.f65 // CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.8b6 // CHECK:STDOUT: %.loc126_5.6 => constants.%.cf7 // CHECK:STDOUT: %impl.elem1.loc126_5.2 => constants.%Op.72717c.11 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.3 => constants.%Op.72717c.11 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.36f -// CHECK:STDOUT: %.loc126_5.7 => constants.%.7aa -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.3 -// CHECK:STDOUT: %impl.elem2.loc126_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %specific_impl_fn.loc126_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 +// CHECK:STDOUT: %specific_impl_fn.loc126_5.2 => constants.%Op.72717c.11 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.0b4, constants.%Destroy.facet.84d, constants.%facet_value.d8b) { +// CHECK:STDOUT: specific @SubWith.loc135(constants.%Destroy.facet.011, constants.%Destroy.facet.c63, constants.%facet_value.82c) { // CHECK:STDOUT: %Result.patt.loc132_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.0b4 -// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc132_9.1 => constants.%Destroy.facet.011 +// CHECK:STDOUT: %U.patt.loc133_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc133_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc134_35.1 => constants.%Int32 // CHECK:STDOUT: %SubWith.type.loc134_35.1 => constants.%SubWith.type.120 -// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.393 -// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.36d -// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.8a6 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.88b +// CHECK:STDOUT: %facet_type.loc134_19 => constants.%facet_type.120 +// CHECK:STDOUT: %.Self.frozen.loc134_37.1 => constants.%.Self.frozen.faf +// CHECK:STDOUT: %require_complete.loc134 => constants.%complete_type.46ea3c.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.ea6 // CHECK:STDOUT: %SubWith.assoc_type => constants.%SubWith.assoc_type.dae // CHECK:STDOUT: %assoc0 => constants.%assoc0.fac -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.10e -// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.d88 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.1 => constants.%SubWith.lookup_impl_witness.c4f +// CHECK:STDOUT: %impl.elem0.loc134_43.1 => constants.%impl.elem0.b5a // CHECK:STDOUT: %Result.as_type.loc134_53.1 => constants.%Int64 -// CHECK:STDOUT: %.Self => constants.%.Self.eac -// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.0dc -// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.bb5a -// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.ecd -// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.ab2 -// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.7e5 -// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.d8b +// CHECK:STDOUT: %.Self => constants.%.Self.861 +// CHECK:STDOUT: %SubWith.lookup_impl_witness.loc134_43.2 => constants.%SubWith.lookup_impl_witness.4cf +// CHECK:STDOUT: %impl.elem0.loc134_43.2 => constants.%impl.elem0.94c +// CHECK:STDOUT: %facet_type.loc134_37 => constants.%facet_type.1c5 +// CHECK:STDOUT: %pattern_type.loc134 => constants.%pattern_type.33d +// CHECK:STDOUT: %T.patt.loc134_4.2 => constants.%T.patt.203 +// CHECK:STDOUT: %T.loc134_4.1 => constants.%facet_value.82c // CHECK:STDOUT: %pattern_type.loc135_16 => constants.%pattern_type.4aa // CHECK:STDOUT: %result.param_patt.loc135_16.2 => constants.%result.param_patt.1e1 // CHECK:STDOUT: %result.patt.loc135_16.2 => constants.%result.patt.93b @@ -3903,44 +3729,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc135_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc135_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.46e +// CHECK:STDOUT: %require_complete.loc137 => constants.%complete_type.46ea3c.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.147 // CHECK:STDOUT: %SubWith.lookup_impl_witness.loc137 => constants.%custom_witness.21a // CHECK:STDOUT: %SubWith.facet => constants.%SubWith.facet.245 // CHECK:STDOUT: %SubWith.WithSelf.Op.type => constants.%SubWith.WithSelf.Op.type.2cf // CHECK:STDOUT: %.loc137_5.6 => constants.%.4e8 // CHECK:STDOUT: %impl.elem1.loc137_5.2 => constants.%Op.72717c.12 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.3 => constants.%Op.72717c.12 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.36f -// CHECK:STDOUT: %.loc137_5.7 => constants.%.7aa -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.3 -// CHECK:STDOUT: %impl.elem2.loc137_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %specific_impl_fn.loc137_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 +// CHECK:STDOUT: %specific_impl_fn.loc137_5.2 => constants.%Op.72717c.12 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.0b4, constants.%Destroy.facet.84d, constants.%facet_value.72f) { +// CHECK:STDOUT: specific @MulWith.loc146(constants.%Destroy.facet.011, constants.%Destroy.facet.c63, constants.%facet_value.780) { // CHECK:STDOUT: %Result.patt.loc143_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.0b4 -// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc143_9.1 => constants.%Destroy.facet.011 +// CHECK:STDOUT: %U.patt.loc144_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc144_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc145_35.1 => constants.%Int32 // CHECK:STDOUT: %MulWith.type.loc145_35.1 => constants.%MulWith.type.d67 -// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.ea6 -// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.95b -// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.8fe -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f47 +// CHECK:STDOUT: %facet_type.loc145_19 => constants.%facet_type.d67b +// CHECK:STDOUT: %.Self.frozen.loc145_37.1 => constants.%.Self.frozen.c7a +// CHECK:STDOUT: %require_complete.loc145 => constants.%complete_type.920626.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.c47 // CHECK:STDOUT: %MulWith.assoc_type => constants.%MulWith.assoc_type.ab1 // CHECK:STDOUT: %assoc0 => constants.%assoc0.d0a -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.675 -// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.1de +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.1 => constants.%MulWith.lookup_impl_witness.ab5 +// CHECK:STDOUT: %impl.elem0.loc145_43.1 => constants.%impl.elem0.6ef // CHECK:STDOUT: %Result.as_type.loc145_53.1 => constants.%Int64 -// CHECK:STDOUT: %.Self => constants.%.Self.44f -// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.527 -// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.054 -// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.486 -// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.92d -// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.2f0 -// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.72f +// CHECK:STDOUT: %.Self => constants.%.Self.cb9 +// CHECK:STDOUT: %MulWith.lookup_impl_witness.loc145_43.2 => constants.%MulWith.lookup_impl_witness.4ca +// CHECK:STDOUT: %impl.elem0.loc145_43.2 => constants.%impl.elem0.311 +// CHECK:STDOUT: %facet_type.loc145_37 => constants.%facet_type.ec7 +// CHECK:STDOUT: %pattern_type.loc145 => constants.%pattern_type.537 +// CHECK:STDOUT: %T.patt.loc145_4.2 => constants.%T.patt.f45 +// CHECK:STDOUT: %T.loc145_4.1 => constants.%facet_value.780 // CHECK:STDOUT: %pattern_type.loc146_16 => constants.%pattern_type.4aa // CHECK:STDOUT: %result.param_patt.loc146_16.2 => constants.%result.param_patt.1e1 // CHECK:STDOUT: %result.patt.loc146_16.2 => constants.%result.patt.93b @@ -3956,44 +3778,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc146_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc146_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.920 +// CHECK:STDOUT: %require_complete.loc148 => constants.%complete_type.920626.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.349 // CHECK:STDOUT: %MulWith.lookup_impl_witness.loc148 => constants.%custom_witness.798 // CHECK:STDOUT: %MulWith.facet => constants.%MulWith.facet.394 // CHECK:STDOUT: %MulWith.WithSelf.Op.type => constants.%MulWith.WithSelf.Op.type.0ab // CHECK:STDOUT: %.loc148_5.6 => constants.%.22d // CHECK:STDOUT: %impl.elem1.loc148_5.2 => constants.%Op.72717c.13 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.3 => constants.%Op.72717c.13 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.36f -// CHECK:STDOUT: %.loc148_5.7 => constants.%.7aa -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.3 -// CHECK:STDOUT: %impl.elem2.loc148_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %specific_impl_fn.loc148_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 +// CHECK:STDOUT: %specific_impl_fn.loc148_5.2 => constants.%Op.72717c.13 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.0b4, constants.%Destroy.facet.84d, constants.%facet_value.c74) { +// CHECK:STDOUT: specific @DivWith.loc157(constants.%Destroy.facet.011, constants.%Destroy.facet.c63, constants.%facet_value.6d0) { // CHECK:STDOUT: %Result.patt.loc154_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.0b4 -// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc154_9.1 => constants.%Destroy.facet.011 +// CHECK:STDOUT: %U.patt.loc155_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc155_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc156_35.1 => constants.%Int32 // CHECK:STDOUT: %DivWith.type.loc156_35.1 => constants.%DivWith.type.5a1 -// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.821 -// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.3ed -// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.5bd -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.553 +// CHECK:STDOUT: %facet_type.loc156_19 => constants.%facet_type.5a1 +// CHECK:STDOUT: %.Self.frozen.loc156_37.1 => constants.%.Self.frozen.057 +// CHECK:STDOUT: %require_complete.loc156 => constants.%complete_type.348fba.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.cc3 // CHECK:STDOUT: %DivWith.assoc_type => constants.%DivWith.assoc_type.22f // CHECK:STDOUT: %assoc0 => constants.%assoc0.a9d -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.1af -// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.a46 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.1 => constants.%DivWith.lookup_impl_witness.ca2 +// CHECK:STDOUT: %impl.elem0.loc156_43.1 => constants.%impl.elem0.14b // CHECK:STDOUT: %Result.as_type.loc156_53.1 => constants.%Int64 -// CHECK:STDOUT: %.Self => constants.%.Self.37d -// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.7ae -// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.6c4 -// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.752 -// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.d51 -// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.c8a -// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.c74 +// CHECK:STDOUT: %.Self => constants.%.Self.208 +// CHECK:STDOUT: %DivWith.lookup_impl_witness.loc156_43.2 => constants.%DivWith.lookup_impl_witness.0ac +// CHECK:STDOUT: %impl.elem0.loc156_43.2 => constants.%impl.elem0.437 +// CHECK:STDOUT: %facet_type.loc156_37 => constants.%facet_type.da8 +// CHECK:STDOUT: %pattern_type.loc156 => constants.%pattern_type.612 +// CHECK:STDOUT: %T.patt.loc156_4.2 => constants.%T.patt.bc3 +// CHECK:STDOUT: %T.loc156_4.1 => constants.%facet_value.6d0 // CHECK:STDOUT: %pattern_type.loc157_16 => constants.%pattern_type.4aa // CHECK:STDOUT: %result.param_patt.loc157_16.2 => constants.%result.param_patt.1e1 // CHECK:STDOUT: %result.patt.loc157_16.2 => constants.%result.patt.93b @@ -4009,44 +3827,40 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc157_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc157_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.348 +// CHECK:STDOUT: %require_complete.loc159 => constants.%complete_type.348fba.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.004 // CHECK:STDOUT: %DivWith.lookup_impl_witness.loc159 => constants.%custom_witness.37f // CHECK:STDOUT: %DivWith.facet => constants.%DivWith.facet.85e // CHECK:STDOUT: %DivWith.WithSelf.Op.type => constants.%DivWith.WithSelf.Op.type.7b8 // CHECK:STDOUT: %.loc159_5.6 => constants.%.cde // CHECK:STDOUT: %impl.elem1.loc159_5.2 => constants.%Op.72717c.14 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.3 => constants.%Op.72717c.14 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.36f -// CHECK:STDOUT: %.loc159_5.7 => constants.%.7aa -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.3 -// CHECK:STDOUT: %impl.elem2.loc159_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %specific_impl_fn.loc159_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 +// CHECK:STDOUT: %specific_impl_fn.loc159_5.2 => constants.%Op.72717c.14 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.0b4, constants.%Destroy.facet.84d, constants.%facet_value.b3f) { +// CHECK:STDOUT: specific @ModWith.loc168(constants.%Destroy.facet.011, constants.%Destroy.facet.c63, constants.%facet_value.22f) { // CHECK:STDOUT: %Result.patt.loc165_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.0b4 -// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.7a2 -// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc165_9.1 => constants.%Destroy.facet.011 +// CHECK:STDOUT: %U.patt.loc166_4.2 => constants.%U.patt.cb8 +// CHECK:STDOUT: %U.loc166_4.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %U.as_type.loc167_35.1 => constants.%Int32 // CHECK:STDOUT: %ModWith.type.loc167_35.1 => constants.%ModWith.type.794 -// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.9c3 -// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.b38 -// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.0b7 -// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f01 +// CHECK:STDOUT: %facet_type.loc167_19 => constants.%facet_type.794 +// CHECK:STDOUT: %.Self.frozen.loc167_37.1 => constants.%.Self.frozen.813 +// CHECK:STDOUT: %require_complete.loc167 => constants.%complete_type.cc95ce.1 +// CHECK:STDOUT: %.Self.frozen.as_type => constants.%.Self.frozen.as_type.f4a // CHECK:STDOUT: %ModWith.assoc_type => constants.%ModWith.assoc_type.021 // CHECK:STDOUT: %assoc0 => constants.%assoc0.310 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.ac5 -// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.914 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.1 => constants.%ModWith.lookup_impl_witness.efb +// CHECK:STDOUT: %impl.elem0.loc167_43.1 => constants.%impl.elem0.e83 // CHECK:STDOUT: %Result.as_type.loc167_53.1 => constants.%Int64 -// CHECK:STDOUT: %.Self => constants.%.Self.f60 -// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.9a9 -// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.522 -// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.088 -// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.fff -// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.1fc -// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.b3f +// CHECK:STDOUT: %.Self => constants.%.Self.618 +// CHECK:STDOUT: %ModWith.lookup_impl_witness.loc167_43.2 => constants.%ModWith.lookup_impl_witness.01c +// CHECK:STDOUT: %impl.elem0.loc167_43.2 => constants.%impl.elem0.3bb +// CHECK:STDOUT: %facet_type.loc167_37 => constants.%facet_type.005 +// CHECK:STDOUT: %pattern_type.loc167 => constants.%pattern_type.b4f +// CHECK:STDOUT: %T.patt.loc167_4.2 => constants.%T.patt.0b5 +// CHECK:STDOUT: %T.loc167_4.1 => constants.%facet_value.22f // CHECK:STDOUT: %pattern_type.loc168_16 => constants.%pattern_type.4aa // CHECK:STDOUT: %result.param_patt.loc168_16.2 => constants.%result.param_patt.1e1 // CHECK:STDOUT: %result.patt.loc168_16.2 => constants.%result.patt.93b @@ -4062,19 +3876,15 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %require_complete.loc168_16 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_27 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc168_33 => constants.%complete_type.357 -// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.cc9 +// CHECK:STDOUT: %require_complete.loc170 => constants.%complete_type.cc95ce.2 // CHECK:STDOUT: %assoc1 => constants.%assoc1.2eb // CHECK:STDOUT: %ModWith.lookup_impl_witness.loc170 => constants.%custom_witness.981 // CHECK:STDOUT: %ModWith.facet => constants.%ModWith.facet.f5a2 // CHECK:STDOUT: %ModWith.WithSelf.Op.type => constants.%ModWith.WithSelf.Op.type.d27 // CHECK:STDOUT: %.loc170_5.6 => constants.%.3b0 // CHECK:STDOUT: %impl.elem1.loc170_5.2 => constants.%Op.72717c.15 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.3 => constants.%Op.72717c.15 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.36f -// CHECK:STDOUT: %.loc170_5.7 => constants.%.7aa -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.3 -// CHECK:STDOUT: %impl.elem2.loc170_5.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %specific_impl_fn.loc170_5.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 +// CHECK:STDOUT: %specific_impl_fn.loc170_5.2 => constants.%Op.72717c.15 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b5e // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddAssignWith.loc225(constants.%U.67d, constants.%T.73b) { @@ -4181,8 +3991,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type => constants.%AddAssignWith.WithSelf.Op.type.893 // CHECK:STDOUT: %.loc227_5.2 => constants.%.5a24 // CHECK:STDOUT: %AddAssignWith.lookup_impl_witness => constants.%custom_witness.2fc -// CHECK:STDOUT: %impl.elem0.loc227_5.2 => constants.%Int16.Op.4dca31.12 -// CHECK:STDOUT: %specific_impl_fn.loc227_5.2 => constants.%Int16.Op.4dca31.12 +// CHECK:STDOUT: %impl.elem0.loc227_5.2 => constants.%Int16.Op.4dca31.13 +// CHECK:STDOUT: %specific_impl_fn.loc227_5.2 => constants.%Int16.Op.4dca31.13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @SubAssignWith.loc231(constants.%i16, constants.%SubAssignWith.facet.474) { @@ -4209,8 +4019,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type => constants.%SubAssignWith.WithSelf.Op.type.0df // CHECK:STDOUT: %.loc233_5.2 => constants.%.cfa // CHECK:STDOUT: %SubAssignWith.lookup_impl_witness => constants.%custom_witness.21df -// CHECK:STDOUT: %impl.elem0.loc233_5.2 => constants.%Int16.Op.4dca31.13 -// CHECK:STDOUT: %specific_impl_fn.loc233_5.2 => constants.%Int16.Op.4dca31.13 +// CHECK:STDOUT: %impl.elem0.loc233_5.2 => constants.%Int16.Op.4dca31.14 +// CHECK:STDOUT: %specific_impl_fn.loc233_5.2 => constants.%Int16.Op.4dca31.14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @MulAssignWith.loc237(constants.%i16, constants.%MulAssignWith.facet.9d6) { @@ -4237,8 +4047,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type => constants.%MulAssignWith.WithSelf.Op.type.726 // CHECK:STDOUT: %.loc239_5.2 => constants.%.9a5 // CHECK:STDOUT: %MulAssignWith.lookup_impl_witness => constants.%custom_witness.81e -// CHECK:STDOUT: %impl.elem0.loc239_5.2 => constants.%Int16.Op.4dca31.14 -// CHECK:STDOUT: %specific_impl_fn.loc239_5.2 => constants.%Int16.Op.4dca31.14 +// CHECK:STDOUT: %impl.elem0.loc239_5.2 => constants.%Int16.Op.4dca31.15 +// CHECK:STDOUT: %specific_impl_fn.loc239_5.2 => constants.%Int16.Op.4dca31.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @DivAssignWith.loc243(constants.%i16, constants.%DivAssignWith.facet.bed) { @@ -4265,8 +4075,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type => constants.%DivAssignWith.WithSelf.Op.type.204 // CHECK:STDOUT: %.loc245_5.2 => constants.%.f1e // CHECK:STDOUT: %DivAssignWith.lookup_impl_witness => constants.%custom_witness.787 -// CHECK:STDOUT: %impl.elem0.loc245_5.2 => constants.%Int16.Op.4dca31.15 -// CHECK:STDOUT: %specific_impl_fn.loc245_5.2 => constants.%Int16.Op.4dca31.15 +// CHECK:STDOUT: %impl.elem0.loc245_5.2 => constants.%Int16.Op.4dca31.16 +// CHECK:STDOUT: %specific_impl_fn.loc245_5.2 => constants.%Int16.Op.4dca31.16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ModAssignWith.loc249(constants.%i16, constants.%ModAssignWith.facet.6d2) { @@ -4293,8 +4103,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type => constants.%ModAssignWith.WithSelf.Op.type.4c4 // CHECK:STDOUT: %.loc251_5.2 => constants.%.37f // CHECK:STDOUT: %ModAssignWith.lookup_impl_witness => constants.%custom_witness.c25 -// CHECK:STDOUT: %impl.elem0.loc251_5.2 => constants.%Int16.Op.4dca31.16 -// CHECK:STDOUT: %specific_impl_fn.loc251_5.2 => constants.%Int16.Op.4dca31.16 +// CHECK:STDOUT: %impl.elem0.loc251_5.2 => constants.%Int16.Op.4dca31.17 +// CHECK:STDOUT: %specific_impl_fn.loc251_5.2 => constants.%Int16.Op.4dca31.17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddAssignWith.loc225(constants.%Int32, constants.%AddAssignWith.facet.e80) { @@ -4321,8 +4131,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type => constants.%AddAssignWith.WithSelf.Op.type.b93 // CHECK:STDOUT: %.loc227_5.2 => constants.%.05e // CHECK:STDOUT: %AddAssignWith.lookup_impl_witness => constants.%custom_witness.17487e.1 -// CHECK:STDOUT: %impl.elem0.loc227_5.2 => constants.%Int32.Op.4dca31.11 -// CHECK:STDOUT: %specific_impl_fn.loc227_5.2 => constants.%Int32.Op.4dca31.11 +// CHECK:STDOUT: %impl.elem0.loc227_5.2 => constants.%Int32.Op.4dca31.12 +// CHECK:STDOUT: %specific_impl_fn.loc227_5.2 => constants.%Int32.Op.4dca31.12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @SubAssignWith.loc231(constants.%Int32, constants.%SubAssignWith.facet.143) { @@ -4349,8 +4159,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type => constants.%SubAssignWith.WithSelf.Op.type.0d2 // CHECK:STDOUT: %.loc233_5.2 => constants.%.68c // CHECK:STDOUT: %SubAssignWith.lookup_impl_witness => constants.%custom_witness.ebd70f.1 -// CHECK:STDOUT: %impl.elem0.loc233_5.2 => constants.%Int32.Op.4dca31.13 -// CHECK:STDOUT: %specific_impl_fn.loc233_5.2 => constants.%Int32.Op.4dca31.13 +// CHECK:STDOUT: %impl.elem0.loc233_5.2 => constants.%Int32.Op.4dca31.14 +// CHECK:STDOUT: %specific_impl_fn.loc233_5.2 => constants.%Int32.Op.4dca31.14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @MulAssignWith.loc237(constants.%Int32, constants.%MulAssignWith.facet.1e6) { @@ -4377,8 +4187,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type => constants.%MulAssignWith.WithSelf.Op.type.e90 // CHECK:STDOUT: %.loc239_5.2 => constants.%.a68 // CHECK:STDOUT: %MulAssignWith.lookup_impl_witness => constants.%custom_witness.636b34.1 -// CHECK:STDOUT: %impl.elem0.loc239_5.2 => constants.%Int32.Op.4dca31.14 -// CHECK:STDOUT: %specific_impl_fn.loc239_5.2 => constants.%Int32.Op.4dca31.14 +// CHECK:STDOUT: %impl.elem0.loc239_5.2 => constants.%Int32.Op.4dca31.15 +// CHECK:STDOUT: %specific_impl_fn.loc239_5.2 => constants.%Int32.Op.4dca31.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @DivAssignWith.loc243(constants.%Int32, constants.%DivAssignWith.facet.1ca) { @@ -4405,8 +4215,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type => constants.%DivAssignWith.WithSelf.Op.type.78a // CHECK:STDOUT: %.loc245_5.2 => constants.%.aa9 // CHECK:STDOUT: %DivAssignWith.lookup_impl_witness => constants.%custom_witness.45756b.1 -// CHECK:STDOUT: %impl.elem0.loc245_5.2 => constants.%Int32.Op.4dca31.15 -// CHECK:STDOUT: %specific_impl_fn.loc245_5.2 => constants.%Int32.Op.4dca31.15 +// CHECK:STDOUT: %impl.elem0.loc245_5.2 => constants.%Int32.Op.4dca31.16 +// CHECK:STDOUT: %specific_impl_fn.loc245_5.2 => constants.%Int32.Op.4dca31.16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ModAssignWith.loc249(constants.%Int32, constants.%ModAssignWith.facet.715) { @@ -4433,8 +4243,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type => constants.%ModAssignWith.WithSelf.Op.type.81c // CHECK:STDOUT: %.loc251_5.2 => constants.%.913 // CHECK:STDOUT: %ModAssignWith.lookup_impl_witness => constants.%custom_witness.773f24.1 -// CHECK:STDOUT: %impl.elem0.loc251_5.2 => constants.%Int32.Op.4dca31.16 -// CHECK:STDOUT: %specific_impl_fn.loc251_5.2 => constants.%Int32.Op.4dca31.16 +// CHECK:STDOUT: %impl.elem0.loc251_5.2 => constants.%Int32.Op.4dca31.17 +// CHECK:STDOUT: %specific_impl_fn.loc251_5.2 => constants.%Int32.Op.4dca31.17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddAssignWith.loc225(constants.%Int32, constants.%AddAssignWith.facet.c6d) { @@ -4461,8 +4271,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type => constants.%AddAssignWith.WithSelf.Op.type.e31 // CHECK:STDOUT: %.loc227_5.2 => constants.%.454 // CHECK:STDOUT: %AddAssignWith.lookup_impl_witness => constants.%custom_witness.17487e.2 -// CHECK:STDOUT: %impl.elem0.loc227_5.2 => constants.%Int64.Op.4dca31.1 -// CHECK:STDOUT: %specific_impl_fn.loc227_5.2 => constants.%Int64.Op.4dca31.1 +// CHECK:STDOUT: %impl.elem0.loc227_5.2 => constants.%Int64.Op.4dca31.2 +// CHECK:STDOUT: %specific_impl_fn.loc227_5.2 => constants.%Int64.Op.4dca31.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @SubAssignWith.loc231(constants.%Int32, constants.%SubAssignWith.facet.74a) { @@ -4489,8 +4299,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type => constants.%SubAssignWith.WithSelf.Op.type.e54 // CHECK:STDOUT: %.loc233_5.2 => constants.%.d58 // CHECK:STDOUT: %SubAssignWith.lookup_impl_witness => constants.%custom_witness.ebd70f.2 -// CHECK:STDOUT: %impl.elem0.loc233_5.2 => constants.%Int64.Op.4dca31.3 -// CHECK:STDOUT: %specific_impl_fn.loc233_5.2 => constants.%Int64.Op.4dca31.3 +// CHECK:STDOUT: %impl.elem0.loc233_5.2 => constants.%Int64.Op.4dca31.4 +// CHECK:STDOUT: %specific_impl_fn.loc233_5.2 => constants.%Int64.Op.4dca31.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @MulAssignWith.loc237(constants.%Int32, constants.%MulAssignWith.facet.d5c) { @@ -4517,8 +4327,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type => constants.%MulAssignWith.WithSelf.Op.type.2e6 // CHECK:STDOUT: %.loc239_5.2 => constants.%.536 // CHECK:STDOUT: %MulAssignWith.lookup_impl_witness => constants.%custom_witness.636b34.2 -// CHECK:STDOUT: %impl.elem0.loc239_5.2 => constants.%Int64.Op.4dca31.4 -// CHECK:STDOUT: %specific_impl_fn.loc239_5.2 => constants.%Int64.Op.4dca31.4 +// CHECK:STDOUT: %impl.elem0.loc239_5.2 => constants.%Int64.Op.4dca31.5 +// CHECK:STDOUT: %specific_impl_fn.loc239_5.2 => constants.%Int64.Op.4dca31.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @DivAssignWith.loc243(constants.%Int32, constants.%DivAssignWith.facet.c0b) { @@ -4545,8 +4355,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type => constants.%DivAssignWith.WithSelf.Op.type.f46 // CHECK:STDOUT: %.loc245_5.2 => constants.%.58e // CHECK:STDOUT: %DivAssignWith.lookup_impl_witness => constants.%custom_witness.45756b.2 -// CHECK:STDOUT: %impl.elem0.loc245_5.2 => constants.%Int64.Op.4dca31.5 -// CHECK:STDOUT: %specific_impl_fn.loc245_5.2 => constants.%Int64.Op.4dca31.5 +// CHECK:STDOUT: %impl.elem0.loc245_5.2 => constants.%Int64.Op.4dca31.6 +// CHECK:STDOUT: %specific_impl_fn.loc245_5.2 => constants.%Int64.Op.4dca31.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ModAssignWith.loc249(constants.%Int32, constants.%ModAssignWith.facet.cf2) { @@ -4573,8 +4383,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type => constants.%ModAssignWith.WithSelf.Op.type.aab // CHECK:STDOUT: %.loc251_5.2 => constants.%.253 // CHECK:STDOUT: %ModAssignWith.lookup_impl_witness => constants.%custom_witness.773f24.2 -// CHECK:STDOUT: %impl.elem0.loc251_5.2 => constants.%Int64.Op.4dca31.6 -// CHECK:STDOUT: %specific_impl_fn.loc251_5.2 => constants.%Int64.Op.4dca31.6 +// CHECK:STDOUT: %impl.elem0.loc251_5.2 => constants.%Int64.Op.4dca31.7 +// CHECK:STDOUT: %specific_impl_fn.loc251_5.2 => constants.%Int64.Op.4dca31.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestInc(constants.%T.8f3) { @@ -4595,21 +4405,21 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %x.param_patt.loc284_25.2 => constants.%x.param_patt.678 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestNegate(constants.%Result, constants.%T.e01) { +// CHECK:STDOUT: specific @TestNegate(constants.%Result, constants.%T.d5e) { // CHECK:STDOUT: %Result.patt.loc292_9.2 => constants.%Result.patt // CHECK:STDOUT: %Result.loc292_9.1 => constants.%Result // CHECK:STDOUT: %Result.as_type.loc293_49.1 => constants.%Result.as_type -// CHECK:STDOUT: %facet_type => constants.%facet_type.352 -// CHECK:STDOUT: %pattern_type.loc293 => constants.%pattern_type.4c2 -// CHECK:STDOUT: %T.patt.loc293_4.2 => constants.%T.patt.c5b -// CHECK:STDOUT: %T.loc293_4.1 => constants.%T.e01 -// CHECK:STDOUT: %pattern_type.loc294_11 => constants.%pattern_type.f4e485.2 -// CHECK:STDOUT: %y.param_patt.loc294_11.2 => constants.%y.param_patt.023 -// CHECK:STDOUT: %y.patt.loc294_11.2 => constants.%y.patt.33f -// CHECK:STDOUT: %T.as_type.loc294_24.1 => constants.%T.as_type.684 -// CHECK:STDOUT: %pattern_type.loc294_22 => constants.%pattern_type.2dd -// CHECK:STDOUT: %x.param_patt.loc294_22.2 => constants.%x.param_patt.cbc -// CHECK:STDOUT: %x.patt.loc294_22.2 => constants.%x.patt.ef5 +// CHECK:STDOUT: %facet_type => constants.%facet_type.86f +// CHECK:STDOUT: %pattern_type.loc293 => constants.%pattern_type.114 +// CHECK:STDOUT: %T.patt.loc293_4.2 => constants.%T.patt.986 +// CHECK:STDOUT: %T.loc293_4.1 => constants.%T.d5e +// CHECK:STDOUT: %pattern_type.loc294_11 => constants.%pattern_type.86a9db.1 +// CHECK:STDOUT: %y.param_patt.loc294_11.2 => constants.%y.param_patt.5b5 +// CHECK:STDOUT: %y.patt.loc294_11.2 => constants.%y.patt.1d3 +// CHECK:STDOUT: %T.as_type.loc294_24.1 => constants.%T.as_type.735 +// CHECK:STDOUT: %pattern_type.loc294_22 => constants.%pattern_type.66b2 +// CHECK:STDOUT: %x.param_patt.loc294_22.2 => constants.%x.param_patt.0a8 +// CHECK:STDOUT: %x.patt.loc294_22.2 => constants.%x.patt.424 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestInc(constants.%Inc.facet.dd2) { @@ -4625,8 +4435,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Inc.WithSelf.Op.type => constants.%Inc.WithSelf.Op.type.13b // CHECK:STDOUT: %.loc280_3.3 => constants.%.214 // CHECK:STDOUT: %Inc.lookup_impl_witness => constants.%custom_witness.f3f8 -// CHECK:STDOUT: %impl.elem0.loc280_3.2 => constants.%Int32.Op.4dca31.17 -// CHECK:STDOUT: %specific_impl_fn.loc280_3.2 => constants.%Int32.Op.4dca31.17 +// CHECK:STDOUT: %impl.elem0.loc280_3.2 => constants.%Int32.Op.4dca31.18 +// CHECK:STDOUT: %specific_impl_fn.loc280_3.2 => constants.%Int32.Op.4dca31.18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @TestDec(constants.%Dec.facet.e1b) { @@ -4642,18 +4452,18 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Dec.WithSelf.Op.type => constants.%Dec.WithSelf.Op.type.0a4 // CHECK:STDOUT: %.loc286_3.3 => constants.%.55c // CHECK:STDOUT: %Dec.lookup_impl_witness => constants.%custom_witness.b24 -// CHECK:STDOUT: %impl.elem0.loc286_3.2 => constants.%Int32.Op.4dca31.18 -// CHECK:STDOUT: %specific_impl_fn.loc286_3.2 => constants.%Int32.Op.4dca31.18 +// CHECK:STDOUT: %impl.elem0.loc286_3.2 => constants.%Int32.Op.4dca31.19 +// CHECK:STDOUT: %specific_impl_fn.loc286_3.2 => constants.%Int32.Op.4dca31.19 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestNegate(constants.%Destroy.facet.0b4, constants.%facet_value.a67) { +// CHECK:STDOUT: specific @TestNegate(constants.%Destroy.facet.011, constants.%facet_value.4c2) { // CHECK:STDOUT: %Result.patt.loc292_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc292_9.1 => constants.%Destroy.facet.0b4 +// CHECK:STDOUT: %Result.loc292_9.1 => constants.%Destroy.facet.011 // CHECK:STDOUT: %Result.as_type.loc293_49.1 => constants.%Int64 -// CHECK:STDOUT: %facet_type => constants.%facet_type.d8c -// CHECK:STDOUT: %pattern_type.loc293 => constants.%pattern_type.54c -// CHECK:STDOUT: %T.patt.loc293_4.2 => constants.%T.patt.16f3 -// CHECK:STDOUT: %T.loc293_4.1 => constants.%facet_value.a67 +// CHECK:STDOUT: %facet_type => constants.%facet_type.8cf +// CHECK:STDOUT: %pattern_type.loc293 => constants.%pattern_type.4c7 +// CHECK:STDOUT: %T.patt.loc293_4.2 => constants.%T.patt.0b0 +// CHECK:STDOUT: %T.loc293_4.1 => constants.%facet_value.4c2 // CHECK:STDOUT: %pattern_type.loc294_11 => constants.%pattern_type.4aa // CHECK:STDOUT: %y.param_patt.loc294_11.2 => constants.%y.param_patt.a08 // CHECK:STDOUT: %y.patt.loc294_11.2 => constants.%y.patt.069 @@ -4669,23 +4479,19 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Negate.facet.loc296_3.3 => constants.%Negate.facet.8f4 // CHECK:STDOUT: %Negate.WithSelf.Op.type => constants.%Negate.WithSelf.Op.type.34a // CHECK:STDOUT: %.loc296_3.7 => constants.%.789 -// CHECK:STDOUT: %impl.elem1.loc296_3.2 => constants.%Int16.Op.4dca31.17 -// CHECK:STDOUT: %specific_impl_fn.loc296_3.3 => constants.%Int16.Op.4dca31.17 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.36f -// CHECK:STDOUT: %.loc296_3.8 => constants.%.7aa -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.3 -// CHECK:STDOUT: %impl.elem2.loc296_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %specific_impl_fn.loc296_3.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 +// CHECK:STDOUT: %impl.elem1.loc296_3.2 => constants.%Int16.Op.4dca31.18 +// CHECK:STDOUT: %specific_impl_fn.loc296_3.2 => constants.%Int16.Op.4dca31.18 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestNegate(constants.%Destroy.facet.84d, constants.%facet_value.73e) { +// CHECK:STDOUT: specific @TestNegate(constants.%Destroy.facet.c63, constants.%facet_value.9b8) { // CHECK:STDOUT: %Result.patt.loc292_9.2 => constants.%Result.patt -// CHECK:STDOUT: %Result.loc292_9.1 => constants.%Destroy.facet.84d +// CHECK:STDOUT: %Result.loc292_9.1 => constants.%Destroy.facet.c63 // CHECK:STDOUT: %Result.as_type.loc293_49.1 => constants.%Int32 -// CHECK:STDOUT: %facet_type => constants.%facet_type.021 -// CHECK:STDOUT: %pattern_type.loc293 => constants.%pattern_type.4cd -// CHECK:STDOUT: %T.patt.loc293_4.2 => constants.%T.patt.d74 -// CHECK:STDOUT: %T.loc293_4.1 => constants.%facet_value.73e +// CHECK:STDOUT: %facet_type => constants.%facet_type.517 +// CHECK:STDOUT: %pattern_type.loc293 => constants.%pattern_type.eaa +// CHECK:STDOUT: %T.patt.loc293_4.2 => constants.%T.patt.532 +// CHECK:STDOUT: %T.loc293_4.1 => constants.%facet_value.9b8 // CHECK:STDOUT: %pattern_type.loc294_11 => constants.%pattern_type.8b4 // CHECK:STDOUT: %y.param_patt.loc294_11.2 => constants.%y.param_patt.e0c // CHECK:STDOUT: %y.patt.loc294_11.2 => constants.%y.patt.9e1 @@ -4701,12 +4507,8 @@ fn TestUnaryOperators(a: Cpp.Int16, b: Cpp.Int32) { // CHECK:STDOUT: %Negate.facet.loc296_3.3 => constants.%Negate.facet.aa9 // CHECK:STDOUT: %Negate.WithSelf.Op.type => constants.%Negate.WithSelf.Op.type.25a // CHECK:STDOUT: %.loc296_3.7 => constants.%.dcd -// CHECK:STDOUT: %impl.elem1.loc296_3.2 => constants.%Int32.Op.4dca31.19 -// CHECK:STDOUT: %specific_impl_fn.loc296_3.3 => constants.%Int32.Op.4dca31.19 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.53c -// CHECK:STDOUT: %.loc296_3.8 => constants.%.77c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.1bfa2a.2 -// CHECK:STDOUT: %impl.elem2.loc296_3.2 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %specific_impl_fn.loc296_3.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 +// CHECK:STDOUT: %impl.elem1.loc296_3.2 => constants.%Int32.Op.4dca31.20 +// CHECK:STDOUT: %specific_impl_fn.loc296_3.2 => constants.%Int32.Op.4dca31.20 +// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.195 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/operators/operators.carbon b/toolchain/check/testdata/interop/cpp/operators/operators.carbon index e887b74c3858..9272a788fb53 100644 --- a/toolchain/check/testdata/interop/cpp/operators/operators.carbon +++ b/toolchain/check/testdata/interop/cpp/operators/operators.carbon @@ -944,14 +944,17 @@ fn F() { // CHECK:STDOUT: %complement.patt: %pattern_type.bbc = value_binding_pattern complement [concrete] // CHECK:STDOUT: %operator_Tilde__carbon_thunk.type: type = fn_type @operator_Tilde__carbon_thunk [concrete] // CHECK:STDOUT: %operator_Tilde__carbon_thunk: %operator_Tilde__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e2f: %pattern_type.bbc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.790: %pattern_type.bbc = wrapper_binding_pattern self, %self.param_patt.e2f [concrete] -// CHECK:STDOUT: %C.cpp_destructor.type: type = fn_type @C.cpp_destructor [concrete] -// CHECK:STDOUT: %C.cpp_destructor: %C.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %C.Op.type: type = fn_type @C.Op [concrete] +// CHECK:STDOUT: %C.Op: %C.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%C.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.180: %SubobjectDestroy.type = facet_value %C, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.270: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.180) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.270, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -986,21 +989,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C.cpp_destructor.decl: %C.cpp_destructor.type = fn_decl @C.cpp_destructor [concrete = constants.%C.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc18 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bbc = ref_param_pattern [concrete = constants.%self.param_patt.e2f] -// CHECK:STDOUT: %self.patt: %pattern_type.bbc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.790] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1009,10 +999,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc8_18: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %C.ref.loc8_23: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value] -// CHECK:STDOUT: %.loc8_3: ref %C = splice_block %c.var {} -// CHECK:STDOUT: %addr.loc8: %ptr.0a2 = addr_of %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: ref %C = splice_block %c.var {} +// CHECK:STDOUT: %addr.loc8: %ptr.0a2 = addr_of %.loc8_3.1 // CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc8) -// CHECK:STDOUT: %.loc8_26: init %C to %.loc8_3 = mark_in_place_init %C__carbon_thunk.call +// CHECK:STDOUT: %.loc8_26: init %C to %.loc8_3.1 = mark_in_place_init %C__carbon_thunk.call // CHECK:STDOUT: assign %c.var, %.loc8_26 // CHECK:STDOUT: %.loc8_13: type = splice_block %C.ref.loc8_13 [concrete = constants.%C] { // CHECK:STDOUT: %Cpp.ref.loc8_10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1063,23 +1053,25 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %complement.patt: %pattern_type.bbc = value_binding_pattern complement [concrete = constants.%complement.patt] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc18_34.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_34.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc18_34.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc18_34.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_34.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc18_34.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18: = bound_method %.loc18_34.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18(%.loc18_34.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15: = bound_method %.loc15_29.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15(%.loc15_29.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%c.var) +// CHECK:STDOUT: %SelfDestruct.call.loc18: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc18_34.3) +// CHECK:STDOUT: %Destroy.facet.loc15_29.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_29.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc15_29.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc15_29.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_29.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc15_29.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc15_29.3) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%c.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call imports.%C.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_binary_operators.carbon @@ -1192,27 +1184,28 @@ fn F() { // CHECK:STDOUT: %operator_LessEqual__carbon_thunk: %operator_LessEqual__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %index.patt: %pattern_type.d94 = value_binding_pattern index [concrete] // CHECK:STDOUT: %int_42.20e: Core.IntLiteral = int_value 42 [concrete] -// CHECK:STDOUT: %self.param_patt.d5f: %pattern_type.b2b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7ef: %pattern_type.b2b = wrapper_binding_pattern self, %self.param_patt.d5f [concrete] // CHECK:STDOUT: %BinaryC.cpp_operator.type: type = fn_type @BinaryC.cpp_operator [concrete] // CHECK:STDOUT: %BinaryC.cpp_operator: %BinaryC.cpp_operator.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.81c: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.98e: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_42.db5: %i32 = int_value 42 [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc45 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc45 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc45 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %BinaryC.cpp_destructor.type: type = fn_type @BinaryC.cpp_destructor [concrete] -// CHECK:STDOUT: %BinaryC.cpp_destructor: %BinaryC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc23 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc45 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %BinaryC.Op.type: type = fn_type @BinaryC.Op [concrete] +// CHECK:STDOUT: %BinaryC.Op: %BinaryC.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%BinaryC.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.52a: %SubobjectDestroy.type = facet_value %BinaryC, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.238: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.52a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2a: %Destroy.type = facet_value %BinaryC, (%DestroyImpl.impl_witness.238, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1364,35 +1357,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %BinaryC.cpp_destructor.decl: %BinaryC.cpp_destructor.type = fn_decl @BinaryC.cpp_destructor [concrete = constants.%BinaryC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc45 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc45 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc23 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b2b = ref_param_pattern [concrete = constants.%self.param_patt.d5f] -// CHECK:STDOUT: %self.patt: %pattern_type.b2b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7ef] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %BinaryC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %BinaryC = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1401,10 +1367,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc8_25: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %BinaryC.ref.loc8_28: type = name_ref BinaryC, imports.%BinaryC.decl [concrete = constants.%BinaryC] // CHECK:STDOUT: %BinaryC.ref.loc8_36: %BinaryC.BinaryC.cpp_overload_set.type = name_ref BinaryC, imports.%BinaryC.BinaryC.cpp_overload_set.value [concrete = constants.%BinaryC.BinaryC.cpp_overload_set.value] -// CHECK:STDOUT: %.loc8_3: ref %BinaryC = splice_block %c1.var {} -// CHECK:STDOUT: %addr.loc8: %ptr.6da = addr_of %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: ref %BinaryC = splice_block %c1.var {} +// CHECK:STDOUT: %addr.loc8: %ptr.6da = addr_of %.loc8_3.1 // CHECK:STDOUT: %BinaryC__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%BinaryC__carbon_thunk.decl(%addr.loc8) -// CHECK:STDOUT: %.loc8_45: init %BinaryC to %.loc8_3 = mark_in_place_init %BinaryC__carbon_thunk.call.loc8 +// CHECK:STDOUT: %.loc8_45: init %BinaryC to %.loc8_3.1 = mark_in_place_init %BinaryC__carbon_thunk.call.loc8 // CHECK:STDOUT: assign %c1.var, %.loc8_45 // CHECK:STDOUT: %.loc8_14: type = splice_block %BinaryC.ref.loc8_14 [concrete = constants.%BinaryC] { // CHECK:STDOUT: %Cpp.ref.loc8_11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1419,10 +1385,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc9_25: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %BinaryC.ref.loc9_28: type = name_ref BinaryC, imports.%BinaryC.decl [concrete = constants.%BinaryC] // CHECK:STDOUT: %BinaryC.ref.loc9_36: %BinaryC.BinaryC.cpp_overload_set.type = name_ref BinaryC, imports.%BinaryC.BinaryC.cpp_overload_set.value [concrete = constants.%BinaryC.BinaryC.cpp_overload_set.value] -// CHECK:STDOUT: %.loc9_3: ref %BinaryC = splice_block %c2.var {} -// CHECK:STDOUT: %addr.loc9: %ptr.6da = addr_of %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: ref %BinaryC = splice_block %c2.var {} +// CHECK:STDOUT: %addr.loc9: %ptr.6da = addr_of %.loc9_3.1 // CHECK:STDOUT: %BinaryC__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%BinaryC__carbon_thunk.decl(%addr.loc9) -// CHECK:STDOUT: %.loc9_45: init %BinaryC to %.loc9_3 = mark_in_place_init %BinaryC__carbon_thunk.call.loc9 +// CHECK:STDOUT: %.loc9_45: init %BinaryC to %.loc9_3.1 = mark_in_place_init %BinaryC__carbon_thunk.call.loc9 // CHECK:STDOUT: assign %c2.var, %.loc9_45 // CHECK:STDOUT: %.loc9_14: type = splice_block %BinaryC.ref.loc9_14 [concrete = constants.%BinaryC] { // CHECK:STDOUT: %Cpp.ref.loc9_11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -1860,65 +1826,118 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %index.patt: %pattern_type.d94 = value_binding_pattern index [concrete = constants.%index.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc45: = bound_method %.loc45_44.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc45: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc45(%.loc45_44.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc44: = bound_method %.loc44_47.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc44: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc44(%.loc44_47.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc43: = bound_method %.loc43_35.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc43: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc43(%.loc43_35.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc42: = bound_method %.loc42_38.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc42: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc42(%.loc42_38.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc41: = bound_method %.loc41_35.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc41: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc41(%.loc41_35.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc40: = bound_method %.loc40_31.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc40: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc40(%.loc40_31.3) +// CHECK:STDOUT: %Destroy.facet.loc45_44.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc45_44.5: %Destroy.type = converted bool, %Destroy.facet.loc45_44.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc45_44.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc45_44.6: %Destroy.type = converted bool, %Destroy.facet.loc45_44.2 [concrete = constants.%Destroy.facet.e68] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23: = bound_method %.loc23_44.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23(%.loc23_44.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %.loc22_43.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%.loc22_43.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21: = bound_method %.loc21_44.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21(%.loc21_44.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc20: = bound_method %.loc20_43.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc20(%.loc20_43.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %.loc19_44.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%.loc19_44.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %.loc16_39.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%.loc16_39.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15: = bound_method %.loc15_41.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15(%.loc15_41.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14: = bound_method %.loc14_47.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14(%.loc14_47.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13: = bound_method %.loc13_44.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13(%.loc13_44.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: = bound_method %.loc12_41.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%.loc12_41.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %c2.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%c2.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %c1.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%c1.var) +// CHECK:STDOUT: %SelfDestruct.call.loc45: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc45_44.3) +// CHECK:STDOUT: %Destroy.facet.loc44_47.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc44_47.5: %Destroy.type = converted bool, %Destroy.facet.loc44_47.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc44_47.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc44_47.6: %Destroy.type = converted bool, %Destroy.facet.loc44_47.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc44: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc44_47.3) +// CHECK:STDOUT: %Destroy.facet.loc43_35.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc43_35.5: %Destroy.type = converted bool, %Destroy.facet.loc43_35.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc43_35.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc43_35.6: %Destroy.type = converted bool, %Destroy.facet.loc43_35.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc43: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc43_35.3) +// CHECK:STDOUT: %Destroy.facet.loc42_38.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc42_38.5: %Destroy.type = converted bool, %Destroy.facet.loc42_38.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc42_38.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc42_38.6: %Destroy.type = converted bool, %Destroy.facet.loc42_38.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc42: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc42_38.3) +// CHECK:STDOUT: %Destroy.facet.loc41_35.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc41_35.5: %Destroy.type = converted bool, %Destroy.facet.loc41_35.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc41_35.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc41_35.6: %Destroy.type = converted bool, %Destroy.facet.loc41_35.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc41: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc41_35.3) +// CHECK:STDOUT: %Destroy.facet.loc40_31.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc40_31.5: %Destroy.type = converted bool, %Destroy.facet.loc40_31.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc40_31.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc40_31.6: %Destroy.type = converted bool, %Destroy.facet.loc40_31.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc40: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%.loc40_31.3) +// CHECK:STDOUT: %Destroy.facet.loc23_44.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc23_44.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc23_44.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc23_44.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc23_44.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc23_44.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc23: init %empty_tuple.type = call %SelfDestruct.specific_fn.7(%.loc23_44.3) +// CHECK:STDOUT: %Destroy.facet.loc22_43.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc22_43.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc22_43.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc22_43.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc22_43.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc22_43.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.8(%.loc22_43.3) +// CHECK:STDOUT: %Destroy.facet.loc21_44.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc21_44.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc21_44.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc21_44.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc21_44.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc21_44.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc21: init %empty_tuple.type = call %SelfDestruct.specific_fn.9(%.loc21_44.3) +// CHECK:STDOUT: %Destroy.facet.loc20_43.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc20_43.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc20_43.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc20_43.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc20_43.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc20_43.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc20: init %empty_tuple.type = call %SelfDestruct.specific_fn.10(%.loc20_43.3) +// CHECK:STDOUT: %Destroy.facet.loc19_44.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc19_44.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc19_44.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc19_44.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc19_44.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc19_44.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.11(%.loc19_44.3) +// CHECK:STDOUT: %Destroy.facet.loc16_39.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc16_39.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc16_39.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc16_39.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc16_39.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc16_39.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.12(%.loc16_39.3) +// CHECK:STDOUT: %Destroy.facet.loc15_41.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc15_41.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc15_41.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc15_41.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc15_41.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc15_41.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15: init %empty_tuple.type = call %SelfDestruct.specific_fn.13(%.loc15_41.3) +// CHECK:STDOUT: %Destroy.facet.loc14_47.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc14_47.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc14_47.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc14_47.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc14_47.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc14_47.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14: init %empty_tuple.type = call %SelfDestruct.specific_fn.14(%.loc14_47.3) +// CHECK:STDOUT: %Destroy.facet.loc13_44.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc13_44.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc13_44.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc13_44.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc13_44.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc13_44.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13: init %empty_tuple.type = call %SelfDestruct.specific_fn.15(%.loc13_44.3) +// CHECK:STDOUT: %Destroy.facet.loc12_41.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc12_41.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc12_41.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc12_41.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc12_41.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc12_41.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.16(%.loc12_41.3) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.17(%c2.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.c2a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.18(%c1.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc45(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc45(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc45(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23(%self.param: ref %BinaryC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23(%self.param: ref %BinaryC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %BinaryC.cpp_destructor.call: init %empty_tuple.type = call imports.%BinaryC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc45(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- multiple_calls.carbon // CHECK:STDOUT: @@ -1939,14 +1958,17 @@ fn F() { // CHECK:STDOUT: %operator_Plus__carbon_thunk: %operator_Plus__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %c4.patt: %pattern_type.b2b = value_binding_pattern c4 [concrete] // CHECK:STDOUT: %c5.patt: %pattern_type.b2b = value_binding_pattern c5 [concrete] -// CHECK:STDOUT: %self.param_patt.d5f: %pattern_type.b2b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7ef: %pattern_type.b2b = wrapper_binding_pattern self, %self.param_patt.d5f [concrete] -// CHECK:STDOUT: %BinaryC.cpp_destructor.type: type = fn_type @BinaryC.cpp_destructor [concrete] -// CHECK:STDOUT: %BinaryC.cpp_destructor: %BinaryC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %BinaryC.Op.type: type = fn_type @BinaryC.Op [concrete] +// CHECK:STDOUT: %BinaryC.Op: %BinaryC.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%BinaryC.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.52a: %SubobjectDestroy.type = facet_value %BinaryC, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.238: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.52a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %BinaryC, (%DestroyImpl.impl_witness.238, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1966,21 +1988,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %BinaryC.cpp_destructor.decl: %BinaryC.cpp_destructor.type = fn_decl @BinaryC.cpp_destructor [concrete = constants.%BinaryC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc12 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b2b = ref_param_pattern [concrete = constants.%self.param_patt.d5f] -// CHECK:STDOUT: %self.patt: %pattern_type.b2b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7ef] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %BinaryC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %BinaryC = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2079,27 +2088,37 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c5.patt: %pattern_type.b2b = value_binding_pattern c5 [concrete = constants.%c5.patt] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc12_35.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_35.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc12_35.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc12_35.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_35.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc12_35.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: = bound_method %.loc12_35.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%.loc12_35.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %.loc11_28.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%.loc11_28.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_28.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_28.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_45.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_45.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_45.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_45.3) +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc12_35.3) +// CHECK:STDOUT: %Destroy.facet.loc11_28.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_28.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc11_28.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_28.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_28.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc11_28.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc11_28.3) +// CHECK:STDOUT: %Destroy.facet.loc10_28.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_28.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc10_28.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_28.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_28.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc10_28.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc10_28.3) +// CHECK:STDOUT: %Destroy.facet.loc9_45.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_45.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc9_45.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_45.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_45.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc9_45.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc9_45.3) +// CHECK:STDOUT: %Destroy.facet.loc8_45.1: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_45.5: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc8_45.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_45.2: %Destroy.type = facet_value constants.%BinaryC, (constants.%DestroyImpl.impl_witness.238, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_45.6: %Destroy.type = converted constants.%BinaryC, %Destroy.facet.loc8_45.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc8_45.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %BinaryC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12(%self.param: ref %BinaryC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %BinaryC.cpp_destructor.call: init %empty_tuple.type = call imports.%BinaryC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_rewrite_spaceship.carbon @@ -2128,22 +2147,23 @@ fn F() { // CHECK:STDOUT: %less_than_or_equal.patt: %pattern_type.831 = value_binding_pattern less_than_or_equal [concrete] // CHECK:STDOUT: %operator_LessEqual__carbon_thunk.type: type = fn_type @operator_LessEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_LessEqual__carbon_thunk: %operator_LessEqual__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc32 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc32 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc32 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e2f: %pattern_type.bbc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.790: %pattern_type.bbc = wrapper_binding_pattern self, %self.param_patt.e2f [concrete] -// CHECK:STDOUT: %C.cpp_destructor.type: type = fn_type @C.cpp_destructor [concrete] -// CHECK:STDOUT: %C.cpp_destructor: %C.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc32 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %C.Op.type: type = fn_type @C.Op [concrete] +// CHECK:STDOUT: %C.Op: %C.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%C.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.180: %SubobjectDestroy.type = facet_value %C, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.270: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.180) [concrete] +// CHECK:STDOUT: %Destroy.facet.9cf: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.270, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2168,35 +2188,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C.cpp_destructor.decl: %C.cpp_destructor.type = fn_decl @C.cpp_destructor [concrete = constants.%C.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc32 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc32 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bbc = ref_param_pattern [concrete = constants.%self.param_patt.e2f] -// CHECK:STDOUT: %self.patt: %pattern_type.bbc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.790] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2205,10 +2198,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc15_19: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %C.ref.loc15_22: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %C.ref.loc15_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value] -// CHECK:STDOUT: %.loc15_3: ref %C = splice_block %c1.var {} -// CHECK:STDOUT: %addr.loc15: %ptr.0a2 = addr_of %.loc15_3 +// CHECK:STDOUT: %.loc15_3.1: ref %C = splice_block %c1.var {} +// CHECK:STDOUT: %addr.loc15: %ptr.0a2 = addr_of %.loc15_3.1 // CHECK:STDOUT: %C__carbon_thunk.call.loc15: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc15) -// CHECK:STDOUT: %.loc15_27: init %C to %.loc15_3 = mark_in_place_init %C__carbon_thunk.call.loc15 +// CHECK:STDOUT: %.loc15_27: init %C to %.loc15_3.1 = mark_in_place_init %C__carbon_thunk.call.loc15 // CHECK:STDOUT: assign %c1.var, %.loc15_27 // CHECK:STDOUT: %.loc15_14: type = splice_block %C.ref.loc15_14 [concrete = constants.%C] { // CHECK:STDOUT: %Cpp.ref.loc15_11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -2223,10 +2216,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc16_19: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %C.ref.loc16_22: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %C.ref.loc16_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value] -// CHECK:STDOUT: %.loc16_3: ref %C = splice_block %c2.var {} -// CHECK:STDOUT: %addr.loc16: %ptr.0a2 = addr_of %.loc16_3 +// CHECK:STDOUT: %.loc16_3.1: ref %C = splice_block %c2.var {} +// CHECK:STDOUT: %addr.loc16: %ptr.0a2 = addr_of %.loc16_3.1 // CHECK:STDOUT: %C__carbon_thunk.call.loc16: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr.loc16) -// CHECK:STDOUT: %.loc16_27: init %C to %.loc16_3 = mark_in_place_init %C__carbon_thunk.call.loc16 +// CHECK:STDOUT: %.loc16_27: init %C to %.loc16_3.1 = mark_in_place_init %C__carbon_thunk.call.loc16 // CHECK:STDOUT: assign %c2.var, %.loc16_27 // CHECK:STDOUT: %.loc16_14: type = splice_block %C.ref.loc16_14 [concrete = constants.%C] { // CHECK:STDOUT: %Cpp.ref.loc16_11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -2289,37 +2282,34 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %less_than_or_equal.patt: %pattern_type.831 = value_binding_pattern less_than_or_equal [concrete = constants.%less_than_or_equal.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc32: = bound_method %.loc32_44.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc32: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc32(%.loc32_44.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %.loc19_38.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%.loc19_38.3) +// CHECK:STDOUT: %Destroy.facet.loc32_44.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc32_44.5: %Destroy.type = converted bool, %Destroy.facet.loc32_44.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc32_44.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc32_44.6: %Destroy.type = converted bool, %Destroy.facet.loc32_44.2 [concrete = constants.%Destroy.facet.e68] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %c2.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%c2.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15: = bound_method %c1.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15(%c1.var) +// CHECK:STDOUT: %SelfDestruct.call.loc32: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc32_44.3) +// CHECK:STDOUT: %Destroy.facet.loc19_38.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc19_38.5: %Destroy.type = converted bool, %Destroy.facet.loc19_38.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc19_38.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc19_38.6: %Destroy.type = converted bool, %Destroy.facet.loc19_38.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc19_38.3) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.9cf] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.9cf] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.9cf] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.9cf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%c2.var) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.9cf] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet.9cf] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.9cf] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet.9cf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%c1.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc32(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call imports.%C.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc32(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_rewrite_equal.carbon // CHECK:STDOUT: @@ -2343,22 +2333,23 @@ fn F() { // CHECK:STDOUT: %operator_EqualEqual__carbon_thunk.type: type = fn_type @operator_EqualEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_EqualEqual__carbon_thunk: %operator_EqualEqual__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %not_equal.patt: %pattern_type.831 = value_binding_pattern not_equal [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.765: %pattern_type.4e7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.9b7: %pattern_type.4e7 = wrapper_binding_pattern self, %self.param_patt.765 [concrete] -// CHECK:STDOUT: %EqualC.cpp_destructor.type: type = fn_type @EqualC.cpp_destructor [concrete] -// CHECK:STDOUT: %EqualC.cpp_destructor: %EqualC.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %EqualC.Op.type: type = fn_type @EqualC.Op [concrete] +// CHECK:STDOUT: %EqualC.Op: %EqualC.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%EqualC.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.873: %SubobjectDestroy.type = facet_value %EqualC, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.90e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.873) [concrete] +// CHECK:STDOUT: %Destroy.facet.d05: %Destroy.type = facet_value %EqualC, (%DestroyImpl.impl_witness.90e, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2378,35 +2369,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %EqualC.cpp_destructor.decl: %EqualC.cpp_destructor.type = fn_decl @EqualC.cpp_destructor [concrete = constants.%EqualC.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc13 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4e7 = ref_param_pattern [concrete = constants.%self.param_patt.765] -// CHECK:STDOUT: %self.patt: %pattern_type.4e7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.9b7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %EqualC = ref_param call_param0 -// CHECK:STDOUT: %self: ref %EqualC = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2415,10 +2379,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc12_24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %EqualC.ref.loc12_27: type = name_ref EqualC, imports.%EqualC.decl [concrete = constants.%EqualC] // CHECK:STDOUT: %EqualC.ref.loc12_34: %EqualC.EqualC.cpp_overload_set.type = name_ref EqualC, imports.%EqualC.EqualC.cpp_overload_set.value [concrete = constants.%EqualC.EqualC.cpp_overload_set.value] -// CHECK:STDOUT: %.loc12_3: ref %EqualC = splice_block %c1.var {} -// CHECK:STDOUT: %addr.loc12: %ptr.ebc = addr_of %.loc12_3 +// CHECK:STDOUT: %.loc12_3.1: ref %EqualC = splice_block %c1.var {} +// CHECK:STDOUT: %addr.loc12: %ptr.ebc = addr_of %.loc12_3.1 // CHECK:STDOUT: %EqualC__carbon_thunk.call.loc12: init %empty_tuple.type = call imports.%EqualC__carbon_thunk.decl(%addr.loc12) -// CHECK:STDOUT: %.loc12_42: init %EqualC to %.loc12_3 = mark_in_place_init %EqualC__carbon_thunk.call.loc12 +// CHECK:STDOUT: %.loc12_42: init %EqualC to %.loc12_3.1 = mark_in_place_init %EqualC__carbon_thunk.call.loc12 // CHECK:STDOUT: assign %c1.var, %.loc12_42 // CHECK:STDOUT: %.loc12_14: type = splice_block %EqualC.ref.loc12_14 [concrete = constants.%EqualC] { // CHECK:STDOUT: %Cpp.ref.loc12_11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -2433,10 +2397,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc13_24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %EqualC.ref.loc13_27: type = name_ref EqualC, imports.%EqualC.decl [concrete = constants.%EqualC] // CHECK:STDOUT: %EqualC.ref.loc13_34: %EqualC.EqualC.cpp_overload_set.type = name_ref EqualC, imports.%EqualC.EqualC.cpp_overload_set.value [concrete = constants.%EqualC.EqualC.cpp_overload_set.value] -// CHECK:STDOUT: %.loc13_3: ref %EqualC = splice_block %c2.var {} -// CHECK:STDOUT: %addr.loc13: %ptr.ebc = addr_of %.loc13_3 +// CHECK:STDOUT: %.loc13_3.1: ref %EqualC = splice_block %c2.var {} +// CHECK:STDOUT: %addr.loc13: %ptr.ebc = addr_of %.loc13_3.1 // CHECK:STDOUT: %EqualC__carbon_thunk.call.loc13: init %empty_tuple.type = call imports.%EqualC__carbon_thunk.decl(%addr.loc13) -// CHECK:STDOUT: %.loc13_42: init %EqualC to %.loc13_3 = mark_in_place_init %EqualC__carbon_thunk.call.loc13 +// CHECK:STDOUT: %.loc13_42: init %EqualC to %.loc13_3.1 = mark_in_place_init %EqualC__carbon_thunk.call.loc13 // CHECK:STDOUT: assign %c2.var, %.loc13_42 // CHECK:STDOUT: %.loc13_14: type = splice_block %EqualC.ref.loc13_14 [concrete = constants.%EqualC] { // CHECK:STDOUT: %Cpp.ref.loc13_11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -2473,35 +2437,28 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %not_equal.patt: %pattern_type.831 = value_binding_pattern not_equal [concrete = constants.%not_equal.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %.loc16_31.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%.loc16_31.3) +// CHECK:STDOUT: %Destroy.facet.loc16_31.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc16_31.5: %Destroy.type = converted bool, %Destroy.facet.loc16_31.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc16_31.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc16_31.6: %Destroy.type = converted bool, %Destroy.facet.loc16_31.2 [concrete = constants.%Destroy.facet.e68] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13: = bound_method %c2.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13(%c2.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12: = bound_method %c1.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12(%c1.var) +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc16_31.3) +// CHECK:STDOUT: %Destroy.facet.loc13_3.1: %Destroy.type = facet_value constants.%EqualC, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.d05] +// CHECK:STDOUT: %.loc13_3.2: %Destroy.type = converted constants.%EqualC, %Destroy.facet.loc13_3.1 [concrete = constants.%Destroy.facet.d05] +// CHECK:STDOUT: %Destroy.facet.loc13_3.2: %Destroy.type = facet_value constants.%EqualC, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.d05] +// CHECK:STDOUT: %.loc13_3.3: %Destroy.type = converted constants.%EqualC, %Destroy.facet.loc13_3.2 [concrete = constants.%Destroy.facet.d05] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%c2.var) +// CHECK:STDOUT: %Destroy.facet.loc12_3.1: %Destroy.type = facet_value constants.%EqualC, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.d05] +// CHECK:STDOUT: %.loc12_3.2: %Destroy.type = converted constants.%EqualC, %Destroy.facet.loc12_3.1 [concrete = constants.%Destroy.facet.d05] +// CHECK:STDOUT: %Destroy.facet.loc12_3.2: %Destroy.type = facet_value constants.%EqualC, (constants.%DestroyImpl.impl_witness.90e, constants.%custom_witness.576) [concrete = constants.%Destroy.facet.d05] +// CHECK:STDOUT: %.loc12_3.3: %Destroy.type = converted constants.%EqualC, %Destroy.facet.loc12_3.2 [concrete = constants.%Destroy.facet.d05] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%c1.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13(%self.param: ref %EqualC) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13(%self.param: ref %EqualC) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %EqualC.cpp_destructor.call: init %empty_tuple.type = call imports.%EqualC.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- import_single_namespace.carbon // CHECK:STDOUT: @@ -2520,14 +2477,17 @@ fn F() { // CHECK:STDOUT: %c3.patt: %pattern_type.7cb = value_binding_pattern c3 [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk.type: type = fn_type @operator_Plus__carbon_thunk [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk: %operator_Plus__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.bfc: %pattern_type.7cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.c51: %pattern_type.7cb = wrapper_binding_pattern self, %self.param_patt.bfc [concrete] -// CHECK:STDOUT: %C.cpp_destructor.type: type = fn_type @C.cpp_destructor [concrete] -// CHECK:STDOUT: %C.cpp_destructor: %C.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %C.Op.type: type = fn_type @C.Op [concrete] +// CHECK:STDOUT: %C.Op: %C.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.1c5: = custom_witness (%C.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e82: %SubobjectDestroy.type = facet_value %C, (%custom_witness.1c5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.920: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e82) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.920, %custom_witness.1c5) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2551,21 +2511,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C.cpp_destructor.decl: %C.cpp_destructor.type = fn_decl @C.cpp_destructor [concrete = constants.%C.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7cb = ref_param_pattern [concrete = constants.%self.param_patt.bfc] -// CHECK:STDOUT: %self.patt: %pattern_type.7cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c51] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2629,23 +2576,25 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c3.patt: %pattern_type.7cb = value_binding_pattern c3 [concrete = constants.%c3.patt] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc10_31.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.920, constants.%custom_witness.1c5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_31.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_31.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_31.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.920, constants.%custom_witness.1c5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_31.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_31.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_31.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_31.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_31.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_31.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_31.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_31.3) +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_31.3) +// CHECK:STDOUT: %Destroy.facet.loc9_31.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.920, constants.%custom_witness.1c5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_31.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_31.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_31.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.920, constants.%custom_witness.1c5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_31.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_31.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_31.3) +// CHECK:STDOUT: %Destroy.facet.loc8_31.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.920, constants.%custom_witness.1c5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_31.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_31.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_31.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.920, constants.%custom_witness.1c5) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_31.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_31.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc8_31.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call imports.%C.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_multiple_namespaces.carbon @@ -2675,22 +2624,23 @@ fn F() { // CHECK:STDOUT: %c4.patt: %pattern_type.00d = value_binding_pattern c4 [concrete] // CHECK:STDOUT: %operator_Minus__carbon_thunk.type: type = fn_type @operator_Minus__carbon_thunk [concrete] // CHECK:STDOUT: %operator_Minus__carbon_thunk: %operator_Minus__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.79f: %pattern_type.00d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d7a: %pattern_type.00d = wrapper_binding_pattern self, %self.param_patt.79f [concrete] -// CHECK:STDOUT: %C2.cpp_destructor.type: type = fn_type @C2.cpp_destructor [concrete] -// CHECK:STDOUT: %C2.cpp_destructor: %C2.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b11: %pattern_type.da8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.fde: %pattern_type.da8 = wrapper_binding_pattern self, %self.param_patt.b11 [concrete] -// CHECK:STDOUT: %C1.cpp_destructor.type: type = fn_type @C1.cpp_destructor [concrete] -// CHECK:STDOUT: %C1.cpp_destructor: %C1.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %C2.Op.type: type = fn_type @C2.Op [concrete] +// CHECK:STDOUT: %C2.Op: %C2.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.e64: = custom_witness (%C2.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c98: %SubobjectDestroy.type = facet_value %C2, (%custom_witness.e64) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.369: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c98) [concrete] +// CHECK:STDOUT: %Destroy.facet.1c7: %Destroy.type = facet_value %C2, (%DestroyImpl.impl_witness.369, %custom_witness.e64) [concrete] +// CHECK:STDOUT: %C1.Op.type: type = fn_type @C1.Op [concrete] +// CHECK:STDOUT: %C1.Op: %C1.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.c7f: = custom_witness (%C1.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a60: %SubobjectDestroy.type = facet_value %C1, (%custom_witness.c7f) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e1b: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a60) [concrete] +// CHECK:STDOUT: %Destroy.facet.827: %Destroy.type = facet_value %C1, (%DestroyImpl.impl_witness.e1b, %custom_witness.c7f) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2731,33 +2681,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C2.cpp_destructor.decl: %C2.cpp_destructor.type = fn_decl @C2.cpp_destructor [concrete = constants.%C2.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %C1.cpp_destructor.decl: %C1.cpp_destructor.type = fn_decl @C1.cpp_destructor [concrete = constants.%C1.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.00d = ref_param_pattern [concrete = constants.%self.param_patt.79f] -// CHECK:STDOUT: %self.patt: %pattern_type.00d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d7a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.da8 = ref_param_pattern [concrete = constants.%self.param_patt.b11] -// CHECK:STDOUT: %self.patt: %pattern_type.da8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.fde] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2842,35 +2767,31 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c4.patt: %pattern_type.00d = value_binding_pattern c4 [concrete = constants.%c4.patt] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc11_33.1: %Destroy.type = facet_value constants.%C2, (constants.%DestroyImpl.impl_witness.369, constants.%custom_witness.e64) [concrete = constants.%Destroy.facet.1c7] +// CHECK:STDOUT: %.loc11_33.5: %Destroy.type = converted constants.%C2, %Destroy.facet.loc11_33.1 [concrete = constants.%Destroy.facet.1c7] +// CHECK:STDOUT: %Destroy.facet.loc11_33.2: %Destroy.type = facet_value constants.%C2, (constants.%DestroyImpl.impl_witness.369, constants.%custom_witness.e64) [concrete = constants.%Destroy.facet.1c7] +// CHECK:STDOUT: %.loc11_33.6: %Destroy.type = converted constants.%C2, %Destroy.facet.loc11_33.2 [concrete = constants.%Destroy.facet.1c7] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11: = bound_method %.loc11_33.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11(%.loc11_33.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_33.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_33.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_36.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_36.3) +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc11_33.3) +// CHECK:STDOUT: %Destroy.facet.loc10_33.1: %Destroy.type = facet_value constants.%C2, (constants.%DestroyImpl.impl_witness.369, constants.%custom_witness.e64) [concrete = constants.%Destroy.facet.1c7] +// CHECK:STDOUT: %.loc10_33.5: %Destroy.type = converted constants.%C2, %Destroy.facet.loc10_33.1 [concrete = constants.%Destroy.facet.1c7] +// CHECK:STDOUT: %Destroy.facet.loc10_33.2: %Destroy.type = facet_value constants.%C2, (constants.%DestroyImpl.impl_witness.369, constants.%custom_witness.e64) [concrete = constants.%Destroy.facet.1c7] +// CHECK:STDOUT: %.loc10_33.6: %Destroy.type = converted constants.%C2, %Destroy.facet.loc10_33.2 [concrete = constants.%Destroy.facet.1c7] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_36.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_36.3) +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_33.3) +// CHECK:STDOUT: %Destroy.facet.loc9_36.1: %Destroy.type = facet_value constants.%C2, (constants.%DestroyImpl.impl_witness.369, constants.%custom_witness.e64) [concrete = constants.%Destroy.facet.1c7] +// CHECK:STDOUT: %.loc9_36.5: %Destroy.type = converted constants.%C2, %Destroy.facet.loc9_36.1 [concrete = constants.%Destroy.facet.1c7] +// CHECK:STDOUT: %Destroy.facet.loc9_36.2: %Destroy.type = facet_value constants.%C2, (constants.%DestroyImpl.impl_witness.369, constants.%custom_witness.e64) [concrete = constants.%Destroy.facet.1c7] +// CHECK:STDOUT: %.loc9_36.6: %Destroy.type = converted constants.%C2, %Destroy.facet.loc9_36.2 [concrete = constants.%Destroy.facet.1c7] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc9_36.3) +// CHECK:STDOUT: %Destroy.facet.loc8_36.1: %Destroy.type = facet_value constants.%C1, (constants.%DestroyImpl.impl_witness.e1b, constants.%custom_witness.c7f) [concrete = constants.%Destroy.facet.827] +// CHECK:STDOUT: %.loc8_36.5: %Destroy.type = converted constants.%C1, %Destroy.facet.loc8_36.1 [concrete = constants.%Destroy.facet.827] +// CHECK:STDOUT: %Destroy.facet.loc8_36.2: %Destroy.type = facet_value constants.%C1, (constants.%DestroyImpl.impl_witness.e1b, constants.%custom_witness.c7f) [concrete = constants.%Destroy.facet.827] +// CHECK:STDOUT: %.loc8_36.6: %Destroy.type = converted constants.%C1, %Destroy.facet.loc8_36.2 [concrete = constants.%Destroy.facet.827] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc8_36.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %C2) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %C2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %C2.cpp_destructor.call: init %empty_tuple.type = call imports.%C2.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %C1) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %C1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %C1.cpp_destructor.call: init %empty_tuple.type = call imports.%C1.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_import_operands_in_namespace_operator_in_global.carbon @@ -2888,14 +2809,17 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %c2.patt: %pattern_type.73b = value_binding_pattern c2 [concrete] // CHECK:STDOUT: %c3.patt: %pattern_type.73b = value_binding_pattern c3 [concrete] -// CHECK:STDOUT: %self.param_patt.a6a: %pattern_type.73b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.fd6: %pattern_type.73b = wrapper_binding_pattern self, %self.param_patt.a6a [concrete] -// CHECK:STDOUT: %C.cpp_destructor.type: type = fn_type @C.cpp_destructor [concrete] -// CHECK:STDOUT: %C.cpp_destructor: %C.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %C.Op.type: type = fn_type @C.Op [concrete] +// CHECK:STDOUT: %C.Op: %C.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.f95: = custom_witness (%C.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.946: %SubobjectDestroy.type = facet_value %C, (%custom_witness.f95) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.05e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.946) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.05e, %custom_witness.f95) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2914,21 +2838,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C.cpp_destructor.decl: %C.cpp_destructor.type = fn_decl @C.cpp_destructor [concrete = constants.%C.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.73b = ref_param_pattern [concrete = constants.%self.param_patt.a6a] -// CHECK:STDOUT: %self.patt: %pattern_type.73b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.fd6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -2982,21 +2893,19 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c3.patt: %pattern_type.73b = value_binding_pattern c3 [concrete = constants.%c3.patt] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc9_47.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.05e, constants.%custom_witness.f95) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_47.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_47.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_47.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.05e, constants.%custom_witness.f95) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_47.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_47.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_47.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_47.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_47.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_47.3) +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc9_47.3) +// CHECK:STDOUT: %Destroy.facet.loc8_47.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.05e, constants.%custom_witness.f95) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_47.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_47.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_47.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.05e, constants.%custom_witness.f95) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_47.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_47.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc8_47.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call imports.%C.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_inner_class.carbon @@ -3017,14 +2926,17 @@ fn F() { // CHECK:STDOUT: %c3.patt: %pattern_type.aac = value_binding_pattern c3 [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk.type: type = fn_type @operator_Plus__carbon_thunk [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk: %operator_Plus__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.f64: %pattern_type.aac = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.fdd: %pattern_type.aac = wrapper_binding_pattern self, %self.param_patt.f64 [concrete] -// CHECK:STDOUT: %C.cpp_destructor.type: type = fn_type @C.cpp_destructor [concrete] -// CHECK:STDOUT: %C.cpp_destructor: %C.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %C.Op.type: type = fn_type @C.Op [concrete] +// CHECK:STDOUT: %C.Op: %C.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.6c7: = custom_witness (%C.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6a0: %SubobjectDestroy.type = facet_value %C, (%custom_witness.6c7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.adc: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6a0) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.adc, %custom_witness.6c7) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3045,21 +2957,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C.cpp_destructor.decl: %C.cpp_destructor.type = fn_decl @C.cpp_destructor [concrete = constants.%C.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.aac = ref_param_pattern [concrete = constants.%self.param_patt.f64] -// CHECK:STDOUT: %self.patt: %pattern_type.aac = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.fdd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -3123,23 +3022,25 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c3.patt: %pattern_type.aac = value_binding_pattern c3 [concrete = constants.%c3.patt] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc10_31.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.adc, constants.%custom_witness.6c7) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_31.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_31.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_31.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.adc, constants.%custom_witness.6c7) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_31.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_31.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_31.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_31.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_31.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_31.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_31.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_31.3) +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_31.3) +// CHECK:STDOUT: %Destroy.facet.loc9_31.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.adc, constants.%custom_witness.6c7) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_31.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_31.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_31.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.adc, constants.%custom_witness.6c7) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_31.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_31.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_31.3) +// CHECK:STDOUT: %Destroy.facet.loc8_31.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.adc, constants.%custom_witness.6c7) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_31.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_31.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_31.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.adc, constants.%custom_witness.6c7) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_31.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_31.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc8_31.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call imports.%C.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_inner_class_in_namespace.carbon @@ -3160,14 +3061,17 @@ fn F() { // CHECK:STDOUT: %c3.patt: %pattern_type.f6e = value_binding_pattern c3 [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk.type: type = fn_type @operator_Plus__carbon_thunk [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk: %operator_Plus__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.83b: %pattern_type.f6e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.afb: %pattern_type.f6e = wrapper_binding_pattern self, %self.param_patt.83b [concrete] -// CHECK:STDOUT: %C.cpp_destructor.type: type = fn_type @C.cpp_destructor [concrete] -// CHECK:STDOUT: %C.cpp_destructor: %C.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %C.Op.type: type = fn_type @C.Op [concrete] +// CHECK:STDOUT: %C.Op: %C.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.e14: = custom_witness (%C.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.1c1: %SubobjectDestroy.type = facet_value %C, (%custom_witness.e14) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4b4: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.1c1) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.4b4, %custom_witness.e14) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3192,21 +3096,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C.cpp_destructor.decl: %C.cpp_destructor.type = fn_decl @C.cpp_destructor [concrete = constants.%C.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f6e = ref_param_pattern [concrete = constants.%self.param_patt.83b] -// CHECK:STDOUT: %self.patt: %pattern_type.f6e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.afb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -3275,23 +3166,25 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c3.patt: %pattern_type.f6e = value_binding_pattern c3 [concrete = constants.%c3.patt] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc10_33.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.4b4, constants.%custom_witness.e14) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_33.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_33.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_33.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.4b4, constants.%custom_witness.e14) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_33.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_33.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_33.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_33.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %.loc9_35.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%.loc9_35.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_35.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_35.3) +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_33.3) +// CHECK:STDOUT: %Destroy.facet.loc9_35.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.4b4, constants.%custom_witness.e14) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_35.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_35.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_35.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.4b4, constants.%custom_witness.e14) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_35.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc9_35.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc9_35.3) +// CHECK:STDOUT: %Destroy.facet.loc8_35.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.4b4, constants.%custom_witness.e14) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_35.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_35.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_35.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.4b4, constants.%custom_witness.e14) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_35.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc8_35.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc8_35.3) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call imports.%C.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_member_add_with.carbon @@ -3310,20 +3203,23 @@ fn F() { // CHECK:STDOUT: %MemberClass__carbon_thunk: %MemberClass__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %c2.patt: %pattern_type.809 = ref_binding_pattern c2 [concrete] // CHECK:STDOUT: %c2.var_patt: %pattern_type.809 = var_pattern %c2.patt [concrete] -// CHECK:STDOUT: %self.param_patt.5e6: %pattern_type.809 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.82a: %pattern_type.809 = wrapper_binding_pattern self, %self.param_patt.5e6 [concrete] // CHECK:STDOUT: %operator_Minus__carbon_thunk.type: type = fn_type @operator_Minus__carbon_thunk [concrete] // CHECK:STDOUT: %operator_Minus__carbon_thunk: %operator_Minus__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %c3.patt: %pattern_type.809 = ref_binding_pattern c3 [concrete] // CHECK:STDOUT: %c3.var_patt: %pattern_type.809 = var_pattern %c3.patt [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk.type: type = fn_type @operator_Plus__carbon_thunk [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk: %operator_Plus__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %MemberClass.cpp_destructor.type: type = fn_type @MemberClass.cpp_destructor [concrete] -// CHECK:STDOUT: %MemberClass.cpp_destructor: %MemberClass.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %MemberClass.Op.type: type = fn_type @MemberClass.Op [concrete] +// CHECK:STDOUT: %MemberClass.Op: %MemberClass.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%MemberClass.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.69a: %SubobjectDestroy.type = facet_value %MemberClass, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e26: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.69a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %MemberClass, (%DestroyImpl.impl_witness.e26, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3348,21 +3244,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %MemberClass.cpp_destructor.decl: %MemberClass.cpp_destructor.type = fn_decl @MemberClass.cpp_destructor [concrete = constants.%MemberClass.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.809 = ref_param_pattern [concrete = constants.%self.param_patt.5e6] -// CHECK:STDOUT: %self.patt: %pattern_type.809 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.82a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MemberClass = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MemberClass = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -3371,10 +3254,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc8_29: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %MemberClass.ref.loc8_32: type = name_ref MemberClass, imports.%MemberClass.decl [concrete = constants.%MemberClass] // CHECK:STDOUT: %MemberClass.ref.loc8_44: %MemberClass.MemberClass.cpp_overload_set.type = name_ref MemberClass, imports.%MemberClass.MemberClass.cpp_overload_set.value [concrete = constants.%MemberClass.MemberClass.cpp_overload_set.value] -// CHECK:STDOUT: %.loc8_3: ref %MemberClass = splice_block %c1.var {} -// CHECK:STDOUT: %addr.loc8: %ptr.ba2 = addr_of %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: ref %MemberClass = splice_block %c1.var {} +// CHECK:STDOUT: %addr.loc8: %ptr.ba2 = addr_of %.loc8_3.1 // CHECK:STDOUT: %MemberClass__carbon_thunk.call: init %empty_tuple.type = call imports.%MemberClass__carbon_thunk.decl(%addr.loc8) -// CHECK:STDOUT: %.loc8_57: init %MemberClass to %.loc8_3 = mark_in_place_init %MemberClass__carbon_thunk.call +// CHECK:STDOUT: %.loc8_57: init %MemberClass to %.loc8_3.1 = mark_in_place_init %MemberClass__carbon_thunk.call // CHECK:STDOUT: assign %c1.var, %.loc8_57 // CHECK:STDOUT: %.loc8_14: type = splice_block %MemberClass.ref.loc8_14 [concrete = constants.%MemberClass] { // CHECK:STDOUT: %Cpp.ref.loc8_11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -3387,10 +3270,10 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %c2.var: ref %MemberClass = var_storage %c2.var_patt // CHECK:STDOUT: %c1.ref.loc9: ref %MemberClass = name_ref c1, %c1 -// CHECK:STDOUT: %.loc9_3: ref %MemberClass = splice_block %c2.var {} -// CHECK:STDOUT: %addr.loc9: %ptr.ba2 = addr_of %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: ref %MemberClass = splice_block %c2.var {} +// CHECK:STDOUT: %addr.loc9: %ptr.ba2 = addr_of %.loc9_3.1 // CHECK:STDOUT: %operator_Minus__carbon_thunk.call: init %empty_tuple.type = call imports.%operator_Minus__carbon_thunk.decl(%c1.ref.loc9, %addr.loc9) -// CHECK:STDOUT: %.loc9_29: init %MemberClass to %.loc9_3 = mark_in_place_init %operator_Minus__carbon_thunk.call +// CHECK:STDOUT: %.loc9_29: init %MemberClass to %.loc9_3.1 = mark_in_place_init %operator_Minus__carbon_thunk.call // CHECK:STDOUT: assign %c2.var, %.loc9_29 // CHECK:STDOUT: %.loc9_14: type = splice_block %MemberClass.ref.loc9 [concrete = constants.%MemberClass] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -3404,13 +3287,13 @@ fn F() { // CHECK:STDOUT: %c3.var: ref %MemberClass = var_storage %c3.var_patt // CHECK:STDOUT: %c1.ref.loc10: ref %MemberClass = name_ref c1, %c1 // CHECK:STDOUT: %c2.ref: ref %MemberClass = name_ref c2, %c2 -// CHECK:STDOUT: %.loc10_3: ref %MemberClass = splice_block %c3.var {} +// CHECK:STDOUT: %.loc10_3.1: ref %MemberClass = splice_block %c3.var {} // CHECK:STDOUT: %.loc10_41.1: %MemberClass = acquire_value %c2.ref // CHECK:STDOUT: %.loc10_41.2: ref %MemberClass = value_as_ref %.loc10_41.1 // CHECK:STDOUT: %addr.loc10_39.1: %ptr.ba2 = addr_of %.loc10_41.2 -// CHECK:STDOUT: %addr.loc10_39.2: %ptr.ba2 = addr_of %.loc10_3 +// CHECK:STDOUT: %addr.loc10_39.2: %ptr.ba2 = addr_of %.loc10_3.1 // CHECK:STDOUT: %operator_Plus__carbon_thunk.call: init %empty_tuple.type = call imports.%operator_Plus__carbon_thunk.decl(%c1.ref.loc10, %addr.loc10_39.1, %addr.loc10_39.2) -// CHECK:STDOUT: %.loc10_39: init %MemberClass to %.loc10_3 = mark_in_place_init %operator_Plus__carbon_thunk.call +// CHECK:STDOUT: %.loc10_39: init %MemberClass to %.loc10_3.1 = mark_in_place_init %operator_Plus__carbon_thunk.call // CHECK:STDOUT: assign %c3.var, %.loc10_39 // CHECK:STDOUT: %.loc10_21: type = splice_block %MemberClass.ref.loc10 [concrete = constants.%MemberClass] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -3421,23 +3304,25 @@ fn F() { // CHECK:STDOUT: %c3.patt: %pattern_type.809 = ref_binding_pattern c3 [concrete = constants.%c3.patt] // CHECK:STDOUT: %c3.var_patt: %pattern_type.809 = var_pattern %c3.patt [concrete = constants.%c3.var_patt] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%MemberClass, (constants.%DestroyImpl.impl_witness.e26, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%MemberClass, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%MemberClass, (constants.%DestroyImpl.impl_witness.e26, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%MemberClass, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %c3.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%c3.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %c2.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%c2.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %c1.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%c1.var) +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%c3.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%MemberClass, (constants.%DestroyImpl.impl_witness.e26, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%MemberClass, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%MemberClass, (constants.%DestroyImpl.impl_witness.e26, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%MemberClass, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%c2.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%MemberClass, (constants.%DestroyImpl.impl_witness.e26, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%MemberClass, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%MemberClass, (constants.%DestroyImpl.impl_witness.e26, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%MemberClass, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%c1.var) // CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %MemberClass) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %MemberClass) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %MemberClass.cpp_destructor.call: init %empty_tuple.type = call imports.%MemberClass.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- indirect_template_instantiation.carbon @@ -3483,14 +3368,17 @@ fn F() { // CHECK:STDOUT: %c3.patt: %pattern_type.bbc = value_binding_pattern c3 [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk.type: type = fn_type @operator_Plus__carbon_thunk [concrete] // CHECK:STDOUT: %operator_Plus__carbon_thunk: %operator_Plus__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e2f: %pattern_type.bbc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.790: %pattern_type.bbc = wrapper_binding_pattern self, %self.param_patt.e2f [concrete] -// CHECK:STDOUT: %C.cpp_destructor.type: type = fn_type @C.cpp_destructor [concrete] -// CHECK:STDOUT: %C.cpp_destructor: %C.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %C.Op.type: type = fn_type @C.Op [concrete] +// CHECK:STDOUT: %C.Op: %C.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.576: = custom_witness (%C.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.180: %SubobjectDestroy.type = facet_value %C, (%custom_witness.576) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.270: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.180) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.270, %custom_witness.576) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3504,21 +3392,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %C.cpp_destructor.decl: %C.cpp_destructor.type = fn_decl @C.cpp_destructor [concrete = constants.%C.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bbc = ref_param_pattern [concrete = constants.%self.param_patt.e2f] -// CHECK:STDOUT: %self.patt: %pattern_type.bbc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.790] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -3544,18 +3419,12 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c3.patt: %pattern_type.bbc = value_binding_pattern c3 [concrete = constants.%c3.patt] // CHECK:STDOUT: } +// CHECK:STDOUT: %Destroy.facet.loc10_29.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_29.5: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_29.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_29.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.270, constants.%custom_witness.576) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_29.6: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_29.2 [concrete = constants.%Destroy.facet] // CHECK:STDOUT: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_29.3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_29.3) +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_29.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call imports.%C.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/primitive_types/arithmetic.carbon b/toolchain/check/testdata/interop/cpp/primitive_types/arithmetic.carbon index bde42bb6cb9c..8d292961c882 100644 --- a/toolchain/check/testdata/interop/cpp/primitive_types/arithmetic.carbon +++ b/toolchain/check/testdata/interop/cpp/primitive_types/arithmetic.carbon @@ -541,16 +541,19 @@ fn F() { // CHECK:STDOUT: %x.patt: %pattern_type.129 = value_binding_pattern x [concrete] // CHECK:STDOUT: %unsigned_int.foo.cpp_overload_set.type: type = cpp_overload_set_type @unsigned_int.foo.cpp_overload_set [concrete] // CHECK:STDOUT: %unsigned_int.foo.cpp_overload_set.value: %unsigned_int.foo.cpp_overload_set.type = cpp_overload_set_value @unsigned_int.foo.cpp_overload_set [concrete] -// CHECK:STDOUT: %self.param_patt.9be: %pattern_type.990 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.330: %pattern_type.990 = wrapper_binding_pattern self, %self.param_patt.9be [concrete] // CHECK:STDOUT: %unsigned_int.foo.type: type = fn_type @unsigned_int.foo [concrete] // CHECK:STDOUT: %unsigned_int.foo: %unsigned_int.foo.type = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %unsigned_int.cpp_destructor.type: type = fn_type @unsigned_int.cpp_destructor [concrete] // CHECK:STDOUT: %unsigned_int.cpp_destructor: %unsigned_int.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%unsigned_int.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9ee: %SubobjectDestroy.type = facet_value %unsigned_int, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.89b: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9ee) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %unsigned_int, (%DestroyImpl.impl_witness.89b, %custom_witness.fe1) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -567,21 +570,8 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %unsigned_int.cpp_destructor.decl: %unsigned_int.cpp_destructor.type = fn_decl @unsigned_int.cpp_destructor [concrete = constants.%unsigned_int.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc12 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.990 = ref_param_pattern [concrete = constants.%self.param_patt.9be] -// CHECK:STDOUT: %self.patt: %pattern_type.990 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.330] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %unsigned_int = ref_param call_param0 -// CHECK:STDOUT: %self: ref %unsigned_int = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -592,8 +582,8 @@ fn F() { // CHECK:STDOUT: %as_type: type = facet_access_type %.loc12_38.1 [concrete = constants.%unsigned_int] // CHECK:STDOUT: %.loc12_38.2: type = converted %.loc12_38.1, %as_type [concrete = constants.%unsigned_int] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc12_3: ref %unsigned_int = splice_block %unsigned_int.var {} -// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %unsigned_int to %.loc12_3 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc12_3.1: ref %unsigned_int = splice_block %unsigned_int.var {} +// CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.call: init %unsigned_int to %.loc12_3.1 = call %T.as_type.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %unsigned_int.var, %T.as_type.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc12_25: type = splice_block %unsigned_int.ref.loc12 [concrete = constants.%unsigned_int] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -615,17 +605,12 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %x.patt: %pattern_type.129 = value_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %unsigned_int.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%unsigned_int.var) +// CHECK:STDOUT: %Destroy.facet.loc12_3.1: %Destroy.type = facet_value constants.%unsigned_int, (constants.%DestroyImpl.impl_witness.89b, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_3.2: %Destroy.type = converted constants.%unsigned_int, %Destroy.facet.loc12_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc12_3.2: %Destroy.type = facet_value constants.%unsigned_int, (constants.%DestroyImpl.impl_witness.89b, constants.%custom_witness.fe1) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc12_3.3: %Destroy.type = converted constants.%unsigned_int, %Destroy.facet.loc12_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%unsigned_int.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %unsigned_int) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12(%self.param: ref %unsigned_int) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %unsigned_int.cpp_destructor.call: init %empty_tuple.type = call imports.%unsigned_int.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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 f3c072598006..ac289caf7d77 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 @@ -667,27 +667,27 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -705,37 +705,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.d5b = impl_witness_table (%Core.import_ref.06c923.4), @Cpp.long.as.ImplicitAs.impl.ee4 [concrete] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -778,8 +749,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc11_50.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_50.4: init %f32.3bc to %.loc11_50.3 = in_place_init %.loc11_50.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc11_50.5: init %Array.f2e to %a.var = array_init (%.loc11_50.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %Array.f2e = converted %.loc11_50.1, %.loc11_50.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %Array.f2e = converted %.loc11_50.1, %.loc11_50.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc11_3.1 // CHECK:STDOUT: %.loc11_41: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -802,37 +773,27 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc11: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc11, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc11) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc11_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -902,27 +863,27 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -940,37 +901,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.d28 = impl_witness_table (%Core.import_ref.06c923.4), @Cpp.unsigned_long.as.ImplicitAs.impl.b87 [concrete] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1013,8 +945,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc11_59.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_59.4: init %f32.3bc to %.loc11_59.3 = in_place_init %.loc11_59.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc11_59.5: init %Array.f2e to %a.var = array_init (%.loc11_59.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %Array.f2e = converted %.loc11_59.1, %.loc11_59.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %Array.f2e = converted %.loc11_59.1, %.loc11_59.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc11_3.1 // CHECK:STDOUT: %.loc11_50: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -1037,37 +969,27 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc11: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc11, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc11) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc11_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1169,43 +1091,39 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f84: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.98a: %pattern_type.357 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.784: %pattern_type.357 = wrapper_binding_pattern self, %self.param_patt.98a [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %LongLongResult.cpp_destructor.type: type = fn_type @LongLongResult.cpp_destructor [concrete] // CHECK:STDOUT: %LongLongResult.cpp_destructor: %LongLongResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b62: %pattern_type.ae7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.5c45: %pattern_type.ae7 = wrapper_binding_pattern self, %self.param_patt.b62 [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%LongLongResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b82: %SubobjectDestroy.type = facet_value %LongLongResult, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c0a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b82) [concrete] +// CHECK:STDOUT: %Destroy.facet.15c: %Destroy.type = facet_value %LongLongResult, (%DestroyImpl.impl_witness.c0a, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %LongResult.cpp_destructor.type: type = fn_type @LongResult.cpp_destructor [concrete] // CHECK:STDOUT: %LongResult.cpp_destructor: %LongResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%LongResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.575: %SubobjectDestroy.type = facet_value %LongResult, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.8a6: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.575) [concrete] +// CHECK:STDOUT: %Destroy.facet.b97: %Destroy.type = facet_value %LongResult, (%DestroyImpl.impl_witness.8a6, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1240,61 +1158,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %As.impl_witness_table.1c2 = impl_witness_table (%Core.import_ref.9e0), @Core.IntLiteral.as.As.impl.753 [concrete] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %LongLongResult.cpp_destructor.decl: %LongLongResult.cpp_destructor.type = fn_decl @LongLongResult.cpp_destructor [concrete = constants.%LongLongResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %LongResult.cpp_destructor.decl: %LongResult.cpp_destructor.type = fn_decl @LongResult.cpp_destructor [concrete = constants.%LongResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc24_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.357 = ref_param_pattern [concrete = constants.%self.param_patt.98a] -// CHECK:STDOUT: %self.patt: %pattern_type.357 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.784] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %LongLongResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %LongLongResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc19 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ae7 = ref_param_pattern [concrete = constants.%self.param_patt.b62] -// CHECK:STDOUT: %self.patt: %pattern_type.ae7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5c45] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %LongResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %LongResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1400,8 +1265,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc24_55.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc24_55.4: init %f32.3bc to %.loc24_55.3 = in_place_init %.loc24_55.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc24_55.5: init %Array.f2e to %a.var = array_init (%.loc24_55.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc24_3: init %Array.f2e = converted %.loc24_55.1, %.loc24_55.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc24_3 +// CHECK:STDOUT: %.loc24_3.1: init %Array.f2e = converted %.loc24_55.1, %.loc24_55.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc24_3.1 // CHECK:STDOUT: %.loc24_46: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -1428,61 +1293,45 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%a.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %.loc22_81.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%.loc22_81.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %.loc19_73.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%.loc19_73.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %.loc16_87.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%.loc16_87.3) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc22_81.1: %Destroy.type = facet_value constants.%LongLongResult, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %.loc22_81.5: %Destroy.type = converted constants.%LongLongResult, %Destroy.facet.loc22_81.1 [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %Destroy.facet.loc22_81.2: %Destroy.type = facet_value constants.%LongLongResult, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %.loc22_81.6: %Destroy.type = converted constants.%LongLongResult, %Destroy.facet.loc22_81.2 [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc22_81.3) +// CHECK:STDOUT: %Destroy.facet.loc19_73.1: %Destroy.type = facet_value constants.%LongResult, (constants.%DestroyImpl.impl_witness.8a6, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.b97] +// CHECK:STDOUT: %.loc19_73.5: %Destroy.type = converted constants.%LongResult, %Destroy.facet.loc19_73.1 [concrete = constants.%Destroy.facet.b97] +// CHECK:STDOUT: %Destroy.facet.loc19_73.2: %Destroy.type = facet_value constants.%LongResult, (constants.%DestroyImpl.impl_witness.8a6, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.b97] +// CHECK:STDOUT: %.loc19_73.6: %Destroy.type = converted constants.%LongResult, %Destroy.facet.loc19_73.2 [concrete = constants.%Destroy.facet.b97] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc19_73.3) +// CHECK:STDOUT: %Destroy.facet.loc16_87.1: %Destroy.type = facet_value constants.%LongLongResult, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %.loc16_87.5: %Destroy.type = converted constants.%LongLongResult, %Destroy.facet.loc16_87.1 [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %Destroy.facet.loc16_87.2: %Destroy.type = facet_value constants.%LongLongResult, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %.loc16_87.6: %Destroy.type = converted constants.%LongLongResult, %Destroy.facet.loc16_87.2 [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc16_87.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc24: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc24) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22(%self.param: ref %LongLongResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22(%self.param: ref %LongLongResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %LongLongResult.cpp_destructor.call: init %empty_tuple.type = call imports.%LongLongResult.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19(%self.param: ref %LongResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19(%self.param: ref %LongResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %LongResult.cpp_destructor.call: init %empty_tuple.type = call imports.%LongResult.cpp_destructor.decl(%self.param) +// CHECK:STDOUT: %.loc24_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc24_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1516,21 +1365,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.3ca: type = fn_type_with_self_type %Copy.WithSelf.Op.type.200, %Copy.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op.type: type = fn_type @Cpp.long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op: %Cpp.long.as.Copy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.c0e: type = pattern_type %i64 [concrete] -// CHECK:STDOUT: %self.param_patt.758: %pattern_type.c0e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.721: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt.758 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.fe4: %pattern_type.ada = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0d8: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt.fe4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.302: %SubobjectDestroy.type = facet_value %Cpp.long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.569: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.302) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long, (%DestroyImpl.impl_witness.569, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1542,37 +1387,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.68f = impl_witness_table (%Core.import_ref.06c), @Core.IntLiteral.as.ImplicitAs.impl.9b9 [concrete] // CHECK:STDOUT: %Core.import_ref.9c3: %Cpp.long.as.Copy.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.842 = impl_witness_table (%Core.import_ref.9c3), @Cpp.long.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ada = ref_param_pattern [concrete = constants.%self.param_patt.fe4] -// CHECK:STDOUT: %self.patt: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0d8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ada = ref_param_pattern [concrete = constants.%self.param_patt.fe4] -// CHECK:STDOUT: %self.patt: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0d8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CopyLongLong() { @@ -1582,8 +1398,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.7d4 = impl_witness_access constants.%ImplicitAs.impl_witness.157, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.33f] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.33f] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.33f] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref.loc8 [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc8: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] @@ -1609,34 +1425,24 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %b.patt: %pattern_type.ada = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.ada = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- comparisons_homogeneous_long.carbon // CHECK:STDOUT: @@ -2775,8 +2581,6 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.97b6f8.1: %Cpp.long.as.AddAssignWith.impl.Op.type.57bd5a.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.57bd5a.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.2, @Cpp.long.as.AddAssignWith.impl(%U.2ef) [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.97b6f8.2: %Cpp.long.as.AddAssignWith.impl.Op.type.57bd5a.2 = struct_value () [symbolic] -// CHECK:STDOUT: %self.param_patt.fe4: %pattern_type.ada = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0d8: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt.fe4 [concrete] // CHECK:STDOUT: %Copy.impl_witness.78e: = impl_witness imports.%Copy.impl_witness_table.842 [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Cpp.long, (%Copy.impl_witness.78e) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.74e: = impl_witness imports.%ImplicitAs.impl_witness_table.f48, @T.as_type.as.ImplicitAs.impl(%Copy.facet) [concrete] @@ -2926,19 +2730,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.84d: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.7f2, %RightShiftAssignWith.facet.dc2 [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.e749ef.1: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.05cc9d.2, @Cpp.long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.03f) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.e749ef.2: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.05cc9d.1, @Cpp.long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.03f) [concrete] -// CHECK:STDOUT: %pattern_type.c0e: type = pattern_type %i64 [concrete] -// CHECK:STDOUT: %self.param_patt.758: %pattern_type.c0e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.721: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt.758 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.302: %SubobjectDestroy.type = facet_value %Cpp.long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.569: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.302) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long, (%DestroyImpl.impl_witness.569, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op.type: type = fn_type @Cpp.long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op: %Cpp.long.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -2984,37 +2786,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.import_ref.365: @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.type.2 (%Cpp.long.as.RightShiftAssignWith.impl.Op.type.283894.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.2 (constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.534d8b.1)] // CHECK:STDOUT: %RightShiftAssignWith.impl_witness_table.b67 = impl_witness_table (%Core.import_ref.365), @Cpp.long.as.RightShiftAssignWith.impl [concrete] // CHECK:STDOUT: %Core.Op.14b: @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.type.1 (%Cpp.long.as.RightShiftAssignWith.impl.Op.type.283894.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.1 (constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.534d8b.2)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ada = ref_param_pattern [concrete = constants.%self.param_patt.fe4] -// CHECK:STDOUT: %self.patt: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0d8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ada = ref_param_pattern [concrete = constants.%self.param_patt.fe4] -// CHECK:STDOUT: %self.patt: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0d8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CompoundAssignmentHomogeneousLong() { @@ -3024,8 +2797,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.7d4 = impl_witness_access constants.%ImplicitAs.impl_witness.157, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.33f] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.33f] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.33f] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref.loc8 [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc8: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] @@ -3040,8 +2813,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc9: %.7d4 = impl_witness_access constants.%ImplicitAs.impl_witness.157, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.33f] -// CHECK:STDOUT: %.loc9_3: init %Cpp.long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.33f] -// CHECK:STDOUT: assign %b.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %Cpp.long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.33f] +// CHECK:STDOUT: assign %b.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_13: type = splice_block %long.ref.loc9 [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc9: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] @@ -3221,34 +2994,24 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc21, @Cpp.long.as.RightShiftAssignWith.impl.Op.2(constants.%ImplicitAs.facet.03f) [concrete = constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.e749ef.2] // CHECK:STDOUT: %bound_method.loc21_5.3: = bound_method %a.ref.loc21, %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc21_5.3(%a.ref.loc21, %.loc21_9) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- compound_assignment_hereogeneous_long_and_i64.carbon // CHECK:STDOUT: @@ -3691,8 +3454,6 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.97b6f8.1: %Cpp.long.as.AddAssignWith.impl.Op.type.57bd5a.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.57bd5a.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.2, @Cpp.long.as.AddAssignWith.impl(%U.2ef) [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.97b6f8.2: %Cpp.long.as.AddAssignWith.impl.Op.type.57bd5a.2 = struct_value () [symbolic] -// CHECK:STDOUT: %self.param_patt.fe4: %pattern_type.ada = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0d8: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt.fe4 [concrete] // CHECK:STDOUT: %AddAssignWith.impl_witness.200: = impl_witness imports.%AddAssignWith.impl_witness_table.627, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.533c34.1: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.2, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.56ddbc.1: %Cpp.long.as.AddAssignWith.impl.Op.type.533c34.1 = struct_value () [concrete] @@ -3703,19 +3464,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.417: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.fd2, %AddAssignWith.facet.8ed [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.9c08d1.1: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.56ddbc.2, @Cpp.long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.9c08d1.2: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.56ddbc.1, @Cpp.long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet) [concrete] -// CHECK:STDOUT: %pattern_type.c0e: type = pattern_type %i64 [concrete] -// CHECK:STDOUT: %self.param_patt.758: %pattern_type.c0e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.721: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt.758 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.302: %SubobjectDestroy.type = facet_value %Cpp.long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.569: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.302) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long, (%DestroyImpl.impl_witness.569, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3728,37 +3487,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.import_ref.2c3: @Cpp.long.as.AddAssignWith.impl.%Cpp.long.as.AddAssignWith.impl.Op.type.2 (%Cpp.long.as.AddAssignWith.impl.Op.type.57bd5a.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.AddAssignWith.impl.%Cpp.long.as.AddAssignWith.impl.Op.2 (constants.%Cpp.long.as.AddAssignWith.impl.Op.97b6f8.1)] // CHECK:STDOUT: %AddAssignWith.impl_witness_table.627 = impl_witness_table (%Core.import_ref.2c3), @Cpp.long.as.AddAssignWith.impl [concrete] // CHECK:STDOUT: %Core.Op.828: @Cpp.long.as.AddAssignWith.impl.%Cpp.long.as.AddAssignWith.impl.Op.type.1 (%Cpp.long.as.AddAssignWith.impl.Op.type.57bd5a.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long.as.AddAssignWith.impl.%Cpp.long.as.AddAssignWith.impl.Op.1 (constants.%Cpp.long.as.AddAssignWith.impl.Op.97b6f8.2)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ada = ref_param_pattern [concrete = constants.%self.param_patt.fe4] -// CHECK:STDOUT: %self.patt: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0d8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ada = ref_param_pattern [concrete = constants.%self.param_patt.fe4] -// CHECK:STDOUT: %self.patt: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0d8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CompoundAssignmentLongAndIntLiteral() { @@ -3768,8 +3498,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.7d4 = impl_witness_access constants.%ImplicitAs.impl_witness.157, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.33f] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.33f] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.33f] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] @@ -3800,32 +3530,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc9_8.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.33f] // CHECK:STDOUT: %.loc9_8.2: %Cpp.long = converted %int_1.loc9, %.loc9_8.1 [concrete = constants.%int_1.33f] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc9_5.3(%a.ref, %.loc9_8.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %i64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- compound_assignment_heterogeneous_long_and_runtime_i64.carbon // CHECK:STDOUT: @@ -3883,20 +3599,23 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %AddAssignWith.facet.25e: %AddAssignWith.type.9f8 = facet_value %i64, (%AddAssignWith.impl_witness.5da) [concrete] // CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.93b: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%Cpp.long, %AddAssignWith.facet.25e) [concrete] // CHECK:STDOUT: %.a00: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.93b, %AddAssignWith.facet.25e [concrete] -// CHECK:STDOUT: %self.param_patt.758: %pattern_type.c0e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.721: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt.758 [concrete] // CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.specific_fn.d4c2e2.1: = specific_function %Int.as.AddAssignWith.impl.Op.54f2ef.2, @Int.as.AddAssignWith.impl.Op.1(%int_64, %ImplicitAs.facet.018) [concrete] // CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.specific_fn.d4c2e2.2: = specific_function %Int.as.AddAssignWith.impl.Op.54f2ef.1, @Int.as.AddAssignWith.impl.Op.2(%int_64, %ImplicitAs.facet.018) [concrete] // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a3e: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i64, %ImplicitAs.facet.018) [concrete] // CHECK:STDOUT: %.2f0: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a3e, %ImplicitAs.facet.018 [concrete] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert: %Cpp.long.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0fb: %SubobjectDestroy.type = facet_value %i64, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.92e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0fb) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i64, (%DestroyImpl.impl_witness.92e, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3913,23 +3632,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.Op.da0: @Int.as.AddAssignWith.impl.%Int.as.AddAssignWith.impl.Op.type.1 (%Int.as.AddAssignWith.impl.Op.type.93140c.2) = import_ref Core//prelude/types/int, Op, loaded [symbolic = @Int.as.AddAssignWith.impl.%Int.as.AddAssignWith.impl.Op.1 (constants.%Int.as.AddAssignWith.impl.Op.75e08e.2)] // CHECK:STDOUT: %Core.import_ref.06c923.2: %Cpp.long.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.668 = impl_witness_table (%Core.import_ref.06c923.2), @Cpp.long.as.ImplicitAs.impl.f16 [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CompoundAssignmentLongAndRuntimeI64() { @@ -3941,8 +3645,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert.1(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %i64 = call %bound_method.loc8_3.2(%int_1.loc8) [concrete = constants.%int_1.836] -// CHECK:STDOUT: %.loc8: init %i64 = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.836] -// CHECK:STDOUT: assign %a.var, %.loc8 +// CHECK:STDOUT: %.loc8_3.1: init %i64 = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.836] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %i64: type = type_literal constants.%i64 [concrete = constants.%i64] // CHECK:STDOUT: %a: ref %i64 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -3980,21 +3684,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc10_8.1: %i64 = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call // CHECK:STDOUT: %.loc10_8.2: %i64 = converted %b.ref, %.loc10_8.1 // CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_5.3(%a.ref, %.loc10_8.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%i64, (constants.%DestroyImpl.impl_witness.92e, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%i64, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%i64, (constants.%DestroyImpl.impl_witness.92e, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%i64, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- increment_decrement_long.carbon // CHECK:STDOUT: @@ -4024,8 +3723,6 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.915: type = fn_type_with_self_type %Inc.WithSelf.Op.type.5c2, %Inc.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.Inc.impl.Op.type: type = fn_type @Cpp.long.as.Inc.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Inc.impl.Op: %Cpp.long.as.Inc.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.fe4: %pattern_type.ada = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0d8: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt.fe4 [concrete] // CHECK:STDOUT: %Dec.type: type = facet_type <@Dec> [concrete] // CHECK:STDOUT: %Dec.impl_witness: = impl_witness imports.%Dec.impl_witness_table [concrete] // CHECK:STDOUT: %Dec.facet: %Dec.type = facet_value %Cpp.long, (%Dec.impl_witness) [concrete] @@ -4033,19 +3730,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.203: type = fn_type_with_self_type %Dec.WithSelf.Op.type.1cf, %Dec.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op.type: type = fn_type @Cpp.long.as.Dec.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op: %Cpp.long.as.Dec.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.c0e: type = pattern_type %i64 [concrete] -// CHECK:STDOUT: %self.param_patt.758: %pattern_type.c0e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.721: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt.758 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.302: %SubobjectDestroy.type = facet_value %Cpp.long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.569: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.302) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long, (%DestroyImpl.impl_witness.569, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -4059,37 +3754,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Inc.impl_witness_table = impl_witness_table (%Core.import_ref.9c3475.1), @Cpp.long.as.Inc.impl [concrete] // CHECK:STDOUT: %Core.import_ref.9c3475.2: %Cpp.long.as.Dec.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.Dec.impl.Op] // CHECK:STDOUT: %Dec.impl_witness_table = impl_witness_table (%Core.import_ref.9c3475.2), @Cpp.long.as.Dec.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ada = ref_param_pattern [concrete = constants.%self.param_patt.fe4] -// CHECK:STDOUT: %self.patt: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0d8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ada = ref_param_pattern [concrete = constants.%self.param_patt.fe4] -// CHECK:STDOUT: %self.patt: %pattern_type.ada = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0d8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IncrementDecrementLong() { @@ -4099,8 +3765,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.7d4 = impl_witness_access constants.%ImplicitAs.impl_witness.157, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.33f] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.33f] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.33f] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] @@ -4118,32 +3784,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc10: %.203 = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Cpp.long.as.Dec.impl.Op] // CHECK:STDOUT: %bound_method.loc10: = bound_method %a.ref.loc10, %impl.elem0.loc10 // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10(%a.ref.loc10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.569, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %i64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- unsigned_long_long.carbon // CHECK:STDOUT: @@ -4234,43 +3886,39 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f84: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2ef: %pattern_type.97e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a5a: %pattern_type.97e = wrapper_binding_pattern self, %self.param_patt.2ef [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %ULongLongResult.cpp_destructor.type: type = fn_type @ULongLongResult.cpp_destructor [concrete] // CHECK:STDOUT: %ULongLongResult.cpp_destructor: %ULongLongResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.116: %pattern_type.97f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eb6: %pattern_type.97f = wrapper_binding_pattern self, %self.param_patt.116 [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%ULongLongResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.525: %SubobjectDestroy.type = facet_value %ULongLongResult, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.2a7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.525) [concrete] +// CHECK:STDOUT: %Destroy.facet.b3b: %Destroy.type = facet_value %ULongLongResult, (%DestroyImpl.impl_witness.2a7, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %ULongResult.cpp_destructor.type: type = fn_type @ULongResult.cpp_destructor [concrete] // CHECK:STDOUT: %ULongResult.cpp_destructor: %ULongResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%ULongResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.cbb: %SubobjectDestroy.type = facet_value %ULongResult, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a27: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cbb) [concrete] +// CHECK:STDOUT: %Destroy.facet.572: %Destroy.type = facet_value %ULongResult, (%DestroyImpl.impl_witness.a27, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -4305,61 +3953,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.d28 = impl_witness_table (%Core.import_ref.06c923.3), @Cpp.unsigned_long.as.ImplicitAs.impl.b87 [concrete] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %ULongLongResult.cpp_destructor.decl: %ULongLongResult.cpp_destructor.type = fn_decl @ULongLongResult.cpp_destructor [concrete = constants.%ULongLongResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %ULongResult.cpp_destructor.decl: %ULongResult.cpp_destructor.type = fn_decl @ULongResult.cpp_destructor [concrete = constants.%ULongResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc24_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.97e = ref_param_pattern [concrete = constants.%self.param_patt.2ef] -// CHECK:STDOUT: %self.patt: %pattern_type.97e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a5a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ULongLongResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ULongLongResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc19 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.97f = ref_param_pattern [concrete = constants.%self.param_patt.116] -// CHECK:STDOUT: %self.patt: %pattern_type.97f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ULongResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ULongResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -4472,8 +4067,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc24_59.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc24_59.4: init %f32.3bc to %.loc24_59.3 = in_place_init %.loc24_59.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc24_59.5: init %Array.f2e to %a.var = array_init (%.loc24_59.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc24_3: init %Array.f2e = converted %.loc24_59.1, %.loc24_59.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc24_3 +// CHECK:STDOUT: %.loc24_3.1: init %Array.f2e = converted %.loc24_59.1, %.loc24_59.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc24_3.1 // CHECK:STDOUT: %.loc24_50: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -4496,61 +4091,45 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%a.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %.loc22_83.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%.loc22_83.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %.loc19_93.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%.loc19_93.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %.loc16_107.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%.loc16_107.3) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc22_83.1: %Destroy.type = facet_value constants.%ULongLongResult, (constants.%DestroyImpl.impl_witness.2a7, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %.loc22_83.5: %Destroy.type = converted constants.%ULongLongResult, %Destroy.facet.loc22_83.1 [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %Destroy.facet.loc22_83.2: %Destroy.type = facet_value constants.%ULongLongResult, (constants.%DestroyImpl.impl_witness.2a7, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %.loc22_83.6: %Destroy.type = converted constants.%ULongLongResult, %Destroy.facet.loc22_83.2 [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc22_83.3) +// CHECK:STDOUT: %Destroy.facet.loc19_93.1: %Destroy.type = facet_value constants.%ULongResult, (constants.%DestroyImpl.impl_witness.a27, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.572] +// CHECK:STDOUT: %.loc19_93.5: %Destroy.type = converted constants.%ULongResult, %Destroy.facet.loc19_93.1 [concrete = constants.%Destroy.facet.572] +// CHECK:STDOUT: %Destroy.facet.loc19_93.2: %Destroy.type = facet_value constants.%ULongResult, (constants.%DestroyImpl.impl_witness.a27, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.572] +// CHECK:STDOUT: %.loc19_93.6: %Destroy.type = converted constants.%ULongResult, %Destroy.facet.loc19_93.2 [concrete = constants.%Destroy.facet.572] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc19_93.3) +// CHECK:STDOUT: %Destroy.facet.loc16_107.1: %Destroy.type = facet_value constants.%ULongLongResult, (constants.%DestroyImpl.impl_witness.2a7, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %.loc16_107.5: %Destroy.type = converted constants.%ULongLongResult, %Destroy.facet.loc16_107.1 [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %Destroy.facet.loc16_107.2: %Destroy.type = facet_value constants.%ULongLongResult, (constants.%DestroyImpl.impl_witness.2a7, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %.loc16_107.6: %Destroy.type = converted constants.%ULongLongResult, %Destroy.facet.loc16_107.2 [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc16_107.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc24: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc24) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22(%self.param: ref %ULongLongResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22(%self.param: ref %ULongLongResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %ULongLongResult.cpp_destructor.call: init %empty_tuple.type = call imports.%ULongLongResult.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19(%self.param: ref %ULongResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19(%self.param: ref %ULongResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %ULongResult.cpp_destructor.call: init %empty_tuple.type = call imports.%ULongResult.cpp_destructor.decl(%self.param) +// CHECK:STDOUT: %.loc24_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc24_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -4584,21 +4163,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.cdb: type = fn_type_with_self_type %Copy.WithSelf.Op.type.0c9, %Copy.facet [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.Copy.impl.Op.type: type = fn_type @Cpp.unsigned_long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.Copy.impl.Op: %Cpp.unsigned_long.as.Copy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.dd7: type = pattern_type %u64 [concrete] -// CHECK:STDOUT: %self.param_patt.e89: %pattern_type.dd7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.aab: %pattern_type.dd7 = wrapper_binding_pattern self, %self.param_patt.e89 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.15d: %pattern_type.172 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f0: %pattern_type.172 = wrapper_binding_pattern self, %self.param_patt.15d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.539: %SubobjectDestroy.type = facet_value %Cpp.unsigned_long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.591: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.539) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.unsigned_long, (%DestroyImpl.impl_witness.591, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -4610,37 +4185,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.444 = impl_witness_table (%Core.import_ref.06c), @Core.IntLiteral.as.ImplicitAs.impl.716 [concrete] // CHECK:STDOUT: %Core.import_ref.9c3: %Cpp.unsigned_long.as.Copy.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.unsigned_long.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.2f0 = impl_witness_table (%Core.import_ref.9c3), @Cpp.unsigned_long.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dd7 = ref_param_pattern [concrete = constants.%self.param_patt.e89] -// CHECK:STDOUT: %self.patt: %pattern_type.dd7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aab] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dd7 = ref_param_pattern [concrete = constants.%self.param_patt.e89] -// CHECK:STDOUT: %self.patt: %pattern_type.dd7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aab] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.172 = ref_param_pattern [concrete = constants.%self.param_patt.15d] -// CHECK:STDOUT: %self.patt: %pattern_type.172 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.unsigned_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.unsigned_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.172 = ref_param_pattern [concrete = constants.%self.param_patt.15d] -// CHECK:STDOUT: %self.patt: %pattern_type.172 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.unsigned_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.unsigned_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CopyUnsignedLong() { @@ -4650,8 +4196,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.90c = impl_witness_access constants.%ImplicitAs.impl_witness.1bb, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.unsigned_long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.9e8] -// CHECK:STDOUT: %.loc8_3: init %Cpp.unsigned_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.9e8] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.unsigned_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.9e8] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %unsigned_long.ref.loc8 [concrete = constants.%Cpp.unsigned_long] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %unsigned_long.ref.loc8: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long] @@ -4677,32 +4223,22 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %b.patt: %pattern_type.172 = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.172 = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Cpp.unsigned_long, (constants.%DestroyImpl.impl_witness.591, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%Cpp.unsigned_long, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Cpp.unsigned_long, (constants.%DestroyImpl.impl_witness.591, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Cpp.unsigned_long, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.unsigned_long, (constants.%DestroyImpl.impl_witness.591, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.unsigned_long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.unsigned_long, (constants.%DestroyImpl.impl_witness.591, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.unsigned_long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %u64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %u64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %u64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %u64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %Cpp.unsigned_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.unsigned_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %Cpp.unsigned_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%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 1e7d2fa1a18d..5653ab44361b 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 @@ -717,27 +717,27 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f84: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -753,37 +753,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %As.impl_witness_table.1c2 = impl_witness_table (%Core.import_ref.9e0), @Core.IntLiteral.as.As.impl.753 [concrete] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -824,8 +795,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc11_55.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_55.4: init %f32.3bc to %.loc11_55.3 = in_place_init %.loc11_55.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc11_55.5: init %Array.f2e to %a.var = array_init (%.loc11_55.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %Array.f2e = converted %.loc11_55.1, %.loc11_55.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %Array.f2e = converted %.loc11_55.1, %.loc11_55.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc11_3.1 // CHECK:STDOUT: %.loc11_46: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -852,37 +823,27 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc11: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc11, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc11) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc11_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -957,27 +918,27 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f84: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -993,37 +954,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %As.impl_witness_table.43c = impl_witness_table (%Core.import_ref.d9c7), @Core.IntLiteral.as.As.impl.d83 [concrete] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1064,8 +996,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc11_64.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_64.4: init %f32.3bc to %.loc11_64.3 = in_place_init %.loc11_64.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc11_64.5: init %Array.f2e to %a.var = array_init (%.loc11_64.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %Array.f2e = converted %.loc11_64.1, %.loc11_64.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %Array.f2e = converted %.loc11_64.1, %.loc11_64.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc11_3.1 // CHECK:STDOUT: %.loc11_55: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -1092,37 +1024,27 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc11: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc11, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc11) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc11_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1137,8 +1059,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.25e: type = pattern_type %Cpp.long [concrete] -// CHECK:STDOUT: %cpp_long.patt: %pattern_type.25e = value_binding_pattern cpp_long [concrete] +// CHECK:STDOUT: %pattern_type.25ee: type = pattern_type %Cpp.long [concrete] +// CHECK:STDOUT: %cpp_long.patt: %pattern_type.25ee = value_binding_pattern cpp_long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] @@ -1150,7 +1072,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.impl_witness.39e: = impl_witness imports.%ImplicitAs.impl_witness_table.763 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.c54: %ImplicitAs.type.797 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.39e) [concrete] // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.3c4: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%Cpp.long, %ImplicitAs.facet.c54) [concrete] -// CHECK:STDOUT: %.cdd: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.3c4, %ImplicitAs.facet.c54 [concrete] +// CHECK:STDOUT: %.cdd9: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.3c4, %ImplicitAs.facet.c54 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.ae6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3ce: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.ae6 = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.3ce [concrete] @@ -1163,7 +1085,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ptr.817: type = ptr_type %LongResult [concrete] // CHECK:STDOUT: %PassLong__carbon_thunk.type.ac66cb.1: type = fn_type @PassLong__carbon_thunk.1 [concrete] // CHECK:STDOUT: %PassLong__carbon_thunk.806a90.1: %PassLong__carbon_thunk.type.ac66cb.1 = struct_value () [concrete] -// CHECK:STDOUT: %cpp_compat_long.patt: %pattern_type.25e = value_binding_pattern cpp_compat_long [concrete] +// CHECK:STDOUT: %cpp_compat_long.patt: %pattern_type.25ee = value_binding_pattern cpp_compat_long [concrete] // CHECK:STDOUT: %cpp_compat_long_result.patt: %pattern_type.142 = value_binding_pattern cpp_compat_long_result [concrete] // CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %carbon_i32.patt: %pattern_type.d94 = value_binding_pattern carbon_i32 [concrete] @@ -1221,44 +1143,41 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc26_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc26_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.123: %pattern_type.596 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1e9: %pattern_type.596 = wrapper_binding_pattern self, %self.param_patt.123 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %IntResult.cpp_destructor.type: type = fn_type @IntResult.cpp_destructor [concrete] // CHECK:STDOUT: %IntResult.cpp_destructor: %IntResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.39f: %pattern_type.142 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7bb: %pattern_type.142 = wrapper_binding_pattern self, %self.param_patt.39f [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%IntResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.dac: %SubobjectDestroy.type = facet_value %IntResult, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.746: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.dac) [concrete] +// CHECK:STDOUT: %Destroy.facet.e9b: %Destroy.type = facet_value %IntResult, (%DestroyImpl.impl_witness.746, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %LongResult.cpp_destructor.type: type = fn_type @LongResult.cpp_destructor [concrete] // CHECK:STDOUT: %LongResult.cpp_destructor: %LongResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%LongResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.794: %SubobjectDestroy.type = facet_value %LongResult, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.91f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.794) [concrete] +// CHECK:STDOUT: %Destroy.facet.b43: %Destroy.type = facet_value %LongResult, (%DestroyImpl.impl_witness.91f, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1269,7 +1188,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .As = %Core.As // CHECK:STDOUT: .Array = %Core.Array -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1315,68 +1234,15 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/types/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %IntResult.cpp_destructor.decl: %IntResult.cpp_destructor.type = fn_decl @IntResult.cpp_destructor [concrete = constants.%IntResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %LongResult.cpp_destructor.decl: %LongResult.cpp_destructor.type = fn_decl @LongResult.cpp_destructor [concrete = constants.%LongResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc26_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc26_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.596 = ref_param_pattern [concrete = constants.%self.param_patt.123] -// CHECK:STDOUT: %self.patt: %pattern_type.596 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1e9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %IntResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %IntResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc19 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.142 = ref_param_pattern [concrete = constants.%self.param_patt.39f] -// CHECK:STDOUT: %self.patt: %pattern_type.142 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7bb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %LongResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %LongResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc15: %.cdd = impl_witness_access constants.%ImplicitAs.impl_witness.39e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.3ce] +// CHECK:STDOUT: %impl.elem0.loc15: %.cdd9 = impl_witness_access constants.%ImplicitAs.impl_witness.39e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.3ce] // CHECK:STDOUT: %bound_method.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc15(%int_1.loc15) [concrete = constants.%int_1.9ce] // CHECK:STDOUT: %.loc15_28.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.9ce] @@ -1387,7 +1253,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %cpp_long: %Cpp.long = wrapper_binding cpp_long, %.loc15_28.2 // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %cpp_long.patt: %pattern_type.25e = value_binding_pattern cpp_long [concrete = constants.%cpp_long.patt] +// CHECK:STDOUT: %cpp_long.patt: %pattern_type.25ee = value_binding_pattern cpp_long [concrete = constants.%cpp_long.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Cpp.ref.loc16_48: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %PassLong.ref.loc16: %PassLong.cpp_overload_set.type = name_ref PassLong, imports.%PassLong.cpp_overload_set.value [concrete = constants.%PassLong.cpp_overload_set.value] @@ -1414,7 +1280,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %cpp_compat_long: %Cpp.long = wrapper_binding cpp_compat_long, %cpp_long.ref.loc18 // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %cpp_compat_long.patt: %pattern_type.25e = value_binding_pattern cpp_compat_long [concrete = constants.%cpp_compat_long.patt] +// CHECK:STDOUT: %cpp_compat_long.patt: %pattern_type.25ee = value_binding_pattern cpp_compat_long [concrete = constants.%cpp_compat_long.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %Cpp.ref.loc19_55: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %PassLong.ref.loc19: %PassLong.cpp_overload_set.type = name_ref PassLong, imports.%PassLong.cpp_overload_set.value [concrete = constants.%PassLong.cpp_overload_set.value] @@ -1483,8 +1349,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc26_50.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc26_50.4: init %f32.3bc to %.loc26_50.3 = in_place_init %.loc26_50.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc26_50.5: init %Array.f2e to %a.var = array_init (%.loc26_50.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc26_3: init %Array.f2e = converted %.loc26_50.1, %.loc26_50.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc26_3 +// CHECK:STDOUT: %.loc26_3.1: init %Array.f2e = converted %.loc26_50.1, %.loc26_50.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc26_3.1 // CHECK:STDOUT: %.loc26_41: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc26: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -1507,61 +1373,45 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc26: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc26: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc26(%a.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %.loc22_72.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%.loc22_72.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %.loc19_83.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%.loc19_83.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %.loc16_69.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%.loc16_69.3) +// CHECK:STDOUT: %Destroy.facet.loc26_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc26_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc26_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc26_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc26_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc26_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc26: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc22_72.1: %Destroy.type = facet_value constants.%IntResult, (constants.%DestroyImpl.impl_witness.746, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.e9b] +// CHECK:STDOUT: %.loc22_72.5: %Destroy.type = converted constants.%IntResult, %Destroy.facet.loc22_72.1 [concrete = constants.%Destroy.facet.e9b] +// CHECK:STDOUT: %Destroy.facet.loc22_72.2: %Destroy.type = facet_value constants.%IntResult, (constants.%DestroyImpl.impl_witness.746, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.e9b] +// CHECK:STDOUT: %.loc22_72.6: %Destroy.type = converted constants.%IntResult, %Destroy.facet.loc22_72.2 [concrete = constants.%Destroy.facet.e9b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc22_72.3) +// CHECK:STDOUT: %Destroy.facet.loc19_83.1: %Destroy.type = facet_value constants.%LongResult, (constants.%DestroyImpl.impl_witness.91f, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.b43] +// CHECK:STDOUT: %.loc19_83.5: %Destroy.type = converted constants.%LongResult, %Destroy.facet.loc19_83.1 [concrete = constants.%Destroy.facet.b43] +// CHECK:STDOUT: %Destroy.facet.loc19_83.2: %Destroy.type = facet_value constants.%LongResult, (constants.%DestroyImpl.impl_witness.91f, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.b43] +// CHECK:STDOUT: %.loc19_83.6: %Destroy.type = converted constants.%LongResult, %Destroy.facet.loc19_83.2 [concrete = constants.%Destroy.facet.b43] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc19_83.3) +// CHECK:STDOUT: %Destroy.facet.loc16_69.1: %Destroy.type = facet_value constants.%LongResult, (constants.%DestroyImpl.impl_witness.91f, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.b43] +// CHECK:STDOUT: %.loc16_69.5: %Destroy.type = converted constants.%LongResult, %Destroy.facet.loc16_69.1 [concrete = constants.%Destroy.facet.b43] +// CHECK:STDOUT: %Destroy.facet.loc16_69.2: %Destroy.type = facet_value constants.%LongResult, (constants.%DestroyImpl.impl_witness.91f, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.b43] +// CHECK:STDOUT: %.loc16_69.6: %Destroy.type = converted constants.%LongResult, %Destroy.facet.loc16_69.2 [concrete = constants.%Destroy.facet.b43] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc16_69.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc26: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc26, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc26) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22(%self.param: ref %IntResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22(%self.param: ref %IntResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %IntResult.cpp_destructor.call: init %empty_tuple.type = call imports.%IntResult.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19(%self.param: ref %LongResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19(%self.param: ref %LongResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %LongResult.cpp_destructor.call: init %empty_tuple.type = call imports.%LongResult.cpp_destructor.decl(%self.param) +// CHECK:STDOUT: %.loc26_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc26_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc26_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc26_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc26_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc26_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc26_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc26_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1573,9 +1423,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.25e: type = pattern_type %Cpp.long [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %pattern_type.25ee: type = pattern_type %Cpp.long [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.797: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] @@ -1587,29 +1437,25 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.9ce: %Cpp.long = int_value 1 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.25e = ref_binding_pattern b [concrete] -// CHECK:STDOUT: %b.var_patt: %pattern_type.25e = var_pattern %b.patt [concrete] +// CHECK:STDOUT: %b.patt: %pattern_type.25ee = ref_binding_pattern b [concrete] +// CHECK:STDOUT: %b.var_patt: %pattern_type.25ee = var_pattern %b.patt [concrete] // CHECK:STDOUT: %Copy.impl_witness.c0b: = impl_witness imports.%Copy.impl_witness_table.6ef [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Cpp.long, (%Copy.impl_witness.c0b) [concrete] // CHECK:STDOUT: %Copy.WithSelf.Op.type.a93: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.590: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a93, %Copy.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op.type: type = fn_type @Cpp.long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op: %Cpp.long.as.Copy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2bb: %pattern_type.25e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cb1: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt.2bb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7f3: %SubobjectDestroy.type = facet_value %Cpp.long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d03: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7f3) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long, (%DestroyImpl.impl_witness.d03, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1621,37 +1467,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.763 = impl_witness_table (%Core.import_ref.06c), @Core.IntLiteral.as.ImplicitAs.impl.ed6 [concrete] // CHECK:STDOUT: %Core.import_ref.9c3: %Cpp.long.as.Copy.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.6ef = impl_witness_table (%Core.import_ref.9c3), @Cpp.long.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CopyLong() { @@ -1661,16 +1478,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.cdd = impl_witness_access constants.%ImplicitAs.impl_witness.39e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.9ce] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref.loc8 [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc8: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %Cpp.long = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %Cpp.long = var_storage %b.var_patt // CHECK:STDOUT: %a.ref: ref %Cpp.long = name_ref a, %a @@ -1685,37 +1502,27 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %Cpp.long = wrapper_binding b, %b.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %b.patt: %pattern_type.25e = ref_binding_pattern b [concrete = constants.%b.patt] -// CHECK:STDOUT: %b.var_patt: %pattern_type.25e = var_pattern %b.patt [concrete = constants.%b.var_patt] +// CHECK:STDOUT: %b.patt: %pattern_type.25ee = ref_binding_pattern b [concrete = constants.%b.patt] +// CHECK:STDOUT: %b.var_patt: %pattern_type.25ee = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- comparisons_homogeneous_long.carbon // CHECK:STDOUT: @@ -3008,9 +2815,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.25e: type = pattern_type %Cpp.long [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %pattern_type.25ee: type = pattern_type %Cpp.long [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.797: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] @@ -3025,16 +2832,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.9ce: %Cpp.long = int_value 1 [concrete] -// CHECK:STDOUT: %b.patt: %pattern_type.25e = ref_binding_pattern b [concrete] -// CHECK:STDOUT: %b.var_patt: %pattern_type.25e = var_pattern %b.patt [concrete] +// CHECK:STDOUT: %b.patt: %pattern_type.25ee = ref_binding_pattern b [concrete] +// CHECK:STDOUT: %b.var_patt: %pattern_type.25ee = var_pattern %b.patt [concrete] // CHECK:STDOUT: %AddAssignWith.type.736: type = facet_type <@AddAssignWith, @AddAssignWith(%Cpp.long)> [concrete] // CHECK:STDOUT: %U.65a: %ImplicitAs.type.797 = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.1: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%U.65a) [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.199fad.1: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.2, @Cpp.long.as.AddAssignWith.impl(%U.65a) [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.199fad.2: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.2 = struct_value () [symbolic] -// CHECK:STDOUT: %self.param_patt.2bb: %pattern_type.25e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cb1: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt.2bb [concrete] // CHECK:STDOUT: %Copy.impl_witness.c0b: = impl_witness imports.%Copy.impl_witness_table.6ef [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Cpp.long, (%Copy.impl_witness.c0b) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.226: = impl_witness imports.%ImplicitAs.impl_witness_table.f48, @T.as_type.as.ImplicitAs.impl(%Copy.facet) [concrete] @@ -3184,19 +2989,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.df6: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.cbc, %RightShiftAssignWith.facet.9ad [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.30be6a.1: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.0fc2da.2, @Cpp.long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.b5c) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.30be6a.2: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.0fc2da.1, @Cpp.long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.b5c) [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7f3: %SubobjectDestroy.type = facet_value %Cpp.long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d03: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7f3) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long, (%DestroyImpl.impl_witness.d03, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op.type: type = fn_type @Cpp.long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op: %Cpp.long.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -3242,37 +3045,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.import_ref.478: @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.type.2 (%Cpp.long.as.RightShiftAssignWith.impl.Op.type.f27273.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.2 (constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.afe2b4.1)] // CHECK:STDOUT: %RightShiftAssignWith.impl_witness_table.6aa = impl_witness_table (%Core.import_ref.478), @Cpp.long.as.RightShiftAssignWith.impl [concrete] // CHECK:STDOUT: %Core.Op.627: @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.type.1 (%Cpp.long.as.RightShiftAssignWith.impl.Op.type.f27273.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.1 (constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.afe2b4.2)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CompoundAssignmentHomogeneousLong() { @@ -3282,32 +3056,32 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.cdd = impl_witness_access constants.%ImplicitAs.impl_witness.39e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.9ce] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref.loc8 [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc8: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %Cpp.long = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %Cpp.long = var_storage %b.var_patt // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc9: %.cdd = impl_witness_access constants.%ImplicitAs.impl_witness.39e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: %.loc9_3: init %Cpp.long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: assign %b.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %Cpp.long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.9ce] +// CHECK:STDOUT: assign %b.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_13: type = splice_block %long.ref.loc9 [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc9: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } // CHECK:STDOUT: %b: ref %Cpp.long = wrapper_binding b, %b.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %b.patt: %pattern_type.25e = ref_binding_pattern b [concrete = constants.%b.patt] -// CHECK:STDOUT: %b.var_patt: %pattern_type.25e = var_pattern %b.patt [concrete = constants.%b.var_patt] +// CHECK:STDOUT: %b.patt: %pattern_type.25ee = ref_binding_pattern b [concrete = constants.%b.patt] +// CHECK:STDOUT: %b.var_patt: %pattern_type.25ee = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %a.ref.loc11: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc11: ref %Cpp.long = name_ref b, %b @@ -3479,34 +3253,24 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc21, @Cpp.long.as.RightShiftAssignWith.impl.Op.2(constants.%ImplicitAs.facet.b5c) [concrete = constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.30be6a.2] // CHECK:STDOUT: %bound_method.loc21_5.3: = bound_method %a.ref.loc21, %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc21_5.3(%a.ref.loc21, %.loc21_9) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- compound_assignment_hereogeneous_long_and_i32.carbon // CHECK:STDOUT: @@ -3515,12 +3279,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete] -// CHECK:STDOUT: %pattern_type.25e: type = pattern_type %Cpp.long [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %pattern_type.25ee: type = pattern_type %Cpp.long [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete] // CHECK:STDOUT: %ImplicitAs.type.797: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.39e: = impl_witness imports.%ImplicitAs.impl_witness_table.763 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.c54: %ImplicitAs.type.797 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.39e) [concrete] @@ -3536,8 +3299,6 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.199fad.1: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.2, @Cpp.long.as.AddAssignWith.impl(%U.65a) [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.199fad.2: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.2 = struct_value () [symbolic] -// CHECK:STDOUT: %self.param_patt.2bb: %pattern_type.25e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cb1: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt.2bb [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.23a: = impl_witness imports.%ImplicitAs.impl_witness_table.967 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.8ee: %ImplicitAs.type.797 = facet_value %i32, (%ImplicitAs.impl_witness.23a) [concrete] // CHECK:STDOUT: %AddAssignWith.impl_witness.09e: = impl_witness imports.%AddAssignWith.impl_witness_table.d07, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet.8ee) [concrete] @@ -3689,18 +3450,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.a375: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.6a2, %RightShiftAssignWith.facet.d5c [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.777143.1: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.a8366c.2, @Cpp.long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.8ee) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.777143.2: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.a8366c.1, @Cpp.long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.8ee) [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7f3: %SubobjectDestroy.type = facet_value %Cpp.long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d03: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7f3) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long, (%DestroyImpl.impl_witness.d03, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3742,37 +3502,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.import_ref.478: @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.type.2 (%Cpp.long.as.RightShiftAssignWith.impl.Op.type.f27273.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.2 (constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.afe2b4.1)] // CHECK:STDOUT: %RightShiftAssignWith.impl_witness_table.6aa = impl_witness_table (%Core.import_ref.478), @Cpp.long.as.RightShiftAssignWith.impl [concrete] // CHECK:STDOUT: %Core.Op.627: @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.type.1 (%Cpp.long.as.RightShiftAssignWith.impl.Op.type.f27273.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long.as.RightShiftAssignWith.impl.%Cpp.long.as.RightShiftAssignWith.impl.Op.1 (constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.afe2b4.2)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CompoundAssignmentLongAndI32() { @@ -3783,16 +3514,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc9: %.cdd = impl_witness_access constants.%ImplicitAs.impl_witness.39e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.3ce] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5d7] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: %.loc9_3: init %Cpp.long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: assign %a.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %Cpp.long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.9ce] +// CHECK:STDOUT: assign %a.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_13: type = splice_block %long.ref [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %Cpp.long = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %a.ref.loc10: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc10: %i32 = name_ref b, %b @@ -4004,32 +3735,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc20_9.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc20 // CHECK:STDOUT: %.loc20_9.2: %Cpp.long = converted %b.ref.loc20, %.loc20_9.1 // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc20_5.3(%a.ref.loc20, %.loc20_9.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- compound_assignment_heterogeneous_long_and_int_literal.carbon // CHECK:STDOUT: @@ -4039,9 +3756,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.25e: type = pattern_type %Cpp.long [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %pattern_type.25ee: type = pattern_type %Cpp.long [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.797: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.39e: = impl_witness imports.%ImplicitAs.impl_witness_table.763 [concrete] @@ -4058,8 +3775,6 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.199fad.1: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.2, @Cpp.long.as.AddAssignWith.impl(%U.65a) [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.199fad.2: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.2 = struct_value () [symbolic] -// CHECK:STDOUT: %self.param_patt.2bb: %pattern_type.25e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cb1: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt.2bb [concrete] // CHECK:STDOUT: %AddAssignWith.impl_witness.1b7: = impl_witness imports.%AddAssignWith.impl_witness_table.d07, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.365040.1: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.2, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.d85b7d.1: %Cpp.long.as.AddAssignWith.impl.Op.type.365040.1 = struct_value () [concrete] @@ -4070,19 +3785,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.ebe: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.3dd, %AddAssignWith.facet.4b6 [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.69abc1.1: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.d85b7d.2, @Cpp.long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.69abc1.2: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.d85b7d.1, @Cpp.long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet) [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7f3: %SubobjectDestroy.type = facet_value %Cpp.long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d03: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7f3) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long, (%DestroyImpl.impl_witness.d03, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -4095,37 +3808,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.import_ref.51b: @Cpp.long.as.AddAssignWith.impl.%Cpp.long.as.AddAssignWith.impl.Op.type.2 (%Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long.as.AddAssignWith.impl.%Cpp.long.as.AddAssignWith.impl.Op.2 (constants.%Cpp.long.as.AddAssignWith.impl.Op.199fad.1)] // CHECK:STDOUT: %AddAssignWith.impl_witness_table.d07 = impl_witness_table (%Core.import_ref.51b), @Cpp.long.as.AddAssignWith.impl [concrete] // CHECK:STDOUT: %Core.Op.aed: @Cpp.long.as.AddAssignWith.impl.%Cpp.long.as.AddAssignWith.impl.Op.type.1 (%Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long.as.AddAssignWith.impl.%Cpp.long.as.AddAssignWith.impl.Op.1 (constants.%Cpp.long.as.AddAssignWith.impl.Op.199fad.2)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CompoundAssignmentLongAndIntLiteral() { @@ -4135,16 +3819,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.cdd = impl_witness_access constants.%ImplicitAs.impl_witness.39e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.9ce] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %Cpp.long = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %a.ref: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -4167,32 +3851,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc9_8.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.9ce] // CHECK:STDOUT: %.loc9_8.2: %Cpp.long = converted %int_1.loc9, %.loc9_8.1 [concrete = constants.%int_1.9ce] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc9_5.3(%a.ref, %.loc9_8.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- compound_assignment_heterogeneous_long_and_runtime_i32.carbon // CHECK:STDOUT: @@ -4202,9 +3872,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.25e: type = pattern_type %Cpp.long [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %pattern_type.25ee: type = pattern_type %Cpp.long [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.797: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.39e: = impl_witness imports.%ImplicitAs.impl_witness_table.763 [concrete] @@ -4237,8 +3907,6 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.199fad.1: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.2, @Cpp.long.as.AddAssignWith.impl(%U.65a) [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.199fad.2: %Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.2 = struct_value () [symbolic] -// CHECK:STDOUT: %self.param_patt.2bb: %pattern_type.25e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cb1: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt.2bb [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.23a: = impl_witness imports.%ImplicitAs.impl_witness_table.967 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.8ee: %ImplicitAs.type.797 = facet_value %i32, (%ImplicitAs.impl_witness.23a) [concrete] // CHECK:STDOUT: %AddAssignWith.impl_witness.09e: = impl_witness imports.%AddAssignWith.impl_witness_table.d07, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet.8ee) [concrete] @@ -4255,18 +3923,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.c62: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.870, %ImplicitAs.facet.8ee [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.type: type = fn_type @i32.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert: %i32.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7f3: %SubobjectDestroy.type = facet_value %Cpp.long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d03: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7f3) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long, (%DestroyImpl.impl_witness.d03, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -4283,37 +3950,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.Op.aed: @Cpp.long.as.AddAssignWith.impl.%Cpp.long.as.AddAssignWith.impl.Op.type.1 (%Cpp.long.as.AddAssignWith.impl.Op.type.4a4937.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long.as.AddAssignWith.impl.%Cpp.long.as.AddAssignWith.impl.Op.1 (constants.%Cpp.long.as.AddAssignWith.impl.Op.199fad.2)] // CHECK:STDOUT: %Core.import_ref.06c923.2: %i32.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.967 = impl_witness_table (%Core.import_ref.06c923.2), @i32.as.ImplicitAs.impl.2bf [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CompoundAssignmentLongAndRuntimeI32() { @@ -4323,16 +3961,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.cdd = impl_witness_access constants.%ImplicitAs.impl_witness.39e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.3ce] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5d7] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.9ce] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %Cpp.long = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %impl.elem0.loc9: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60] @@ -4368,32 +4006,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc10_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call // CHECK:STDOUT: %.loc10_8.2: %Cpp.long = converted %b.ref, %.loc10_8.1 // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_5.3(%a.ref, %.loc10_8.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- increment_decrement_long.carbon // CHECK:STDOUT: @@ -4403,9 +4027,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] -// CHECK:STDOUT: %pattern_type.25e: type = pattern_type %Cpp.long [concrete] -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete] +// CHECK:STDOUT: %pattern_type.25ee: type = pattern_type %Cpp.long [concrete] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.797: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.39e: = impl_witness imports.%ImplicitAs.impl_witness_table.763 [concrete] @@ -4423,8 +4047,6 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.270: type = fn_type_with_self_type %Inc.WithSelf.Op.type.174, %Inc.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.Inc.impl.Op.type: type = fn_type @Cpp.long.as.Inc.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Inc.impl.Op: %Cpp.long.as.Inc.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2bb: %pattern_type.25e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cb1: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt.2bb [concrete] // CHECK:STDOUT: %Dec.type: type = facet_type <@Dec> [concrete] // CHECK:STDOUT: %Dec.impl_witness: = impl_witness imports.%Dec.impl_witness_table [concrete] // CHECK:STDOUT: %Dec.facet: %Dec.type = facet_value %Cpp.long, (%Dec.impl_witness) [concrete] @@ -4432,19 +4054,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.c69: type = fn_type_with_self_type %Dec.WithSelf.Op.type.88b, %Dec.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op.type: type = fn_type @Cpp.long.as.Dec.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op: %Cpp.long.as.Dec.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7f3: %SubobjectDestroy.type = facet_value %Cpp.long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d03: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7f3) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long, (%DestroyImpl.impl_witness.d03, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -4458,37 +4078,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Inc.impl_witness_table = impl_witness_table (%Core.import_ref.9c3475.1), @Cpp.long.as.Inc.impl [concrete] // CHECK:STDOUT: %Core.import_ref.9c3475.2: %Cpp.long.as.Dec.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.Dec.impl.Op] // CHECK:STDOUT: %Dec.impl_witness_table = impl_witness_table (%Core.import_ref.9c3475.2), @Cpp.long.as.Dec.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.2bb] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cb1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IncrementDecrementLong() { @@ -4498,16 +4089,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.cdd = impl_witness_access constants.%ImplicitAs.impl_witness.39e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.9ce] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.9ce] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref [concrete = constants.%Cpp.long] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %Cpp.long = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %a.patt: %pattern_type.25e = ref_binding_pattern a [concrete = constants.%a.patt] -// CHECK:STDOUT: %a.var_patt: %pattern_type.25e = var_pattern %a.patt [concrete = constants.%a.var_patt] +// CHECK:STDOUT: %a.patt: %pattern_type.25ee = ref_binding_pattern a [concrete = constants.%a.patt] +// CHECK:STDOUT: %a.var_patt: %pattern_type.25ee = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %a.ref.loc9: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %impl.elem0.loc9: %.270 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Cpp.long.as.Inc.impl.Op] @@ -4517,32 +4108,18 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc10: %.c69 = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Cpp.long.as.Dec.impl.Op] // CHECK:STDOUT: %bound_method.loc10: = bound_method %a.ref.loc10, %impl.elem0.loc10 // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10(%a.ref.loc10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long, (constants.%DestroyImpl.impl_witness.d03, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %Cpp.long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- unsigned_long.carbon // CHECK:STDOUT: @@ -4642,44 +4219,41 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f84: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.adc: %pattern_type.116 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7ed: %pattern_type.116 = wrapper_binding_pattern self, %self.param_patt.adc [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %UIntResult.cpp_destructor.type: type = fn_type @UIntResult.cpp_destructor [concrete] // CHECK:STDOUT: %UIntResult.cpp_destructor: %UIntResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7ab: %pattern_type.f8a = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.7af: %pattern_type.f8a = wrapper_binding_pattern self, %self.param_patt.7ab [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%UIntResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0ff: %SubobjectDestroy.type = facet_value %UIntResult, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c44: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0ff) [concrete] +// CHECK:STDOUT: %Destroy.facet.5cf: %Destroy.type = facet_value %UIntResult, (%DestroyImpl.impl_witness.c44, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %ULongResult.cpp_destructor.type: type = fn_type @ULongResult.cpp_destructor [concrete] // CHECK:STDOUT: %ULongResult.cpp_destructor: %ULongResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%ULongResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.3e8: %SubobjectDestroy.type = facet_value %ULongResult, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.2ef: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.3e8) [concrete] +// CHECK:STDOUT: %Destroy.facet.cbb: %Destroy.type = facet_value %ULongResult, (%DestroyImpl.impl_witness.2ef, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -4690,7 +4264,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .As = %Core.As // CHECK:STDOUT: .Array = %Core.Array -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -4736,62 +4310,9 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/types/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %UIntResult.cpp_destructor.decl: %UIntResult.cpp_destructor.type = fn_decl @UIntResult.cpp_destructor [concrete = constants.%UIntResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %ULongResult.cpp_destructor.decl: %ULongResult.cpp_destructor.type = fn_decl @ULongResult.cpp_destructor [concrete = constants.%ULongResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc24_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.116 = ref_param_pattern [concrete = constants.%self.param_patt.adc] -// CHECK:STDOUT: %self.patt: %pattern_type.116 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7ed] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %UIntResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %UIntResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc19 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f8a = ref_param_pattern [concrete = constants.%self.param_patt.7ab] -// CHECK:STDOUT: %self.patt: %pattern_type.f8a = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.7af] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ULongResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ULongResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -4897,8 +4418,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc24_59.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc24_59.4: init %f32.3bc to %.loc24_59.3 = in_place_init %.loc24_59.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc24_59.5: init %Array.f2e to %a.var = array_init (%.loc24_59.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc24_3: init %Array.f2e = converted %.loc24_59.1, %.loc24_59.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc24_3 +// CHECK:STDOUT: %.loc24_3.1: init %Array.f2e = converted %.loc24_59.1, %.loc24_59.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc24_3.1 // CHECK:STDOUT: %.loc24_50: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -4921,61 +4442,45 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%a.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %.loc22_74.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%.loc22_74.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %.loc19_87.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%.loc19_87.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %.loc16_89.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%.loc16_89.3) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc22_74.1: %Destroy.type = facet_value constants.%UIntResult, (constants.%DestroyImpl.impl_witness.c44, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.5cf] +// CHECK:STDOUT: %.loc22_74.5: %Destroy.type = converted constants.%UIntResult, %Destroy.facet.loc22_74.1 [concrete = constants.%Destroy.facet.5cf] +// CHECK:STDOUT: %Destroy.facet.loc22_74.2: %Destroy.type = facet_value constants.%UIntResult, (constants.%DestroyImpl.impl_witness.c44, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.5cf] +// CHECK:STDOUT: %.loc22_74.6: %Destroy.type = converted constants.%UIntResult, %Destroy.facet.loc22_74.2 [concrete = constants.%Destroy.facet.5cf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc22_74.3) +// CHECK:STDOUT: %Destroy.facet.loc19_87.1: %Destroy.type = facet_value constants.%ULongResult, (constants.%DestroyImpl.impl_witness.2ef, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.cbb] +// CHECK:STDOUT: %.loc19_87.5: %Destroy.type = converted constants.%ULongResult, %Destroy.facet.loc19_87.1 [concrete = constants.%Destroy.facet.cbb] +// CHECK:STDOUT: %Destroy.facet.loc19_87.2: %Destroy.type = facet_value constants.%ULongResult, (constants.%DestroyImpl.impl_witness.2ef, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.cbb] +// CHECK:STDOUT: %.loc19_87.6: %Destroy.type = converted constants.%ULongResult, %Destroy.facet.loc19_87.2 [concrete = constants.%Destroy.facet.cbb] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc19_87.3) +// CHECK:STDOUT: %Destroy.facet.loc16_89.1: %Destroy.type = facet_value constants.%ULongResult, (constants.%DestroyImpl.impl_witness.2ef, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.cbb] +// CHECK:STDOUT: %.loc16_89.5: %Destroy.type = converted constants.%ULongResult, %Destroy.facet.loc16_89.1 [concrete = constants.%Destroy.facet.cbb] +// CHECK:STDOUT: %Destroy.facet.loc16_89.2: %Destroy.type = facet_value constants.%ULongResult, (constants.%DestroyImpl.impl_witness.2ef, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.cbb] +// CHECK:STDOUT: %.loc16_89.6: %Destroy.type = converted constants.%ULongResult, %Destroy.facet.loc16_89.2 [concrete = constants.%Destroy.facet.cbb] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc16_89.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc24: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc24) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22(%self.param: ref %UIntResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22(%self.param: ref %UIntResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %UIntResult.cpp_destructor.call: init %empty_tuple.type = call imports.%UIntResult.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19(%self.param: ref %ULongResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19(%self.param: ref %ULongResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %ULongResult.cpp_destructor.call: init %empty_tuple.type = call imports.%ULongResult.cpp_destructor.decl(%self.param) +// CHECK:STDOUT: %.loc24_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc24_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -5009,21 +4514,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.f71: type = fn_type_with_self_type %Copy.WithSelf.Op.type.7ae, %Copy.facet [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.Copy.impl.Op.type: type = fn_type @Cpp.unsigned_long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.Copy.impl.Op: %Cpp.unsigned_long.as.Copy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.129: type = pattern_type %u32 [concrete] -// CHECK:STDOUT: %self.param_patt.6f9: %pattern_type.129 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ddd: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt.6f9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ca8: %pattern_type.1a0 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ffb: %pattern_type.1a0 = wrapper_binding_pattern self, %self.param_patt.ca8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a37: %SubobjectDestroy.type = facet_value %Cpp.unsigned_long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.91e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a37) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.unsigned_long, (%DestroyImpl.impl_witness.91e, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -5035,37 +4536,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.df0 = impl_witness_table (%Core.import_ref.06c), @Core.IntLiteral.as.ImplicitAs.impl.7b0 [concrete] // CHECK:STDOUT: %Core.import_ref.9c3: %Cpp.unsigned_long.as.Copy.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.unsigned_long.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.786 = impl_witness_table (%Core.import_ref.9c3), @Cpp.unsigned_long.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.129 = ref_param_pattern [concrete = constants.%self.param_patt.6f9] -// CHECK:STDOUT: %self.patt: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.129 = ref_param_pattern [concrete = constants.%self.param_patt.6f9] -// CHECK:STDOUT: %self.patt: %pattern_type.129 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ddd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1a0 = ref_param_pattern [concrete = constants.%self.param_patt.ca8] -// CHECK:STDOUT: %self.patt: %pattern_type.1a0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ffb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.unsigned_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.unsigned_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1a0 = ref_param_pattern [concrete = constants.%self.param_patt.ca8] -// CHECK:STDOUT: %self.patt: %pattern_type.1a0 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ffb] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.unsigned_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.unsigned_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CopyUnsignedLong() { @@ -5075,8 +4547,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.219 = impl_witness_access constants.%ImplicitAs.impl_witness.938, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.unsigned_long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.0e4] -// CHECK:STDOUT: %.loc8_3: init %Cpp.unsigned_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.0e4] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.unsigned_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.0e4] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %unsigned_long.ref.loc8 [concrete = constants.%Cpp.unsigned_long] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %unsigned_long.ref.loc8: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long] @@ -5102,32 +4574,22 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %b.patt: %pattern_type.1a0 = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.1a0 = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Cpp.unsigned_long, (constants.%DestroyImpl.impl_witness.91e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%Cpp.unsigned_long, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Cpp.unsigned_long, (constants.%DestroyImpl.impl_witness.91e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Cpp.unsigned_long, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.unsigned_long, (constants.%DestroyImpl.impl_witness.91e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.unsigned_long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.unsigned_long, (constants.%DestroyImpl.impl_witness.91e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.unsigned_long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %u32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %u32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %u32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %u32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %Cpp.unsigned_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.unsigned_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %Cpp.unsigned_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%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 136fb32255ae..faf659028393 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 @@ -673,27 +673,27 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f84: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -709,37 +709,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %As.impl_witness_table.1c2 = impl_witness_table (%Core.import_ref.9e0), @Core.IntLiteral.as.As.impl.753 [concrete] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -780,8 +751,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc11_50.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_50.4: init %f32.3bc to %.loc11_50.3 = in_place_init %.loc11_50.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc11_50.5: init %Array.f2e to %a.var = array_init (%.loc11_50.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %Array.f2e = converted %.loc11_50.1, %.loc11_50.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %Array.f2e = converted %.loc11_50.1, %.loc11_50.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc11_3.1 // CHECK:STDOUT: %.loc11_41: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -808,37 +779,27 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc11: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc11, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc11) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc11_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -913,27 +874,27 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f84: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -949,37 +910,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %As.impl_witness_table.43c = impl_witness_table (%Core.import_ref.d9c7), @Core.IntLiteral.as.As.impl.d83 [concrete] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1020,8 +952,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc11_59.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc11_59.4: init %f32.3bc to %.loc11_59.3 = in_place_init %.loc11_59.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc11_59.5: init %Array.f2e to %a.var = array_init (%.loc11_59.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc11_3: init %Array.f2e = converted %.loc11_59.1, %.loc11_59.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc11_3 +// CHECK:STDOUT: %.loc11_3.1: init %Array.f2e = converted %.loc11_59.1, %.loc11_59.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc11_3.1 // CHECK:STDOUT: %.loc11_50: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -1048,37 +980,27 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc11: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc11, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc11) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc11_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc11_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc11_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc11_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc11_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc11_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1167,44 +1089,41 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.b62: %pattern_type.ae7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.5c45: %pattern_type.ae7 = wrapper_binding_pattern self, %self.param_patt.b62 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %LongResult.cpp_destructor.type: type = fn_type @LongResult.cpp_destructor [concrete] // CHECK:STDOUT: %LongResult.cpp_destructor: %LongResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.98a: %pattern_type.357 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.784: %pattern_type.357 = wrapper_binding_pattern self, %self.param_patt.98a [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%LongResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.575: %SubobjectDestroy.type = facet_value %LongResult, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.8a6: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.575) [concrete] +// CHECK:STDOUT: %Destroy.facet.b97: %Destroy.type = facet_value %LongResult, (%DestroyImpl.impl_witness.8a6, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %LongLongResult.cpp_destructor.type: type = fn_type @LongLongResult.cpp_destructor [concrete] // CHECK:STDOUT: %LongLongResult.cpp_destructor: %LongLongResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%LongLongResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b82: %SubobjectDestroy.type = facet_value %LongLongResult, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c0a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b82) [concrete] +// CHECK:STDOUT: %Destroy.facet.15c: %Destroy.type = facet_value %LongLongResult, (%DestroyImpl.impl_witness.c0a, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1215,7 +1134,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .As = %Core.As // CHECK:STDOUT: .Array = %Core.Array -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1259,62 +1178,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/types/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %LongResult.cpp_destructor.decl: %LongResult.cpp_destructor.type = fn_decl @LongResult.cpp_destructor [concrete = constants.%LongResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %LongLongResult.cpp_destructor.decl: %LongLongResult.cpp_destructor.type = fn_decl @LongLongResult.cpp_destructor [concrete = constants.%LongLongResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc24_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ae7 = ref_param_pattern [concrete = constants.%self.param_patt.b62] -// CHECK:STDOUT: %self.patt: %pattern_type.ae7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5c45] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %LongResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %LongResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc19 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.357 = ref_param_pattern [concrete = constants.%self.param_patt.98a] -// CHECK:STDOUT: %self.patt: %pattern_type.357 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.784] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %LongLongResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %LongLongResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -1416,8 +1282,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc24_55.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc24_55.4: init %f32.3bc to %.loc24_55.3 = in_place_init %.loc24_55.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc24_55.5: init %Array.f2e to %a.var = array_init (%.loc24_55.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc24_3: init %Array.f2e = converted %.loc24_55.1, %.loc24_55.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc24_3 +// CHECK:STDOUT: %.loc24_3.1: init %Array.f2e = converted %.loc24_55.1, %.loc24_55.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc24_3.1 // CHECK:STDOUT: %.loc24_46: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -1440,61 +1306,45 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%a.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %.loc22_77.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%.loc22_77.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %.loc19_101.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%.loc19_101.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %.loc16_87.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%.loc16_87.3) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc22_77.1: %Destroy.type = facet_value constants.%LongResult, (constants.%DestroyImpl.impl_witness.8a6, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.b97] +// CHECK:STDOUT: %.loc22_77.5: %Destroy.type = converted constants.%LongResult, %Destroy.facet.loc22_77.1 [concrete = constants.%Destroy.facet.b97] +// CHECK:STDOUT: %Destroy.facet.loc22_77.2: %Destroy.type = facet_value constants.%LongResult, (constants.%DestroyImpl.impl_witness.8a6, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.b97] +// CHECK:STDOUT: %.loc22_77.6: %Destroy.type = converted constants.%LongResult, %Destroy.facet.loc22_77.2 [concrete = constants.%Destroy.facet.b97] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc22_77.3) +// CHECK:STDOUT: %Destroy.facet.loc19_101.1: %Destroy.type = facet_value constants.%LongLongResult, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %.loc19_101.5: %Destroy.type = converted constants.%LongLongResult, %Destroy.facet.loc19_101.1 [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %Destroy.facet.loc19_101.2: %Destroy.type = facet_value constants.%LongLongResult, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %.loc19_101.6: %Destroy.type = converted constants.%LongLongResult, %Destroy.facet.loc19_101.2 [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc19_101.3) +// CHECK:STDOUT: %Destroy.facet.loc16_87.1: %Destroy.type = facet_value constants.%LongLongResult, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %.loc16_87.5: %Destroy.type = converted constants.%LongLongResult, %Destroy.facet.loc16_87.1 [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %Destroy.facet.loc16_87.2: %Destroy.type = facet_value constants.%LongLongResult, (constants.%DestroyImpl.impl_witness.c0a, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: %.loc16_87.6: %Destroy.type = converted constants.%LongLongResult, %Destroy.facet.loc16_87.2 [concrete = constants.%Destroy.facet.15c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc16_87.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc24: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc24) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22(%self.param: ref %LongResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22(%self.param: ref %LongResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %LongResult.cpp_destructor.call: init %empty_tuple.type = call imports.%LongResult.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19(%self.param: ref %LongLongResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19(%self.param: ref %LongLongResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %LongLongResult.cpp_destructor.call: init %empty_tuple.type = call imports.%LongLongResult.cpp_destructor.decl(%self.param) +// CHECK:STDOUT: %.loc24_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc24_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1528,21 +1378,17 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.41f: type = fn_type_with_self_type %Copy.WithSelf.Op.type.449, %Copy.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Copy.impl.Op.type: type = fn_type @Cpp.long_long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Copy.impl.Op: %Cpp.long_long.as.Copy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.c0e: type = pattern_type %i64 [concrete] -// CHECK:STDOUT: %self.param_patt.758: %pattern_type.c0e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.721: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt.758 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7e1: %pattern_type.d58 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.718: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt.7e1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.186: %SubobjectDestroy.type = facet_value %Cpp.long_long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a56: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.186) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long_long, (%DestroyImpl.impl_witness.a56, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1554,37 +1400,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.6f8 = impl_witness_table (%Core.import_ref.06c), @Core.IntLiteral.as.ImplicitAs.impl.dc9 [concrete] // CHECK:STDOUT: %Core.import_ref.9c3: %Cpp.long_long.as.Copy.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long_long.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.d10 = impl_witness_table (%Core.import_ref.9c3), @Cpp.long_long.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CopyLongLong() { @@ -1594,8 +1411,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.2be = impl_witness_access constants.%ImplicitAs.impl_witness.f09, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long_long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.b19] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.b19] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.b19] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long_long.ref.loc8 [concrete = constants.%Cpp.long_long] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref.loc8: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] @@ -1621,34 +1438,24 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %b.patt: %pattern_type.d58 = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.d58 = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- comparisons_homogeneous_long_long.carbon // CHECK:STDOUT: @@ -2749,8 +2556,6 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.6dc61b.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.2, @Cpp.long_long.as.AddAssignWith.impl(%U.d70) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.6dc61b.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.2 = struct_value () [symbolic] -// CHECK:STDOUT: %self.param_patt.7e1: %pattern_type.d58 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.718: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt.7e1 [concrete] // CHECK:STDOUT: %Copy.impl_witness.1ae: = impl_witness imports.%Copy.impl_witness_table.d10 [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Cpp.long_long, (%Copy.impl_witness.1ae) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.26f: = impl_witness imports.%ImplicitAs.impl_witness_table.f48, @T.as_type.as.ImplicitAs.impl(%Copy.facet) [concrete] @@ -2900,19 +2705,17 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.a5c: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.937, %RightShiftAssignWith.facet.112 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.ab7395.1: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.c6ebc3.2, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.030) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.ab7395.2: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.c6ebc3.1, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.030) [concrete] -// CHECK:STDOUT: %pattern_type.c0e: type = pattern_type %i64 [concrete] -// CHECK:STDOUT: %self.param_patt.758: %pattern_type.c0e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.721: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt.758 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.186: %SubobjectDestroy.type = facet_value %Cpp.long_long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a56: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.186) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long_long, (%DestroyImpl.impl_witness.a56, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Copy.impl.Op.type: type = fn_type @Cpp.long_long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Copy.impl.Op: %Cpp.long_long.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -2958,37 +2761,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.import_ref.477: @Cpp.long_long.as.RightShiftAssignWith.impl.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.2 (%Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.f5b3db.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long_long.as.RightShiftAssignWith.impl.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.2 (constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.0019d5.1)] // CHECK:STDOUT: %RightShiftAssignWith.impl_witness_table.fdf = impl_witness_table (%Core.import_ref.477), @Cpp.long_long.as.RightShiftAssignWith.impl [concrete] // CHECK:STDOUT: %Core.Op.876: @Cpp.long_long.as.RightShiftAssignWith.impl.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.1 (%Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.f5b3db.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long_long.as.RightShiftAssignWith.impl.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.1 (constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.0019d5.2)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CompoundAssignmentHomogeneousLongLong() { @@ -2998,8 +2772,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.2be = impl_witness_access constants.%ImplicitAs.impl_witness.f09, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long_long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.b19] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long_long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.b19] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long_long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.b19] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long_long.ref.loc8 [concrete = constants.%Cpp.long_long] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref.loc8: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] @@ -3014,8 +2788,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %impl.elem0.loc9: %.2be = impl_witness_access constants.%ImplicitAs.impl_witness.f09, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long_long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.b19] -// CHECK:STDOUT: %.loc9_3: init %Cpp.long_long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.b19] -// CHECK:STDOUT: assign %b.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %Cpp.long_long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.b19] +// CHECK:STDOUT: assign %b.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_13: type = splice_block %long_long.ref.loc9 [concrete = constants.%Cpp.long_long] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref.loc9: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] @@ -3195,34 +2969,24 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc21, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.2(constants.%ImplicitAs.facet.030) [concrete = constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.ab7395.2] // CHECK:STDOUT: %bound_method.loc21_5.3: = bound_method %a.ref.loc21, %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc21_5.3(%a.ref.loc21, %.loc21_9) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- compound_assignment_hereogeneous_long_long_and_i64.carbon // CHECK:STDOUT: @@ -3231,7 +2995,6 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete] -// CHECK:STDOUT: %pattern_type.c0e: type = pattern_type %i64 [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Cpp.long_long: type = class_type @LongLong64 [concrete] // CHECK:STDOUT: %pattern_type.d58: type = pattern_type %Cpp.long_long [concrete] @@ -3252,8 +3015,6 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.6dc61b.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.2, @Cpp.long_long.as.AddAssignWith.impl(%U.d70) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.6dc61b.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.2 = struct_value () [symbolic] -// CHECK:STDOUT: %self.param_patt.7e1: %pattern_type.d58 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.718: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt.7e1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.244: = impl_witness imports.%ImplicitAs.impl_witness_table.591 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.1e8: %ImplicitAs.type.a57 = facet_value %i64, (%ImplicitAs.impl_witness.244) [concrete] // CHECK:STDOUT: %AddAssignWith.impl_witness.27a: = impl_witness imports.%AddAssignWith.impl_witness_table.f2f, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet.1e8) [concrete] @@ -3405,18 +3166,17 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.4eef: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.e6e, %RightShiftAssignWith.facet.2de [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.9e346f.1: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.95dd29.2, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.1e8) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.9e346f.2: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.95dd29.1, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.1e8) [concrete] -// CHECK:STDOUT: %self.param_patt.758: %pattern_type.c0e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.721: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt.758 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.186: %SubobjectDestroy.type = facet_value %Cpp.long_long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a56: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.186) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long_long, (%DestroyImpl.impl_witness.a56, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3458,37 +3218,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.import_ref.477: @Cpp.long_long.as.RightShiftAssignWith.impl.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.2 (%Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.f5b3db.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long_long.as.RightShiftAssignWith.impl.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.2 (constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.0019d5.1)] // CHECK:STDOUT: %RightShiftAssignWith.impl_witness_table.fdf = impl_witness_table (%Core.import_ref.477), @Cpp.long_long.as.RightShiftAssignWith.impl [concrete] // CHECK:STDOUT: %Core.Op.876: @Cpp.long_long.as.RightShiftAssignWith.impl.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.1 (%Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.f5b3db.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long_long.as.RightShiftAssignWith.impl.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.1 (constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.0019d5.2)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CompoundAssignmentLongLongAndI64() { @@ -3499,8 +3230,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %impl.elem0.loc9: %.2be = impl_witness_access constants.%ImplicitAs.impl_witness.f09, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.3ce] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5d7] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long_long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.b19] -// CHECK:STDOUT: %.loc9_3: init %Cpp.long_long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.b19] -// CHECK:STDOUT: assign %a.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %Cpp.long_long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.b19] +// CHECK:STDOUT: assign %a.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_13: type = splice_block %long_long.ref [concrete = constants.%Cpp.long_long] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] @@ -3720,32 +3451,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc20_9.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc20 // CHECK:STDOUT: %.loc20_9.2: %Cpp.long_long = converted %b.ref.loc20, %.loc20_9.1 // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc20_5.3(%a.ref.loc20, %.loc20_9.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %i64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- compound_assignment_heterogeneous_long_long_and_int_literal.carbon // CHECK:STDOUT: @@ -3774,8 +3491,6 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.6dc61b.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.2, @Cpp.long_long.as.AddAssignWith.impl(%U.d70) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.6dc61b.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.2 = struct_value () [symbolic] -// CHECK:STDOUT: %self.param_patt.7e1: %pattern_type.d58 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.718: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt.7e1 [concrete] // CHECK:STDOUT: %AddAssignWith.impl_witness.ddb: = impl_witness imports.%AddAssignWith.impl_witness_table.f2f, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.bbde48.1: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.2, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.cf7a8d.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.bbde48.1 = struct_value () [concrete] @@ -3786,19 +3501,17 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.d0b: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.ca9, %AddAssignWith.facet.c4c [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.fd006b.1: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.cf7a8d.2, @Cpp.long_long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.fd006b.2: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.cf7a8d.1, @Cpp.long_long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet) [concrete] -// CHECK:STDOUT: %pattern_type.c0e: type = pattern_type %i64 [concrete] -// CHECK:STDOUT: %self.param_patt.758: %pattern_type.c0e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.721: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt.758 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.186: %SubobjectDestroy.type = facet_value %Cpp.long_long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a56: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.186) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long_long, (%DestroyImpl.impl_witness.a56, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3811,37 +3524,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.import_ref.718: @Cpp.long_long.as.AddAssignWith.impl.%Cpp.long_long.as.AddAssignWith.impl.Op.type.2 (%Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long_long.as.AddAssignWith.impl.%Cpp.long_long.as.AddAssignWith.impl.Op.2 (constants.%Cpp.long_long.as.AddAssignWith.impl.Op.6dc61b.1)] // CHECK:STDOUT: %AddAssignWith.impl_witness_table.f2f = impl_witness_table (%Core.import_ref.718), @Cpp.long_long.as.AddAssignWith.impl [concrete] // CHECK:STDOUT: %Core.Op.a64: @Cpp.long_long.as.AddAssignWith.impl.%Cpp.long_long.as.AddAssignWith.impl.Op.type.1 (%Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long_long.as.AddAssignWith.impl.%Cpp.long_long.as.AddAssignWith.impl.Op.1 (constants.%Cpp.long_long.as.AddAssignWith.impl.Op.6dc61b.2)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CompoundAssignmentLongLongAndIntLiteral() { @@ -3851,8 +3535,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.2be = impl_witness_access constants.%ImplicitAs.impl_witness.f09, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long_long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.b19] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long_long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.b19] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long_long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.b19] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long_long.ref [concrete = constants.%Cpp.long_long] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] @@ -3883,32 +3567,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc9_8.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.b19] // CHECK:STDOUT: %.loc9_8.2: %Cpp.long_long = converted %int_1.loc9, %.loc9_8.1 [concrete = constants.%int_1.b19] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc9_5.3(%a.ref, %.loc9_8.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %i64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- compound_assignment_heterogeneous_long_long_and_runtime_i64.carbon // CHECK:STDOUT: @@ -3953,8 +3623,6 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.6dc61b.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.2, @Cpp.long_long.as.AddAssignWith.impl(%U.d70) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.6dc61b.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.2 = struct_value () [symbolic] -// CHECK:STDOUT: %self.param_patt.7e1: %pattern_type.d58 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.718: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt.7e1 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.244: = impl_witness imports.%ImplicitAs.impl_witness_table.591 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.1e8: %ImplicitAs.type.a57 = facet_value %i64, (%ImplicitAs.impl_witness.244) [concrete] // CHECK:STDOUT: %AddAssignWith.impl_witness.27a: = impl_witness imports.%AddAssignWith.impl_witness_table.f2f, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet.1e8) [concrete] @@ -3971,18 +3639,17 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.380: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.ef1, %ImplicitAs.facet.1e8 [concrete] // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.type: type = fn_type @i64.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert: %i64.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.758: %pattern_type.c0e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.721: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt.758 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.186: %SubobjectDestroy.type = facet_value %Cpp.long_long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a56: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.186) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long_long, (%DestroyImpl.impl_witness.a56, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3999,37 +3666,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.Op.a64: @Cpp.long_long.as.AddAssignWith.impl.%Cpp.long_long.as.AddAssignWith.impl.Op.type.1 (%Cpp.long_long.as.AddAssignWith.impl.Op.type.51e002.2) = import_ref Core//prelude/types/cpp/int, Op, loaded [symbolic = @Cpp.long_long.as.AddAssignWith.impl.%Cpp.long_long.as.AddAssignWith.impl.Op.1 (constants.%Cpp.long_long.as.AddAssignWith.impl.Op.6dc61b.2)] // CHECK:STDOUT: %Core.import_ref.06c923.2: %i64.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.591 = impl_witness_table (%Core.import_ref.06c923.2), @i64.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CompoundAssignmentLongLongAndRuntimeI64() { @@ -4039,8 +3677,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.2be = impl_witness_access constants.%ImplicitAs.impl_witness.f09, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.3ce] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5d7] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long_long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.b19] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long_long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.b19] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long_long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.b19] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long_long.ref [concrete = constants.%Cpp.long_long] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] @@ -4084,32 +3722,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc10_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call // CHECK:STDOUT: %.loc10_8.2: %Cpp.long_long = converted %b.ref, %.loc10_8.1 // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_5.3(%a.ref, %.loc10_8.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %i64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- increment_decrement_long_long.carbon // CHECK:STDOUT: @@ -4139,8 +3763,6 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.8df: type = fn_type_with_self_type %Inc.WithSelf.Op.type.01f, %Inc.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Inc.impl.Op.type: type = fn_type @Cpp.long_long.as.Inc.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Inc.impl.Op: %Cpp.long_long.as.Inc.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7e1: %pattern_type.d58 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.718: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt.7e1 [concrete] // CHECK:STDOUT: %Dec.type: type = facet_type <@Dec> [concrete] // CHECK:STDOUT: %Dec.impl_witness: = impl_witness imports.%Dec.impl_witness_table [concrete] // CHECK:STDOUT: %Dec.facet: %Dec.type = facet_value %Cpp.long_long, (%Dec.impl_witness) [concrete] @@ -4148,19 +3770,17 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.7f0: type = fn_type_with_self_type %Dec.WithSelf.Op.type.3d8, %Dec.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Dec.impl.Op.type: type = fn_type @Cpp.long_long.as.Dec.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Dec.impl.Op: %Cpp.long_long.as.Dec.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.c0e: type = pattern_type %i64 [concrete] -// CHECK:STDOUT: %self.param_patt.758: %pattern_type.c0e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.721: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt.758 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.186: %SubobjectDestroy.type = facet_value %Cpp.long_long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a56: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.186) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.long_long, (%DestroyImpl.impl_witness.a56, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -4174,37 +3794,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Inc.impl_witness_table = impl_witness_table (%Core.import_ref.9c3475.1), @Cpp.long_long.as.Inc.impl [concrete] // CHECK:STDOUT: %Core.import_ref.9c3475.2: %Cpp.long_long.as.Dec.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long_long.as.Dec.impl.Op] // CHECK:STDOUT: %Dec.impl_witness_table = impl_witness_table (%Core.import_ref.9c3475.2), @Cpp.long_long.as.Dec.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c0e = ref_param_pattern [concrete = constants.%self.param_patt.758] -// CHECK:STDOUT: %self.patt: %pattern_type.c0e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.721] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d58 = ref_param_pattern [concrete = constants.%self.param_patt.7e1] -// CHECK:STDOUT: %self.patt: %pattern_type.d58 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.718] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IncrementDecrementLongLong() { @@ -4214,8 +3805,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.2be = impl_witness_access constants.%ImplicitAs.impl_witness.f09, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long_long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.b19] -// CHECK:STDOUT: %.loc8_3: init %Cpp.long_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.b19] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.long_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.b19] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %long_long.ref [concrete = constants.%Cpp.long_long] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] @@ -4233,32 +3824,18 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %impl.elem0.loc10: %.7f0 = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Cpp.long_long.as.Dec.impl.Op] // CHECK:STDOUT: %bound_method.loc10: = bound_method %a.ref.loc10, %impl.elem0.loc10 // CHECK:STDOUT: %Cpp.long_long.as.Dec.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10(%a.ref.loc10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.long_long, (constants.%DestroyImpl.impl_witness.a56, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.long_long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %i64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %i64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %i64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %i64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %Cpp.long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %Cpp.long_long) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- unsigned_long_long.carbon // CHECK:STDOUT: @@ -4359,44 +3936,41 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.049: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%f32.3bc, %ImplicitAs.facet.253) [concrete] // CHECK:STDOUT: %.f72: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.049, %ImplicitAs.facet.253 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b [concrete] -// CHECK:STDOUT: %pattern_type.239: type = pattern_type %f32.3bc [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f84: = bound_method %float.6da, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.239: %f32.3bc = float_value 1 [concrete] // CHECK:STDOUT: %array: %Array.f2e = tuple_value (%float.239) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.d31: %pattern_type.239 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a4c: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt.d31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.538: %pattern_type.98f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f9: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt.538 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.116: %pattern_type.97f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eb6: %pattern_type.97f = wrapper_binding_pattern self, %self.param_patt.116 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b96: %SubobjectDestroy.type = facet_value %f32.3bc, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b96) [concrete] +// CHECK:STDOUT: %Destroy.facet.3b3: %Destroy.type = facet_value %f32.3bc, (%DestroyImpl.impl_witness.3d1, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.322: %SubobjectDestroy.type = facet_value %Array.f2e, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7d2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.322) [concrete] +// CHECK:STDOUT: %Destroy.facet.9d5: %Destroy.type = facet_value %Array.f2e, (%DestroyImpl.impl_witness.7d2, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %ULongResult.cpp_destructor.type: type = fn_type @ULongResult.cpp_destructor [concrete] // CHECK:STDOUT: %ULongResult.cpp_destructor: %ULongResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.2ef: %pattern_type.97e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a5a: %pattern_type.97e = wrapper_binding_pattern self, %self.param_patt.2ef [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.1: = custom_witness (%ULongResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.cbb: %SubobjectDestroy.type = facet_value %ULongResult, (%custom_witness.fe1878.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a27: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cbb) [concrete] +// CHECK:STDOUT: %Destroy.facet.572: %Destroy.type = facet_value %ULongResult, (%DestroyImpl.impl_witness.a27, %custom_witness.fe1878.1) [concrete] // CHECK:STDOUT: %ULongLongResult.cpp_destructor.type: type = fn_type @ULongLongResult.cpp_destructor [concrete] // CHECK:STDOUT: %ULongLongResult.cpp_destructor: %ULongLongResult.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1878.2: = custom_witness (%ULongLongResult.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.525: %SubobjectDestroy.type = facet_value %ULongLongResult, (%custom_witness.fe1878.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.2a7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.525) [concrete] +// CHECK:STDOUT: %Destroy.facet.b3b: %Destroy.type = facet_value %ULongLongResult, (%DestroyImpl.impl_witness.2a7, %custom_witness.fe1878.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -4407,7 +3981,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .As = %Core.As // CHECK:STDOUT: .Array = %Core.Array -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -4453,62 +4027,9 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.Array: %Array.type = import_ref Core//prelude/types/array, Array, loaded [concrete = constants.%Array.generic] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f2e = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %ULongResult.cpp_destructor.decl: %ULongResult.cpp_destructor.type = fn_decl @ULongResult.cpp_destructor [concrete = constants.%ULongResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: %ULongLongResult.cpp_destructor.decl: %ULongLongResult.cpp_destructor.type = fn_decl @ULongLongResult.cpp_destructor [concrete = constants.%ULongLongResult.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc24_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.239 = ref_param_pattern [concrete = constants.%self.param_patt.d31] -// CHECK:STDOUT: %self.patt: %pattern_type.239 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a4c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f32.3bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f32.3bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc24_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98f = ref_param_pattern [concrete = constants.%self.param_patt.538] -// CHECK:STDOUT: %self.patt: %pattern_type.98f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.f2e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.f2e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.97f = ref_param_pattern [concrete = constants.%self.param_patt.116] -// CHECK:STDOUT: %self.patt: %pattern_type.97f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ULongResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ULongResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc19 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.97e = ref_param_pattern [concrete = constants.%self.param_patt.2ef] -// CHECK:STDOUT: %self.patt: %pattern_type.97e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a5a] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ULongLongResult = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ULongLongResult = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -4614,8 +4135,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc24_64.3: ref %f32.3bc = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc24_64.4: init %f32.3bc to %.loc24_64.3 = in_place_init %.loc24_64.2 [concrete = constants.%float.239] // CHECK:STDOUT: %.loc24_64.5: init %Array.f2e to %a.var = array_init (%.loc24_64.4) [concrete = constants.%array] -// CHECK:STDOUT: %.loc24_3: init %Array.f2e = converted %.loc24_64.1, %.loc24_64.5 [concrete = constants.%array] -// CHECK:STDOUT: assign %a.var, %.loc24_3 +// CHECK:STDOUT: %.loc24_3.1: init %Array.f2e = converted %.loc24_64.1, %.loc24_64.5 [concrete = constants.%array] +// CHECK:STDOUT: assign %a.var, %.loc24_3.1 // CHECK:STDOUT: %.loc24_55: type = splice_block %Array [concrete = constants.%Array.f2e] { // CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc] // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] @@ -4638,61 +4159,45 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a.patt: %pattern_type.98f = ref_binding_pattern a [concrete = constants.%a.patt] // CHECK:STDOUT: %a.var_patt: %pattern_type.98f = var_pattern %a.patt [concrete = constants.%a.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%a.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %.loc22_79.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%.loc22_79.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %.loc19_105.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%.loc19_105.3) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %.loc16_107.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%.loc16_107.3) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%Array.f2e, (constants.%DestroyImpl.impl_witness.7d2, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%Array.f2e, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.9d5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc22_79.1: %Destroy.type = facet_value constants.%ULongResult, (constants.%DestroyImpl.impl_witness.a27, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.572] +// CHECK:STDOUT: %.loc22_79.5: %Destroy.type = converted constants.%ULongResult, %Destroy.facet.loc22_79.1 [concrete = constants.%Destroy.facet.572] +// CHECK:STDOUT: %Destroy.facet.loc22_79.2: %Destroy.type = facet_value constants.%ULongResult, (constants.%DestroyImpl.impl_witness.a27, constants.%custom_witness.fe1878.1) [concrete = constants.%Destroy.facet.572] +// CHECK:STDOUT: %.loc22_79.6: %Destroy.type = converted constants.%ULongResult, %Destroy.facet.loc22_79.2 [concrete = constants.%Destroy.facet.572] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc22_79.3) +// CHECK:STDOUT: %Destroy.facet.loc19_105.1: %Destroy.type = facet_value constants.%ULongLongResult, (constants.%DestroyImpl.impl_witness.2a7, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %.loc19_105.5: %Destroy.type = converted constants.%ULongLongResult, %Destroy.facet.loc19_105.1 [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %Destroy.facet.loc19_105.2: %Destroy.type = facet_value constants.%ULongLongResult, (constants.%DestroyImpl.impl_witness.2a7, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %.loc19_105.6: %Destroy.type = converted constants.%ULongLongResult, %Destroy.facet.loc19_105.2 [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc19_105.3) +// CHECK:STDOUT: %Destroy.facet.loc16_107.1: %Destroy.type = facet_value constants.%ULongLongResult, (constants.%DestroyImpl.impl_witness.2a7, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %.loc16_107.5: %Destroy.type = converted constants.%ULongLongResult, %Destroy.facet.loc16_107.1 [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %Destroy.facet.loc16_107.2: %Destroy.type = facet_value constants.%ULongLongResult, (constants.%DestroyImpl.impl_witness.2a7, constants.%custom_witness.fe1878.2) [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: %.loc16_107.6: %Destroy.type = converted constants.%ULongLongResult, %Destroy.facet.loc16_107.2 [concrete = constants.%Destroy.facet.b3b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc16_107.3) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.1(%self.param: ref %f32.3bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.1(%self.param: ref %f32.3bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_3.2(%self.param: ref %Array.f2e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.f2e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc24: ref %f32.3bc = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc24, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc24) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_3.2(%self.param: ref %Array.f2e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_3.2(%self.param: ref %Array.f2e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22(%self.param: ref %ULongResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22(%self.param: ref %ULongResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %ULongResult.cpp_destructor.call: init %empty_tuple.type = call imports.%ULongResult.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19(%self.param: ref %ULongLongResult) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19(%self.param: ref %ULongLongResult) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %ULongLongResult.cpp_destructor.call: init %empty_tuple.type = call imports.%ULongLongResult.cpp_destructor.decl(%self.param) +// CHECK:STDOUT: %.loc24_3.1: ref %f32.3bc = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%f32.3bc, (constants.%DestroyImpl.impl_witness.3d1, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%f32.3bc, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.3b3] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc24_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -4726,21 +4231,17 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.637: type = fn_type_with_self_type %Copy.WithSelf.Op.type.074, %Copy.facet [concrete] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.Copy.impl.Op.type: type = fn_type @Cpp.unsigned_long_long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.Copy.impl.Op: %Cpp.unsigned_long_long.as.Copy.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.dd7: type = pattern_type %u64 [concrete] -// CHECK:STDOUT: %self.param_patt.e89: %pattern_type.dd7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.aab: %pattern_type.dd7 = wrapper_binding_pattern self, %self.param_patt.e89 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc9_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.1ea: %pattern_type.4cd = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.919: %pattern_type.4cd = wrapper_binding_pattern self, %self.param_patt.1ea [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.360: %SubobjectDestroy.type = facet_value %Cpp.unsigned_long_long, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d3d: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.360) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Cpp.unsigned_long_long, (%DestroyImpl.impl_witness.d3d, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -4752,37 +4253,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.6ac = impl_witness_table (%Core.import_ref.06c), @Core.IntLiteral.as.ImplicitAs.impl.b36 [concrete] // CHECK:STDOUT: %Core.import_ref.9c3: %Cpp.unsigned_long_long.as.Copy.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.unsigned_long_long.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.6d7 = impl_witness_table (%Core.import_ref.9c3), @Cpp.unsigned_long_long.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dd7 = ref_param_pattern [concrete = constants.%self.param_patt.e89] -// CHECK:STDOUT: %self.patt: %pattern_type.dd7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aab] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc9_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dd7 = ref_param_pattern [concrete = constants.%self.param_patt.e89] -// CHECK:STDOUT: %self.patt: %pattern_type.dd7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aab] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %u64 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %u64 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4cd = ref_param_pattern [concrete = constants.%self.param_patt.1ea] -// CHECK:STDOUT: %self.patt: %pattern_type.4cd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.919] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.unsigned_long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.unsigned_long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc9_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4cd = ref_param_pattern [concrete = constants.%self.param_patt.1ea] -// CHECK:STDOUT: %self.patt: %pattern_type.4cd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.919] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Cpp.unsigned_long_long = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Cpp.unsigned_long_long = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @CopyUnsignedLongLong() { @@ -4792,8 +4264,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %impl.elem0.loc8: %.c23 = impl_witness_access constants.%ImplicitAs.impl_witness.c73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.unsigned_long_long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.877] -// CHECK:STDOUT: %.loc8_3: init %Cpp.unsigned_long_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.877] -// CHECK:STDOUT: assign %a.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %Cpp.unsigned_long_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.877] +// CHECK:STDOUT: assign %a.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %unsigned_long_long.ref.loc8 [concrete = constants.%Cpp.unsigned_long_long] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %unsigned_long_long.ref.loc8: type = name_ref unsigned_long_long, constants.%Cpp.unsigned_long_long [concrete = constants.%Cpp.unsigned_long_long] @@ -4819,32 +4291,22 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %b.patt: %pattern_type.4cd = ref_binding_pattern b [concrete = constants.%b.patt] // CHECK:STDOUT: %b.var_patt: %pattern_type.4cd = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%Cpp.unsigned_long_long, (constants.%DestroyImpl.impl_witness.d3d, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%Cpp.unsigned_long_long, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%Cpp.unsigned_long_long, (constants.%DestroyImpl.impl_witness.d3d, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%Cpp.unsigned_long_long, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%Cpp.unsigned_long_long, (constants.%DestroyImpl.impl_witness.d3d, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%Cpp.unsigned_long_long, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%Cpp.unsigned_long_long, (constants.%DestroyImpl.impl_witness.d3d, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%Cpp.unsigned_long_long, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.1(%self.param: ref %u64) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.1(%self.param: ref %u64) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.1(%self.param: ref %u64) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.1(%self.param: ref %u64) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9_3.2(%self.param: ref %Cpp.unsigned_long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9_3.2(%self.param: ref %Cpp.unsigned_long_long) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9_3.2(%self.param: ref %Cpp.unsigned_long_long) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9_3.2(%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 cdeb36237f83..407108ac483b 100644 --- a/toolchain/check/testdata/interop/cpp/range_for.carbon +++ b/toolchain/check/testdata/interop/cpp/range_for.carbon @@ -385,7 +385,7 @@ fn TestIterateDriver(var m: Cpp.DiffMutableADL.MutableRange) { // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+6]]:3-16: error: semantics TODO: `Rewriting operator== using operator== is not supported` [SemanticsTodo] // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-12]]:1-89: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: - // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+3]]:3-16: error: cannot convert type `Cpp.DiffMutableADL.MutableRange` into type implementing `Core.Iterate where .(Core.Iterate.ElementType) = Cpp.DiffMutableADL.ValueType as Core.Destroy & Core.Copy` [ConversionFailureTypeToFacet] + // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE+3]]:3-16: error: cannot convert type `Cpp.DiffMutableADL.MutableRange` into type implementing `Core.Iterate where .(Core.Iterate.ElementType) = Cpp.DiffMutableADL.ValueType as Core.Copy & Core.Destroy` [ConversionFailureTypeToFacet] // CHECK:STDERR: fail_todo_adl_returns_different_types_mutable.carbon:[[@LINE-15]]:1-89: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: TestIterate(m); @@ -639,44 +639,48 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %facet_type.bd0: type = facet_type <@Copy & @Destroy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.Get.2d0: %Optional.Get.type.786 = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f2f: %Optional.HasValue.type.3ea = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.74b: type = facet_access_type %T.283 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.28a: = lookup_impl_witness %T.283, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.16e: %Destroy.type = facet_value %T.as_type.74b, (%Destroy.lookup_impl_witness.28a) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.91c: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.16e) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.ade: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.b49: type = unbound_element_type %DefaultOptionalStorage.ade, bool [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.229: type = unbound_element_type %DefaultOptionalStorage.ade, %MaybeUnformed.91c [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.2f2: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.884: %T.as_type.as.OptionalStorage.impl.Get.type.2f2 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.d28: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.f29: %T.as_type.as.OptionalStorage.impl.Has.type.d28 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.760: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.268: %T.as_type.as.OptionalStorage.impl.Some.type.760 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.925: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.f42: %T.as_type.as.OptionalStorage.impl.None.type.925 = struct_value () [symbolic] +// CHECK:STDOUT: %T.f84392.1: %facet_type.bd0 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.c1cc3e.1: type = facet_access_type %T.f84392.1 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.70f: = lookup_impl_witness %T.f84392.1, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.bf2: = lookup_impl_witness %T.f84392.1, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.dc4: %Destroy.type = facet_value %T.as_type.c1cc3e.1, (%SubobjectDestroy.lookup_impl_witness.70f, %DestroyImpl.lookup_impl_witness.bf2) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.348: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.dc4) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.476: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.4a2: type = unbound_element_type %DefaultOptionalStorage.476, bool [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.ff3: type = unbound_element_type %DefaultOptionalStorage.476, %MaybeUnformed.348 [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.f27: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.e40: %T.as_type.as.OptionalStorage.impl.Get.type.f27 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.18e: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.463: %T.as_type.as.OptionalStorage.impl.Has.type.18e = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.292: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.ae9: %T.as_type.as.OptionalStorage.impl.Some.type.292 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.b57: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.791: %T.as_type.as.OptionalStorage.impl.None.type.b57 = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %Int.d4bbe0.1: type = class_type @Int, @Int(%N.fe9) [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.1: = custom_witness (%Destroy.WithSelf.Op.403171.1, %Destroy.WithSelf.SubobjectDestroy.d01daf.1, %Destroy.WithSelf.SelfDestruct.db3fdb.1), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.ed0: %Destroy.type = facet_value %i32, (%custom_witness.f8f19d.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.046: %Destroy.type = facet_value %i32, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.077) [concrete] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Int.d4bbe0.2: type = class_type @Int, @Int(%To) [symbolic] @@ -688,36 +692,38 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d3, @CppUnsafeDeref [symbolic_self] // CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] // CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] -// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.f45530.3: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.5a8: %T.as_type.as.Iterate.impl.Next.type.d4a = struct_value () [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.3, @CppRangeForIterate [symbolic] // CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] // CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.8a1: %T.as_type.as.Iterate.impl.NewCursor.type.8fb = struct_value () [symbolic] // CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] // CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.dc9: = lookup_impl_witness %tuple.type.1ba, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.504: = lookup_impl_witness %tuple.type.1ba, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.9b6: %Destroy.type = facet_value %tuple.type.1ba, (%SubobjectDestroy.lookup_impl_witness.dc9, %DestroyImpl.lookup_impl_witness.504) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.b15da7.2: = lookup_impl_witness %impl.elem0.493765.2, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.4e7f44.2: = lookup_impl_witness %impl.elem0.493765.2, @DestroyImpl [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %facet_value.189: %facet_type.bd0 = facet_value %impl.elem0.493765.2, (%SubobjectDestroy.lookup_impl_witness.b15da7.2, %DestroyImpl.lookup_impl_witness.4e7f44.2, %Copy.lookup_impl_witness.167) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.3c1: %Int.as.Copy.impl.Op.type.a1d = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.8af: = impl_witness imports.%Copy.impl_witness_table.f44, @Int.as.Copy.impl(%int_32) [concrete] -// CHECK:STDOUT: %facet_value.343: %facet_type.f48 = facet_value %i32, (%custom_witness.f8f19d.1, %Copy.impl_witness.8af) [concrete] +// CHECK:STDOUT: %facet_value.521: %facet_type.bd0 = facet_value %i32, (%custom_witness.b80ef6.1, %DestroyImpl.impl_witness.077, %Copy.impl_witness.8af) [concrete] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %Iterate_where.type.8d9: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.343> [concrete] -// CHECK:STDOUT: %pattern_type.d44: type = pattern_type %Iterate_where.type.8d9 [concrete] -// CHECK:STDOUT: %R.patt: %pattern_type.d44 = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R: %Iterate_where.type.8d9 = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %impl.elem0.4ce: %facet_type.bd0 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %Iterate_where.type.afe: type = facet_type <@Iterate where %impl.elem0.4ce = %facet_value.521> [concrete] +// CHECK:STDOUT: %pattern_type.535: type = pattern_type %Iterate_where.type.afe [concrete] +// CHECK:STDOUT: %R.patt: %pattern_type.535 = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.afe = symbolic_binding R, 0 [symbolic] // CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] -// CHECK:STDOUT: %pattern_type.3b2: type = pattern_type %R.as_type [symbolic] -// CHECK:STDOUT: %r.param_patt.a49: %pattern_type.3b2 = value_param_pattern [symbolic] -// CHECK:STDOUT: %r.patt.dd9: %pattern_type.3b2 = wrapper_binding_pattern r, %r.param_patt.a49 [symbolic] +// CHECK:STDOUT: %pattern_type.0e6: type = pattern_type %R.as_type [symbolic] +// CHECK:STDOUT: %r.param_patt.874: %pattern_type.0e6 = value_param_pattern [symbolic] +// CHECK:STDOUT: %r.patt.97e: %pattern_type.0e6 = wrapper_binding_pattern r, %r.param_patt.874 [symbolic] // CHECK:STDOUT: %facet_type.08a: type = facet_type <@IntFitsIn, @IntFitsIn(%Int.d4bbe0.2) & @AnyInt> [symbolic] // CHECK:STDOUT: %From.170: %facet_type.08a = symbolic_binding From, 1 [symbolic] // CHECK:STDOUT: %From.as_type.as.ImplicitAs.impl.Convert.type.386: type = fn_type @From.as_type.as.ImplicitAs.impl.Convert, @From.as_type.as.ImplicitAs.impl(%To, %From.170) [symbolic] @@ -725,34 +731,33 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Int.as.AnyInt.impl.AsInt.type.0ee: type = fn_type @Int.as.AnyInt.impl.AsInt, @Int.as.AnyInt.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.AnyInt.impl.AsInt.497: %Int.as.AnyInt.impl.AsInt.type.0ee = struct_value () [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.d94 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.550: = lookup_impl_witness %R, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.e23: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.550) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.85c: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.e23) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.b01: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.e23) [symbolic] -// CHECK:STDOUT: %.85a: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.85c, %Iterate.facet.e23 [symbolic] -// CHECK:STDOUT: %impl.elem2.dbc: %.85a = impl_witness_access %Iterate.lookup_impl_witness.550, element2 [symbolic] -// CHECK:STDOUT: %impl.elem1.e3b: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.550, element1 [symbolic] -// CHECK:STDOUT: %as_type.147: type = facet_access_type %impl.elem1.e3b [symbolic] -// CHECK:STDOUT: %specific_impl_fn.d7d2: = specific_impl_function %impl.elem2.dbc, @Iterate.WithSelf.NewCursor(%Iterate.facet.e23) [symbolic] -// CHECK:STDOUT: %.9f8: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.b01, %Iterate.facet.e23 [symbolic] -// CHECK:STDOUT: %impl.elem3.84f: %.9f8 = impl_witness_access %Iterate.lookup_impl_witness.550, element3 [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.091: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.343) [concrete] -// CHECK:STDOUT: %OptionalStorage.impl_witness.bab: = impl_witness imports.%OptionalStorage.impl_witness_table.460, @T.as_type.as.OptionalStorage.impl(%facet_value.343) [concrete] -// CHECK:STDOUT: %OptionalStorage.facet.1f7: %OptionalStorage.type = facet_value %i32, (%OptionalStorage.impl_witness.bab) [concrete] -// CHECK:STDOUT: %Optional.aff: type = class_type @Optional, @Optional(%OptionalStorage.facet.1f7) [concrete] -// CHECK:STDOUT: %pattern_type.de2: type = pattern_type %Optional.aff [concrete] -// CHECK:STDOUT: %specific_impl_fn.d92: = specific_impl_function %impl.elem3.84f, @Iterate.WithSelf.Next(%Iterate.facet.e23) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.182: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.1f7) [concrete] -// CHECK:STDOUT: %Optional.HasValue.e75: %Optional.HasValue.type.182 = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.788: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.1f7) [concrete] -// CHECK:STDOUT: %Optional.Get.186: %Optional.Get.type.788 = struct_value () [concrete] -// CHECK:STDOUT: %MaybeUnformed.993: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.ed0) [concrete] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.d33: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.342: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.d33) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.26d: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.342) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.1e7: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.342) [symbolic] +// CHECK:STDOUT: %.ef3: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.26d, %Iterate.facet.342 [symbolic] +// CHECK:STDOUT: %impl.elem2.ca9: %.ef3 = impl_witness_access %Iterate.lookup_impl_witness.d33, element2 [symbolic] +// CHECK:STDOUT: %impl.elem1.732: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.d33, element1 [symbolic] +// CHECK:STDOUT: %as_type.5c5: type = facet_access_type %impl.elem1.732 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.c93: = specific_impl_function %impl.elem2.ca9, @Iterate.WithSelf.NewCursor(%Iterate.facet.342) [symbolic] +// CHECK:STDOUT: %.ab9: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.1e7, %Iterate.facet.342 [symbolic] +// CHECK:STDOUT: %impl.elem3.e47: %.ab9 = impl_witness_access %Iterate.lookup_impl_witness.d33, element3 [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.af2: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.521) [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness.78c: = impl_witness imports.%OptionalStorage.impl_witness_table.1c4, @T.as_type.as.OptionalStorage.impl(%facet_value.521) [concrete] +// CHECK:STDOUT: %OptionalStorage.facet.072: %OptionalStorage.type = facet_value %i32, (%OptionalStorage.impl_witness.78c) [concrete] +// CHECK:STDOUT: %Optional.561: type = class_type @Optional, @Optional(%OptionalStorage.facet.072) [concrete] +// CHECK:STDOUT: %specific_impl_fn.c3b: = specific_impl_function %impl.elem3.e47, @Iterate.WithSelf.Next(%Iterate.facet.342) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.92b: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.072) [concrete] +// CHECK:STDOUT: %Optional.HasValue.104: %Optional.HasValue.type.92b = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.4e6: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.072) [concrete] +// CHECK:STDOUT: %Optional.Get.3a9: %Optional.Get.type.4e6 = struct_value () [concrete] +// CHECK:STDOUT: %MaybeUnformed.f2c: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.046) [concrete] // CHECK:STDOUT: %.b31: type = maybe_unformed_type %i32 [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.32e: type = unbound_element_type %DefaultOptionalStorage.091, %MaybeUnformed.993 [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.335: type = unbound_element_type %DefaultOptionalStorage.091, bool [concrete] -// CHECK:STDOUT: %struct_type.value.has_value.2e0: type = struct_type {.value: %MaybeUnformed.993, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn.8c2: = specific_function %Optional.HasValue.e75, @Optional.HasValue(%OptionalStorage.facet.1f7) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn.8fe: = specific_function %Optional.Get.186, @Optional.Get(%OptionalStorage.facet.1f7) [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.a6d: type = unbound_element_type %DefaultOptionalStorage.af2, %MaybeUnformed.f2c [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.6f7: type = unbound_element_type %DefaultOptionalStorage.af2, bool [concrete] +// CHECK:STDOUT: %struct_type.value.has_value.6f1: type = struct_type {.value: %MaybeUnformed.f2c, .has_value: bool} [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.3c4: = specific_function %Optional.HasValue.104, @Optional.HasValue(%OptionalStorage.facet.072) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.65d: = specific_function %Optional.Get.3a9, @Optional.Get(%OptionalStorage.facet.072) [concrete] // CHECK:STDOUT: %AddAssignWith.type.1ad: type = facet_type <@AddAssignWith, @AddAssignWith(%i32)> [concrete] // CHECK:STDOUT: %ImplicitAs.type.81c7d0.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Int.d4bbe0.1)> [symbolic] // CHECK:STDOUT: %U.f16: %ImplicitAs.type.81c7d0.2 = symbolic_binding U, 1 [symbolic] @@ -776,57 +781,24 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.316: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.313, %AddAssignWith.facet.d53 [concrete] // CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.specific_fn.ec28e6.1: = specific_function %Int.as.AddAssignWith.impl.Op.bff4f9.2, @Int.as.AddAssignWith.impl.Op.1(%int_32, %ImplicitAs.facet.c18) [concrete] // CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.specific_fn.ec28e6.2: = specific_function %Int.as.AddAssignWith.impl.Op.bff4f9.1, @Int.as.AddAssignWith.impl.Op.2(%int_32, %ImplicitAs.facet.c18) [concrete] -// CHECK:STDOUT: %pattern_type.16e: type = pattern_type %.b31 [concrete] -// CHECK:STDOUT: %self.param_patt.214: %pattern_type.16e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a42: %pattern_type.16e = wrapper_binding_pattern self, %self.param_patt.214 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc34_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.59f: type = pattern_type %MaybeUnformed.993 [concrete] -// CHECK:STDOUT: %self.param_patt.f37: %pattern_type.59f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.c6e: %pattern_type.59f = wrapper_binding_pattern self, %self.param_patt.f37 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc34_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc34_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc34_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc34_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.0fa: type = pattern_type %struct_type.value.has_value.2e0 [concrete] -// CHECK:STDOUT: %self.param_patt.4dc: %pattern_type.0fa = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0fc: %pattern_type.0fa = wrapper_binding_pattern self, %self.param_patt.4dc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_19.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc34_19.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.289: type = pattern_type %DefaultOptionalStorage.091 [concrete] -// CHECK:STDOUT: %self.param_patt.ac0: %pattern_type.289 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.17f: %pattern_type.289 = wrapper_binding_pattern self, %self.param_patt.ac0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_19.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc34_19.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.602: %pattern_type.de2 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.398: %pattern_type.de2 = wrapper_binding_pattern self, %self.param_patt.602 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_19.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc34_19.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7: type = fn_type @Destroy.WithSelf.SelfDestruct.loc34_19.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.7: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.0f4: = lookup_impl_witness %impl.elem1.e3b, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.656: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1.e3b) [symbolic] -// CHECK:STDOUT: %.9eb: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.656, %impl.elem1.e3b [symbolic] -// CHECK:STDOUT: %impl.elem2.fb6: %.9eb = impl_witness_access %Destroy.lookup_impl_witness.0f4, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.63d: = specific_impl_function %impl.elem2.fb6, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1.e3b) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc34_19.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc34_19.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.80c: %Destroy.type = facet_value bool, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.778) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.021: %SubobjectDestroy.type = facet_value %MaybeUnformed.f2c, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a33: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.021) [concrete] +// CHECK:STDOUT: %Destroy.facet.74e: %Destroy.type = facet_value %MaybeUnformed.f2c, (%custom_witness.b80ef6.3, %DestroyImpl.impl_witness.a33) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc34_19.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.278: %SubobjectDestroy.type = facet_value %Optional.561, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dd0: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.278) [concrete] +// CHECK:STDOUT: %Destroy.facet.58d: %Destroy.type = facet_value %Optional.561, (%custom_witness.b80ef6.7, %DestroyImpl.impl_witness.dd0) [concrete] // CHECK:STDOUT: %MutableRange: type = class_type @MutableRange [concrete] // CHECK:STDOUT: %pattern_type.e63: type = pattern_type %MutableRange [concrete] // CHECK:STDOUT: %ConstRange: type = class_type @ConstRange [concrete] @@ -839,40 +811,37 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %MutableRange.End.type: type = fn_type @MutableRange.End [concrete] // CHECK:STDOUT: %MutableRange.End: %MutableRange.End.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.ed3: = custom_witness (%Iterator.3ee, %Iterator.3ee, %MutableRange.Begin, %MutableRange.End), @CppRangeForIterate [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc41 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8: type = fn_type @Destroy.WithSelf.SelfDestruct.loc41 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.8: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8 = struct_value () [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.type.9ec: type = fn_type @Iterator.SubobjectDestroy.1 [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.e52: %Iterator.SubobjectDestroy.type.9ec = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.8e1: = custom_witness (%Destroy.WithSelf.Op.403171.8, %Iterator.SubobjectDestroy.e52, %Destroy.WithSelf.SelfDestruct.db3fdb.8), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.0aed5d.1: type = fn_type @Iterator.Op.1 [concrete] // CHECK:STDOUT: %Iterator.Op.a2a866.1: %Iterator.Op.type.0aed5d.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.43f: = custom_witness (%i32, %Iterator.Op.a2a866.1), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %custom_witness.da7: = custom_witness (%Iterator.Op.a2a866.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.2d2: %SubobjectDestroy.type = facet_value %Iterator.3ee, (%custom_witness.da7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.eff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.2d2) [concrete] // CHECK:STDOUT: %Iterator.Op.type.0aed5d.2: type = fn_type @Iterator.Op.2 [concrete] // CHECK:STDOUT: %Iterator.Op.a2a866.2: %Iterator.Op.type.0aed5d.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.444: = custom_witness (%Iterator.Op.a2a866.2), @Inc [concrete] +// CHECK:STDOUT: %custom_witness.43f: = custom_witness (%i32, %Iterator.Op.a2a866.2), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %Iterator.Op.type.0aed5d.3: type = fn_type @Iterator.Op.3 [concrete] +// CHECK:STDOUT: %Iterator.Op.a2a866.3: %Iterator.Op.type.0aed5d.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.444: = custom_witness (%Iterator.Op.a2a866.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type.ca8475.1: type = fn_type @Equal.1 [concrete] // CHECK:STDOUT: %Equal.285b15.1: %Equal.type.ca8475.1 = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type.53d9ee.1: type = fn_type @NotEqual.1 [concrete] // CHECK:STDOUT: %NotEqual.119263.1: %NotEqual.type.53d9ee.1 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.c91: = custom_witness (%Equal.285b15.1, %NotEqual.119263.1), @EqWith, @EqWith(%Iterator.3ee) [concrete] -// CHECK:STDOUT: %facet_value.383: %CppRange_where.type.d682d6.1 = facet_value %MutableRange, (%custom_witness.ed3, %custom_witness.8e1, %custom_witness.43f, %custom_witness.444, %custom_witness.c91, %custom_witness.f8f19d.1, %Copy.impl_witness.8af, %custom_witness.8e1) [concrete] +// CHECK:STDOUT: %facet_value.941: %CppRange_where.type.d682d6.1 = facet_value %MutableRange, (%custom_witness.ed3, %custom_witness.da7, %DestroyImpl.impl_witness.eff, %custom_witness.43f, %custom_witness.444, %custom_witness.c91, %custom_witness.b80ef6.1, %DestroyImpl.impl_witness.077, %Copy.impl_witness.8af, %custom_witness.da7, %DestroyImpl.impl_witness.eff) [concrete] // CHECK:STDOUT: %tuple.type.508: type = tuple_type (%Iterator.3ee, %Iterator.3ee) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8: type = fn_type @Destroy.WithSelf.SubobjectDestroy.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.9: type = fn_type @Destroy.WithSelf.Op.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.9: %Destroy.WithSelf.Op.type.ef016f.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9: type = fn_type @Destroy.WithSelf.SelfDestruct.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.9: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.8: = custom_witness (%Destroy.WithSelf.Op.403171.9, %Destroy.WithSelf.SubobjectDestroy.d01daf.8, %Destroy.WithSelf.SelfDestruct.db3fdb.9), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.0fe: %Destroy.type = facet_value %tuple.type.508, (%custom_witness.f8f19d.8) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.a35: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.383) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.290: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.383) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.f70: %T.as_type.as.Iterate.impl.NewCursor.type.290 = struct_value () [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.79e: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.383) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.573: %T.as_type.as.Iterate.impl.Next.type.79e = struct_value () [concrete] -// CHECK:STDOUT: %facet_value.b06: %Iterate_where.type.8d9 = facet_value %MutableRange, (%Iterate.impl_witness.a35) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.8: type = fn_type @SubobjectDestroy.WithSelf.Op.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.8: %SubobjectDestroy.WithSelf.Op.type.6870fd.8 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.8: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.8), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.669: %SubobjectDestroy.type = facet_value %tuple.type.508, (%custom_witness.b80ef6.8) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.91e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.669) [concrete] +// CHECK:STDOUT: %complete_type.c28: = complete_type_witness %tuple.type.508 [concrete] +// CHECK:STDOUT: %Destroy.facet.70f: %Destroy.type = facet_value %tuple.type.508, (%custom_witness.b80ef6.8, %DestroyImpl.impl_witness.91e) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.d35: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.941) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.902: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.941) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.c31: %T.as_type.as.Iterate.impl.NewCursor.type.902 = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.1ab: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.941) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.7de: %T.as_type.as.Iterate.impl.Next.type.1ab = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.7cf: %Iterate_where.type.afe = facet_value %MutableRange, (%Iterate.impl_witness.d35) [concrete] // CHECK:STDOUT: %r.param_patt.c79: %pattern_type.e63 = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.94f: %pattern_type.e63 = wrapper_binding_pattern r, %r.param_patt.c79 [concrete] // CHECK:STDOUT: %Iterator.260: type = class_type @Iterator.2 [concrete] @@ -881,81 +850,76 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %ConstRange.End.type: type = fn_type @ConstRange.End [concrete] // CHECK:STDOUT: %ConstRange.End: %ConstRange.End.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.23e: = custom_witness (%Iterator.260, %Iterator.260, %ConstRange.Begin, %ConstRange.End), @CppRangeForIterate [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.10: type = fn_type @Destroy.WithSelf.Op.loc42 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.10: %Destroy.WithSelf.Op.type.ef016f.10 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10: type = fn_type @Destroy.WithSelf.SelfDestruct.loc42 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.10: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10 = struct_value () [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.type.128: type = fn_type @Iterator.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.37b: %Iterator.SubobjectDestroy.type.128 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.0f3: = custom_witness (%Destroy.WithSelf.Op.403171.10, %Iterator.SubobjectDestroy.37b, %Destroy.WithSelf.SelfDestruct.db3fdb.10), @Destroy [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0f34b8.1: type = fn_type @Iterator.Op.3 [concrete] +// CHECK:STDOUT: %Iterator.Op.type.0f34b8.1: type = fn_type @Iterator.Op.4 [concrete] // CHECK:STDOUT: %Iterator.Op.1c3e4a.1: %Iterator.Op.type.0f34b8.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f5c: = custom_witness (%i32, %Iterator.Op.1c3e4a.1), @CppUnsafeDeref [concrete] -// CHECK:STDOUT: %Iterator.Op.type.0f34b8.2: type = fn_type @Iterator.Op.4 [concrete] +// CHECK:STDOUT: %custom_witness.fcc: = custom_witness (%Iterator.Op.1c3e4a.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.909: %SubobjectDestroy.type = facet_value %Iterator.260, (%custom_witness.fcc) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dfd: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.909) [concrete] +// CHECK:STDOUT: %Iterator.Op.type.0f34b8.2: type = fn_type @Iterator.Op.5 [concrete] // CHECK:STDOUT: %Iterator.Op.1c3e4a.2: %Iterator.Op.type.0f34b8.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.746: = custom_witness (%Iterator.Op.1c3e4a.2), @Inc [concrete] +// CHECK:STDOUT: %custom_witness.f5c: = custom_witness (%i32, %Iterator.Op.1c3e4a.2), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %Iterator.Op.type.0f34b8.3: type = fn_type @Iterator.Op.6 [concrete] +// CHECK:STDOUT: %Iterator.Op.1c3e4a.3: %Iterator.Op.type.0f34b8.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.746: = custom_witness (%Iterator.Op.1c3e4a.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type.ca8475.2: type = fn_type @Equal.2 [concrete] // CHECK:STDOUT: %Equal.285b15.2: %Equal.type.ca8475.2 = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type.53d9ee.2: type = fn_type @NotEqual.2 [concrete] // CHECK:STDOUT: %NotEqual.119263.2: %NotEqual.type.53d9ee.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.86f: = custom_witness (%Equal.285b15.2, %NotEqual.119263.2), @EqWith, @EqWith(%Iterator.260) [concrete] -// CHECK:STDOUT: %facet_value.15e: %CppRange_where.type.d682d6.1 = facet_value %ConstRange, (%custom_witness.23e, %custom_witness.0f3, %custom_witness.f5c, %custom_witness.746, %custom_witness.86f, %custom_witness.f8f19d.1, %Copy.impl_witness.8af, %custom_witness.0f3) [concrete] +// CHECK:STDOUT: %facet_value.43d: %CppRange_where.type.d682d6.1 = facet_value %ConstRange, (%custom_witness.23e, %custom_witness.fcc, %DestroyImpl.impl_witness.dfd, %custom_witness.f5c, %custom_witness.746, %custom_witness.86f, %custom_witness.b80ef6.1, %DestroyImpl.impl_witness.077, %Copy.impl_witness.8af, %custom_witness.fcc, %DestroyImpl.impl_witness.dfd) [concrete] // CHECK:STDOUT: %tuple.type.69f: type = tuple_type (%Iterator.260, %Iterator.260) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9: type = fn_type @Destroy.WithSelf.SubobjectDestroy.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.9: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.11: type = fn_type @Destroy.WithSelf.Op.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.11: %Destroy.WithSelf.Op.type.ef016f.11 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.11: type = fn_type @Destroy.WithSelf.SelfDestruct.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.11: %Destroy.WithSelf.SelfDestruct.type.fbceb5.11 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.9: = custom_witness (%Destroy.WithSelf.Op.403171.11, %Destroy.WithSelf.SubobjectDestroy.d01daf.9, %Destroy.WithSelf.SelfDestruct.db3fdb.11), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.c6d: %Destroy.type = facet_value %tuple.type.69f, (%custom_witness.f8f19d.9) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.39d: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.15e) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.5c1: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.15e) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.356: %T.as_type.as.Iterate.impl.NewCursor.type.5c1 = struct_value () [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.f76: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.15e) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.259: %T.as_type.as.Iterate.impl.Next.type.f76 = struct_value () [concrete] -// CHECK:STDOUT: %facet_value.3df: %Iterate_where.type.8d9 = facet_value %ConstRange, (%Iterate.impl_witness.39d) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.9: type = fn_type @SubobjectDestroy.WithSelf.Op.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.9: %SubobjectDestroy.WithSelf.Op.type.6870fd.9 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.9: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.9), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.100: %SubobjectDestroy.type = facet_value %tuple.type.69f, (%custom_witness.b80ef6.9) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4ff: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.100) [concrete] +// CHECK:STDOUT: %complete_type.8d5: = complete_type_witness %tuple.type.69f [concrete] +// CHECK:STDOUT: %Destroy.facet.141: %Destroy.type = facet_value %tuple.type.69f, (%custom_witness.b80ef6.9, %DestroyImpl.impl_witness.4ff) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.c9d: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.43d) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.14e: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.43d) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.649: %T.as_type.as.Iterate.impl.NewCursor.type.14e = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.088: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.43d) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.320: %T.as_type.as.Iterate.impl.Next.type.088 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.590: %Iterate_where.type.afe = facet_value %ConstRange, (%Iterate.impl_witness.c9d) [concrete] // CHECK:STDOUT: %r.param_patt.83e: %pattern_type.0ba = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.c21: %pattern_type.0ba = wrapper_binding_pattern r, %r.param_patt.83e [concrete] -// CHECK:STDOUT: %Iterate.facet.2b0: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.a35) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.ca0: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.2b0) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.8bc: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.2b0) [concrete] -// CHECK:STDOUT: %.d4c: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.ca0, %Iterate.facet.2b0 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.c26: = specific_function %T.as_type.as.Iterate.impl.NewCursor.f70, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.383) [concrete] -// CHECK:STDOUT: %.9fe: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.8bc, %Iterate.facet.2b0 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.7ef: = specific_function %T.as_type.as.Iterate.impl.Next.573, @T.as_type.as.Iterate.impl.Next(%facet_value.383) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.d1f: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.0fe) [concrete] -// CHECK:STDOUT: %.0dc: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.d1f, %Destroy.facet.0fe [concrete] -// CHECK:STDOUT: %Iterate.facet.1c8: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.39d) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.97c: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.1c8) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.1c9: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.1c8) [concrete] -// CHECK:STDOUT: %.582: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.97c, %Iterate.facet.1c8 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.49d: = specific_function %T.as_type.as.Iterate.impl.NewCursor.356, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.15e) [concrete] -// CHECK:STDOUT: %.d56: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.1c9, %Iterate.facet.1c8 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.2c1: = specific_function %T.as_type.as.Iterate.impl.Next.259, @T.as_type.as.Iterate.impl.Next(%facet_value.15e) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.b84: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.c6d) [concrete] -// CHECK:STDOUT: %.40c: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.b84, %Destroy.facet.c6d [concrete] -// CHECK:STDOUT: %complete_type.c28: = complete_type_witness %tuple.type.508 [concrete] -// CHECK:STDOUT: %complete_type.8d5: = complete_type_witness %tuple.type.69f [concrete] +// CHECK:STDOUT: %Iterate.facet.e8f: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.d35) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.b5d: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.e8f) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.e6d: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.e8f) [concrete] +// CHECK:STDOUT: %.6b7: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.b5d, %Iterate.facet.e8f [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.881: = specific_function %T.as_type.as.Iterate.impl.NewCursor.c31, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.941) [concrete] +// CHECK:STDOUT: %.0ac: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.e6d, %Iterate.facet.e8f [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.e7d: = specific_function %T.as_type.as.Iterate.impl.Next.7de, @T.as_type.as.Iterate.impl.Next(%facet_value.941) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.a77: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.70f) [concrete] +// CHECK:STDOUT: %Iterate.facet.80e: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.c9d) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.be9: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.80e) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.4a4: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.80e) [concrete] +// CHECK:STDOUT: %.b3c: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.be9, %Iterate.facet.80e [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.750: = specific_function %T.as_type.as.Iterate.impl.NewCursor.649, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.43d) [concrete] +// CHECK:STDOUT: %.c69: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.4a4, %Iterate.facet.80e [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.d88: = specific_function %T.as_type.as.Iterate.impl.Next.320, @T.as_type.as.Iterate.impl.Next(%facet_value.43d) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.a15: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.141) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.02f: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.ade)] -// CHECK:STDOUT: %Core.import_ref.406: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.925) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.f42)] -// CHECK:STDOUT: %Core.import_ref.d4a: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.760) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.268)] -// CHECK:STDOUT: %Core.import_ref.9a4: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.d28) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.f29)] -// CHECK:STDOUT: %Core.import_ref.6e3: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.2f2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.884)] -// CHECK:STDOUT: %Core.import_ref.af7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.460 = impl_witness_table (%Core.import_ref.02f, %Core.import_ref.406, %Core.import_ref.d4a, %Core.import_ref.9a4, %Core.import_ref.6e3, %Core.import_ref.af7), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.51c9: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.498] -// CHECK:STDOUT: %Core.import_ref.b03: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.390] +// CHECK:STDOUT: %Core.import_ref.481: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.476)] +// CHECK:STDOUT: %Core.import_ref.66d: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.b57) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.791)] +// CHECK:STDOUT: %Core.import_ref.32c: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.292) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.ae9)] +// CHECK:STDOUT: %Core.import_ref.801: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.18e) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.463)] +// CHECK:STDOUT: %Core.import_ref.eec: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.f27) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.e40)] +// CHECK:STDOUT: %Core.import_ref.a6a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.1c4 = impl_witness_table (%Core.import_ref.481, %Core.import_ref.66d, %Core.import_ref.32c, %Core.import_ref.801, %Core.import_ref.eec, %Core.import_ref.a6a), @T.as_type.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.e86: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.bce] +// CHECK:STDOUT: %Core.import_ref.9ce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.dbe] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.c82: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.3ea) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.f2f)] // CHECK:STDOUT: %Core.import_ref.29e: @Optional.%Optional.Get.type (%Optional.Get.type.786) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.2d0)] -// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] -// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.724: %facet_type.bd0 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.189)] +// CHECK:STDOUT: %Core.import_ref.dd9: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9b6)] // CHECK:STDOUT: %Core.import_ref.946: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.8fb) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.8a1)] // CHECK:STDOUT: %Core.import_ref.cfb: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.d4a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.5a8)] -// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.724, %Core.import_ref.dd9, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.39b: @From.as_type.as.ImplicitAs.impl.%From.as_type.as.ImplicitAs.impl.Convert.type (%From.as_type.as.ImplicitAs.impl.Convert.type.386) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @From.as_type.as.ImplicitAs.impl.%From.as_type.as.ImplicitAs.impl.Convert (constants.%From.as_type.as.ImplicitAs.impl.Convert.85a)] @@ -966,120 +930,29 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Core.import_ref.b25: @Int.as.AddAssignWith.impl.%Int.as.AddAssignWith.impl.Op.type.2 (%Int.as.AddAssignWith.impl.Op.type.93140c.1) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.AddAssignWith.impl.%Int.as.AddAssignWith.impl.Op.2 (constants.%Int.as.AddAssignWith.impl.Op.75e08e.1)] // CHECK:STDOUT: %AddAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.b25), @Int.as.AddAssignWith.impl [concrete] // CHECK:STDOUT: %Core.Op.da0: @Int.as.AddAssignWith.impl.%Int.as.AddAssignWith.impl.Op.type.1 (%Int.as.AddAssignWith.impl.Op.type.93140c.2) = import_ref Core//prelude/types/int, Op, loaded [symbolic = @Int.as.AddAssignWith.impl.%Int.as.AddAssignWith.impl.Op.1 (constants.%Int.as.AddAssignWith.impl.Op.75e08e.2)] -// CHECK:STDOUT: %Core.import_ref.b0d0 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.390: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = field_decl has_value, element1, %Core.import_ref.b0d0 in [concrete] {} -// CHECK:STDOUT: %Core.import_ref.ab7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.498: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = field_decl value, element0, %Core.import_ref.ab7 in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.dbe: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = field_decl has_value, element1, %Core.import_ref.b0d in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.45d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.bce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = field_decl value, element0, %Core.import_ref.45d in [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_19.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.16e = ref_param_pattern [concrete = constants.%self.param_patt.214] -// CHECK:STDOUT: %self.patt: %pattern_type.16e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a42] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.b31 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.b31 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc34_19.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.16e = ref_param_pattern [concrete = constants.%self.param_patt.214] -// CHECK:STDOUT: %self.patt: %pattern_type.16e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a42] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.b31 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.b31 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_19.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.59f = ref_param_pattern [concrete = constants.%self.param_patt.f37] -// CHECK:STDOUT: %self.patt: %pattern_type.59f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c6e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.993 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.993 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc34_19.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.59f = ref_param_pattern [concrete = constants.%self.param_patt.f37] -// CHECK:STDOUT: %self.patt: %pattern_type.59f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c6e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.993 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.993 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_19.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc34_19.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_19.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0fa = ref_param_pattern [concrete = constants.%self.param_patt.4dc] -// CHECK:STDOUT: %self.patt: %pattern_type.0fa = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0fc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.2e0 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.2e0 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc34_19.4 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0fa = ref_param_pattern [concrete = constants.%self.param_patt.4dc] -// CHECK:STDOUT: %self.patt: %pattern_type.0fa = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0fc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.2e0 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.2e0 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_19.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.289 = ref_param_pattern [concrete = constants.%self.param_patt.ac0] -// CHECK:STDOUT: %self.patt: %pattern_type.289 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.17f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.091 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.091 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc34_19.5 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.289 = ref_param_pattern [concrete = constants.%self.param_patt.ac0] -// CHECK:STDOUT: %self.patt: %pattern_type.289 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.17f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.091 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.091 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_19.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.de2 = ref_param_pattern [concrete = constants.%self.param_patt.602] -// CHECK:STDOUT: %self.patt: %pattern_type.de2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.398] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.aff = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.aff = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc34_19.6 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.de2 = ref_param_pattern [concrete = constants.%self.param_patt.602] -// CHECK:STDOUT: %self.patt: %pattern_type.de2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.398] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.aff = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.aff = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TestIterate(%R.loc30_17.2: %Iterate_where.type.8d9) { +// CHECK:STDOUT: generic fn @TestIterate(%R.loc30_17.2: %Iterate_where.type.afe) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc30_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.550)] -// CHECK:STDOUT: %Iterate.facet.loc34_19.5: %Iterate.type = facet_value %R.as_type.loc30_61.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.e23)] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc34_19.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.85c)] -// CHECK:STDOUT: %.loc34_19.19: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc34_19.5 [symbolic = %.loc34_19.19 (constants.%.85a)] -// CHECK:STDOUT: %impl.elem2.loc34_19.3: @TestIterate.%.loc34_19.19 (%.85a) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc34_19.3 (constants.%impl.elem2.dbc)] -// CHECK:STDOUT: %specific_impl_fn.loc34_19.4: = specific_impl_function %impl.elem2.loc34_19.3, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc34_19.5) [symbolic = %specific_impl_fn.loc34_19.4 (constants.%specific_impl_fn.d7d2)] +// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc30_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.d33)] +// CHECK:STDOUT: %Iterate.facet.loc34_19.5: %Iterate.type = facet_value %R.as_type.loc30_61.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.342)] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc34_19.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.26d)] +// CHECK:STDOUT: %.loc34_19.23: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc34_19.5 [symbolic = %.loc34_19.23 (constants.%.ef3)] +// CHECK:STDOUT: %impl.elem2.loc34_19.2: @TestIterate.%.loc34_19.23 (%.ef3) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc34_19.2 (constants.%impl.elem2.ca9)] +// CHECK:STDOUT: %specific_impl_fn.loc34_19.3: = specific_impl_function %impl.elem2.loc34_19.2, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc34_19.5) [symbolic = %specific_impl_fn.loc34_19.3 (constants.%specific_impl_fn.c93)] +// CHECK:STDOUT: +// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc34_19.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.1e7)] +// CHECK:STDOUT: %.loc34_19.24: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc34_19.5 [symbolic = %.loc34_19.24 (constants.%.ab9)] +// CHECK:STDOUT: %impl.elem3.loc34_19.2: @TestIterate.%.loc34_19.24 (%.ab9) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc34_19.2 (constants.%impl.elem3.e47)] +// CHECK:STDOUT: %specific_impl_fn.loc34_19.4: = specific_impl_function %impl.elem3.loc34_19.2, @Iterate.WithSelf.Next(%Iterate.facet.loc34_19.5) [symbolic = %specific_impl_fn.loc34_19.4 (constants.%specific_impl_fn.c3b)] // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc34_19.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.b01)] -// CHECK:STDOUT: %.loc34_19.20: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc34_19.5 [symbolic = %.loc34_19.20 (constants.%.9f8)] -// CHECK:STDOUT: %impl.elem3.loc34_19.2: @TestIterate.%.loc34_19.20 (%.9f8) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc34_19.2 (constants.%impl.elem3.84f)] -// CHECK:STDOUT: %specific_impl_fn.loc34_19.5: = specific_impl_function %impl.elem3.loc34_19.2, @Iterate.WithSelf.Next(%Iterate.facet.loc34_19.5) [symbolic = %specific_impl_fn.loc34_19.5 (constants.%specific_impl_fn.d92)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.656)] -// CHECK:STDOUT: %.loc34_19.21: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %impl.elem1 [symbolic = %.loc34_19.21 (constants.%.9eb)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.0f4)] -// CHECK:STDOUT: %impl.elem2.loc34_19.4: @TestIterate.%.loc34_19.21 (%.9eb) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc34_19.4 (constants.%impl.elem2.fb6)] -// CHECK:STDOUT: %specific_impl_fn.loc34_19.6: = specific_impl_function %impl.elem2.loc34_19.4, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1) [symbolic = %specific_impl_fn.loc34_19.6 (constants.%specific_impl_fn.63d)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc30_61.1 (%R.as_type)) { // CHECK:STDOUT: !entry: @@ -1088,51 +961,51 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.d94 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc30_61.1 (%R.as_type) = name_ref r, %r -// CHECK:STDOUT: %impl.elem2.loc34_19.1: @TestIterate.%.loc34_19.19 (%.85a) = impl_witness_access constants.%Iterate.lookup_impl_witness.550, element2 [symbolic = %impl.elem2.loc34_19.3 (constants.%impl.elem2.dbc)] +// CHECK:STDOUT: %impl.elem2.loc34_19.1: @TestIterate.%.loc34_19.23 (%.ef3) = impl_witness_access constants.%Iterate.lookup_impl_witness.d33, element2 [symbolic = %impl.elem2.loc34_19.2 (constants.%impl.elem2.ca9)] // CHECK:STDOUT: %bound_method.loc34_19.1: = bound_method %r.ref, %impl.elem2.loc34_19.1 -// CHECK:STDOUT: %Iterate.facet.loc34_19.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.550) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.e23)] -// CHECK:STDOUT: %.loc34_19.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.1 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.e23)] -// CHECK:STDOUT: %Iterate.facet.loc34_19.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.550) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.e23)] -// CHECK:STDOUT: %.loc34_19.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.2 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.e23)] -// CHECK:STDOUT: %specific_impl_fn.loc34_19.1: = specific_impl_function %impl.elem2.loc34_19.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.e23) [symbolic = %specific_impl_fn.loc34_19.4 (constants.%specific_impl_fn.d7d2)] +// CHECK:STDOUT: %Iterate.facet.loc34_19.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.d33) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.342)] +// CHECK:STDOUT: %.loc34_19.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.1 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.342)] +// CHECK:STDOUT: %Iterate.facet.loc34_19.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.d33) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.342)] +// CHECK:STDOUT: %.loc34_19.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.2 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.342)] +// CHECK:STDOUT: %specific_impl_fn.loc34_19.1: = specific_impl_function %impl.elem2.loc34_19.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.342) [symbolic = %specific_impl_fn.loc34_19.3 (constants.%specific_impl_fn.c93)] // CHECK:STDOUT: %bound_method.loc34_19.2: = bound_method %r.ref, %specific_impl_fn.loc34_19.1 -// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.147) = var_storage invalid -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.147) to %var = call %bound_method.loc34_19.2(%r.ref) +// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.5c5) = var_storage invalid +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.5c5) to %var = call %bound_method.loc34_19.2(%r.ref) // CHECK:STDOUT: assign %var, %Iterate.WithSelf.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3.loc34_19.1: @TestIterate.%.loc34_19.20 (%.9f8) = impl_witness_access constants.%Iterate.lookup_impl_witness.550, element3 [symbolic = %impl.elem3.loc34_19.2 (constants.%impl.elem3.84f)] +// CHECK:STDOUT: %impl.elem3.loc34_19.1: @TestIterate.%.loc34_19.24 (%.ab9) = impl_witness_access constants.%Iterate.lookup_impl_witness.d33, element3 [symbolic = %impl.elem3.loc34_19.2 (constants.%impl.elem3.e47)] // CHECK:STDOUT: %bound_method.loc34_19.3: = bound_method %r.ref, %impl.elem3.loc34_19.1 -// CHECK:STDOUT: %Iterate.facet.loc34_19.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.550) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.e23)] -// CHECK:STDOUT: %.loc34_19.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.3 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.e23)] -// CHECK:STDOUT: %Iterate.facet.loc34_19.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.550) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.e23)] -// CHECK:STDOUT: %.loc34_19.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.4 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.e23)] -// CHECK:STDOUT: %.loc34_19.5: %Destroy.type = converted constants.%as_type.147, constants.%impl.elem1.e3b [symbolic = %impl.elem1 (constants.%impl.elem1.e3b)] -// CHECK:STDOUT: %.loc34_19.6: %Destroy.type = converted constants.%as_type.147, constants.%impl.elem1.e3b [symbolic = %impl.elem1 (constants.%impl.elem1.e3b)] -// CHECK:STDOUT: %specific_impl_fn.loc34_19.2: = specific_impl_function %impl.elem3.loc34_19.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.e23) [symbolic = %specific_impl_fn.loc34_19.5 (constants.%specific_impl_fn.d92)] +// CHECK:STDOUT: %Iterate.facet.loc34_19.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.d33) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.342)] +// CHECK:STDOUT: %.loc34_19.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.3 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.342)] +// CHECK:STDOUT: %Iterate.facet.loc34_19.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.d33) [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.342)] +// CHECK:STDOUT: %.loc34_19.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc34_19.4 [symbolic = %Iterate.facet.loc34_19.5 (constants.%Iterate.facet.342)] +// CHECK:STDOUT: %.loc34_19.5: %Destroy.type = converted constants.%as_type.5c5, constants.%impl.elem1.732 [symbolic = %impl.elem1 (constants.%impl.elem1.732)] +// CHECK:STDOUT: %.loc34_19.6: %Destroy.type = converted constants.%as_type.5c5, constants.%impl.elem1.732 [symbolic = %impl.elem1 (constants.%impl.elem1.732)] +// CHECK:STDOUT: %specific_impl_fn.loc34_19.2: = specific_impl_function %impl.elem3.loc34_19.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.342) [symbolic = %specific_impl_fn.loc34_19.4 (constants.%specific_impl_fn.c3b)] // CHECK:STDOUT: %bound_method.loc34_19.4: = bound_method %r.ref, %specific_impl_fn.loc34_19.2 -// CHECK:STDOUT: %.loc34_19.7: ref %Optional.aff = temporary_storage -// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.aff to %.loc34_19.7 = call %bound_method.loc34_19.4(%r.ref, %var) -// CHECK:STDOUT: %.loc34_19.8: ref %Optional.aff = temporary %.loc34_19.7, %Iterate.WithSelf.Next.call -// CHECK:STDOUT: %.loc34_19.9: %Optional.HasValue.type.182 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.HasValue.e75] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.182 = name_ref HasValue, %.loc34_19.9 [concrete = constants.%Optional.HasValue.e75] +// CHECK:STDOUT: %.loc34_19.7: ref %Optional.561 = temporary_storage +// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.561 to %.loc34_19.7 = call %bound_method.loc34_19.4(%r.ref, %var) +// CHECK:STDOUT: %.loc34_19.8: ref %Optional.561 = temporary %.loc34_19.7, %Iterate.WithSelf.Next.call +// CHECK:STDOUT: %.loc34_19.9: %Optional.HasValue.type.92b = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.HasValue.104] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.92b = name_ref HasValue, %.loc34_19.9 [concrete = constants.%Optional.HasValue.104] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc34_19.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.HasValue.specific_fn.8c2] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.HasValue.specific_fn.3c4] // CHECK:STDOUT: %bound_method.loc34_19.5: = bound_method %.loc34_19.8, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc34_19.10: %Optional.aff = acquire_value %.loc34_19.8 +// CHECK:STDOUT: %.loc34_19.10: %Optional.561 = acquire_value %.loc34_19.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc34_19.5(%.loc34_19.10) // CHECK:STDOUT: %.loc34_19.11: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc34_19.12: bool = converted %Optional.HasValue.call, %.loc34_19.11 // CHECK:STDOUT: if %.loc34_19.12 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc34_19.13: %Optional.Get.type.788 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.Get.186] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.788 = name_ref Get, %.loc34_19.13 [concrete = constants.%Optional.Get.186] +// CHECK:STDOUT: %.loc34_19.13: %Optional.Get.type.4e6 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.Get.3a9] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.4e6 = name_ref Get, %.loc34_19.13 [concrete = constants.%Optional.Get.3a9] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc34_19.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.Get.specific_fn.8fe] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.Get.specific_fn.65d] // CHECK:STDOUT: %bound_method.loc34_19.6: = bound_method %.loc34_19.8, %Optional.Get.specific_fn -// CHECK:STDOUT: %.loc34_19.14: %Optional.aff = acquire_value %.loc34_19.8 +// CHECK:STDOUT: %.loc34_19.14: %Optional.561 = acquire_value %.loc34_19.8 // CHECK:STDOUT: %Optional.Get.call: init %i32 = call %bound_method.loc34_19.6(%.loc34_19.14) // CHECK:STDOUT: %.loc34_19.15: %i32 = value_of_initializer %Optional.Get.call // CHECK:STDOUT: %.loc34_19.16: %i32 = converted %Optional.Get.call, %.loc34_19.15 @@ -1150,112 +1023,79 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.specific_fn: = specific_function %Op.ref, @Int.as.AddAssignWith.impl.Op.2(constants.%int_32, constants.%ImplicitAs.facet.c18) [concrete = constants.%Int.as.AddAssignWith.impl.Op.specific_fn.ec28e6.2] // CHECK:STDOUT: %bound_method.loc35_9.3: = bound_method %sum.ref, %Int.as.AddAssignWith.impl.Op.specific_fn // CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc35_9.3(%sum.ref, %i.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc34_19.1: = bound_method %.loc34_19.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc34_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc34_19.1(%.loc34_19.8) +// CHECK:STDOUT: %Destroy.facet.loc34_19.1: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc34_19.17: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc34_19.1 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %Destroy.facet.loc34_19.2: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc34_19.18: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc34_19.2 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc34_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc34_19.8) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc34_19.2: = bound_method %.loc34_19.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc34_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc34_19.2(%.loc34_19.8) -// CHECK:STDOUT: %impl.elem2.loc34_19.2: @TestIterate.%.loc34_19.21 (%.9eb) = impl_witness_access constants.%Destroy.lookup_impl_witness.0f4, element2 [symbolic = %impl.elem2.loc34_19.4 (constants.%impl.elem2.fb6)] -// CHECK:STDOUT: %bound_method.loc34_19.7: = bound_method %var, %impl.elem2.loc34_19.2 -// CHECK:STDOUT: %.loc34_19.17: %Destroy.type = converted constants.%as_type.147, constants.%impl.elem1.e3b [symbolic = %impl.elem1 (constants.%impl.elem1.e3b)] -// CHECK:STDOUT: %.loc34_19.18: %Destroy.type = converted constants.%as_type.147, constants.%impl.elem1.e3b [symbolic = %impl.elem1 (constants.%impl.elem1.e3b)] -// CHECK:STDOUT: %specific_impl_fn.loc34_19.3: = specific_impl_function %impl.elem2.loc34_19.2, @Destroy.WithSelf.SelfDestruct.1(constants.%impl.elem1.e3b) [symbolic = %specific_impl_fn.loc34_19.6 (constants.%specific_impl_fn.63d)] -// CHECK:STDOUT: %bound_method.loc34_19.8: = bound_method %var, %specific_impl_fn.loc34_19.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc34_19.3: init %empty_tuple.type = call %bound_method.loc34_19.8(%var) +// CHECK:STDOUT: %Destroy.facet.loc34_19.3: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc34_19.19: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc34_19.3 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %Destroy.facet.loc34_19.4: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc34_19.20: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc34_19.4 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc34_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc34_19.8) +// CHECK:STDOUT: %.loc34_19.21: %Destroy.type = converted constants.%as_type.5c5, constants.%impl.elem1.732 [symbolic = %impl.elem1 (constants.%impl.elem1.732)] +// CHECK:STDOUT: %.loc34_19.22: %Destroy.type = converted constants.%as_type.5c5, constants.%impl.elem1.732 [symbolic = %impl.elem1 (constants.%impl.elem1.732)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc34_19.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.1(%self.param: ref %.b31) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_19.1(%self.param: ref %.b31) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_19.1(%self.param: ref %.b31) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_19.2(%self.param: ref %MaybeUnformed.f2c) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_19.1(%self.param: ref %.b31) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_19.3(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.2(%self.param: ref %MaybeUnformed.993) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_19.2(%self.param: ref %MaybeUnformed.993) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_19.2(%self.param: ref %MaybeUnformed.993) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_19.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_19.3(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.4(%self.param: ref %struct_type.value.has_value.2e0) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_19.4(%self.param: ref %struct_type.value.has_value.6f1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc34_19.1: ref bool = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc34_19.1: = bound_method %.loc34_19.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc34_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc34_19.1(%.loc34_19.1) -// CHECK:STDOUT: %.loc34_19.2: ref %MaybeUnformed.993 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc34_19.2: = bound_method %.loc34_19.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc34_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc34_19.2(%.loc34_19.2) +// CHECK:STDOUT: %Destroy.facet.loc34_19.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc34_19.2: %Destroy.type = converted bool, %Destroy.facet.loc34_19.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc34_19.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc34_19.3: %Destroy.type = converted bool, %Destroy.facet.loc34_19.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc34_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc34_19.1) +// CHECK:STDOUT: %.loc34_19.4: ref %MaybeUnformed.f2c = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc34_19.3: %Destroy.type = facet_value constants.%MaybeUnformed.f2c, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.a33) [concrete = constants.%Destroy.facet.74e] +// CHECK:STDOUT: %.loc34_19.5: %Destroy.type = converted constants.%MaybeUnformed.f2c, %Destroy.facet.loc34_19.3 [concrete = constants.%Destroy.facet.74e] +// CHECK:STDOUT: %Destroy.facet.loc34_19.4: %Destroy.type = facet_value constants.%MaybeUnformed.f2c, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.a33) [concrete = constants.%Destroy.facet.74e] +// CHECK:STDOUT: %.loc34_19.6: %Destroy.type = converted constants.%MaybeUnformed.f2c, %Destroy.facet.loc34_19.4 [concrete = constants.%Destroy.facet.74e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc34_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc34_19.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_19.4(%self.param: ref %struct_type.value.has_value.2e0) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_19.4(%self.param: ref %struct_type.value.has_value.2e0) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_19.5(%self.param: ref %DefaultOptionalStorage.af2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.5(%self.param: ref %DefaultOptionalStorage.091) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.335 = name_ref has_value, imports.%Core.import_ref.b03 [concrete = imports.%field_decl.390] +// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.6f7 = name_ref has_value, imports.%Core.import_ref.9ce [concrete = imports.%field_decl.dbe] // CHECK:STDOUT: %.loc34_19.1: ref bool = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc34_19.1: = bound_method %.loc34_19.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc34_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc34_19.1(%.loc34_19.1) -// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.32e = name_ref value, imports.%Core.import_ref.51c9 [concrete = imports.%field_decl.498] -// CHECK:STDOUT: %.loc34_19.2: ref %MaybeUnformed.993 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc34_19.2: = bound_method %.loc34_19.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc34_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc34_19.2(%.loc34_19.2) +// CHECK:STDOUT: %Destroy.facet.loc34_19.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc34_19.2: %Destroy.type = converted bool, %Destroy.facet.loc34_19.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc34_19.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc34_19.3: %Destroy.type = converted bool, %Destroy.facet.loc34_19.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc34_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc34_19.1) +// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.a6d = name_ref value, imports.%Core.import_ref.e86 [concrete = imports.%field_decl.bce] +// CHECK:STDOUT: %.loc34_19.4: ref %MaybeUnformed.f2c = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc34_19.3: %Destroy.type = facet_value constants.%MaybeUnformed.f2c, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.a33) [concrete = constants.%Destroy.facet.74e] +// CHECK:STDOUT: %.loc34_19.5: %Destroy.type = converted constants.%MaybeUnformed.f2c, %Destroy.facet.loc34_19.3 [concrete = constants.%Destroy.facet.74e] +// CHECK:STDOUT: %Destroy.facet.loc34_19.4: %Destroy.type = facet_value constants.%MaybeUnformed.f2c, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.a33) [concrete = constants.%Destroy.facet.74e] +// CHECK:STDOUT: %.loc34_19.6: %Destroy.type = converted constants.%MaybeUnformed.f2c, %Destroy.facet.loc34_19.4 [concrete = constants.%Destroy.facet.74e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc34_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc34_19.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_19.5(%self.param: ref %DefaultOptionalStorage.091) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_19.5(%self.param: ref %DefaultOptionalStorage.091) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_19.6(%self.param: ref %Optional.aff) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_19.6(%self.param: ref %Optional.aff) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_19.6(%self.param: ref %Optional.aff) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_19.6(%self.param: ref %Optional.561) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TestRangeFor(%m.param: ref %MutableRange, %c.param: %ConstRange) { // CHECK:STDOUT: !entry: @@ -1264,13 +1104,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt.loc49: %pattern_type.d94 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %m.ref: ref %MutableRange = name_ref m, %m -// CHECK:STDOUT: %impl.elem2.loc49: %.d4c = impl_witness_access constants.%Iterate.impl_witness.a35, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.f70] +// CHECK:STDOUT: %impl.elem2.loc49: %.6b7 = impl_witness_access constants.%Iterate.impl_witness.d35, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.c31] // CHECK:STDOUT: %bound_method.loc49_19.1: = bound_method %m.ref, %impl.elem2.loc49 -// CHECK:STDOUT: %facet_value.loc49_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.ed3, constants.%custom_witness.8e1, constants.%custom_witness.43f, constants.%custom_witness.444, constants.%custom_witness.c91, constants.%custom_witness.f8f19d.1, constants.%Copy.impl_witness.8af, constants.%custom_witness.8e1) [concrete = constants.%facet_value.383] -// CHECK:STDOUT: %.loc49_19.1: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.1 [concrete = constants.%facet_value.383] -// CHECK:STDOUT: %facet_value.loc49_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.ed3, constants.%custom_witness.8e1, constants.%custom_witness.43f, constants.%custom_witness.444, constants.%custom_witness.c91, constants.%custom_witness.f8f19d.1, constants.%Copy.impl_witness.8af, constants.%custom_witness.8e1) [concrete = constants.%facet_value.383] -// CHECK:STDOUT: %.loc49_19.2: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.2 [concrete = constants.%facet_value.383] -// CHECK:STDOUT: %specific_fn.loc49_19.1: = specific_function %impl.elem2.loc49, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.383) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.c26] +// CHECK:STDOUT: %facet_value.loc49_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.ed3, constants.%custom_witness.da7, constants.%DestroyImpl.impl_witness.eff, constants.%custom_witness.43f, constants.%custom_witness.444, constants.%custom_witness.c91, constants.%custom_witness.b80ef6.1, constants.%DestroyImpl.impl_witness.077, constants.%Copy.impl_witness.8af, constants.%custom_witness.da7, constants.%DestroyImpl.impl_witness.eff) [concrete = constants.%facet_value.941] +// CHECK:STDOUT: %.loc49_19.1: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.1 [concrete = constants.%facet_value.941] +// CHECK:STDOUT: %facet_value.loc49_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.ed3, constants.%custom_witness.da7, constants.%DestroyImpl.impl_witness.eff, constants.%custom_witness.43f, constants.%custom_witness.444, constants.%custom_witness.c91, constants.%custom_witness.b80ef6.1, constants.%DestroyImpl.impl_witness.077, constants.%Copy.impl_witness.8af, constants.%custom_witness.da7, constants.%DestroyImpl.impl_witness.eff) [concrete = constants.%facet_value.941] +// CHECK:STDOUT: %.loc49_19.2: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.2 [concrete = constants.%facet_value.941] +// CHECK:STDOUT: %specific_fn.loc49_19.1: = specific_function %impl.elem2.loc49, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.941) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.881] // CHECK:STDOUT: %bound_method.loc49_19.2: = bound_method %m.ref, %specific_fn.loc49_19.1 // CHECK:STDOUT: %var.loc49: ref %tuple.type.508 = var_storage invalid // CHECK:STDOUT: %.loc49_18.1: %MutableRange = acquire_value %m.ref @@ -1279,36 +1119,36 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: br !for.next.loc49 // CHECK:STDOUT: // CHECK:STDOUT: !for.next.loc49: -// CHECK:STDOUT: %impl.elem3.loc49: %.9fe = impl_witness_access constants.%Iterate.impl_witness.a35, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.573] +// CHECK:STDOUT: %impl.elem3.loc49: %.0ac = impl_witness_access constants.%Iterate.impl_witness.d35, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.7de] // CHECK:STDOUT: %bound_method.loc49_19.3: = bound_method %m.ref, %impl.elem3.loc49 -// CHECK:STDOUT: %facet_value.loc49_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.ed3, constants.%custom_witness.8e1, constants.%custom_witness.43f, constants.%custom_witness.444, constants.%custom_witness.c91, constants.%custom_witness.f8f19d.1, constants.%Copy.impl_witness.8af, constants.%custom_witness.8e1) [concrete = constants.%facet_value.383] -// CHECK:STDOUT: %.loc49_19.3: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.3 [concrete = constants.%facet_value.383] -// CHECK:STDOUT: %facet_value.loc49_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.ed3, constants.%custom_witness.8e1, constants.%custom_witness.43f, constants.%custom_witness.444, constants.%custom_witness.c91, constants.%custom_witness.f8f19d.1, constants.%Copy.impl_witness.8af, constants.%custom_witness.8e1) [concrete = constants.%facet_value.383] -// CHECK:STDOUT: %.loc49_19.4: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.4 [concrete = constants.%facet_value.383] -// CHECK:STDOUT: %specific_fn.loc49_19.2: = specific_function %impl.elem3.loc49, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.383) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.7ef] +// CHECK:STDOUT: %facet_value.loc49_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.ed3, constants.%custom_witness.da7, constants.%DestroyImpl.impl_witness.eff, constants.%custom_witness.43f, constants.%custom_witness.444, constants.%custom_witness.c91, constants.%custom_witness.b80ef6.1, constants.%DestroyImpl.impl_witness.077, constants.%Copy.impl_witness.8af, constants.%custom_witness.da7, constants.%DestroyImpl.impl_witness.eff) [concrete = constants.%facet_value.941] +// CHECK:STDOUT: %.loc49_19.3: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.3 [concrete = constants.%facet_value.941] +// CHECK:STDOUT: %facet_value.loc49_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.ed3, constants.%custom_witness.da7, constants.%DestroyImpl.impl_witness.eff, constants.%custom_witness.43f, constants.%custom_witness.444, constants.%custom_witness.c91, constants.%custom_witness.b80ef6.1, constants.%DestroyImpl.impl_witness.077, constants.%Copy.impl_witness.8af, constants.%custom_witness.da7, constants.%DestroyImpl.impl_witness.eff) [concrete = constants.%facet_value.941] +// CHECK:STDOUT: %.loc49_19.4: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc49_19.4 [concrete = constants.%facet_value.941] +// CHECK:STDOUT: %specific_fn.loc49_19.2: = specific_function %impl.elem3.loc49, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.941) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.e7d] // CHECK:STDOUT: %bound_method.loc49_19.4: = bound_method %m.ref, %specific_fn.loc49_19.2 -// CHECK:STDOUT: %.loc49_19.5: ref %Optional.aff = temporary_storage +// CHECK:STDOUT: %.loc49_19.5: ref %Optional.561 = temporary_storage // CHECK:STDOUT: %.loc49_18.2: %MutableRange = acquire_value %m.ref -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc49: init %Optional.aff to %.loc49_19.5 = call %bound_method.loc49_19.4(%.loc49_18.2, %var.loc49) -// CHECK:STDOUT: %.loc49_19.6: ref %Optional.aff = temporary %.loc49_19.5, %T.as_type.as.Iterate.impl.Next.call.loc49 -// CHECK:STDOUT: %.loc49_19.7: %Optional.HasValue.type.182 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.HasValue.e75] -// CHECK:STDOUT: %HasValue.ref.loc49: %Optional.HasValue.type.182 = name_ref HasValue, %.loc49_19.7 [concrete = constants.%Optional.HasValue.e75] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc49: init %Optional.561 to %.loc49_19.5 = call %bound_method.loc49_19.4(%.loc49_18.2, %var.loc49) +// CHECK:STDOUT: %.loc49_19.6: ref %Optional.561 = temporary %.loc49_19.5, %T.as_type.as.Iterate.impl.Next.call.loc49 +// CHECK:STDOUT: %.loc49_19.7: %Optional.HasValue.type.92b = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.HasValue.104] +// CHECK:STDOUT: %HasValue.ref.loc49: %Optional.HasValue.type.92b = name_ref HasValue, %.loc49_19.7 [concrete = constants.%Optional.HasValue.104] // CHECK:STDOUT: %Optional.HasValue.bound.loc49: = bound_method %.loc49_19.6, %HasValue.ref.loc49 -// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc49: = specific_function %HasValue.ref.loc49, @Optional.HasValue(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.HasValue.specific_fn.8c2] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc49: = specific_function %HasValue.ref.loc49, @Optional.HasValue(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.HasValue.specific_fn.3c4] // CHECK:STDOUT: %bound_method.loc49_19.5: = bound_method %.loc49_19.6, %Optional.HasValue.specific_fn.loc49 -// CHECK:STDOUT: %.loc49_19.8: %Optional.aff = acquire_value %.loc49_19.6 +// CHECK:STDOUT: %.loc49_19.8: %Optional.561 = acquire_value %.loc49_19.6 // CHECK:STDOUT: %Optional.HasValue.call.loc49: init bool = call %bound_method.loc49_19.5(%.loc49_19.8) // CHECK:STDOUT: %.loc49_19.9: bool = value_of_initializer %Optional.HasValue.call.loc49 // CHECK:STDOUT: %.loc49_19.10: bool = converted %Optional.HasValue.call.loc49, %.loc49_19.9 // CHECK:STDOUT: if %.loc49_19.10 br !for.body.loc49 else br !for.done.loc49 // CHECK:STDOUT: // CHECK:STDOUT: !for.body.loc49: -// CHECK:STDOUT: %.loc49_19.11: %Optional.Get.type.788 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.Get.186] -// CHECK:STDOUT: %Get.ref.loc49: %Optional.Get.type.788 = name_ref Get, %.loc49_19.11 [concrete = constants.%Optional.Get.186] +// CHECK:STDOUT: %.loc49_19.11: %Optional.Get.type.4e6 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.Get.3a9] +// CHECK:STDOUT: %Get.ref.loc49: %Optional.Get.type.4e6 = name_ref Get, %.loc49_19.11 [concrete = constants.%Optional.Get.3a9] // CHECK:STDOUT: %Optional.Get.bound.loc49: = bound_method %.loc49_19.6, %Get.ref.loc49 -// CHECK:STDOUT: %Optional.Get.specific_fn.loc49: = specific_function %Get.ref.loc49, @Optional.Get(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.Get.specific_fn.8fe] +// CHECK:STDOUT: %Optional.Get.specific_fn.loc49: = specific_function %Get.ref.loc49, @Optional.Get(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.Get.specific_fn.65d] // CHECK:STDOUT: %bound_method.loc49_19.6: = bound_method %.loc49_19.6, %Optional.Get.specific_fn.loc49 -// CHECK:STDOUT: %.loc49_19.12: %Optional.aff = acquire_value %.loc49_19.6 +// CHECK:STDOUT: %.loc49_19.12: %Optional.561 = acquire_value %.loc49_19.6 // CHECK:STDOUT: %Optional.Get.call.loc49: init %i32 = call %bound_method.loc49_19.6(%.loc49_19.12) // CHECK:STDOUT: %.loc49_19.13: %i32 = value_of_initializer %Optional.Get.call.loc49 // CHECK:STDOUT: %.loc49_19.14: %i32 = converted %Optional.Get.call.loc49, %.loc49_19.13 @@ -1326,26 +1166,38 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.specific_fn.loc50: = specific_function %Op.ref.loc50, @Int.as.AddAssignWith.impl.Op.2(constants.%int_32, constants.%ImplicitAs.facet.c18) [concrete = constants.%Int.as.AddAssignWith.impl.Op.specific_fn.ec28e6.2] // CHECK:STDOUT: %bound_method.loc50_9.3: = bound_method %sum.ref.loc50, %Int.as.AddAssignWith.impl.Op.specific_fn.loc50 // CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.call.loc50: init %empty_tuple.type = call %bound_method.loc50_9.3(%sum.ref.loc50, %i.ref.loc50) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc49_19.1: = bound_method %.loc49_19.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc49_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc49_19.1(%.loc49_19.6) +// CHECK:STDOUT: %Destroy.facet.loc49_19.1: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc49_19.15: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc49_19.1 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %Destroy.facet.loc49_19.2: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc49_19.16: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc49_19.2 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc49_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc49_19.6) // CHECK:STDOUT: br !for.next.loc49 // CHECK:STDOUT: // CHECK:STDOUT: !for.done.loc49: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc49_19.2: = bound_method %.loc49_19.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc49_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc49_19.2(%.loc49_19.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc49_19.3: = bound_method %var.loc49, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.9 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc49_19.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc49_19.3(%var.loc49) +// CHECK:STDOUT: %Destroy.facet.loc49_19.3: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc49_19.17: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc49_19.3 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %Destroy.facet.loc49_19.4: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc49_19.18: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc49_19.4 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc49_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc49_19.6) +// CHECK:STDOUT: %Destroy.facet.loc49_19.5: %Destroy.type = facet_value constants.%tuple.type.508, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.91e) [concrete = constants.%Destroy.facet.70f] +// CHECK:STDOUT: %.loc49_19.19: %Destroy.type = converted constants.%tuple.type.508, %Destroy.facet.loc49_19.5 [concrete = constants.%Destroy.facet.70f] +// CHECK:STDOUT: %Destroy.facet.loc49_19.6: %Destroy.type = facet_value constants.%tuple.type.508, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.91e) [concrete = constants.%Destroy.facet.70f] +// CHECK:STDOUT: %.loc49_19.20: %Destroy.type = converted constants.%tuple.type.508, %Destroy.facet.loc49_19.6 [concrete = constants.%Destroy.facet.70f] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc49_19.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%var.loc49) // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt.loc55: %pattern_type.d94 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %c.ref: %ConstRange = name_ref c, %c -// CHECK:STDOUT: %impl.elem2.loc55: %.582 = impl_witness_access constants.%Iterate.impl_witness.39d, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.356] +// CHECK:STDOUT: %impl.elem2.loc55: %.b3c = impl_witness_access constants.%Iterate.impl_witness.c9d, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.649] // CHECK:STDOUT: %bound_method.loc55_19.1: = bound_method %c.ref, %impl.elem2.loc55 -// CHECK:STDOUT: %facet_value.loc55_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.23e, constants.%custom_witness.0f3, constants.%custom_witness.f5c, constants.%custom_witness.746, constants.%custom_witness.86f, constants.%custom_witness.f8f19d.1, constants.%Copy.impl_witness.8af, constants.%custom_witness.0f3) [concrete = constants.%facet_value.15e] -// CHECK:STDOUT: %.loc55_19.1: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.1 [concrete = constants.%facet_value.15e] -// CHECK:STDOUT: %facet_value.loc55_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.23e, constants.%custom_witness.0f3, constants.%custom_witness.f5c, constants.%custom_witness.746, constants.%custom_witness.86f, constants.%custom_witness.f8f19d.1, constants.%Copy.impl_witness.8af, constants.%custom_witness.0f3) [concrete = constants.%facet_value.15e] -// CHECK:STDOUT: %.loc55_19.2: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.2 [concrete = constants.%facet_value.15e] -// CHECK:STDOUT: %specific_fn.loc55_19.1: = specific_function %impl.elem2.loc55, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.15e) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.49d] +// CHECK:STDOUT: %facet_value.loc55_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.23e, constants.%custom_witness.fcc, constants.%DestroyImpl.impl_witness.dfd, constants.%custom_witness.f5c, constants.%custom_witness.746, constants.%custom_witness.86f, constants.%custom_witness.b80ef6.1, constants.%DestroyImpl.impl_witness.077, constants.%Copy.impl_witness.8af, constants.%custom_witness.fcc, constants.%DestroyImpl.impl_witness.dfd) [concrete = constants.%facet_value.43d] +// CHECK:STDOUT: %.loc55_19.1: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.1 [concrete = constants.%facet_value.43d] +// CHECK:STDOUT: %facet_value.loc55_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.23e, constants.%custom_witness.fcc, constants.%DestroyImpl.impl_witness.dfd, constants.%custom_witness.f5c, constants.%custom_witness.746, constants.%custom_witness.86f, constants.%custom_witness.b80ef6.1, constants.%DestroyImpl.impl_witness.077, constants.%Copy.impl_witness.8af, constants.%custom_witness.fcc, constants.%DestroyImpl.impl_witness.dfd) [concrete = constants.%facet_value.43d] +// CHECK:STDOUT: %.loc55_19.2: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.2 [concrete = constants.%facet_value.43d] +// CHECK:STDOUT: %specific_fn.loc55_19.1: = specific_function %impl.elem2.loc55, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.43d) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.750] // CHECK:STDOUT: %bound_method.loc55_19.2: = bound_method %c.ref, %specific_fn.loc55_19.1 // CHECK:STDOUT: %var.loc55: ref %tuple.type.69f = var_storage invalid // CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call.loc55: init %tuple.type.69f to %var.loc55 = call %bound_method.loc55_19.2(%c.ref) @@ -1353,35 +1205,35 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: br !for.next.loc55 // CHECK:STDOUT: // CHECK:STDOUT: !for.next.loc55: -// CHECK:STDOUT: %impl.elem3.loc55: %.d56 = impl_witness_access constants.%Iterate.impl_witness.39d, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.259] +// CHECK:STDOUT: %impl.elem3.loc55: %.c69 = impl_witness_access constants.%Iterate.impl_witness.c9d, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.320] // CHECK:STDOUT: %bound_method.loc55_19.3: = bound_method %c.ref, %impl.elem3.loc55 -// CHECK:STDOUT: %facet_value.loc55_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.23e, constants.%custom_witness.0f3, constants.%custom_witness.f5c, constants.%custom_witness.746, constants.%custom_witness.86f, constants.%custom_witness.f8f19d.1, constants.%Copy.impl_witness.8af, constants.%custom_witness.0f3) [concrete = constants.%facet_value.15e] -// CHECK:STDOUT: %.loc55_19.3: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.3 [concrete = constants.%facet_value.15e] -// CHECK:STDOUT: %facet_value.loc55_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.23e, constants.%custom_witness.0f3, constants.%custom_witness.f5c, constants.%custom_witness.746, constants.%custom_witness.86f, constants.%custom_witness.f8f19d.1, constants.%Copy.impl_witness.8af, constants.%custom_witness.0f3) [concrete = constants.%facet_value.15e] -// CHECK:STDOUT: %.loc55_19.4: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.4 [concrete = constants.%facet_value.15e] -// CHECK:STDOUT: %specific_fn.loc55_19.2: = specific_function %impl.elem3.loc55, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.15e) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.2c1] +// CHECK:STDOUT: %facet_value.loc55_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.23e, constants.%custom_witness.fcc, constants.%DestroyImpl.impl_witness.dfd, constants.%custom_witness.f5c, constants.%custom_witness.746, constants.%custom_witness.86f, constants.%custom_witness.b80ef6.1, constants.%DestroyImpl.impl_witness.077, constants.%Copy.impl_witness.8af, constants.%custom_witness.fcc, constants.%DestroyImpl.impl_witness.dfd) [concrete = constants.%facet_value.43d] +// CHECK:STDOUT: %.loc55_19.3: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.3 [concrete = constants.%facet_value.43d] +// CHECK:STDOUT: %facet_value.loc55_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.23e, constants.%custom_witness.fcc, constants.%DestroyImpl.impl_witness.dfd, constants.%custom_witness.f5c, constants.%custom_witness.746, constants.%custom_witness.86f, constants.%custom_witness.b80ef6.1, constants.%DestroyImpl.impl_witness.077, constants.%Copy.impl_witness.8af, constants.%custom_witness.fcc, constants.%DestroyImpl.impl_witness.dfd) [concrete = constants.%facet_value.43d] +// CHECK:STDOUT: %.loc55_19.4: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc55_19.4 [concrete = constants.%facet_value.43d] +// CHECK:STDOUT: %specific_fn.loc55_19.2: = specific_function %impl.elem3.loc55, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.43d) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.d88] // CHECK:STDOUT: %bound_method.loc55_19.4: = bound_method %c.ref, %specific_fn.loc55_19.2 -// CHECK:STDOUT: %.loc55_19.5: ref %Optional.aff = temporary_storage -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc55: init %Optional.aff to %.loc55_19.5 = call %bound_method.loc55_19.4(%c.ref, %var.loc55) -// CHECK:STDOUT: %.loc55_19.6: ref %Optional.aff = temporary %.loc55_19.5, %T.as_type.as.Iterate.impl.Next.call.loc55 -// CHECK:STDOUT: %.loc55_19.7: %Optional.HasValue.type.182 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.HasValue.e75] -// CHECK:STDOUT: %HasValue.ref.loc55: %Optional.HasValue.type.182 = name_ref HasValue, %.loc55_19.7 [concrete = constants.%Optional.HasValue.e75] +// CHECK:STDOUT: %.loc55_19.5: ref %Optional.561 = temporary_storage +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc55: init %Optional.561 to %.loc55_19.5 = call %bound_method.loc55_19.4(%c.ref, %var.loc55) +// CHECK:STDOUT: %.loc55_19.6: ref %Optional.561 = temporary %.loc55_19.5, %T.as_type.as.Iterate.impl.Next.call.loc55 +// CHECK:STDOUT: %.loc55_19.7: %Optional.HasValue.type.92b = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.HasValue.104] +// CHECK:STDOUT: %HasValue.ref.loc55: %Optional.HasValue.type.92b = name_ref HasValue, %.loc55_19.7 [concrete = constants.%Optional.HasValue.104] // CHECK:STDOUT: %Optional.HasValue.bound.loc55: = bound_method %.loc55_19.6, %HasValue.ref.loc55 -// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc55: = specific_function %HasValue.ref.loc55, @Optional.HasValue(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.HasValue.specific_fn.8c2] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc55: = specific_function %HasValue.ref.loc55, @Optional.HasValue(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.HasValue.specific_fn.3c4] // CHECK:STDOUT: %bound_method.loc55_19.5: = bound_method %.loc55_19.6, %Optional.HasValue.specific_fn.loc55 -// CHECK:STDOUT: %.loc55_19.8: %Optional.aff = acquire_value %.loc55_19.6 +// CHECK:STDOUT: %.loc55_19.8: %Optional.561 = acquire_value %.loc55_19.6 // CHECK:STDOUT: %Optional.HasValue.call.loc55: init bool = call %bound_method.loc55_19.5(%.loc55_19.8) // CHECK:STDOUT: %.loc55_19.9: bool = value_of_initializer %Optional.HasValue.call.loc55 // CHECK:STDOUT: %.loc55_19.10: bool = converted %Optional.HasValue.call.loc55, %.loc55_19.9 // CHECK:STDOUT: if %.loc55_19.10 br !for.body.loc55 else br !for.done.loc55 // CHECK:STDOUT: // CHECK:STDOUT: !for.body.loc55: -// CHECK:STDOUT: %.loc55_19.11: %Optional.Get.type.788 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.Get.186] -// CHECK:STDOUT: %Get.ref.loc55: %Optional.Get.type.788 = name_ref Get, %.loc55_19.11 [concrete = constants.%Optional.Get.186] +// CHECK:STDOUT: %.loc55_19.11: %Optional.Get.type.4e6 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.Get.3a9] +// CHECK:STDOUT: %Get.ref.loc55: %Optional.Get.type.4e6 = name_ref Get, %.loc55_19.11 [concrete = constants.%Optional.Get.3a9] // CHECK:STDOUT: %Optional.Get.bound.loc55: = bound_method %.loc55_19.6, %Get.ref.loc55 -// CHECK:STDOUT: %Optional.Get.specific_fn.loc55: = specific_function %Get.ref.loc55, @Optional.Get(constants.%OptionalStorage.facet.1f7) [concrete = constants.%Optional.Get.specific_fn.8fe] +// CHECK:STDOUT: %Optional.Get.specific_fn.loc55: = specific_function %Get.ref.loc55, @Optional.Get(constants.%OptionalStorage.facet.072) [concrete = constants.%Optional.Get.specific_fn.65d] // CHECK:STDOUT: %bound_method.loc55_19.6: = bound_method %.loc55_19.6, %Optional.Get.specific_fn.loc55 -// CHECK:STDOUT: %.loc55_19.12: %Optional.aff = acquire_value %.loc55_19.6 +// CHECK:STDOUT: %.loc55_19.12: %Optional.561 = acquire_value %.loc55_19.6 // CHECK:STDOUT: %Optional.Get.call.loc55: init %i32 = call %bound_method.loc55_19.6(%.loc55_19.12) // CHECK:STDOUT: %.loc55_19.13: %i32 = value_of_initializer %Optional.Get.call.loc55 // CHECK:STDOUT: %.loc55_19.14: %i32 = converted %Optional.Get.call.loc55, %.loc55_19.13 @@ -1399,15 +1251,27 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.specific_fn.loc56: = specific_function %Op.ref.loc56, @Int.as.AddAssignWith.impl.Op.2(constants.%int_32, constants.%ImplicitAs.facet.c18) [concrete = constants.%Int.as.AddAssignWith.impl.Op.specific_fn.ec28e6.2] // CHECK:STDOUT: %bound_method.loc56_9.3: = bound_method %sum.ref.loc56, %Int.as.AddAssignWith.impl.Op.specific_fn.loc56 // CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.call.loc56: init %empty_tuple.type = call %bound_method.loc56_9.3(%sum.ref.loc56, %i.ref.loc56) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc55_19.1: = bound_method %.loc55_19.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc55_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc55_19.1(%.loc55_19.6) +// CHECK:STDOUT: %Destroy.facet.loc55_19.1: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc55_19.15: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc55_19.1 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %Destroy.facet.loc55_19.2: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc55_19.16: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc55_19.2 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc55_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc55_19.6) // CHECK:STDOUT: br !for.next.loc55 // CHECK:STDOUT: // CHECK:STDOUT: !for.done.loc55: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc55_19.2: = bound_method %.loc55_19.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc55_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc55_19.2(%.loc55_19.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc55_19.3: = bound_method %var.loc55, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.11 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc55_19.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc55_19.3(%var.loc55) +// CHECK:STDOUT: %Destroy.facet.loc55_19.3: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc55_19.17: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc55_19.3 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %Destroy.facet.loc55_19.4: %Destroy.type = facet_value constants.%Optional.561, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dd0) [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: %.loc55_19.18: %Destroy.type = converted constants.%Optional.561, %Destroy.facet.loc55_19.4 [concrete = constants.%Destroy.facet.58d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc55_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc55_19.6) +// CHECK:STDOUT: %Destroy.facet.loc55_19.5: %Destroy.type = facet_value constants.%tuple.type.69f, (constants.%custom_witness.b80ef6.9, constants.%DestroyImpl.impl_witness.4ff) [concrete = constants.%Destroy.facet.141] +// CHECK:STDOUT: %.loc55_19.19: %Destroy.type = converted constants.%tuple.type.69f, %Destroy.facet.loc55_19.5 [concrete = constants.%Destroy.facet.141] +// CHECK:STDOUT: %Destroy.facet.loc55_19.6: %Destroy.type = facet_value constants.%tuple.type.69f, (constants.%custom_witness.b80ef6.9, constants.%DestroyImpl.impl_witness.4ff) [concrete = constants.%Destroy.facet.141] +// CHECK:STDOUT: %.loc55_19.20: %Destroy.type = converted constants.%tuple.type.69f, %Destroy.facet.loc55_19.6 [concrete = constants.%Destroy.facet.141] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc55_19.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%var.loc55) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1415,14 +1279,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt // CHECK:STDOUT: %R.loc30_17.1 => constants.%R // CHECK:STDOUT: %R.as_type.loc30_61.1 => constants.%R.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.3b2 -// CHECK:STDOUT: %r.param_patt.loc30_59.2 => constants.%r.param_patt.a49 -// CHECK:STDOUT: %r.patt.loc30_59.2 => constants.%r.patt.dd9 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.0e6 +// CHECK:STDOUT: %r.param_patt.loc30_59.2 => constants.%r.param_patt.874 +// CHECK:STDOUT: %r.patt.loc30_59.2 => constants.%r.patt.97e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.b06) { +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.7cf) { // CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt -// CHECK:STDOUT: %R.loc30_17.1 => constants.%facet_value.b06 +// CHECK:STDOUT: %R.loc30_17.1 => constants.%facet_value.7cf // CHECK:STDOUT: %R.as_type.loc30_61.1 => constants.%MutableRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e63 // CHECK:STDOUT: %r.param_patt.loc30_59.2 => constants.%r.param_patt.c79 @@ -1430,29 +1294,25 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc30 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.a35 -// CHECK:STDOUT: %Iterate.facet.loc34_19.5 => constants.%Iterate.facet.2b0 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.ca0 -// CHECK:STDOUT: %.loc34_19.19 => constants.%.d4c -// CHECK:STDOUT: %impl.elem2.loc34_19.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.f70 -// CHECK:STDOUT: %specific_impl_fn.loc34_19.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.c26 -// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.0fe +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.d35 +// CHECK:STDOUT: %Iterate.facet.loc34_19.5 => constants.%Iterate.facet.e8f +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.b5d +// CHECK:STDOUT: %.loc34_19.23 => constants.%.6b7 +// CHECK:STDOUT: %impl.elem2.loc34_19.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.c31 +// CHECK:STDOUT: %specific_impl_fn.loc34_19.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.881 +// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.70f // CHECK:STDOUT: %as_type => constants.%tuple.type.508 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.c28 -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.8bc -// CHECK:STDOUT: %.loc34_19.20 => constants.%.9fe -// CHECK:STDOUT: %impl.elem3.loc34_19.2 => constants.%T.as_type.as.Iterate.impl.Next.573 -// CHECK:STDOUT: %specific_impl_fn.loc34_19.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.7ef -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.d1f -// CHECK:STDOUT: %.loc34_19.21 => constants.%.0dc -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.8 -// CHECK:STDOUT: %impl.elem2.loc34_19.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.9 -// CHECK:STDOUT: %specific_impl_fn.loc34_19.6 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.9 +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.e6d +// CHECK:STDOUT: %.loc34_19.24 => constants.%.0ac +// CHECK:STDOUT: %impl.elem3.loc34_19.2 => constants.%T.as_type.as.Iterate.impl.Next.7de +// CHECK:STDOUT: %specific_impl_fn.loc34_19.4 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.e7d +// CHECK:STDOUT: %SelfDestruct.specific_fn.5 => constants.%SelfDestruct.specific_fn.a77 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.3df) { +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.590) { // CHECK:STDOUT: %R.patt.loc30_17.2 => constants.%R.patt -// CHECK:STDOUT: %R.loc30_17.1 => constants.%facet_value.3df +// CHECK:STDOUT: %R.loc30_17.1 => constants.%facet_value.590 // CHECK:STDOUT: %R.as_type.loc30_61.1 => constants.%ConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0ba // CHECK:STDOUT: %r.param_patt.loc30_59.2 => constants.%r.param_patt.83e @@ -1460,24 +1320,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc30 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.39d -// CHECK:STDOUT: %Iterate.facet.loc34_19.5 => constants.%Iterate.facet.1c8 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.97c -// CHECK:STDOUT: %.loc34_19.19 => constants.%.582 -// CHECK:STDOUT: %impl.elem2.loc34_19.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.356 -// CHECK:STDOUT: %specific_impl_fn.loc34_19.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.49d -// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.c6d +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.c9d +// CHECK:STDOUT: %Iterate.facet.loc34_19.5 => constants.%Iterate.facet.80e +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.be9 +// CHECK:STDOUT: %.loc34_19.23 => constants.%.b3c +// CHECK:STDOUT: %impl.elem2.loc34_19.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.649 +// CHECK:STDOUT: %specific_impl_fn.loc34_19.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.750 +// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.141 // CHECK:STDOUT: %as_type => constants.%tuple.type.69f // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.8d5 -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.1c9 -// CHECK:STDOUT: %.loc34_19.20 => constants.%.d56 -// CHECK:STDOUT: %impl.elem3.loc34_19.2 => constants.%T.as_type.as.Iterate.impl.Next.259 -// CHECK:STDOUT: %specific_impl_fn.loc34_19.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.2c1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.b84 -// CHECK:STDOUT: %.loc34_19.21 => constants.%.40c -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.9 -// CHECK:STDOUT: %impl.elem2.loc34_19.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.11 -// CHECK:STDOUT: %specific_impl_fn.loc34_19.6 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.11 +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.4a4 +// CHECK:STDOUT: %.loc34_19.24 => constants.%.c69 +// CHECK:STDOUT: %impl.elem3.loc34_19.2 => constants.%T.as_type.as.Iterate.impl.Next.320 +// CHECK:STDOUT: %specific_impl_fn.loc34_19.4 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.d88 +// CHECK:STDOUT: %SelfDestruct.specific_fn.5 => constants.%SelfDestruct.specific_fn.a15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- methods_return_different_types.carbon @@ -1486,31 +1342,37 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %facet_type.bd0: type = facet_type <@Copy & @Destroy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.Get.2d0: %Optional.Get.type.786 = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f2f: %Optional.HasValue.type.3ea = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.74b: type = facet_access_type %T.283 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.28a: = lookup_impl_witness %T.283, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.16e: %Destroy.type = facet_value %T.as_type.74b, (%Destroy.lookup_impl_witness.28a) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.91c: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.16e) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.ade: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.b49: type = unbound_element_type %DefaultOptionalStorage.ade, bool [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.229: type = unbound_element_type %DefaultOptionalStorage.ade, %MaybeUnformed.91c [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.2f2: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.884: %T.as_type.as.OptionalStorage.impl.Get.type.2f2 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.d28: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.f29: %T.as_type.as.OptionalStorage.impl.Has.type.d28 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.760: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.268: %T.as_type.as.OptionalStorage.impl.Some.type.760 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.925: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.f42: %T.as_type.as.OptionalStorage.impl.None.type.925 = struct_value () [symbolic] +// CHECK:STDOUT: %T.f84392.1: %facet_type.bd0 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.c1cc3e.1: type = facet_access_type %T.f84392.1 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.70f: = lookup_impl_witness %T.f84392.1, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.bf2: = lookup_impl_witness %T.f84392.1, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.dc4: %Destroy.type = facet_value %T.as_type.c1cc3e.1, (%SubobjectDestroy.lookup_impl_witness.70f, %DestroyImpl.lookup_impl_witness.bf2) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.348: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.dc4) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.476: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.4a2: type = unbound_element_type %DefaultOptionalStorage.476, bool [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.ff3: type = unbound_element_type %DefaultOptionalStorage.476, %MaybeUnformed.348 [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.f27: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.e40: %T.as_type.as.OptionalStorage.impl.Get.type.f27 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.18e: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.463: %T.as_type.as.OptionalStorage.impl.Has.type.18e = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.292: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.ae9: %T.as_type.as.OptionalStorage.impl.Some.type.292 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.b57: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.791: %T.as_type.as.OptionalStorage.impl.None.type.b57 = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] // CHECK:STDOUT: %.Self.e0b: %CppRange.type = symbolic_binding .Self [symbolic_self] @@ -1519,133 +1381,99 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d3, @CppUnsafeDeref [symbolic_self] // CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] // CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] -// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.f45530.3: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.5a8: %T.as_type.as.Iterate.impl.Next.type.d4a = struct_value () [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.3, @CppRangeForIterate [symbolic] // CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] // CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.8a1: %T.as_type.as.Iterate.impl.NewCursor.type.8fb = struct_value () [symbolic] // CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] // CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.dc9: = lookup_impl_witness %tuple.type.1ba, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.504: = lookup_impl_witness %tuple.type.1ba, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.9b6: %Destroy.type = facet_value %tuple.type.1ba, (%SubobjectDestroy.lookup_impl_witness.dc9, %DestroyImpl.lookup_impl_witness.504) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.b15da7.2: = lookup_impl_witness %impl.elem0.493765.2, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.4e7f44.2: = lookup_impl_witness %impl.elem0.493765.2, @DestroyImpl [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %facet_value.189: %facet_type.bd0 = facet_value %impl.elem0.493765.2, (%SubobjectDestroy.lookup_impl_witness.b15da7.2, %DestroyImpl.lookup_impl_witness.4e7f44.2, %Copy.lookup_impl_witness.167) [symbolic] // CHECK:STDOUT: %DiffValueType: type = class_type @DiffValueType [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.149: type = pattern_type %DiffValueType [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc40_56 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc40_56 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %DiffValueType.SubobjectDestroy.type: type = fn_type @DiffValueType.SubobjectDestroy [concrete] -// CHECK:STDOUT: %DiffValueType.SubobjectDestroy: %DiffValueType.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1bfa2a.1: = custom_witness (%Destroy.WithSelf.Op.403171.2, %DiffValueType.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] +// CHECK:STDOUT: %DiffValueType.Op.type.83af6e.1: type = fn_type @DiffValueType.Op.1 [concrete] +// CHECK:STDOUT: %DiffValueType.Op.4dca31.1: %DiffValueType.Op.type.83af6e.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.1: = custom_witness (%DiffValueType.Op.4dca31.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7ea: %SubobjectDestroy.type = facet_value %DiffValueType, (%custom_witness.5760f4.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c9a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7ea) [concrete] // CHECK:STDOUT: %const.879: type = const_type %DiffValueType [concrete] // CHECK:STDOUT: %ptr.816: type = ptr_type %const.879 [concrete] // CHECK:STDOUT: %ptr.cd0: type = ptr_type %DiffValueType [concrete] -// CHECK:STDOUT: %DiffValueType.Op.type: type = fn_type @DiffValueType.Op [concrete] -// CHECK:STDOUT: %DiffValueType.Op: %DiffValueType.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.d0da43.1: = custom_witness (%DiffValueType.Op), @Copy [concrete] -// CHECK:STDOUT: %facet_value.cca: %facet_type.f48 = facet_value %DiffValueType, (%custom_witness.1bfa2a.1, %custom_witness.d0da43.1) [concrete] +// CHECK:STDOUT: %DiffValueType.Op.type.83af6e.2: type = fn_type @DiffValueType.Op.2 [concrete] +// CHECK:STDOUT: %DiffValueType.Op.4dca31.2: %DiffValueType.Op.type.83af6e.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.d0da43.1: = custom_witness (%DiffValueType.Op.4dca31.2), @Copy [concrete] +// CHECK:STDOUT: %facet_value.873: %facet_type.bd0 = facet_value %DiffValueType, (%custom_witness.5760f4.1, %DestroyImpl.impl_witness.c9a, %custom_witness.d0da43.1) [concrete] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %Iterate_where.type.b96: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.cca> [concrete] -// CHECK:STDOUT: %pattern_type.975: type = pattern_type %Iterate_where.type.b96 [concrete] -// CHECK:STDOUT: %R.patt: %pattern_type.975 = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R: %Iterate_where.type.b96 = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %impl.elem0.4ce: %facet_type.bd0 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %Iterate_where.type.1f9: type = facet_type <@Iterate where %impl.elem0.4ce = %facet_value.873> [concrete] +// CHECK:STDOUT: %pattern_type.2de: type = pattern_type %Iterate_where.type.1f9 [concrete] +// CHECK:STDOUT: %R.patt: %pattern_type.2de = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.1f9 = symbolic_binding R, 0 [symbolic] // CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] -// CHECK:STDOUT: %pattern_type.dc2: type = pattern_type %R.as_type [symbolic] -// CHECK:STDOUT: %r.patt.917: %pattern_type.dc2 = ref_binding_pattern r [symbolic] -// CHECK:STDOUT: %r.param_patt.9a1: %pattern_type.dc2 = var_param_pattern %r.patt.917 [symbolic] +// CHECK:STDOUT: %pattern_type.172: type = pattern_type %R.as_type [symbolic] +// CHECK:STDOUT: %r.patt.ea6: %pattern_type.172 = ref_binding_pattern r [symbolic] +// CHECK:STDOUT: %r.param_patt.528: %pattern_type.172 = var_param_pattern %r.patt.ea6 [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.149 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.d00: = lookup_impl_witness %R, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.f03: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.d00) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.b5e: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.f03) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.931: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.f03) [symbolic] -// CHECK:STDOUT: %.c17: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.b5e, %Iterate.facet.f03 [symbolic] -// CHECK:STDOUT: %impl.elem2.3ea: %.c17 = impl_witness_access %Iterate.lookup_impl_witness.d00, element2 [symbolic] -// CHECK:STDOUT: %impl.elem1.fbc: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.d00, element1 [symbolic] -// CHECK:STDOUT: %as_type.389: type = facet_access_type %impl.elem1.fbc [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b2c: = specific_impl_function %impl.elem2.3ea, @Iterate.WithSelf.NewCursor(%Iterate.facet.f03) [symbolic] -// CHECK:STDOUT: %.c9b: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.931, %Iterate.facet.f03 [symbolic] -// CHECK:STDOUT: %impl.elem3.0ff: %.c9b = impl_witness_access %Iterate.lookup_impl_witness.d00, element3 [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.0d9: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.cca) [concrete] -// CHECK:STDOUT: %OptionalStorage.impl_witness.9ee: = impl_witness imports.%OptionalStorage.impl_witness_table.460, @T.as_type.as.OptionalStorage.impl(%facet_value.cca) [concrete] -// CHECK:STDOUT: %OptionalStorage.facet.9e6: %OptionalStorage.type = facet_value %DiffValueType, (%OptionalStorage.impl_witness.9ee) [concrete] -// CHECK:STDOUT: %Optional.c3f: type = class_type @Optional, @Optional(%OptionalStorage.facet.9e6) [concrete] -// CHECK:STDOUT: %pattern_type.25e: type = pattern_type %Optional.c3f [concrete] -// CHECK:STDOUT: %specific_impl_fn.20b: = specific_impl_function %impl.elem3.0ff, @Iterate.WithSelf.Next(%Iterate.facet.f03) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.f06: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.9e6) [concrete] -// CHECK:STDOUT: %Optional.HasValue.660: %Optional.HasValue.type.f06 = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.acd: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.9e6) [concrete] -// CHECK:STDOUT: %Optional.Get.a06: %Optional.Get.type.acd = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.be4: %Destroy.type = facet_value %DiffValueType, (%custom_witness.1bfa2a.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.a77: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.be4) [concrete] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.b9d: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.8f9: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.b9d) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.0c9: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.8f9) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.84e: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.8f9) [symbolic] +// CHECK:STDOUT: %.3d4: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.0c9, %Iterate.facet.8f9 [symbolic] +// CHECK:STDOUT: %impl.elem2.53f: %.3d4 = impl_witness_access %Iterate.lookup_impl_witness.b9d, element2 [symbolic] +// CHECK:STDOUT: %impl.elem1.782: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.b9d, element1 [symbolic] +// CHECK:STDOUT: %as_type.240: type = facet_access_type %impl.elem1.782 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.b76: = specific_impl_function %impl.elem2.53f, @Iterate.WithSelf.NewCursor(%Iterate.facet.8f9) [symbolic] +// CHECK:STDOUT: %.73c: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.84e, %Iterate.facet.8f9 [symbolic] +// CHECK:STDOUT: %impl.elem3.015: %.73c = impl_witness_access %Iterate.lookup_impl_witness.b9d, element3 [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.7fa: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.873) [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness.f4e: = impl_witness imports.%OptionalStorage.impl_witness_table.1c4, @T.as_type.as.OptionalStorage.impl(%facet_value.873) [concrete] +// CHECK:STDOUT: %OptionalStorage.facet.f87: %OptionalStorage.type = facet_value %DiffValueType, (%OptionalStorage.impl_witness.f4e) [concrete] +// CHECK:STDOUT: %Optional.250: type = class_type @Optional, @Optional(%OptionalStorage.facet.f87) [concrete] +// CHECK:STDOUT: %specific_impl_fn.f44: = specific_impl_function %impl.elem3.015, @Iterate.WithSelf.Next(%Iterate.facet.8f9) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.7a2: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.f87) [concrete] +// CHECK:STDOUT: %Optional.HasValue.0b9: %Optional.HasValue.type.7a2 = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.fa0: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.f87) [concrete] +// CHECK:STDOUT: %Optional.Get.f6a: %Optional.Get.type.fa0 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.facet.91b: %Destroy.type = facet_value %DiffValueType, (%custom_witness.5760f4.1, %DestroyImpl.impl_witness.c9a) [concrete] +// CHECK:STDOUT: %MaybeUnformed.4a6: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.91b) [concrete] // CHECK:STDOUT: %.a18: type = maybe_unformed_type %DiffValueType [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.45d: type = unbound_element_type %DefaultOptionalStorage.0d9, %MaybeUnformed.a77 [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.793: type = unbound_element_type %DefaultOptionalStorage.0d9, bool [concrete] -// CHECK:STDOUT: %struct_type.value.has_value.41d: type = struct_type {.value: %MaybeUnformed.a77, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn.68a: = specific_function %Optional.HasValue.660, @Optional.HasValue(%OptionalStorage.facet.9e6) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn.2e2: = specific_function %Optional.Get.a06, @Optional.Get(%OptionalStorage.facet.9e6) [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.fb7: type = unbound_element_type %DefaultOptionalStorage.7fa, %MaybeUnformed.4a6 [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.54f: type = unbound_element_type %DefaultOptionalStorage.7fa, bool [concrete] +// CHECK:STDOUT: %struct_type.value.has_value.b29: type = struct_type {.value: %MaybeUnformed.4a6, .has_value: bool} [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.366: = specific_function %Optional.HasValue.0b9, @Optional.HasValue(%OptionalStorage.facet.f87) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.29e: = specific_function %Optional.Get.f6a, @Optional.Get(%OptionalStorage.facet.f87) [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.type: type = fn_type @operator_PlusEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk: %operator_PlusEqual__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.98c: type = pattern_type %.a18 [concrete] -// CHECK:STDOUT: %self.param_patt.47c: %pattern_type.98c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.90b: %pattern_type.98c = wrapper_binding_pattern self, %self.param_patt.47c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc44_33.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc44_33.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a71: type = pattern_type %MaybeUnformed.a77 [concrete] -// CHECK:STDOUT: %self.param_patt.4d3: %pattern_type.a71 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.295: %pattern_type.a71 = wrapper_binding_pattern self, %self.param_patt.4d3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc44_33.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc44_33.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc44_33.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc44_33.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc44_33.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc44_33.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.b94: type = pattern_type %struct_type.value.has_value.41d [concrete] -// CHECK:STDOUT: %self.param_patt.717: %pattern_type.b94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2d5: %pattern_type.b94 = wrapper_binding_pattern self, %self.param_patt.717 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc44_33.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc44_33.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.555: type = pattern_type %DefaultOptionalStorage.0d9 [concrete] -// CHECK:STDOUT: %self.param_patt.0b7: %pattern_type.555 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.c81: %pattern_type.555 = wrapper_binding_pattern self, %self.param_patt.0b7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc44_33.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc44_33.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a66: %pattern_type.25e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b7b: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt.a66 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc44_33.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc44_33.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8: type = fn_type @Destroy.WithSelf.SelfDestruct.loc44_33.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.8: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.662: = lookup_impl_witness %impl.elem1.fbc, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.e70: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1.fbc) [symbolic] -// CHECK:STDOUT: %.99c: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.e70, %impl.elem1.fbc [symbolic] -// CHECK:STDOUT: %impl.elem2.ff7: %.99c = impl_witness_access %Destroy.lookup_impl_witness.662, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.ffc: = specific_impl_function %impl.elem2.ff7, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1.fbc) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc44_33.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc44_33.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.80c: %Destroy.type = facet_value bool, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.778) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.1f6: %SubobjectDestroy.type = facet_value %MaybeUnformed.4a6, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6f4: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.1f6) [concrete] +// CHECK:STDOUT: %Destroy.facet.0a4: %Destroy.type = facet_value %MaybeUnformed.4a6, (%custom_witness.b80ef6.3, %DestroyImpl.impl_witness.6f4) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc44_33.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a85: %SubobjectDestroy.type = facet_value %Optional.250, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.dec: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a85) [concrete] +// CHECK:STDOUT: %Destroy.facet.ba0: %Destroy.type = facet_value %Optional.250, (%custom_witness.b80ef6.7, %DestroyImpl.impl_witness.dec) [concrete] // CHECK:STDOUT: %DiffMutableRange: type = class_type @DiffMutableRange [concrete] // CHECK:STDOUT: %pattern_type.611: type = pattern_type %DiffMutableRange [concrete] // CHECK:STDOUT: %DiffConstRange: type = class_type @DiffConstRange [concrete] @@ -1657,47 +1485,42 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %DiffMutableRange.End.type: type = fn_type @DiffMutableRange.End [concrete] // CHECK:STDOUT: %DiffMutableRange.End: %DiffMutableRange.End.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.aa8: = custom_witness (%Iterator.f25, %Sentinel.b4c, %DiffMutableRange.Begin, %DiffMutableRange.End), @CppRangeForIterate [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.9: type = fn_type @Destroy.WithSelf.Op.loc51_16.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.9: %Destroy.WithSelf.Op.type.ef016f.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9: type = fn_type @Destroy.WithSelf.SelfDestruct.loc51_16.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.9: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9 = struct_value () [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.type.45a: type = fn_type @Iterator.SubobjectDestroy.1 [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.d6a: %Iterator.SubobjectDestroy.type.45a = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.db9baa.1: = custom_witness (%Destroy.WithSelf.Op.403171.9, %Iterator.SubobjectDestroy.d6a, %Destroy.WithSelf.SelfDestruct.db3fdb.9), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.41bbea.1: type = fn_type @Iterator.Op.1 [concrete] // CHECK:STDOUT: %Iterator.Op.1caa36.1: %Iterator.Op.type.41bbea.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.392: = custom_witness (%DiffValueType, %Iterator.Op.1caa36.1), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %custom_witness.3815f0.1: = custom_witness (%Iterator.Op.1caa36.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.131: %SubobjectDestroy.type = facet_value %Iterator.f25, (%custom_witness.3815f0.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.03b: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.131) [concrete] // CHECK:STDOUT: %Iterator.Op.type.41bbea.2: type = fn_type @Iterator.Op.2 [concrete] // CHECK:STDOUT: %Iterator.Op.1caa36.2: %Iterator.Op.type.41bbea.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1c9: = custom_witness (%Iterator.Op.1caa36.2), @Inc [concrete] +// CHECK:STDOUT: %custom_witness.392: = custom_witness (%DiffValueType, %Iterator.Op.1caa36.2), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %Iterator.Op.type.41bbea.3: type = fn_type @Iterator.Op.3 [concrete] +// CHECK:STDOUT: %Iterator.Op.1caa36.3: %Iterator.Op.type.41bbea.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.1c9: = custom_witness (%Iterator.Op.1caa36.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type.ca8475.1: type = fn_type @Equal.1 [concrete] // CHECK:STDOUT: %Equal.285b15.1: %Equal.type.ca8475.1 = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type.53d9ee.1: type = fn_type @NotEqual.1 [concrete] // CHECK:STDOUT: %NotEqual.119263.1: %NotEqual.type.53d9ee.1 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.b32: = custom_witness (%Equal.285b15.1, %NotEqual.119263.1), @EqWith, @EqWith(%Sentinel.b4c) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.10: type = fn_type @Destroy.WithSelf.Op.loc51_16.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.10: %Destroy.WithSelf.Op.type.ef016f.10 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10: type = fn_type @Destroy.WithSelf.SelfDestruct.loc51_16.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.10: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10 = struct_value () [concrete] -// CHECK:STDOUT: %Sentinel.SubobjectDestroy.type.45a: type = fn_type @Sentinel.SubobjectDestroy.1 [concrete] -// CHECK:STDOUT: %Sentinel.SubobjectDestroy.d6a: %Sentinel.SubobjectDestroy.type.45a = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.db9baa.2: = custom_witness (%Destroy.WithSelf.Op.403171.10, %Sentinel.SubobjectDestroy.d6a, %Destroy.WithSelf.SelfDestruct.db3fdb.10), @Destroy [concrete] -// CHECK:STDOUT: %facet_value.4bb: %CppRange_where.type.d682d6.1 = facet_value %DiffMutableRange, (%custom_witness.aa8, %custom_witness.db9baa.1, %custom_witness.392, %custom_witness.1c9, %custom_witness.b32, %custom_witness.1bfa2a.1, %custom_witness.d0da43.1, %custom_witness.db9baa.2) [concrete] +// CHECK:STDOUT: %Sentinel.Op.type.41b: type = fn_type @Sentinel.Op.1 [concrete] +// CHECK:STDOUT: %Sentinel.Op.1ca: %Sentinel.Op.type.41b = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.3815f0.2: = custom_witness (%Sentinel.Op.1ca), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d42: %SubobjectDestroy.type = facet_value %Sentinel.b4c, (%custom_witness.3815f0.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.508: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d42) [concrete] +// CHECK:STDOUT: %facet_value.6c7: %CppRange_where.type.d682d6.1 = facet_value %DiffMutableRange, (%custom_witness.aa8, %custom_witness.3815f0.1, %DestroyImpl.impl_witness.03b, %custom_witness.392, %custom_witness.1c9, %custom_witness.b32, %custom_witness.5760f4.1, %DestroyImpl.impl_witness.c9a, %custom_witness.d0da43.1, %custom_witness.3815f0.2, %DestroyImpl.impl_witness.508) [concrete] // CHECK:STDOUT: %tuple.type.b18: type = tuple_type (%Iterator.f25, %Sentinel.b4c) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8: type = fn_type @Destroy.WithSelf.SubobjectDestroy.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.11: type = fn_type @Destroy.WithSelf.Op.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.11: %Destroy.WithSelf.Op.type.ef016f.11 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.11: type = fn_type @Destroy.WithSelf.SelfDestruct.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.11: %Destroy.WithSelf.SelfDestruct.type.fbceb5.11 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.8: = custom_witness (%Destroy.WithSelf.Op.403171.11, %Destroy.WithSelf.SubobjectDestroy.d01daf.8, %Destroy.WithSelf.SelfDestruct.db3fdb.11), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.645: %Destroy.type = facet_value %tuple.type.b18, (%custom_witness.f8f19d.8) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.606: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.4bb) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.899: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.4bb) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.a7b: %T.as_type.as.Iterate.impl.NewCursor.type.899 = struct_value () [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.355: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.4bb) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.8ce: %T.as_type.as.Iterate.impl.Next.type.355 = struct_value () [concrete] -// CHECK:STDOUT: %facet_value.2c1: %Iterate_where.type.b96 = facet_value %DiffMutableRange, (%Iterate.impl_witness.606) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.8: type = fn_type @SubobjectDestroy.WithSelf.Op.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.8: %SubobjectDestroy.WithSelf.Op.type.6870fd.8 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.8: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.8), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d2e: %SubobjectDestroy.type = facet_value %tuple.type.b18, (%custom_witness.b80ef6.8) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c40: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d2e) [concrete] +// CHECK:STDOUT: %complete_type.bfe: = complete_type_witness %tuple.type.b18 [concrete] +// CHECK:STDOUT: %Destroy.facet.4da: %Destroy.type = facet_value %tuple.type.b18, (%custom_witness.b80ef6.8, %DestroyImpl.impl_witness.c40) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.0fb: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.6c7) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8f4: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.6c7) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.573: %T.as_type.as.Iterate.impl.NewCursor.type.8f4 = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.8e9: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.6c7) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.288: %T.as_type.as.Iterate.impl.Next.type.8e9 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.847: %Iterate_where.type.1f9 = facet_value %DiffMutableRange, (%Iterate.impl_witness.0fb) [concrete] // CHECK:STDOUT: %r.patt.5fe: %pattern_type.611 = ref_binding_pattern r [concrete] // CHECK:STDOUT: %r.param_patt.a4b: %pattern_type.611 = var_param_pattern %r.patt.5fe [concrete] // CHECK:STDOUT: %Iterator.a59: type = class_type @Iterator.2 [concrete] @@ -1707,69 +1530,60 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %DiffConstRange.End.type: type = fn_type @DiffConstRange.End [concrete] // CHECK:STDOUT: %DiffConstRange.End: %DiffConstRange.End.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.7b4: = custom_witness (%Iterator.a59, %Sentinel.b33, %DiffConstRange.Begin, %DiffConstRange.End), @CppRangeForIterate [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.13: type = fn_type @Destroy.WithSelf.Op.loc52_16.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.13: %Destroy.WithSelf.Op.type.ef016f.13 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.13: type = fn_type @Destroy.WithSelf.SelfDestruct.loc52_16.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.13: %Destroy.WithSelf.SelfDestruct.type.fbceb5.13 = struct_value () [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.type.e2b: type = fn_type @Iterator.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.21a: %Iterator.SubobjectDestroy.type.e2b = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.48b6e9.1: = custom_witness (%Destroy.WithSelf.Op.403171.13, %Iterator.SubobjectDestroy.21a, %Destroy.WithSelf.SelfDestruct.db3fdb.13), @Destroy [concrete] -// CHECK:STDOUT: %Iterator.Op.type.b7ae80.1: type = fn_type @Iterator.Op.3 [concrete] +// CHECK:STDOUT: %Iterator.Op.type.b7ae80.1: type = fn_type @Iterator.Op.4 [concrete] // CHECK:STDOUT: %Iterator.Op.690fee.1: %Iterator.Op.type.b7ae80.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.0c0: = custom_witness (%DiffValueType, %Iterator.Op.690fee.1), @CppUnsafeDeref [concrete] -// CHECK:STDOUT: %Iterator.Op.type.b7ae80.2: type = fn_type @Iterator.Op.4 [concrete] +// CHECK:STDOUT: %custom_witness.3d0529.1: = custom_witness (%Iterator.Op.690fee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9b7: %SubobjectDestroy.type = facet_value %Iterator.a59, (%custom_witness.3d0529.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.bd5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9b7) [concrete] +// CHECK:STDOUT: %Iterator.Op.type.b7ae80.2: type = fn_type @Iterator.Op.5 [concrete] // CHECK:STDOUT: %Iterator.Op.690fee.2: %Iterator.Op.type.b7ae80.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.ffb: = custom_witness (%Iterator.Op.690fee.2), @Inc [concrete] +// CHECK:STDOUT: %custom_witness.0c0: = custom_witness (%DiffValueType, %Iterator.Op.690fee.2), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %Iterator.Op.type.b7ae80.3: type = fn_type @Iterator.Op.6 [concrete] +// CHECK:STDOUT: %Iterator.Op.690fee.3: %Iterator.Op.type.b7ae80.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.ffb: = custom_witness (%Iterator.Op.690fee.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type.ca8475.2: type = fn_type @Equal.2 [concrete] // CHECK:STDOUT: %Equal.285b15.2: %Equal.type.ca8475.2 = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type.53d9ee.2: type = fn_type @NotEqual.2 [concrete] // CHECK:STDOUT: %NotEqual.119263.2: %NotEqual.type.53d9ee.2 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.fc2: = custom_witness (%Equal.285b15.2, %NotEqual.119263.2), @EqWith, @EqWith(%Sentinel.b33) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.14: type = fn_type @Destroy.WithSelf.Op.loc52_16.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.14: %Destroy.WithSelf.Op.type.ef016f.14 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.14: type = fn_type @Destroy.WithSelf.SelfDestruct.loc52_16.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.14: %Destroy.WithSelf.SelfDestruct.type.fbceb5.14 = struct_value () [concrete] -// CHECK:STDOUT: %Sentinel.SubobjectDestroy.type.e2b: type = fn_type @Sentinel.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Sentinel.SubobjectDestroy.21a: %Sentinel.SubobjectDestroy.type.e2b = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.48b6e9.2: = custom_witness (%Destroy.WithSelf.Op.403171.14, %Sentinel.SubobjectDestroy.21a, %Destroy.WithSelf.SelfDestruct.db3fdb.14), @Destroy [concrete] -// CHECK:STDOUT: %facet_value.683: %CppRange_where.type.d682d6.1 = facet_value %DiffConstRange, (%custom_witness.7b4, %custom_witness.48b6e9.1, %custom_witness.0c0, %custom_witness.ffb, %custom_witness.fc2, %custom_witness.1bfa2a.1, %custom_witness.d0da43.1, %custom_witness.48b6e9.2) [concrete] +// CHECK:STDOUT: %Sentinel.Op.type.b7a: type = fn_type @Sentinel.Op.2 [concrete] +// CHECK:STDOUT: %Sentinel.Op.690: %Sentinel.Op.type.b7a = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.3d0529.2: = custom_witness (%Sentinel.Op.690), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b86: %SubobjectDestroy.type = facet_value %Sentinel.b33, (%custom_witness.3d0529.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.780: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b86) [concrete] +// CHECK:STDOUT: %facet_value.047: %CppRange_where.type.d682d6.1 = facet_value %DiffConstRange, (%custom_witness.7b4, %custom_witness.3d0529.1, %DestroyImpl.impl_witness.bd5, %custom_witness.0c0, %custom_witness.ffb, %custom_witness.fc2, %custom_witness.5760f4.1, %DestroyImpl.impl_witness.c9a, %custom_witness.d0da43.1, %custom_witness.3d0529.2, %DestroyImpl.impl_witness.780) [concrete] // CHECK:STDOUT: %tuple.type.df5: type = tuple_type (%Iterator.a59, %Sentinel.b33) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9: type = fn_type @Destroy.WithSelf.SubobjectDestroy.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.9: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.15: type = fn_type @Destroy.WithSelf.Op.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.15: %Destroy.WithSelf.Op.type.ef016f.15 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.15: type = fn_type @Destroy.WithSelf.SelfDestruct.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.15: %Destroy.WithSelf.SelfDestruct.type.fbceb5.15 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.9: = custom_witness (%Destroy.WithSelf.Op.403171.15, %Destroy.WithSelf.SubobjectDestroy.d01daf.9, %Destroy.WithSelf.SelfDestruct.db3fdb.15), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.206: %Destroy.type = facet_value %tuple.type.df5, (%custom_witness.f8f19d.9) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.9b4: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.683) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.4f6: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.683) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.3cd: %T.as_type.as.Iterate.impl.NewCursor.type.4f6 = struct_value () [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.885: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.683) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.d18: %T.as_type.as.Iterate.impl.Next.type.885 = struct_value () [concrete] -// CHECK:STDOUT: %facet_value.1fc: %Iterate_where.type.b96 = facet_value %DiffConstRange, (%Iterate.impl_witness.9b4) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.9: type = fn_type @SubobjectDestroy.WithSelf.Op.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.9: %SubobjectDestroy.WithSelf.Op.type.6870fd.9 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.9: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.9), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.79d: %SubobjectDestroy.type = facet_value %tuple.type.df5, (%custom_witness.b80ef6.9) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.8c3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.79d) [concrete] +// CHECK:STDOUT: %complete_type.ad6: = complete_type_witness %tuple.type.df5 [concrete] +// CHECK:STDOUT: %Destroy.facet.017: %Destroy.type = facet_value %tuple.type.df5, (%custom_witness.b80ef6.9, %DestroyImpl.impl_witness.8c3) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.0fc: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.047) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.284: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.047) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.c96: %T.as_type.as.Iterate.impl.NewCursor.type.284 = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.5e4: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.047) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.264: %T.as_type.as.Iterate.impl.Next.type.5e4 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.76f: %Iterate_where.type.1f9 = facet_value %DiffConstRange, (%Iterate.impl_witness.0fc) [concrete] // CHECK:STDOUT: %r.patt.9c0: %pattern_type.7dd = ref_binding_pattern r [concrete] // CHECK:STDOUT: %r.param_patt.992: %pattern_type.7dd = var_param_pattern %r.patt.9c0 [concrete] -// CHECK:STDOUT: %Iterate.facet.758: %Iterate.type = facet_value %DiffMutableRange, (%Iterate.impl_witness.606) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.49d: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.758) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.1f8: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.758) [concrete] -// CHECK:STDOUT: %.c05: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.49d, %Iterate.facet.758 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.1d2: = specific_function %T.as_type.as.Iterate.impl.NewCursor.a7b, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.4bb) [concrete] -// CHECK:STDOUT: %.22d: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.1f8, %Iterate.facet.758 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.288: = specific_function %T.as_type.as.Iterate.impl.Next.8ce, @T.as_type.as.Iterate.impl.Next(%facet_value.4bb) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.baf: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.645) [concrete] -// CHECK:STDOUT: %.085: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.baf, %Destroy.facet.645 [concrete] -// CHECK:STDOUT: %Iterate.facet.930: %Iterate.type = facet_value %DiffConstRange, (%Iterate.impl_witness.9b4) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.4f6: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.930) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.95d: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.930) [concrete] -// CHECK:STDOUT: %.b0d: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.4f6, %Iterate.facet.930 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.104: = specific_function %T.as_type.as.Iterate.impl.NewCursor.3cd, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.683) [concrete] -// CHECK:STDOUT: %.d85: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.95d, %Iterate.facet.930 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.8ee: = specific_function %T.as_type.as.Iterate.impl.Next.d18, @T.as_type.as.Iterate.impl.Next(%facet_value.683) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.ee6: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.206) [concrete] -// CHECK:STDOUT: %.c1e: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.ee6, %Destroy.facet.206 [concrete] -// CHECK:STDOUT: %complete_type.bfe: = complete_type_witness %tuple.type.b18 [concrete] -// CHECK:STDOUT: %complete_type.ad6: = complete_type_witness %tuple.type.df5 [concrete] +// CHECK:STDOUT: %Iterate.facet.012: %Iterate.type = facet_value %DiffMutableRange, (%Iterate.impl_witness.0fb) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.ff0: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.012) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.8fc: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.012) [concrete] +// CHECK:STDOUT: %.6cf1: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.ff0, %Iterate.facet.012 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.c3b: = specific_function %T.as_type.as.Iterate.impl.NewCursor.573, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.6c7) [concrete] +// CHECK:STDOUT: %.d8c: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.8fc, %Iterate.facet.012 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.fb4: = specific_function %T.as_type.as.Iterate.impl.Next.288, @T.as_type.as.Iterate.impl.Next(%facet_value.6c7) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.9e00: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.4da) [concrete] +// CHECK:STDOUT: %Iterate.facet.151: %Iterate.type = facet_value %DiffConstRange, (%Iterate.impl_witness.0fc) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.cf5: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.151) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.e49: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.151) [concrete] +// CHECK:STDOUT: %.776: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.cf5, %Iterate.facet.151 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn.ba8: = specific_function %T.as_type.as.Iterate.impl.NewCursor.c96, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.047) [concrete] +// CHECK:STDOUT: %.ee1: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.e49, %Iterate.facet.151 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn.3dc: = specific_function %T.as_type.as.Iterate.impl.Next.264, @T.as_type.as.Iterate.impl.Next(%facet_value.047) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.825: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.017) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1779,144 +1593,55 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: .DiffConstRange = %DiffConstRange.decl // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.02f: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.ade)] -// CHECK:STDOUT: %Core.import_ref.406: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.925) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.f42)] -// CHECK:STDOUT: %Core.import_ref.d4a: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.760) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.268)] -// CHECK:STDOUT: %Core.import_ref.9a4: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.d28) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.f29)] -// CHECK:STDOUT: %Core.import_ref.6e3: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.2f2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.884)] -// CHECK:STDOUT: %Core.import_ref.af7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.460 = impl_witness_table (%Core.import_ref.02f, %Core.import_ref.406, %Core.import_ref.d4a, %Core.import_ref.9a4, %Core.import_ref.6e3, %Core.import_ref.af7), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.51c9: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.498] -// CHECK:STDOUT: %Core.import_ref.b03: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.390] +// CHECK:STDOUT: %Core.import_ref.481: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.476)] +// CHECK:STDOUT: %Core.import_ref.66d: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.b57) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.791)] +// CHECK:STDOUT: %Core.import_ref.32c: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.292) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.ae9)] +// CHECK:STDOUT: %Core.import_ref.801: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.18e) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.463)] +// CHECK:STDOUT: %Core.import_ref.eec: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.f27) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.e40)] +// CHECK:STDOUT: %Core.import_ref.a6a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.1c4 = impl_witness_table (%Core.import_ref.481, %Core.import_ref.66d, %Core.import_ref.32c, %Core.import_ref.801, %Core.import_ref.eec, %Core.import_ref.a6a), @T.as_type.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.e86: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.bce] +// CHECK:STDOUT: %Core.import_ref.9ce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.dbe] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.c82: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.3ea) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.f2f)] // CHECK:STDOUT: %Core.import_ref.29e: @Optional.%Optional.Get.type (%Optional.Get.type.786) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.2d0)] -// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] -// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.724: %facet_type.bd0 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.189)] +// CHECK:STDOUT: %Core.import_ref.dd9: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9b6)] // CHECK:STDOUT: %Core.import_ref.946: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.8fb) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.8a1)] // CHECK:STDOUT: %Core.import_ref.cfb: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.d4a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.5a8)] -// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.724, %Core.import_ref.dd9, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %DiffValueType.decl: type = class_decl @DiffValueType [concrete = constants.%DiffValueType] {} {} // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.decl: %operator_PlusEqual__carbon_thunk.type = fn_decl @operator_PlusEqual__carbon_thunk [concrete = constants.%operator_PlusEqual__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.b0d0 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.390: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = field_decl has_value, element1, %Core.import_ref.b0d0 in [concrete] {} -// CHECK:STDOUT: %Core.import_ref.ab7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.498: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = field_decl value, element0, %Core.import_ref.ab7 in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.dbe: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = field_decl has_value, element1, %Core.import_ref.b0d in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.45d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.bce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = field_decl value, element0, %Core.import_ref.45d in [concrete] {} // CHECK:STDOUT: %DiffMutableRange.decl: type = class_decl @DiffMutableRange [concrete = constants.%DiffMutableRange] {} {} // CHECK:STDOUT: %DiffConstRange.decl: type = class_decl @DiffConstRange [concrete = constants.%DiffConstRange] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc44_33.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98c = ref_param_pattern [concrete = constants.%self.param_patt.47c] -// CHECK:STDOUT: %self.patt: %pattern_type.98c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.90b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.a18 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.a18 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc44_33.1 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98c = ref_param_pattern [concrete = constants.%self.param_patt.47c] -// CHECK:STDOUT: %self.patt: %pattern_type.98c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.90b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.a18 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.a18 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc44_33.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a71 = ref_param_pattern [concrete = constants.%self.param_patt.4d3] -// CHECK:STDOUT: %self.patt: %pattern_type.a71 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.295] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.a77 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.a77 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc44_33.2 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a71 = ref_param_pattern [concrete = constants.%self.param_patt.4d3] -// CHECK:STDOUT: %self.patt: %pattern_type.a71 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.295] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.a77 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.a77 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc44_33.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc44_33.3 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc44_33.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b94 = ref_param_pattern [concrete = constants.%self.param_patt.717] -// CHECK:STDOUT: %self.patt: %pattern_type.b94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2d5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.41d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.41d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc44_33.4 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b94 = ref_param_pattern [concrete = constants.%self.param_patt.717] -// CHECK:STDOUT: %self.patt: %pattern_type.b94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2d5] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.41d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.41d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc44_33.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.555 = ref_param_pattern [concrete = constants.%self.param_patt.0b7] -// CHECK:STDOUT: %self.patt: %pattern_type.555 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c81] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.0d9 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.0d9 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc44_33.5 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.555 = ref_param_pattern [concrete = constants.%self.param_patt.0b7] -// CHECK:STDOUT: %self.patt: %pattern_type.555 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.c81] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.0d9 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.0d9 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc44_33.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.a66] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b7b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.c3f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.c3f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.8 = fn_decl @Destroy.WithSelf.Op.loc44_33.6 [concrete = constants.%Destroy.WithSelf.Op.403171.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.25e = ref_param_pattern [concrete = constants.%self.param_patt.a66] -// CHECK:STDOUT: %self.patt: %pattern_type.25e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b7b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.c3f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.c3f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TestIterate(%R.loc40_17.2: %Iterate_where.type.b96) { +// CHECK:STDOUT: generic fn @TestIterate(%R.loc40_17.2: %Iterate_where.type.1f9) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc40_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.d00)] -// CHECK:STDOUT: %Iterate.facet.loc44_33.5: %Iterate.type = facet_value %R.as_type.loc40_79.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.f03)] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc44_33.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.b5e)] -// CHECK:STDOUT: %.loc44_33.20: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc44_33.5 [symbolic = %.loc44_33.20 (constants.%.c17)] -// CHECK:STDOUT: %impl.elem2.loc44_33.3: @TestIterate.%.loc44_33.20 (%.c17) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc44_33.3 (constants.%impl.elem2.3ea)] -// CHECK:STDOUT: %specific_impl_fn.loc44_33.4: = specific_impl_function %impl.elem2.loc44_33.3, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc44_33.5) [symbolic = %specific_impl_fn.loc44_33.4 (constants.%specific_impl_fn.b2c)] +// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc40_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.b9d)] +// CHECK:STDOUT: %Iterate.facet.loc44_33.5: %Iterate.type = facet_value %R.as_type.loc40_79.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.8f9)] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc44_33.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.0c9)] +// CHECK:STDOUT: %.loc44_33.26: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc44_33.5 [symbolic = %.loc44_33.26 (constants.%.3d4)] +// CHECK:STDOUT: %impl.elem2.loc44_33.2: @TestIterate.%.loc44_33.26 (%.3d4) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc44_33.2 (constants.%impl.elem2.53f)] +// CHECK:STDOUT: %specific_impl_fn.loc44_33.3: = specific_impl_function %impl.elem2.loc44_33.2, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc44_33.5) [symbolic = %specific_impl_fn.loc44_33.3 (constants.%specific_impl_fn.b76)] +// CHECK:STDOUT: +// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc44_33.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.84e)] +// CHECK:STDOUT: %.loc44_33.27: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc44_33.5 [symbolic = %.loc44_33.27 (constants.%.73c)] +// CHECK:STDOUT: %impl.elem3.loc44_33.2: @TestIterate.%.loc44_33.27 (%.73c) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc44_33.2 (constants.%impl.elem3.015)] +// CHECK:STDOUT: %specific_impl_fn.loc44_33.4: = specific_impl_function %impl.elem3.loc44_33.2, @Iterate.WithSelf.Next(%Iterate.facet.loc44_33.5) [symbolic = %specific_impl_fn.loc44_33.4 (constants.%specific_impl_fn.f44)] // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc44_33.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.931)] -// CHECK:STDOUT: %.loc44_33.21: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc44_33.5 [symbolic = %.loc44_33.21 (constants.%.c9b)] -// CHECK:STDOUT: %impl.elem3.loc44_33.2: @TestIterate.%.loc44_33.21 (%.c9b) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc44_33.2 (constants.%impl.elem3.0ff)] -// CHECK:STDOUT: %specific_impl_fn.loc44_33.5: = specific_impl_function %impl.elem3.loc44_33.2, @Iterate.WithSelf.Next(%Iterate.facet.loc44_33.5) [symbolic = %specific_impl_fn.loc44_33.5 (constants.%specific_impl_fn.20b)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.e70)] -// CHECK:STDOUT: %.loc44_33.22: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %impl.elem1 [symbolic = %.loc44_33.22 (constants.%.99c)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.662)] -// CHECK:STDOUT: %impl.elem2.loc44_33.4: @TestIterate.%.loc44_33.22 (%.99c) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc44_33.4 (constants.%impl.elem2.ff7)] -// CHECK:STDOUT: %specific_impl_fn.loc44_33.6: = specific_impl_function %impl.elem2.loc44_33.4, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1) [symbolic = %specific_impl_fn.loc44_33.6 (constants.%specific_impl_fn.ffc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%r.param: ref @TestIterate.%R.as_type.loc40_79.1 (%R.as_type)) { // CHECK:STDOUT: !entry: @@ -1925,54 +1650,54 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.149 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %r.ref: ref @TestIterate.%R.as_type.loc40_79.1 (%R.as_type) = name_ref r, %r -// CHECK:STDOUT: %impl.elem2.loc44_33.1: @TestIterate.%.loc44_33.20 (%.c17) = impl_witness_access constants.%Iterate.lookup_impl_witness.d00, element2 [symbolic = %impl.elem2.loc44_33.3 (constants.%impl.elem2.3ea)] +// CHECK:STDOUT: %impl.elem2.loc44_33.1: @TestIterate.%.loc44_33.26 (%.3d4) = impl_witness_access constants.%Iterate.lookup_impl_witness.b9d, element2 [symbolic = %impl.elem2.loc44_33.2 (constants.%impl.elem2.53f)] // CHECK:STDOUT: %bound_method.loc44_33.1: = bound_method %r.ref, %impl.elem2.loc44_33.1 -// CHECK:STDOUT: %Iterate.facet.loc44_33.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.d00) [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.f03)] -// CHECK:STDOUT: %.loc44_33.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_33.1 [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.f03)] -// CHECK:STDOUT: %Iterate.facet.loc44_33.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.d00) [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.f03)] -// CHECK:STDOUT: %.loc44_33.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_33.2 [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.f03)] -// CHECK:STDOUT: %specific_impl_fn.loc44_33.1: = specific_impl_function %impl.elem2.loc44_33.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.f03) [symbolic = %specific_impl_fn.loc44_33.4 (constants.%specific_impl_fn.b2c)] +// CHECK:STDOUT: %Iterate.facet.loc44_33.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.b9d) [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.8f9)] +// CHECK:STDOUT: %.loc44_33.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_33.1 [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.8f9)] +// CHECK:STDOUT: %Iterate.facet.loc44_33.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.b9d) [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.8f9)] +// CHECK:STDOUT: %.loc44_33.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_33.2 [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.8f9)] +// CHECK:STDOUT: %specific_impl_fn.loc44_33.1: = specific_impl_function %impl.elem2.loc44_33.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.8f9) [symbolic = %specific_impl_fn.loc44_33.3 (constants.%specific_impl_fn.b76)] // CHECK:STDOUT: %bound_method.loc44_33.2: = bound_method %r.ref, %specific_impl_fn.loc44_33.1 -// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.389) = var_storage invalid +// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.240) = var_storage invalid // CHECK:STDOUT: %.loc44_32.1: @TestIterate.%R.as_type.loc40_79.1 (%R.as_type) = acquire_value %r.ref -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.389) to %var = call %bound_method.loc44_33.2(%.loc44_32.1) +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.240) to %var = call %bound_method.loc44_33.2(%.loc44_32.1) // CHECK:STDOUT: assign %var, %Iterate.WithSelf.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3.loc44_33.1: @TestIterate.%.loc44_33.21 (%.c9b) = impl_witness_access constants.%Iterate.lookup_impl_witness.d00, element3 [symbolic = %impl.elem3.loc44_33.2 (constants.%impl.elem3.0ff)] +// CHECK:STDOUT: %impl.elem3.loc44_33.1: @TestIterate.%.loc44_33.27 (%.73c) = impl_witness_access constants.%Iterate.lookup_impl_witness.b9d, element3 [symbolic = %impl.elem3.loc44_33.2 (constants.%impl.elem3.015)] // CHECK:STDOUT: %bound_method.loc44_33.3: = bound_method %r.ref, %impl.elem3.loc44_33.1 -// CHECK:STDOUT: %Iterate.facet.loc44_33.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.d00) [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.f03)] -// CHECK:STDOUT: %.loc44_33.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_33.3 [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.f03)] -// CHECK:STDOUT: %Iterate.facet.loc44_33.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.d00) [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.f03)] -// CHECK:STDOUT: %.loc44_33.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_33.4 [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.f03)] -// CHECK:STDOUT: %.loc44_33.5: %Destroy.type = converted constants.%as_type.389, constants.%impl.elem1.fbc [symbolic = %impl.elem1 (constants.%impl.elem1.fbc)] -// CHECK:STDOUT: %.loc44_33.6: %Destroy.type = converted constants.%as_type.389, constants.%impl.elem1.fbc [symbolic = %impl.elem1 (constants.%impl.elem1.fbc)] -// CHECK:STDOUT: %specific_impl_fn.loc44_33.2: = specific_impl_function %impl.elem3.loc44_33.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.f03) [symbolic = %specific_impl_fn.loc44_33.5 (constants.%specific_impl_fn.20b)] +// CHECK:STDOUT: %Iterate.facet.loc44_33.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.b9d) [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.8f9)] +// CHECK:STDOUT: %.loc44_33.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_33.3 [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.8f9)] +// CHECK:STDOUT: %Iterate.facet.loc44_33.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.b9d) [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.8f9)] +// CHECK:STDOUT: %.loc44_33.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc44_33.4 [symbolic = %Iterate.facet.loc44_33.5 (constants.%Iterate.facet.8f9)] +// CHECK:STDOUT: %.loc44_33.5: %Destroy.type = converted constants.%as_type.240, constants.%impl.elem1.782 [symbolic = %impl.elem1 (constants.%impl.elem1.782)] +// CHECK:STDOUT: %.loc44_33.6: %Destroy.type = converted constants.%as_type.240, constants.%impl.elem1.782 [symbolic = %impl.elem1 (constants.%impl.elem1.782)] +// CHECK:STDOUT: %specific_impl_fn.loc44_33.2: = specific_impl_function %impl.elem3.loc44_33.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.8f9) [symbolic = %specific_impl_fn.loc44_33.4 (constants.%specific_impl_fn.f44)] // CHECK:STDOUT: %bound_method.loc44_33.4: = bound_method %r.ref, %specific_impl_fn.loc44_33.2 -// CHECK:STDOUT: %.loc44_33.7: ref %Optional.c3f = temporary_storage +// CHECK:STDOUT: %.loc44_33.7: ref %Optional.250 = temporary_storage // CHECK:STDOUT: %.loc44_32.2: @TestIterate.%R.as_type.loc40_79.1 (%R.as_type) = acquire_value %r.ref -// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.c3f to %.loc44_33.7 = call %bound_method.loc44_33.4(%.loc44_32.2, %var) -// CHECK:STDOUT: %.loc44_33.8: ref %Optional.c3f = temporary %.loc44_33.7, %Iterate.WithSelf.Next.call -// CHECK:STDOUT: %.loc44_33.9: %Optional.HasValue.type.f06 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.HasValue.660] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.f06 = name_ref HasValue, %.loc44_33.9 [concrete = constants.%Optional.HasValue.660] +// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.250 to %.loc44_33.7 = call %bound_method.loc44_33.4(%.loc44_32.2, %var) +// CHECK:STDOUT: %.loc44_33.8: ref %Optional.250 = temporary %.loc44_33.7, %Iterate.WithSelf.Next.call +// CHECK:STDOUT: %.loc44_33.9: %Optional.HasValue.type.7a2 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.HasValue.0b9] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.7a2 = name_ref HasValue, %.loc44_33.9 [concrete = constants.%Optional.HasValue.0b9] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc44_33.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.HasValue.specific_fn.68a] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.HasValue.specific_fn.366] // CHECK:STDOUT: %bound_method.loc44_33.5: = bound_method %.loc44_33.8, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc44_33.10: %Optional.c3f = acquire_value %.loc44_33.8 +// CHECK:STDOUT: %.loc44_33.10: %Optional.250 = acquire_value %.loc44_33.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc44_33.5(%.loc44_33.10) // CHECK:STDOUT: %.loc44_33.11: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc44_33.12: bool = converted %Optional.HasValue.call, %.loc44_33.11 // CHECK:STDOUT: if %.loc44_33.12 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc44_33.13: %Optional.Get.type.acd = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.Get.a06] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.acd = name_ref Get, %.loc44_33.13 [concrete = constants.%Optional.Get.a06] +// CHECK:STDOUT: %.loc44_33.13: %Optional.Get.type.fa0 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.Get.f6a] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.fa0 = name_ref Get, %.loc44_33.13 [concrete = constants.%Optional.Get.f6a] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc44_33.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.Get.specific_fn.2e2] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.Get.specific_fn.29e] // CHECK:STDOUT: %bound_method.loc44_33.6: = bound_method %.loc44_33.8, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc44_33.14: ref %DiffValueType = temporary_storage -// CHECK:STDOUT: %.loc44_33.15: %Optional.c3f = acquire_value %.loc44_33.8 +// CHECK:STDOUT: %.loc44_33.15: %Optional.250 = acquire_value %.loc44_33.8 // CHECK:STDOUT: %Optional.Get.call: init %DiffValueType to %.loc44_33.14 = call %bound_method.loc44_33.6(%.loc44_33.15) // CHECK:STDOUT: %.loc44_33.16: ref %DiffValueType = temporary %.loc44_33.14, %Optional.Get.call // CHECK:STDOUT: %.loc44_33.17: %DiffValueType = acquire_value %.loc44_33.16 @@ -1988,114 +1713,85 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc45_9.1: %ptr.816 = as_compatible %addr.loc45 // CHECK:STDOUT: %.loc45_9.2: %ptr.816 = converted %addr.loc45, %.loc45_9.1 // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.call: ref %DiffValueType = call imports.%operator_PlusEqual__carbon_thunk.decl(%sum.ref, %.loc45_9.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc44_33.1: = bound_method %.loc44_33.16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc44_33.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc44_33.1(%.loc44_33.16) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc44_33.2: = bound_method %.loc44_33.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc44_33.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc44_33.2(%.loc44_33.8) +// CHECK:STDOUT: %Destroy.facet.loc44_33.1: %Destroy.type = facet_value constants.%DiffValueType, (constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a) [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: %.loc44_33.18: %Destroy.type = converted constants.%DiffValueType, %Destroy.facet.loc44_33.1 [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: %Destroy.facet.loc44_33.2: %Destroy.type = facet_value constants.%DiffValueType, (constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a) [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: %.loc44_33.19: %Destroy.type = converted constants.%DiffValueType, %Destroy.facet.loc44_33.2 [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc44_33.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc44_33.16) +// CHECK:STDOUT: %Destroy.facet.loc44_33.3: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc44_33.20: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc44_33.3 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %Destroy.facet.loc44_33.4: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc44_33.21: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc44_33.4 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc44_33.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc44_33.8) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc44_33.3: = bound_method %.loc44_33.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc44_33.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc44_33.3(%.loc44_33.8) -// CHECK:STDOUT: %impl.elem2.loc44_33.2: @TestIterate.%.loc44_33.22 (%.99c) = impl_witness_access constants.%Destroy.lookup_impl_witness.662, element2 [symbolic = %impl.elem2.loc44_33.4 (constants.%impl.elem2.ff7)] -// CHECK:STDOUT: %bound_method.loc44_33.7: = bound_method %var, %impl.elem2.loc44_33.2 -// CHECK:STDOUT: %.loc44_33.18: %Destroy.type = converted constants.%as_type.389, constants.%impl.elem1.fbc [symbolic = %impl.elem1 (constants.%impl.elem1.fbc)] -// CHECK:STDOUT: %.loc44_33.19: %Destroy.type = converted constants.%as_type.389, constants.%impl.elem1.fbc [symbolic = %impl.elem1 (constants.%impl.elem1.fbc)] -// CHECK:STDOUT: %specific_impl_fn.loc44_33.3: = specific_impl_function %impl.elem2.loc44_33.2, @Destroy.WithSelf.SelfDestruct.1(constants.%impl.elem1.fbc) [symbolic = %specific_impl_fn.loc44_33.6 (constants.%specific_impl_fn.ffc)] -// CHECK:STDOUT: %bound_method.loc44_33.8: = bound_method %var, %specific_impl_fn.loc44_33.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc44_33.4: init %empty_tuple.type = call %bound_method.loc44_33.8(%var) +// CHECK:STDOUT: %Destroy.facet.loc44_33.5: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc44_33.22: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc44_33.5 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %Destroy.facet.loc44_33.6: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc44_33.23: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc44_33.6 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc44_33.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc44_33.8) +// CHECK:STDOUT: %.loc44_33.24: %Destroy.type = converted constants.%as_type.240, constants.%impl.elem1.782 [symbolic = %impl.elem1 (constants.%impl.elem1.782)] +// CHECK:STDOUT: %.loc44_33.25: %Destroy.type = converted constants.%as_type.240, constants.%impl.elem1.782 [symbolic = %impl.elem1 (constants.%impl.elem1.782)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc44_33.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc44_33.1(%self.param: ref %.a18) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc44_33.1(%self.param: ref %.a18) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc44_33.1(%self.param: ref %.a18) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc44_33.2(%self.param: ref %MaybeUnformed.4a6) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc44_33.1(%self.param: ref %.a18) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc44_33.3(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc44_33.2(%self.param: ref %MaybeUnformed.a77) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc44_33.2(%self.param: ref %MaybeUnformed.a77) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc44_33.2(%self.param: ref %MaybeUnformed.a77) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc44_33.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc44_33.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc44_33.3(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc44_33.4(%self.param: ref %struct_type.value.has_value.41d) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc44_33.4(%self.param: ref %struct_type.value.has_value.b29) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc44_33.1: ref bool = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc44_33.1: = bound_method %.loc44_33.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc44_33.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc44_33.1(%.loc44_33.1) -// CHECK:STDOUT: %.loc44_33.2: ref %MaybeUnformed.a77 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc44_33.2: = bound_method %.loc44_33.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc44_33.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc44_33.2(%.loc44_33.2) +// CHECK:STDOUT: %Destroy.facet.loc44_33.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc44_33.2: %Destroy.type = converted bool, %Destroy.facet.loc44_33.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc44_33.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc44_33.3: %Destroy.type = converted bool, %Destroy.facet.loc44_33.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc44_33.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc44_33.1) +// CHECK:STDOUT: %.loc44_33.4: ref %MaybeUnformed.4a6 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc44_33.3: %Destroy.type = facet_value constants.%MaybeUnformed.4a6, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.6f4) [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: %.loc44_33.5: %Destroy.type = converted constants.%MaybeUnformed.4a6, %Destroy.facet.loc44_33.3 [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: %Destroy.facet.loc44_33.4: %Destroy.type = facet_value constants.%MaybeUnformed.4a6, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.6f4) [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: %.loc44_33.6: %Destroy.type = converted constants.%MaybeUnformed.4a6, %Destroy.facet.loc44_33.4 [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc44_33.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc44_33.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc44_33.4(%self.param: ref %struct_type.value.has_value.41d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc44_33.4(%self.param: ref %struct_type.value.has_value.41d) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc44_33.5(%self.param: ref %DefaultOptionalStorage.7fa) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc44_33.5(%self.param: ref %DefaultOptionalStorage.0d9) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.793 = name_ref has_value, imports.%Core.import_ref.b03 [concrete = imports.%field_decl.390] +// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.54f = name_ref has_value, imports.%Core.import_ref.9ce [concrete = imports.%field_decl.dbe] // CHECK:STDOUT: %.loc44_33.1: ref bool = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc44_33.1: = bound_method %.loc44_33.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc44_33.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc44_33.1(%.loc44_33.1) -// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.45d = name_ref value, imports.%Core.import_ref.51c9 [concrete = imports.%field_decl.498] -// CHECK:STDOUT: %.loc44_33.2: ref %MaybeUnformed.a77 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc44_33.2: = bound_method %.loc44_33.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc44_33.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc44_33.2(%.loc44_33.2) +// CHECK:STDOUT: %Destroy.facet.loc44_33.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc44_33.2: %Destroy.type = converted bool, %Destroy.facet.loc44_33.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc44_33.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc44_33.3: %Destroy.type = converted bool, %Destroy.facet.loc44_33.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc44_33.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc44_33.1) +// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.fb7 = name_ref value, imports.%Core.import_ref.e86 [concrete = imports.%field_decl.bce] +// CHECK:STDOUT: %.loc44_33.4: ref %MaybeUnformed.4a6 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc44_33.3: %Destroy.type = facet_value constants.%MaybeUnformed.4a6, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.6f4) [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: %.loc44_33.5: %Destroy.type = converted constants.%MaybeUnformed.4a6, %Destroy.facet.loc44_33.3 [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: %Destroy.facet.loc44_33.4: %Destroy.type = facet_value constants.%MaybeUnformed.4a6, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.6f4) [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: %.loc44_33.6: %Destroy.type = converted constants.%MaybeUnformed.4a6, %Destroy.facet.loc44_33.4 [concrete = constants.%Destroy.facet.0a4] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc44_33.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc44_33.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc44_33.5(%self.param: ref %DefaultOptionalStorage.0d9) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc44_33.5(%self.param: ref %DefaultOptionalStorage.0d9) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc44_33.6(%self.param: ref %Optional.c3f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc44_33.6(%self.param: ref %Optional.c3f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc44_33.6(%self.param: ref %Optional.c3f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc44_33.6(%self.param: ref %Optional.250) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TestRangeFor(%m.param: ref %DiffMutableRange, %c.param: %DiffConstRange) { // CHECK:STDOUT: !entry: @@ -2104,13 +1800,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt.loc59: %pattern_type.149 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %m.ref: ref %DiffMutableRange = name_ref m, %m -// CHECK:STDOUT: %impl.elem2.loc59: %.c05 = impl_witness_access constants.%Iterate.impl_witness.606, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.a7b] +// CHECK:STDOUT: %impl.elem2.loc59: %.6cf1 = impl_witness_access constants.%Iterate.impl_witness.0fb, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.573] // CHECK:STDOUT: %bound_method.loc59_33.1: = bound_method %m.ref, %impl.elem2.loc59 -// CHECK:STDOUT: %facet_value.loc59_33.1: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffMutableRange, (constants.%custom_witness.aa8, constants.%custom_witness.db9baa.1, constants.%custom_witness.392, constants.%custom_witness.1c9, constants.%custom_witness.b32, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.db9baa.2) [concrete = constants.%facet_value.4bb] -// CHECK:STDOUT: %.loc59_33.1: %CppRange_where.type.d682d6.1 = converted constants.%DiffMutableRange, %facet_value.loc59_33.1 [concrete = constants.%facet_value.4bb] -// CHECK:STDOUT: %facet_value.loc59_33.2: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffMutableRange, (constants.%custom_witness.aa8, constants.%custom_witness.db9baa.1, constants.%custom_witness.392, constants.%custom_witness.1c9, constants.%custom_witness.b32, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.db9baa.2) [concrete = constants.%facet_value.4bb] -// CHECK:STDOUT: %.loc59_33.2: %CppRange_where.type.d682d6.1 = converted constants.%DiffMutableRange, %facet_value.loc59_33.2 [concrete = constants.%facet_value.4bb] -// CHECK:STDOUT: %specific_fn.loc59_33.1: = specific_function %impl.elem2.loc59, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.4bb) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.1d2] +// CHECK:STDOUT: %facet_value.loc59_33.1: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffMutableRange, (constants.%custom_witness.aa8, constants.%custom_witness.3815f0.1, constants.%DestroyImpl.impl_witness.03b, constants.%custom_witness.392, constants.%custom_witness.1c9, constants.%custom_witness.b32, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a, constants.%custom_witness.d0da43.1, constants.%custom_witness.3815f0.2, constants.%DestroyImpl.impl_witness.508) [concrete = constants.%facet_value.6c7] +// CHECK:STDOUT: %.loc59_33.1: %CppRange_where.type.d682d6.1 = converted constants.%DiffMutableRange, %facet_value.loc59_33.1 [concrete = constants.%facet_value.6c7] +// CHECK:STDOUT: %facet_value.loc59_33.2: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffMutableRange, (constants.%custom_witness.aa8, constants.%custom_witness.3815f0.1, constants.%DestroyImpl.impl_witness.03b, constants.%custom_witness.392, constants.%custom_witness.1c9, constants.%custom_witness.b32, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a, constants.%custom_witness.d0da43.1, constants.%custom_witness.3815f0.2, constants.%DestroyImpl.impl_witness.508) [concrete = constants.%facet_value.6c7] +// CHECK:STDOUT: %.loc59_33.2: %CppRange_where.type.d682d6.1 = converted constants.%DiffMutableRange, %facet_value.loc59_33.2 [concrete = constants.%facet_value.6c7] +// CHECK:STDOUT: %specific_fn.loc59_33.1: = specific_function %impl.elem2.loc59, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.6c7) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.c3b] // CHECK:STDOUT: %bound_method.loc59_33.2: = bound_method %m.ref, %specific_fn.loc59_33.1 // CHECK:STDOUT: %var.loc59: ref %tuple.type.b18 = var_storage invalid // CHECK:STDOUT: %.loc59_32.1: %DiffMutableRange = acquire_value %m.ref @@ -2119,37 +1815,37 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: br !for.next.loc59 // CHECK:STDOUT: // CHECK:STDOUT: !for.next.loc59: -// CHECK:STDOUT: %impl.elem3.loc59: %.22d = impl_witness_access constants.%Iterate.impl_witness.606, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.8ce] +// CHECK:STDOUT: %impl.elem3.loc59: %.d8c = impl_witness_access constants.%Iterate.impl_witness.0fb, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.288] // CHECK:STDOUT: %bound_method.loc59_33.3: = bound_method %m.ref, %impl.elem3.loc59 -// CHECK:STDOUT: %facet_value.loc59_33.3: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffMutableRange, (constants.%custom_witness.aa8, constants.%custom_witness.db9baa.1, constants.%custom_witness.392, constants.%custom_witness.1c9, constants.%custom_witness.b32, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.db9baa.2) [concrete = constants.%facet_value.4bb] -// CHECK:STDOUT: %.loc59_33.3: %CppRange_where.type.d682d6.1 = converted constants.%DiffMutableRange, %facet_value.loc59_33.3 [concrete = constants.%facet_value.4bb] -// CHECK:STDOUT: %facet_value.loc59_33.4: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffMutableRange, (constants.%custom_witness.aa8, constants.%custom_witness.db9baa.1, constants.%custom_witness.392, constants.%custom_witness.1c9, constants.%custom_witness.b32, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.db9baa.2) [concrete = constants.%facet_value.4bb] -// CHECK:STDOUT: %.loc59_33.4: %CppRange_where.type.d682d6.1 = converted constants.%DiffMutableRange, %facet_value.loc59_33.4 [concrete = constants.%facet_value.4bb] -// CHECK:STDOUT: %specific_fn.loc59_33.2: = specific_function %impl.elem3.loc59, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.4bb) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.288] +// CHECK:STDOUT: %facet_value.loc59_33.3: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffMutableRange, (constants.%custom_witness.aa8, constants.%custom_witness.3815f0.1, constants.%DestroyImpl.impl_witness.03b, constants.%custom_witness.392, constants.%custom_witness.1c9, constants.%custom_witness.b32, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a, constants.%custom_witness.d0da43.1, constants.%custom_witness.3815f0.2, constants.%DestroyImpl.impl_witness.508) [concrete = constants.%facet_value.6c7] +// CHECK:STDOUT: %.loc59_33.3: %CppRange_where.type.d682d6.1 = converted constants.%DiffMutableRange, %facet_value.loc59_33.3 [concrete = constants.%facet_value.6c7] +// CHECK:STDOUT: %facet_value.loc59_33.4: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffMutableRange, (constants.%custom_witness.aa8, constants.%custom_witness.3815f0.1, constants.%DestroyImpl.impl_witness.03b, constants.%custom_witness.392, constants.%custom_witness.1c9, constants.%custom_witness.b32, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a, constants.%custom_witness.d0da43.1, constants.%custom_witness.3815f0.2, constants.%DestroyImpl.impl_witness.508) [concrete = constants.%facet_value.6c7] +// CHECK:STDOUT: %.loc59_33.4: %CppRange_where.type.d682d6.1 = converted constants.%DiffMutableRange, %facet_value.loc59_33.4 [concrete = constants.%facet_value.6c7] +// CHECK:STDOUT: %specific_fn.loc59_33.2: = specific_function %impl.elem3.loc59, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.6c7) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.fb4] // CHECK:STDOUT: %bound_method.loc59_33.4: = bound_method %m.ref, %specific_fn.loc59_33.2 -// CHECK:STDOUT: %.loc59_33.5: ref %Optional.c3f = temporary_storage +// CHECK:STDOUT: %.loc59_33.5: ref %Optional.250 = temporary_storage // CHECK:STDOUT: %.loc59_32.2: %DiffMutableRange = acquire_value %m.ref -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc59: init %Optional.c3f to %.loc59_33.5 = call %bound_method.loc59_33.4(%.loc59_32.2, %var.loc59) -// CHECK:STDOUT: %.loc59_33.6: ref %Optional.c3f = temporary %.loc59_33.5, %T.as_type.as.Iterate.impl.Next.call.loc59 -// CHECK:STDOUT: %.loc59_33.7: %Optional.HasValue.type.f06 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.HasValue.660] -// CHECK:STDOUT: %HasValue.ref.loc59: %Optional.HasValue.type.f06 = name_ref HasValue, %.loc59_33.7 [concrete = constants.%Optional.HasValue.660] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc59: init %Optional.250 to %.loc59_33.5 = call %bound_method.loc59_33.4(%.loc59_32.2, %var.loc59) +// CHECK:STDOUT: %.loc59_33.6: ref %Optional.250 = temporary %.loc59_33.5, %T.as_type.as.Iterate.impl.Next.call.loc59 +// CHECK:STDOUT: %.loc59_33.7: %Optional.HasValue.type.7a2 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.HasValue.0b9] +// CHECK:STDOUT: %HasValue.ref.loc59: %Optional.HasValue.type.7a2 = name_ref HasValue, %.loc59_33.7 [concrete = constants.%Optional.HasValue.0b9] // CHECK:STDOUT: %Optional.HasValue.bound.loc59: = bound_method %.loc59_33.6, %HasValue.ref.loc59 -// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc59: = specific_function %HasValue.ref.loc59, @Optional.HasValue(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.HasValue.specific_fn.68a] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc59: = specific_function %HasValue.ref.loc59, @Optional.HasValue(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.HasValue.specific_fn.366] // CHECK:STDOUT: %bound_method.loc59_33.5: = bound_method %.loc59_33.6, %Optional.HasValue.specific_fn.loc59 -// CHECK:STDOUT: %.loc59_33.8: %Optional.c3f = acquire_value %.loc59_33.6 +// CHECK:STDOUT: %.loc59_33.8: %Optional.250 = acquire_value %.loc59_33.6 // CHECK:STDOUT: %Optional.HasValue.call.loc59: init bool = call %bound_method.loc59_33.5(%.loc59_33.8) // CHECK:STDOUT: %.loc59_33.9: bool = value_of_initializer %Optional.HasValue.call.loc59 // CHECK:STDOUT: %.loc59_33.10: bool = converted %Optional.HasValue.call.loc59, %.loc59_33.9 // CHECK:STDOUT: if %.loc59_33.10 br !for.body.loc59 else br !for.done.loc59 // CHECK:STDOUT: // CHECK:STDOUT: !for.body.loc59: -// CHECK:STDOUT: %.loc59_33.11: %Optional.Get.type.acd = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.Get.a06] -// CHECK:STDOUT: %Get.ref.loc59: %Optional.Get.type.acd = name_ref Get, %.loc59_33.11 [concrete = constants.%Optional.Get.a06] +// CHECK:STDOUT: %.loc59_33.11: %Optional.Get.type.fa0 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.Get.f6a] +// CHECK:STDOUT: %Get.ref.loc59: %Optional.Get.type.fa0 = name_ref Get, %.loc59_33.11 [concrete = constants.%Optional.Get.f6a] // CHECK:STDOUT: %Optional.Get.bound.loc59: = bound_method %.loc59_33.6, %Get.ref.loc59 -// CHECK:STDOUT: %Optional.Get.specific_fn.loc59: = specific_function %Get.ref.loc59, @Optional.Get(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.Get.specific_fn.2e2] +// CHECK:STDOUT: %Optional.Get.specific_fn.loc59: = specific_function %Get.ref.loc59, @Optional.Get(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.Get.specific_fn.29e] // CHECK:STDOUT: %bound_method.loc59_33.6: = bound_method %.loc59_33.6, %Optional.Get.specific_fn.loc59 // CHECK:STDOUT: %.loc59_33.12: ref %DiffValueType = temporary_storage -// CHECK:STDOUT: %.loc59_33.13: %Optional.c3f = acquire_value %.loc59_33.6 +// CHECK:STDOUT: %.loc59_33.13: %Optional.250 = acquire_value %.loc59_33.6 // CHECK:STDOUT: %Optional.Get.call.loc59: init %DiffValueType to %.loc59_33.12 = call %bound_method.loc59_33.6(%.loc59_33.13) // CHECK:STDOUT: %.loc59_33.14: ref %DiffValueType = temporary %.loc59_33.12, %Optional.Get.call.loc59 // CHECK:STDOUT: %.loc59_33.15: %DiffValueType = acquire_value %.loc59_33.14 @@ -2165,28 +1861,44 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc60_9.1: %ptr.816 = as_compatible %addr.loc60 // CHECK:STDOUT: %.loc60_9.2: %ptr.816 = converted %addr.loc60, %.loc60_9.1 // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.call.loc60: ref %DiffValueType = call imports.%operator_PlusEqual__carbon_thunk.decl(%sum.ref.loc60, %.loc60_9.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc59_33.1: = bound_method %.loc59_33.14, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc59_33.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc59_33.1(%.loc59_33.14) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc59_33.2: = bound_method %.loc59_33.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc59_33.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc59_33.2(%.loc59_33.6) +// CHECK:STDOUT: %Destroy.facet.loc59_33.1: %Destroy.type = facet_value constants.%DiffValueType, (constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a) [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: %.loc59_33.16: %Destroy.type = converted constants.%DiffValueType, %Destroy.facet.loc59_33.1 [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: %Destroy.facet.loc59_33.2: %Destroy.type = facet_value constants.%DiffValueType, (constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a) [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: %.loc59_33.17: %Destroy.type = converted constants.%DiffValueType, %Destroy.facet.loc59_33.2 [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc59_33.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc59_33.14) +// CHECK:STDOUT: %Destroy.facet.loc59_33.3: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc59_33.18: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc59_33.3 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %Destroy.facet.loc59_33.4: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc59_33.19: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc59_33.4 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc59_33.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc59_33.6) // CHECK:STDOUT: br !for.next.loc59 // CHECK:STDOUT: // CHECK:STDOUT: !for.done.loc59: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc59_33.3: = bound_method %.loc59_33.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc59_33.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc59_33.3(%.loc59_33.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc59_33.4: = bound_method %var.loc59, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.11 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc59_33.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc59_33.4(%var.loc59) +// CHECK:STDOUT: %Destroy.facet.loc59_33.5: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc59_33.20: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc59_33.5 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %Destroy.facet.loc59_33.6: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc59_33.21: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc59_33.6 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc59_33.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc59_33.6) +// CHECK:STDOUT: %Destroy.facet.loc59_33.7: %Destroy.type = facet_value constants.%tuple.type.b18, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.c40) [concrete = constants.%Destroy.facet.4da] +// CHECK:STDOUT: %.loc59_33.22: %Destroy.type = converted constants.%tuple.type.b18, %Destroy.facet.loc59_33.7 [concrete = constants.%Destroy.facet.4da] +// CHECK:STDOUT: %Destroy.facet.loc59_33.8: %Destroy.type = facet_value constants.%tuple.type.b18, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.c40) [concrete = constants.%Destroy.facet.4da] +// CHECK:STDOUT: %.loc59_33.23: %Destroy.type = converted constants.%tuple.type.b18, %Destroy.facet.loc59_33.8 [concrete = constants.%Destroy.facet.4da] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc59_33.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var.loc59) // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %i.patt.loc63: %pattern_type.149 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %c.ref: %DiffConstRange = name_ref c, %c -// CHECK:STDOUT: %impl.elem2.loc63: %.b0d = impl_witness_access constants.%Iterate.impl_witness.9b4, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.3cd] +// CHECK:STDOUT: %impl.elem2.loc63: %.776 = impl_witness_access constants.%Iterate.impl_witness.0fc, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.c96] // CHECK:STDOUT: %bound_method.loc63_33.1: = bound_method %c.ref, %impl.elem2.loc63 -// CHECK:STDOUT: %facet_value.loc63_33.1: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffConstRange, (constants.%custom_witness.7b4, constants.%custom_witness.48b6e9.1, constants.%custom_witness.0c0, constants.%custom_witness.ffb, constants.%custom_witness.fc2, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.48b6e9.2) [concrete = constants.%facet_value.683] -// CHECK:STDOUT: %.loc63_33.1: %CppRange_where.type.d682d6.1 = converted constants.%DiffConstRange, %facet_value.loc63_33.1 [concrete = constants.%facet_value.683] -// CHECK:STDOUT: %facet_value.loc63_33.2: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffConstRange, (constants.%custom_witness.7b4, constants.%custom_witness.48b6e9.1, constants.%custom_witness.0c0, constants.%custom_witness.ffb, constants.%custom_witness.fc2, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.48b6e9.2) [concrete = constants.%facet_value.683] -// CHECK:STDOUT: %.loc63_33.2: %CppRange_where.type.d682d6.1 = converted constants.%DiffConstRange, %facet_value.loc63_33.2 [concrete = constants.%facet_value.683] -// CHECK:STDOUT: %specific_fn.loc63_33.1: = specific_function %impl.elem2.loc63, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.683) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.104] +// CHECK:STDOUT: %facet_value.loc63_33.1: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffConstRange, (constants.%custom_witness.7b4, constants.%custom_witness.3d0529.1, constants.%DestroyImpl.impl_witness.bd5, constants.%custom_witness.0c0, constants.%custom_witness.ffb, constants.%custom_witness.fc2, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a, constants.%custom_witness.d0da43.1, constants.%custom_witness.3d0529.2, constants.%DestroyImpl.impl_witness.780) [concrete = constants.%facet_value.047] +// CHECK:STDOUT: %.loc63_33.1: %CppRange_where.type.d682d6.1 = converted constants.%DiffConstRange, %facet_value.loc63_33.1 [concrete = constants.%facet_value.047] +// CHECK:STDOUT: %facet_value.loc63_33.2: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffConstRange, (constants.%custom_witness.7b4, constants.%custom_witness.3d0529.1, constants.%DestroyImpl.impl_witness.bd5, constants.%custom_witness.0c0, constants.%custom_witness.ffb, constants.%custom_witness.fc2, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a, constants.%custom_witness.d0da43.1, constants.%custom_witness.3d0529.2, constants.%DestroyImpl.impl_witness.780) [concrete = constants.%facet_value.047] +// CHECK:STDOUT: %.loc63_33.2: %CppRange_where.type.d682d6.1 = converted constants.%DiffConstRange, %facet_value.loc63_33.2 [concrete = constants.%facet_value.047] +// CHECK:STDOUT: %specific_fn.loc63_33.1: = specific_function %impl.elem2.loc63, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.047) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.ba8] // CHECK:STDOUT: %bound_method.loc63_33.2: = bound_method %c.ref, %specific_fn.loc63_33.1 // CHECK:STDOUT: %var.loc63: ref %tuple.type.df5 = var_storage invalid // CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call.loc63: init %tuple.type.df5 to %var.loc63 = call %bound_method.loc63_33.2(%c.ref) @@ -2194,36 +1906,36 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: br !for.next.loc63 // CHECK:STDOUT: // CHECK:STDOUT: !for.next.loc63: -// CHECK:STDOUT: %impl.elem3.loc63: %.d85 = impl_witness_access constants.%Iterate.impl_witness.9b4, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.d18] +// CHECK:STDOUT: %impl.elem3.loc63: %.ee1 = impl_witness_access constants.%Iterate.impl_witness.0fc, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.264] // CHECK:STDOUT: %bound_method.loc63_33.3: = bound_method %c.ref, %impl.elem3.loc63 -// CHECK:STDOUT: %facet_value.loc63_33.3: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffConstRange, (constants.%custom_witness.7b4, constants.%custom_witness.48b6e9.1, constants.%custom_witness.0c0, constants.%custom_witness.ffb, constants.%custom_witness.fc2, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.48b6e9.2) [concrete = constants.%facet_value.683] -// CHECK:STDOUT: %.loc63_33.3: %CppRange_where.type.d682d6.1 = converted constants.%DiffConstRange, %facet_value.loc63_33.3 [concrete = constants.%facet_value.683] -// CHECK:STDOUT: %facet_value.loc63_33.4: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffConstRange, (constants.%custom_witness.7b4, constants.%custom_witness.48b6e9.1, constants.%custom_witness.0c0, constants.%custom_witness.ffb, constants.%custom_witness.fc2, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.48b6e9.2) [concrete = constants.%facet_value.683] -// CHECK:STDOUT: %.loc63_33.4: %CppRange_where.type.d682d6.1 = converted constants.%DiffConstRange, %facet_value.loc63_33.4 [concrete = constants.%facet_value.683] -// CHECK:STDOUT: %specific_fn.loc63_33.2: = specific_function %impl.elem3.loc63, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.683) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.8ee] +// CHECK:STDOUT: %facet_value.loc63_33.3: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffConstRange, (constants.%custom_witness.7b4, constants.%custom_witness.3d0529.1, constants.%DestroyImpl.impl_witness.bd5, constants.%custom_witness.0c0, constants.%custom_witness.ffb, constants.%custom_witness.fc2, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a, constants.%custom_witness.d0da43.1, constants.%custom_witness.3d0529.2, constants.%DestroyImpl.impl_witness.780) [concrete = constants.%facet_value.047] +// CHECK:STDOUT: %.loc63_33.3: %CppRange_where.type.d682d6.1 = converted constants.%DiffConstRange, %facet_value.loc63_33.3 [concrete = constants.%facet_value.047] +// CHECK:STDOUT: %facet_value.loc63_33.4: %CppRange_where.type.d682d6.1 = facet_value constants.%DiffConstRange, (constants.%custom_witness.7b4, constants.%custom_witness.3d0529.1, constants.%DestroyImpl.impl_witness.bd5, constants.%custom_witness.0c0, constants.%custom_witness.ffb, constants.%custom_witness.fc2, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a, constants.%custom_witness.d0da43.1, constants.%custom_witness.3d0529.2, constants.%DestroyImpl.impl_witness.780) [concrete = constants.%facet_value.047] +// CHECK:STDOUT: %.loc63_33.4: %CppRange_where.type.d682d6.1 = converted constants.%DiffConstRange, %facet_value.loc63_33.4 [concrete = constants.%facet_value.047] +// CHECK:STDOUT: %specific_fn.loc63_33.2: = specific_function %impl.elem3.loc63, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.047) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn.3dc] // CHECK:STDOUT: %bound_method.loc63_33.4: = bound_method %c.ref, %specific_fn.loc63_33.2 -// CHECK:STDOUT: %.loc63_33.5: ref %Optional.c3f = temporary_storage -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc63: init %Optional.c3f to %.loc63_33.5 = call %bound_method.loc63_33.4(%c.ref, %var.loc63) -// CHECK:STDOUT: %.loc63_33.6: ref %Optional.c3f = temporary %.loc63_33.5, %T.as_type.as.Iterate.impl.Next.call.loc63 -// CHECK:STDOUT: %.loc63_33.7: %Optional.HasValue.type.f06 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.HasValue.660] -// CHECK:STDOUT: %HasValue.ref.loc63: %Optional.HasValue.type.f06 = name_ref HasValue, %.loc63_33.7 [concrete = constants.%Optional.HasValue.660] +// CHECK:STDOUT: %.loc63_33.5: ref %Optional.250 = temporary_storage +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call.loc63: init %Optional.250 to %.loc63_33.5 = call %bound_method.loc63_33.4(%c.ref, %var.loc63) +// CHECK:STDOUT: %.loc63_33.6: ref %Optional.250 = temporary %.loc63_33.5, %T.as_type.as.Iterate.impl.Next.call.loc63 +// CHECK:STDOUT: %.loc63_33.7: %Optional.HasValue.type.7a2 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.HasValue.0b9] +// CHECK:STDOUT: %HasValue.ref.loc63: %Optional.HasValue.type.7a2 = name_ref HasValue, %.loc63_33.7 [concrete = constants.%Optional.HasValue.0b9] // CHECK:STDOUT: %Optional.HasValue.bound.loc63: = bound_method %.loc63_33.6, %HasValue.ref.loc63 -// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc63: = specific_function %HasValue.ref.loc63, @Optional.HasValue(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.HasValue.specific_fn.68a] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.loc63: = specific_function %HasValue.ref.loc63, @Optional.HasValue(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.HasValue.specific_fn.366] // CHECK:STDOUT: %bound_method.loc63_33.5: = bound_method %.loc63_33.6, %Optional.HasValue.specific_fn.loc63 -// CHECK:STDOUT: %.loc63_33.8: %Optional.c3f = acquire_value %.loc63_33.6 +// CHECK:STDOUT: %.loc63_33.8: %Optional.250 = acquire_value %.loc63_33.6 // CHECK:STDOUT: %Optional.HasValue.call.loc63: init bool = call %bound_method.loc63_33.5(%.loc63_33.8) // CHECK:STDOUT: %.loc63_33.9: bool = value_of_initializer %Optional.HasValue.call.loc63 // CHECK:STDOUT: %.loc63_33.10: bool = converted %Optional.HasValue.call.loc63, %.loc63_33.9 // CHECK:STDOUT: if %.loc63_33.10 br !for.body.loc63 else br !for.done.loc63 // CHECK:STDOUT: // CHECK:STDOUT: !for.body.loc63: -// CHECK:STDOUT: %.loc63_33.11: %Optional.Get.type.acd = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.Get.a06] -// CHECK:STDOUT: %Get.ref.loc63: %Optional.Get.type.acd = name_ref Get, %.loc63_33.11 [concrete = constants.%Optional.Get.a06] +// CHECK:STDOUT: %.loc63_33.11: %Optional.Get.type.fa0 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.Get.f6a] +// CHECK:STDOUT: %Get.ref.loc63: %Optional.Get.type.fa0 = name_ref Get, %.loc63_33.11 [concrete = constants.%Optional.Get.f6a] // CHECK:STDOUT: %Optional.Get.bound.loc63: = bound_method %.loc63_33.6, %Get.ref.loc63 -// CHECK:STDOUT: %Optional.Get.specific_fn.loc63: = specific_function %Get.ref.loc63, @Optional.Get(constants.%OptionalStorage.facet.9e6) [concrete = constants.%Optional.Get.specific_fn.2e2] +// CHECK:STDOUT: %Optional.Get.specific_fn.loc63: = specific_function %Get.ref.loc63, @Optional.Get(constants.%OptionalStorage.facet.f87) [concrete = constants.%Optional.Get.specific_fn.29e] // CHECK:STDOUT: %bound_method.loc63_33.6: = bound_method %.loc63_33.6, %Optional.Get.specific_fn.loc63 // CHECK:STDOUT: %.loc63_33.12: ref %DiffValueType = temporary_storage -// CHECK:STDOUT: %.loc63_33.13: %Optional.c3f = acquire_value %.loc63_33.6 +// CHECK:STDOUT: %.loc63_33.13: %Optional.250 = acquire_value %.loc63_33.6 // CHECK:STDOUT: %Optional.Get.call.loc63: init %DiffValueType to %.loc63_33.12 = call %bound_method.loc63_33.6(%.loc63_33.13) // CHECK:STDOUT: %.loc63_33.14: ref %DiffValueType = temporary %.loc63_33.12, %Optional.Get.call.loc63 // CHECK:STDOUT: %.loc63_33.15: %DiffValueType = acquire_value %.loc63_33.14 @@ -2239,17 +1951,33 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc64_9.1: %ptr.816 = as_compatible %addr.loc64 // CHECK:STDOUT: %.loc64_9.2: %ptr.816 = converted %addr.loc64, %.loc64_9.1 // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.call.loc64: ref %DiffValueType = call imports.%operator_PlusEqual__carbon_thunk.decl(%sum.ref.loc64, %.loc64_9.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc63_33.1: = bound_method %.loc63_33.14, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc63_33.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc63_33.1(%.loc63_33.14) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc63_33.2: = bound_method %.loc63_33.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc63_33.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc63_33.2(%.loc63_33.6) +// CHECK:STDOUT: %Destroy.facet.loc63_33.1: %Destroy.type = facet_value constants.%DiffValueType, (constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a) [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: %.loc63_33.16: %Destroy.type = converted constants.%DiffValueType, %Destroy.facet.loc63_33.1 [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: %Destroy.facet.loc63_33.2: %Destroy.type = facet_value constants.%DiffValueType, (constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.c9a) [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: %.loc63_33.17: %Destroy.type = converted constants.%DiffValueType, %Destroy.facet.loc63_33.2 [concrete = constants.%Destroy.facet.91b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc63_33.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc63_33.14) +// CHECK:STDOUT: %Destroy.facet.loc63_33.3: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc63_33.18: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc63_33.3 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %Destroy.facet.loc63_33.4: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc63_33.19: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc63_33.4 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc63_33.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%.loc63_33.6) // CHECK:STDOUT: br !for.next.loc63 // CHECK:STDOUT: // CHECK:STDOUT: !for.done.loc63: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc63_33.3: = bound_method %.loc63_33.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc63_33.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc63_33.3(%.loc63_33.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc63_33.4: = bound_method %var.loc63, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.15 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc63_33.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc63_33.4(%var.loc63) +// CHECK:STDOUT: %Destroy.facet.loc63_33.5: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc63_33.20: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc63_33.5 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %Destroy.facet.loc63_33.6: %Destroy.type = facet_value constants.%Optional.250, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.dec) [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: %.loc63_33.21: %Destroy.type = converted constants.%Optional.250, %Destroy.facet.loc63_33.6 [concrete = constants.%Destroy.facet.ba0] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc63_33.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.7(%.loc63_33.6) +// CHECK:STDOUT: %Destroy.facet.loc63_33.7: %Destroy.type = facet_value constants.%tuple.type.df5, (constants.%custom_witness.b80ef6.9, constants.%DestroyImpl.impl_witness.8c3) [concrete = constants.%Destroy.facet.017] +// CHECK:STDOUT: %.loc63_33.22: %Destroy.type = converted constants.%tuple.type.df5, %Destroy.facet.loc63_33.7 [concrete = constants.%Destroy.facet.017] +// CHECK:STDOUT: %Destroy.facet.loc63_33.8: %Destroy.type = facet_value constants.%tuple.type.df5, (constants.%custom_witness.b80ef6.9, constants.%DestroyImpl.impl_witness.8c3) [concrete = constants.%Destroy.facet.017] +// CHECK:STDOUT: %.loc63_33.23: %Destroy.type = converted constants.%tuple.type.df5, %Destroy.facet.loc63_33.8 [concrete = constants.%Destroy.facet.017] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc63_33.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.8(%var.loc63) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2257,14 +1985,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt // CHECK:STDOUT: %R.loc40_17.1 => constants.%R // CHECK:STDOUT: %R.as_type.loc40_79.1 => constants.%R.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.dc2 -// CHECK:STDOUT: %r.patt.loc40_77.2 => constants.%r.patt.917 -// CHECK:STDOUT: %r.param_patt.loc40_72.2 => constants.%r.param_patt.9a1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.172 +// CHECK:STDOUT: %r.patt.loc40_77.2 => constants.%r.patt.ea6 +// CHECK:STDOUT: %r.param_patt.loc40_72.2 => constants.%r.param_patt.528 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.2c1) { +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.847) { // CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt -// CHECK:STDOUT: %R.loc40_17.1 => constants.%facet_value.2c1 +// CHECK:STDOUT: %R.loc40_17.1 => constants.%facet_value.847 // CHECK:STDOUT: %R.as_type.loc40_79.1 => constants.%DiffMutableRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.611 // CHECK:STDOUT: %r.patt.loc40_77.2 => constants.%r.patt.5fe @@ -2272,29 +2000,25 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc40 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.606 -// CHECK:STDOUT: %Iterate.facet.loc44_33.5 => constants.%Iterate.facet.758 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.49d -// CHECK:STDOUT: %.loc44_33.20 => constants.%.c05 -// CHECK:STDOUT: %impl.elem2.loc44_33.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.a7b -// CHECK:STDOUT: %specific_impl_fn.loc44_33.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.1d2 -// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.645 +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.0fb +// CHECK:STDOUT: %Iterate.facet.loc44_33.5 => constants.%Iterate.facet.012 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.ff0 +// CHECK:STDOUT: %.loc44_33.26 => constants.%.6cf1 +// CHECK:STDOUT: %impl.elem2.loc44_33.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.573 +// CHECK:STDOUT: %specific_impl_fn.loc44_33.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.c3b +// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.4da // CHECK:STDOUT: %as_type => constants.%tuple.type.b18 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.bfe -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.1f8 -// CHECK:STDOUT: %.loc44_33.21 => constants.%.22d -// CHECK:STDOUT: %impl.elem3.loc44_33.2 => constants.%T.as_type.as.Iterate.impl.Next.8ce -// CHECK:STDOUT: %specific_impl_fn.loc44_33.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.288 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.baf -// CHECK:STDOUT: %.loc44_33.22 => constants.%.085 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.8 -// CHECK:STDOUT: %impl.elem2.loc44_33.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.11 -// CHECK:STDOUT: %specific_impl_fn.loc44_33.6 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.11 +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.8fc +// CHECK:STDOUT: %.loc44_33.27 => constants.%.d8c +// CHECK:STDOUT: %impl.elem3.loc44_33.2 => constants.%T.as_type.as.Iterate.impl.Next.288 +// CHECK:STDOUT: %specific_impl_fn.loc44_33.4 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.fb4 +// CHECK:STDOUT: %SelfDestruct.specific_fn.6 => constants.%SelfDestruct.specific_fn.9e00 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.1fc) { +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.76f) { // CHECK:STDOUT: %R.patt.loc40_17.2 => constants.%R.patt -// CHECK:STDOUT: %R.loc40_17.1 => constants.%facet_value.1fc +// CHECK:STDOUT: %R.loc40_17.1 => constants.%facet_value.76f // CHECK:STDOUT: %R.as_type.loc40_79.1 => constants.%DiffConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7dd // CHECK:STDOUT: %r.patt.loc40_77.2 => constants.%r.patt.9c0 @@ -2302,24 +2026,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc40 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.9b4 -// CHECK:STDOUT: %Iterate.facet.loc44_33.5 => constants.%Iterate.facet.930 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.4f6 -// CHECK:STDOUT: %.loc44_33.20 => constants.%.b0d -// CHECK:STDOUT: %impl.elem2.loc44_33.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.3cd -// CHECK:STDOUT: %specific_impl_fn.loc44_33.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.104 -// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.206 +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.0fc +// CHECK:STDOUT: %Iterate.facet.loc44_33.5 => constants.%Iterate.facet.151 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.cf5 +// CHECK:STDOUT: %.loc44_33.26 => constants.%.776 +// CHECK:STDOUT: %impl.elem2.loc44_33.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.c96 +// CHECK:STDOUT: %specific_impl_fn.loc44_33.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn.ba8 +// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.017 // CHECK:STDOUT: %as_type => constants.%tuple.type.df5 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.ad6 -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.95d -// CHECK:STDOUT: %.loc44_33.21 => constants.%.d85 -// CHECK:STDOUT: %impl.elem3.loc44_33.2 => constants.%T.as_type.as.Iterate.impl.Next.d18 -// CHECK:STDOUT: %specific_impl_fn.loc44_33.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.8ee -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.ee6 -// CHECK:STDOUT: %.loc44_33.22 => constants.%.c1e -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.9 -// CHECK:STDOUT: %impl.elem2.loc44_33.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.15 -// CHECK:STDOUT: %specific_impl_fn.loc44_33.6 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.15 +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.e49 +// CHECK:STDOUT: %.loc44_33.27 => constants.%.ee1 +// CHECK:STDOUT: %impl.elem3.loc44_33.2 => constants.%T.as_type.as.Iterate.impl.Next.264 +// CHECK:STDOUT: %specific_impl_fn.loc44_33.4 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn.3dc +// CHECK:STDOUT: %SelfDestruct.specific_fn.6 => constants.%SelfDestruct.specific_fn.825 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- method_overloads.carbon @@ -2328,31 +2048,37 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %facet_type.bd0: type = facet_type <@Copy & @Destroy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.Get.2d0: %Optional.Get.type.786 = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f2f: %Optional.HasValue.type.3ea = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.74b: type = facet_access_type %T.283 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.28a: = lookup_impl_witness %T.283, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.16e: %Destroy.type = facet_value %T.as_type.74b, (%Destroy.lookup_impl_witness.28a) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.91c: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.16e) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.ade: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.b49: type = unbound_element_type %DefaultOptionalStorage.ade, bool [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.229: type = unbound_element_type %DefaultOptionalStorage.ade, %MaybeUnformed.91c [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.2f2: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.884: %T.as_type.as.OptionalStorage.impl.Get.type.2f2 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.d28: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.f29: %T.as_type.as.OptionalStorage.impl.Has.type.d28 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.760: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.268: %T.as_type.as.OptionalStorage.impl.Some.type.760 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.925: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.f42: %T.as_type.as.OptionalStorage.impl.None.type.925 = struct_value () [symbolic] +// CHECK:STDOUT: %T.f84392.1: %facet_type.bd0 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.c1cc3e.1: type = facet_access_type %T.f84392.1 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.70f: = lookup_impl_witness %T.f84392.1, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.bf2: = lookup_impl_witness %T.f84392.1, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.dc4: %Destroy.type = facet_value %T.as_type.c1cc3e.1, (%SubobjectDestroy.lookup_impl_witness.70f, %DestroyImpl.lookup_impl_witness.bf2) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.348: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.dc4) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.476: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.4a2: type = unbound_element_type %DefaultOptionalStorage.476, bool [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.ff3: type = unbound_element_type %DefaultOptionalStorage.476, %MaybeUnformed.348 [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.f27: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.e40: %T.as_type.as.OptionalStorage.impl.Get.type.f27 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.18e: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.463: %T.as_type.as.OptionalStorage.impl.Has.type.18e = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.292: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.ae9: %T.as_type.as.OptionalStorage.impl.Some.type.292 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.b57: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.791: %T.as_type.as.OptionalStorage.impl.None.type.b57 = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] // CHECK:STDOUT: %.Self.e0b: %CppRange.type = symbolic_binding .Self [symbolic_self] @@ -2361,128 +2087,94 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d3, @CppUnsafeDeref [symbolic_self] // CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] // CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] -// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.f45530.3: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.5a8: %T.as_type.as.Iterate.impl.Next.type.d4a = struct_value () [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.3, @CppRangeForIterate [symbolic] // CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] // CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.8a1: %T.as_type.as.Iterate.impl.NewCursor.type.8fb = struct_value () [symbolic] // CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] // CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.dc9: = lookup_impl_witness %tuple.type.1ba, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.504: = lookup_impl_witness %tuple.type.1ba, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.9b6: %Destroy.type = facet_value %tuple.type.1ba, (%SubobjectDestroy.lookup_impl_witness.dc9, %DestroyImpl.lookup_impl_witness.504) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.b15da7.2: = lookup_impl_witness %impl.elem0.493765.2, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.4e7f44.2: = lookup_impl_witness %impl.elem0.493765.2, @DestroyImpl [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %facet_value.189: %facet_type.bd0 = facet_value %impl.elem0.493765.2, (%SubobjectDestroy.lookup_impl_witness.b15da7.2, %DestroyImpl.lookup_impl_witness.4e7f44.2, %Copy.lookup_impl_witness.167) [symbolic] // CHECK:STDOUT: %OverloadValueType: type = class_type @OverloadValueType [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.804: type = pattern_type %OverloadValueType [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc25_56 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc25_56 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %OverloadValueType.SubobjectDestroy.type: type = fn_type @OverloadValueType.SubobjectDestroy [concrete] -// CHECK:STDOUT: %OverloadValueType.SubobjectDestroy: %OverloadValueType.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1bfa2a.1: = custom_witness (%Destroy.WithSelf.Op.403171.2, %OverloadValueType.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] -// CHECK:STDOUT: %OverloadValueType.Op.type: type = fn_type @OverloadValueType.Op [concrete] -// CHECK:STDOUT: %OverloadValueType.Op: %OverloadValueType.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.d0da43.1: = custom_witness (%OverloadValueType.Op), @Copy [concrete] -// CHECK:STDOUT: %facet_value.8be: %facet_type.f48 = facet_value %OverloadValueType, (%custom_witness.1bfa2a.1, %custom_witness.d0da43.1) [concrete] +// CHECK:STDOUT: %OverloadValueType.Op.type.83af6e.1: type = fn_type @OverloadValueType.Op.1 [concrete] +// CHECK:STDOUT: %OverloadValueType.Op.4dca31.1: %OverloadValueType.Op.type.83af6e.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.1: = custom_witness (%OverloadValueType.Op.4dca31.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ef0: %SubobjectDestroy.type = facet_value %OverloadValueType, (%custom_witness.5760f4.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.efc: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ef0) [concrete] +// CHECK:STDOUT: %OverloadValueType.Op.type.83af6e.2: type = fn_type @OverloadValueType.Op.2 [concrete] +// CHECK:STDOUT: %OverloadValueType.Op.4dca31.2: %OverloadValueType.Op.type.83af6e.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.d0da43.1: = custom_witness (%OverloadValueType.Op.4dca31.2), @Copy [concrete] +// CHECK:STDOUT: %facet_value.249: %facet_type.bd0 = facet_value %OverloadValueType, (%custom_witness.5760f4.1, %DestroyImpl.impl_witness.efc, %custom_witness.d0da43.1) [concrete] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %Iterate_where.type.2ee: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.8be> [concrete] -// CHECK:STDOUT: %pattern_type.e15: type = pattern_type %Iterate_where.type.2ee [concrete] -// CHECK:STDOUT: %R.patt: %pattern_type.e15 = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R: %Iterate_where.type.2ee = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %impl.elem0.4ce: %facet_type.bd0 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %Iterate_where.type.4a9: type = facet_type <@Iterate where %impl.elem0.4ce = %facet_value.249> [concrete] +// CHECK:STDOUT: %pattern_type.6c1: type = pattern_type %Iterate_where.type.4a9 [concrete] +// CHECK:STDOUT: %R.patt: %pattern_type.6c1 = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.4a9 = symbolic_binding R, 0 [symbolic] // CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] -// CHECK:STDOUT: %pattern_type.a47: type = pattern_type %R.as_type [symbolic] -// CHECK:STDOUT: %r.patt.24d: %pattern_type.a47 = ref_binding_pattern r [symbolic] -// CHECK:STDOUT: %r.param_patt.d5b: %pattern_type.a47 = var_param_pattern %r.patt.24d [symbolic] +// CHECK:STDOUT: %pattern_type.45b: type = pattern_type %R.as_type [symbolic] +// CHECK:STDOUT: %r.patt.9b3: %pattern_type.45b = ref_binding_pattern r [symbolic] +// CHECK:STDOUT: %r.param_patt.c29: %pattern_type.45b = var_param_pattern %r.patt.9b3 [symbolic] // CHECK:STDOUT: %_.patt.a10: %pattern_type.804 = value_binding_pattern _ [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.e07: = lookup_impl_witness %R, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.8b0: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.e07) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.13a: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.8b0) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.63b: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.8b0) [symbolic] -// CHECK:STDOUT: %.d64: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.13a, %Iterate.facet.8b0 [symbolic] -// CHECK:STDOUT: %impl.elem2.8fd: %.d64 = impl_witness_access %Iterate.lookup_impl_witness.e07, element2 [symbolic] -// CHECK:STDOUT: %impl.elem1.0e3: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.e07, element1 [symbolic] -// CHECK:STDOUT: %as_type.400: type = facet_access_type %impl.elem1.0e3 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.176: = specific_impl_function %impl.elem2.8fd, @Iterate.WithSelf.NewCursor(%Iterate.facet.8b0) [symbolic] -// CHECK:STDOUT: %.6fa: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.63b, %Iterate.facet.8b0 [symbolic] -// CHECK:STDOUT: %impl.elem3.a35: %.6fa = impl_witness_access %Iterate.lookup_impl_witness.e07, element3 [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.455: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.8be) [concrete] -// CHECK:STDOUT: %OptionalStorage.impl_witness.774: = impl_witness imports.%OptionalStorage.impl_witness_table.460, @T.as_type.as.OptionalStorage.impl(%facet_value.8be) [concrete] -// CHECK:STDOUT: %OptionalStorage.facet.f35: %OptionalStorage.type = facet_value %OverloadValueType, (%OptionalStorage.impl_witness.774) [concrete] -// CHECK:STDOUT: %Optional.343: type = class_type @Optional, @Optional(%OptionalStorage.facet.f35) [concrete] -// CHECK:STDOUT: %pattern_type.fea: type = pattern_type %Optional.343 [concrete] -// CHECK:STDOUT: %specific_impl_fn.efd: = specific_impl_function %impl.elem3.a35, @Iterate.WithSelf.Next(%Iterate.facet.8b0) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.8ad: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.f35) [concrete] -// CHECK:STDOUT: %Optional.HasValue.1ff: %Optional.HasValue.type.8ad = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.481: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.f35) [concrete] -// CHECK:STDOUT: %Optional.Get.3b7: %Optional.Get.type.481 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.d74: %Destroy.type = facet_value %OverloadValueType, (%custom_witness.1bfa2a.1) [concrete] -// CHECK:STDOUT: %MaybeUnformed.0ed: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.d74) [concrete] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.b22: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.ea5: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.b22) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.268: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.ea5) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.6a9: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.ea5) [symbolic] +// CHECK:STDOUT: %.202: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.268, %Iterate.facet.ea5 [symbolic] +// CHECK:STDOUT: %impl.elem2.032: %.202 = impl_witness_access %Iterate.lookup_impl_witness.b22, element2 [symbolic] +// CHECK:STDOUT: %impl.elem1.ccc: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.b22, element1 [symbolic] +// CHECK:STDOUT: %as_type.151: type = facet_access_type %impl.elem1.ccc [symbolic] +// CHECK:STDOUT: %specific_impl_fn.a09: = specific_impl_function %impl.elem2.032, @Iterate.WithSelf.NewCursor(%Iterate.facet.ea5) [symbolic] +// CHECK:STDOUT: %.003: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.6a9, %Iterate.facet.ea5 [symbolic] +// CHECK:STDOUT: %impl.elem3.528: %.003 = impl_witness_access %Iterate.lookup_impl_witness.b22, element3 [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.827: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.249) [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness.d26: = impl_witness imports.%OptionalStorage.impl_witness_table.1c4, @T.as_type.as.OptionalStorage.impl(%facet_value.249) [concrete] +// CHECK:STDOUT: %OptionalStorage.facet.6b8: %OptionalStorage.type = facet_value %OverloadValueType, (%OptionalStorage.impl_witness.d26) [concrete] +// CHECK:STDOUT: %Optional.410: type = class_type @Optional, @Optional(%OptionalStorage.facet.6b8) [concrete] +// CHECK:STDOUT: %specific_impl_fn.a0d: = specific_impl_function %impl.elem3.528, @Iterate.WithSelf.Next(%Iterate.facet.ea5) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.6dc: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.6b8) [concrete] +// CHECK:STDOUT: %Optional.HasValue.5e3: %Optional.HasValue.type.6dc = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.ecf: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.6b8) [concrete] +// CHECK:STDOUT: %Optional.Get.e07: %Optional.Get.type.ecf = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.facet.45f: %Destroy.type = facet_value %OverloadValueType, (%custom_witness.5760f4.1, %DestroyImpl.impl_witness.efc) [concrete] +// CHECK:STDOUT: %MaybeUnformed.c80: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.45f) [concrete] // CHECK:STDOUT: %.8a2: type = maybe_unformed_type %OverloadValueType [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.2c5: type = unbound_element_type %DefaultOptionalStorage.455, %MaybeUnformed.0ed [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.cd8: type = unbound_element_type %DefaultOptionalStorage.455, bool [concrete] -// CHECK:STDOUT: %struct_type.value.has_value.43a: type = struct_type {.value: %MaybeUnformed.0ed, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn.9b3: = specific_function %Optional.HasValue.1ff, @Optional.HasValue(%OptionalStorage.facet.f35) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn.dd9: = specific_function %Optional.Get.3b7, @Optional.Get(%OptionalStorage.facet.f35) [concrete] -// CHECK:STDOUT: %pattern_type.6ff: type = pattern_type %.8a2 [concrete] -// CHECK:STDOUT: %self.param_patt.b76: %pattern_type.6ff = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.079: %pattern_type.6ff = wrapper_binding_pattern self, %self.param_patt.b76 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc27_37.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc27_37.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.93e: type = pattern_type %MaybeUnformed.0ed [concrete] -// CHECK:STDOUT: %self.param_patt.faa: %pattern_type.93e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0f8: %pattern_type.93e = wrapper_binding_pattern self, %self.param_patt.faa [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc27_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc27_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc27_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc27_37.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc27_37.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc27_37.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.ef2: type = pattern_type %struct_type.value.has_value.43a [concrete] -// CHECK:STDOUT: %self.param_patt.c33: %pattern_type.ef2 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b9: %pattern_type.ef2 = wrapper_binding_pattern self, %self.param_patt.c33 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc27_37.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc27_37.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.6c4: type = pattern_type %DefaultOptionalStorage.455 [concrete] -// CHECK:STDOUT: %self.param_patt.c76: %pattern_type.6c4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.433: %pattern_type.6c4 = wrapper_binding_pattern self, %self.param_patt.c76 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc27_37.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc27_37.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.ff7: %pattern_type.fea = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.19c: %pattern_type.fea = wrapper_binding_pattern self, %self.param_patt.ff7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc27_37.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc27_37.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8: type = fn_type @Destroy.WithSelf.SelfDestruct.loc27_37.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.8: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.a78: = lookup_impl_witness %impl.elem1.0e3, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.45d: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1.0e3) [symbolic] -// CHECK:STDOUT: %.817: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.45d, %impl.elem1.0e3 [symbolic] -// CHECK:STDOUT: %impl.elem2.25c: %.817 = impl_witness_access %Destroy.lookup_impl_witness.a78, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.26e: = specific_impl_function %impl.elem2.25c, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1.0e3) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.02a: type = unbound_element_type %DefaultOptionalStorage.827, %MaybeUnformed.c80 [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.099: type = unbound_element_type %DefaultOptionalStorage.827, bool [concrete] +// CHECK:STDOUT: %struct_type.value.has_value.25d: type = struct_type {.value: %MaybeUnformed.c80, .has_value: bool} [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.c7c: = specific_function %Optional.HasValue.5e3, @Optional.HasValue(%OptionalStorage.facet.6b8) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.050: = specific_function %Optional.Get.e07, @Optional.Get(%OptionalStorage.facet.6b8) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc27_37.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc27_37.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.80c: %Destroy.type = facet_value bool, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.778) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.496: %SubobjectDestroy.type = facet_value %MaybeUnformed.c80, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.848: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.496) [concrete] +// CHECK:STDOUT: %Destroy.facet.85c: %Destroy.type = facet_value %MaybeUnformed.c80, (%custom_witness.b80ef6.3, %DestroyImpl.impl_witness.848) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc27_37.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.60e: %SubobjectDestroy.type = facet_value %Optional.410, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1ac: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.60e) [concrete] +// CHECK:STDOUT: %Destroy.facet.25e: %Destroy.type = facet_value %Optional.410, (%custom_witness.b80ef6.7, %DestroyImpl.impl_witness.1ac) [concrete] // CHECK:STDOUT: %Range: type = class_type @Range [concrete] // CHECK:STDOUT: %pattern_type.23f: type = pattern_type %Range [concrete] // CHECK:STDOUT: %Iterator: type = class_type @Iterator.1 [concrete] @@ -2491,52 +2183,47 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %Range.End.type: type = fn_type @Range.End [concrete] // CHECK:STDOUT: %Range.End: %Range.End.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.090: = custom_witness (%Iterator, %Iterator, %Range.Begin, %Range.End), @CppRangeForIterate [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.9: type = fn_type @Destroy.WithSelf.Op.loc32 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.9: %Destroy.WithSelf.Op.type.ef016f.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9: type = fn_type @Destroy.WithSelf.SelfDestruct.loc32 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.9: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9 = struct_value () [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.type: type = fn_type @Iterator.SubobjectDestroy [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy: %Iterator.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.eaa: = custom_witness (%Destroy.WithSelf.Op.403171.9, %Iterator.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.9), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.4232e0.1: type = fn_type @Iterator.Op.1 [concrete] // CHECK:STDOUT: %Iterator.Op.e8caec.1: %Iterator.Op.type.4232e0.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.6bd: = custom_witness (%OverloadValueType, %Iterator.Op.e8caec.1), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %custom_witness.51e: = custom_witness (%Iterator.Op.e8caec.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ea6: %SubobjectDestroy.type = facet_value %Iterator, (%custom_witness.51e) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e3a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ea6) [concrete] // CHECK:STDOUT: %Iterator.Op.type.4232e0.2: type = fn_type @Iterator.Op.2 [concrete] // CHECK:STDOUT: %Iterator.Op.e8caec.2: %Iterator.Op.type.4232e0.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.716: = custom_witness (%Iterator.Op.e8caec.2), @Inc [concrete] +// CHECK:STDOUT: %custom_witness.6bd: = custom_witness (%OverloadValueType, %Iterator.Op.e8caec.2), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %Iterator.Op.type.4232e0.3: type = fn_type @Iterator.Op.3 [concrete] +// CHECK:STDOUT: %Iterator.Op.e8caec.3: %Iterator.Op.type.4232e0.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.716: = custom_witness (%Iterator.Op.e8caec.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [concrete] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [concrete] // CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.f93: = custom_witness (%Equal, %NotEqual), @EqWith, @EqWith(%Iterator) [concrete] -// CHECK:STDOUT: %facet_value.8e3: %CppRange_where.type.d682d6.1 = facet_value %Range, (%custom_witness.090, %custom_witness.eaa, %custom_witness.6bd, %custom_witness.716, %custom_witness.f93, %custom_witness.1bfa2a.1, %custom_witness.d0da43.1, %custom_witness.eaa) [concrete] +// CHECK:STDOUT: %facet_value.732: %CppRange_where.type.d682d6.1 = facet_value %Range, (%custom_witness.090, %custom_witness.51e, %DestroyImpl.impl_witness.e3a, %custom_witness.6bd, %custom_witness.716, %custom_witness.f93, %custom_witness.5760f4.1, %DestroyImpl.impl_witness.efc, %custom_witness.d0da43.1, %custom_witness.51e, %DestroyImpl.impl_witness.e3a) [concrete] // CHECK:STDOUT: %tuple.type.9ef: type = tuple_type (%Iterator, %Iterator) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8: type = fn_type @Destroy.WithSelf.SubobjectDestroy.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.10: type = fn_type @Destroy.WithSelf.Op.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.10: %Destroy.WithSelf.Op.type.ef016f.10 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10: type = fn_type @Destroy.WithSelf.SelfDestruct.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.10: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.8: = custom_witness (%Destroy.WithSelf.Op.403171.10, %Destroy.WithSelf.SubobjectDestroy.d01daf.8, %Destroy.WithSelf.SelfDestruct.db3fdb.10), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.c69: %Destroy.type = facet_value %tuple.type.9ef, (%custom_witness.f8f19d.8) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.e03: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.8e3) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.549: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.8e3) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.60e: %T.as_type.as.Iterate.impl.NewCursor.type.549 = struct_value () [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.c07: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.8e3) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.23c: %T.as_type.as.Iterate.impl.Next.type.c07 = struct_value () [concrete] -// CHECK:STDOUT: %facet_value.637: %Iterate_where.type.2ee = facet_value %Range, (%Iterate.impl_witness.e03) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.8: type = fn_type @SubobjectDestroy.WithSelf.Op.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.8: %SubobjectDestroy.WithSelf.Op.type.6870fd.8 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.8: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.8), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.43f: %SubobjectDestroy.type = facet_value %tuple.type.9ef, (%custom_witness.b80ef6.8) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.c0f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.43f) [concrete] +// CHECK:STDOUT: %complete_type.e35: = complete_type_witness %tuple.type.9ef [concrete] +// CHECK:STDOUT: %Destroy.facet.76b: %Destroy.type = facet_value %tuple.type.9ef, (%custom_witness.b80ef6.8, %DestroyImpl.impl_witness.c0f) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.ac1: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.732) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.bae: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.732) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.edd: %T.as_type.as.Iterate.impl.NewCursor.type.bae = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.733: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.732) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.842: %T.as_type.as.Iterate.impl.Next.type.733 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.b75: %Iterate_where.type.4a9 = facet_value %Range, (%Iterate.impl_witness.ac1) [concrete] // CHECK:STDOUT: %r.patt.b9f: %pattern_type.23f = ref_binding_pattern r [concrete] // CHECK:STDOUT: %r.param_patt.466: %pattern_type.23f = var_param_pattern %r.patt.b9f [concrete] -// CHECK:STDOUT: %Iterate.facet.a3e: %Iterate.type = facet_value %Range, (%Iterate.impl_witness.e03) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.b10: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.a3e) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.42b: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.a3e) [concrete] -// CHECK:STDOUT: %.f2a: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.b10, %Iterate.facet.a3e [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.60e, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.8e3) [concrete] -// CHECK:STDOUT: %.96e: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.42b, %Iterate.facet.a3e [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.23c, @T.as_type.as.Iterate.impl.Next(%facet_value.8e3) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.106: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.c69) [concrete] -// CHECK:STDOUT: %.227: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.106, %Destroy.facet.c69 [concrete] -// CHECK:STDOUT: %complete_type.e35: = complete_type_witness %tuple.type.9ef [concrete] +// CHECK:STDOUT: %Iterate.facet.5bf: %Iterate.type = facet_value %Range, (%Iterate.impl_witness.ac1) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.a0e: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.5bf) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.ce4: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.5bf) [concrete] +// CHECK:STDOUT: %.da1: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.a0e, %Iterate.facet.5bf [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.edd, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.732) [concrete] +// CHECK:STDOUT: %.604: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.ce4, %Iterate.facet.5bf [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.842, @T.as_type.as.Iterate.impl.Next(%facet_value.732) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.ddf: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.76b) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2545,138 +2232,49 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: .Range = %Range.decl // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.02f: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.ade)] -// CHECK:STDOUT: %Core.import_ref.406: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.925) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.f42)] -// CHECK:STDOUT: %Core.import_ref.d4a: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.760) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.268)] -// CHECK:STDOUT: %Core.import_ref.9a4: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.d28) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.f29)] -// CHECK:STDOUT: %Core.import_ref.6e3: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.2f2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.884)] -// CHECK:STDOUT: %Core.import_ref.af7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.460 = impl_witness_table (%Core.import_ref.02f, %Core.import_ref.406, %Core.import_ref.d4a, %Core.import_ref.9a4, %Core.import_ref.6e3, %Core.import_ref.af7), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.51c9: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.498] -// CHECK:STDOUT: %Core.import_ref.b03: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.390] +// CHECK:STDOUT: %Core.import_ref.481: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.476)] +// CHECK:STDOUT: %Core.import_ref.66d: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.b57) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.791)] +// CHECK:STDOUT: %Core.import_ref.32c: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.292) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.ae9)] +// CHECK:STDOUT: %Core.import_ref.801: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.18e) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.463)] +// CHECK:STDOUT: %Core.import_ref.eec: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.f27) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.e40)] +// CHECK:STDOUT: %Core.import_ref.a6a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.1c4 = impl_witness_table (%Core.import_ref.481, %Core.import_ref.66d, %Core.import_ref.32c, %Core.import_ref.801, %Core.import_ref.eec, %Core.import_ref.a6a), @T.as_type.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.e86: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.bce] +// CHECK:STDOUT: %Core.import_ref.9ce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.dbe] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.c82: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.3ea) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.f2f)] // CHECK:STDOUT: %Core.import_ref.29e: @Optional.%Optional.Get.type (%Optional.Get.type.786) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.2d0)] -// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] -// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.724: %facet_type.bd0 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.189)] +// CHECK:STDOUT: %Core.import_ref.dd9: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9b6)] // CHECK:STDOUT: %Core.import_ref.946: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.8fb) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.8a1)] // CHECK:STDOUT: %Core.import_ref.cfb: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.d4a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.5a8)] -// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.724, %Core.import_ref.dd9, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %OverloadValueType.decl: type = class_decl @OverloadValueType [concrete = constants.%OverloadValueType] {} {} -// CHECK:STDOUT: %Core.import_ref.b0d0 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.390: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = field_decl has_value, element1, %Core.import_ref.b0d0 in [concrete] {} -// CHECK:STDOUT: %Core.import_ref.ab7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.498: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = field_decl value, element0, %Core.import_ref.ab7 in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.dbe: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = field_decl has_value, element1, %Core.import_ref.b0d in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.45d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.bce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = field_decl value, element0, %Core.import_ref.45d in [concrete] {} // CHECK:STDOUT: %Range.decl: type = class_decl @Range [concrete = constants.%Range] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc27_37.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6ff = ref_param_pattern [concrete = constants.%self.param_patt.b76] -// CHECK:STDOUT: %self.patt: %pattern_type.6ff = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.079] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.8a2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.8a2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc27_37.1 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6ff = ref_param_pattern [concrete = constants.%self.param_patt.b76] -// CHECK:STDOUT: %self.patt: %pattern_type.6ff = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.079] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.8a2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.8a2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc27_37.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.93e = ref_param_pattern [concrete = constants.%self.param_patt.faa] -// CHECK:STDOUT: %self.patt: %pattern_type.93e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0f8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.0ed = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.0ed = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc27_37.2 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.93e = ref_param_pattern [concrete = constants.%self.param_patt.faa] -// CHECK:STDOUT: %self.patt: %pattern_type.93e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0f8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.0ed = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.0ed = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc27_37.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc27_37.3 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc27_37.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ef2 = ref_param_pattern [concrete = constants.%self.param_patt.c33] -// CHECK:STDOUT: %self.patt: %pattern_type.ef2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.43a = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.43a = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc27_37.4 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ef2 = ref_param_pattern [concrete = constants.%self.param_patt.c33] -// CHECK:STDOUT: %self.patt: %pattern_type.ef2 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.43a = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.43a = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc27_37.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6c4 = ref_param_pattern [concrete = constants.%self.param_patt.c76] -// CHECK:STDOUT: %self.patt: %pattern_type.6c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.433] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.455 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.455 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc27_37.5 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6c4 = ref_param_pattern [concrete = constants.%self.param_patt.c76] -// CHECK:STDOUT: %self.patt: %pattern_type.6c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.433] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.455 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.455 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc27_37.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fea = ref_param_pattern [concrete = constants.%self.param_patt.ff7] -// CHECK:STDOUT: %self.patt: %pattern_type.fea = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.19c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.343 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.343 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.8 = fn_decl @Destroy.WithSelf.Op.loc27_37.6 [concrete = constants.%Destroy.WithSelf.Op.403171.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.fea = ref_param_pattern [concrete = constants.%self.param_patt.ff7] -// CHECK:STDOUT: %self.patt: %pattern_type.fea = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.19c] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.343 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.343 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TestIterate(%R.loc25_17.2: %Iterate_where.type.2ee) { +// CHECK:STDOUT: generic fn @TestIterate(%R.loc25_17.2: %Iterate_where.type.4a9) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc25_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.e07)] -// CHECK:STDOUT: %Iterate.facet.loc27_37.5: %Iterate.type = facet_value %R.as_type.loc25_83.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.8b0)] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc27_37.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.13a)] -// CHECK:STDOUT: %.loc27_37.20: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc27_37.5 [symbolic = %.loc27_37.20 (constants.%.d64)] -// CHECK:STDOUT: %impl.elem2.loc27_37.3: @TestIterate.%.loc27_37.20 (%.d64) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc27_37.3 (constants.%impl.elem2.8fd)] -// CHECK:STDOUT: %specific_impl_fn.loc27_37.4: = specific_impl_function %impl.elem2.loc27_37.3, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc27_37.5) [symbolic = %specific_impl_fn.loc27_37.4 (constants.%specific_impl_fn.176)] +// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc25_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.b22)] +// CHECK:STDOUT: %Iterate.facet.loc27_37.5: %Iterate.type = facet_value %R.as_type.loc25_83.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.ea5)] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc27_37.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.268)] +// CHECK:STDOUT: %.loc27_37.26: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc27_37.5 [symbolic = %.loc27_37.26 (constants.%.202)] +// CHECK:STDOUT: %impl.elem2.loc27_37.2: @TestIterate.%.loc27_37.26 (%.202) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc27_37.2 (constants.%impl.elem2.032)] +// CHECK:STDOUT: %specific_impl_fn.loc27_37.3: = specific_impl_function %impl.elem2.loc27_37.2, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc27_37.5) [symbolic = %specific_impl_fn.loc27_37.3 (constants.%specific_impl_fn.a09)] +// CHECK:STDOUT: +// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc27_37.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.6a9)] +// CHECK:STDOUT: %.loc27_37.27: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc27_37.5 [symbolic = %.loc27_37.27 (constants.%.003)] +// CHECK:STDOUT: %impl.elem3.loc27_37.2: @TestIterate.%.loc27_37.27 (%.003) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc27_37.2 (constants.%impl.elem3.528)] +// CHECK:STDOUT: %specific_impl_fn.loc27_37.4: = specific_impl_function %impl.elem3.loc27_37.2, @Iterate.WithSelf.Next(%Iterate.facet.loc27_37.5) [symbolic = %specific_impl_fn.loc27_37.4 (constants.%specific_impl_fn.a0d)] // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc27_37.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.63b)] -// CHECK:STDOUT: %.loc27_37.21: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc27_37.5 [symbolic = %.loc27_37.21 (constants.%.6fa)] -// CHECK:STDOUT: %impl.elem3.loc27_37.2: @TestIterate.%.loc27_37.21 (%.6fa) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc27_37.2 (constants.%impl.elem3.a35)] -// CHECK:STDOUT: %specific_impl_fn.loc27_37.5: = specific_impl_function %impl.elem3.loc27_37.2, @Iterate.WithSelf.Next(%Iterate.facet.loc27_37.5) [symbolic = %specific_impl_fn.loc27_37.5 (constants.%specific_impl_fn.efd)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.45d)] -// CHECK:STDOUT: %.loc27_37.22: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %impl.elem1 [symbolic = %.loc27_37.22 (constants.%.817)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.a78)] -// CHECK:STDOUT: %impl.elem2.loc27_37.4: @TestIterate.%.loc27_37.22 (%.817) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc27_37.4 (constants.%impl.elem2.25c)] -// CHECK:STDOUT: %specific_impl_fn.loc27_37.6: = specific_impl_function %impl.elem2.loc27_37.4, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1) [symbolic = %specific_impl_fn.loc27_37.6 (constants.%specific_impl_fn.26e)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%r.param: ref @TestIterate.%R.as_type.loc25_83.1 (%R.as_type)) { // CHECK:STDOUT: !entry: @@ -2684,54 +2282,54 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %_.patt: %pattern_type.804 = value_binding_pattern _ [concrete = constants.%_.patt.a10] // CHECK:STDOUT: } // CHECK:STDOUT: %r.ref: ref @TestIterate.%R.as_type.loc25_83.1 (%R.as_type) = name_ref r, %r -// CHECK:STDOUT: %impl.elem2.loc27_37.1: @TestIterate.%.loc27_37.20 (%.d64) = impl_witness_access constants.%Iterate.lookup_impl_witness.e07, element2 [symbolic = %impl.elem2.loc27_37.3 (constants.%impl.elem2.8fd)] +// CHECK:STDOUT: %impl.elem2.loc27_37.1: @TestIterate.%.loc27_37.26 (%.202) = impl_witness_access constants.%Iterate.lookup_impl_witness.b22, element2 [symbolic = %impl.elem2.loc27_37.2 (constants.%impl.elem2.032)] // CHECK:STDOUT: %bound_method.loc27_37.1: = bound_method %r.ref, %impl.elem2.loc27_37.1 -// CHECK:STDOUT: %Iterate.facet.loc27_37.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e07) [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.8b0)] -// CHECK:STDOUT: %.loc27_37.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc27_37.1 [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.8b0)] -// CHECK:STDOUT: %Iterate.facet.loc27_37.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e07) [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.8b0)] -// CHECK:STDOUT: %.loc27_37.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc27_37.2 [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.8b0)] -// CHECK:STDOUT: %specific_impl_fn.loc27_37.1: = specific_impl_function %impl.elem2.loc27_37.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.8b0) [symbolic = %specific_impl_fn.loc27_37.4 (constants.%specific_impl_fn.176)] +// CHECK:STDOUT: %Iterate.facet.loc27_37.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.b22) [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.ea5)] +// CHECK:STDOUT: %.loc27_37.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc27_37.1 [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.ea5)] +// CHECK:STDOUT: %Iterate.facet.loc27_37.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.b22) [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.ea5)] +// CHECK:STDOUT: %.loc27_37.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc27_37.2 [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.ea5)] +// CHECK:STDOUT: %specific_impl_fn.loc27_37.1: = specific_impl_function %impl.elem2.loc27_37.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.ea5) [symbolic = %specific_impl_fn.loc27_37.3 (constants.%specific_impl_fn.a09)] // CHECK:STDOUT: %bound_method.loc27_37.2: = bound_method %r.ref, %specific_impl_fn.loc27_37.1 -// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.400) = var_storage invalid +// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.151) = var_storage invalid // CHECK:STDOUT: %.loc27_36.1: @TestIterate.%R.as_type.loc25_83.1 (%R.as_type) = acquire_value %r.ref -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.400) to %var = call %bound_method.loc27_37.2(%.loc27_36.1) +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.151) to %var = call %bound_method.loc27_37.2(%.loc27_36.1) // CHECK:STDOUT: assign %var, %Iterate.WithSelf.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3.loc27_37.1: @TestIterate.%.loc27_37.21 (%.6fa) = impl_witness_access constants.%Iterate.lookup_impl_witness.e07, element3 [symbolic = %impl.elem3.loc27_37.2 (constants.%impl.elem3.a35)] +// CHECK:STDOUT: %impl.elem3.loc27_37.1: @TestIterate.%.loc27_37.27 (%.003) = impl_witness_access constants.%Iterate.lookup_impl_witness.b22, element3 [symbolic = %impl.elem3.loc27_37.2 (constants.%impl.elem3.528)] // CHECK:STDOUT: %bound_method.loc27_37.3: = bound_method %r.ref, %impl.elem3.loc27_37.1 -// CHECK:STDOUT: %Iterate.facet.loc27_37.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e07) [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.8b0)] -// CHECK:STDOUT: %.loc27_37.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc27_37.3 [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.8b0)] -// CHECK:STDOUT: %Iterate.facet.loc27_37.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e07) [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.8b0)] -// CHECK:STDOUT: %.loc27_37.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc27_37.4 [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.8b0)] -// CHECK:STDOUT: %.loc27_37.5: %Destroy.type = converted constants.%as_type.400, constants.%impl.elem1.0e3 [symbolic = %impl.elem1 (constants.%impl.elem1.0e3)] -// CHECK:STDOUT: %.loc27_37.6: %Destroy.type = converted constants.%as_type.400, constants.%impl.elem1.0e3 [symbolic = %impl.elem1 (constants.%impl.elem1.0e3)] -// CHECK:STDOUT: %specific_impl_fn.loc27_37.2: = specific_impl_function %impl.elem3.loc27_37.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.8b0) [symbolic = %specific_impl_fn.loc27_37.5 (constants.%specific_impl_fn.efd)] +// CHECK:STDOUT: %Iterate.facet.loc27_37.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.b22) [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.ea5)] +// CHECK:STDOUT: %.loc27_37.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc27_37.3 [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.ea5)] +// CHECK:STDOUT: %Iterate.facet.loc27_37.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.b22) [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.ea5)] +// CHECK:STDOUT: %.loc27_37.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc27_37.4 [symbolic = %Iterate.facet.loc27_37.5 (constants.%Iterate.facet.ea5)] +// CHECK:STDOUT: %.loc27_37.5: %Destroy.type = converted constants.%as_type.151, constants.%impl.elem1.ccc [symbolic = %impl.elem1 (constants.%impl.elem1.ccc)] +// CHECK:STDOUT: %.loc27_37.6: %Destroy.type = converted constants.%as_type.151, constants.%impl.elem1.ccc [symbolic = %impl.elem1 (constants.%impl.elem1.ccc)] +// CHECK:STDOUT: %specific_impl_fn.loc27_37.2: = specific_impl_function %impl.elem3.loc27_37.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.ea5) [symbolic = %specific_impl_fn.loc27_37.4 (constants.%specific_impl_fn.a0d)] // CHECK:STDOUT: %bound_method.loc27_37.4: = bound_method %r.ref, %specific_impl_fn.loc27_37.2 -// CHECK:STDOUT: %.loc27_37.7: ref %Optional.343 = temporary_storage +// CHECK:STDOUT: %.loc27_37.7: ref %Optional.410 = temporary_storage // CHECK:STDOUT: %.loc27_36.2: @TestIterate.%R.as_type.loc25_83.1 (%R.as_type) = acquire_value %r.ref -// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.343 to %.loc27_37.7 = call %bound_method.loc27_37.4(%.loc27_36.2, %var) -// CHECK:STDOUT: %.loc27_37.8: ref %Optional.343 = temporary %.loc27_37.7, %Iterate.WithSelf.Next.call -// CHECK:STDOUT: %.loc27_37.9: %Optional.HasValue.type.8ad = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.f35) [concrete = constants.%Optional.HasValue.1ff] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.8ad = name_ref HasValue, %.loc27_37.9 [concrete = constants.%Optional.HasValue.1ff] +// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.410 to %.loc27_37.7 = call %bound_method.loc27_37.4(%.loc27_36.2, %var) +// CHECK:STDOUT: %.loc27_37.8: ref %Optional.410 = temporary %.loc27_37.7, %Iterate.WithSelf.Next.call +// CHECK:STDOUT: %.loc27_37.9: %Optional.HasValue.type.6dc = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.6b8) [concrete = constants.%Optional.HasValue.5e3] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.6dc = name_ref HasValue, %.loc27_37.9 [concrete = constants.%Optional.HasValue.5e3] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc27_37.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.f35) [concrete = constants.%Optional.HasValue.specific_fn.9b3] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.6b8) [concrete = constants.%Optional.HasValue.specific_fn.c7c] // CHECK:STDOUT: %bound_method.loc27_37.5: = bound_method %.loc27_37.8, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc27_37.10: %Optional.343 = acquire_value %.loc27_37.8 +// CHECK:STDOUT: %.loc27_37.10: %Optional.410 = acquire_value %.loc27_37.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc27_37.5(%.loc27_37.10) // CHECK:STDOUT: %.loc27_37.11: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc27_37.12: bool = converted %Optional.HasValue.call, %.loc27_37.11 // CHECK:STDOUT: if %.loc27_37.12 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc27_37.13: %Optional.Get.type.481 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.f35) [concrete = constants.%Optional.Get.3b7] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.481 = name_ref Get, %.loc27_37.13 [concrete = constants.%Optional.Get.3b7] +// CHECK:STDOUT: %.loc27_37.13: %Optional.Get.type.ecf = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.6b8) [concrete = constants.%Optional.Get.e07] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.ecf = name_ref Get, %.loc27_37.13 [concrete = constants.%Optional.Get.e07] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc27_37.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.f35) [concrete = constants.%Optional.Get.specific_fn.dd9] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.6b8) [concrete = constants.%Optional.Get.specific_fn.050] // CHECK:STDOUT: %bound_method.loc27_37.6: = bound_method %.loc27_37.8, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc27_37.14: ref %OverloadValueType = temporary_storage -// CHECK:STDOUT: %.loc27_37.15: %Optional.343 = acquire_value %.loc27_37.8 +// CHECK:STDOUT: %.loc27_37.15: %Optional.410 = acquire_value %.loc27_37.8 // CHECK:STDOUT: %Optional.Get.call: init %OverloadValueType to %.loc27_37.14 = call %bound_method.loc27_37.6(%.loc27_37.15) // CHECK:STDOUT: %.loc27_37.16: ref %OverloadValueType = temporary %.loc27_37.14, %Optional.Get.call // CHECK:STDOUT: %.loc27_37.17: %OverloadValueType = acquire_value %.loc27_37.16 @@ -2740,114 +2338,85 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %OverloadValueType.ref.loc27: type = name_ref OverloadValueType, imports.%OverloadValueType.decl [concrete = constants.%OverloadValueType] // CHECK:STDOUT: } // CHECK:STDOUT: %_: %OverloadValueType = wrapper_binding _, %.loc27_37.17 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc27_37.1: = bound_method %.loc27_37.16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27_37.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc27_37.1(%.loc27_37.16) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc27_37.2: = bound_method %.loc27_37.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27_37.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc27_37.2(%.loc27_37.8) +// CHECK:STDOUT: %Destroy.facet.loc27_37.1: %Destroy.type = facet_value constants.%OverloadValueType, (constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.efc) [concrete = constants.%Destroy.facet.45f] +// CHECK:STDOUT: %.loc27_37.18: %Destroy.type = converted constants.%OverloadValueType, %Destroy.facet.loc27_37.1 [concrete = constants.%Destroy.facet.45f] +// CHECK:STDOUT: %Destroy.facet.loc27_37.2: %Destroy.type = facet_value constants.%OverloadValueType, (constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.efc) [concrete = constants.%Destroy.facet.45f] +// CHECK:STDOUT: %.loc27_37.19: %Destroy.type = converted constants.%OverloadValueType, %Destroy.facet.loc27_37.2 [concrete = constants.%Destroy.facet.45f] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc27_37.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc27_37.16) +// CHECK:STDOUT: %Destroy.facet.loc27_37.3: %Destroy.type = facet_value constants.%Optional.410, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.1ac) [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %.loc27_37.20: %Destroy.type = converted constants.%Optional.410, %Destroy.facet.loc27_37.3 [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %Destroy.facet.loc27_37.4: %Destroy.type = facet_value constants.%Optional.410, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.1ac) [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %.loc27_37.21: %Destroy.type = converted constants.%Optional.410, %Destroy.facet.loc27_37.4 [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc27_37.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc27_37.8) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc27_37.3: = bound_method %.loc27_37.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27_37.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc27_37.3(%.loc27_37.8) -// CHECK:STDOUT: %impl.elem2.loc27_37.2: @TestIterate.%.loc27_37.22 (%.817) = impl_witness_access constants.%Destroy.lookup_impl_witness.a78, element2 [symbolic = %impl.elem2.loc27_37.4 (constants.%impl.elem2.25c)] -// CHECK:STDOUT: %bound_method.loc27_37.7: = bound_method %var, %impl.elem2.loc27_37.2 -// CHECK:STDOUT: %.loc27_37.18: %Destroy.type = converted constants.%as_type.400, constants.%impl.elem1.0e3 [symbolic = %impl.elem1 (constants.%impl.elem1.0e3)] -// CHECK:STDOUT: %.loc27_37.19: %Destroy.type = converted constants.%as_type.400, constants.%impl.elem1.0e3 [symbolic = %impl.elem1 (constants.%impl.elem1.0e3)] -// CHECK:STDOUT: %specific_impl_fn.loc27_37.3: = specific_impl_function %impl.elem2.loc27_37.2, @Destroy.WithSelf.SelfDestruct.1(constants.%impl.elem1.0e3) [symbolic = %specific_impl_fn.loc27_37.6 (constants.%specific_impl_fn.26e)] -// CHECK:STDOUT: %bound_method.loc27_37.8: = bound_method %var, %specific_impl_fn.loc27_37.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27_37.4: init %empty_tuple.type = call %bound_method.loc27_37.8(%var) +// CHECK:STDOUT: %Destroy.facet.loc27_37.5: %Destroy.type = facet_value constants.%Optional.410, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.1ac) [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %.loc27_37.22: %Destroy.type = converted constants.%Optional.410, %Destroy.facet.loc27_37.5 [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %Destroy.facet.loc27_37.6: %Destroy.type = facet_value constants.%Optional.410, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.1ac) [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %.loc27_37.23: %Destroy.type = converted constants.%Optional.410, %Destroy.facet.loc27_37.6 [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc27_37.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc27_37.8) +// CHECK:STDOUT: %.loc27_37.24: %Destroy.type = converted constants.%as_type.151, constants.%impl.elem1.ccc [symbolic = %impl.elem1 (constants.%impl.elem1.ccc)] +// CHECK:STDOUT: %.loc27_37.25: %Destroy.type = converted constants.%as_type.151, constants.%impl.elem1.ccc [symbolic = %impl.elem1 (constants.%impl.elem1.ccc)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc27_37.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_37.1(%self.param: ref %.8a2) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc27_37.1(%self.param: ref %.8a2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27_37.1(%self.param: ref %.8a2) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc27_37.2(%self.param: ref %MaybeUnformed.c80) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc27_37.1(%self.param: ref %.8a2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc27_37.3(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_37.2(%self.param: ref %MaybeUnformed.0ed) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27_37.2(%self.param: ref %MaybeUnformed.0ed) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc27_37.2(%self.param: ref %MaybeUnformed.0ed) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_37.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27_37.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc27_37.3(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_37.4(%self.param: ref %struct_type.value.has_value.43a) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc27_37.4(%self.param: ref %struct_type.value.has_value.25d) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc27_37.1: ref bool = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc27_37.1: = bound_method %.loc27_37.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27_37.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc27_37.1(%.loc27_37.1) -// CHECK:STDOUT: %.loc27_37.2: ref %MaybeUnformed.0ed = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc27_37.2: = bound_method %.loc27_37.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27_37.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc27_37.2(%.loc27_37.2) +// CHECK:STDOUT: %Destroy.facet.loc27_37.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc27_37.2: %Destroy.type = converted bool, %Destroy.facet.loc27_37.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc27_37.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc27_37.3: %Destroy.type = converted bool, %Destroy.facet.loc27_37.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc27_37.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc27_37.1) +// CHECK:STDOUT: %.loc27_37.4: ref %MaybeUnformed.c80 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc27_37.3: %Destroy.type = facet_value constants.%MaybeUnformed.c80, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.848) [concrete = constants.%Destroy.facet.85c] +// CHECK:STDOUT: %.loc27_37.5: %Destroy.type = converted constants.%MaybeUnformed.c80, %Destroy.facet.loc27_37.3 [concrete = constants.%Destroy.facet.85c] +// CHECK:STDOUT: %Destroy.facet.loc27_37.4: %Destroy.type = facet_value constants.%MaybeUnformed.c80, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.848) [concrete = constants.%Destroy.facet.85c] +// CHECK:STDOUT: %.loc27_37.6: %Destroy.type = converted constants.%MaybeUnformed.c80, %Destroy.facet.loc27_37.4 [concrete = constants.%Destroy.facet.85c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc27_37.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc27_37.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27_37.4(%self.param: ref %struct_type.value.has_value.43a) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc27_37.4(%self.param: ref %struct_type.value.has_value.43a) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc27_37.5(%self.param: ref %DefaultOptionalStorage.827) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_37.5(%self.param: ref %DefaultOptionalStorage.455) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.cd8 = name_ref has_value, imports.%Core.import_ref.b03 [concrete = imports.%field_decl.390] +// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.099 = name_ref has_value, imports.%Core.import_ref.9ce [concrete = imports.%field_decl.dbe] // CHECK:STDOUT: %.loc27_37.1: ref bool = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc27_37.1: = bound_method %.loc27_37.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27_37.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc27_37.1(%.loc27_37.1) -// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.2c5 = name_ref value, imports.%Core.import_ref.51c9 [concrete = imports.%field_decl.498] -// CHECK:STDOUT: %.loc27_37.2: ref %MaybeUnformed.0ed = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc27_37.2: = bound_method %.loc27_37.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27_37.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc27_37.2(%.loc27_37.2) +// CHECK:STDOUT: %Destroy.facet.loc27_37.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc27_37.2: %Destroy.type = converted bool, %Destroy.facet.loc27_37.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc27_37.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc27_37.3: %Destroy.type = converted bool, %Destroy.facet.loc27_37.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc27_37.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc27_37.1) +// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.02a = name_ref value, imports.%Core.import_ref.e86 [concrete = imports.%field_decl.bce] +// CHECK:STDOUT: %.loc27_37.4: ref %MaybeUnformed.c80 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc27_37.3: %Destroy.type = facet_value constants.%MaybeUnformed.c80, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.848) [concrete = constants.%Destroy.facet.85c] +// CHECK:STDOUT: %.loc27_37.5: %Destroy.type = converted constants.%MaybeUnformed.c80, %Destroy.facet.loc27_37.3 [concrete = constants.%Destroy.facet.85c] +// CHECK:STDOUT: %Destroy.facet.loc27_37.4: %Destroy.type = facet_value constants.%MaybeUnformed.c80, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.848) [concrete = constants.%Destroy.facet.85c] +// CHECK:STDOUT: %.loc27_37.6: %Destroy.type = converted constants.%MaybeUnformed.c80, %Destroy.facet.loc27_37.4 [concrete = constants.%Destroy.facet.85c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc27_37.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc27_37.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27_37.5(%self.param: ref %DefaultOptionalStorage.455) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc27_37.5(%self.param: ref %DefaultOptionalStorage.455) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27_37.6(%self.param: ref %Optional.343) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27_37.6(%self.param: ref %Optional.343) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc27_37.6(%self.param: ref %Optional.343) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc27_37.6(%self.param: ref %Optional.410) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TestRangeFor(%r.param: ref %Range) { // CHECK:STDOUT: !entry: @@ -2855,13 +2424,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %_.patt: %pattern_type.804 = value_binding_pattern _ [concrete = constants.%_.patt.a10] // CHECK:STDOUT: } // CHECK:STDOUT: %r.ref: ref %Range = name_ref r, %r -// CHECK:STDOUT: %impl.elem2: %.f2a = impl_witness_access constants.%Iterate.impl_witness.e03, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.60e] +// CHECK:STDOUT: %impl.elem2: %.da1 = impl_witness_access constants.%Iterate.impl_witness.ac1, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.edd] // CHECK:STDOUT: %bound_method.loc37_37.1: = bound_method %r.ref, %impl.elem2 -// CHECK:STDOUT: %facet_value.loc37_37.1: %CppRange_where.type.d682d6.1 = facet_value constants.%Range, (constants.%custom_witness.090, constants.%custom_witness.eaa, constants.%custom_witness.6bd, constants.%custom_witness.716, constants.%custom_witness.f93, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.eaa) [concrete = constants.%facet_value.8e3] -// CHECK:STDOUT: %.loc37_37.1: %CppRange_where.type.d682d6.1 = converted constants.%Range, %facet_value.loc37_37.1 [concrete = constants.%facet_value.8e3] -// CHECK:STDOUT: %facet_value.loc37_37.2: %CppRange_where.type.d682d6.1 = facet_value constants.%Range, (constants.%custom_witness.090, constants.%custom_witness.eaa, constants.%custom_witness.6bd, constants.%custom_witness.716, constants.%custom_witness.f93, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.eaa) [concrete = constants.%facet_value.8e3] -// CHECK:STDOUT: %.loc37_37.2: %CppRange_where.type.d682d6.1 = converted constants.%Range, %facet_value.loc37_37.2 [concrete = constants.%facet_value.8e3] -// CHECK:STDOUT: %specific_fn.loc37_37.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.8e3) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] +// CHECK:STDOUT: %facet_value.loc37_37.1: %CppRange_where.type.d682d6.1 = facet_value constants.%Range, (constants.%custom_witness.090, constants.%custom_witness.51e, constants.%DestroyImpl.impl_witness.e3a, constants.%custom_witness.6bd, constants.%custom_witness.716, constants.%custom_witness.f93, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.efc, constants.%custom_witness.d0da43.1, constants.%custom_witness.51e, constants.%DestroyImpl.impl_witness.e3a) [concrete = constants.%facet_value.732] +// CHECK:STDOUT: %.loc37_37.1: %CppRange_where.type.d682d6.1 = converted constants.%Range, %facet_value.loc37_37.1 [concrete = constants.%facet_value.732] +// CHECK:STDOUT: %facet_value.loc37_37.2: %CppRange_where.type.d682d6.1 = facet_value constants.%Range, (constants.%custom_witness.090, constants.%custom_witness.51e, constants.%DestroyImpl.impl_witness.e3a, constants.%custom_witness.6bd, constants.%custom_witness.716, constants.%custom_witness.f93, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.efc, constants.%custom_witness.d0da43.1, constants.%custom_witness.51e, constants.%DestroyImpl.impl_witness.e3a) [concrete = constants.%facet_value.732] +// CHECK:STDOUT: %.loc37_37.2: %CppRange_where.type.d682d6.1 = converted constants.%Range, %facet_value.loc37_37.2 [concrete = constants.%facet_value.732] +// CHECK:STDOUT: %specific_fn.loc37_37.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.732) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc37_37.2: = bound_method %r.ref, %specific_fn.loc37_37.1 // CHECK:STDOUT: %var: ref %tuple.type.9ef = var_storage invalid // CHECK:STDOUT: %.loc37_36.1: %Range = acquire_value %r.ref @@ -2870,37 +2439,37 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3: %.96e = impl_witness_access constants.%Iterate.impl_witness.e03, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.23c] +// CHECK:STDOUT: %impl.elem3: %.604 = impl_witness_access constants.%Iterate.impl_witness.ac1, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.842] // CHECK:STDOUT: %bound_method.loc37_37.3: = bound_method %r.ref, %impl.elem3 -// CHECK:STDOUT: %facet_value.loc37_37.3: %CppRange_where.type.d682d6.1 = facet_value constants.%Range, (constants.%custom_witness.090, constants.%custom_witness.eaa, constants.%custom_witness.6bd, constants.%custom_witness.716, constants.%custom_witness.f93, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.eaa) [concrete = constants.%facet_value.8e3] -// CHECK:STDOUT: %.loc37_37.3: %CppRange_where.type.d682d6.1 = converted constants.%Range, %facet_value.loc37_37.3 [concrete = constants.%facet_value.8e3] -// CHECK:STDOUT: %facet_value.loc37_37.4: %CppRange_where.type.d682d6.1 = facet_value constants.%Range, (constants.%custom_witness.090, constants.%custom_witness.eaa, constants.%custom_witness.6bd, constants.%custom_witness.716, constants.%custom_witness.f93, constants.%custom_witness.1bfa2a.1, constants.%custom_witness.d0da43.1, constants.%custom_witness.eaa) [concrete = constants.%facet_value.8e3] -// CHECK:STDOUT: %.loc37_37.4: %CppRange_where.type.d682d6.1 = converted constants.%Range, %facet_value.loc37_37.4 [concrete = constants.%facet_value.8e3] -// CHECK:STDOUT: %specific_fn.loc37_37.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.8e3) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] +// CHECK:STDOUT: %facet_value.loc37_37.3: %CppRange_where.type.d682d6.1 = facet_value constants.%Range, (constants.%custom_witness.090, constants.%custom_witness.51e, constants.%DestroyImpl.impl_witness.e3a, constants.%custom_witness.6bd, constants.%custom_witness.716, constants.%custom_witness.f93, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.efc, constants.%custom_witness.d0da43.1, constants.%custom_witness.51e, constants.%DestroyImpl.impl_witness.e3a) [concrete = constants.%facet_value.732] +// CHECK:STDOUT: %.loc37_37.3: %CppRange_where.type.d682d6.1 = converted constants.%Range, %facet_value.loc37_37.3 [concrete = constants.%facet_value.732] +// CHECK:STDOUT: %facet_value.loc37_37.4: %CppRange_where.type.d682d6.1 = facet_value constants.%Range, (constants.%custom_witness.090, constants.%custom_witness.51e, constants.%DestroyImpl.impl_witness.e3a, constants.%custom_witness.6bd, constants.%custom_witness.716, constants.%custom_witness.f93, constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.efc, constants.%custom_witness.d0da43.1, constants.%custom_witness.51e, constants.%DestroyImpl.impl_witness.e3a) [concrete = constants.%facet_value.732] +// CHECK:STDOUT: %.loc37_37.4: %CppRange_where.type.d682d6.1 = converted constants.%Range, %facet_value.loc37_37.4 [concrete = constants.%facet_value.732] +// CHECK:STDOUT: %specific_fn.loc37_37.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.732) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc37_37.4: = bound_method %r.ref, %specific_fn.loc37_37.2 -// CHECK:STDOUT: %.loc37_37.5: ref %Optional.343 = temporary_storage +// CHECK:STDOUT: %.loc37_37.5: ref %Optional.410 = temporary_storage // CHECK:STDOUT: %.loc37_36.2: %Range = acquire_value %r.ref -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.343 to %.loc37_37.5 = call %bound_method.loc37_37.4(%.loc37_36.2, %var) -// CHECK:STDOUT: %.loc37_37.6: ref %Optional.343 = temporary %.loc37_37.5, %T.as_type.as.Iterate.impl.Next.call -// CHECK:STDOUT: %.loc37_37.7: %Optional.HasValue.type.8ad = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.f35) [concrete = constants.%Optional.HasValue.1ff] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.8ad = name_ref HasValue, %.loc37_37.7 [concrete = constants.%Optional.HasValue.1ff] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.410 to %.loc37_37.5 = call %bound_method.loc37_37.4(%.loc37_36.2, %var) +// CHECK:STDOUT: %.loc37_37.6: ref %Optional.410 = temporary %.loc37_37.5, %T.as_type.as.Iterate.impl.Next.call +// CHECK:STDOUT: %.loc37_37.7: %Optional.HasValue.type.6dc = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.6b8) [concrete = constants.%Optional.HasValue.5e3] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.6dc = name_ref HasValue, %.loc37_37.7 [concrete = constants.%Optional.HasValue.5e3] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc37_37.6, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.f35) [concrete = constants.%Optional.HasValue.specific_fn.9b3] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.6b8) [concrete = constants.%Optional.HasValue.specific_fn.c7c] // CHECK:STDOUT: %bound_method.loc37_37.5: = bound_method %.loc37_37.6, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc37_37.8: %Optional.343 = acquire_value %.loc37_37.6 +// CHECK:STDOUT: %.loc37_37.8: %Optional.410 = acquire_value %.loc37_37.6 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc37_37.5(%.loc37_37.8) // CHECK:STDOUT: %.loc37_37.9: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc37_37.10: bool = converted %Optional.HasValue.call, %.loc37_37.9 // CHECK:STDOUT: if %.loc37_37.10 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc37_37.11: %Optional.Get.type.481 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.f35) [concrete = constants.%Optional.Get.3b7] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.481 = name_ref Get, %.loc37_37.11 [concrete = constants.%Optional.Get.3b7] +// CHECK:STDOUT: %.loc37_37.11: %Optional.Get.type.ecf = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.6b8) [concrete = constants.%Optional.Get.e07] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.ecf = name_ref Get, %.loc37_37.11 [concrete = constants.%Optional.Get.e07] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc37_37.6, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.f35) [concrete = constants.%Optional.Get.specific_fn.dd9] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.6b8) [concrete = constants.%Optional.Get.specific_fn.050] // CHECK:STDOUT: %bound_method.loc37_37.6: = bound_method %.loc37_37.6, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc37_37.12: ref %OverloadValueType = temporary_storage -// CHECK:STDOUT: %.loc37_37.13: %Optional.343 = acquire_value %.loc37_37.6 +// CHECK:STDOUT: %.loc37_37.13: %Optional.410 = acquire_value %.loc37_37.6 // CHECK:STDOUT: %Optional.Get.call: init %OverloadValueType to %.loc37_37.12 = call %bound_method.loc37_37.6(%.loc37_37.13) // CHECK:STDOUT: %.loc37_37.14: ref %OverloadValueType = temporary %.loc37_37.12, %Optional.Get.call // CHECK:STDOUT: %.loc37_37.15: %OverloadValueType = acquire_value %.loc37_37.14 @@ -2909,17 +2478,33 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %OverloadValueType.ref: type = name_ref OverloadValueType, imports.%OverloadValueType.decl [concrete = constants.%OverloadValueType] // CHECK:STDOUT: } // CHECK:STDOUT: %_: %OverloadValueType = wrapper_binding _, %.loc37_37.15 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc37_37.1: = bound_method %.loc37_37.14, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc37_37.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc37_37.1(%.loc37_37.14) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc37_37.2: = bound_method %.loc37_37.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc37_37.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc37_37.2(%.loc37_37.6) +// CHECK:STDOUT: %Destroy.facet.loc37_37.1: %Destroy.type = facet_value constants.%OverloadValueType, (constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.efc) [concrete = constants.%Destroy.facet.45f] +// CHECK:STDOUT: %.loc37_37.16: %Destroy.type = converted constants.%OverloadValueType, %Destroy.facet.loc37_37.1 [concrete = constants.%Destroy.facet.45f] +// CHECK:STDOUT: %Destroy.facet.loc37_37.2: %Destroy.type = facet_value constants.%OverloadValueType, (constants.%custom_witness.5760f4.1, constants.%DestroyImpl.impl_witness.efc) [concrete = constants.%Destroy.facet.45f] +// CHECK:STDOUT: %.loc37_37.17: %Destroy.type = converted constants.%OverloadValueType, %Destroy.facet.loc37_37.2 [concrete = constants.%Destroy.facet.45f] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc37_37.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc37_37.14) +// CHECK:STDOUT: %Destroy.facet.loc37_37.3: %Destroy.type = facet_value constants.%Optional.410, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.1ac) [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %.loc37_37.18: %Destroy.type = converted constants.%Optional.410, %Destroy.facet.loc37_37.3 [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %Destroy.facet.loc37_37.4: %Destroy.type = facet_value constants.%Optional.410, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.1ac) [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %.loc37_37.19: %Destroy.type = converted constants.%Optional.410, %Destroy.facet.loc37_37.4 [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc37_37.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc37_37.6) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc37_37.3: = bound_method %.loc37_37.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc37_37.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc37_37.3(%.loc37_37.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc37_37.4: = bound_method %var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc37_37.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc37_37.4(%var) +// CHECK:STDOUT: %Destroy.facet.loc37_37.5: %Destroy.type = facet_value constants.%Optional.410, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.1ac) [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %.loc37_37.20: %Destroy.type = converted constants.%Optional.410, %Destroy.facet.loc37_37.5 [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %Destroy.facet.loc37_37.6: %Destroy.type = facet_value constants.%Optional.410, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.1ac) [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: %.loc37_37.21: %Destroy.type = converted constants.%Optional.410, %Destroy.facet.loc37_37.6 [concrete = constants.%Destroy.facet.25e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc37_37.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc37_37.6) +// CHECK:STDOUT: %Destroy.facet.loc37_37.7: %Destroy.type = facet_value constants.%tuple.type.9ef, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.c0f) [concrete = constants.%Destroy.facet.76b] +// CHECK:STDOUT: %.loc37_37.22: %Destroy.type = converted constants.%tuple.type.9ef, %Destroy.facet.loc37_37.7 [concrete = constants.%Destroy.facet.76b] +// CHECK:STDOUT: %Destroy.facet.loc37_37.8: %Destroy.type = facet_value constants.%tuple.type.9ef, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.c0f) [concrete = constants.%Destroy.facet.76b] +// CHECK:STDOUT: %.loc37_37.23: %Destroy.type = converted constants.%tuple.type.9ef, %Destroy.facet.loc37_37.8 [concrete = constants.%Destroy.facet.76b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc37_37.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2927,14 +2512,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %R.patt.loc25_17.2 => constants.%R.patt // CHECK:STDOUT: %R.loc25_17.1 => constants.%R // CHECK:STDOUT: %R.as_type.loc25_83.1 => constants.%R.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.a47 -// CHECK:STDOUT: %r.patt.loc25_81.2 => constants.%r.patt.24d -// CHECK:STDOUT: %r.param_patt.loc25_76.2 => constants.%r.param_patt.d5b +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.45b +// CHECK:STDOUT: %r.patt.loc25_81.2 => constants.%r.patt.9b3 +// CHECK:STDOUT: %r.param_patt.loc25_76.2 => constants.%r.param_patt.c29 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.637) { +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.b75) { // CHECK:STDOUT: %R.patt.loc25_17.2 => constants.%R.patt -// CHECK:STDOUT: %R.loc25_17.1 => constants.%facet_value.637 +// CHECK:STDOUT: %R.loc25_17.1 => constants.%facet_value.b75 // CHECK:STDOUT: %R.as_type.loc25_83.1 => constants.%Range // CHECK:STDOUT: %pattern_type => constants.%pattern_type.23f // CHECK:STDOUT: %r.patt.loc25_81.2 => constants.%r.patt.b9f @@ -2942,24 +2527,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc25 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.e03 -// CHECK:STDOUT: %Iterate.facet.loc27_37.5 => constants.%Iterate.facet.a3e -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.b10 -// CHECK:STDOUT: %.loc27_37.20 => constants.%.f2a -// CHECK:STDOUT: %impl.elem2.loc27_37.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.60e -// CHECK:STDOUT: %specific_impl_fn.loc27_37.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn -// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.c69 +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.ac1 +// CHECK:STDOUT: %Iterate.facet.loc27_37.5 => constants.%Iterate.facet.5bf +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.a0e +// CHECK:STDOUT: %.loc27_37.26 => constants.%.da1 +// CHECK:STDOUT: %impl.elem2.loc27_37.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.edd +// CHECK:STDOUT: %specific_impl_fn.loc27_37.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn +// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.76b // CHECK:STDOUT: %as_type => constants.%tuple.type.9ef // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.e35 -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.42b -// CHECK:STDOUT: %.loc27_37.21 => constants.%.96e -// CHECK:STDOUT: %impl.elem3.loc27_37.2 => constants.%T.as_type.as.Iterate.impl.Next.23c -// CHECK:STDOUT: %specific_impl_fn.loc27_37.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.106 -// CHECK:STDOUT: %.loc27_37.22 => constants.%.227 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.8 -// CHECK:STDOUT: %impl.elem2.loc27_37.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 -// CHECK:STDOUT: %specific_impl_fn.loc27_37.6 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.ce4 +// CHECK:STDOUT: %.loc27_37.27 => constants.%.604 +// CHECK:STDOUT: %impl.elem3.loc27_37.2 => constants.%T.as_type.as.Iterate.impl.Next.842 +// CHECK:STDOUT: %specific_impl_fn.loc27_37.4 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn +// CHECK:STDOUT: %SelfDestruct.specific_fn.5 => constants.%SelfDestruct.specific_fn.ddf // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- adl_return_same_types.carbon @@ -2968,31 +2549,37 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %facet_type.bd0: type = facet_type <@Copy & @Destroy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.Get.2d0: %Optional.Get.type.786 = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f2f: %Optional.HasValue.type.3ea = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.74b: type = facet_access_type %T.283 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.28a: = lookup_impl_witness %T.283, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.16e: %Destroy.type = facet_value %T.as_type.74b, (%Destroy.lookup_impl_witness.28a) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.91c: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.16e) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.ade: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.b49: type = unbound_element_type %DefaultOptionalStorage.ade, bool [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.229: type = unbound_element_type %DefaultOptionalStorage.ade, %MaybeUnformed.91c [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.2f2: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.884: %T.as_type.as.OptionalStorage.impl.Get.type.2f2 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.d28: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.f29: %T.as_type.as.OptionalStorage.impl.Has.type.d28 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.760: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.268: %T.as_type.as.OptionalStorage.impl.Some.type.760 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.925: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.f42: %T.as_type.as.OptionalStorage.impl.None.type.925 = struct_value () [symbolic] +// CHECK:STDOUT: %T.f84392.1: %facet_type.bd0 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.c1cc3e.1: type = facet_access_type %T.f84392.1 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.70f: = lookup_impl_witness %T.f84392.1, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.bf2: = lookup_impl_witness %T.f84392.1, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.dc4: %Destroy.type = facet_value %T.as_type.c1cc3e.1, (%SubobjectDestroy.lookup_impl_witness.70f, %DestroyImpl.lookup_impl_witness.bf2) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.348: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.dc4) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.476: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.4a2: type = unbound_element_type %DefaultOptionalStorage.476, bool [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.ff3: type = unbound_element_type %DefaultOptionalStorage.476, %MaybeUnformed.348 [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.f27: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.e40: %T.as_type.as.OptionalStorage.impl.Get.type.f27 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.18e: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.463: %T.as_type.as.OptionalStorage.impl.Has.type.18e = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.292: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.ae9: %T.as_type.as.OptionalStorage.impl.Some.type.292 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.b57: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.791: %T.as_type.as.OptionalStorage.impl.None.type.b57 = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] @@ -3002,76 +2589,75 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d3, @CppUnsafeDeref [symbolic_self] // CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] // CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] -// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.f45530.3: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.5a8: %T.as_type.as.Iterate.impl.Next.type.d4a = struct_value () [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.3, @CppRangeForIterate [symbolic] // CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] // CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.8a1: %T.as_type.as.Iterate.impl.NewCursor.type.8fb = struct_value () [symbolic] // CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] // CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.dc9: = lookup_impl_witness %tuple.type.1ba, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.504: = lookup_impl_witness %tuple.type.1ba, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.9b6: %Destroy.type = facet_value %tuple.type.1ba, (%SubobjectDestroy.lookup_impl_witness.dc9, %DestroyImpl.lookup_impl_witness.504) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.b15da7.2: = lookup_impl_witness %impl.elem0.493765.2, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.4e7f44.2: = lookup_impl_witness %impl.elem0.493765.2, @DestroyImpl [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %facet_value.189: %facet_type.bd0 = facet_value %impl.elem0.493765.2, (%SubobjectDestroy.lookup_impl_witness.b15da7.2, %DestroyImpl.lookup_impl_witness.4e7f44.2, %Copy.lookup_impl_witness.167) [symbolic] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %f64.761: type = class_type @Float, @Float(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.667: type = pattern_type %f64.761 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.2: = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01daf.2, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc20 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.47f: %SubobjectDestroy.type = facet_value %f64.761, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a23: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.47f) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.e8d: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.fe9: %Float.as.Copy.impl.Op.type.e8d = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.eac: = impl_witness imports.%Copy.impl_witness_table.14d, @Float.as.Copy.impl(%int_64) [concrete] -// CHECK:STDOUT: %facet_value.1d1: %facet_type.f48 = facet_value %f64.761, (%custom_witness.f8f19d.2, %Copy.impl_witness.eac) [concrete] +// CHECK:STDOUT: %facet_value.0d3: %facet_type.bd0 = facet_value %f64.761, (%custom_witness.b80ef6.2, %DestroyImpl.impl_witness.a23, %Copy.impl_witness.eac) [concrete] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %Iterate_where.type.11d: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.1d1> [concrete] -// CHECK:STDOUT: %pattern_type.999: type = pattern_type %Iterate_where.type.11d [concrete] -// CHECK:STDOUT: %R.patt: %pattern_type.999 = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R: %Iterate_where.type.11d = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %impl.elem0.4ce: %facet_type.bd0 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %Iterate_where.type.a66: type = facet_type <@Iterate where %impl.elem0.4ce = %facet_value.0d3> [concrete] +// CHECK:STDOUT: %pattern_type.ec9: type = pattern_type %Iterate_where.type.a66 [concrete] +// CHECK:STDOUT: %R.patt: %pattern_type.ec9 = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.a66 = symbolic_binding R, 0 [symbolic] // CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] -// CHECK:STDOUT: %pattern_type.874: type = pattern_type %R.as_type [symbolic] -// CHECK:STDOUT: %r.param_patt.ef5: %pattern_type.874 = value_param_pattern [symbolic] -// CHECK:STDOUT: %r.patt.c43: %pattern_type.874 = wrapper_binding_pattern r, %r.param_patt.ef5 [symbolic] +// CHECK:STDOUT: %pattern_type.c3b: type = pattern_type %R.as_type [symbolic] +// CHECK:STDOUT: %r.param_patt.304: %pattern_type.c3b = value_param_pattern [symbolic] +// CHECK:STDOUT: %r.patt.240: %pattern_type.c3b = wrapper_binding_pattern r, %r.param_patt.304 [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.667 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.e7e: = lookup_impl_witness %R, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.a43: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.e7e) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.248: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.a43) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.9a9: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.a43) [symbolic] -// CHECK:STDOUT: %.678: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.248, %Iterate.facet.a43 [symbolic] -// CHECK:STDOUT: %impl.elem2.e3e: %.678 = impl_witness_access %Iterate.lookup_impl_witness.e7e, element2 [symbolic] -// CHECK:STDOUT: %impl.elem1.2af: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.e7e, element1 [symbolic] -// CHECK:STDOUT: %as_type.ba7: type = facet_access_type %impl.elem1.2af [symbolic] -// CHECK:STDOUT: %specific_impl_fn.0ea: = specific_impl_function %impl.elem2.e3e, @Iterate.WithSelf.NewCursor(%Iterate.facet.a43) [symbolic] -// CHECK:STDOUT: %.fe7: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.9a9, %Iterate.facet.a43 [symbolic] -// CHECK:STDOUT: %impl.elem3.ae5: %.fe7 = impl_witness_access %Iterate.lookup_impl_witness.e7e, element3 [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.6ea: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.1d1) [concrete] -// CHECK:STDOUT: %OptionalStorage.impl_witness.49d: = impl_witness imports.%OptionalStorage.impl_witness_table.460, @T.as_type.as.OptionalStorage.impl(%facet_value.1d1) [concrete] -// CHECK:STDOUT: %OptionalStorage.facet.d7a: %OptionalStorage.type = facet_value %f64.761, (%OptionalStorage.impl_witness.49d) [concrete] -// CHECK:STDOUT: %Optional.000: type = class_type @Optional, @Optional(%OptionalStorage.facet.d7a) [concrete] -// CHECK:STDOUT: %pattern_type.40d: type = pattern_type %Optional.000 [concrete] -// CHECK:STDOUT: %specific_impl_fn.493: = specific_impl_function %impl.elem3.ae5, @Iterate.WithSelf.Next(%Iterate.facet.a43) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.92f: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.d7a) [concrete] -// CHECK:STDOUT: %Optional.HasValue.ff5: %Optional.HasValue.type.92f = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.695: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.d7a) [concrete] -// CHECK:STDOUT: %Optional.Get.62a: %Optional.Get.type.695 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.bb7: %Destroy.type = facet_value %f64.761, (%custom_witness.f8f19d.2) [concrete] -// CHECK:STDOUT: %MaybeUnformed.912: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.bb7) [concrete] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.6fa: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.e8c: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.6fa) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.a57: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.e8c) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.01e: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.e8c) [symbolic] +// CHECK:STDOUT: %.b10: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.a57, %Iterate.facet.e8c [symbolic] +// CHECK:STDOUT: %impl.elem2.81a: %.b10 = impl_witness_access %Iterate.lookup_impl_witness.6fa, element2 [symbolic] +// CHECK:STDOUT: %impl.elem1.7dd: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.6fa, element1 [symbolic] +// CHECK:STDOUT: %as_type.deb: type = facet_access_type %impl.elem1.7dd [symbolic] +// CHECK:STDOUT: %specific_impl_fn.6ec: = specific_impl_function %impl.elem2.81a, @Iterate.WithSelf.NewCursor(%Iterate.facet.e8c) [symbolic] +// CHECK:STDOUT: %.063: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.01e, %Iterate.facet.e8c [symbolic] +// CHECK:STDOUT: %impl.elem3.ae5: %.063 = impl_witness_access %Iterate.lookup_impl_witness.6fa, element3 [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.f55: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.0d3) [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness.050: = impl_witness imports.%OptionalStorage.impl_witness_table.1c4, @T.as_type.as.OptionalStorage.impl(%facet_value.0d3) [concrete] +// CHECK:STDOUT: %OptionalStorage.facet.19f: %OptionalStorage.type = facet_value %f64.761, (%OptionalStorage.impl_witness.050) [concrete] +// CHECK:STDOUT: %Optional.ebe: type = class_type @Optional, @Optional(%OptionalStorage.facet.19f) [concrete] +// CHECK:STDOUT: %specific_impl_fn.2e1: = specific_impl_function %impl.elem3.ae5, @Iterate.WithSelf.Next(%Iterate.facet.e8c) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.1cf: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.19f) [concrete] +// CHECK:STDOUT: %Optional.HasValue.768: %Optional.HasValue.type.1cf = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.b2d: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.19f) [concrete] +// CHECK:STDOUT: %Optional.Get.f12: %Optional.Get.type.b2d = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.facet.941: %Destroy.type = facet_value %f64.761, (%custom_witness.b80ef6.2, %DestroyImpl.impl_witness.a23) [concrete] +// CHECK:STDOUT: %MaybeUnformed.f92: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.941) [concrete] // CHECK:STDOUT: %.ecc: type = maybe_unformed_type %f64.761 [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.9ab: type = unbound_element_type %DefaultOptionalStorage.6ea, %MaybeUnformed.912 [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.b33: type = unbound_element_type %DefaultOptionalStorage.6ea, bool [concrete] -// CHECK:STDOUT: %struct_type.value.has_value.82f: type = struct_type {.value: %MaybeUnformed.912, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn.315: = specific_function %Optional.HasValue.ff5, @Optional.HasValue(%OptionalStorage.facet.d7a) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn.570: = specific_function %Optional.Get.62a, @Optional.Get(%OptionalStorage.facet.d7a) [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.345: type = unbound_element_type %DefaultOptionalStorage.f55, %MaybeUnformed.f92 [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.34a: type = unbound_element_type %DefaultOptionalStorage.f55, bool [concrete] +// CHECK:STDOUT: %struct_type.value.has_value.e0a: type = struct_type {.value: %MaybeUnformed.f92, .has_value: bool} [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.89a: = specific_function %Optional.HasValue.768, @Optional.HasValue(%OptionalStorage.facet.19f) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.67e: = specific_function %Optional.Get.f12, @Optional.Get(%OptionalStorage.facet.19f) [concrete] // CHECK:STDOUT: %AddAssignWith.type.0c5: type = facet_type <@AddAssignWith, @AddAssignWith(%f64.761)> [concrete] // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.type.763: type = fn_type @Float.as.AddAssignWith.impl.Op, @Float.as.AddAssignWith.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.8aa: %Float.as.AddAssignWith.impl.Op.type.763 = struct_value () [symbolic] @@ -3082,57 +2668,24 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.bb6: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%f64.761, %AddAssignWith.facet) [concrete] // CHECK:STDOUT: %.48b: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.bb6, %AddAssignWith.facet [concrete] // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.specific_fn: = specific_function %Float.as.AddAssignWith.impl.Op.e04, @Float.as.AddAssignWith.impl.Op(%int_64) [concrete] -// CHECK:STDOUT: %pattern_type.d8c: type = pattern_type %.ecc [concrete] -// CHECK:STDOUT: %self.param_patt.5ca: %pattern_type.d8c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f3: %pattern_type.d8c = wrapper_binding_pattern self, %self.param_patt.5ca [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc24_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.007: type = pattern_type %MaybeUnformed.912 [concrete] -// CHECK:STDOUT: %self.param_patt.6cf: %pattern_type.007 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b4d: %pattern_type.007 = wrapper_binding_pattern self, %self.param_patt.6cf [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc24_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc24_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.28d: type = pattern_type %struct_type.value.has_value.82f [concrete] -// CHECK:STDOUT: %self.param_patt.f24: %pattern_type.28d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.396: %pattern_type.28d = wrapper_binding_pattern self, %self.param_patt.f24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_19.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc24_19.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.ee1: type = pattern_type %DefaultOptionalStorage.6ea [concrete] -// CHECK:STDOUT: %self.param_patt.d5d: %pattern_type.ee1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.aa9: %pattern_type.ee1 = wrapper_binding_pattern self, %self.param_patt.d5d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_19.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc24_19.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.4ac: %pattern_type.40d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1ec: %pattern_type.40d = wrapper_binding_pattern self, %self.param_patt.4ac [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24_19.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc24_19.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24_19.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.8: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.cb1: = lookup_impl_witness %impl.elem1.2af, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.a48: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1.2af) [symbolic] -// CHECK:STDOUT: %.421: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.a48, %impl.elem1.2af [symbolic] -// CHECK:STDOUT: %impl.elem2.f8d: %.421 = impl_witness_access %Destroy.lookup_impl_witness.cb1, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.6a1: = specific_impl_function %impl.elem2.f8d, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1.2af) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_19.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_19.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.80c: %Destroy.type = facet_value bool, (%custom_witness.b80ef6.5, %DestroyImpl.impl_witness.778) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.708: %SubobjectDestroy.type = facet_value %MaybeUnformed.f92, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6fa: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.708) [concrete] +// CHECK:STDOUT: %Destroy.facet.489: %Destroy.type = facet_value %MaybeUnformed.f92, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.6fa) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.8: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24_19.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.8: %SubobjectDestroy.WithSelf.Op.type.6870fd.8 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.8: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.8), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.cdd: %SubobjectDestroy.type = facet_value %Optional.ebe, (%custom_witness.b80ef6.8) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cdd) [concrete] +// CHECK:STDOUT: %Destroy.facet.54d: %Destroy.type = facet_value %Optional.ebe, (%custom_witness.b80ef6.8, %DestroyImpl.impl_witness.6e5) [concrete] // CHECK:STDOUT: %ConstRange: type = class_type @ConstRange [concrete] // CHECK:STDOUT: %pattern_type.025: type = pattern_type %ConstRange [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -3143,189 +2696,95 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %End.type: type = fn_type @End [concrete] // CHECK:STDOUT: %End: %End.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.5d5: = custom_witness (%Iterator, %Iterator, %Begin, %End), @CppRangeForIterate [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.9: type = fn_type @Destroy.WithSelf.Op.loc31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.9: %Destroy.WithSelf.Op.type.ef016f.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9: type = fn_type @Destroy.WithSelf.SelfDestruct.loc31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.9: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9 = struct_value () [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.type: type = fn_type @Iterator.SubobjectDestroy [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy: %Iterator.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.b76: = custom_witness (%Destroy.WithSelf.Op.403171.9, %Iterator.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.9), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.ac7e09.1: type = fn_type @Iterator.Op.1 [concrete] // CHECK:STDOUT: %Iterator.Op.583fda.1: %Iterator.Op.type.ac7e09.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f6f: = custom_witness (%f64.761, %Iterator.Op.583fda.1), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %custom_witness.1fc: = custom_witness (%Iterator.Op.583fda.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d46: %SubobjectDestroy.type = facet_value %Iterator, (%custom_witness.1fc) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7ae: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d46) [concrete] // CHECK:STDOUT: %Iterator.Op.type.ac7e09.2: type = fn_type @Iterator.Op.2 [concrete] // CHECK:STDOUT: %Iterator.Op.583fda.2: %Iterator.Op.type.ac7e09.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.393: = custom_witness (%Iterator.Op.583fda.2), @Inc [concrete] +// CHECK:STDOUT: %custom_witness.f6f: = custom_witness (%f64.761, %Iterator.Op.583fda.2), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %Iterator.Op.type.ac7e09.3: type = fn_type @Iterator.Op.3 [concrete] +// CHECK:STDOUT: %Iterator.Op.583fda.3: %Iterator.Op.type.ac7e09.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.393: = custom_witness (%Iterator.Op.583fda.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [concrete] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [concrete] // CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.eb7: = custom_witness (%Equal, %NotEqual), @EqWith, @EqWith(%Iterator) [concrete] -// CHECK:STDOUT: %facet_value.120: %CppRange_where.type.d682d6.1 = facet_value %ConstRange, (%custom_witness.5d5, %custom_witness.b76, %custom_witness.f6f, %custom_witness.393, %custom_witness.eb7, %custom_witness.f8f19d.2, %Copy.impl_witness.eac, %custom_witness.b76) [concrete] +// CHECK:STDOUT: %facet_value.310: %CppRange_where.type.d682d6.1 = facet_value %ConstRange, (%custom_witness.5d5, %custom_witness.1fc, %DestroyImpl.impl_witness.7ae, %custom_witness.f6f, %custom_witness.393, %custom_witness.eb7, %custom_witness.b80ef6.2, %DestroyImpl.impl_witness.a23, %Copy.impl_witness.eac, %custom_witness.1fc, %DestroyImpl.impl_witness.7ae) [concrete] // CHECK:STDOUT: %tuple.type.005: type = tuple_type (%Iterator, %Iterator) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9: type = fn_type @Destroy.WithSelf.SubobjectDestroy.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.9: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.10: type = fn_type @Destroy.WithSelf.Op.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.10: %Destroy.WithSelf.Op.type.ef016f.10 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10: type = fn_type @Destroy.WithSelf.SelfDestruct.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.10: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.9: = custom_witness (%Destroy.WithSelf.Op.403171.10, %Destroy.WithSelf.SubobjectDestroy.d01daf.9, %Destroy.WithSelf.SelfDestruct.db3fdb.10), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.362: %Destroy.type = facet_value %tuple.type.005, (%custom_witness.f8f19d.9) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.a53: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.120) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.35f: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.120) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.1ed: %T.as_type.as.Iterate.impl.NewCursor.type.35f = struct_value () [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.6c4: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.120) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.9ad: %T.as_type.as.Iterate.impl.Next.type.6c4 = struct_value () [concrete] -// CHECK:STDOUT: %facet_value.36b: %Iterate_where.type.11d = facet_value %ConstRange, (%Iterate.impl_witness.a53) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.9: type = fn_type @SubobjectDestroy.WithSelf.Op.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.9: %SubobjectDestroy.WithSelf.Op.type.6870fd.9 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.9: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.9), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7c6: %SubobjectDestroy.type = facet_value %tuple.type.005, (%custom_witness.b80ef6.9) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.729: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7c6) [concrete] +// CHECK:STDOUT: %complete_type.320: = complete_type_witness %tuple.type.005 [concrete] +// CHECK:STDOUT: %Destroy.facet.0b5: %Destroy.type = facet_value %tuple.type.005, (%custom_witness.b80ef6.9, %DestroyImpl.impl_witness.729) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.d5a: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.310) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.41f: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.310) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.af4: %T.as_type.as.Iterate.impl.NewCursor.type.41f = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.9b3: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.310) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.1e7: %T.as_type.as.Iterate.impl.Next.type.9b3 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.860: %Iterate_where.type.a66 = facet_value %ConstRange, (%Iterate.impl_witness.d5a) [concrete] // CHECK:STDOUT: %r.param_patt.a73: %pattern_type.025 = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.0b5: %pattern_type.025 = wrapper_binding_pattern r, %r.param_patt.a73 [concrete] -// CHECK:STDOUT: %Iterate.facet.1a5: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.a53) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.793: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.1a5) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.c0d: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.1a5) [concrete] -// CHECK:STDOUT: %.588: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.793, %Iterate.facet.1a5 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.1ed, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.120) [concrete] -// CHECK:STDOUT: %.7bd: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.c0d, %Iterate.facet.1a5 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.9ad, @T.as_type.as.Iterate.impl.Next(%facet_value.120) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.dd4: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.362) [concrete] -// CHECK:STDOUT: %.38e: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.dd4, %Destroy.facet.362 [concrete] -// CHECK:STDOUT: %complete_type.320: = complete_type_witness %tuple.type.005 [concrete] +// CHECK:STDOUT: %Iterate.facet.a66: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.d5a) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.337: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.a66) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.540: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.a66) [concrete] +// CHECK:STDOUT: %.744: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.337, %Iterate.facet.a66 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.af4, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.310) [concrete] +// CHECK:STDOUT: %.68c: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.540, %Iterate.facet.a66 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.1e7, @T.as_type.as.Iterate.impl.Next(%facet_value.310) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c59: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.0b5) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.02f: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.ade)] -// CHECK:STDOUT: %Core.import_ref.406: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.925) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.f42)] -// CHECK:STDOUT: %Core.import_ref.d4a: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.760) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.268)] -// CHECK:STDOUT: %Core.import_ref.9a4: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.d28) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.f29)] -// CHECK:STDOUT: %Core.import_ref.6e3: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.2f2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.884)] -// CHECK:STDOUT: %Core.import_ref.af7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.460 = impl_witness_table (%Core.import_ref.02f, %Core.import_ref.406, %Core.import_ref.d4a, %Core.import_ref.9a4, %Core.import_ref.6e3, %Core.import_ref.af7), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.51c9: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.498] -// CHECK:STDOUT: %Core.import_ref.b03: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.390] +// CHECK:STDOUT: %Core.import_ref.481: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.476)] +// CHECK:STDOUT: %Core.import_ref.66d: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.b57) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.791)] +// CHECK:STDOUT: %Core.import_ref.32c: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.292) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.ae9)] +// CHECK:STDOUT: %Core.import_ref.801: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.18e) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.463)] +// CHECK:STDOUT: %Core.import_ref.eec: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.f27) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.e40)] +// CHECK:STDOUT: %Core.import_ref.a6a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.1c4 = impl_witness_table (%Core.import_ref.481, %Core.import_ref.66d, %Core.import_ref.32c, %Core.import_ref.801, %Core.import_ref.eec, %Core.import_ref.a6a), @T.as_type.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.e86: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.bce] +// CHECK:STDOUT: %Core.import_ref.9ce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.dbe] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.c82: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.3ea) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.f2f)] // CHECK:STDOUT: %Core.import_ref.29e: @Optional.%Optional.Get.type (%Optional.Get.type.786) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.2d0)] -// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] -// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.724: %facet_type.bd0 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.189)] +// CHECK:STDOUT: %Core.import_ref.dd9: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9b6)] // CHECK:STDOUT: %Core.import_ref.946: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.8fb) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.8a1)] // CHECK:STDOUT: %Core.import_ref.cfb: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.d4a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.5a8)] -// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.724, %Core.import_ref.dd9, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %Core.import_ref.19b: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.e8d) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.fe9)] // CHECK:STDOUT: %Copy.impl_witness_table.14d = impl_witness_table (%Core.import_ref.19b), @Float.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.e0d0: @Float.as.AddAssignWith.impl.%Float.as.AddAssignWith.impl.Op.type (%Float.as.AddAssignWith.impl.Op.type.763) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.AddAssignWith.impl.%Float.as.AddAssignWith.impl.Op (constants.%Float.as.AddAssignWith.impl.Op.8aa)] // CHECK:STDOUT: %AddAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.e0d0), @Float.as.AddAssignWith.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.b0d0 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.390: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = field_decl has_value, element1, %Core.import_ref.b0d0 in [concrete] {} -// CHECK:STDOUT: %Core.import_ref.ab7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.498: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = field_decl value, element0, %Core.import_ref.ab7 in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.dbe: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = field_decl has_value, element1, %Core.import_ref.b0d in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.45d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.bce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = field_decl value, element0, %Core.import_ref.45d in [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_19.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8c = ref_param_pattern [concrete = constants.%self.param_patt.5ca] -// CHECK:STDOUT: %self.patt: %pattern_type.d8c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.ecc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.ecc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc24_19.1 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8c = ref_param_pattern [concrete = constants.%self.param_patt.5ca] -// CHECK:STDOUT: %self.patt: %pattern_type.d8c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.ecc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.ecc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_19.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.007 = ref_param_pattern [concrete = constants.%self.param_patt.6cf] -// CHECK:STDOUT: %self.patt: %pattern_type.007 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b4d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.912 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.912 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc24_19.2 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.007 = ref_param_pattern [concrete = constants.%self.param_patt.6cf] -// CHECK:STDOUT: %self.patt: %pattern_type.007 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b4d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.912 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.912 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_19.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc24_19.3 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_19.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.28d = ref_param_pattern [concrete = constants.%self.param_patt.f24] -// CHECK:STDOUT: %self.patt: %pattern_type.28d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.396] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.82f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.82f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc24_19.4 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.28d = ref_param_pattern [concrete = constants.%self.param_patt.f24] -// CHECK:STDOUT: %self.patt: %pattern_type.28d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.396] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.82f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.82f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_19.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ee1 = ref_param_pattern [concrete = constants.%self.param_patt.d5d] -// CHECK:STDOUT: %self.patt: %pattern_type.ee1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aa9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.6ea = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.6ea = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc24_19.5 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ee1 = ref_param_pattern [concrete = constants.%self.param_patt.d5d] -// CHECK:STDOUT: %self.patt: %pattern_type.ee1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aa9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.6ea = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.6ea = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24_19.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.40d = ref_param_pattern [concrete = constants.%self.param_patt.4ac] -// CHECK:STDOUT: %self.patt: %pattern_type.40d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1ec] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.000 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.000 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.8 = fn_decl @Destroy.WithSelf.Op.loc24_19.6 [concrete = constants.%Destroy.WithSelf.Op.403171.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.40d = ref_param_pattern [concrete = constants.%self.param_patt.4ac] -// CHECK:STDOUT: %self.patt: %pattern_type.40d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1ec] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.000 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.000 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TestIterate(%R.loc20_17.2: %Iterate_where.type.11d) { +// CHECK:STDOUT: generic fn @TestIterate(%R.loc20_17.2: %Iterate_where.type.a66) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc20_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.e7e)] -// CHECK:STDOUT: %Iterate.facet.loc24_19.5: %Iterate.type = facet_value %R.as_type.loc20_61.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc24_19.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.248)] -// CHECK:STDOUT: %.loc24_19.19: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc24_19.5 [symbolic = %.loc24_19.19 (constants.%.678)] -// CHECK:STDOUT: %impl.elem2.loc24_19.3: @TestIterate.%.loc24_19.19 (%.678) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc24_19.3 (constants.%impl.elem2.e3e)] -// CHECK:STDOUT: %specific_impl_fn.loc24_19.4: = specific_impl_function %impl.elem2.loc24_19.3, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc24_19.5) [symbolic = %specific_impl_fn.loc24_19.4 (constants.%specific_impl_fn.0ea)] +// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc20_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.6fa)] +// CHECK:STDOUT: %Iterate.facet.loc24_19.5: %Iterate.type = facet_value %R.as_type.loc20_61.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc24_19.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.a57)] +// CHECK:STDOUT: %.loc24_19.23: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc24_19.5 [symbolic = %.loc24_19.23 (constants.%.b10)] +// CHECK:STDOUT: %impl.elem2.loc24_19.2: @TestIterate.%.loc24_19.23 (%.b10) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc24_19.2 (constants.%impl.elem2.81a)] +// CHECK:STDOUT: %specific_impl_fn.loc24_19.3: = specific_impl_function %impl.elem2.loc24_19.2, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc24_19.5) [symbolic = %specific_impl_fn.loc24_19.3 (constants.%specific_impl_fn.6ec)] +// CHECK:STDOUT: +// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc24_19.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.01e)] +// CHECK:STDOUT: %.loc24_19.24: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc24_19.5 [symbolic = %.loc24_19.24 (constants.%.063)] +// CHECK:STDOUT: %impl.elem3.loc24_19.2: @TestIterate.%.loc24_19.24 (%.063) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc24_19.2 (constants.%impl.elem3.ae5)] +// CHECK:STDOUT: %specific_impl_fn.loc24_19.4: = specific_impl_function %impl.elem3.loc24_19.2, @Iterate.WithSelf.Next(%Iterate.facet.loc24_19.5) [symbolic = %specific_impl_fn.loc24_19.4 (constants.%specific_impl_fn.2e1)] // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc24_19.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.9a9)] -// CHECK:STDOUT: %.loc24_19.20: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc24_19.5 [symbolic = %.loc24_19.20 (constants.%.fe7)] -// CHECK:STDOUT: %impl.elem3.loc24_19.2: @TestIterate.%.loc24_19.20 (%.fe7) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc24_19.2 (constants.%impl.elem3.ae5)] -// CHECK:STDOUT: %specific_impl_fn.loc24_19.5: = specific_impl_function %impl.elem3.loc24_19.2, @Iterate.WithSelf.Next(%Iterate.facet.loc24_19.5) [symbolic = %specific_impl_fn.loc24_19.5 (constants.%specific_impl_fn.493)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.a48)] -// CHECK:STDOUT: %.loc24_19.21: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %impl.elem1 [symbolic = %.loc24_19.21 (constants.%.421)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.cb1)] -// CHECK:STDOUT: %impl.elem2.loc24_19.4: @TestIterate.%.loc24_19.21 (%.421) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc24_19.4 (constants.%impl.elem2.f8d)] -// CHECK:STDOUT: %specific_impl_fn.loc24_19.6: = specific_impl_function %impl.elem2.loc24_19.4, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1) [symbolic = %specific_impl_fn.loc24_19.6 (constants.%specific_impl_fn.6a1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc20_61.1 (%R.as_type)) { // CHECK:STDOUT: !entry: @@ -3334,51 +2793,51 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.667 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc20_61.1 (%R.as_type) = name_ref r, %r -// CHECK:STDOUT: %impl.elem2.loc24_19.1: @TestIterate.%.loc24_19.19 (%.678) = impl_witness_access constants.%Iterate.lookup_impl_witness.e7e, element2 [symbolic = %impl.elem2.loc24_19.3 (constants.%impl.elem2.e3e)] +// CHECK:STDOUT: %impl.elem2.loc24_19.1: @TestIterate.%.loc24_19.23 (%.b10) = impl_witness_access constants.%Iterate.lookup_impl_witness.6fa, element2 [symbolic = %impl.elem2.loc24_19.2 (constants.%impl.elem2.81a)] // CHECK:STDOUT: %bound_method.loc24_19.1: = bound_method %r.ref, %impl.elem2.loc24_19.1 -// CHECK:STDOUT: %Iterate.facet.loc24_19.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e7e) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %.loc24_19.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.1 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %Iterate.facet.loc24_19.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e7e) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %.loc24_19.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.2 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %specific_impl_fn.loc24_19.1: = specific_impl_function %impl.elem2.loc24_19.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.a43) [symbolic = %specific_impl_fn.loc24_19.4 (constants.%specific_impl_fn.0ea)] +// CHECK:STDOUT: %Iterate.facet.loc24_19.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.6fa) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %.loc24_19.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.1 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %Iterate.facet.loc24_19.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.6fa) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %.loc24_19.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.2 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %specific_impl_fn.loc24_19.1: = specific_impl_function %impl.elem2.loc24_19.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.e8c) [symbolic = %specific_impl_fn.loc24_19.3 (constants.%specific_impl_fn.6ec)] // CHECK:STDOUT: %bound_method.loc24_19.2: = bound_method %r.ref, %specific_impl_fn.loc24_19.1 -// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.ba7) = var_storage invalid -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.ba7) to %var = call %bound_method.loc24_19.2(%r.ref) +// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.deb) = var_storage invalid +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.deb) to %var = call %bound_method.loc24_19.2(%r.ref) // CHECK:STDOUT: assign %var, %Iterate.WithSelf.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3.loc24_19.1: @TestIterate.%.loc24_19.20 (%.fe7) = impl_witness_access constants.%Iterate.lookup_impl_witness.e7e, element3 [symbolic = %impl.elem3.loc24_19.2 (constants.%impl.elem3.ae5)] +// CHECK:STDOUT: %impl.elem3.loc24_19.1: @TestIterate.%.loc24_19.24 (%.063) = impl_witness_access constants.%Iterate.lookup_impl_witness.6fa, element3 [symbolic = %impl.elem3.loc24_19.2 (constants.%impl.elem3.ae5)] // CHECK:STDOUT: %bound_method.loc24_19.3: = bound_method %r.ref, %impl.elem3.loc24_19.1 -// CHECK:STDOUT: %Iterate.facet.loc24_19.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e7e) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %.loc24_19.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.3 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %Iterate.facet.loc24_19.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e7e) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %.loc24_19.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.4 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %.loc24_19.5: %Destroy.type = converted constants.%as_type.ba7, constants.%impl.elem1.2af [symbolic = %impl.elem1 (constants.%impl.elem1.2af)] -// CHECK:STDOUT: %.loc24_19.6: %Destroy.type = converted constants.%as_type.ba7, constants.%impl.elem1.2af [symbolic = %impl.elem1 (constants.%impl.elem1.2af)] -// CHECK:STDOUT: %specific_impl_fn.loc24_19.2: = specific_impl_function %impl.elem3.loc24_19.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.a43) [symbolic = %specific_impl_fn.loc24_19.5 (constants.%specific_impl_fn.493)] +// CHECK:STDOUT: %Iterate.facet.loc24_19.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.6fa) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %.loc24_19.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.3 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %Iterate.facet.loc24_19.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.6fa) [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %.loc24_19.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc24_19.4 [symbolic = %Iterate.facet.loc24_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %.loc24_19.5: %Destroy.type = converted constants.%as_type.deb, constants.%impl.elem1.7dd [symbolic = %impl.elem1 (constants.%impl.elem1.7dd)] +// CHECK:STDOUT: %.loc24_19.6: %Destroy.type = converted constants.%as_type.deb, constants.%impl.elem1.7dd [symbolic = %impl.elem1 (constants.%impl.elem1.7dd)] +// CHECK:STDOUT: %specific_impl_fn.loc24_19.2: = specific_impl_function %impl.elem3.loc24_19.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.e8c) [symbolic = %specific_impl_fn.loc24_19.4 (constants.%specific_impl_fn.2e1)] // CHECK:STDOUT: %bound_method.loc24_19.4: = bound_method %r.ref, %specific_impl_fn.loc24_19.2 -// CHECK:STDOUT: %.loc24_19.7: ref %Optional.000 = temporary_storage -// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.000 to %.loc24_19.7 = call %bound_method.loc24_19.4(%r.ref, %var) -// CHECK:STDOUT: %.loc24_19.8: ref %Optional.000 = temporary %.loc24_19.7, %Iterate.WithSelf.Next.call -// CHECK:STDOUT: %.loc24_19.9: %Optional.HasValue.type.92f = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.HasValue.ff5] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.92f = name_ref HasValue, %.loc24_19.9 [concrete = constants.%Optional.HasValue.ff5] +// CHECK:STDOUT: %.loc24_19.7: ref %Optional.ebe = temporary_storage +// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.ebe to %.loc24_19.7 = call %bound_method.loc24_19.4(%r.ref, %var) +// CHECK:STDOUT: %.loc24_19.8: ref %Optional.ebe = temporary %.loc24_19.7, %Iterate.WithSelf.Next.call +// CHECK:STDOUT: %.loc24_19.9: %Optional.HasValue.type.1cf = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.HasValue.768] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.1cf = name_ref HasValue, %.loc24_19.9 [concrete = constants.%Optional.HasValue.768] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc24_19.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.HasValue.specific_fn.315] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.HasValue.specific_fn.89a] // CHECK:STDOUT: %bound_method.loc24_19.5: = bound_method %.loc24_19.8, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc24_19.10: %Optional.000 = acquire_value %.loc24_19.8 +// CHECK:STDOUT: %.loc24_19.10: %Optional.ebe = acquire_value %.loc24_19.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc24_19.5(%.loc24_19.10) // CHECK:STDOUT: %.loc24_19.11: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc24_19.12: bool = converted %Optional.HasValue.call, %.loc24_19.11 // CHECK:STDOUT: if %.loc24_19.12 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc24_19.13: %Optional.Get.type.695 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.Get.62a] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.695 = name_ref Get, %.loc24_19.13 [concrete = constants.%Optional.Get.62a] +// CHECK:STDOUT: %.loc24_19.13: %Optional.Get.type.b2d = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.Get.f12] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.b2d = name_ref Get, %.loc24_19.13 [concrete = constants.%Optional.Get.f12] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc24_19.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.Get.specific_fn.570] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.Get.specific_fn.67e] // CHECK:STDOUT: %bound_method.loc24_19.6: = bound_method %.loc24_19.8, %Optional.Get.specific_fn -// CHECK:STDOUT: %.loc24_19.14: %Optional.000 = acquire_value %.loc24_19.8 +// CHECK:STDOUT: %.loc24_19.14: %Optional.ebe = acquire_value %.loc24_19.8 // CHECK:STDOUT: %Optional.Get.call: init %f64.761 = call %bound_method.loc24_19.6(%.loc24_19.14) // CHECK:STDOUT: %.loc24_19.15: %f64.761 = value_of_initializer %Optional.Get.call // CHECK:STDOUT: %.loc24_19.16: %f64.761 = converted %Optional.Get.call, %.loc24_19.15 @@ -3391,112 +2850,79 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Float.as.AddAssignWith.impl.Op(constants.%int_64) [concrete = constants.%Float.as.AddAssignWith.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc25_9.2: = bound_method %sum.ref, %specific_fn.loc25 // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc25_9.2(%sum.ref, %i.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_19.1: = bound_method %.loc24_19.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_19.1(%.loc24_19.8) +// CHECK:STDOUT: %Destroy.facet.loc24_19.1: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc24_19.17: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc24_19.1 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %Destroy.facet.loc24_19.2: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc24_19.18: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc24_19.2 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc24_19.8) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_19.2: = bound_method %.loc24_19.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_19.2(%.loc24_19.8) -// CHECK:STDOUT: %impl.elem2.loc24_19.2: @TestIterate.%.loc24_19.21 (%.421) = impl_witness_access constants.%Destroy.lookup_impl_witness.cb1, element2 [symbolic = %impl.elem2.loc24_19.4 (constants.%impl.elem2.f8d)] -// CHECK:STDOUT: %bound_method.loc24_19.7: = bound_method %var, %impl.elem2.loc24_19.2 -// CHECK:STDOUT: %.loc24_19.17: %Destroy.type = converted constants.%as_type.ba7, constants.%impl.elem1.2af [symbolic = %impl.elem1 (constants.%impl.elem1.2af)] -// CHECK:STDOUT: %.loc24_19.18: %Destroy.type = converted constants.%as_type.ba7, constants.%impl.elem1.2af [symbolic = %impl.elem1 (constants.%impl.elem1.2af)] -// CHECK:STDOUT: %specific_impl_fn.loc24_19.3: = specific_impl_function %impl.elem2.loc24_19.2, @Destroy.WithSelf.SelfDestruct.1(constants.%impl.elem1.2af) [symbolic = %specific_impl_fn.loc24_19.6 (constants.%specific_impl_fn.6a1)] -// CHECK:STDOUT: %bound_method.loc24_19.8: = bound_method %var, %specific_impl_fn.loc24_19.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_19.3: init %empty_tuple.type = call %bound_method.loc24_19.8(%var) +// CHECK:STDOUT: %Destroy.facet.loc24_19.3: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc24_19.19: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc24_19.3 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %Destroy.facet.loc24_19.4: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc24_19.20: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc24_19.4 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc24_19.8) +// CHECK:STDOUT: %.loc24_19.21: %Destroy.type = converted constants.%as_type.deb, constants.%impl.elem1.7dd [symbolic = %impl.elem1 (constants.%impl.elem1.7dd)] +// CHECK:STDOUT: %.loc24_19.22: %Destroy.type = converted constants.%as_type.deb, constants.%impl.elem1.7dd [symbolic = %impl.elem1 (constants.%impl.elem1.7dd)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24_19.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_19.1(%self.param: ref %.ecc) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_19.1(%self.param: ref %.ecc) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_19.1(%self.param: ref %.ecc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_19.2(%self.param: ref %MaybeUnformed.f92) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_19.1(%self.param: ref %.ecc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_19.3(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_19.2(%self.param: ref %MaybeUnformed.912) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_19.2(%self.param: ref %MaybeUnformed.912) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_19.2(%self.param: ref %MaybeUnformed.912) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_19.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_19.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_19.3(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_19.4(%self.param: ref %struct_type.value.has_value.82f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_19.4(%self.param: ref %struct_type.value.has_value.e0a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc24_19.1: ref bool = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_19.1: = bound_method %.loc24_19.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_19.1(%.loc24_19.1) -// CHECK:STDOUT: %.loc24_19.2: ref %MaybeUnformed.912 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_19.2: = bound_method %.loc24_19.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_19.2(%.loc24_19.2) +// CHECK:STDOUT: %Destroy.facet.loc24_19.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.5, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc24_19.2: %Destroy.type = converted bool, %Destroy.facet.loc24_19.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc24_19.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.5, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc24_19.3: %Destroy.type = converted bool, %Destroy.facet.loc24_19.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc24_19.1) +// CHECK:STDOUT: %.loc24_19.4: ref %MaybeUnformed.f92 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc24_19.3: %Destroy.type = facet_value constants.%MaybeUnformed.f92, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.6fa) [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %.loc24_19.5: %Destroy.type = converted constants.%MaybeUnformed.f92, %Destroy.facet.loc24_19.3 [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %Destroy.facet.loc24_19.4: %Destroy.type = facet_value constants.%MaybeUnformed.f92, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.6fa) [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %.loc24_19.6: %Destroy.type = converted constants.%MaybeUnformed.f92, %Destroy.facet.loc24_19.4 [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc24_19.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_19.4(%self.param: ref %struct_type.value.has_value.82f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_19.4(%self.param: ref %struct_type.value.has_value.82f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_19.5(%self.param: ref %DefaultOptionalStorage.f55) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_19.5(%self.param: ref %DefaultOptionalStorage.6ea) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.b33 = name_ref has_value, imports.%Core.import_ref.b03 [concrete = imports.%field_decl.390] +// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.34a = name_ref has_value, imports.%Core.import_ref.9ce [concrete = imports.%field_decl.dbe] // CHECK:STDOUT: %.loc24_19.1: ref bool = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_19.1: = bound_method %.loc24_19.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_19.1(%.loc24_19.1) -// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.9ab = name_ref value, imports.%Core.import_ref.51c9 [concrete = imports.%field_decl.498] -// CHECK:STDOUT: %.loc24_19.2: ref %MaybeUnformed.912 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24_19.2: = bound_method %.loc24_19.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24_19.2(%.loc24_19.2) +// CHECK:STDOUT: %Destroy.facet.loc24_19.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.5, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc24_19.2: %Destroy.type = converted bool, %Destroy.facet.loc24_19.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc24_19.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.5, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc24_19.3: %Destroy.type = converted bool, %Destroy.facet.loc24_19.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc24_19.1) +// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.345 = name_ref value, imports.%Core.import_ref.e86 [concrete = imports.%field_decl.bce] +// CHECK:STDOUT: %.loc24_19.4: ref %MaybeUnformed.f92 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc24_19.3: %Destroy.type = facet_value constants.%MaybeUnformed.f92, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.6fa) [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %.loc24_19.5: %Destroy.type = converted constants.%MaybeUnformed.f92, %Destroy.facet.loc24_19.3 [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %Destroy.facet.loc24_19.4: %Destroy.type = facet_value constants.%MaybeUnformed.f92, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.6fa) [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %.loc24_19.6: %Destroy.type = converted constants.%MaybeUnformed.f92, %Destroy.facet.loc24_19.4 [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc24_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc24_19.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_19.5(%self.param: ref %DefaultOptionalStorage.6ea) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_19.5(%self.param: ref %DefaultOptionalStorage.6ea) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24_19.6(%self.param: ref %Optional.000) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24_19.6(%self.param: ref %Optional.000) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24_19.6(%self.param: ref %Optional.000) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.7(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24_19.6(%self.param: ref %Optional.ebe) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TestRangeFor(%c.param: %ConstRange) { // CHECK:STDOUT: !entry: @@ -3505,13 +2931,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.667 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %c.ref: %ConstRange = name_ref c, %c -// CHECK:STDOUT: %impl.elem2: %.588 = impl_witness_access constants.%Iterate.impl_witness.a53, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.1ed] +// CHECK:STDOUT: %impl.elem2: %.744 = impl_witness_access constants.%Iterate.impl_witness.d5a, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.af4] // CHECK:STDOUT: %bound_method.loc38_19.1: = bound_method %c.ref, %impl.elem2 -// CHECK:STDOUT: %facet_value.loc38_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.5d5, constants.%custom_witness.b76, constants.%custom_witness.f6f, constants.%custom_witness.393, constants.%custom_witness.eb7, constants.%custom_witness.f8f19d.2, constants.%Copy.impl_witness.eac, constants.%custom_witness.b76) [concrete = constants.%facet_value.120] -// CHECK:STDOUT: %.loc38_19.1: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.1 [concrete = constants.%facet_value.120] -// CHECK:STDOUT: %facet_value.loc38_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.5d5, constants.%custom_witness.b76, constants.%custom_witness.f6f, constants.%custom_witness.393, constants.%custom_witness.eb7, constants.%custom_witness.f8f19d.2, constants.%Copy.impl_witness.eac, constants.%custom_witness.b76) [concrete = constants.%facet_value.120] -// CHECK:STDOUT: %.loc38_19.2: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.2 [concrete = constants.%facet_value.120] -// CHECK:STDOUT: %specific_fn.loc38_19.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.120) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] +// CHECK:STDOUT: %facet_value.loc38_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.5d5, constants.%custom_witness.1fc, constants.%DestroyImpl.impl_witness.7ae, constants.%custom_witness.f6f, constants.%custom_witness.393, constants.%custom_witness.eb7, constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.a23, constants.%Copy.impl_witness.eac, constants.%custom_witness.1fc, constants.%DestroyImpl.impl_witness.7ae) [concrete = constants.%facet_value.310] +// CHECK:STDOUT: %.loc38_19.1: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.1 [concrete = constants.%facet_value.310] +// CHECK:STDOUT: %facet_value.loc38_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.5d5, constants.%custom_witness.1fc, constants.%DestroyImpl.impl_witness.7ae, constants.%custom_witness.f6f, constants.%custom_witness.393, constants.%custom_witness.eb7, constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.a23, constants.%Copy.impl_witness.eac, constants.%custom_witness.1fc, constants.%DestroyImpl.impl_witness.7ae) [concrete = constants.%facet_value.310] +// CHECK:STDOUT: %.loc38_19.2: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.2 [concrete = constants.%facet_value.310] +// CHECK:STDOUT: %specific_fn.loc38_19.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.310) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc38_19.2: = bound_method %c.ref, %specific_fn.loc38_19.1 // CHECK:STDOUT: %var: ref %tuple.type.005 = var_storage invalid // CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call: init %tuple.type.005 to %var = call %bound_method.loc38_19.2(%c.ref) @@ -3519,35 +2945,35 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3: %.7bd = impl_witness_access constants.%Iterate.impl_witness.a53, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.9ad] +// CHECK:STDOUT: %impl.elem3: %.68c = impl_witness_access constants.%Iterate.impl_witness.d5a, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.1e7] // CHECK:STDOUT: %bound_method.loc38_19.3: = bound_method %c.ref, %impl.elem3 -// CHECK:STDOUT: %facet_value.loc38_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.5d5, constants.%custom_witness.b76, constants.%custom_witness.f6f, constants.%custom_witness.393, constants.%custom_witness.eb7, constants.%custom_witness.f8f19d.2, constants.%Copy.impl_witness.eac, constants.%custom_witness.b76) [concrete = constants.%facet_value.120] -// CHECK:STDOUT: %.loc38_19.3: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.3 [concrete = constants.%facet_value.120] -// CHECK:STDOUT: %facet_value.loc38_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.5d5, constants.%custom_witness.b76, constants.%custom_witness.f6f, constants.%custom_witness.393, constants.%custom_witness.eb7, constants.%custom_witness.f8f19d.2, constants.%Copy.impl_witness.eac, constants.%custom_witness.b76) [concrete = constants.%facet_value.120] -// CHECK:STDOUT: %.loc38_19.4: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.4 [concrete = constants.%facet_value.120] -// CHECK:STDOUT: %specific_fn.loc38_19.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.120) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] +// CHECK:STDOUT: %facet_value.loc38_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.5d5, constants.%custom_witness.1fc, constants.%DestroyImpl.impl_witness.7ae, constants.%custom_witness.f6f, constants.%custom_witness.393, constants.%custom_witness.eb7, constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.a23, constants.%Copy.impl_witness.eac, constants.%custom_witness.1fc, constants.%DestroyImpl.impl_witness.7ae) [concrete = constants.%facet_value.310] +// CHECK:STDOUT: %.loc38_19.3: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.3 [concrete = constants.%facet_value.310] +// CHECK:STDOUT: %facet_value.loc38_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.5d5, constants.%custom_witness.1fc, constants.%DestroyImpl.impl_witness.7ae, constants.%custom_witness.f6f, constants.%custom_witness.393, constants.%custom_witness.eb7, constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.a23, constants.%Copy.impl_witness.eac, constants.%custom_witness.1fc, constants.%DestroyImpl.impl_witness.7ae) [concrete = constants.%facet_value.310] +// CHECK:STDOUT: %.loc38_19.4: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc38_19.4 [concrete = constants.%facet_value.310] +// CHECK:STDOUT: %specific_fn.loc38_19.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.310) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc38_19.4: = bound_method %c.ref, %specific_fn.loc38_19.2 -// CHECK:STDOUT: %.loc38_19.5: ref %Optional.000 = temporary_storage -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.000 to %.loc38_19.5 = call %bound_method.loc38_19.4(%c.ref, %var) -// CHECK:STDOUT: %.loc38_19.6: ref %Optional.000 = temporary %.loc38_19.5, %T.as_type.as.Iterate.impl.Next.call -// CHECK:STDOUT: %.loc38_19.7: %Optional.HasValue.type.92f = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.HasValue.ff5] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.92f = name_ref HasValue, %.loc38_19.7 [concrete = constants.%Optional.HasValue.ff5] +// CHECK:STDOUT: %.loc38_19.5: ref %Optional.ebe = temporary_storage +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.ebe to %.loc38_19.5 = call %bound_method.loc38_19.4(%c.ref, %var) +// CHECK:STDOUT: %.loc38_19.6: ref %Optional.ebe = temporary %.loc38_19.5, %T.as_type.as.Iterate.impl.Next.call +// CHECK:STDOUT: %.loc38_19.7: %Optional.HasValue.type.1cf = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.HasValue.768] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.1cf = name_ref HasValue, %.loc38_19.7 [concrete = constants.%Optional.HasValue.768] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc38_19.6, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.HasValue.specific_fn.315] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.HasValue.specific_fn.89a] // CHECK:STDOUT: %bound_method.loc38_19.5: = bound_method %.loc38_19.6, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc38_19.8: %Optional.000 = acquire_value %.loc38_19.6 +// CHECK:STDOUT: %.loc38_19.8: %Optional.ebe = acquire_value %.loc38_19.6 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc38_19.5(%.loc38_19.8) // CHECK:STDOUT: %.loc38_19.9: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc38_19.10: bool = converted %Optional.HasValue.call, %.loc38_19.9 // CHECK:STDOUT: if %.loc38_19.10 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc38_19.11: %Optional.Get.type.695 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.Get.62a] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.695 = name_ref Get, %.loc38_19.11 [concrete = constants.%Optional.Get.62a] +// CHECK:STDOUT: %.loc38_19.11: %Optional.Get.type.b2d = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.Get.f12] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.b2d = name_ref Get, %.loc38_19.11 [concrete = constants.%Optional.Get.f12] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc38_19.6, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.Get.specific_fn.570] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.Get.specific_fn.67e] // CHECK:STDOUT: %bound_method.loc38_19.6: = bound_method %.loc38_19.6, %Optional.Get.specific_fn -// CHECK:STDOUT: %.loc38_19.12: %Optional.000 = acquire_value %.loc38_19.6 +// CHECK:STDOUT: %.loc38_19.12: %Optional.ebe = acquire_value %.loc38_19.6 // CHECK:STDOUT: %Optional.Get.call: init %f64.761 = call %bound_method.loc38_19.6(%.loc38_19.12) // CHECK:STDOUT: %.loc38_19.13: %f64.761 = value_of_initializer %Optional.Get.call // CHECK:STDOUT: %.loc38_19.14: %f64.761 = converted %Optional.Get.call, %.loc38_19.13 @@ -3560,15 +2986,27 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %specific_fn.loc39: = specific_function %impl.elem0.loc39, @Float.as.AddAssignWith.impl.Op(constants.%int_64) [concrete = constants.%Float.as.AddAssignWith.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc39_9.2: = bound_method %sum.ref, %specific_fn.loc39 // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc39_9.2(%sum.ref, %i.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc38_19.1: = bound_method %.loc38_19.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc38_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc38_19.1(%.loc38_19.6) +// CHECK:STDOUT: %Destroy.facet.loc38_19.1: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc38_19.15: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc38_19.1 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %Destroy.facet.loc38_19.2: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc38_19.16: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc38_19.2 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc38_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc38_19.6) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc38_19.2: = bound_method %.loc38_19.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc38_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc38_19.2(%.loc38_19.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc38_19.3: = bound_method %var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc38_19.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc38_19.3(%var) +// CHECK:STDOUT: %Destroy.facet.loc38_19.3: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc38_19.17: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc38_19.3 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %Destroy.facet.loc38_19.4: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc38_19.18: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc38_19.4 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc38_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc38_19.6) +// CHECK:STDOUT: %Destroy.facet.loc38_19.5: %Destroy.type = facet_value constants.%tuple.type.005, (constants.%custom_witness.b80ef6.9, constants.%DestroyImpl.impl_witness.729) [concrete = constants.%Destroy.facet.0b5] +// CHECK:STDOUT: %.loc38_19.19: %Destroy.type = converted constants.%tuple.type.005, %Destroy.facet.loc38_19.5 [concrete = constants.%Destroy.facet.0b5] +// CHECK:STDOUT: %Destroy.facet.loc38_19.6: %Destroy.type = facet_value constants.%tuple.type.005, (constants.%custom_witness.b80ef6.9, constants.%DestroyImpl.impl_witness.729) [concrete = constants.%Destroy.facet.0b5] +// CHECK:STDOUT: %.loc38_19.20: %Destroy.type = converted constants.%tuple.type.005, %Destroy.facet.loc38_19.6 [concrete = constants.%Destroy.facet.0b5] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc38_19.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3576,14 +3014,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %R.patt.loc20_17.2 => constants.%R.patt // CHECK:STDOUT: %R.loc20_17.1 => constants.%R // CHECK:STDOUT: %R.as_type.loc20_61.1 => constants.%R.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.874 -// CHECK:STDOUT: %r.param_patt.loc20_59.2 => constants.%r.param_patt.ef5 -// CHECK:STDOUT: %r.patt.loc20_59.2 => constants.%r.patt.c43 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c3b +// CHECK:STDOUT: %r.param_patt.loc20_59.2 => constants.%r.param_patt.304 +// CHECK:STDOUT: %r.patt.loc20_59.2 => constants.%r.patt.240 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.36b) { +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.860) { // CHECK:STDOUT: %R.patt.loc20_17.2 => constants.%R.patt -// CHECK:STDOUT: %R.loc20_17.1 => constants.%facet_value.36b +// CHECK:STDOUT: %R.loc20_17.1 => constants.%facet_value.860 // CHECK:STDOUT: %R.as_type.loc20_61.1 => constants.%ConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.025 // CHECK:STDOUT: %r.param_patt.loc20_59.2 => constants.%r.param_patt.a73 @@ -3591,24 +3029,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc20 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.a53 -// CHECK:STDOUT: %Iterate.facet.loc24_19.5 => constants.%Iterate.facet.1a5 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.793 -// CHECK:STDOUT: %.loc24_19.19 => constants.%.588 -// CHECK:STDOUT: %impl.elem2.loc24_19.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.1ed -// CHECK:STDOUT: %specific_impl_fn.loc24_19.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn -// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.362 +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.d5a +// CHECK:STDOUT: %Iterate.facet.loc24_19.5 => constants.%Iterate.facet.a66 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.337 +// CHECK:STDOUT: %.loc24_19.23 => constants.%.744 +// CHECK:STDOUT: %impl.elem2.loc24_19.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.af4 +// CHECK:STDOUT: %specific_impl_fn.loc24_19.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn +// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.0b5 // CHECK:STDOUT: %as_type => constants.%tuple.type.005 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.320 -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.c0d -// CHECK:STDOUT: %.loc24_19.20 => constants.%.7bd -// CHECK:STDOUT: %impl.elem3.loc24_19.2 => constants.%T.as_type.as.Iterate.impl.Next.9ad -// CHECK:STDOUT: %specific_impl_fn.loc24_19.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.dd4 -// CHECK:STDOUT: %.loc24_19.21 => constants.%.38e -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.9 -// CHECK:STDOUT: %impl.elem2.loc24_19.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 -// CHECK:STDOUT: %specific_impl_fn.loc24_19.6 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.540 +// CHECK:STDOUT: %.loc24_19.24 => constants.%.68c +// CHECK:STDOUT: %impl.elem3.loc24_19.2 => constants.%T.as_type.as.Iterate.impl.Next.1e7 +// CHECK:STDOUT: %specific_impl_fn.loc24_19.4 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn +// CHECK:STDOUT: %SelfDestruct.specific_fn.5 => constants.%SelfDestruct.specific_fn.c59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_adl_returns_same_types_mutable.carbon @@ -3617,31 +3051,37 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %facet_type.bd0: type = facet_type <@Copy & @Destroy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.Get.2d0: %Optional.Get.type.786 = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f2f: %Optional.HasValue.type.3ea = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.74b: type = facet_access_type %T.283 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.28a: = lookup_impl_witness %T.283, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.16e: %Destroy.type = facet_value %T.as_type.74b, (%Destroy.lookup_impl_witness.28a) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.91c: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.16e) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.ade: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.b49: type = unbound_element_type %DefaultOptionalStorage.ade, bool [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.229: type = unbound_element_type %DefaultOptionalStorage.ade, %MaybeUnformed.91c [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.2f2: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.884: %T.as_type.as.OptionalStorage.impl.Get.type.2f2 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.d28: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.f29: %T.as_type.as.OptionalStorage.impl.Has.type.d28 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.760: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.268: %T.as_type.as.OptionalStorage.impl.Some.type.760 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.925: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.f42: %T.as_type.as.OptionalStorage.impl.None.type.925 = struct_value () [symbolic] +// CHECK:STDOUT: %T.f84392.1: %facet_type.bd0 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.c1cc3e.1: type = facet_access_type %T.f84392.1 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.70f: = lookup_impl_witness %T.f84392.1, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.bf2: = lookup_impl_witness %T.f84392.1, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.dc4: %Destroy.type = facet_value %T.as_type.c1cc3e.1, (%SubobjectDestroy.lookup_impl_witness.70f, %DestroyImpl.lookup_impl_witness.bf2) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.348: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.dc4) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.476: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.4a2: type = unbound_element_type %DefaultOptionalStorage.476, bool [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.ff3: type = unbound_element_type %DefaultOptionalStorage.476, %MaybeUnformed.348 [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.f27: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.e40: %T.as_type.as.OptionalStorage.impl.Get.type.f27 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.18e: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.463: %T.as_type.as.OptionalStorage.impl.Has.type.18e = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.292: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.ae9: %T.as_type.as.OptionalStorage.impl.Some.type.292 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.b57: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.791: %T.as_type.as.OptionalStorage.impl.None.type.b57 = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] @@ -3651,76 +3091,75 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d3, @CppUnsafeDeref [symbolic_self] // CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] // CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] -// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.f45530.3: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.5a8: %T.as_type.as.Iterate.impl.Next.type.d4a = struct_value () [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.3, @CppRangeForIterate [symbolic] // CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] // CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.8a1: %T.as_type.as.Iterate.impl.NewCursor.type.8fb = struct_value () [symbolic] // CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] // CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.dc9: = lookup_impl_witness %tuple.type.1ba, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.504: = lookup_impl_witness %tuple.type.1ba, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.9b6: %Destroy.type = facet_value %tuple.type.1ba, (%SubobjectDestroy.lookup_impl_witness.dc9, %DestroyImpl.lookup_impl_witness.504) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.b15da7.2: = lookup_impl_witness %impl.elem0.493765.2, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.4e7f44.2: = lookup_impl_witness %impl.elem0.493765.2, @DestroyImpl [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %facet_value.189: %facet_type.bd0 = facet_value %impl.elem0.493765.2, (%SubobjectDestroy.lookup_impl_witness.b15da7.2, %DestroyImpl.lookup_impl_witness.4e7f44.2, %Copy.lookup_impl_witness.167) [symbolic] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %f64.761: type = class_type @Float, @Float(%int_64) [concrete] // CHECK:STDOUT: %pattern_type.667: type = pattern_type %f64.761 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc32 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc32 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc32 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.2: = custom_witness (%Destroy.WithSelf.Op.403171.2, %Destroy.WithSelf.SubobjectDestroy.d01daf.2, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc32 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.47f: %SubobjectDestroy.type = facet_value %f64.761, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a23: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.47f) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.e8d: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.fe9: %Float.as.Copy.impl.Op.type.e8d = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.eac: = impl_witness imports.%Copy.impl_witness_table.14d, @Float.as.Copy.impl(%int_64) [concrete] -// CHECK:STDOUT: %facet_value.1d1: %facet_type.f48 = facet_value %f64.761, (%custom_witness.f8f19d.2, %Copy.impl_witness.eac) [concrete] +// CHECK:STDOUT: %facet_value.0d3: %facet_type.bd0 = facet_value %f64.761, (%custom_witness.b80ef6.2, %DestroyImpl.impl_witness.a23, %Copy.impl_witness.eac) [concrete] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %Iterate_where.type.11d: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.1d1> [concrete] -// CHECK:STDOUT: %pattern_type.999: type = pattern_type %Iterate_where.type.11d [concrete] -// CHECK:STDOUT: %R.patt: %pattern_type.999 = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R: %Iterate_where.type.11d = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %impl.elem0.4ce: %facet_type.bd0 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %Iterate_where.type.a66: type = facet_type <@Iterate where %impl.elem0.4ce = %facet_value.0d3> [concrete] +// CHECK:STDOUT: %pattern_type.ec9: type = pattern_type %Iterate_where.type.a66 [concrete] +// CHECK:STDOUT: %R.patt: %pattern_type.ec9 = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.a66 = symbolic_binding R, 0 [symbolic] // CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] -// CHECK:STDOUT: %pattern_type.874: type = pattern_type %R.as_type [symbolic] -// CHECK:STDOUT: %r.param_patt.ef5: %pattern_type.874 = value_param_pattern [symbolic] -// CHECK:STDOUT: %r.patt.c43: %pattern_type.874 = wrapper_binding_pattern r, %r.param_patt.ef5 [symbolic] +// CHECK:STDOUT: %pattern_type.c3b: type = pattern_type %R.as_type [symbolic] +// CHECK:STDOUT: %r.param_patt.304: %pattern_type.c3b = value_param_pattern [symbolic] +// CHECK:STDOUT: %r.patt.240: %pattern_type.c3b = wrapper_binding_pattern r, %r.param_patt.304 [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.667 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.e7e: = lookup_impl_witness %R, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.a43: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.e7e) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.248: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.a43) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.9a9: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.a43) [symbolic] -// CHECK:STDOUT: %.678: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.248, %Iterate.facet.a43 [symbolic] -// CHECK:STDOUT: %impl.elem2.e3e: %.678 = impl_witness_access %Iterate.lookup_impl_witness.e7e, element2 [symbolic] -// CHECK:STDOUT: %impl.elem1.2af: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.e7e, element1 [symbolic] -// CHECK:STDOUT: %as_type.ba7: type = facet_access_type %impl.elem1.2af [symbolic] -// CHECK:STDOUT: %specific_impl_fn.0ea: = specific_impl_function %impl.elem2.e3e, @Iterate.WithSelf.NewCursor(%Iterate.facet.a43) [symbolic] -// CHECK:STDOUT: %.fe7: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.9a9, %Iterate.facet.a43 [symbolic] -// CHECK:STDOUT: %impl.elem3.ae5: %.fe7 = impl_witness_access %Iterate.lookup_impl_witness.e7e, element3 [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.6ea: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.1d1) [concrete] -// CHECK:STDOUT: %OptionalStorage.impl_witness.49d: = impl_witness imports.%OptionalStorage.impl_witness_table.460, @T.as_type.as.OptionalStorage.impl(%facet_value.1d1) [concrete] -// CHECK:STDOUT: %OptionalStorage.facet.d7a: %OptionalStorage.type = facet_value %f64.761, (%OptionalStorage.impl_witness.49d) [concrete] -// CHECK:STDOUT: %Optional.000: type = class_type @Optional, @Optional(%OptionalStorage.facet.d7a) [concrete] -// CHECK:STDOUT: %pattern_type.40d: type = pattern_type %Optional.000 [concrete] -// CHECK:STDOUT: %specific_impl_fn.493: = specific_impl_function %impl.elem3.ae5, @Iterate.WithSelf.Next(%Iterate.facet.a43) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.92f: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.d7a) [concrete] -// CHECK:STDOUT: %Optional.HasValue.ff5: %Optional.HasValue.type.92f = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.695: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.d7a) [concrete] -// CHECK:STDOUT: %Optional.Get.62a: %Optional.Get.type.695 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.bb7: %Destroy.type = facet_value %f64.761, (%custom_witness.f8f19d.2) [concrete] -// CHECK:STDOUT: %MaybeUnformed.912: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.bb7) [concrete] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.6fa: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.e8c: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.6fa) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.a57: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.e8c) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.01e: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.e8c) [symbolic] +// CHECK:STDOUT: %.b10: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.a57, %Iterate.facet.e8c [symbolic] +// CHECK:STDOUT: %impl.elem2.81a: %.b10 = impl_witness_access %Iterate.lookup_impl_witness.6fa, element2 [symbolic] +// CHECK:STDOUT: %impl.elem1.7dd: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.6fa, element1 [symbolic] +// CHECK:STDOUT: %as_type.deb: type = facet_access_type %impl.elem1.7dd [symbolic] +// CHECK:STDOUT: %specific_impl_fn.6ec: = specific_impl_function %impl.elem2.81a, @Iterate.WithSelf.NewCursor(%Iterate.facet.e8c) [symbolic] +// CHECK:STDOUT: %.063: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.01e, %Iterate.facet.e8c [symbolic] +// CHECK:STDOUT: %impl.elem3.ae5: %.063 = impl_witness_access %Iterate.lookup_impl_witness.6fa, element3 [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.f55: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.0d3) [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness.050: = impl_witness imports.%OptionalStorage.impl_witness_table.1c4, @T.as_type.as.OptionalStorage.impl(%facet_value.0d3) [concrete] +// CHECK:STDOUT: %OptionalStorage.facet.19f: %OptionalStorage.type = facet_value %f64.761, (%OptionalStorage.impl_witness.050) [concrete] +// CHECK:STDOUT: %Optional.ebe: type = class_type @Optional, @Optional(%OptionalStorage.facet.19f) [concrete] +// CHECK:STDOUT: %specific_impl_fn.2e1: = specific_impl_function %impl.elem3.ae5, @Iterate.WithSelf.Next(%Iterate.facet.e8c) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.1cf: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.19f) [concrete] +// CHECK:STDOUT: %Optional.HasValue.768: %Optional.HasValue.type.1cf = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.b2d: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.19f) [concrete] +// CHECK:STDOUT: %Optional.Get.f12: %Optional.Get.type.b2d = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.facet.941: %Destroy.type = facet_value %f64.761, (%custom_witness.b80ef6.2, %DestroyImpl.impl_witness.a23) [concrete] +// CHECK:STDOUT: %MaybeUnformed.f92: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.941) [concrete] // CHECK:STDOUT: %.ecc: type = maybe_unformed_type %f64.761 [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.9ab: type = unbound_element_type %DefaultOptionalStorage.6ea, %MaybeUnformed.912 [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.b33: type = unbound_element_type %DefaultOptionalStorage.6ea, bool [concrete] -// CHECK:STDOUT: %struct_type.value.has_value.82f: type = struct_type {.value: %MaybeUnformed.912, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn.315: = specific_function %Optional.HasValue.ff5, @Optional.HasValue(%OptionalStorage.facet.d7a) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn.570: = specific_function %Optional.Get.62a, @Optional.Get(%OptionalStorage.facet.d7a) [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.345: type = unbound_element_type %DefaultOptionalStorage.f55, %MaybeUnformed.f92 [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.34a: type = unbound_element_type %DefaultOptionalStorage.f55, bool [concrete] +// CHECK:STDOUT: %struct_type.value.has_value.e0a: type = struct_type {.value: %MaybeUnformed.f92, .has_value: bool} [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.89a: = specific_function %Optional.HasValue.768, @Optional.HasValue(%OptionalStorage.facet.19f) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.67e: = specific_function %Optional.Get.f12, @Optional.Get(%OptionalStorage.facet.19f) [concrete] // CHECK:STDOUT: %AddAssignWith.type.0c5: type = facet_type <@AddAssignWith, @AddAssignWith(%f64.761)> [concrete] // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.type.763: type = fn_type @Float.as.AddAssignWith.impl.Op, @Float.as.AddAssignWith.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.8aa: %Float.as.AddAssignWith.impl.Op.type.763 = struct_value () [symbolic] @@ -3731,57 +3170,24 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.bb6: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith.WithSelf(%f64.761, %AddAssignWith.facet) [concrete] // CHECK:STDOUT: %.48b: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.bb6, %AddAssignWith.facet [concrete] // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.specific_fn: = specific_function %Float.as.AddAssignWith.impl.Op.e04, @Float.as.AddAssignWith.impl.Op(%int_64) [concrete] -// CHECK:STDOUT: %pattern_type.d8c: type = pattern_type %.ecc [concrete] -// CHECK:STDOUT: %self.param_patt.5ca: %pattern_type.d8c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1f3: %pattern_type.d8c = wrapper_binding_pattern self, %self.param_patt.5ca [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc36_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc36_19.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.007: type = pattern_type %MaybeUnformed.912 [concrete] -// CHECK:STDOUT: %self.param_patt.6cf: %pattern_type.007 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b4d: %pattern_type.007 = wrapper_binding_pattern self, %self.param_patt.6cf [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc36_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc36_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc36_19.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc36_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc36_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc36_19.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.28d: type = pattern_type %struct_type.value.has_value.82f [concrete] -// CHECK:STDOUT: %self.param_patt.f24: %pattern_type.28d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.396: %pattern_type.28d = wrapper_binding_pattern self, %self.param_patt.f24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc36_19.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc36_19.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.ee1: type = pattern_type %DefaultOptionalStorage.6ea [concrete] -// CHECK:STDOUT: %self.param_patt.d5d: %pattern_type.ee1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.aa9: %pattern_type.ee1 = wrapper_binding_pattern self, %self.param_patt.d5d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc36_19.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc36_19.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.4ac: %pattern_type.40d = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.1ec: %pattern_type.40d = wrapper_binding_pattern self, %self.param_patt.4ac [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc36_19.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc36_19.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8: type = fn_type @Destroy.WithSelf.SelfDestruct.loc36_19.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.8: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.cb1: = lookup_impl_witness %impl.elem1.2af, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.a48: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1.2af) [symbolic] -// CHECK:STDOUT: %.421: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.a48, %impl.elem1.2af [symbolic] -// CHECK:STDOUT: %impl.elem2.f8d: %.421 = impl_witness_access %Destroy.lookup_impl_witness.cb1, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.6a1: = specific_impl_function %impl.elem2.f8d, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1.2af) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc36_19.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc36_19.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.80c: %Destroy.type = facet_value bool, (%custom_witness.b80ef6.5, %DestroyImpl.impl_witness.778) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.708: %SubobjectDestroy.type = facet_value %MaybeUnformed.f92, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6fa: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.708) [concrete] +// CHECK:STDOUT: %Destroy.facet.489: %Destroy.type = facet_value %MaybeUnformed.f92, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.6fa) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.8: type = fn_type @SubobjectDestroy.WithSelf.Op.loc36_19.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.8: %SubobjectDestroy.WithSelf.Op.type.6870fd.8 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.8: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.8), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.cdd: %SubobjectDestroy.type = facet_value %Optional.ebe, (%custom_witness.b80ef6.8) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.cdd) [concrete] +// CHECK:STDOUT: %Destroy.facet.54d: %Destroy.type = facet_value %Optional.ebe, (%custom_witness.b80ef6.8, %DestroyImpl.impl_witness.6e5) [concrete] // CHECK:STDOUT: %MutableRange: type = class_type @MutableRange [concrete] // CHECK:STDOUT: %pattern_type.992: type = pattern_type %MutableRange [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -3792,189 +3198,95 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %End.type: type = fn_type @End [concrete] // CHECK:STDOUT: %End: %End.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.902: = custom_witness (%Iterator, %Iterator, %Begin, %End), @CppRangeForIterate [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.9: type = fn_type @Destroy.WithSelf.Op.loc43 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.9: %Destroy.WithSelf.Op.type.ef016f.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9: type = fn_type @Destroy.WithSelf.SelfDestruct.loc43 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.9: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9 = struct_value () [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.type: type = fn_type @Iterator.SubobjectDestroy [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy: %Iterator.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.e74: = custom_witness (%Destroy.WithSelf.Op.403171.9, %Iterator.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.9), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.b9731e.1: type = fn_type @Iterator.Op.1 [concrete] // CHECK:STDOUT: %Iterator.Op.ac6aad.1: %Iterator.Op.type.b9731e.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.0a8: = custom_witness (%f64.761, %Iterator.Op.ac6aad.1), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %custom_witness.f01: = custom_witness (%Iterator.Op.ac6aad.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.700: %SubobjectDestroy.type = facet_value %Iterator, (%custom_witness.f01) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.256: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.700) [concrete] // CHECK:STDOUT: %Iterator.Op.type.b9731e.2: type = fn_type @Iterator.Op.2 [concrete] // CHECK:STDOUT: %Iterator.Op.ac6aad.2: %Iterator.Op.type.b9731e.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.491: = custom_witness (%Iterator.Op.ac6aad.2), @Inc [concrete] +// CHECK:STDOUT: %custom_witness.0a8: = custom_witness (%f64.761, %Iterator.Op.ac6aad.2), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %Iterator.Op.type.b9731e.3: type = fn_type @Iterator.Op.3 [concrete] +// CHECK:STDOUT: %Iterator.Op.ac6aad.3: %Iterator.Op.type.b9731e.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.491: = custom_witness (%Iterator.Op.ac6aad.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [concrete] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [concrete] // CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.068: = custom_witness (%Equal, %NotEqual), @EqWith, @EqWith(%Iterator) [concrete] -// CHECK:STDOUT: %facet_value.c62: %CppRange_where.type.d682d6.1 = facet_value %MutableRange, (%custom_witness.902, %custom_witness.e74, %custom_witness.0a8, %custom_witness.491, %custom_witness.068, %custom_witness.f8f19d.2, %Copy.impl_witness.eac, %custom_witness.e74) [concrete] +// CHECK:STDOUT: %facet_value.13f: %CppRange_where.type.d682d6.1 = facet_value %MutableRange, (%custom_witness.902, %custom_witness.f01, %DestroyImpl.impl_witness.256, %custom_witness.0a8, %custom_witness.491, %custom_witness.068, %custom_witness.b80ef6.2, %DestroyImpl.impl_witness.a23, %Copy.impl_witness.eac, %custom_witness.f01, %DestroyImpl.impl_witness.256) [concrete] // CHECK:STDOUT: %tuple.type.dd0: type = tuple_type (%Iterator, %Iterator) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9: type = fn_type @Destroy.WithSelf.SubobjectDestroy.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.9: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.10: type = fn_type @Destroy.WithSelf.Op.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.10: %Destroy.WithSelf.Op.type.ef016f.10 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10: type = fn_type @Destroy.WithSelf.SelfDestruct.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.10: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.9: = custom_witness (%Destroy.WithSelf.Op.403171.10, %Destroy.WithSelf.SubobjectDestroy.d01daf.9, %Destroy.WithSelf.SelfDestruct.db3fdb.10), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.f0b: %Destroy.type = facet_value %tuple.type.dd0, (%custom_witness.f8f19d.9) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.8eb: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.c62) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.c03: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.c62) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.f32: %T.as_type.as.Iterate.impl.NewCursor.type.c03 = struct_value () [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.06b: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.c62) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.8a0: %T.as_type.as.Iterate.impl.Next.type.06b = struct_value () [concrete] -// CHECK:STDOUT: %facet_value.da8: %Iterate_where.type.11d = facet_value %MutableRange, (%Iterate.impl_witness.8eb) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.9: type = fn_type @SubobjectDestroy.WithSelf.Op.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.9: %SubobjectDestroy.WithSelf.Op.type.6870fd.9 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.9: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.9), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0de: %SubobjectDestroy.type = facet_value %tuple.type.dd0, (%custom_witness.b80ef6.9) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1fa: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0de) [concrete] +// CHECK:STDOUT: %complete_type.843: = complete_type_witness %tuple.type.dd0 [concrete] +// CHECK:STDOUT: %Destroy.facet.5f38: %Destroy.type = facet_value %tuple.type.dd0, (%custom_witness.b80ef6.9, %DestroyImpl.impl_witness.1fa) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.8a2: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.13f) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.82c: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.13f) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.3c2: %T.as_type.as.Iterate.impl.NewCursor.type.82c = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.a70: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.13f) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.bc3: %T.as_type.as.Iterate.impl.Next.type.a70 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.5f7: %Iterate_where.type.a66 = facet_value %MutableRange, (%Iterate.impl_witness.8a2) [concrete] // CHECK:STDOUT: %r.param_patt.aeb: %pattern_type.992 = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.892: %pattern_type.992 = wrapper_binding_pattern r, %r.param_patt.aeb [concrete] -// CHECK:STDOUT: %Iterate.facet.b38: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.8eb) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.601: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.b38) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.63c: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.b38) [concrete] -// CHECK:STDOUT: %.177: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.601, %Iterate.facet.b38 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.f32, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.c62) [concrete] -// CHECK:STDOUT: %.d10: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.63c, %Iterate.facet.b38 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.8a0, @T.as_type.as.Iterate.impl.Next(%facet_value.c62) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.1a9: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.f0b) [concrete] -// CHECK:STDOUT: %.4a2: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.1a9, %Destroy.facet.f0b [concrete] -// CHECK:STDOUT: %complete_type.843: = complete_type_witness %tuple.type.dd0 [concrete] +// CHECK:STDOUT: %Iterate.facet.602: %Iterate.type = facet_value %MutableRange, (%Iterate.impl_witness.8a2) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.748: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.602) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.b58: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.602) [concrete] +// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.748, %Iterate.facet.602 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.3c2, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.13f) [concrete] +// CHECK:STDOUT: %.ab45: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.b58, %Iterate.facet.602 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.bc3, @T.as_type.as.Iterate.impl.Next(%facet_value.13f) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.e1d: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.5f38) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.02f: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.ade)] -// CHECK:STDOUT: %Core.import_ref.406: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.925) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.f42)] -// CHECK:STDOUT: %Core.import_ref.d4a: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.760) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.268)] -// CHECK:STDOUT: %Core.import_ref.9a4: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.d28) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.f29)] -// CHECK:STDOUT: %Core.import_ref.6e3: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.2f2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.884)] -// CHECK:STDOUT: %Core.import_ref.af7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.460 = impl_witness_table (%Core.import_ref.02f, %Core.import_ref.406, %Core.import_ref.d4a, %Core.import_ref.9a4, %Core.import_ref.6e3, %Core.import_ref.af7), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.51c9: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.498] -// CHECK:STDOUT: %Core.import_ref.b03: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.390] +// CHECK:STDOUT: %Core.import_ref.481: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.476)] +// CHECK:STDOUT: %Core.import_ref.66d: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.b57) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.791)] +// CHECK:STDOUT: %Core.import_ref.32c: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.292) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.ae9)] +// CHECK:STDOUT: %Core.import_ref.801: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.18e) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.463)] +// CHECK:STDOUT: %Core.import_ref.eec: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.f27) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.e40)] +// CHECK:STDOUT: %Core.import_ref.a6a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.1c4 = impl_witness_table (%Core.import_ref.481, %Core.import_ref.66d, %Core.import_ref.32c, %Core.import_ref.801, %Core.import_ref.eec, %Core.import_ref.a6a), @T.as_type.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.e86: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.bce] +// CHECK:STDOUT: %Core.import_ref.9ce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.dbe] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.c82: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.3ea) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.f2f)] // CHECK:STDOUT: %Core.import_ref.29e: @Optional.%Optional.Get.type (%Optional.Get.type.786) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.2d0)] -// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] -// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.724: %facet_type.bd0 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.189)] +// CHECK:STDOUT: %Core.import_ref.dd9: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9b6)] // CHECK:STDOUT: %Core.import_ref.946: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.8fb) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.8a1)] // CHECK:STDOUT: %Core.import_ref.cfb: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.d4a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.5a8)] -// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.724, %Core.import_ref.dd9, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %Core.import_ref.19b: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.e8d) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.fe9)] // CHECK:STDOUT: %Copy.impl_witness_table.14d = impl_witness_table (%Core.import_ref.19b), @Float.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.e0d0: @Float.as.AddAssignWith.impl.%Float.as.AddAssignWith.impl.Op.type (%Float.as.AddAssignWith.impl.Op.type.763) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.AddAssignWith.impl.%Float.as.AddAssignWith.impl.Op (constants.%Float.as.AddAssignWith.impl.Op.8aa)] // CHECK:STDOUT: %AddAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.e0d0), @Float.as.AddAssignWith.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.b0d0 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.390: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = field_decl has_value, element1, %Core.import_ref.b0d0 in [concrete] {} -// CHECK:STDOUT: %Core.import_ref.ab7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.498: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = field_decl value, element0, %Core.import_ref.ab7 in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.dbe: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = field_decl has_value, element1, %Core.import_ref.b0d in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.45d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.bce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = field_decl value, element0, %Core.import_ref.45d in [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc36_19.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8c = ref_param_pattern [concrete = constants.%self.param_patt.5ca] -// CHECK:STDOUT: %self.patt: %pattern_type.d8c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.ecc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.ecc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc36_19.1 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d8c = ref_param_pattern [concrete = constants.%self.param_patt.5ca] -// CHECK:STDOUT: %self.patt: %pattern_type.d8c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1f3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.ecc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.ecc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc36_19.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.007 = ref_param_pattern [concrete = constants.%self.param_patt.6cf] -// CHECK:STDOUT: %self.patt: %pattern_type.007 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b4d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.912 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.912 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc36_19.2 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.007 = ref_param_pattern [concrete = constants.%self.param_patt.6cf] -// CHECK:STDOUT: %self.patt: %pattern_type.007 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b4d] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.912 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.912 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc36_19.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc36_19.3 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc36_19.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.28d = ref_param_pattern [concrete = constants.%self.param_patt.f24] -// CHECK:STDOUT: %self.patt: %pattern_type.28d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.396] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.82f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.82f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc36_19.4 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.28d = ref_param_pattern [concrete = constants.%self.param_patt.f24] -// CHECK:STDOUT: %self.patt: %pattern_type.28d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.396] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.82f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.82f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc36_19.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ee1 = ref_param_pattern [concrete = constants.%self.param_patt.d5d] -// CHECK:STDOUT: %self.patt: %pattern_type.ee1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aa9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.6ea = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.6ea = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc36_19.5 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ee1 = ref_param_pattern [concrete = constants.%self.param_patt.d5d] -// CHECK:STDOUT: %self.patt: %pattern_type.ee1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.aa9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.6ea = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.6ea = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc36_19.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.40d = ref_param_pattern [concrete = constants.%self.param_patt.4ac] -// CHECK:STDOUT: %self.patt: %pattern_type.40d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1ec] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.000 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.000 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.8 = fn_decl @Destroy.WithSelf.Op.loc36_19.6 [concrete = constants.%Destroy.WithSelf.Op.403171.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.40d = ref_param_pattern [concrete = constants.%self.param_patt.4ac] -// CHECK:STDOUT: %self.patt: %pattern_type.40d = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.1ec] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.000 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.000 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TestIterate(%R.loc32_17.2: %Iterate_where.type.11d) { +// CHECK:STDOUT: generic fn @TestIterate(%R.loc32_17.2: %Iterate_where.type.a66) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc32_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.e7e)] -// CHECK:STDOUT: %Iterate.facet.loc36_19.5: %Iterate.type = facet_value %R.as_type.loc32_61.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc36_19.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.248)] -// CHECK:STDOUT: %.loc36_19.19: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc36_19.5 [symbolic = %.loc36_19.19 (constants.%.678)] -// CHECK:STDOUT: %impl.elem2.loc36_19.3: @TestIterate.%.loc36_19.19 (%.678) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc36_19.3 (constants.%impl.elem2.e3e)] -// CHECK:STDOUT: %specific_impl_fn.loc36_19.4: = specific_impl_function %impl.elem2.loc36_19.3, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc36_19.5) [symbolic = %specific_impl_fn.loc36_19.4 (constants.%specific_impl_fn.0ea)] +// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc32_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.6fa)] +// CHECK:STDOUT: %Iterate.facet.loc36_19.5: %Iterate.type = facet_value %R.as_type.loc32_61.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc36_19.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.a57)] +// CHECK:STDOUT: %.loc36_19.23: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc36_19.5 [symbolic = %.loc36_19.23 (constants.%.b10)] +// CHECK:STDOUT: %impl.elem2.loc36_19.2: @TestIterate.%.loc36_19.23 (%.b10) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc36_19.2 (constants.%impl.elem2.81a)] +// CHECK:STDOUT: %specific_impl_fn.loc36_19.3: = specific_impl_function %impl.elem2.loc36_19.2, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc36_19.5) [symbolic = %specific_impl_fn.loc36_19.3 (constants.%specific_impl_fn.6ec)] +// CHECK:STDOUT: +// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc36_19.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.01e)] +// CHECK:STDOUT: %.loc36_19.24: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc36_19.5 [symbolic = %.loc36_19.24 (constants.%.063)] +// CHECK:STDOUT: %impl.elem3.loc36_19.2: @TestIterate.%.loc36_19.24 (%.063) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc36_19.2 (constants.%impl.elem3.ae5)] +// CHECK:STDOUT: %specific_impl_fn.loc36_19.4: = specific_impl_function %impl.elem3.loc36_19.2, @Iterate.WithSelf.Next(%Iterate.facet.loc36_19.5) [symbolic = %specific_impl_fn.loc36_19.4 (constants.%specific_impl_fn.2e1)] // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc36_19.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.9a9)] -// CHECK:STDOUT: %.loc36_19.20: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc36_19.5 [symbolic = %.loc36_19.20 (constants.%.fe7)] -// CHECK:STDOUT: %impl.elem3.loc36_19.2: @TestIterate.%.loc36_19.20 (%.fe7) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc36_19.2 (constants.%impl.elem3.ae5)] -// CHECK:STDOUT: %specific_impl_fn.loc36_19.5: = specific_impl_function %impl.elem3.loc36_19.2, @Iterate.WithSelf.Next(%Iterate.facet.loc36_19.5) [symbolic = %specific_impl_fn.loc36_19.5 (constants.%specific_impl_fn.493)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.a48)] -// CHECK:STDOUT: %.loc36_19.21: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %impl.elem1 [symbolic = %.loc36_19.21 (constants.%.421)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.cb1)] -// CHECK:STDOUT: %impl.elem2.loc36_19.4: @TestIterate.%.loc36_19.21 (%.421) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc36_19.4 (constants.%impl.elem2.f8d)] -// CHECK:STDOUT: %specific_impl_fn.loc36_19.6: = specific_impl_function %impl.elem2.loc36_19.4, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1) [symbolic = %specific_impl_fn.loc36_19.6 (constants.%specific_impl_fn.6a1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc32_61.1 (%R.as_type)) { // CHECK:STDOUT: !entry: @@ -3983,51 +3295,51 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.667 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc32_61.1 (%R.as_type) = name_ref r, %r -// CHECK:STDOUT: %impl.elem2.loc36_19.1: @TestIterate.%.loc36_19.19 (%.678) = impl_witness_access constants.%Iterate.lookup_impl_witness.e7e, element2 [symbolic = %impl.elem2.loc36_19.3 (constants.%impl.elem2.e3e)] +// CHECK:STDOUT: %impl.elem2.loc36_19.1: @TestIterate.%.loc36_19.23 (%.b10) = impl_witness_access constants.%Iterate.lookup_impl_witness.6fa, element2 [symbolic = %impl.elem2.loc36_19.2 (constants.%impl.elem2.81a)] // CHECK:STDOUT: %bound_method.loc36_19.1: = bound_method %r.ref, %impl.elem2.loc36_19.1 -// CHECK:STDOUT: %Iterate.facet.loc36_19.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e7e) [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %.loc36_19.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc36_19.1 [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %Iterate.facet.loc36_19.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e7e) [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %.loc36_19.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc36_19.2 [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %specific_impl_fn.loc36_19.1: = specific_impl_function %impl.elem2.loc36_19.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.a43) [symbolic = %specific_impl_fn.loc36_19.4 (constants.%specific_impl_fn.0ea)] +// CHECK:STDOUT: %Iterate.facet.loc36_19.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.6fa) [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %.loc36_19.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc36_19.1 [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %Iterate.facet.loc36_19.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.6fa) [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %.loc36_19.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc36_19.2 [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %specific_impl_fn.loc36_19.1: = specific_impl_function %impl.elem2.loc36_19.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.e8c) [symbolic = %specific_impl_fn.loc36_19.3 (constants.%specific_impl_fn.6ec)] // CHECK:STDOUT: %bound_method.loc36_19.2: = bound_method %r.ref, %specific_impl_fn.loc36_19.1 -// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.ba7) = var_storage invalid -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.ba7) to %var = call %bound_method.loc36_19.2(%r.ref) +// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.deb) = var_storage invalid +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.deb) to %var = call %bound_method.loc36_19.2(%r.ref) // CHECK:STDOUT: assign %var, %Iterate.WithSelf.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3.loc36_19.1: @TestIterate.%.loc36_19.20 (%.fe7) = impl_witness_access constants.%Iterate.lookup_impl_witness.e7e, element3 [symbolic = %impl.elem3.loc36_19.2 (constants.%impl.elem3.ae5)] +// CHECK:STDOUT: %impl.elem3.loc36_19.1: @TestIterate.%.loc36_19.24 (%.063) = impl_witness_access constants.%Iterate.lookup_impl_witness.6fa, element3 [symbolic = %impl.elem3.loc36_19.2 (constants.%impl.elem3.ae5)] // CHECK:STDOUT: %bound_method.loc36_19.3: = bound_method %r.ref, %impl.elem3.loc36_19.1 -// CHECK:STDOUT: %Iterate.facet.loc36_19.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e7e) [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %.loc36_19.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc36_19.3 [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %Iterate.facet.loc36_19.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.e7e) [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %.loc36_19.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc36_19.4 [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.a43)] -// CHECK:STDOUT: %.loc36_19.5: %Destroy.type = converted constants.%as_type.ba7, constants.%impl.elem1.2af [symbolic = %impl.elem1 (constants.%impl.elem1.2af)] -// CHECK:STDOUT: %.loc36_19.6: %Destroy.type = converted constants.%as_type.ba7, constants.%impl.elem1.2af [symbolic = %impl.elem1 (constants.%impl.elem1.2af)] -// CHECK:STDOUT: %specific_impl_fn.loc36_19.2: = specific_impl_function %impl.elem3.loc36_19.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.a43) [symbolic = %specific_impl_fn.loc36_19.5 (constants.%specific_impl_fn.493)] +// CHECK:STDOUT: %Iterate.facet.loc36_19.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.6fa) [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %.loc36_19.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc36_19.3 [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %Iterate.facet.loc36_19.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.6fa) [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %.loc36_19.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc36_19.4 [symbolic = %Iterate.facet.loc36_19.5 (constants.%Iterate.facet.e8c)] +// CHECK:STDOUT: %.loc36_19.5: %Destroy.type = converted constants.%as_type.deb, constants.%impl.elem1.7dd [symbolic = %impl.elem1 (constants.%impl.elem1.7dd)] +// CHECK:STDOUT: %.loc36_19.6: %Destroy.type = converted constants.%as_type.deb, constants.%impl.elem1.7dd [symbolic = %impl.elem1 (constants.%impl.elem1.7dd)] +// CHECK:STDOUT: %specific_impl_fn.loc36_19.2: = specific_impl_function %impl.elem3.loc36_19.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.e8c) [symbolic = %specific_impl_fn.loc36_19.4 (constants.%specific_impl_fn.2e1)] // CHECK:STDOUT: %bound_method.loc36_19.4: = bound_method %r.ref, %specific_impl_fn.loc36_19.2 -// CHECK:STDOUT: %.loc36_19.7: ref %Optional.000 = temporary_storage -// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.000 to %.loc36_19.7 = call %bound_method.loc36_19.4(%r.ref, %var) -// CHECK:STDOUT: %.loc36_19.8: ref %Optional.000 = temporary %.loc36_19.7, %Iterate.WithSelf.Next.call -// CHECK:STDOUT: %.loc36_19.9: %Optional.HasValue.type.92f = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.HasValue.ff5] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.92f = name_ref HasValue, %.loc36_19.9 [concrete = constants.%Optional.HasValue.ff5] +// CHECK:STDOUT: %.loc36_19.7: ref %Optional.ebe = temporary_storage +// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.ebe to %.loc36_19.7 = call %bound_method.loc36_19.4(%r.ref, %var) +// CHECK:STDOUT: %.loc36_19.8: ref %Optional.ebe = temporary %.loc36_19.7, %Iterate.WithSelf.Next.call +// CHECK:STDOUT: %.loc36_19.9: %Optional.HasValue.type.1cf = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.HasValue.768] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.1cf = name_ref HasValue, %.loc36_19.9 [concrete = constants.%Optional.HasValue.768] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc36_19.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.HasValue.specific_fn.315] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.HasValue.specific_fn.89a] // CHECK:STDOUT: %bound_method.loc36_19.5: = bound_method %.loc36_19.8, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc36_19.10: %Optional.000 = acquire_value %.loc36_19.8 +// CHECK:STDOUT: %.loc36_19.10: %Optional.ebe = acquire_value %.loc36_19.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc36_19.5(%.loc36_19.10) // CHECK:STDOUT: %.loc36_19.11: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc36_19.12: bool = converted %Optional.HasValue.call, %.loc36_19.11 // CHECK:STDOUT: if %.loc36_19.12 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc36_19.13: %Optional.Get.type.695 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.Get.62a] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.695 = name_ref Get, %.loc36_19.13 [concrete = constants.%Optional.Get.62a] +// CHECK:STDOUT: %.loc36_19.13: %Optional.Get.type.b2d = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.Get.f12] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.b2d = name_ref Get, %.loc36_19.13 [concrete = constants.%Optional.Get.f12] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc36_19.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.Get.specific_fn.570] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.Get.specific_fn.67e] // CHECK:STDOUT: %bound_method.loc36_19.6: = bound_method %.loc36_19.8, %Optional.Get.specific_fn -// CHECK:STDOUT: %.loc36_19.14: %Optional.000 = acquire_value %.loc36_19.8 +// CHECK:STDOUT: %.loc36_19.14: %Optional.ebe = acquire_value %.loc36_19.8 // CHECK:STDOUT: %Optional.Get.call: init %f64.761 = call %bound_method.loc36_19.6(%.loc36_19.14) // CHECK:STDOUT: %.loc36_19.15: %f64.761 = value_of_initializer %Optional.Get.call // CHECK:STDOUT: %.loc36_19.16: %f64.761 = converted %Optional.Get.call, %.loc36_19.15 @@ -4040,112 +3352,79 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %specific_fn.loc37: = specific_function %impl.elem0.loc37, @Float.as.AddAssignWith.impl.Op(constants.%int_64) [concrete = constants.%Float.as.AddAssignWith.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc37_9.2: = bound_method %sum.ref, %specific_fn.loc37 // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc37_9.2(%sum.ref, %i.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc36_19.1: = bound_method %.loc36_19.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc36_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc36_19.1(%.loc36_19.8) +// CHECK:STDOUT: %Destroy.facet.loc36_19.1: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc36_19.17: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc36_19.1 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %Destroy.facet.loc36_19.2: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc36_19.18: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc36_19.2 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc36_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc36_19.8) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc36_19.2: = bound_method %.loc36_19.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc36_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc36_19.2(%.loc36_19.8) -// CHECK:STDOUT: %impl.elem2.loc36_19.2: @TestIterate.%.loc36_19.21 (%.421) = impl_witness_access constants.%Destroy.lookup_impl_witness.cb1, element2 [symbolic = %impl.elem2.loc36_19.4 (constants.%impl.elem2.f8d)] -// CHECK:STDOUT: %bound_method.loc36_19.7: = bound_method %var, %impl.elem2.loc36_19.2 -// CHECK:STDOUT: %.loc36_19.17: %Destroy.type = converted constants.%as_type.ba7, constants.%impl.elem1.2af [symbolic = %impl.elem1 (constants.%impl.elem1.2af)] -// CHECK:STDOUT: %.loc36_19.18: %Destroy.type = converted constants.%as_type.ba7, constants.%impl.elem1.2af [symbolic = %impl.elem1 (constants.%impl.elem1.2af)] -// CHECK:STDOUT: %specific_impl_fn.loc36_19.3: = specific_impl_function %impl.elem2.loc36_19.2, @Destroy.WithSelf.SelfDestruct.1(constants.%impl.elem1.2af) [symbolic = %specific_impl_fn.loc36_19.6 (constants.%specific_impl_fn.6a1)] -// CHECK:STDOUT: %bound_method.loc36_19.8: = bound_method %var, %specific_impl_fn.loc36_19.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc36_19.3: init %empty_tuple.type = call %bound_method.loc36_19.8(%var) +// CHECK:STDOUT: %Destroy.facet.loc36_19.3: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc36_19.19: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc36_19.3 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %Destroy.facet.loc36_19.4: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc36_19.20: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc36_19.4 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc36_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc36_19.8) +// CHECK:STDOUT: %.loc36_19.21: %Destroy.type = converted constants.%as_type.deb, constants.%impl.elem1.7dd [symbolic = %impl.elem1 (constants.%impl.elem1.7dd)] +// CHECK:STDOUT: %.loc36_19.22: %Destroy.type = converted constants.%as_type.deb, constants.%impl.elem1.7dd [symbolic = %impl.elem1 (constants.%impl.elem1.7dd)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc36_19.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_19.1(%self.param: ref %.ecc) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc36_19.1(%self.param: ref %.ecc) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc36_19.1(%self.param: ref %.ecc) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc36_19.2(%self.param: ref %MaybeUnformed.f92) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc36_19.1(%self.param: ref %.ecc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc36_19.3(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_19.2(%self.param: ref %MaybeUnformed.912) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc36_19.2(%self.param: ref %MaybeUnformed.912) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc36_19.2(%self.param: ref %MaybeUnformed.912) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_19.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc36_19.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc36_19.3(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_19.4(%self.param: ref %struct_type.value.has_value.82f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc36_19.4(%self.param: ref %struct_type.value.has_value.e0a) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc36_19.1: ref bool = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc36_19.1: = bound_method %.loc36_19.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc36_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc36_19.1(%.loc36_19.1) -// CHECK:STDOUT: %.loc36_19.2: ref %MaybeUnformed.912 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc36_19.2: = bound_method %.loc36_19.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc36_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc36_19.2(%.loc36_19.2) +// CHECK:STDOUT: %Destroy.facet.loc36_19.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.5, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc36_19.2: %Destroy.type = converted bool, %Destroy.facet.loc36_19.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc36_19.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.5, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc36_19.3: %Destroy.type = converted bool, %Destroy.facet.loc36_19.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc36_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc36_19.1) +// CHECK:STDOUT: %.loc36_19.4: ref %MaybeUnformed.f92 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc36_19.3: %Destroy.type = facet_value constants.%MaybeUnformed.f92, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.6fa) [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %.loc36_19.5: %Destroy.type = converted constants.%MaybeUnformed.f92, %Destroy.facet.loc36_19.3 [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %Destroy.facet.loc36_19.4: %Destroy.type = facet_value constants.%MaybeUnformed.f92, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.6fa) [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %.loc36_19.6: %Destroy.type = converted constants.%MaybeUnformed.f92, %Destroy.facet.loc36_19.4 [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc36_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc36_19.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc36_19.4(%self.param: ref %struct_type.value.has_value.82f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc36_19.4(%self.param: ref %struct_type.value.has_value.82f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc36_19.5(%self.param: ref %DefaultOptionalStorage.f55) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_19.5(%self.param: ref %DefaultOptionalStorage.6ea) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.b33 = name_ref has_value, imports.%Core.import_ref.b03 [concrete = imports.%field_decl.390] +// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.34a = name_ref has_value, imports.%Core.import_ref.9ce [concrete = imports.%field_decl.dbe] // CHECK:STDOUT: %.loc36_19.1: ref bool = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc36_19.1: = bound_method %.loc36_19.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc36_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc36_19.1(%.loc36_19.1) -// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.9ab = name_ref value, imports.%Core.import_ref.51c9 [concrete = imports.%field_decl.498] -// CHECK:STDOUT: %.loc36_19.2: ref %MaybeUnformed.912 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc36_19.2: = bound_method %.loc36_19.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc36_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc36_19.2(%.loc36_19.2) +// CHECK:STDOUT: %Destroy.facet.loc36_19.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.5, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc36_19.2: %Destroy.type = converted bool, %Destroy.facet.loc36_19.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc36_19.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.5, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc36_19.3: %Destroy.type = converted bool, %Destroy.facet.loc36_19.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc36_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc36_19.1) +// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.345 = name_ref value, imports.%Core.import_ref.e86 [concrete = imports.%field_decl.bce] +// CHECK:STDOUT: %.loc36_19.4: ref %MaybeUnformed.f92 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc36_19.3: %Destroy.type = facet_value constants.%MaybeUnformed.f92, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.6fa) [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %.loc36_19.5: %Destroy.type = converted constants.%MaybeUnformed.f92, %Destroy.facet.loc36_19.3 [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %Destroy.facet.loc36_19.4: %Destroy.type = facet_value constants.%MaybeUnformed.f92, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.6fa) [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: %.loc36_19.6: %Destroy.type = converted constants.%MaybeUnformed.f92, %Destroy.facet.loc36_19.4 [concrete = constants.%Destroy.facet.489] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc36_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc36_19.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc36_19.5(%self.param: ref %DefaultOptionalStorage.6ea) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc36_19.5(%self.param: ref %DefaultOptionalStorage.6ea) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc36_19.6(%self.param: ref %Optional.000) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc36_19.6(%self.param: ref %Optional.000) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc36_19.6(%self.param: ref %Optional.000) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.7(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc36_19.6(%self.param: ref %Optional.ebe) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TestRangeFor(%m.param: ref %MutableRange) { // CHECK:STDOUT: !entry: @@ -4154,13 +3433,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.667 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %m.ref: ref %MutableRange = name_ref m, %m -// CHECK:STDOUT: %impl.elem2: %.177 = impl_witness_access constants.%Iterate.impl_witness.8eb, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.f32] +// CHECK:STDOUT: %impl.elem2: %.03d = impl_witness_access constants.%Iterate.impl_witness.8a2, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.3c2] // CHECK:STDOUT: %bound_method.loc50_19.1: = bound_method %m.ref, %impl.elem2 -// CHECK:STDOUT: %facet_value.loc50_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.902, constants.%custom_witness.e74, constants.%custom_witness.0a8, constants.%custom_witness.491, constants.%custom_witness.068, constants.%custom_witness.f8f19d.2, constants.%Copy.impl_witness.eac, constants.%custom_witness.e74) [concrete = constants.%facet_value.c62] -// CHECK:STDOUT: %.loc50_19.1: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc50_19.1 [concrete = constants.%facet_value.c62] -// CHECK:STDOUT: %facet_value.loc50_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.902, constants.%custom_witness.e74, constants.%custom_witness.0a8, constants.%custom_witness.491, constants.%custom_witness.068, constants.%custom_witness.f8f19d.2, constants.%Copy.impl_witness.eac, constants.%custom_witness.e74) [concrete = constants.%facet_value.c62] -// CHECK:STDOUT: %.loc50_19.2: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc50_19.2 [concrete = constants.%facet_value.c62] -// CHECK:STDOUT: %specific_fn.loc50_19.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.c62) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] +// CHECK:STDOUT: %facet_value.loc50_19.1: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.902, constants.%custom_witness.f01, constants.%DestroyImpl.impl_witness.256, constants.%custom_witness.0a8, constants.%custom_witness.491, constants.%custom_witness.068, constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.a23, constants.%Copy.impl_witness.eac, constants.%custom_witness.f01, constants.%DestroyImpl.impl_witness.256) [concrete = constants.%facet_value.13f] +// CHECK:STDOUT: %.loc50_19.1: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc50_19.1 [concrete = constants.%facet_value.13f] +// CHECK:STDOUT: %facet_value.loc50_19.2: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.902, constants.%custom_witness.f01, constants.%DestroyImpl.impl_witness.256, constants.%custom_witness.0a8, constants.%custom_witness.491, constants.%custom_witness.068, constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.a23, constants.%Copy.impl_witness.eac, constants.%custom_witness.f01, constants.%DestroyImpl.impl_witness.256) [concrete = constants.%facet_value.13f] +// CHECK:STDOUT: %.loc50_19.2: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc50_19.2 [concrete = constants.%facet_value.13f] +// CHECK:STDOUT: %specific_fn.loc50_19.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.13f) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc50_19.2: = bound_method %m.ref, %specific_fn.loc50_19.1 // CHECK:STDOUT: %var: ref %tuple.type.dd0 = var_storage invalid // CHECK:STDOUT: %.loc50_18.1: %MutableRange = acquire_value %m.ref @@ -4169,36 +3448,36 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3: %.d10 = impl_witness_access constants.%Iterate.impl_witness.8eb, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.8a0] +// CHECK:STDOUT: %impl.elem3: %.ab45 = impl_witness_access constants.%Iterate.impl_witness.8a2, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.bc3] // CHECK:STDOUT: %bound_method.loc50_19.3: = bound_method %m.ref, %impl.elem3 -// CHECK:STDOUT: %facet_value.loc50_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.902, constants.%custom_witness.e74, constants.%custom_witness.0a8, constants.%custom_witness.491, constants.%custom_witness.068, constants.%custom_witness.f8f19d.2, constants.%Copy.impl_witness.eac, constants.%custom_witness.e74) [concrete = constants.%facet_value.c62] -// CHECK:STDOUT: %.loc50_19.3: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc50_19.3 [concrete = constants.%facet_value.c62] -// CHECK:STDOUT: %facet_value.loc50_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.902, constants.%custom_witness.e74, constants.%custom_witness.0a8, constants.%custom_witness.491, constants.%custom_witness.068, constants.%custom_witness.f8f19d.2, constants.%Copy.impl_witness.eac, constants.%custom_witness.e74) [concrete = constants.%facet_value.c62] -// CHECK:STDOUT: %.loc50_19.4: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc50_19.4 [concrete = constants.%facet_value.c62] -// CHECK:STDOUT: %specific_fn.loc50_19.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.c62) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] +// CHECK:STDOUT: %facet_value.loc50_19.3: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.902, constants.%custom_witness.f01, constants.%DestroyImpl.impl_witness.256, constants.%custom_witness.0a8, constants.%custom_witness.491, constants.%custom_witness.068, constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.a23, constants.%Copy.impl_witness.eac, constants.%custom_witness.f01, constants.%DestroyImpl.impl_witness.256) [concrete = constants.%facet_value.13f] +// CHECK:STDOUT: %.loc50_19.3: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc50_19.3 [concrete = constants.%facet_value.13f] +// CHECK:STDOUT: %facet_value.loc50_19.4: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableRange, (constants.%custom_witness.902, constants.%custom_witness.f01, constants.%DestroyImpl.impl_witness.256, constants.%custom_witness.0a8, constants.%custom_witness.491, constants.%custom_witness.068, constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.a23, constants.%Copy.impl_witness.eac, constants.%custom_witness.f01, constants.%DestroyImpl.impl_witness.256) [concrete = constants.%facet_value.13f] +// CHECK:STDOUT: %.loc50_19.4: %CppRange_where.type.d682d6.1 = converted constants.%MutableRange, %facet_value.loc50_19.4 [concrete = constants.%facet_value.13f] +// CHECK:STDOUT: %specific_fn.loc50_19.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.13f) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc50_19.4: = bound_method %m.ref, %specific_fn.loc50_19.2 -// CHECK:STDOUT: %.loc50_19.5: ref %Optional.000 = temporary_storage +// CHECK:STDOUT: %.loc50_19.5: ref %Optional.ebe = temporary_storage // CHECK:STDOUT: %.loc50_18.2: %MutableRange = acquire_value %m.ref -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.000 to %.loc50_19.5 = call %bound_method.loc50_19.4(%.loc50_18.2, %var) -// CHECK:STDOUT: %.loc50_19.6: ref %Optional.000 = temporary %.loc50_19.5, %T.as_type.as.Iterate.impl.Next.call -// CHECK:STDOUT: %.loc50_19.7: %Optional.HasValue.type.92f = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.HasValue.ff5] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.92f = name_ref HasValue, %.loc50_19.7 [concrete = constants.%Optional.HasValue.ff5] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.ebe to %.loc50_19.5 = call %bound_method.loc50_19.4(%.loc50_18.2, %var) +// CHECK:STDOUT: %.loc50_19.6: ref %Optional.ebe = temporary %.loc50_19.5, %T.as_type.as.Iterate.impl.Next.call +// CHECK:STDOUT: %.loc50_19.7: %Optional.HasValue.type.1cf = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.HasValue.768] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.1cf = name_ref HasValue, %.loc50_19.7 [concrete = constants.%Optional.HasValue.768] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc50_19.6, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.HasValue.specific_fn.315] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.HasValue.specific_fn.89a] // CHECK:STDOUT: %bound_method.loc50_19.5: = bound_method %.loc50_19.6, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc50_19.8: %Optional.000 = acquire_value %.loc50_19.6 +// CHECK:STDOUT: %.loc50_19.8: %Optional.ebe = acquire_value %.loc50_19.6 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc50_19.5(%.loc50_19.8) // CHECK:STDOUT: %.loc50_19.9: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc50_19.10: bool = converted %Optional.HasValue.call, %.loc50_19.9 // CHECK:STDOUT: if %.loc50_19.10 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc50_19.11: %Optional.Get.type.695 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.Get.62a] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.695 = name_ref Get, %.loc50_19.11 [concrete = constants.%Optional.Get.62a] +// CHECK:STDOUT: %.loc50_19.11: %Optional.Get.type.b2d = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.Get.f12] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.b2d = name_ref Get, %.loc50_19.11 [concrete = constants.%Optional.Get.f12] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc50_19.6, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.d7a) [concrete = constants.%Optional.Get.specific_fn.570] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.19f) [concrete = constants.%Optional.Get.specific_fn.67e] // CHECK:STDOUT: %bound_method.loc50_19.6: = bound_method %.loc50_19.6, %Optional.Get.specific_fn -// CHECK:STDOUT: %.loc50_19.12: %Optional.000 = acquire_value %.loc50_19.6 +// CHECK:STDOUT: %.loc50_19.12: %Optional.ebe = acquire_value %.loc50_19.6 // CHECK:STDOUT: %Optional.Get.call: init %f64.761 = call %bound_method.loc50_19.6(%.loc50_19.12) // CHECK:STDOUT: %.loc50_19.13: %f64.761 = value_of_initializer %Optional.Get.call // CHECK:STDOUT: %.loc50_19.14: %f64.761 = converted %Optional.Get.call, %.loc50_19.13 @@ -4211,15 +3490,27 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %specific_fn.loc51: = specific_function %impl.elem0.loc51, @Float.as.AddAssignWith.impl.Op(constants.%int_64) [concrete = constants.%Float.as.AddAssignWith.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc51_9.2: = bound_method %sum.ref, %specific_fn.loc51 // CHECK:STDOUT: %Float.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc51_9.2(%sum.ref, %i.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc50_19.1: = bound_method %.loc50_19.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc50_19.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc50_19.1(%.loc50_19.6) +// CHECK:STDOUT: %Destroy.facet.loc50_19.1: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc50_19.15: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc50_19.1 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %Destroy.facet.loc50_19.2: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc50_19.16: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc50_19.2 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc50_19.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc50_19.6) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc50_19.2: = bound_method %.loc50_19.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc50_19.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc50_19.2(%.loc50_19.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc50_19.3: = bound_method %var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc50_19.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc50_19.3(%var) +// CHECK:STDOUT: %Destroy.facet.loc50_19.3: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc50_19.17: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc50_19.3 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %Destroy.facet.loc50_19.4: %Destroy.type = facet_value constants.%Optional.ebe, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.6e5) [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: %.loc50_19.18: %Destroy.type = converted constants.%Optional.ebe, %Destroy.facet.loc50_19.4 [concrete = constants.%Destroy.facet.54d] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc50_19.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc50_19.6) +// CHECK:STDOUT: %Destroy.facet.loc50_19.5: %Destroy.type = facet_value constants.%tuple.type.dd0, (constants.%custom_witness.b80ef6.9, constants.%DestroyImpl.impl_witness.1fa) [concrete = constants.%Destroy.facet.5f38] +// CHECK:STDOUT: %.loc50_19.19: %Destroy.type = converted constants.%tuple.type.dd0, %Destroy.facet.loc50_19.5 [concrete = constants.%Destroy.facet.5f38] +// CHECK:STDOUT: %Destroy.facet.loc50_19.6: %Destroy.type = facet_value constants.%tuple.type.dd0, (constants.%custom_witness.b80ef6.9, constants.%DestroyImpl.impl_witness.1fa) [concrete = constants.%Destroy.facet.5f38] +// CHECK:STDOUT: %.loc50_19.20: %Destroy.type = converted constants.%tuple.type.dd0, %Destroy.facet.loc50_19.6 [concrete = constants.%Destroy.facet.5f38] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc50_19.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -4227,14 +3518,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %R.patt.loc32_17.2 => constants.%R.patt // CHECK:STDOUT: %R.loc32_17.1 => constants.%R // CHECK:STDOUT: %R.as_type.loc32_61.1 => constants.%R.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.874 -// CHECK:STDOUT: %r.param_patt.loc32_59.2 => constants.%r.param_patt.ef5 -// CHECK:STDOUT: %r.patt.loc32_59.2 => constants.%r.patt.c43 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.c3b +// CHECK:STDOUT: %r.param_patt.loc32_59.2 => constants.%r.param_patt.304 +// CHECK:STDOUT: %r.patt.loc32_59.2 => constants.%r.patt.240 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.da8) { +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.5f7) { // CHECK:STDOUT: %R.patt.loc32_17.2 => constants.%R.patt -// CHECK:STDOUT: %R.loc32_17.1 => constants.%facet_value.da8 +// CHECK:STDOUT: %R.loc32_17.1 => constants.%facet_value.5f7 // CHECK:STDOUT: %R.as_type.loc32_61.1 => constants.%MutableRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.992 // CHECK:STDOUT: %r.param_patt.loc32_59.2 => constants.%r.param_patt.aeb @@ -4242,24 +3533,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc32 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.8eb -// CHECK:STDOUT: %Iterate.facet.loc36_19.5 => constants.%Iterate.facet.b38 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.601 -// CHECK:STDOUT: %.loc36_19.19 => constants.%.177 -// CHECK:STDOUT: %impl.elem2.loc36_19.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.f32 -// CHECK:STDOUT: %specific_impl_fn.loc36_19.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn -// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.f0b +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.8a2 +// CHECK:STDOUT: %Iterate.facet.loc36_19.5 => constants.%Iterate.facet.602 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.748 +// CHECK:STDOUT: %.loc36_19.23 => constants.%.03d +// CHECK:STDOUT: %impl.elem2.loc36_19.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.3c2 +// CHECK:STDOUT: %specific_impl_fn.loc36_19.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn +// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.5f38 // CHECK:STDOUT: %as_type => constants.%tuple.type.dd0 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.843 -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.63c -// CHECK:STDOUT: %.loc36_19.20 => constants.%.d10 -// CHECK:STDOUT: %impl.elem3.loc36_19.2 => constants.%T.as_type.as.Iterate.impl.Next.8a0 -// CHECK:STDOUT: %specific_impl_fn.loc36_19.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.1a9 -// CHECK:STDOUT: %.loc36_19.21 => constants.%.4a2 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.9 -// CHECK:STDOUT: %impl.elem2.loc36_19.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 -// CHECK:STDOUT: %specific_impl_fn.loc36_19.6 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.b58 +// CHECK:STDOUT: %.loc36_19.24 => constants.%.ab45 +// CHECK:STDOUT: %impl.elem3.loc36_19.2 => constants.%T.as_type.as.Iterate.impl.Next.bc3 +// CHECK:STDOUT: %specific_impl_fn.loc36_19.4 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn +// CHECK:STDOUT: %SelfDestruct.specific_fn.5 => constants.%SelfDestruct.specific_fn.e1d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- adl_returns_different_types.carbon @@ -4268,31 +3555,37 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %facet_type.bd0: type = facet_type <@Copy & @Destroy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.Get.2d0: %Optional.Get.type.786 = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f2f: %Optional.HasValue.type.3ea = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.74b: type = facet_access_type %T.283 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.28a: = lookup_impl_witness %T.283, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.16e: %Destroy.type = facet_value %T.as_type.74b, (%Destroy.lookup_impl_witness.28a) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.91c: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.16e) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.ade: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.b49: type = unbound_element_type %DefaultOptionalStorage.ade, bool [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.229: type = unbound_element_type %DefaultOptionalStorage.ade, %MaybeUnformed.91c [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.2f2: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.884: %T.as_type.as.OptionalStorage.impl.Get.type.2f2 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.d28: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.f29: %T.as_type.as.OptionalStorage.impl.Has.type.d28 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.760: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.268: %T.as_type.as.OptionalStorage.impl.Some.type.760 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.925: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.f42: %T.as_type.as.OptionalStorage.impl.None.type.925 = struct_value () [symbolic] +// CHECK:STDOUT: %T.f84392.1: %facet_type.bd0 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.c1cc3e.1: type = facet_access_type %T.f84392.1 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.70f: = lookup_impl_witness %T.f84392.1, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.bf2: = lookup_impl_witness %T.f84392.1, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.dc4: %Destroy.type = facet_value %T.as_type.c1cc3e.1, (%SubobjectDestroy.lookup_impl_witness.70f, %DestroyImpl.lookup_impl_witness.bf2) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.348: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.dc4) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.476: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.4a2: type = unbound_element_type %DefaultOptionalStorage.476, bool [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.ff3: type = unbound_element_type %DefaultOptionalStorage.476, %MaybeUnformed.348 [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.f27: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.e40: %T.as_type.as.OptionalStorage.impl.Get.type.f27 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.18e: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.463: %T.as_type.as.OptionalStorage.impl.Has.type.18e = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.292: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.ae9: %T.as_type.as.OptionalStorage.impl.Some.type.292 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.b57: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.791: %T.as_type.as.OptionalStorage.impl.None.type.b57 = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] // CHECK:STDOUT: %.Self.e0b: %CppRange.type = symbolic_binding .Self [symbolic_self] @@ -4301,133 +3594,99 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d3, @CppUnsafeDeref [symbolic_self] // CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] // CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] -// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.f45530.3: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.5a8: %T.as_type.as.Iterate.impl.Next.type.d4a = struct_value () [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.3, @CppRangeForIterate [symbolic] // CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] // CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.8a1: %T.as_type.as.Iterate.impl.NewCursor.type.8fb = struct_value () [symbolic] // CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] // CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.dc9: = lookup_impl_witness %tuple.type.1ba, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.504: = lookup_impl_witness %tuple.type.1ba, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.9b6: %Destroy.type = facet_value %tuple.type.1ba, (%SubobjectDestroy.lookup_impl_witness.dc9, %DestroyImpl.lookup_impl_witness.504) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.b15da7.2: = lookup_impl_witness %impl.elem0.493765.2, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.4e7f44.2: = lookup_impl_witness %impl.elem0.493765.2, @DestroyImpl [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %facet_value.189: %facet_type.bd0 = facet_value %impl.elem0.493765.2, (%SubobjectDestroy.lookup_impl_witness.b15da7.2, %DestroyImpl.lookup_impl_witness.4e7f44.2, %Copy.lookup_impl_witness.167) [symbolic] // CHECK:STDOUT: %ValueType: type = class_type @ValueType [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.c43: type = pattern_type %ValueType [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc27 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc27 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %ValueType.SubobjectDestroy.type: type = fn_type @ValueType.SubobjectDestroy [concrete] -// CHECK:STDOUT: %ValueType.SubobjectDestroy: %ValueType.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.226: = custom_witness (%Destroy.WithSelf.Op.403171.2, %ValueType.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] +// CHECK:STDOUT: %ValueType.Op.type.4c0699.1: type = fn_type @ValueType.Op.1 [concrete] +// CHECK:STDOUT: %ValueType.Op.4ec7f2.1: %ValueType.Op.type.4c0699.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.0a1: = custom_witness (%ValueType.Op.4ec7f2.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.bf6: %SubobjectDestroy.type = facet_value %ValueType, (%custom_witness.0a1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.488: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.bf6) [concrete] // CHECK:STDOUT: %const.dd6: type = const_type %ValueType [concrete] // CHECK:STDOUT: %ptr.69c: type = ptr_type %const.dd6 [concrete] // CHECK:STDOUT: %ptr.233: type = ptr_type %ValueType [concrete] -// CHECK:STDOUT: %ValueType.Op.type: type = fn_type @ValueType.Op [concrete] -// CHECK:STDOUT: %ValueType.Op: %ValueType.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.202: = custom_witness (%ValueType.Op), @Copy [concrete] -// CHECK:STDOUT: %facet_value.978: %facet_type.f48 = facet_value %ValueType, (%custom_witness.226, %custom_witness.202) [concrete] +// CHECK:STDOUT: %ValueType.Op.type.4c0699.2: type = fn_type @ValueType.Op.2 [concrete] +// CHECK:STDOUT: %ValueType.Op.4ec7f2.2: %ValueType.Op.type.4c0699.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.202: = custom_witness (%ValueType.Op.4ec7f2.2), @Copy [concrete] +// CHECK:STDOUT: %facet_value.0a5: %facet_type.bd0 = facet_value %ValueType, (%custom_witness.0a1, %DestroyImpl.impl_witness.488, %custom_witness.202) [concrete] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %Iterate_where.type.87e: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.978> [concrete] -// CHECK:STDOUT: %pattern_type.ba8: type = pattern_type %Iterate_where.type.87e [concrete] -// CHECK:STDOUT: %R.patt: %pattern_type.ba8 = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R: %Iterate_where.type.87e = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %impl.elem0.4ce: %facet_type.bd0 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %Iterate_where.type.360: type = facet_type <@Iterate where %impl.elem0.4ce = %facet_value.0a5> [concrete] +// CHECK:STDOUT: %pattern_type.5d3: type = pattern_type %Iterate_where.type.360 [concrete] +// CHECK:STDOUT: %R.patt: %pattern_type.5d3 = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.360 = symbolic_binding R, 0 [symbolic] // CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] -// CHECK:STDOUT: %pattern_type.053: type = pattern_type %R.as_type [symbolic] -// CHECK:STDOUT: %r.param_patt.75e: %pattern_type.053 = value_param_pattern [symbolic] -// CHECK:STDOUT: %r.patt.82a: %pattern_type.053 = wrapper_binding_pattern r, %r.param_patt.75e [symbolic] +// CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %R.as_type [symbolic] +// CHECK:STDOUT: %r.param_patt.80f: %pattern_type.7ce = value_param_pattern [symbolic] +// CHECK:STDOUT: %r.patt.7ca: %pattern_type.7ce = wrapper_binding_pattern r, %r.param_patt.80f [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.c43 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.01e: = lookup_impl_witness %R, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.467: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.01e) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.b87: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.467) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.526: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.467) [symbolic] -// CHECK:STDOUT: %.c11: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.b87, %Iterate.facet.467 [symbolic] -// CHECK:STDOUT: %impl.elem2.978: %.c11 = impl_witness_access %Iterate.lookup_impl_witness.01e, element2 [symbolic] -// CHECK:STDOUT: %impl.elem1.d56: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.01e, element1 [symbolic] -// CHECK:STDOUT: %as_type.db9: type = facet_access_type %impl.elem1.d56 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.f0e: = specific_impl_function %impl.elem2.978, @Iterate.WithSelf.NewCursor(%Iterate.facet.467) [symbolic] -// CHECK:STDOUT: %.118: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.526, %Iterate.facet.467 [symbolic] -// CHECK:STDOUT: %impl.elem3.2b1: %.118 = impl_witness_access %Iterate.lookup_impl_witness.01e, element3 [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.8e6: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.978) [concrete] -// CHECK:STDOUT: %OptionalStorage.impl_witness.13c: = impl_witness imports.%OptionalStorage.impl_witness_table.460, @T.as_type.as.OptionalStorage.impl(%facet_value.978) [concrete] -// CHECK:STDOUT: %OptionalStorage.facet.0d1: %OptionalStorage.type = facet_value %ValueType, (%OptionalStorage.impl_witness.13c) [concrete] -// CHECK:STDOUT: %Optional.b4b: type = class_type @Optional, @Optional(%OptionalStorage.facet.0d1) [concrete] -// CHECK:STDOUT: %pattern_type.f6f: type = pattern_type %Optional.b4b [concrete] -// CHECK:STDOUT: %specific_impl_fn.3f1: = specific_impl_function %impl.elem3.2b1, @Iterate.WithSelf.Next(%Iterate.facet.467) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.1a1: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.0d1) [concrete] -// CHECK:STDOUT: %Optional.HasValue.766: %Optional.HasValue.type.1a1 = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.edf: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.0d1) [concrete] -// CHECK:STDOUT: %Optional.Get.047: %Optional.Get.type.edf = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.c1d: %Destroy.type = facet_value %ValueType, (%custom_witness.226) [concrete] -// CHECK:STDOUT: %MaybeUnformed.485: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.c1d) [concrete] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.62d: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.c11: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.62d) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.516: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.c11) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.7e2: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.c11) [symbolic] +// CHECK:STDOUT: %.8b7: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.516, %Iterate.facet.c11 [symbolic] +// CHECK:STDOUT: %impl.elem2.1dc: %.8b7 = impl_witness_access %Iterate.lookup_impl_witness.62d, element2 [symbolic] +// CHECK:STDOUT: %impl.elem1.5b8: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.62d, element1 [symbolic] +// CHECK:STDOUT: %as_type.283: type = facet_access_type %impl.elem1.5b8 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.d13: = specific_impl_function %impl.elem2.1dc, @Iterate.WithSelf.NewCursor(%Iterate.facet.c11) [symbolic] +// CHECK:STDOUT: %.d82: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.7e2, %Iterate.facet.c11 [symbolic] +// CHECK:STDOUT: %impl.elem3.902: %.d82 = impl_witness_access %Iterate.lookup_impl_witness.62d, element3 [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.70a: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.0a5) [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness.253: = impl_witness imports.%OptionalStorage.impl_witness_table.1c4, @T.as_type.as.OptionalStorage.impl(%facet_value.0a5) [concrete] +// CHECK:STDOUT: %OptionalStorage.facet.244: %OptionalStorage.type = facet_value %ValueType, (%OptionalStorage.impl_witness.253) [concrete] +// CHECK:STDOUT: %Optional.d4a: type = class_type @Optional, @Optional(%OptionalStorage.facet.244) [concrete] +// CHECK:STDOUT: %specific_impl_fn.4a7: = specific_impl_function %impl.elem3.902, @Iterate.WithSelf.Next(%Iterate.facet.c11) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.141: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.244) [concrete] +// CHECK:STDOUT: %Optional.HasValue.01b: %Optional.HasValue.type.141 = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.28b: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.244) [concrete] +// CHECK:STDOUT: %Optional.Get.90b: %Optional.Get.type.28b = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.facet.d1b: %Destroy.type = facet_value %ValueType, (%custom_witness.0a1, %DestroyImpl.impl_witness.488) [concrete] +// CHECK:STDOUT: %MaybeUnformed.ceb: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.d1b) [concrete] // CHECK:STDOUT: %.be1: type = maybe_unformed_type %ValueType [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.4bc: type = unbound_element_type %DefaultOptionalStorage.8e6, %MaybeUnformed.485 [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.97e: type = unbound_element_type %DefaultOptionalStorage.8e6, bool [concrete] -// CHECK:STDOUT: %struct_type.value.has_value.718: type = struct_type {.value: %MaybeUnformed.485, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn.98f: = specific_function %Optional.HasValue.766, @Optional.HasValue(%OptionalStorage.facet.0d1) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn.9f0: = specific_function %Optional.Get.047, @Optional.Get(%OptionalStorage.facet.0d1) [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.bc1: type = unbound_element_type %DefaultOptionalStorage.70a, %MaybeUnformed.ceb [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.8c7: type = unbound_element_type %DefaultOptionalStorage.70a, bool [concrete] +// CHECK:STDOUT: %struct_type.value.has_value.cec: type = struct_type {.value: %MaybeUnformed.ceb, .has_value: bool} [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.18d: = specific_function %Optional.HasValue.01b, @Optional.HasValue(%OptionalStorage.facet.244) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.f55: = specific_function %Optional.Get.90b, @Optional.Get(%OptionalStorage.facet.244) [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.type: type = fn_type @operator_PlusEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk: %operator_PlusEqual__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.ce5: type = pattern_type %.be1 [concrete] -// CHECK:STDOUT: %self.param_patt.36c: %pattern_type.ce5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.548: %pattern_type.ce5 = wrapper_binding_pattern self, %self.param_patt.36c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc31_37.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc31_37.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.96c: type = pattern_type %MaybeUnformed.485 [concrete] -// CHECK:STDOUT: %self.param_patt.aad: %pattern_type.96c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.180: %pattern_type.96c = wrapper_binding_pattern self, %self.param_patt.aad [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc31_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc31_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc31_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc31_37.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc31_37.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc31_37.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.0f6: type = pattern_type %struct_type.value.has_value.718 [concrete] -// CHECK:STDOUT: %self.param_patt.244: %pattern_type.0f6 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.781: %pattern_type.0f6 = wrapper_binding_pattern self, %self.param_patt.244 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc31_37.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc31_37.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.cd3: type = pattern_type %DefaultOptionalStorage.8e6 [concrete] -// CHECK:STDOUT: %self.param_patt.c9e: %pattern_type.cd3 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.369: %pattern_type.cd3 = wrapper_binding_pattern self, %self.param_patt.c9e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc31_37.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc31_37.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.53e: %pattern_type.f6f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.78b: %pattern_type.f6f = wrapper_binding_pattern self, %self.param_patt.53e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc31_37.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc31_37.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8: type = fn_type @Destroy.WithSelf.SelfDestruct.loc31_37.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.8: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.d0e: = lookup_impl_witness %impl.elem1.d56, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.726: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1.d56) [symbolic] -// CHECK:STDOUT: %.a54: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.726, %impl.elem1.d56 [symbolic] -// CHECK:STDOUT: %impl.elem2.9bf: %.a54 = impl_witness_access %Destroy.lookup_impl_witness.d0e, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2dd: = specific_impl_function %impl.elem2.9bf, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1.d56) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc31_37.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc31_37.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.80c: %Destroy.type = facet_value bool, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.778) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.84c: %SubobjectDestroy.type = facet_value %MaybeUnformed.ceb, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.3b3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.84c) [concrete] +// CHECK:STDOUT: %Destroy.facet.f67: %Destroy.type = facet_value %MaybeUnformed.ceb, (%custom_witness.b80ef6.3, %DestroyImpl.impl_witness.3b3) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc31_37.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.7cd: %SubobjectDestroy.type = facet_value %Optional.d4a, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ce9: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.7cd) [concrete] +// CHECK:STDOUT: %Destroy.facet.7d9: %Destroy.type = facet_value %Optional.d4a, (%custom_witness.b80ef6.7, %DestroyImpl.impl_witness.ce9) [concrete] // CHECK:STDOUT: %ConstRange: type = class_type @ConstRange [concrete] // CHECK:STDOUT: %pattern_type.c1d: type = pattern_type %ConstRange [concrete] // CHECK:STDOUT: %Iterator: type = class_type @Iterator.1 [concrete] @@ -4437,59 +3696,52 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %End.type: type = fn_type @End [concrete] // CHECK:STDOUT: %End: %End.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.116: = custom_witness (%Iterator, %Sentinel, %Begin, %End), @CppRangeForIterate [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.9: type = fn_type @Destroy.WithSelf.Op.loc38_16.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.9: %Destroy.WithSelf.Op.type.ef016f.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9: type = fn_type @Destroy.WithSelf.SelfDestruct.loc38_16.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.9: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9 = struct_value () [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.type: type = fn_type @Iterator.SubobjectDestroy [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy: %Iterator.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.429ac1.1: = custom_witness (%Destroy.WithSelf.Op.403171.9, %Iterator.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.9), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.3f6dc2.1: type = fn_type @Iterator.Op.1 [concrete] // CHECK:STDOUT: %Iterator.Op.240e50.1: %Iterator.Op.type.3f6dc2.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.5be: = custom_witness (%ValueType, %Iterator.Op.240e50.1), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %custom_witness.612b50.1: = custom_witness (%Iterator.Op.240e50.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.403: %SubobjectDestroy.type = facet_value %Iterator, (%custom_witness.612b50.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.587: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.403) [concrete] // CHECK:STDOUT: %Iterator.Op.type.3f6dc2.2: type = fn_type @Iterator.Op.2 [concrete] // CHECK:STDOUT: %Iterator.Op.240e50.2: %Iterator.Op.type.3f6dc2.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.c31: = custom_witness (%Iterator.Op.240e50.2), @Inc [concrete] +// CHECK:STDOUT: %custom_witness.5be: = custom_witness (%ValueType, %Iterator.Op.240e50.2), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %Iterator.Op.type.3f6dc2.3: type = fn_type @Iterator.Op.3 [concrete] +// CHECK:STDOUT: %Iterator.Op.240e50.3: %Iterator.Op.type.3f6dc2.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.c31: = custom_witness (%Iterator.Op.240e50.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [concrete] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [concrete] // CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.bf4: = custom_witness (%Equal, %NotEqual), @EqWith, @EqWith(%Sentinel) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.10: type = fn_type @Destroy.WithSelf.Op.loc38_16.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.10: %Destroy.WithSelf.Op.type.ef016f.10 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10: type = fn_type @Destroy.WithSelf.SelfDestruct.loc38_16.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.10: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10 = struct_value () [concrete] -// CHECK:STDOUT: %Sentinel.SubobjectDestroy.type: type = fn_type @Sentinel.SubobjectDestroy [concrete] -// CHECK:STDOUT: %Sentinel.SubobjectDestroy: %Sentinel.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.429ac1.2: = custom_witness (%Destroy.WithSelf.Op.403171.10, %Sentinel.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.10), @Destroy [concrete] -// CHECK:STDOUT: %facet_value.d15: %CppRange_where.type.d682d6.1 = facet_value %ConstRange, (%custom_witness.116, %custom_witness.429ac1.1, %custom_witness.5be, %custom_witness.c31, %custom_witness.bf4, %custom_witness.226, %custom_witness.202, %custom_witness.429ac1.2) [concrete] +// CHECK:STDOUT: %Sentinel.Op.type: type = fn_type @Sentinel.Op [concrete] +// CHECK:STDOUT: %Sentinel.Op: %Sentinel.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.612b50.2: = custom_witness (%Sentinel.Op), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.96b: %SubobjectDestroy.type = facet_value %Sentinel, (%custom_witness.612b50.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.fa7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.96b) [concrete] +// CHECK:STDOUT: %facet_value.d86: %CppRange_where.type.d682d6.1 = facet_value %ConstRange, (%custom_witness.116, %custom_witness.612b50.1, %DestroyImpl.impl_witness.587, %custom_witness.5be, %custom_witness.c31, %custom_witness.bf4, %custom_witness.0a1, %DestroyImpl.impl_witness.488, %custom_witness.202, %custom_witness.612b50.2, %DestroyImpl.impl_witness.fa7) [concrete] // CHECK:STDOUT: %tuple.type.7a6: type = tuple_type (%Iterator, %Sentinel) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8: type = fn_type @Destroy.WithSelf.SubobjectDestroy.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.11: type = fn_type @Destroy.WithSelf.Op.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.11: %Destroy.WithSelf.Op.type.ef016f.11 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.11: type = fn_type @Destroy.WithSelf.SelfDestruct.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.11: %Destroy.WithSelf.SelfDestruct.type.fbceb5.11 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.8: = custom_witness (%Destroy.WithSelf.Op.403171.11, %Destroy.WithSelf.SubobjectDestroy.d01daf.8, %Destroy.WithSelf.SelfDestruct.db3fdb.11), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.d83: %Destroy.type = facet_value %tuple.type.7a6, (%custom_witness.f8f19d.8) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.d1d: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.d15) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.755: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.d15) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.437: %T.as_type.as.Iterate.impl.NewCursor.type.755 = struct_value () [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.b75: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.d15) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.82c: %T.as_type.as.Iterate.impl.Next.type.b75 = struct_value () [concrete] -// CHECK:STDOUT: %facet_value.1d8: %Iterate_where.type.87e = facet_value %ConstRange, (%Iterate.impl_witness.d1d) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.8: type = fn_type @SubobjectDestroy.WithSelf.Op.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.8: %SubobjectDestroy.WithSelf.Op.type.6870fd.8 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.8: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.8), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b14: %SubobjectDestroy.type = facet_value %tuple.type.7a6, (%custom_witness.b80ef6.8) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b22: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b14) [concrete] +// CHECK:STDOUT: %complete_type.cf0: = complete_type_witness %tuple.type.7a6 [concrete] +// CHECK:STDOUT: %Destroy.facet.959: %Destroy.type = facet_value %tuple.type.7a6, (%custom_witness.b80ef6.8, %DestroyImpl.impl_witness.b22) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.939: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.d86) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8ad: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.d86) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.d53: %T.as_type.as.Iterate.impl.NewCursor.type.8ad = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.f47: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.d86) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.2f5: %T.as_type.as.Iterate.impl.Next.type.f47 = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.8da: %Iterate_where.type.360 = facet_value %ConstRange, (%Iterate.impl_witness.939) [concrete] // CHECK:STDOUT: %r.param_patt.ac5: %pattern_type.c1d = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.97f: %pattern_type.c1d = wrapper_binding_pattern r, %r.param_patt.ac5 [concrete] -// CHECK:STDOUT: %Iterate.facet.8d3: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.d1d) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.7f7: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.8d3) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.035: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.8d3) [concrete] -// CHECK:STDOUT: %.8c0: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.7f7, %Iterate.facet.8d3 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.437, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.d15) [concrete] -// CHECK:STDOUT: %.b64: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.035, %Iterate.facet.8d3 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.82c, @T.as_type.as.Iterate.impl.Next(%facet_value.d15) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.000: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.d83) [concrete] -// CHECK:STDOUT: %.dc3: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.000, %Destroy.facet.d83 [concrete] -// CHECK:STDOUT: %complete_type.cf0: = complete_type_witness %tuple.type.7a6 [concrete] +// CHECK:STDOUT: %Iterate.facet.ce6: %Iterate.type = facet_value %ConstRange, (%Iterate.impl_witness.939) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.df3: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.ce6) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.869: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.ce6) [concrete] +// CHECK:STDOUT: %.472: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.df3, %Iterate.facet.ce6 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.d53, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.d86) [concrete] +// CHECK:STDOUT: %.135: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.869, %Iterate.facet.ce6 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.2f5, @T.as_type.as.Iterate.impl.Next(%facet_value.d86) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.6b7: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.959) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -4497,22 +3749,24 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: .DiffADL = %DiffADL // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.02f: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.ade)] -// CHECK:STDOUT: %Core.import_ref.406: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.925) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.f42)] -// CHECK:STDOUT: %Core.import_ref.d4a: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.760) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.268)] -// CHECK:STDOUT: %Core.import_ref.9a4: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.d28) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.f29)] -// CHECK:STDOUT: %Core.import_ref.6e3: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.2f2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.884)] -// CHECK:STDOUT: %Core.import_ref.af7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.460 = impl_witness_table (%Core.import_ref.02f, %Core.import_ref.406, %Core.import_ref.d4a, %Core.import_ref.9a4, %Core.import_ref.6e3, %Core.import_ref.af7), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.51c9: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.498] -// CHECK:STDOUT: %Core.import_ref.b03: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.390] +// CHECK:STDOUT: %Core.import_ref.481: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.476)] +// CHECK:STDOUT: %Core.import_ref.66d: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.b57) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.791)] +// CHECK:STDOUT: %Core.import_ref.32c: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.292) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.ae9)] +// CHECK:STDOUT: %Core.import_ref.801: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.18e) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.463)] +// CHECK:STDOUT: %Core.import_ref.eec: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.f27) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.e40)] +// CHECK:STDOUT: %Core.import_ref.a6a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.1c4 = impl_witness_table (%Core.import_ref.481, %Core.import_ref.66d, %Core.import_ref.32c, %Core.import_ref.801, %Core.import_ref.eec, %Core.import_ref.a6a), @T.as_type.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.e86: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.bce] +// CHECK:STDOUT: %Core.import_ref.9ce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.dbe] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.c82: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.3ea) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.f2f)] // CHECK:STDOUT: %Core.import_ref.29e: @Optional.%Optional.Get.type (%Optional.Get.type.786) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.2d0)] -// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] -// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.724: %facet_type.bd0 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.189)] +// CHECK:STDOUT: %Core.import_ref.dd9: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9b6)] // CHECK:STDOUT: %Core.import_ref.946: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.8fb) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.8a1)] // CHECK:STDOUT: %Core.import_ref.cfb: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.d4a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.5a8)] -// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.724, %Core.import_ref.dd9, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %DiffADL: = namespace [concrete] { // CHECK:STDOUT: .ValueType = %ValueType.decl // CHECK:STDOUT: .ConstRange = %ConstRange.decl @@ -4524,121 +3778,30 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.b0d0 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.390: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = field_decl has_value, element1, %Core.import_ref.b0d0 in [concrete] {} -// CHECK:STDOUT: %Core.import_ref.ab7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.498: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = field_decl value, element0, %Core.import_ref.ab7 in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.dbe: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = field_decl has_value, element1, %Core.import_ref.b0d in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.45d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.bce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = field_decl value, element0, %Core.import_ref.45d in [concrete] {} // CHECK:STDOUT: %ConstRange.decl: type = class_decl @ConstRange [concrete = constants.%ConstRange] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc31_37.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ce5 = ref_param_pattern [concrete = constants.%self.param_patt.36c] -// CHECK:STDOUT: %self.patt: %pattern_type.ce5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.548] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.be1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.be1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc31_37.1 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ce5 = ref_param_pattern [concrete = constants.%self.param_patt.36c] -// CHECK:STDOUT: %self.patt: %pattern_type.ce5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.548] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.be1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.be1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc31_37.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.96c = ref_param_pattern [concrete = constants.%self.param_patt.aad] -// CHECK:STDOUT: %self.patt: %pattern_type.96c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.180] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.485 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.485 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc31_37.2 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.96c = ref_param_pattern [concrete = constants.%self.param_patt.aad] -// CHECK:STDOUT: %self.patt: %pattern_type.96c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.180] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.485 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.485 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc31_37.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc31_37.3 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc31_37.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0f6 = ref_param_pattern [concrete = constants.%self.param_patt.244] -// CHECK:STDOUT: %self.patt: %pattern_type.0f6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.781] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.718 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.718 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc31_37.4 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0f6 = ref_param_pattern [concrete = constants.%self.param_patt.244] -// CHECK:STDOUT: %self.patt: %pattern_type.0f6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.781] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.718 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.718 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc31_37.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cd3 = ref_param_pattern [concrete = constants.%self.param_patt.c9e] -// CHECK:STDOUT: %self.patt: %pattern_type.cd3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.369] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.8e6 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.8e6 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc31_37.5 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cd3 = ref_param_pattern [concrete = constants.%self.param_patt.c9e] -// CHECK:STDOUT: %self.patt: %pattern_type.cd3 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.369] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.8e6 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.8e6 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc31_37.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f6f = ref_param_pattern [concrete = constants.%self.param_patt.53e] -// CHECK:STDOUT: %self.patt: %pattern_type.f6f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.78b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.b4b = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.b4b = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.8 = fn_decl @Destroy.WithSelf.Op.loc31_37.6 [concrete = constants.%Destroy.WithSelf.Op.403171.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.f6f = ref_param_pattern [concrete = constants.%self.param_patt.53e] -// CHECK:STDOUT: %self.patt: %pattern_type.f6f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.78b] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.b4b = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.b4b = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TestIterate(%R.loc27_17.2: %Iterate_where.type.87e) { +// CHECK:STDOUT: generic fn @TestIterate(%R.loc27_17.2: %Iterate_where.type.360) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc27_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.01e)] -// CHECK:STDOUT: %Iterate.facet.loc31_37.5: %Iterate.type = facet_value %R.as_type.loc27_79.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.467)] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc31_37.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.b87)] -// CHECK:STDOUT: %.loc31_37.20: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc31_37.5 [symbolic = %.loc31_37.20 (constants.%.c11)] -// CHECK:STDOUT: %impl.elem2.loc31_37.3: @TestIterate.%.loc31_37.20 (%.c11) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc31_37.3 (constants.%impl.elem2.978)] -// CHECK:STDOUT: %specific_impl_fn.loc31_37.4: = specific_impl_function %impl.elem2.loc31_37.3, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc31_37.5) [symbolic = %specific_impl_fn.loc31_37.4 (constants.%specific_impl_fn.f0e)] +// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc27_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.62d)] +// CHECK:STDOUT: %Iterate.facet.loc31_37.5: %Iterate.type = facet_value %R.as_type.loc27_79.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.c11)] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc31_37.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.516)] +// CHECK:STDOUT: %.loc31_37.26: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc31_37.5 [symbolic = %.loc31_37.26 (constants.%.8b7)] +// CHECK:STDOUT: %impl.elem2.loc31_37.2: @TestIterate.%.loc31_37.26 (%.8b7) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc31_37.2 (constants.%impl.elem2.1dc)] +// CHECK:STDOUT: %specific_impl_fn.loc31_37.3: = specific_impl_function %impl.elem2.loc31_37.2, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc31_37.5) [symbolic = %specific_impl_fn.loc31_37.3 (constants.%specific_impl_fn.d13)] +// CHECK:STDOUT: +// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc31_37.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.7e2)] +// CHECK:STDOUT: %.loc31_37.27: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc31_37.5 [symbolic = %.loc31_37.27 (constants.%.d82)] +// CHECK:STDOUT: %impl.elem3.loc31_37.2: @TestIterate.%.loc31_37.27 (%.d82) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc31_37.2 (constants.%impl.elem3.902)] +// CHECK:STDOUT: %specific_impl_fn.loc31_37.4: = specific_impl_function %impl.elem3.loc31_37.2, @Iterate.WithSelf.Next(%Iterate.facet.loc31_37.5) [symbolic = %specific_impl_fn.loc31_37.4 (constants.%specific_impl_fn.4a7)] // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc31_37.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.526)] -// CHECK:STDOUT: %.loc31_37.21: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc31_37.5 [symbolic = %.loc31_37.21 (constants.%.118)] -// CHECK:STDOUT: %impl.elem3.loc31_37.2: @TestIterate.%.loc31_37.21 (%.118) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc31_37.2 (constants.%impl.elem3.2b1)] -// CHECK:STDOUT: %specific_impl_fn.loc31_37.5: = specific_impl_function %impl.elem3.loc31_37.2, @Iterate.WithSelf.Next(%Iterate.facet.loc31_37.5) [symbolic = %specific_impl_fn.loc31_37.5 (constants.%specific_impl_fn.3f1)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.726)] -// CHECK:STDOUT: %.loc31_37.22: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %impl.elem1 [symbolic = %.loc31_37.22 (constants.%.a54)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.d0e)] -// CHECK:STDOUT: %impl.elem2.loc31_37.4: @TestIterate.%.loc31_37.22 (%.a54) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc31_37.4 (constants.%impl.elem2.9bf)] -// CHECK:STDOUT: %specific_impl_fn.loc31_37.6: = specific_impl_function %impl.elem2.loc31_37.4, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1) [symbolic = %specific_impl_fn.loc31_37.6 (constants.%specific_impl_fn.2dd)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc27_79.1 (%R.as_type)) { // CHECK:STDOUT: !entry: @@ -4647,52 +3810,52 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.c43 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc27_79.1 (%R.as_type) = name_ref r, %r -// CHECK:STDOUT: %impl.elem2.loc31_37.1: @TestIterate.%.loc31_37.20 (%.c11) = impl_witness_access constants.%Iterate.lookup_impl_witness.01e, element2 [symbolic = %impl.elem2.loc31_37.3 (constants.%impl.elem2.978)] +// CHECK:STDOUT: %impl.elem2.loc31_37.1: @TestIterate.%.loc31_37.26 (%.8b7) = impl_witness_access constants.%Iterate.lookup_impl_witness.62d, element2 [symbolic = %impl.elem2.loc31_37.2 (constants.%impl.elem2.1dc)] // CHECK:STDOUT: %bound_method.loc31_37.1: = bound_method %r.ref, %impl.elem2.loc31_37.1 -// CHECK:STDOUT: %Iterate.facet.loc31_37.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.01e) [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.467)] -// CHECK:STDOUT: %.loc31_37.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_37.1 [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.467)] -// CHECK:STDOUT: %Iterate.facet.loc31_37.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.01e) [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.467)] -// CHECK:STDOUT: %.loc31_37.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_37.2 [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.467)] -// CHECK:STDOUT: %specific_impl_fn.loc31_37.1: = specific_impl_function %impl.elem2.loc31_37.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.467) [symbolic = %specific_impl_fn.loc31_37.4 (constants.%specific_impl_fn.f0e)] +// CHECK:STDOUT: %Iterate.facet.loc31_37.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.62d) [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.c11)] +// CHECK:STDOUT: %.loc31_37.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_37.1 [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.c11)] +// CHECK:STDOUT: %Iterate.facet.loc31_37.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.62d) [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.c11)] +// CHECK:STDOUT: %.loc31_37.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_37.2 [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.c11)] +// CHECK:STDOUT: %specific_impl_fn.loc31_37.1: = specific_impl_function %impl.elem2.loc31_37.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.c11) [symbolic = %specific_impl_fn.loc31_37.3 (constants.%specific_impl_fn.d13)] // CHECK:STDOUT: %bound_method.loc31_37.2: = bound_method %r.ref, %specific_impl_fn.loc31_37.1 -// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.db9) = var_storage invalid -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.db9) to %var = call %bound_method.loc31_37.2(%r.ref) +// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.283) = var_storage invalid +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.283) to %var = call %bound_method.loc31_37.2(%r.ref) // CHECK:STDOUT: assign %var, %Iterate.WithSelf.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3.loc31_37.1: @TestIterate.%.loc31_37.21 (%.118) = impl_witness_access constants.%Iterate.lookup_impl_witness.01e, element3 [symbolic = %impl.elem3.loc31_37.2 (constants.%impl.elem3.2b1)] +// CHECK:STDOUT: %impl.elem3.loc31_37.1: @TestIterate.%.loc31_37.27 (%.d82) = impl_witness_access constants.%Iterate.lookup_impl_witness.62d, element3 [symbolic = %impl.elem3.loc31_37.2 (constants.%impl.elem3.902)] // CHECK:STDOUT: %bound_method.loc31_37.3: = bound_method %r.ref, %impl.elem3.loc31_37.1 -// CHECK:STDOUT: %Iterate.facet.loc31_37.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.01e) [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.467)] -// CHECK:STDOUT: %.loc31_37.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_37.3 [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.467)] -// CHECK:STDOUT: %Iterate.facet.loc31_37.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.01e) [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.467)] -// CHECK:STDOUT: %.loc31_37.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_37.4 [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.467)] -// CHECK:STDOUT: %.loc31_37.5: %Destroy.type = converted constants.%as_type.db9, constants.%impl.elem1.d56 [symbolic = %impl.elem1 (constants.%impl.elem1.d56)] -// CHECK:STDOUT: %.loc31_37.6: %Destroy.type = converted constants.%as_type.db9, constants.%impl.elem1.d56 [symbolic = %impl.elem1 (constants.%impl.elem1.d56)] -// CHECK:STDOUT: %specific_impl_fn.loc31_37.2: = specific_impl_function %impl.elem3.loc31_37.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.467) [symbolic = %specific_impl_fn.loc31_37.5 (constants.%specific_impl_fn.3f1)] +// CHECK:STDOUT: %Iterate.facet.loc31_37.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.62d) [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.c11)] +// CHECK:STDOUT: %.loc31_37.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_37.3 [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.c11)] +// CHECK:STDOUT: %Iterate.facet.loc31_37.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.62d) [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.c11)] +// CHECK:STDOUT: %.loc31_37.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc31_37.4 [symbolic = %Iterate.facet.loc31_37.5 (constants.%Iterate.facet.c11)] +// CHECK:STDOUT: %.loc31_37.5: %Destroy.type = converted constants.%as_type.283, constants.%impl.elem1.5b8 [symbolic = %impl.elem1 (constants.%impl.elem1.5b8)] +// CHECK:STDOUT: %.loc31_37.6: %Destroy.type = converted constants.%as_type.283, constants.%impl.elem1.5b8 [symbolic = %impl.elem1 (constants.%impl.elem1.5b8)] +// CHECK:STDOUT: %specific_impl_fn.loc31_37.2: = specific_impl_function %impl.elem3.loc31_37.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.c11) [symbolic = %specific_impl_fn.loc31_37.4 (constants.%specific_impl_fn.4a7)] // CHECK:STDOUT: %bound_method.loc31_37.4: = bound_method %r.ref, %specific_impl_fn.loc31_37.2 -// CHECK:STDOUT: %.loc31_37.7: ref %Optional.b4b = temporary_storage -// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.b4b to %.loc31_37.7 = call %bound_method.loc31_37.4(%r.ref, %var) -// CHECK:STDOUT: %.loc31_37.8: ref %Optional.b4b = temporary %.loc31_37.7, %Iterate.WithSelf.Next.call -// CHECK:STDOUT: %.loc31_37.9: %Optional.HasValue.type.1a1 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.0d1) [concrete = constants.%Optional.HasValue.766] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.1a1 = name_ref HasValue, %.loc31_37.9 [concrete = constants.%Optional.HasValue.766] +// CHECK:STDOUT: %.loc31_37.7: ref %Optional.d4a = temporary_storage +// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.d4a to %.loc31_37.7 = call %bound_method.loc31_37.4(%r.ref, %var) +// CHECK:STDOUT: %.loc31_37.8: ref %Optional.d4a = temporary %.loc31_37.7, %Iterate.WithSelf.Next.call +// CHECK:STDOUT: %.loc31_37.9: %Optional.HasValue.type.141 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.244) [concrete = constants.%Optional.HasValue.01b] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.141 = name_ref HasValue, %.loc31_37.9 [concrete = constants.%Optional.HasValue.01b] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc31_37.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.0d1) [concrete = constants.%Optional.HasValue.specific_fn.98f] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.244) [concrete = constants.%Optional.HasValue.specific_fn.18d] // CHECK:STDOUT: %bound_method.loc31_37.5: = bound_method %.loc31_37.8, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc31_37.10: %Optional.b4b = acquire_value %.loc31_37.8 +// CHECK:STDOUT: %.loc31_37.10: %Optional.d4a = acquire_value %.loc31_37.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc31_37.5(%.loc31_37.10) // CHECK:STDOUT: %.loc31_37.11: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc31_37.12: bool = converted %Optional.HasValue.call, %.loc31_37.11 // CHECK:STDOUT: if %.loc31_37.12 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc31_37.13: %Optional.Get.type.edf = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.0d1) [concrete = constants.%Optional.Get.047] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.edf = name_ref Get, %.loc31_37.13 [concrete = constants.%Optional.Get.047] +// CHECK:STDOUT: %.loc31_37.13: %Optional.Get.type.28b = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.244) [concrete = constants.%Optional.Get.90b] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.28b = name_ref Get, %.loc31_37.13 [concrete = constants.%Optional.Get.90b] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc31_37.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.0d1) [concrete = constants.%Optional.Get.specific_fn.9f0] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.244) [concrete = constants.%Optional.Get.specific_fn.f55] // CHECK:STDOUT: %bound_method.loc31_37.6: = bound_method %.loc31_37.8, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc31_37.14: ref %ValueType = temporary_storage -// CHECK:STDOUT: %.loc31_37.15: %Optional.b4b = acquire_value %.loc31_37.8 +// CHECK:STDOUT: %.loc31_37.15: %Optional.d4a = acquire_value %.loc31_37.8 // CHECK:STDOUT: %Optional.Get.call: init %ValueType to %.loc31_37.14 = call %bound_method.loc31_37.6(%.loc31_37.15) // CHECK:STDOUT: %.loc31_37.16: ref %ValueType = temporary %.loc31_37.14, %Optional.Get.call // CHECK:STDOUT: %.loc31_37.17: %ValueType = acquire_value %.loc31_37.16 @@ -4709,114 +3872,85 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc32_9.1: %ptr.69c = as_compatible %addr.loc32 // CHECK:STDOUT: %.loc32_9.2: %ptr.69c = converted %addr.loc32, %.loc32_9.1 // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.call: ref %ValueType = call imports.%operator_PlusEqual__carbon_thunk.decl(%sum.ref, %.loc32_9.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc31_37.1: = bound_method %.loc31_37.16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc31_37.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc31_37.1(%.loc31_37.16) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc31_37.2: = bound_method %.loc31_37.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc31_37.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc31_37.2(%.loc31_37.8) +// CHECK:STDOUT: %Destroy.facet.loc31_37.1: %Destroy.type = facet_value constants.%ValueType, (constants.%custom_witness.0a1, constants.%DestroyImpl.impl_witness.488) [concrete = constants.%Destroy.facet.d1b] +// CHECK:STDOUT: %.loc31_37.18: %Destroy.type = converted constants.%ValueType, %Destroy.facet.loc31_37.1 [concrete = constants.%Destroy.facet.d1b] +// CHECK:STDOUT: %Destroy.facet.loc31_37.2: %Destroy.type = facet_value constants.%ValueType, (constants.%custom_witness.0a1, constants.%DestroyImpl.impl_witness.488) [concrete = constants.%Destroy.facet.d1b] +// CHECK:STDOUT: %.loc31_37.19: %Destroy.type = converted constants.%ValueType, %Destroy.facet.loc31_37.2 [concrete = constants.%Destroy.facet.d1b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc31_37.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc31_37.16) +// CHECK:STDOUT: %Destroy.facet.loc31_37.3: %Destroy.type = facet_value constants.%Optional.d4a, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ce9) [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %.loc31_37.20: %Destroy.type = converted constants.%Optional.d4a, %Destroy.facet.loc31_37.3 [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %Destroy.facet.loc31_37.4: %Destroy.type = facet_value constants.%Optional.d4a, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ce9) [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %.loc31_37.21: %Destroy.type = converted constants.%Optional.d4a, %Destroy.facet.loc31_37.4 [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc31_37.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc31_37.8) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc31_37.3: = bound_method %.loc31_37.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc31_37.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc31_37.3(%.loc31_37.8) -// CHECK:STDOUT: %impl.elem2.loc31_37.2: @TestIterate.%.loc31_37.22 (%.a54) = impl_witness_access constants.%Destroy.lookup_impl_witness.d0e, element2 [symbolic = %impl.elem2.loc31_37.4 (constants.%impl.elem2.9bf)] -// CHECK:STDOUT: %bound_method.loc31_37.7: = bound_method %var, %impl.elem2.loc31_37.2 -// CHECK:STDOUT: %.loc31_37.18: %Destroy.type = converted constants.%as_type.db9, constants.%impl.elem1.d56 [symbolic = %impl.elem1 (constants.%impl.elem1.d56)] -// CHECK:STDOUT: %.loc31_37.19: %Destroy.type = converted constants.%as_type.db9, constants.%impl.elem1.d56 [symbolic = %impl.elem1 (constants.%impl.elem1.d56)] -// CHECK:STDOUT: %specific_impl_fn.loc31_37.3: = specific_impl_function %impl.elem2.loc31_37.2, @Destroy.WithSelf.SelfDestruct.1(constants.%impl.elem1.d56) [symbolic = %specific_impl_fn.loc31_37.6 (constants.%specific_impl_fn.2dd)] -// CHECK:STDOUT: %bound_method.loc31_37.8: = bound_method %var, %specific_impl_fn.loc31_37.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc31_37.4: init %empty_tuple.type = call %bound_method.loc31_37.8(%var) +// CHECK:STDOUT: %Destroy.facet.loc31_37.5: %Destroy.type = facet_value constants.%Optional.d4a, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ce9) [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %.loc31_37.22: %Destroy.type = converted constants.%Optional.d4a, %Destroy.facet.loc31_37.5 [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %Destroy.facet.loc31_37.6: %Destroy.type = facet_value constants.%Optional.d4a, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ce9) [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %.loc31_37.23: %Destroy.type = converted constants.%Optional.d4a, %Destroy.facet.loc31_37.6 [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc31_37.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc31_37.8) +// CHECK:STDOUT: %.loc31_37.24: %Destroy.type = converted constants.%as_type.283, constants.%impl.elem1.5b8 [symbolic = %impl.elem1 (constants.%impl.elem1.5b8)] +// CHECK:STDOUT: %.loc31_37.25: %Destroy.type = converted constants.%as_type.283, constants.%impl.elem1.5b8 [symbolic = %impl.elem1 (constants.%impl.elem1.5b8)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc31_37.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_37.1(%self.param: ref %.be1) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc31_37.1(%self.param: ref %.be1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_37.1(%self.param: ref %.be1) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc31_37.2(%self.param: ref %MaybeUnformed.ceb) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc31_37.1(%self.param: ref %.be1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc31_37.3(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_37.2(%self.param: ref %MaybeUnformed.485) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_37.2(%self.param: ref %MaybeUnformed.485) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc31_37.2(%self.param: ref %MaybeUnformed.485) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_37.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_37.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc31_37.3(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_37.4(%self.param: ref %struct_type.value.has_value.718) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc31_37.4(%self.param: ref %struct_type.value.has_value.cec) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc31_37.1: ref bool = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc31_37.1: = bound_method %.loc31_37.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc31_37.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc31_37.1(%.loc31_37.1) -// CHECK:STDOUT: %.loc31_37.2: ref %MaybeUnformed.485 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc31_37.2: = bound_method %.loc31_37.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc31_37.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc31_37.2(%.loc31_37.2) +// CHECK:STDOUT: %Destroy.facet.loc31_37.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc31_37.2: %Destroy.type = converted bool, %Destroy.facet.loc31_37.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc31_37.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc31_37.3: %Destroy.type = converted bool, %Destroy.facet.loc31_37.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc31_37.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc31_37.1) +// CHECK:STDOUT: %.loc31_37.4: ref %MaybeUnformed.ceb = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc31_37.3: %Destroy.type = facet_value constants.%MaybeUnformed.ceb, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.3b3) [concrete = constants.%Destroy.facet.f67] +// CHECK:STDOUT: %.loc31_37.5: %Destroy.type = converted constants.%MaybeUnformed.ceb, %Destroy.facet.loc31_37.3 [concrete = constants.%Destroy.facet.f67] +// CHECK:STDOUT: %Destroy.facet.loc31_37.4: %Destroy.type = facet_value constants.%MaybeUnformed.ceb, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.3b3) [concrete = constants.%Destroy.facet.f67] +// CHECK:STDOUT: %.loc31_37.6: %Destroy.type = converted constants.%MaybeUnformed.ceb, %Destroy.facet.loc31_37.4 [concrete = constants.%Destroy.facet.f67] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc31_37.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc31_37.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_37.4(%self.param: ref %struct_type.value.has_value.718) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc31_37.4(%self.param: ref %struct_type.value.has_value.718) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc31_37.5(%self.param: ref %DefaultOptionalStorage.70a) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_37.5(%self.param: ref %DefaultOptionalStorage.8e6) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.97e = name_ref has_value, imports.%Core.import_ref.b03 [concrete = imports.%field_decl.390] +// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.8c7 = name_ref has_value, imports.%Core.import_ref.9ce [concrete = imports.%field_decl.dbe] // CHECK:STDOUT: %.loc31_37.1: ref bool = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc31_37.1: = bound_method %.loc31_37.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc31_37.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc31_37.1(%.loc31_37.1) -// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.4bc = name_ref value, imports.%Core.import_ref.51c9 [concrete = imports.%field_decl.498] -// CHECK:STDOUT: %.loc31_37.2: ref %MaybeUnformed.485 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc31_37.2: = bound_method %.loc31_37.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc31_37.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc31_37.2(%.loc31_37.2) +// CHECK:STDOUT: %Destroy.facet.loc31_37.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc31_37.2: %Destroy.type = converted bool, %Destroy.facet.loc31_37.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc31_37.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc31_37.3: %Destroy.type = converted bool, %Destroy.facet.loc31_37.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc31_37.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc31_37.1) +// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.bc1 = name_ref value, imports.%Core.import_ref.e86 [concrete = imports.%field_decl.bce] +// CHECK:STDOUT: %.loc31_37.4: ref %MaybeUnformed.ceb = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc31_37.3: %Destroy.type = facet_value constants.%MaybeUnformed.ceb, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.3b3) [concrete = constants.%Destroy.facet.f67] +// CHECK:STDOUT: %.loc31_37.5: %Destroy.type = converted constants.%MaybeUnformed.ceb, %Destroy.facet.loc31_37.3 [concrete = constants.%Destroy.facet.f67] +// CHECK:STDOUT: %Destroy.facet.loc31_37.4: %Destroy.type = facet_value constants.%MaybeUnformed.ceb, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.3b3) [concrete = constants.%Destroy.facet.f67] +// CHECK:STDOUT: %.loc31_37.6: %Destroy.type = converted constants.%MaybeUnformed.ceb, %Destroy.facet.loc31_37.4 [concrete = constants.%Destroy.facet.f67] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc31_37.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc31_37.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_37.5(%self.param: ref %DefaultOptionalStorage.8e6) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc31_37.5(%self.param: ref %DefaultOptionalStorage.8e6) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc31_37.6(%self.param: ref %Optional.b4b) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc31_37.6(%self.param: ref %Optional.b4b) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc31_37.6(%self.param: ref %Optional.b4b) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc31_37.6(%self.param: ref %Optional.d4a) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TestRangeFor(%c.param: %ConstRange) { // CHECK:STDOUT: !entry: @@ -4825,13 +3959,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.c43 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %c.ref: %ConstRange = name_ref c, %c -// CHECK:STDOUT: %impl.elem2: %.8c0 = impl_witness_access constants.%Iterate.impl_witness.d1d, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.437] +// CHECK:STDOUT: %impl.elem2: %.472 = impl_witness_access constants.%Iterate.impl_witness.939, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.d53] // CHECK:STDOUT: %bound_method.loc45_37.1: = bound_method %c.ref, %impl.elem2 -// CHECK:STDOUT: %facet_value.loc45_37.1: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.116, constants.%custom_witness.429ac1.1, constants.%custom_witness.5be, constants.%custom_witness.c31, constants.%custom_witness.bf4, constants.%custom_witness.226, constants.%custom_witness.202, constants.%custom_witness.429ac1.2) [concrete = constants.%facet_value.d15] -// CHECK:STDOUT: %.loc45_37.1: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_37.1 [concrete = constants.%facet_value.d15] -// CHECK:STDOUT: %facet_value.loc45_37.2: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.116, constants.%custom_witness.429ac1.1, constants.%custom_witness.5be, constants.%custom_witness.c31, constants.%custom_witness.bf4, constants.%custom_witness.226, constants.%custom_witness.202, constants.%custom_witness.429ac1.2) [concrete = constants.%facet_value.d15] -// CHECK:STDOUT: %.loc45_37.2: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_37.2 [concrete = constants.%facet_value.d15] -// CHECK:STDOUT: %specific_fn.loc45_37.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.d15) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] +// CHECK:STDOUT: %facet_value.loc45_37.1: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.116, constants.%custom_witness.612b50.1, constants.%DestroyImpl.impl_witness.587, constants.%custom_witness.5be, constants.%custom_witness.c31, constants.%custom_witness.bf4, constants.%custom_witness.0a1, constants.%DestroyImpl.impl_witness.488, constants.%custom_witness.202, constants.%custom_witness.612b50.2, constants.%DestroyImpl.impl_witness.fa7) [concrete = constants.%facet_value.d86] +// CHECK:STDOUT: %.loc45_37.1: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_37.1 [concrete = constants.%facet_value.d86] +// CHECK:STDOUT: %facet_value.loc45_37.2: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.116, constants.%custom_witness.612b50.1, constants.%DestroyImpl.impl_witness.587, constants.%custom_witness.5be, constants.%custom_witness.c31, constants.%custom_witness.bf4, constants.%custom_witness.0a1, constants.%DestroyImpl.impl_witness.488, constants.%custom_witness.202, constants.%custom_witness.612b50.2, constants.%DestroyImpl.impl_witness.fa7) [concrete = constants.%facet_value.d86] +// CHECK:STDOUT: %.loc45_37.2: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_37.2 [concrete = constants.%facet_value.d86] +// CHECK:STDOUT: %specific_fn.loc45_37.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.d86) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc45_37.2: = bound_method %c.ref, %specific_fn.loc45_37.1 // CHECK:STDOUT: %var: ref %tuple.type.7a6 = var_storage invalid // CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.call: init %tuple.type.7a6 to %var = call %bound_method.loc45_37.2(%c.ref) @@ -4839,36 +3973,36 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3: %.b64 = impl_witness_access constants.%Iterate.impl_witness.d1d, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.82c] +// CHECK:STDOUT: %impl.elem3: %.135 = impl_witness_access constants.%Iterate.impl_witness.939, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.2f5] // CHECK:STDOUT: %bound_method.loc45_37.3: = bound_method %c.ref, %impl.elem3 -// CHECK:STDOUT: %facet_value.loc45_37.3: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.116, constants.%custom_witness.429ac1.1, constants.%custom_witness.5be, constants.%custom_witness.c31, constants.%custom_witness.bf4, constants.%custom_witness.226, constants.%custom_witness.202, constants.%custom_witness.429ac1.2) [concrete = constants.%facet_value.d15] -// CHECK:STDOUT: %.loc45_37.3: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_37.3 [concrete = constants.%facet_value.d15] -// CHECK:STDOUT: %facet_value.loc45_37.4: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.116, constants.%custom_witness.429ac1.1, constants.%custom_witness.5be, constants.%custom_witness.c31, constants.%custom_witness.bf4, constants.%custom_witness.226, constants.%custom_witness.202, constants.%custom_witness.429ac1.2) [concrete = constants.%facet_value.d15] -// CHECK:STDOUT: %.loc45_37.4: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_37.4 [concrete = constants.%facet_value.d15] -// CHECK:STDOUT: %specific_fn.loc45_37.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.d15) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] +// CHECK:STDOUT: %facet_value.loc45_37.3: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.116, constants.%custom_witness.612b50.1, constants.%DestroyImpl.impl_witness.587, constants.%custom_witness.5be, constants.%custom_witness.c31, constants.%custom_witness.bf4, constants.%custom_witness.0a1, constants.%DestroyImpl.impl_witness.488, constants.%custom_witness.202, constants.%custom_witness.612b50.2, constants.%DestroyImpl.impl_witness.fa7) [concrete = constants.%facet_value.d86] +// CHECK:STDOUT: %.loc45_37.3: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_37.3 [concrete = constants.%facet_value.d86] +// CHECK:STDOUT: %facet_value.loc45_37.4: %CppRange_where.type.d682d6.1 = facet_value constants.%ConstRange, (constants.%custom_witness.116, constants.%custom_witness.612b50.1, constants.%DestroyImpl.impl_witness.587, constants.%custom_witness.5be, constants.%custom_witness.c31, constants.%custom_witness.bf4, constants.%custom_witness.0a1, constants.%DestroyImpl.impl_witness.488, constants.%custom_witness.202, constants.%custom_witness.612b50.2, constants.%DestroyImpl.impl_witness.fa7) [concrete = constants.%facet_value.d86] +// CHECK:STDOUT: %.loc45_37.4: %CppRange_where.type.d682d6.1 = converted constants.%ConstRange, %facet_value.loc45_37.4 [concrete = constants.%facet_value.d86] +// CHECK:STDOUT: %specific_fn.loc45_37.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.d86) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc45_37.4: = bound_method %c.ref, %specific_fn.loc45_37.2 -// CHECK:STDOUT: %.loc45_37.5: ref %Optional.b4b = temporary_storage -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.b4b to %.loc45_37.5 = call %bound_method.loc45_37.4(%c.ref, %var) -// CHECK:STDOUT: %.loc45_37.6: ref %Optional.b4b = temporary %.loc45_37.5, %T.as_type.as.Iterate.impl.Next.call -// CHECK:STDOUT: %.loc45_37.7: %Optional.HasValue.type.1a1 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.0d1) [concrete = constants.%Optional.HasValue.766] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.1a1 = name_ref HasValue, %.loc45_37.7 [concrete = constants.%Optional.HasValue.766] +// CHECK:STDOUT: %.loc45_37.5: ref %Optional.d4a = temporary_storage +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.d4a to %.loc45_37.5 = call %bound_method.loc45_37.4(%c.ref, %var) +// CHECK:STDOUT: %.loc45_37.6: ref %Optional.d4a = temporary %.loc45_37.5, %T.as_type.as.Iterate.impl.Next.call +// CHECK:STDOUT: %.loc45_37.7: %Optional.HasValue.type.141 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.244) [concrete = constants.%Optional.HasValue.01b] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.141 = name_ref HasValue, %.loc45_37.7 [concrete = constants.%Optional.HasValue.01b] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc45_37.6, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.0d1) [concrete = constants.%Optional.HasValue.specific_fn.98f] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.244) [concrete = constants.%Optional.HasValue.specific_fn.18d] // CHECK:STDOUT: %bound_method.loc45_37.5: = bound_method %.loc45_37.6, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc45_37.8: %Optional.b4b = acquire_value %.loc45_37.6 +// CHECK:STDOUT: %.loc45_37.8: %Optional.d4a = acquire_value %.loc45_37.6 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc45_37.5(%.loc45_37.8) // CHECK:STDOUT: %.loc45_37.9: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc45_37.10: bool = converted %Optional.HasValue.call, %.loc45_37.9 // CHECK:STDOUT: if %.loc45_37.10 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc45_37.11: %Optional.Get.type.edf = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.0d1) [concrete = constants.%Optional.Get.047] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.edf = name_ref Get, %.loc45_37.11 [concrete = constants.%Optional.Get.047] +// CHECK:STDOUT: %.loc45_37.11: %Optional.Get.type.28b = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.244) [concrete = constants.%Optional.Get.90b] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.28b = name_ref Get, %.loc45_37.11 [concrete = constants.%Optional.Get.90b] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc45_37.6, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.0d1) [concrete = constants.%Optional.Get.specific_fn.9f0] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.244) [concrete = constants.%Optional.Get.specific_fn.f55] // CHECK:STDOUT: %bound_method.loc45_37.6: = bound_method %.loc45_37.6, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc45_37.12: ref %ValueType = temporary_storage -// CHECK:STDOUT: %.loc45_37.13: %Optional.b4b = acquire_value %.loc45_37.6 +// CHECK:STDOUT: %.loc45_37.13: %Optional.d4a = acquire_value %.loc45_37.6 // CHECK:STDOUT: %Optional.Get.call: init %ValueType to %.loc45_37.12 = call %bound_method.loc45_37.6(%.loc45_37.13) // CHECK:STDOUT: %.loc45_37.14: ref %ValueType = temporary %.loc45_37.12, %Optional.Get.call // CHECK:STDOUT: %.loc45_37.15: %ValueType = acquire_value %.loc45_37.14 @@ -4885,17 +4019,33 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc46_9.1: %ptr.69c = as_compatible %addr.loc46 // CHECK:STDOUT: %.loc46_9.2: %ptr.69c = converted %addr.loc46, %.loc46_9.1 // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.call: ref %ValueType = call imports.%operator_PlusEqual__carbon_thunk.decl(%sum.ref, %.loc46_9.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc45_37.1: = bound_method %.loc45_37.14, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc45_37.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc45_37.1(%.loc45_37.14) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc45_37.2: = bound_method %.loc45_37.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc45_37.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc45_37.2(%.loc45_37.6) +// CHECK:STDOUT: %Destroy.facet.loc45_37.1: %Destroy.type = facet_value constants.%ValueType, (constants.%custom_witness.0a1, constants.%DestroyImpl.impl_witness.488) [concrete = constants.%Destroy.facet.d1b] +// CHECK:STDOUT: %.loc45_37.16: %Destroy.type = converted constants.%ValueType, %Destroy.facet.loc45_37.1 [concrete = constants.%Destroy.facet.d1b] +// CHECK:STDOUT: %Destroy.facet.loc45_37.2: %Destroy.type = facet_value constants.%ValueType, (constants.%custom_witness.0a1, constants.%DestroyImpl.impl_witness.488) [concrete = constants.%Destroy.facet.d1b] +// CHECK:STDOUT: %.loc45_37.17: %Destroy.type = converted constants.%ValueType, %Destroy.facet.loc45_37.2 [concrete = constants.%Destroy.facet.d1b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc45_37.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc45_37.14) +// CHECK:STDOUT: %Destroy.facet.loc45_37.3: %Destroy.type = facet_value constants.%Optional.d4a, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ce9) [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %.loc45_37.18: %Destroy.type = converted constants.%Optional.d4a, %Destroy.facet.loc45_37.3 [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %Destroy.facet.loc45_37.4: %Destroy.type = facet_value constants.%Optional.d4a, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ce9) [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %.loc45_37.19: %Destroy.type = converted constants.%Optional.d4a, %Destroy.facet.loc45_37.4 [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc45_37.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc45_37.6) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc45_37.3: = bound_method %.loc45_37.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc45_37.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc45_37.3(%.loc45_37.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc45_37.4: = bound_method %var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.11 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc45_37.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc45_37.4(%var) +// CHECK:STDOUT: %Destroy.facet.loc45_37.5: %Destroy.type = facet_value constants.%Optional.d4a, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ce9) [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %.loc45_37.20: %Destroy.type = converted constants.%Optional.d4a, %Destroy.facet.loc45_37.5 [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %Destroy.facet.loc45_37.6: %Destroy.type = facet_value constants.%Optional.d4a, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ce9) [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: %.loc45_37.21: %Destroy.type = converted constants.%Optional.d4a, %Destroy.facet.loc45_37.6 [concrete = constants.%Destroy.facet.7d9] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc45_37.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc45_37.6) +// CHECK:STDOUT: %Destroy.facet.loc45_37.7: %Destroy.type = facet_value constants.%tuple.type.7a6, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.b22) [concrete = constants.%Destroy.facet.959] +// CHECK:STDOUT: %.loc45_37.22: %Destroy.type = converted constants.%tuple.type.7a6, %Destroy.facet.loc45_37.7 [concrete = constants.%Destroy.facet.959] +// CHECK:STDOUT: %Destroy.facet.loc45_37.8: %Destroy.type = facet_value constants.%tuple.type.7a6, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.b22) [concrete = constants.%Destroy.facet.959] +// CHECK:STDOUT: %.loc45_37.23: %Destroy.type = converted constants.%tuple.type.7a6, %Destroy.facet.loc45_37.8 [concrete = constants.%Destroy.facet.959] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc45_37.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -4903,14 +4053,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %R.patt.loc27_17.2 => constants.%R.patt // CHECK:STDOUT: %R.loc27_17.1 => constants.%R // CHECK:STDOUT: %R.as_type.loc27_79.1 => constants.%R.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.053 -// CHECK:STDOUT: %r.param_patt.loc27_77.2 => constants.%r.param_patt.75e -// CHECK:STDOUT: %r.patt.loc27_77.2 => constants.%r.patt.82a +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce +// CHECK:STDOUT: %r.param_patt.loc27_77.2 => constants.%r.param_patt.80f +// CHECK:STDOUT: %r.patt.loc27_77.2 => constants.%r.patt.7ca // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.1d8) { +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.8da) { // CHECK:STDOUT: %R.patt.loc27_17.2 => constants.%R.patt -// CHECK:STDOUT: %R.loc27_17.1 => constants.%facet_value.1d8 +// CHECK:STDOUT: %R.loc27_17.1 => constants.%facet_value.8da // CHECK:STDOUT: %R.as_type.loc27_79.1 => constants.%ConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c1d // CHECK:STDOUT: %r.param_patt.loc27_77.2 => constants.%r.param_patt.ac5 @@ -4918,24 +4068,20 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc27 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.d1d -// CHECK:STDOUT: %Iterate.facet.loc31_37.5 => constants.%Iterate.facet.8d3 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.7f7 -// CHECK:STDOUT: %.loc31_37.20 => constants.%.8c0 -// CHECK:STDOUT: %impl.elem2.loc31_37.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.437 -// CHECK:STDOUT: %specific_impl_fn.loc31_37.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn -// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.d83 +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.939 +// CHECK:STDOUT: %Iterate.facet.loc31_37.5 => constants.%Iterate.facet.ce6 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.df3 +// CHECK:STDOUT: %.loc31_37.26 => constants.%.472 +// CHECK:STDOUT: %impl.elem2.loc31_37.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.d53 +// CHECK:STDOUT: %specific_impl_fn.loc31_37.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn +// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.959 // CHECK:STDOUT: %as_type => constants.%tuple.type.7a6 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.cf0 -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.035 -// CHECK:STDOUT: %.loc31_37.21 => constants.%.b64 -// CHECK:STDOUT: %impl.elem3.loc31_37.2 => constants.%T.as_type.as.Iterate.impl.Next.82c -// CHECK:STDOUT: %specific_impl_fn.loc31_37.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.000 -// CHECK:STDOUT: %.loc31_37.22 => constants.%.dc3 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.8 -// CHECK:STDOUT: %impl.elem2.loc31_37.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.11 -// CHECK:STDOUT: %specific_impl_fn.loc31_37.6 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.11 +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.869 +// CHECK:STDOUT: %.loc31_37.27 => constants.%.135 +// CHECK:STDOUT: %impl.elem3.loc31_37.2 => constants.%T.as_type.as.Iterate.impl.Next.2f5 +// CHECK:STDOUT: %specific_impl_fn.loc31_37.4 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn +// CHECK:STDOUT: %SelfDestruct.specific_fn.6 => constants.%SelfDestruct.specific_fn.6b7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_adl_returns_different_types_mutable.carbon @@ -4944,137 +4090,105 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %facet_type.bd0: type = facet_type <@Copy & @Destroy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.Get.2d0: %Optional.Get.type.786 = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f2f: %Optional.HasValue.type.3ea = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.74b: type = facet_access_type %T.283 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.28a: = lookup_impl_witness %T.283, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.16e: %Destroy.type = facet_value %T.as_type.74b, (%Destroy.lookup_impl_witness.28a) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.91c: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.16e) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.ade: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.b49: type = unbound_element_type %DefaultOptionalStorage.ade, bool [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.229: type = unbound_element_type %DefaultOptionalStorage.ade, %MaybeUnformed.91c [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.2f2: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.884: %T.as_type.as.OptionalStorage.impl.Get.type.2f2 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.d28: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.f29: %T.as_type.as.OptionalStorage.impl.Has.type.d28 = struct_value () [symbolic] +// CHECK:STDOUT: %T.f84392.1: %facet_type.bd0 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.c1cc3e.1: type = facet_access_type %T.f84392.1 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.70f: = lookup_impl_witness %T.f84392.1, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.bf2: = lookup_impl_witness %T.f84392.1, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.dc4: %Destroy.type = facet_value %T.as_type.c1cc3e.1, (%SubobjectDestroy.lookup_impl_witness.70f, %DestroyImpl.lookup_impl_witness.bf2) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.348: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.dc4) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.476: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.4a2: type = unbound_element_type %DefaultOptionalStorage.476, bool [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.ff3: type = unbound_element_type %DefaultOptionalStorage.476, %MaybeUnformed.348 [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.f27: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.e40: %T.as_type.as.OptionalStorage.impl.Get.type.f27 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.18e: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.463: %T.as_type.as.OptionalStorage.impl.Has.type.18e = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %ValueType: type = class_type @ValueType [concrete] // CHECK:STDOUT: %pattern_type.d2d: type = pattern_type %ValueType [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc37 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc37 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %ValueType.SubobjectDestroy.type: type = fn_type @ValueType.SubobjectDestroy [concrete] -// CHECK:STDOUT: %ValueType.SubobjectDestroy: %ValueType.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.3ec: = custom_witness (%Destroy.WithSelf.Op.403171.2, %ValueType.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] +// CHECK:STDOUT: %ValueType.Op.type.db6aa9.1: type = fn_type @ValueType.Op.1 [concrete] +// CHECK:STDOUT: %ValueType.Op.4590ed.1: %ValueType.Op.type.db6aa9.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.55b: = custom_witness (%ValueType.Op.4590ed.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.5fb: %SubobjectDestroy.type = facet_value %ValueType, (%custom_witness.55b) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.7f1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.5fb) [concrete] // CHECK:STDOUT: %const.91f: type = const_type %ValueType [concrete] // CHECK:STDOUT: %ptr.5f4: type = ptr_type %const.91f [concrete] // CHECK:STDOUT: %ptr.9c6: type = ptr_type %ValueType [concrete] -// CHECK:STDOUT: %ValueType.Op.type: type = fn_type @ValueType.Op [concrete] -// CHECK:STDOUT: %ValueType.Op: %ValueType.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.587: = custom_witness (%ValueType.Op), @Copy [concrete] -// CHECK:STDOUT: %facet_value.14c: %facet_type.f48 = facet_value %ValueType, (%custom_witness.3ec, %custom_witness.587) [concrete] +// CHECK:STDOUT: %ValueType.Op.type.db6aa9.2: type = fn_type @ValueType.Op.2 [concrete] +// CHECK:STDOUT: %ValueType.Op.4590ed.2: %ValueType.Op.type.db6aa9.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.587: = custom_witness (%ValueType.Op.4590ed.2), @Copy [concrete] +// CHECK:STDOUT: %facet_value.6d3: %facet_type.bd0 = facet_value %ValueType, (%custom_witness.55b, %DestroyImpl.impl_witness.7f1, %custom_witness.587) [concrete] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %Iterate_where.type.9df: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.14c> [concrete] -// CHECK:STDOUT: %pattern_type.e3a: type = pattern_type %Iterate_where.type.9df [concrete] -// CHECK:STDOUT: %R.patt: %pattern_type.e3a = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R: %Iterate_where.type.9df = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %impl.elem0.4ce: %facet_type.bd0 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %Iterate_where.type.ad0: type = facet_type <@Iterate where %impl.elem0.4ce = %facet_value.6d3> [concrete] +// CHECK:STDOUT: %pattern_type.f28: type = pattern_type %Iterate_where.type.ad0 [concrete] +// CHECK:STDOUT: %R.patt: %pattern_type.f28 = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.ad0 = symbolic_binding R, 0 [symbolic] // CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] -// CHECK:STDOUT: %pattern_type.0bc: type = pattern_type %R.as_type [symbolic] -// CHECK:STDOUT: %r.param_patt: %pattern_type.0bc = value_param_pattern [symbolic] -// CHECK:STDOUT: %r.patt: %pattern_type.0bc = wrapper_binding_pattern r, %r.param_patt [symbolic] +// CHECK:STDOUT: %pattern_type.2f7: type = pattern_type %R.as_type [symbolic] +// CHECK:STDOUT: %r.param_patt: %pattern_type.2f7 = value_param_pattern [symbolic] +// CHECK:STDOUT: %r.patt: %pattern_type.2f7 = wrapper_binding_pattern r, %r.param_patt [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.d2d = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.711: = lookup_impl_witness %R, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.04e: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.711) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.f6c: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.04e) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.d76: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.04e) [symbolic] -// CHECK:STDOUT: %.2577: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.f6c, %Iterate.facet.04e [symbolic] -// CHECK:STDOUT: %impl.elem2.f11: %.2577 = impl_witness_access %Iterate.lookup_impl_witness.711, element2 [symbolic] -// CHECK:STDOUT: %impl.elem1.0e0: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.711, element1 [symbolic] -// CHECK:STDOUT: %as_type.b30: type = facet_access_type %impl.elem1.0e0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.d03: = specific_impl_function %impl.elem2.f11, @Iterate.WithSelf.NewCursor(%Iterate.facet.04e) [symbolic] -// CHECK:STDOUT: %.894: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.d76, %Iterate.facet.04e [symbolic] -// CHECK:STDOUT: %impl.elem3.eed: %.894 = impl_witness_access %Iterate.lookup_impl_witness.711, element3 [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.f08: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.14c) [concrete] -// CHECK:STDOUT: %OptionalStorage.impl_witness.90a: = impl_witness imports.%OptionalStorage.impl_witness_table.460, @T.as_type.as.OptionalStorage.impl(%facet_value.14c) [concrete] -// CHECK:STDOUT: %OptionalStorage.facet.c95: %OptionalStorage.type = facet_value %ValueType, (%OptionalStorage.impl_witness.90a) [concrete] -// CHECK:STDOUT: %Optional.f5e: type = class_type @Optional, @Optional(%OptionalStorage.facet.c95) [concrete] -// CHECK:STDOUT: %pattern_type.0bb: type = pattern_type %Optional.f5e [concrete] -// CHECK:STDOUT: %specific_impl_fn.303: = specific_impl_function %impl.elem3.eed, @Iterate.WithSelf.Next(%Iterate.facet.04e) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.a05: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.c95) [concrete] -// CHECK:STDOUT: %Optional.HasValue.a9c: %Optional.HasValue.type.a05 = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.476: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.c95) [concrete] -// CHECK:STDOUT: %Optional.Get.60b: %Optional.Get.type.476 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.6cb: %Destroy.type = facet_value %ValueType, (%custom_witness.3ec) [concrete] -// CHECK:STDOUT: %MaybeUnformed.65d: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.6cb) [concrete] -// CHECK:STDOUT: %.dd1: type = maybe_unformed_type %ValueType [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.28f: type = unbound_element_type %DefaultOptionalStorage.f08, %MaybeUnformed.65d [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.9e9: type = unbound_element_type %DefaultOptionalStorage.f08, bool [concrete] -// CHECK:STDOUT: %struct_type.value.has_value.afd: type = struct_type {.value: %MaybeUnformed.65d, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.a9c, @Optional.HasValue(%OptionalStorage.facet.c95) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.60b, @Optional.Get(%OptionalStorage.facet.c95) [concrete] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.afc: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.942: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.afc) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.73c: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.942) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.f8d: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.942) [symbolic] +// CHECK:STDOUT: %.848: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.73c, %Iterate.facet.942 [symbolic] +// CHECK:STDOUT: %impl.elem2.2ea: %.848 = impl_witness_access %Iterate.lookup_impl_witness.afc, element2 [symbolic] +// CHECK:STDOUT: %impl.elem1.7d3: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.afc, element1 [symbolic] +// CHECK:STDOUT: %as_type.901: type = facet_access_type %impl.elem1.7d3 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.105: = specific_impl_function %impl.elem2.2ea, @Iterate.WithSelf.NewCursor(%Iterate.facet.942) [symbolic] +// CHECK:STDOUT: %.b21: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.f8d, %Iterate.facet.942 [symbolic] +// CHECK:STDOUT: %impl.elem3.509: %.b21 = impl_witness_access %Iterate.lookup_impl_witness.afc, element3 [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.db0: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.6d3) [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness.cc0: = impl_witness imports.%OptionalStorage.impl_witness_table.1c4, @T.as_type.as.OptionalStorage.impl(%facet_value.6d3) [concrete] +// CHECK:STDOUT: %OptionalStorage.facet.86d: %OptionalStorage.type = facet_value %ValueType, (%OptionalStorage.impl_witness.cc0) [concrete] +// CHECK:STDOUT: %Optional.35b: type = class_type @Optional, @Optional(%OptionalStorage.facet.86d) [concrete] +// CHECK:STDOUT: %specific_impl_fn.ccf: = specific_impl_function %impl.elem3.509, @Iterate.WithSelf.Next(%Iterate.facet.942) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.5fc: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.86d) [concrete] +// CHECK:STDOUT: %Optional.HasValue.462: %Optional.HasValue.type.5fc = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.fad: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.86d) [concrete] +// CHECK:STDOUT: %Optional.Get.707: %Optional.Get.type.fad = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.facet.423: %Destroy.type = facet_value %ValueType, (%custom_witness.55b, %DestroyImpl.impl_witness.7f1) [concrete] +// CHECK:STDOUT: %MaybeUnformed.149: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.423) [concrete] +// CHECK:STDOUT: %.dd19: type = maybe_unformed_type %ValueType [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.649: type = unbound_element_type %DefaultOptionalStorage.db0, %MaybeUnformed.149 [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.21a: type = unbound_element_type %DefaultOptionalStorage.db0, bool [concrete] +// CHECK:STDOUT: %struct_type.value.has_value.88e: type = struct_type {.value: %MaybeUnformed.149, .has_value: bool} [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.462, @Optional.HasValue(%OptionalStorage.facet.86d) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.707, @Optional.Get(%OptionalStorage.facet.86d) [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.type: type = fn_type @operator_PlusEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk: %operator_PlusEqual__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.1d1: type = pattern_type %.dd1 [concrete] -// CHECK:STDOUT: %self.param_patt.964: %pattern_type.1d1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.82f: %pattern_type.1d1 = wrapper_binding_pattern self, %self.param_patt.964 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc41_44.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc41_44.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.5da: type = pattern_type %MaybeUnformed.65d [concrete] -// CHECK:STDOUT: %self.param_patt.323: %pattern_type.5da = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.b95: %pattern_type.5da = wrapper_binding_pattern self, %self.param_patt.323 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc41_44.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc41_44.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc41_44.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc41_44.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc41_44.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc41_44.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.bef: type = pattern_type %struct_type.value.has_value.afd [concrete] -// CHECK:STDOUT: %self.param_patt.5ce: %pattern_type.bef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6ba: %pattern_type.bef = wrapper_binding_pattern self, %self.param_patt.5ce [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc41_44.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc41_44.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.c4b: type = pattern_type %DefaultOptionalStorage.f08 [concrete] -// CHECK:STDOUT: %self.param_patt.0a4: %pattern_type.c4b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.138: %pattern_type.c4b = wrapper_binding_pattern self, %self.param_patt.0a4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc41_44.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc41_44.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8be: %pattern_type.0bb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.bb8: %pattern_type.0bb = wrapper_binding_pattern self, %self.param_patt.8be [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc41_44.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc41_44.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8: type = fn_type @Destroy.WithSelf.SelfDestruct.loc41_44.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.8: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.696: = lookup_impl_witness %impl.elem1.0e0, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.55d: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1.0e0) [symbolic] -// CHECK:STDOUT: %.a44: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.55d, %impl.elem1.0e0 [symbolic] -// CHECK:STDOUT: %impl.elem2.1f1: %.a44 = impl_witness_access %Destroy.lookup_impl_witness.696, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.cb8: = specific_impl_function %impl.elem2.1f1, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1.0e0) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc41_44.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc41_44.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.80c: %Destroy.type = facet_value bool, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.778) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.e25: %SubobjectDestroy.type = facet_value %MaybeUnformed.149, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.faa: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.e25) [concrete] +// CHECK:STDOUT: %Destroy.facet.6cf: %Destroy.type = facet_value %MaybeUnformed.149, (%custom_witness.b80ef6.3, %DestroyImpl.impl_witness.faa) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc41_44.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f77: %SubobjectDestroy.type = facet_value %Optional.35b, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.ed2: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f77) [concrete] +// CHECK:STDOUT: %Destroy.facet.610: %Destroy.type = facet_value %Optional.35b, (%custom_witness.b80ef6.7, %DestroyImpl.impl_witness.ed2) [concrete] // CHECK:STDOUT: %MutableRange: type = class_type @MutableRange [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -5083,15 +4197,17 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: .DiffMutableADL = %DiffMutableADL // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.02f: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.ade)] -// CHECK:STDOUT: %Core.import_ref.553 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.db2 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.9a4: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.d28) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.f29)] -// CHECK:STDOUT: %Core.import_ref.6e3: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.2f2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.884)] -// CHECK:STDOUT: %Core.import_ref.af7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.460 = impl_witness_table (%Core.import_ref.02f, %Core.import_ref.553, %Core.import_ref.db2, %Core.import_ref.9a4, %Core.import_ref.6e3, %Core.import_ref.af7), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.51c9: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.498] -// CHECK:STDOUT: %Core.import_ref.b03: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.390] +// CHECK:STDOUT: %Core.import_ref.481: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.476)] +// CHECK:STDOUT: %Core.import_ref.138 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.e46 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.801: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.18e) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.463)] +// CHECK:STDOUT: %Core.import_ref.eec: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.f27) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.e40)] +// CHECK:STDOUT: %Core.import_ref.a6a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.1c4 = impl_witness_table (%Core.import_ref.481, %Core.import_ref.138, %Core.import_ref.e46, %Core.import_ref.801, %Core.import_ref.eec, %Core.import_ref.a6a), @T.as_type.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.e86: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.bce] +// CHECK:STDOUT: %Core.import_ref.9ce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.dbe] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.c82: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.3ea) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.f2f)] // CHECK:STDOUT: %Core.import_ref.29e: @Optional.%Optional.Get.type (%Optional.Get.type.786) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.2d0)] // CHECK:STDOUT: %DiffMutableADL: = namespace [concrete] { @@ -5105,121 +4221,30 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.b0d0 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.390: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = field_decl has_value, element1, %Core.import_ref.b0d0 in [concrete] {} -// CHECK:STDOUT: %Core.import_ref.ab7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.498: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = field_decl value, element0, %Core.import_ref.ab7 in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.dbe: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = field_decl has_value, element1, %Core.import_ref.b0d in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.45d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.bce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = field_decl value, element0, %Core.import_ref.45d in [concrete] {} // CHECK:STDOUT: %MutableRange.decl: type = class_decl @MutableRange [concrete = constants.%MutableRange] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc41_44.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1d1 = ref_param_pattern [concrete = constants.%self.param_patt.964] -// CHECK:STDOUT: %self.patt: %pattern_type.1d1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.82f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.dd1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.dd1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc41_44.1 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1d1 = ref_param_pattern [concrete = constants.%self.param_patt.964] -// CHECK:STDOUT: %self.patt: %pattern_type.1d1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.82f] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.dd1 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.dd1 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc41_44.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5da = ref_param_pattern [concrete = constants.%self.param_patt.323] -// CHECK:STDOUT: %self.patt: %pattern_type.5da = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b95] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.65d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.65d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc41_44.2 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5da = ref_param_pattern [concrete = constants.%self.param_patt.323] -// CHECK:STDOUT: %self.patt: %pattern_type.5da = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.b95] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.65d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.65d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc41_44.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc41_44.3 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc41_44.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bef = ref_param_pattern [concrete = constants.%self.param_patt.5ce] -// CHECK:STDOUT: %self.patt: %pattern_type.bef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6ba] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.afd = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.afd = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc41_44.4 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.bef = ref_param_pattern [concrete = constants.%self.param_patt.5ce] -// CHECK:STDOUT: %self.patt: %pattern_type.bef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6ba] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.afd = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.afd = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc41_44.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c4b = ref_param_pattern [concrete = constants.%self.param_patt.0a4] -// CHECK:STDOUT: %self.patt: %pattern_type.c4b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.138] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.f08 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.f08 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc41_44.5 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c4b = ref_param_pattern [concrete = constants.%self.param_patt.0a4] -// CHECK:STDOUT: %self.patt: %pattern_type.c4b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.138] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.f08 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.f08 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc41_44.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0bb = ref_param_pattern [concrete = constants.%self.param_patt.8be] -// CHECK:STDOUT: %self.patt: %pattern_type.0bb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bb8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.f5e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.f5e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.8 = fn_decl @Destroy.WithSelf.Op.loc41_44.6 [concrete = constants.%Destroy.WithSelf.Op.403171.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0bb = ref_param_pattern [concrete = constants.%self.param_patt.8be] -// CHECK:STDOUT: %self.patt: %pattern_type.0bb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.bb8] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.f5e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.f5e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TestIterate(%R.loc37_17.2: %Iterate_where.type.9df) { +// CHECK:STDOUT: generic fn @TestIterate(%R.loc37_17.2: %Iterate_where.type.ad0) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc37_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.711)] -// CHECK:STDOUT: %Iterate.facet.loc41_44.5: %Iterate.type = facet_value %R.as_type.loc37_86.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.04e)] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc41_44.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.f6c)] -// CHECK:STDOUT: %.loc41_44.20: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc41_44.5 [symbolic = %.loc41_44.20 (constants.%.2577)] -// CHECK:STDOUT: %impl.elem2.loc41_44.3: @TestIterate.%.loc41_44.20 (%.2577) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc41_44.3 (constants.%impl.elem2.f11)] -// CHECK:STDOUT: %specific_impl_fn.loc41_44.4: = specific_impl_function %impl.elem2.loc41_44.3, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc41_44.5) [symbolic = %specific_impl_fn.loc41_44.4 (constants.%specific_impl_fn.d03)] +// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc37_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.afc)] +// CHECK:STDOUT: %Iterate.facet.loc41_44.5: %Iterate.type = facet_value %R.as_type.loc37_86.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.942)] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc41_44.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.73c)] +// CHECK:STDOUT: %.loc41_44.26: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc41_44.5 [symbolic = %.loc41_44.26 (constants.%.848)] +// CHECK:STDOUT: %impl.elem2.loc41_44.2: @TestIterate.%.loc41_44.26 (%.848) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc41_44.2 (constants.%impl.elem2.2ea)] +// CHECK:STDOUT: %specific_impl_fn.loc41_44.3: = specific_impl_function %impl.elem2.loc41_44.2, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc41_44.5) [symbolic = %specific_impl_fn.loc41_44.3 (constants.%specific_impl_fn.105)] +// CHECK:STDOUT: +// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc41_44.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.f8d)] +// CHECK:STDOUT: %.loc41_44.27: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc41_44.5 [symbolic = %.loc41_44.27 (constants.%.b21)] +// CHECK:STDOUT: %impl.elem3.loc41_44.2: @TestIterate.%.loc41_44.27 (%.b21) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc41_44.2 (constants.%impl.elem3.509)] +// CHECK:STDOUT: %specific_impl_fn.loc41_44.4: = specific_impl_function %impl.elem3.loc41_44.2, @Iterate.WithSelf.Next(%Iterate.facet.loc41_44.5) [symbolic = %specific_impl_fn.loc41_44.4 (constants.%specific_impl_fn.ccf)] // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc41_44.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.d76)] -// CHECK:STDOUT: %.loc41_44.21: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc41_44.5 [symbolic = %.loc41_44.21 (constants.%.894)] -// CHECK:STDOUT: %impl.elem3.loc41_44.2: @TestIterate.%.loc41_44.21 (%.894) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc41_44.2 (constants.%impl.elem3.eed)] -// CHECK:STDOUT: %specific_impl_fn.loc41_44.5: = specific_impl_function %impl.elem3.loc41_44.2, @Iterate.WithSelf.Next(%Iterate.facet.loc41_44.5) [symbolic = %specific_impl_fn.loc41_44.5 (constants.%specific_impl_fn.303)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.55d)] -// CHECK:STDOUT: %.loc41_44.22: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %impl.elem1 [symbolic = %.loc41_44.22 (constants.%.a44)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.696)] -// CHECK:STDOUT: %impl.elem2.loc41_44.4: @TestIterate.%.loc41_44.22 (%.a44) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc41_44.4 (constants.%impl.elem2.1f1)] -// CHECK:STDOUT: %specific_impl_fn.loc41_44.6: = specific_impl_function %impl.elem2.loc41_44.4, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1) [symbolic = %specific_impl_fn.loc41_44.6 (constants.%specific_impl_fn.cb8)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc37_86.1 (%R.as_type)) { // CHECK:STDOUT: !entry: @@ -5228,52 +4253,52 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.d2d = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc37_86.1 (%R.as_type) = name_ref r, %r -// CHECK:STDOUT: %impl.elem2.loc41_44.1: @TestIterate.%.loc41_44.20 (%.2577) = impl_witness_access constants.%Iterate.lookup_impl_witness.711, element2 [symbolic = %impl.elem2.loc41_44.3 (constants.%impl.elem2.f11)] +// CHECK:STDOUT: %impl.elem2.loc41_44.1: @TestIterate.%.loc41_44.26 (%.848) = impl_witness_access constants.%Iterate.lookup_impl_witness.afc, element2 [symbolic = %impl.elem2.loc41_44.2 (constants.%impl.elem2.2ea)] // CHECK:STDOUT: %bound_method.loc41_44.1: = bound_method %r.ref, %impl.elem2.loc41_44.1 -// CHECK:STDOUT: %Iterate.facet.loc41_44.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.711) [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.04e)] -// CHECK:STDOUT: %.loc41_44.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc41_44.1 [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.04e)] -// CHECK:STDOUT: %Iterate.facet.loc41_44.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.711) [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.04e)] -// CHECK:STDOUT: %.loc41_44.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc41_44.2 [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.04e)] -// CHECK:STDOUT: %specific_impl_fn.loc41_44.1: = specific_impl_function %impl.elem2.loc41_44.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.04e) [symbolic = %specific_impl_fn.loc41_44.4 (constants.%specific_impl_fn.d03)] +// CHECK:STDOUT: %Iterate.facet.loc41_44.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.afc) [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.942)] +// CHECK:STDOUT: %.loc41_44.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc41_44.1 [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.942)] +// CHECK:STDOUT: %Iterate.facet.loc41_44.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.afc) [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.942)] +// CHECK:STDOUT: %.loc41_44.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc41_44.2 [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.942)] +// CHECK:STDOUT: %specific_impl_fn.loc41_44.1: = specific_impl_function %impl.elem2.loc41_44.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.942) [symbolic = %specific_impl_fn.loc41_44.3 (constants.%specific_impl_fn.105)] // CHECK:STDOUT: %bound_method.loc41_44.2: = bound_method %r.ref, %specific_impl_fn.loc41_44.1 -// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.b30) = var_storage invalid -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.b30) to %var = call %bound_method.loc41_44.2(%r.ref) +// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.901) = var_storage invalid +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.901) to %var = call %bound_method.loc41_44.2(%r.ref) // CHECK:STDOUT: assign %var, %Iterate.WithSelf.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3.loc41_44.1: @TestIterate.%.loc41_44.21 (%.894) = impl_witness_access constants.%Iterate.lookup_impl_witness.711, element3 [symbolic = %impl.elem3.loc41_44.2 (constants.%impl.elem3.eed)] +// CHECK:STDOUT: %impl.elem3.loc41_44.1: @TestIterate.%.loc41_44.27 (%.b21) = impl_witness_access constants.%Iterate.lookup_impl_witness.afc, element3 [symbolic = %impl.elem3.loc41_44.2 (constants.%impl.elem3.509)] // CHECK:STDOUT: %bound_method.loc41_44.3: = bound_method %r.ref, %impl.elem3.loc41_44.1 -// CHECK:STDOUT: %Iterate.facet.loc41_44.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.711) [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.04e)] -// CHECK:STDOUT: %.loc41_44.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc41_44.3 [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.04e)] -// CHECK:STDOUT: %Iterate.facet.loc41_44.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.711) [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.04e)] -// CHECK:STDOUT: %.loc41_44.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc41_44.4 [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.04e)] -// CHECK:STDOUT: %.loc41_44.5: %Destroy.type = converted constants.%as_type.b30, constants.%impl.elem1.0e0 [symbolic = %impl.elem1 (constants.%impl.elem1.0e0)] -// CHECK:STDOUT: %.loc41_44.6: %Destroy.type = converted constants.%as_type.b30, constants.%impl.elem1.0e0 [symbolic = %impl.elem1 (constants.%impl.elem1.0e0)] -// CHECK:STDOUT: %specific_impl_fn.loc41_44.2: = specific_impl_function %impl.elem3.loc41_44.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.04e) [symbolic = %specific_impl_fn.loc41_44.5 (constants.%specific_impl_fn.303)] +// CHECK:STDOUT: %Iterate.facet.loc41_44.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.afc) [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.942)] +// CHECK:STDOUT: %.loc41_44.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc41_44.3 [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.942)] +// CHECK:STDOUT: %Iterate.facet.loc41_44.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.afc) [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.942)] +// CHECK:STDOUT: %.loc41_44.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc41_44.4 [symbolic = %Iterate.facet.loc41_44.5 (constants.%Iterate.facet.942)] +// CHECK:STDOUT: %.loc41_44.5: %Destroy.type = converted constants.%as_type.901, constants.%impl.elem1.7d3 [symbolic = %impl.elem1 (constants.%impl.elem1.7d3)] +// CHECK:STDOUT: %.loc41_44.6: %Destroy.type = converted constants.%as_type.901, constants.%impl.elem1.7d3 [symbolic = %impl.elem1 (constants.%impl.elem1.7d3)] +// CHECK:STDOUT: %specific_impl_fn.loc41_44.2: = specific_impl_function %impl.elem3.loc41_44.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.942) [symbolic = %specific_impl_fn.loc41_44.4 (constants.%specific_impl_fn.ccf)] // CHECK:STDOUT: %bound_method.loc41_44.4: = bound_method %r.ref, %specific_impl_fn.loc41_44.2 -// CHECK:STDOUT: %.loc41_44.7: ref %Optional.f5e = temporary_storage -// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.f5e to %.loc41_44.7 = call %bound_method.loc41_44.4(%r.ref, %var) -// CHECK:STDOUT: %.loc41_44.8: ref %Optional.f5e = temporary %.loc41_44.7, %Iterate.WithSelf.Next.call -// CHECK:STDOUT: %.loc41_44.9: %Optional.HasValue.type.a05 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.c95) [concrete = constants.%Optional.HasValue.a9c] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.a05 = name_ref HasValue, %.loc41_44.9 [concrete = constants.%Optional.HasValue.a9c] +// CHECK:STDOUT: %.loc41_44.7: ref %Optional.35b = temporary_storage +// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.35b to %.loc41_44.7 = call %bound_method.loc41_44.4(%r.ref, %var) +// CHECK:STDOUT: %.loc41_44.8: ref %Optional.35b = temporary %.loc41_44.7, %Iterate.WithSelf.Next.call +// CHECK:STDOUT: %.loc41_44.9: %Optional.HasValue.type.5fc = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.86d) [concrete = constants.%Optional.HasValue.462] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.5fc = name_ref HasValue, %.loc41_44.9 [concrete = constants.%Optional.HasValue.462] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc41_44.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.c95) [concrete = constants.%Optional.HasValue.specific_fn] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.86d) [concrete = constants.%Optional.HasValue.specific_fn] // CHECK:STDOUT: %bound_method.loc41_44.5: = bound_method %.loc41_44.8, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc41_44.10: %Optional.f5e = acquire_value %.loc41_44.8 +// CHECK:STDOUT: %.loc41_44.10: %Optional.35b = acquire_value %.loc41_44.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc41_44.5(%.loc41_44.10) // CHECK:STDOUT: %.loc41_44.11: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc41_44.12: bool = converted %Optional.HasValue.call, %.loc41_44.11 // CHECK:STDOUT: if %.loc41_44.12 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc41_44.13: %Optional.Get.type.476 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.c95) [concrete = constants.%Optional.Get.60b] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.476 = name_ref Get, %.loc41_44.13 [concrete = constants.%Optional.Get.60b] +// CHECK:STDOUT: %.loc41_44.13: %Optional.Get.type.fad = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.86d) [concrete = constants.%Optional.Get.707] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.fad = name_ref Get, %.loc41_44.13 [concrete = constants.%Optional.Get.707] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc41_44.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.c95) [concrete = constants.%Optional.Get.specific_fn] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.86d) [concrete = constants.%Optional.Get.specific_fn] // CHECK:STDOUT: %bound_method.loc41_44.6: = bound_method %.loc41_44.8, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc41_44.14: ref %ValueType = temporary_storage -// CHECK:STDOUT: %.loc41_44.15: %Optional.f5e = acquire_value %.loc41_44.8 +// CHECK:STDOUT: %.loc41_44.15: %Optional.35b = acquire_value %.loc41_44.8 // CHECK:STDOUT: %Optional.Get.call: init %ValueType to %.loc41_44.14 = call %bound_method.loc41_44.6(%.loc41_44.15) // CHECK:STDOUT: %.loc41_44.16: ref %ValueType = temporary %.loc41_44.14, %Optional.Get.call // CHECK:STDOUT: %.loc41_44.17: %ValueType = acquire_value %.loc41_44.16 @@ -5290,114 +4315,85 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc42_9.1: %ptr.5f4 = as_compatible %addr.loc42 // CHECK:STDOUT: %.loc42_9.2: %ptr.5f4 = converted %addr.loc42, %.loc42_9.1 // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.call: ref %ValueType = call imports.%operator_PlusEqual__carbon_thunk.decl(%sum.ref, %.loc42_9.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc41_44.1: = bound_method %.loc41_44.16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc41_44.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc41_44.1(%.loc41_44.16) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc41_44.2: = bound_method %.loc41_44.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc41_44.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc41_44.2(%.loc41_44.8) +// CHECK:STDOUT: %Destroy.facet.loc41_44.1: %Destroy.type = facet_value constants.%ValueType, (constants.%custom_witness.55b, constants.%DestroyImpl.impl_witness.7f1) [concrete = constants.%Destroy.facet.423] +// CHECK:STDOUT: %.loc41_44.18: %Destroy.type = converted constants.%ValueType, %Destroy.facet.loc41_44.1 [concrete = constants.%Destroy.facet.423] +// CHECK:STDOUT: %Destroy.facet.loc41_44.2: %Destroy.type = facet_value constants.%ValueType, (constants.%custom_witness.55b, constants.%DestroyImpl.impl_witness.7f1) [concrete = constants.%Destroy.facet.423] +// CHECK:STDOUT: %.loc41_44.19: %Destroy.type = converted constants.%ValueType, %Destroy.facet.loc41_44.2 [concrete = constants.%Destroy.facet.423] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc41_44.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc41_44.16) +// CHECK:STDOUT: %Destroy.facet.loc41_44.3: %Destroy.type = facet_value constants.%Optional.35b, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ed2) [concrete = constants.%Destroy.facet.610] +// CHECK:STDOUT: %.loc41_44.20: %Destroy.type = converted constants.%Optional.35b, %Destroy.facet.loc41_44.3 [concrete = constants.%Destroy.facet.610] +// CHECK:STDOUT: %Destroy.facet.loc41_44.4: %Destroy.type = facet_value constants.%Optional.35b, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ed2) [concrete = constants.%Destroy.facet.610] +// CHECK:STDOUT: %.loc41_44.21: %Destroy.type = converted constants.%Optional.35b, %Destroy.facet.loc41_44.4 [concrete = constants.%Destroy.facet.610] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc41_44.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc41_44.8) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc41_44.3: = bound_method %.loc41_44.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc41_44.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc41_44.3(%.loc41_44.8) -// CHECK:STDOUT: %impl.elem2.loc41_44.2: @TestIterate.%.loc41_44.22 (%.a44) = impl_witness_access constants.%Destroy.lookup_impl_witness.696, element2 [symbolic = %impl.elem2.loc41_44.4 (constants.%impl.elem2.1f1)] -// CHECK:STDOUT: %bound_method.loc41_44.7: = bound_method %var, %impl.elem2.loc41_44.2 -// CHECK:STDOUT: %.loc41_44.18: %Destroy.type = converted constants.%as_type.b30, constants.%impl.elem1.0e0 [symbolic = %impl.elem1 (constants.%impl.elem1.0e0)] -// CHECK:STDOUT: %.loc41_44.19: %Destroy.type = converted constants.%as_type.b30, constants.%impl.elem1.0e0 [symbolic = %impl.elem1 (constants.%impl.elem1.0e0)] -// CHECK:STDOUT: %specific_impl_fn.loc41_44.3: = specific_impl_function %impl.elem2.loc41_44.2, @Destroy.WithSelf.SelfDestruct.1(constants.%impl.elem1.0e0) [symbolic = %specific_impl_fn.loc41_44.6 (constants.%specific_impl_fn.cb8)] -// CHECK:STDOUT: %bound_method.loc41_44.8: = bound_method %var, %specific_impl_fn.loc41_44.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc41_44.4: init %empty_tuple.type = call %bound_method.loc41_44.8(%var) +// CHECK:STDOUT: %Destroy.facet.loc41_44.5: %Destroy.type = facet_value constants.%Optional.35b, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ed2) [concrete = constants.%Destroy.facet.610] +// CHECK:STDOUT: %.loc41_44.22: %Destroy.type = converted constants.%Optional.35b, %Destroy.facet.loc41_44.5 [concrete = constants.%Destroy.facet.610] +// CHECK:STDOUT: %Destroy.facet.loc41_44.6: %Destroy.type = facet_value constants.%Optional.35b, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.ed2) [concrete = constants.%Destroy.facet.610] +// CHECK:STDOUT: %.loc41_44.23: %Destroy.type = converted constants.%Optional.35b, %Destroy.facet.loc41_44.6 [concrete = constants.%Destroy.facet.610] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc41_44.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc41_44.8) +// CHECK:STDOUT: %.loc41_44.24: %Destroy.type = converted constants.%as_type.901, constants.%impl.elem1.7d3 [symbolic = %impl.elem1 (constants.%impl.elem1.7d3)] +// CHECK:STDOUT: %.loc41_44.25: %Destroy.type = converted constants.%as_type.901, constants.%impl.elem1.7d3 [symbolic = %impl.elem1 (constants.%impl.elem1.7d3)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc41_44.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc41_44.1(%self.param: ref %.dd1) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc41_44.1(%self.param: ref %.dd19) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc41_44.1(%self.param: ref %.dd1) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc41_44.2(%self.param: ref %MaybeUnformed.149) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc41_44.1(%self.param: ref %.dd1) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc41_44.3(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc41_44.2(%self.param: ref %MaybeUnformed.65d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc41_44.2(%self.param: ref %MaybeUnformed.65d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc41_44.2(%self.param: ref %MaybeUnformed.65d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc41_44.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc41_44.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc41_44.3(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc41_44.4(%self.param: ref %struct_type.value.has_value.afd) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc41_44.4(%self.param: ref %struct_type.value.has_value.88e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc41_44.1: ref bool = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc41_44.1: = bound_method %.loc41_44.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc41_44.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc41_44.1(%.loc41_44.1) -// CHECK:STDOUT: %.loc41_44.2: ref %MaybeUnformed.65d = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc41_44.2: = bound_method %.loc41_44.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc41_44.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc41_44.2(%.loc41_44.2) +// CHECK:STDOUT: %Destroy.facet.loc41_44.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc41_44.2: %Destroy.type = converted bool, %Destroy.facet.loc41_44.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc41_44.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc41_44.3: %Destroy.type = converted bool, %Destroy.facet.loc41_44.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc41_44.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc41_44.1) +// CHECK:STDOUT: %.loc41_44.4: ref %MaybeUnformed.149 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc41_44.3: %Destroy.type = facet_value constants.%MaybeUnformed.149, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.faa) [concrete = constants.%Destroy.facet.6cf] +// CHECK:STDOUT: %.loc41_44.5: %Destroy.type = converted constants.%MaybeUnformed.149, %Destroy.facet.loc41_44.3 [concrete = constants.%Destroy.facet.6cf] +// CHECK:STDOUT: %Destroy.facet.loc41_44.4: %Destroy.type = facet_value constants.%MaybeUnformed.149, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.faa) [concrete = constants.%Destroy.facet.6cf] +// CHECK:STDOUT: %.loc41_44.6: %Destroy.type = converted constants.%MaybeUnformed.149, %Destroy.facet.loc41_44.4 [concrete = constants.%Destroy.facet.6cf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc41_44.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc41_44.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc41_44.4(%self.param: ref %struct_type.value.has_value.afd) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc41_44.4(%self.param: ref %struct_type.value.has_value.afd) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc41_44.5(%self.param: ref %DefaultOptionalStorage.db0) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc41_44.5(%self.param: ref %DefaultOptionalStorage.f08) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.9e9 = name_ref has_value, imports.%Core.import_ref.b03 [concrete = imports.%field_decl.390] +// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.21a = name_ref has_value, imports.%Core.import_ref.9ce [concrete = imports.%field_decl.dbe] // CHECK:STDOUT: %.loc41_44.1: ref bool = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc41_44.1: = bound_method %.loc41_44.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc41_44.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc41_44.1(%.loc41_44.1) -// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.28f = name_ref value, imports.%Core.import_ref.51c9 [concrete = imports.%field_decl.498] -// CHECK:STDOUT: %.loc41_44.2: ref %MaybeUnformed.65d = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc41_44.2: = bound_method %.loc41_44.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc41_44.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc41_44.2(%.loc41_44.2) +// CHECK:STDOUT: %Destroy.facet.loc41_44.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc41_44.2: %Destroy.type = converted bool, %Destroy.facet.loc41_44.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc41_44.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc41_44.3: %Destroy.type = converted bool, %Destroy.facet.loc41_44.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc41_44.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc41_44.1) +// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.649 = name_ref value, imports.%Core.import_ref.e86 [concrete = imports.%field_decl.bce] +// CHECK:STDOUT: %.loc41_44.4: ref %MaybeUnformed.149 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc41_44.3: %Destroy.type = facet_value constants.%MaybeUnformed.149, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.faa) [concrete = constants.%Destroy.facet.6cf] +// CHECK:STDOUT: %.loc41_44.5: %Destroy.type = converted constants.%MaybeUnformed.149, %Destroy.facet.loc41_44.3 [concrete = constants.%Destroy.facet.6cf] +// CHECK:STDOUT: %Destroy.facet.loc41_44.4: %Destroy.type = facet_value constants.%MaybeUnformed.149, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.faa) [concrete = constants.%Destroy.facet.6cf] +// CHECK:STDOUT: %.loc41_44.6: %Destroy.type = converted constants.%MaybeUnformed.149, %Destroy.facet.loc41_44.4 [concrete = constants.%Destroy.facet.6cf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc41_44.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc41_44.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc41_44.5(%self.param: ref %DefaultOptionalStorage.f08) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc41_44.5(%self.param: ref %DefaultOptionalStorage.f08) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc41_44.6(%self.param: ref %Optional.f5e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc41_44.6(%self.param: ref %Optional.f5e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc41_44.6(%self.param: ref %Optional.f5e) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc41_44.6(%self.param: ref %Optional.35b) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TestRangeFor(%m.param: ref %MutableRange) { // CHECK:STDOUT: !entry: @@ -5434,7 +4430,7 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %R.patt.loc37_17.2 => constants.%R.patt // CHECK:STDOUT: %R.loc37_17.1 => constants.%R // CHECK:STDOUT: %R.as_type.loc37_86.1 => constants.%R.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.0bc +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.2f7 // CHECK:STDOUT: %r.param_patt.loc37_84.2 => constants.%r.param_patt // CHECK:STDOUT: %r.patt.loc37_84.2 => constants.%r.patt // CHECK:STDOUT: } @@ -5445,31 +4441,37 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] // CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] -// CHECK:STDOUT: %pattern_type.831: type = pattern_type bool [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %facet_type.f48: type = facet_type <@Destroy & @Copy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %facet_type.bd0: type = facet_type <@Copy & @Destroy> [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %T.220: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %T.220e40.1: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Optional.Get.type.786: type = fn_type @Optional.Get, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.Get.2d0: %Optional.Get.type.786 = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.3ea: type = fn_type @Optional.HasValue, @Optional(%T.220e40.1) [symbolic] // CHECK:STDOUT: %Optional.HasValue.f2f: %Optional.HasValue.type.3ea = struct_value () [symbolic] -// CHECK:STDOUT: %T.283: %facet_type.f48 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.74b: type = facet_access_type %T.283 [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.28a: = lookup_impl_witness %T.283, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.16e: %Destroy.type = facet_value %T.as_type.74b, (%Destroy.lookup_impl_witness.28a) [symbolic] -// CHECK:STDOUT: %MaybeUnformed.91c: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.16e) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.ade: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.283) [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.b49: type = unbound_element_type %DefaultOptionalStorage.ade, bool [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.229: type = unbound_element_type %DefaultOptionalStorage.ade, %MaybeUnformed.91c [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.2f2: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.884: %T.as_type.as.OptionalStorage.impl.Get.type.2f2 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.d28: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.f29: %T.as_type.as.OptionalStorage.impl.Has.type.d28 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.760: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.268: %T.as_type.as.OptionalStorage.impl.Some.type.760 = struct_value () [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.925: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.283) [symbolic] -// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.f42: %T.as_type.as.OptionalStorage.impl.None.type.925 = struct_value () [symbolic] +// CHECK:STDOUT: %T.f84392.1: %facet_type.bd0 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.c1cc3e.1: type = facet_access_type %T.f84392.1 [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.70f: = lookup_impl_witness %T.f84392.1, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.bf2: = lookup_impl_witness %T.f84392.1, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.dc4: %Destroy.type = facet_value %T.as_type.c1cc3e.1, (%SubobjectDestroy.lookup_impl_witness.70f, %DestroyImpl.lookup_impl_witness.bf2) [symbolic] +// CHECK:STDOUT: %MaybeUnformed.348: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.dc4) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.476: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.4a2: type = unbound_element_type %DefaultOptionalStorage.476, bool [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.ff3: type = unbound_element_type %DefaultOptionalStorage.476, %MaybeUnformed.348 [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.type.f27: type = fn_type @T.as_type.as.OptionalStorage.impl.Get, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Get.e40: %T.as_type.as.OptionalStorage.impl.Get.type.f27 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.type.18e: type = fn_type @T.as_type.as.OptionalStorage.impl.Has, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Has.463: %T.as_type.as.OptionalStorage.impl.Has.type.18e = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.type.292: type = fn_type @T.as_type.as.OptionalStorage.impl.Some, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.Some.ae9: %T.as_type.as.OptionalStorage.impl.Some.type.292 = struct_value () [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.type.b57: type = fn_type @T.as_type.as.OptionalStorage.impl.None, @T.as_type.as.OptionalStorage.impl(%T.f84392.1) [symbolic] +// CHECK:STDOUT: %T.as_type.as.OptionalStorage.impl.None.791: %T.as_type.as.OptionalStorage.impl.None.type.b57 = struct_value () [symbolic] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %.Self.500: %Iterate.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %CppRange.type: type = facet_type <@CppRange> [concrete] // CHECK:STDOUT: %.Self.e0b: %CppRange.type = symbolic_binding .Self [symbolic_self] @@ -5478,133 +4480,99 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.851: = lookup_impl_witness %impl.elem0.32d3, @CppUnsafeDeref [symbolic_self] // CHECK:STDOUT: %impl.elem0.10d: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.851, element0 [symbolic_self] // CHECK:STDOUT: %CppRange_where.type.d682d6.1: type = facet_type <@CppRange where %impl.elem0.10d impls @Copy> [concrete] -// CHECK:STDOUT: %T.f45530.2: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.f45530.3: %CppRange_where.type.d682d6.1 = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.d4a: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.5a8: %T.as_type.as.Iterate.impl.Next.type.d4a = struct_value () [symbolic] -// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.2, @CppRangeForIterate [symbolic] +// CHECK:STDOUT: %CppRangeForIterate.lookup_impl_witness.b581a8.2: = lookup_impl_witness %T.f45530.3, @CppRangeForIterate [symbolic] // CHECK:STDOUT: %impl.elem0.5f971c.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element0 [symbolic] // CHECK:STDOUT: %CppUnsafeDeref.lookup_impl_witness.87e543.2: = lookup_impl_witness %impl.elem0.5f971c.2, @CppUnsafeDeref [symbolic] // CHECK:STDOUT: %impl.elem0.493765.2: type = impl_witness_access %CppUnsafeDeref.lookup_impl_witness.87e543.2, element0 [symbolic] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.2) [symbolic] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.8fb: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%T.f45530.3) [symbolic] // CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.8a1: %T.as_type.as.Iterate.impl.NewCursor.type.8fb = struct_value () [symbolic] // CHECK:STDOUT: %impl.elem1.c2dc15.2: type = impl_witness_access %CppRangeForIterate.lookup_impl_witness.b581a8.2, element1 [symbolic] // CHECK:STDOUT: %tuple.type.1ba: type = tuple_type (%impl.elem0.5f971c.2, %impl.elem1.c2dc15.2) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.812: = lookup_impl_witness %tuple.type.1ba, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.facet.9cd: %Destroy.type = facet_value %tuple.type.1ba, (%Destroy.lookup_impl_witness.812) [symbolic] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.35816c.2: = lookup_impl_witness %impl.elem0.493765.2, @Destroy [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.dc9: = lookup_impl_witness %tuple.type.1ba, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.504: = lookup_impl_witness %tuple.type.1ba, @DestroyImpl [symbolic] +// CHECK:STDOUT: %Destroy.facet.9b6: %Destroy.type = facet_value %tuple.type.1ba, (%SubobjectDestroy.lookup_impl_witness.dc9, %DestroyImpl.lookup_impl_witness.504) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.b15da7.2: = lookup_impl_witness %impl.elem0.493765.2, @SubobjectDestroy [symbolic] +// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.4e7f44.2: = lookup_impl_witness %impl.elem0.493765.2, @DestroyImpl [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.167: = lookup_impl_witness %impl.elem0.493765.2, @Copy [symbolic] -// CHECK:STDOUT: %facet_value.f93: %facet_type.f48 = facet_value %impl.elem0.493765.2, (%Destroy.lookup_impl_witness.35816c.2, %Copy.lookup_impl_witness.167) [symbolic] +// CHECK:STDOUT: %facet_value.189: %facet_type.bd0 = facet_value %impl.elem0.493765.2, (%SubobjectDestroy.lookup_impl_witness.b15da7.2, %DestroyImpl.lookup_impl_witness.4e7f44.2, %Copy.lookup_impl_witness.167) [symbolic] // CHECK:STDOUT: %ValueType: type = class_type @ValueType [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.e09: type = pattern_type %ValueType [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc44 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc44 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %ValueType.SubobjectDestroy.type: type = fn_type @ValueType.SubobjectDestroy [concrete] -// CHECK:STDOUT: %ValueType.SubobjectDestroy: %ValueType.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.dc3: = custom_witness (%Destroy.WithSelf.Op.403171.2, %ValueType.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] +// CHECK:STDOUT: %ValueType.Op.type.9ce105.1: type = fn_type @ValueType.Op.1 [concrete] +// CHECK:STDOUT: %ValueType.Op.038ea9.1: %ValueType.Op.type.9ce105.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.656: = custom_witness (%ValueType.Op.038ea9.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.536: %SubobjectDestroy.type = facet_value %ValueType, (%custom_witness.656) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4c3: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.536) [concrete] // CHECK:STDOUT: %const.924: type = const_type %ValueType [concrete] // CHECK:STDOUT: %ptr.403: type = ptr_type %const.924 [concrete] // CHECK:STDOUT: %ptr.6ed: type = ptr_type %ValueType [concrete] -// CHECK:STDOUT: %ValueType.Op.type: type = fn_type @ValueType.Op [concrete] -// CHECK:STDOUT: %ValueType.Op: %ValueType.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1c5: = custom_witness (%ValueType.Op), @Copy [concrete] -// CHECK:STDOUT: %facet_value.36a: %facet_type.f48 = facet_value %ValueType, (%custom_witness.dc3, %custom_witness.1c5) [concrete] +// CHECK:STDOUT: %ValueType.Op.type.9ce105.2: type = fn_type @ValueType.Op.2 [concrete] +// CHECK:STDOUT: %ValueType.Op.038ea9.2: %ValueType.Op.type.9ce105.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.1c5: = custom_witness (%ValueType.Op.038ea9.2), @Copy [concrete] +// CHECK:STDOUT: %facet_value.282: %facet_type.bd0 = facet_value %ValueType, (%custom_witness.656, %DestroyImpl.impl_witness.4c3, %custom_witness.1c5) [concrete] // CHECK:STDOUT: %Iterate.lookup_impl_witness.1d8: = lookup_impl_witness %.Self.500, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem0.294: %facet_type.f48 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] -// CHECK:STDOUT: %Iterate_where.type.8b0: type = facet_type <@Iterate where %impl.elem0.294 = %facet_value.36a> [concrete] -// CHECK:STDOUT: %pattern_type.5f2: type = pattern_type %Iterate_where.type.8b0 [concrete] -// CHECK:STDOUT: %R.patt: %pattern_type.5f2 = symbolic_binding_pattern R, 0 [symbolic] -// CHECK:STDOUT: %R: %Iterate_where.type.8b0 = symbolic_binding R, 0 [symbolic] +// CHECK:STDOUT: %impl.elem0.4ce: %facet_type.bd0 = impl_witness_access %Iterate.lookup_impl_witness.1d8, element0 [symbolic_self] +// CHECK:STDOUT: %Iterate_where.type.97a: type = facet_type <@Iterate where %impl.elem0.4ce = %facet_value.282> [concrete] +// CHECK:STDOUT: %pattern_type.4c1: type = pattern_type %Iterate_where.type.97a [concrete] +// CHECK:STDOUT: %R.patt: %pattern_type.4c1 = symbolic_binding_pattern R, 0 [symbolic] +// CHECK:STDOUT: %R: %Iterate_where.type.97a = symbolic_binding R, 0 [symbolic] // CHECK:STDOUT: %R.as_type: type = facet_access_type %R [symbolic] -// CHECK:STDOUT: %pattern_type.611: type = pattern_type %R.as_type [symbolic] -// CHECK:STDOUT: %r.param_patt.e64: %pattern_type.611 = value_param_pattern [symbolic] -// CHECK:STDOUT: %r.patt.dcb: %pattern_type.611 = wrapper_binding_pattern r, %r.param_patt.e64 [symbolic] +// CHECK:STDOUT: %pattern_type.2ae: type = pattern_type %R.as_type [symbolic] +// CHECK:STDOUT: %r.param_patt.91c: %pattern_type.2ae = value_param_pattern [symbolic] +// CHECK:STDOUT: %r.patt.03a: %pattern_type.2ae = wrapper_binding_pattern r, %r.param_patt.91c [symbolic] // CHECK:STDOUT: %i.patt: %pattern_type.e09 = value_binding_pattern i [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.a99: = lookup_impl_witness %R, @Iterate [symbolic] -// CHECK:STDOUT: %Iterate.facet.c55: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.a99) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.fb9: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.c55) [symbolic] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.5d8: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.c55) [symbolic] -// CHECK:STDOUT: %.54f: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.fb9, %Iterate.facet.c55 [symbolic] -// CHECK:STDOUT: %impl.elem2.ff2: %.54f = impl_witness_access %Iterate.lookup_impl_witness.a99, element2 [symbolic] -// CHECK:STDOUT: %impl.elem1.751: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.a99, element1 [symbolic] -// CHECK:STDOUT: %as_type.733: type = facet_access_type %impl.elem1.751 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.541: = specific_impl_function %impl.elem2.ff2, @Iterate.WithSelf.NewCursor(%Iterate.facet.c55) [symbolic] -// CHECK:STDOUT: %.216: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.5d8, %Iterate.facet.c55 [symbolic] -// CHECK:STDOUT: %impl.elem3.5f1: %.216 = impl_witness_access %Iterate.lookup_impl_witness.a99, element3 [symbolic] -// CHECK:STDOUT: %DefaultOptionalStorage.8dd: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.36a) [concrete] -// CHECK:STDOUT: %OptionalStorage.impl_witness.120: = impl_witness imports.%OptionalStorage.impl_witness_table.460, @T.as_type.as.OptionalStorage.impl(%facet_value.36a) [concrete] -// CHECK:STDOUT: %OptionalStorage.facet.adc: %OptionalStorage.type = facet_value %ValueType, (%OptionalStorage.impl_witness.120) [concrete] -// CHECK:STDOUT: %Optional.006: type = class_type @Optional, @Optional(%OptionalStorage.facet.adc) [concrete] -// CHECK:STDOUT: %pattern_type.d0f: type = pattern_type %Optional.006 [concrete] -// CHECK:STDOUT: %specific_impl_fn.eaf: = specific_impl_function %impl.elem3.5f1, @Iterate.WithSelf.Next(%Iterate.facet.c55) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.06b: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.adc) [concrete] -// CHECK:STDOUT: %Optional.HasValue.994: %Optional.HasValue.type.06b = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.a9b: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.adc) [concrete] -// CHECK:STDOUT: %Optional.Get.740: %Optional.Get.type.a9b = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.facet.745: %Destroy.type = facet_value %ValueType, (%custom_witness.dc3) [concrete] -// CHECK:STDOUT: %MaybeUnformed.e45: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.745) [concrete] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.0da: = lookup_impl_witness %R, @Iterate [symbolic] +// CHECK:STDOUT: %Iterate.facet.394: %Iterate.type = facet_value %R.as_type, (%Iterate.lookup_impl_witness.0da) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.18c: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.394) [symbolic] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.f15: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.394) [symbolic] +// CHECK:STDOUT: %.89f4: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.18c, %Iterate.facet.394 [symbolic] +// CHECK:STDOUT: %impl.elem2.f19: %.89f4 = impl_witness_access %Iterate.lookup_impl_witness.0da, element2 [symbolic] +// CHECK:STDOUT: %impl.elem1.626: %Destroy.type = impl_witness_access %Iterate.lookup_impl_witness.0da, element1 [symbolic] +// CHECK:STDOUT: %as_type.71d: type = facet_access_type %impl.elem1.626 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.51c: = specific_impl_function %impl.elem2.f19, @Iterate.WithSelf.NewCursor(%Iterate.facet.394) [symbolic] +// CHECK:STDOUT: %.a1e: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.f15, %Iterate.facet.394 [symbolic] +// CHECK:STDOUT: %impl.elem3.88b: %.a1e = impl_witness_access %Iterate.lookup_impl_witness.0da, element3 [symbolic] +// CHECK:STDOUT: %DefaultOptionalStorage.dff: type = class_type @DefaultOptionalStorage, @DefaultOptionalStorage(%facet_value.282) [concrete] +// CHECK:STDOUT: %OptionalStorage.impl_witness.5d6: = impl_witness imports.%OptionalStorage.impl_witness_table.1c4, @T.as_type.as.OptionalStorage.impl(%facet_value.282) [concrete] +// CHECK:STDOUT: %OptionalStorage.facet.61a: %OptionalStorage.type = facet_value %ValueType, (%OptionalStorage.impl_witness.5d6) [concrete] +// CHECK:STDOUT: %Optional.81f: type = class_type @Optional, @Optional(%OptionalStorage.facet.61a) [concrete] +// CHECK:STDOUT: %specific_impl_fn.36a: = specific_impl_function %impl.elem3.88b, @Iterate.WithSelf.Next(%Iterate.facet.394) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.db4: type = fn_type @Optional.HasValue, @Optional(%OptionalStorage.facet.61a) [concrete] +// CHECK:STDOUT: %Optional.HasValue.97a: %Optional.HasValue.type.db4 = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.0d8: type = fn_type @Optional.Get, @Optional(%OptionalStorage.facet.61a) [concrete] +// CHECK:STDOUT: %Optional.Get.2ea: %Optional.Get.type.0d8 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.facet.cac: %Destroy.type = facet_value %ValueType, (%custom_witness.656, %DestroyImpl.impl_witness.4c3) [concrete] +// CHECK:STDOUT: %MaybeUnformed.4b9: type = class_type @MaybeUnformed, @MaybeUnformed(%Destroy.facet.cac) [concrete] // CHECK:STDOUT: %.8f3: type = maybe_unformed_type %ValueType [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.532: type = unbound_element_type %DefaultOptionalStorage.8dd, %MaybeUnformed.e45 [concrete] -// CHECK:STDOUT: %DefaultOptionalStorage.elem.e54: type = unbound_element_type %DefaultOptionalStorage.8dd, bool [concrete] -// CHECK:STDOUT: %struct_type.value.has_value.70e: type = struct_type {.value: %MaybeUnformed.e45, .has_value: bool} [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn.c92: = specific_function %Optional.HasValue.994, @Optional.HasValue(%OptionalStorage.facet.adc) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn.10e: = specific_function %Optional.Get.740, @Optional.Get(%OptionalStorage.facet.adc) [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.2ce: type = unbound_element_type %DefaultOptionalStorage.dff, %MaybeUnformed.4b9 [concrete] +// CHECK:STDOUT: %DefaultOptionalStorage.elem.6f9: type = unbound_element_type %DefaultOptionalStorage.dff, bool [concrete] +// CHECK:STDOUT: %struct_type.value.has_value.640: type = struct_type {.value: %MaybeUnformed.4b9, .has_value: bool} [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn.92c: = specific_function %Optional.HasValue.97a, @Optional.HasValue(%OptionalStorage.facet.61a) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn.132: = specific_function %Optional.Get.2ea, @Optional.Get(%OptionalStorage.facet.61a) [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.type: type = fn_type @operator_PlusEqual__carbon_thunk [concrete] // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk: %operator_PlusEqual__carbon_thunk.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.60e: type = pattern_type %.8f3 [concrete] -// CHECK:STDOUT: %self.param_patt.61b3: %pattern_type.60e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ecc: %pattern_type.60e = wrapper_binding_pattern self, %self.param_patt.61b3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc48_41.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc48_41.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a8c: type = pattern_type %MaybeUnformed.e45 [concrete] -// CHECK:STDOUT: %self.param_patt.6bf: %pattern_type.a8c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3f7: %pattern_type.a8c = wrapper_binding_pattern self, %self.param_patt.6bf [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc48_41.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc48_41.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc48_41.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc48_41.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc48_41.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc48_41.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.14e: type = pattern_type %struct_type.value.has_value.70e [concrete] -// CHECK:STDOUT: %self.param_patt.2f9: %pattern_type.14e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.204: %pattern_type.14e = wrapper_binding_pattern self, %self.param_patt.2f9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc48_41.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc48_41.4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.474: type = pattern_type %DefaultOptionalStorage.8dd [concrete] -// CHECK:STDOUT: %self.param_patt.8b7: %pattern_type.474 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.5be: %pattern_type.474 = wrapper_binding_pattern self, %self.param_patt.8b7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc48_41.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc48_41.5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8ac: %pattern_type.d0f = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.25e: %pattern_type.d0f = wrapper_binding_pattern self, %self.param_patt.8ac [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc48_41.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc48_41.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8: type = fn_type @Destroy.WithSelf.SelfDestruct.loc48_41.6 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.8: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.eb0: = lookup_impl_witness %impl.elem1.751, @Destroy [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.4ed: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1.751) [symbolic] -// CHECK:STDOUT: %.97d: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.4ed, %impl.elem1.751 [symbolic] -// CHECK:STDOUT: %impl.elem2.f7b: %.97d = impl_witness_access %Destroy.lookup_impl_witness.eb0, element2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.577: = specific_impl_function %impl.elem2.f7b, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1.751) [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc48_41.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc48_41.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.80c: %Destroy.type = facet_value bool, (%custom_witness.b80ef6.4, %DestroyImpl.impl_witness.778) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.555: %SubobjectDestroy.type = facet_value %MaybeUnformed.4b9, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e80: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.555) [concrete] +// CHECK:STDOUT: %Destroy.facet.eca: %Destroy.type = facet_value %MaybeUnformed.4b9, (%custom_witness.b80ef6.3, %DestroyImpl.impl_witness.e80) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc48_41.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.4ee: %SubobjectDestroy.type = facet_value %Optional.81f, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e67: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.4ee) [concrete] +// CHECK:STDOUT: %Destroy.facet.434: %Destroy.type = facet_value %Optional.81f, (%custom_witness.b80ef6.7, %DestroyImpl.impl_witness.e67) [concrete] // CHECK:STDOUT: %MutableAndConstRange: type = class_type @MutableAndConstRange [concrete] // CHECK:STDOUT: %pattern_type.fdb: type = pattern_type %MutableAndConstRange [concrete] // CHECK:STDOUT: %Iterator: type = class_type @Iterator.1 [concrete] @@ -5613,52 +4581,47 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %End.type: type = fn_type @End [concrete] // CHECK:STDOUT: %End: %End.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.660: = custom_witness (%Iterator, %Iterator, %Begin, %End), @CppRangeForIterate [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.9: type = fn_type @Destroy.WithSelf.Op.loc55 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.9: %Destroy.WithSelf.Op.type.ef016f.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9: type = fn_type @Destroy.WithSelf.SelfDestruct.loc55 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.9: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9 = struct_value () [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy.type: type = fn_type @Iterator.SubobjectDestroy [concrete] -// CHECK:STDOUT: %Iterator.SubobjectDestroy: %Iterator.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.809: = custom_witness (%Destroy.WithSelf.Op.403171.9, %Iterator.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.9), @Destroy [concrete] // CHECK:STDOUT: %Iterator.Op.type.c95ff6.1: type = fn_type @Iterator.Op.1 [concrete] // CHECK:STDOUT: %Iterator.Op.c90ac2.1: %Iterator.Op.type.c95ff6.1 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.d56: = custom_witness (%ValueType, %Iterator.Op.c90ac2.1), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %custom_witness.992: = custom_witness (%Iterator.Op.c90ac2.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.b40: %SubobjectDestroy.type = facet_value %Iterator, (%custom_witness.992) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.52a: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.b40) [concrete] // CHECK:STDOUT: %Iterator.Op.type.c95ff6.2: type = fn_type @Iterator.Op.2 [concrete] // CHECK:STDOUT: %Iterator.Op.c90ac2.2: %Iterator.Op.type.c95ff6.2 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.68a: = custom_witness (%Iterator.Op.c90ac2.2), @Inc [concrete] +// CHECK:STDOUT: %custom_witness.d56: = custom_witness (%ValueType, %Iterator.Op.c90ac2.2), @CppUnsafeDeref [concrete] +// CHECK:STDOUT: %Iterator.Op.type.c95ff6.3: type = fn_type @Iterator.Op.3 [concrete] +// CHECK:STDOUT: %Iterator.Op.c90ac2.3: %Iterator.Op.type.c95ff6.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.68a: = custom_witness (%Iterator.Op.c90ac2.3), @Inc [concrete] // CHECK:STDOUT: %Equal.type: type = fn_type @Equal [concrete] // CHECK:STDOUT: %Equal: %Equal.type = struct_value () [concrete] // CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [concrete] // CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.edd: = custom_witness (%Equal, %NotEqual), @EqWith, @EqWith(%Iterator) [concrete] -// CHECK:STDOUT: %facet_value.24f: %CppRange_where.type.d682d6.1 = facet_value %MutableAndConstRange, (%custom_witness.660, %custom_witness.809, %custom_witness.d56, %custom_witness.68a, %custom_witness.edd, %custom_witness.dc3, %custom_witness.1c5, %custom_witness.809) [concrete] +// CHECK:STDOUT: %facet_value.b85: %CppRange_where.type.d682d6.1 = facet_value %MutableAndConstRange, (%custom_witness.660, %custom_witness.992, %DestroyImpl.impl_witness.52a, %custom_witness.d56, %custom_witness.68a, %custom_witness.edd, %custom_witness.656, %DestroyImpl.impl_witness.4c3, %custom_witness.1c5, %custom_witness.992, %DestroyImpl.impl_witness.52a) [concrete] // CHECK:STDOUT: %tuple.type.de6: type = tuple_type (%Iterator, %Iterator) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8: type = fn_type @Destroy.WithSelf.SubobjectDestroy.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.10: type = fn_type @Destroy.WithSelf.Op.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.10: %Destroy.WithSelf.Op.type.ef016f.10 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10: type = fn_type @Destroy.WithSelf.SelfDestruct.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.10: %Destroy.WithSelf.SelfDestruct.type.fbceb5.10 = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f19d.8: = custom_witness (%Destroy.WithSelf.Op.403171.10, %Destroy.WithSelf.SubobjectDestroy.d01daf.8, %Destroy.WithSelf.SelfDestruct.db3fdb.10), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.c9a: %Destroy.type = facet_value %tuple.type.de6, (%custom_witness.f8f19d.8) [concrete] -// CHECK:STDOUT: %Iterate.impl_witness.198: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.24f) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.212: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.24f) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.160: %T.as_type.as.Iterate.impl.NewCursor.type.212 = struct_value () [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.6dd: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.24f) [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.ddf: %T.as_type.as.Iterate.impl.Next.type.6dd = struct_value () [concrete] -// CHECK:STDOUT: %facet_value.fc8: %Iterate_where.type.8b0 = facet_value %MutableAndConstRange, (%Iterate.impl_witness.198) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.8: type = fn_type @SubobjectDestroy.WithSelf.Op.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.8: %SubobjectDestroy.WithSelf.Op.type.6870fd.8 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.8: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.8), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.3e6: %SubobjectDestroy.type = facet_value %tuple.type.de6, (%custom_witness.b80ef6.8) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.2c4: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.3e6) [concrete] +// CHECK:STDOUT: %complete_type.95d: = complete_type_witness %tuple.type.de6 [concrete] +// CHECK:STDOUT: %Destroy.facet.a88: %Destroy.type = facet_value %tuple.type.de6, (%custom_witness.b80ef6.8, %DestroyImpl.impl_witness.2c4) [concrete] +// CHECK:STDOUT: %Iterate.impl_witness.3b4: = impl_witness imports.%Iterate.impl_witness_table.121, @T.as_type.as.Iterate.impl(%facet_value.b85) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.type.316: type = fn_type @T.as_type.as.Iterate.impl.NewCursor, @T.as_type.as.Iterate.impl(%facet_value.b85) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.8e0: %T.as_type.as.Iterate.impl.NewCursor.type.316 = struct_value () [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.type.1bd: type = fn_type @T.as_type.as.Iterate.impl.Next, @T.as_type.as.Iterate.impl(%facet_value.b85) [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.353: %T.as_type.as.Iterate.impl.Next.type.1bd = struct_value () [concrete] +// CHECK:STDOUT: %facet_value.62f: %Iterate_where.type.97a = facet_value %MutableAndConstRange, (%Iterate.impl_witness.3b4) [concrete] // CHECK:STDOUT: %r.param_patt.3a6: %pattern_type.fdb = value_param_pattern [concrete] // CHECK:STDOUT: %r.patt.403: %pattern_type.fdb = wrapper_binding_pattern r, %r.param_patt.3a6 [concrete] -// CHECK:STDOUT: %Iterate.facet.b30: %Iterate.type = facet_value %MutableAndConstRange, (%Iterate.impl_witness.198) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.b5a: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.b30) [concrete] -// CHECK:STDOUT: %Iterate.WithSelf.Next.type.3b0: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.b30) [concrete] -// CHECK:STDOUT: %.bc1: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.b5a, %Iterate.facet.b30 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.160, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.24f) [concrete] -// CHECK:STDOUT: %.698: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.3b0, %Iterate.facet.b30 [concrete] -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.ddf, @T.as_type.as.Iterate.impl.Next(%facet_value.24f) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.235: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.c9a) [concrete] -// CHECK:STDOUT: %.a38: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.235, %Destroy.facet.c9a [concrete] -// CHECK:STDOUT: %complete_type.95d: = complete_type_witness %tuple.type.de6 [concrete] +// CHECK:STDOUT: %Iterate.facet.748: %Iterate.type = facet_value %MutableAndConstRange, (%Iterate.impl_witness.3b4) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.24a: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.748) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.f69: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.748) [concrete] +// CHECK:STDOUT: %.227: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.24a, %Iterate.facet.748 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.NewCursor.specific_fn: = specific_function %T.as_type.as.Iterate.impl.NewCursor.8e0, @T.as_type.as.Iterate.impl.NewCursor(%facet_value.b85) [concrete] +// CHECK:STDOUT: %.343: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.f69, %Iterate.facet.748 [concrete] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.specific_fn: = specific_function %T.as_type.as.Iterate.impl.Next.353, @T.as_type.as.Iterate.impl.Next(%facet_value.b85) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.28f: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.a88) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -5666,22 +4629,24 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: .OverloadADL = %OverloadADL // CHECK:STDOUT: import Cpp//... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.02f: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.ade)] -// CHECK:STDOUT: %Core.import_ref.406: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.925) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.f42)] -// CHECK:STDOUT: %Core.import_ref.d4a: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.760) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.268)] -// CHECK:STDOUT: %Core.import_ref.9a4: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.d28) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.f29)] -// CHECK:STDOUT: %Core.import_ref.6e3: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.2f2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.884)] -// CHECK:STDOUT: %Core.import_ref.af7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %OptionalStorage.impl_witness_table.460 = impl_witness_table (%Core.import_ref.02f, %Core.import_ref.406, %Core.import_ref.d4a, %Core.import_ref.9a4, %Core.import_ref.6e3, %Core.import_ref.af7), @T.as_type.as.OptionalStorage.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.51c9: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.498] -// CHECK:STDOUT: %Core.import_ref.b03: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.390] +// CHECK:STDOUT: %Core.import_ref.481: type = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%DefaultOptionalStorage (constants.%DefaultOptionalStorage.476)] +// CHECK:STDOUT: %Core.import_ref.66d: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None.type (%T.as_type.as.OptionalStorage.impl.None.type.b57) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.None (constants.%T.as_type.as.OptionalStorage.impl.None.791)] +// CHECK:STDOUT: %Core.import_ref.32c: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some.type (%T.as_type.as.OptionalStorage.impl.Some.type.292) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Some (constants.%T.as_type.as.OptionalStorage.impl.Some.ae9)] +// CHECK:STDOUT: %Core.import_ref.801: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has.type (%T.as_type.as.OptionalStorage.impl.Has.type.18e) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Has (constants.%T.as_type.as.OptionalStorage.impl.Has.463)] +// CHECK:STDOUT: %Core.import_ref.eec: @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get.type (%T.as_type.as.OptionalStorage.impl.Get.type.f27) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.OptionalStorage.impl.%T.as_type.as.OptionalStorage.impl.Get (constants.%T.as_type.as.OptionalStorage.impl.Get.e40)] +// CHECK:STDOUT: %Core.import_ref.a6a = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %OptionalStorage.impl_witness_table.1c4 = impl_witness_table (%Core.import_ref.481, %Core.import_ref.66d, %Core.import_ref.32c, %Core.import_ref.801, %Core.import_ref.eec, %Core.import_ref.a6a), @T.as_type.as.OptionalStorage.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.e86: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.bce] +// CHECK:STDOUT: %Core.import_ref.9ce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, loaded [concrete = %field_decl.dbe] +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.c82: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.3ea) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.f2f)] // CHECK:STDOUT: %Core.import_ref.29e: @Optional.%Optional.Get.type (%Optional.Get.type.786) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.2d0)] -// CHECK:STDOUT: %Core.import_ref.eef: %facet_type.f48 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.f93)] -// CHECK:STDOUT: %Core.import_ref.fcc: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9cd)] +// CHECK:STDOUT: %Core.import_ref.724: %facet_type.bd0 = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%facet_value (constants.%facet_value.189)] +// CHECK:STDOUT: %Core.import_ref.dd9: %Destroy.type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%Destroy.facet (constants.%Destroy.facet.9b6)] // CHECK:STDOUT: %Core.import_ref.946: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor.type (%T.as_type.as.Iterate.impl.NewCursor.type.8fb) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.NewCursor (constants.%T.as_type.as.Iterate.impl.NewCursor.8a1)] // CHECK:STDOUT: %Core.import_ref.cfb: @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next.type (%T.as_type.as.Iterate.impl.Next.type.d4a) = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.Iterate.impl.%T.as_type.as.Iterate.impl.Next (constants.%T.as_type.as.Iterate.impl.Next.5a8)] -// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.eef, %Core.import_ref.fcc, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Iterate.impl_witness_table.121 = impl_witness_table (%Core.import_ref.724, %Core.import_ref.dd9, %Core.import_ref.946, %Core.import_ref.cfb), @T.as_type.as.Iterate.impl [concrete] // CHECK:STDOUT: %OverloadADL: = namespace [concrete] { // CHECK:STDOUT: .ValueType = %ValueType.decl // CHECK:STDOUT: .MutableAndConstRange = %MutableAndConstRange.decl @@ -5693,121 +4658,30 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.import_ref.b0d0 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.390: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.b49) = field_decl has_value, element1, %Core.import_ref.b0d0 in [concrete] {} -// CHECK:STDOUT: %Core.import_ref.ab7 = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %field_decl.498: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.229) = field_decl value, element0, %Core.import_ref.ab7 in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.b0d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.dbe: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.2 (%DefaultOptionalStorage.elem.4a2) = field_decl has_value, element1, %Core.import_ref.b0d in [concrete] {} +// CHECK:STDOUT: %Core.import_ref.45d = import_ref Core//prelude/types/optional, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %field_decl.bce: @DefaultOptionalStorage.%DefaultOptionalStorage.elem.1 (%DefaultOptionalStorage.elem.ff3) = field_decl value, element0, %Core.import_ref.45d in [concrete] {} // CHECK:STDOUT: %MutableAndConstRange.decl: type = class_decl @MutableAndConstRange [concrete = constants.%MutableAndConstRange] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc48_41.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.60e = ref_param_pattern [concrete = constants.%self.param_patt.61b3] -// CHECK:STDOUT: %self.patt: %pattern_type.60e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ecc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.8f3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.8f3 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc48_41.1 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.60e = ref_param_pattern [concrete = constants.%self.param_patt.61b3] -// CHECK:STDOUT: %self.patt: %pattern_type.60e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ecc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %.8f3 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %.8f3 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc48_41.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a8c = ref_param_pattern [concrete = constants.%self.param_patt.6bf] -// CHECK:STDOUT: %self.patt: %pattern_type.a8c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3f7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.e45 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.e45 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc48_41.2 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a8c = ref_param_pattern [concrete = constants.%self.param_patt.6bf] -// CHECK:STDOUT: %self.patt: %pattern_type.a8c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3f7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %MaybeUnformed.e45 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %MaybeUnformed.e45 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc48_41.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc48_41.3 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc48_41.4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.14e = ref_param_pattern [concrete = constants.%self.param_patt.2f9] -// CHECK:STDOUT: %self.patt: %pattern_type.14e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.204] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.70e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.70e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc48_41.4 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.14e = ref_param_pattern [concrete = constants.%self.param_patt.2f9] -// CHECK:STDOUT: %self.patt: %pattern_type.14e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.204] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.value.has_value.70e = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.value.has_value.70e = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc48_41.5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.474 = ref_param_pattern [concrete = constants.%self.param_patt.8b7] -// CHECK:STDOUT: %self.patt: %pattern_type.474 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5be] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.8dd = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.8dd = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc48_41.5 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.474 = ref_param_pattern [concrete = constants.%self.param_patt.8b7] -// CHECK:STDOUT: %self.patt: %pattern_type.474 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5be] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %DefaultOptionalStorage.8dd = ref_param call_param0 -// CHECK:STDOUT: %self: ref %DefaultOptionalStorage.8dd = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc48_41.6 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d0f = ref_param_pattern [concrete = constants.%self.param_patt.8ac] -// CHECK:STDOUT: %self.patt: %pattern_type.d0f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.25e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.006 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.006 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.8 = fn_decl @Destroy.WithSelf.Op.loc48_41.6 [concrete = constants.%Destroy.WithSelf.Op.403171.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d0f = ref_param_pattern [concrete = constants.%self.param_patt.8ac] -// CHECK:STDOUT: %self.patt: %pattern_type.d0f = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.25e] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Optional.006 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Optional.006 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @TestIterate(%R.loc44_17.2: %Iterate_where.type.8b0) { +// CHECK:STDOUT: generic fn @TestIterate(%R.loc44_17.2: %Iterate_where.type.97a) { // CHECK:STDOUT: // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc44_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.a99)] -// CHECK:STDOUT: %Iterate.facet.loc48_41.5: %Iterate.type = facet_value %R.as_type.loc44_83.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.c55)] -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc48_41.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.fb9)] -// CHECK:STDOUT: %.loc48_41.20: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc48_41.5 [symbolic = %.loc48_41.20 (constants.%.54f)] -// CHECK:STDOUT: %impl.elem2.loc48_41.3: @TestIterate.%.loc48_41.20 (%.54f) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc48_41.3 (constants.%impl.elem2.ff2)] -// CHECK:STDOUT: %specific_impl_fn.loc48_41.4: = specific_impl_function %impl.elem2.loc48_41.3, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc48_41.5) [symbolic = %specific_impl_fn.loc48_41.4 (constants.%specific_impl_fn.541)] +// CHECK:STDOUT: %Iterate.lookup_impl_witness: = lookup_impl_witness %R.loc44_17.1, @Iterate [symbolic = %Iterate.lookup_impl_witness (constants.%Iterate.lookup_impl_witness.0da)] +// CHECK:STDOUT: %Iterate.facet.loc48_41.5: %Iterate.type = facet_value %R.as_type.loc44_83.1, (%Iterate.lookup_impl_witness) [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.394)] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate.WithSelf(%Iterate.facet.loc48_41.5) [symbolic = %Iterate.WithSelf.NewCursor.type (constants.%Iterate.WithSelf.NewCursor.type.18c)] +// CHECK:STDOUT: %.loc48_41.26: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type, %Iterate.facet.loc48_41.5 [symbolic = %.loc48_41.26 (constants.%.89f4)] +// CHECK:STDOUT: %impl.elem2.loc48_41.2: @TestIterate.%.loc48_41.26 (%.89f4) = impl_witness_access %Iterate.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc48_41.2 (constants.%impl.elem2.f19)] +// CHECK:STDOUT: %specific_impl_fn.loc48_41.3: = specific_impl_function %impl.elem2.loc48_41.2, @Iterate.WithSelf.NewCursor(%Iterate.facet.loc48_41.5) [symbolic = %specific_impl_fn.loc48_41.3 (constants.%specific_impl_fn.51c)] +// CHECK:STDOUT: +// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc48_41.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.f15)] +// CHECK:STDOUT: %.loc48_41.27: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc48_41.5 [symbolic = %.loc48_41.27 (constants.%.a1e)] +// CHECK:STDOUT: %impl.elem3.loc48_41.2: @TestIterate.%.loc48_41.27 (%.a1e) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc48_41.2 (constants.%impl.elem3.88b)] +// CHECK:STDOUT: %specific_impl_fn.loc48_41.4: = specific_impl_function %impl.elem3.loc48_41.2, @Iterate.WithSelf.Next(%Iterate.facet.loc48_41.5) [symbolic = %specific_impl_fn.loc48_41.4 (constants.%specific_impl_fn.36a)] // CHECK:STDOUT: -// CHECK:STDOUT: %Iterate.WithSelf.Next.type: type = fn_type @Iterate.WithSelf.Next, @Iterate.WithSelf(%Iterate.facet.loc48_41.5) [symbolic = %Iterate.WithSelf.Next.type (constants.%Iterate.WithSelf.Next.type.5d8)] -// CHECK:STDOUT: %.loc48_41.21: type = fn_type_with_self_type %Iterate.WithSelf.Next.type, %Iterate.facet.loc48_41.5 [symbolic = %.loc48_41.21 (constants.%.216)] -// CHECK:STDOUT: %impl.elem3.loc48_41.2: @TestIterate.%.loc48_41.21 (%.216) = impl_witness_access %Iterate.lookup_impl_witness, element3 [symbolic = %impl.elem3.loc48_41.2 (constants.%impl.elem3.5f1)] -// CHECK:STDOUT: %specific_impl_fn.loc48_41.5: = specific_impl_function %impl.elem3.loc48_41.2, @Iterate.WithSelf.Next(%Iterate.facet.loc48_41.5) [symbolic = %specific_impl_fn.loc48_41.5 (constants.%specific_impl_fn.eaf)] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%impl.elem1) [symbolic = %Destroy.WithSelf.SelfDestruct.type (constants.%Destroy.WithSelf.SelfDestruct.type.4ed)] -// CHECK:STDOUT: %.loc48_41.22: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type, %impl.elem1 [symbolic = %.loc48_41.22 (constants.%.97d)] -// CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.eb0)] -// CHECK:STDOUT: %impl.elem2.loc48_41.4: @TestIterate.%.loc48_41.22 (%.97d) = impl_witness_access %Destroy.lookup_impl_witness, element2 [symbolic = %impl.elem2.loc48_41.4 (constants.%impl.elem2.f7b)] -// CHECK:STDOUT: %specific_impl_fn.loc48_41.6: = specific_impl_function %impl.elem2.loc48_41.4, @Destroy.WithSelf.SelfDestruct.1(%impl.elem1) [symbolic = %specific_impl_fn.loc48_41.6 (constants.%specific_impl_fn.577)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%r.param: @TestIterate.%R.as_type.loc44_83.1 (%R.as_type)) { // CHECK:STDOUT: !entry: @@ -5816,52 +4690,52 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.e09 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %r.ref: @TestIterate.%R.as_type.loc44_83.1 (%R.as_type) = name_ref r, %r -// CHECK:STDOUT: %impl.elem2.loc48_41.1: @TestIterate.%.loc48_41.20 (%.54f) = impl_witness_access constants.%Iterate.lookup_impl_witness.a99, element2 [symbolic = %impl.elem2.loc48_41.3 (constants.%impl.elem2.ff2)] +// CHECK:STDOUT: %impl.elem2.loc48_41.1: @TestIterate.%.loc48_41.26 (%.89f4) = impl_witness_access constants.%Iterate.lookup_impl_witness.0da, element2 [symbolic = %impl.elem2.loc48_41.2 (constants.%impl.elem2.f19)] // CHECK:STDOUT: %bound_method.loc48_41.1: = bound_method %r.ref, %impl.elem2.loc48_41.1 -// CHECK:STDOUT: %Iterate.facet.loc48_41.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.a99) [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.c55)] -// CHECK:STDOUT: %.loc48_41.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc48_41.1 [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.c55)] -// CHECK:STDOUT: %Iterate.facet.loc48_41.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.a99) [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.c55)] -// CHECK:STDOUT: %.loc48_41.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc48_41.2 [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.c55)] -// CHECK:STDOUT: %specific_impl_fn.loc48_41.1: = specific_impl_function %impl.elem2.loc48_41.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.c55) [symbolic = %specific_impl_fn.loc48_41.4 (constants.%specific_impl_fn.541)] +// CHECK:STDOUT: %Iterate.facet.loc48_41.1: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.0da) [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.394)] +// CHECK:STDOUT: %.loc48_41.1: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc48_41.1 [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.394)] +// CHECK:STDOUT: %Iterate.facet.loc48_41.2: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.0da) [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.394)] +// CHECK:STDOUT: %.loc48_41.2: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc48_41.2 [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.394)] +// CHECK:STDOUT: %specific_impl_fn.loc48_41.1: = specific_impl_function %impl.elem2.loc48_41.1, @Iterate.WithSelf.NewCursor(constants.%Iterate.facet.394) [symbolic = %specific_impl_fn.loc48_41.3 (constants.%specific_impl_fn.51c)] // CHECK:STDOUT: %bound_method.loc48_41.2: = bound_method %r.ref, %specific_impl_fn.loc48_41.1 -// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.733) = var_storage invalid -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.733) to %var = call %bound_method.loc48_41.2(%r.ref) +// CHECK:STDOUT: %var: ref @TestIterate.%as_type (%as_type.71d) = var_storage invalid +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.call: init @TestIterate.%as_type (%as_type.71d) to %var = call %bound_method.loc48_41.2(%r.ref) // CHECK:STDOUT: assign %var, %Iterate.WithSelf.NewCursor.call // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3.loc48_41.1: @TestIterate.%.loc48_41.21 (%.216) = impl_witness_access constants.%Iterate.lookup_impl_witness.a99, element3 [symbolic = %impl.elem3.loc48_41.2 (constants.%impl.elem3.5f1)] +// CHECK:STDOUT: %impl.elem3.loc48_41.1: @TestIterate.%.loc48_41.27 (%.a1e) = impl_witness_access constants.%Iterate.lookup_impl_witness.0da, element3 [symbolic = %impl.elem3.loc48_41.2 (constants.%impl.elem3.88b)] // CHECK:STDOUT: %bound_method.loc48_41.3: = bound_method %r.ref, %impl.elem3.loc48_41.1 -// CHECK:STDOUT: %Iterate.facet.loc48_41.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.a99) [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.c55)] -// CHECK:STDOUT: %.loc48_41.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc48_41.3 [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.c55)] -// CHECK:STDOUT: %Iterate.facet.loc48_41.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.a99) [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.c55)] -// CHECK:STDOUT: %.loc48_41.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc48_41.4 [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.c55)] -// CHECK:STDOUT: %.loc48_41.5: %Destroy.type = converted constants.%as_type.733, constants.%impl.elem1.751 [symbolic = %impl.elem1 (constants.%impl.elem1.751)] -// CHECK:STDOUT: %.loc48_41.6: %Destroy.type = converted constants.%as_type.733, constants.%impl.elem1.751 [symbolic = %impl.elem1 (constants.%impl.elem1.751)] -// CHECK:STDOUT: %specific_impl_fn.loc48_41.2: = specific_impl_function %impl.elem3.loc48_41.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.c55) [symbolic = %specific_impl_fn.loc48_41.5 (constants.%specific_impl_fn.eaf)] +// CHECK:STDOUT: %Iterate.facet.loc48_41.3: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.0da) [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.394)] +// CHECK:STDOUT: %.loc48_41.3: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc48_41.3 [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.394)] +// CHECK:STDOUT: %Iterate.facet.loc48_41.4: %Iterate.type = facet_value constants.%R.as_type, (constants.%Iterate.lookup_impl_witness.0da) [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.394)] +// CHECK:STDOUT: %.loc48_41.4: %Iterate.type = converted constants.%R.as_type, %Iterate.facet.loc48_41.4 [symbolic = %Iterate.facet.loc48_41.5 (constants.%Iterate.facet.394)] +// CHECK:STDOUT: %.loc48_41.5: %Destroy.type = converted constants.%as_type.71d, constants.%impl.elem1.626 [symbolic = %impl.elem1 (constants.%impl.elem1.626)] +// CHECK:STDOUT: %.loc48_41.6: %Destroy.type = converted constants.%as_type.71d, constants.%impl.elem1.626 [symbolic = %impl.elem1 (constants.%impl.elem1.626)] +// CHECK:STDOUT: %specific_impl_fn.loc48_41.2: = specific_impl_function %impl.elem3.loc48_41.1, @Iterate.WithSelf.Next(constants.%Iterate.facet.394) [symbolic = %specific_impl_fn.loc48_41.4 (constants.%specific_impl_fn.36a)] // CHECK:STDOUT: %bound_method.loc48_41.4: = bound_method %r.ref, %specific_impl_fn.loc48_41.2 -// CHECK:STDOUT: %.loc48_41.7: ref %Optional.006 = temporary_storage -// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.006 to %.loc48_41.7 = call %bound_method.loc48_41.4(%r.ref, %var) -// CHECK:STDOUT: %.loc48_41.8: ref %Optional.006 = temporary %.loc48_41.7, %Iterate.WithSelf.Next.call -// CHECK:STDOUT: %.loc48_41.9: %Optional.HasValue.type.06b = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.adc) [concrete = constants.%Optional.HasValue.994] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.06b = name_ref HasValue, %.loc48_41.9 [concrete = constants.%Optional.HasValue.994] +// CHECK:STDOUT: %.loc48_41.7: ref %Optional.81f = temporary_storage +// CHECK:STDOUT: %Iterate.WithSelf.Next.call: init %Optional.81f to %.loc48_41.7 = call %bound_method.loc48_41.4(%r.ref, %var) +// CHECK:STDOUT: %.loc48_41.8: ref %Optional.81f = temporary %.loc48_41.7, %Iterate.WithSelf.Next.call +// CHECK:STDOUT: %.loc48_41.9: %Optional.HasValue.type.db4 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.61a) [concrete = constants.%Optional.HasValue.97a] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.db4 = name_ref HasValue, %.loc48_41.9 [concrete = constants.%Optional.HasValue.97a] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc48_41.8, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.adc) [concrete = constants.%Optional.HasValue.specific_fn.c92] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.61a) [concrete = constants.%Optional.HasValue.specific_fn.92c] // CHECK:STDOUT: %bound_method.loc48_41.5: = bound_method %.loc48_41.8, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc48_41.10: %Optional.006 = acquire_value %.loc48_41.8 +// CHECK:STDOUT: %.loc48_41.10: %Optional.81f = acquire_value %.loc48_41.8 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc48_41.5(%.loc48_41.10) // CHECK:STDOUT: %.loc48_41.11: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc48_41.12: bool = converted %Optional.HasValue.call, %.loc48_41.11 // CHECK:STDOUT: if %.loc48_41.12 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc48_41.13: %Optional.Get.type.a9b = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.adc) [concrete = constants.%Optional.Get.740] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.a9b = name_ref Get, %.loc48_41.13 [concrete = constants.%Optional.Get.740] +// CHECK:STDOUT: %.loc48_41.13: %Optional.Get.type.0d8 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.61a) [concrete = constants.%Optional.Get.2ea] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.0d8 = name_ref Get, %.loc48_41.13 [concrete = constants.%Optional.Get.2ea] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc48_41.8, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.adc) [concrete = constants.%Optional.Get.specific_fn.10e] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.61a) [concrete = constants.%Optional.Get.specific_fn.132] // CHECK:STDOUT: %bound_method.loc48_41.6: = bound_method %.loc48_41.8, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc48_41.14: ref %ValueType = temporary_storage -// CHECK:STDOUT: %.loc48_41.15: %Optional.006 = acquire_value %.loc48_41.8 +// CHECK:STDOUT: %.loc48_41.15: %Optional.81f = acquire_value %.loc48_41.8 // CHECK:STDOUT: %Optional.Get.call: init %ValueType to %.loc48_41.14 = call %bound_method.loc48_41.6(%.loc48_41.15) // CHECK:STDOUT: %.loc48_41.16: ref %ValueType = temporary %.loc48_41.14, %Optional.Get.call // CHECK:STDOUT: %.loc48_41.17: %ValueType = acquire_value %.loc48_41.16 @@ -5878,114 +4752,85 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc49_9.1: %ptr.403 = as_compatible %addr.loc49 // CHECK:STDOUT: %.loc49_9.2: %ptr.403 = converted %addr.loc49, %.loc49_9.1 // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.call: ref %ValueType = call imports.%operator_PlusEqual__carbon_thunk.decl(%sum.ref, %.loc49_9.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc48_41.1: = bound_method %.loc48_41.16, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc48_41.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc48_41.1(%.loc48_41.16) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc48_41.2: = bound_method %.loc48_41.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc48_41.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc48_41.2(%.loc48_41.8) +// CHECK:STDOUT: %Destroy.facet.loc48_41.1: %Destroy.type = facet_value constants.%ValueType, (constants.%custom_witness.656, constants.%DestroyImpl.impl_witness.4c3) [concrete = constants.%Destroy.facet.cac] +// CHECK:STDOUT: %.loc48_41.18: %Destroy.type = converted constants.%ValueType, %Destroy.facet.loc48_41.1 [concrete = constants.%Destroy.facet.cac] +// CHECK:STDOUT: %Destroy.facet.loc48_41.2: %Destroy.type = facet_value constants.%ValueType, (constants.%custom_witness.656, constants.%DestroyImpl.impl_witness.4c3) [concrete = constants.%Destroy.facet.cac] +// CHECK:STDOUT: %.loc48_41.19: %Destroy.type = converted constants.%ValueType, %Destroy.facet.loc48_41.2 [concrete = constants.%Destroy.facet.cac] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc48_41.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc48_41.16) +// CHECK:STDOUT: %Destroy.facet.loc48_41.3: %Destroy.type = facet_value constants.%Optional.81f, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.e67) [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %.loc48_41.20: %Destroy.type = converted constants.%Optional.81f, %Destroy.facet.loc48_41.3 [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %Destroy.facet.loc48_41.4: %Destroy.type = facet_value constants.%Optional.81f, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.e67) [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %.loc48_41.21: %Destroy.type = converted constants.%Optional.81f, %Destroy.facet.loc48_41.4 [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc48_41.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc48_41.8) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc48_41.3: = bound_method %.loc48_41.8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc48_41.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc48_41.3(%.loc48_41.8) -// CHECK:STDOUT: %impl.elem2.loc48_41.2: @TestIterate.%.loc48_41.22 (%.97d) = impl_witness_access constants.%Destroy.lookup_impl_witness.eb0, element2 [symbolic = %impl.elem2.loc48_41.4 (constants.%impl.elem2.f7b)] -// CHECK:STDOUT: %bound_method.loc48_41.7: = bound_method %var, %impl.elem2.loc48_41.2 -// CHECK:STDOUT: %.loc48_41.18: %Destroy.type = converted constants.%as_type.733, constants.%impl.elem1.751 [symbolic = %impl.elem1 (constants.%impl.elem1.751)] -// CHECK:STDOUT: %.loc48_41.19: %Destroy.type = converted constants.%as_type.733, constants.%impl.elem1.751 [symbolic = %impl.elem1 (constants.%impl.elem1.751)] -// CHECK:STDOUT: %specific_impl_fn.loc48_41.3: = specific_impl_function %impl.elem2.loc48_41.2, @Destroy.WithSelf.SelfDestruct.1(constants.%impl.elem1.751) [symbolic = %specific_impl_fn.loc48_41.6 (constants.%specific_impl_fn.577)] -// CHECK:STDOUT: %bound_method.loc48_41.8: = bound_method %var, %specific_impl_fn.loc48_41.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc48_41.4: init %empty_tuple.type = call %bound_method.loc48_41.8(%var) +// CHECK:STDOUT: %Destroy.facet.loc48_41.5: %Destroy.type = facet_value constants.%Optional.81f, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.e67) [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %.loc48_41.22: %Destroy.type = converted constants.%Optional.81f, %Destroy.facet.loc48_41.5 [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %Destroy.facet.loc48_41.6: %Destroy.type = facet_value constants.%Optional.81f, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.e67) [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %.loc48_41.23: %Destroy.type = converted constants.%Optional.81f, %Destroy.facet.loc48_41.6 [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc48_41.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc48_41.8) +// CHECK:STDOUT: %.loc48_41.24: %Destroy.type = converted constants.%as_type.71d, constants.%impl.elem1.626 [symbolic = %impl.elem1 (constants.%impl.elem1.626)] +// CHECK:STDOUT: %.loc48_41.25: %Destroy.type = converted constants.%as_type.71d, constants.%impl.elem1.626 [symbolic = %impl.elem1 (constants.%impl.elem1.626)] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc48_41.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc48_41.1(%self.param: ref %.8f3) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc48_41.1(%self.param: ref %.8f3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc48_41.1(%self.param: ref %.8f3) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc48_41.2(%self.param: ref %MaybeUnformed.4b9) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc48_41.1(%self.param: ref %.8f3) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc48_41.3(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc48_41.2(%self.param: ref %MaybeUnformed.e45) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc48_41.2(%self.param: ref %MaybeUnformed.e45) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc48_41.2(%self.param: ref %MaybeUnformed.e45) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc48_41.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc48_41.3(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc48_41.3(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc48_41.4(%self.param: ref %struct_type.value.has_value.70e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc48_41.4(%self.param: ref %struct_type.value.has_value.640) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc48_41.1: ref bool = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc48_41.1: = bound_method %.loc48_41.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc48_41.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc48_41.1(%.loc48_41.1) -// CHECK:STDOUT: %.loc48_41.2: ref %MaybeUnformed.e45 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc48_41.2: = bound_method %.loc48_41.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc48_41.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc48_41.2(%.loc48_41.2) +// CHECK:STDOUT: %Destroy.facet.loc48_41.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc48_41.2: %Destroy.type = converted bool, %Destroy.facet.loc48_41.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc48_41.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc48_41.3: %Destroy.type = converted bool, %Destroy.facet.loc48_41.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc48_41.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc48_41.1) +// CHECK:STDOUT: %.loc48_41.4: ref %MaybeUnformed.4b9 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc48_41.3: %Destroy.type = facet_value constants.%MaybeUnformed.4b9, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.e80) [concrete = constants.%Destroy.facet.eca] +// CHECK:STDOUT: %.loc48_41.5: %Destroy.type = converted constants.%MaybeUnformed.4b9, %Destroy.facet.loc48_41.3 [concrete = constants.%Destroy.facet.eca] +// CHECK:STDOUT: %Destroy.facet.loc48_41.4: %Destroy.type = facet_value constants.%MaybeUnformed.4b9, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.e80) [concrete = constants.%Destroy.facet.eca] +// CHECK:STDOUT: %.loc48_41.6: %Destroy.type = converted constants.%MaybeUnformed.4b9, %Destroy.facet.loc48_41.4 [concrete = constants.%Destroy.facet.eca] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc48_41.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc48_41.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc48_41.4(%self.param: ref %struct_type.value.has_value.70e) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc48_41.4(%self.param: ref %struct_type.value.has_value.70e) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc48_41.5(%self.param: ref %DefaultOptionalStorage.dff) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc48_41.5(%self.param: ref %DefaultOptionalStorage.8dd) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.e54 = name_ref has_value, imports.%Core.import_ref.b03 [concrete = imports.%field_decl.390] +// CHECK:STDOUT: %has_value.ref: %DefaultOptionalStorage.elem.6f9 = name_ref has_value, imports.%Core.import_ref.9ce [concrete = imports.%field_decl.dbe] // CHECK:STDOUT: %.loc48_41.1: ref bool = class_element_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc48_41.1: = bound_method %.loc48_41.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc48_41.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc48_41.1(%.loc48_41.1) -// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.532 = name_ref value, imports.%Core.import_ref.51c9 [concrete = imports.%field_decl.498] -// CHECK:STDOUT: %.loc48_41.2: ref %MaybeUnformed.e45 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc48_41.2: = bound_method %.loc48_41.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc48_41.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc48_41.2(%.loc48_41.2) +// CHECK:STDOUT: %Destroy.facet.loc48_41.1: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc48_41.2: %Destroy.type = converted bool, %Destroy.facet.loc48_41.1 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %Destroy.facet.loc48_41.2: %Destroy.type = facet_value bool, (constants.%custom_witness.b80ef6.4, constants.%DestroyImpl.impl_witness.778) [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: %.loc48_41.3: %Destroy.type = converted bool, %Destroy.facet.loc48_41.2 [concrete = constants.%Destroy.facet.80c] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc48_41.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc48_41.1) +// CHECK:STDOUT: %value.ref: %DefaultOptionalStorage.elem.2ce = name_ref value, imports.%Core.import_ref.e86 [concrete = imports.%field_decl.bce] +// CHECK:STDOUT: %.loc48_41.4: ref %MaybeUnformed.4b9 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc48_41.3: %Destroy.type = facet_value constants.%MaybeUnformed.4b9, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.e80) [concrete = constants.%Destroy.facet.eca] +// CHECK:STDOUT: %.loc48_41.5: %Destroy.type = converted constants.%MaybeUnformed.4b9, %Destroy.facet.loc48_41.3 [concrete = constants.%Destroy.facet.eca] +// CHECK:STDOUT: %Destroy.facet.loc48_41.4: %Destroy.type = facet_value constants.%MaybeUnformed.4b9, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.e80) [concrete = constants.%Destroy.facet.eca] +// CHECK:STDOUT: %.loc48_41.6: %Destroy.type = converted constants.%MaybeUnformed.4b9, %Destroy.facet.loc48_41.4 [concrete = constants.%Destroy.facet.eca] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc48_41.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc48_41.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc48_41.5(%self.param: ref %DefaultOptionalStorage.8dd) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc48_41.5(%self.param: ref %DefaultOptionalStorage.8dd) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc48_41.6(%self.param: ref %Optional.006) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc48_41.6(%self.param: ref %Optional.006) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc48_41.6(%self.param: ref %Optional.006) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc48_41.6(%self.param: ref %Optional.81f) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TestRangeFor(%mc.param: ref %MutableAndConstRange) { // CHECK:STDOUT: !entry: @@ -5994,13 +4839,13 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %i.patt: %pattern_type.e09 = value_binding_pattern i [concrete = constants.%i.patt] // CHECK:STDOUT: } // CHECK:STDOUT: %mc.ref: ref %MutableAndConstRange = name_ref mc, %mc -// CHECK:STDOUT: %impl.elem2: %.bc1 = impl_witness_access constants.%Iterate.impl_witness.198, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.160] +// CHECK:STDOUT: %impl.elem2: %.227 = impl_witness_access constants.%Iterate.impl_witness.3b4, element2 [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.8e0] // CHECK:STDOUT: %bound_method.loc62_42.1: = bound_method %mc.ref, %impl.elem2 -// CHECK:STDOUT: %facet_value.loc62_42.1: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.660, constants.%custom_witness.809, constants.%custom_witness.d56, constants.%custom_witness.68a, constants.%custom_witness.edd, constants.%custom_witness.dc3, constants.%custom_witness.1c5, constants.%custom_witness.809) [concrete = constants.%facet_value.24f] -// CHECK:STDOUT: %.loc62_42.1: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc62_42.1 [concrete = constants.%facet_value.24f] -// CHECK:STDOUT: %facet_value.loc62_42.2: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.660, constants.%custom_witness.809, constants.%custom_witness.d56, constants.%custom_witness.68a, constants.%custom_witness.edd, constants.%custom_witness.dc3, constants.%custom_witness.1c5, constants.%custom_witness.809) [concrete = constants.%facet_value.24f] -// CHECK:STDOUT: %.loc62_42.2: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc62_42.2 [concrete = constants.%facet_value.24f] -// CHECK:STDOUT: %specific_fn.loc62_42.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.24f) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] +// CHECK:STDOUT: %facet_value.loc62_42.1: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.660, constants.%custom_witness.992, constants.%DestroyImpl.impl_witness.52a, constants.%custom_witness.d56, constants.%custom_witness.68a, constants.%custom_witness.edd, constants.%custom_witness.656, constants.%DestroyImpl.impl_witness.4c3, constants.%custom_witness.1c5, constants.%custom_witness.992, constants.%DestroyImpl.impl_witness.52a) [concrete = constants.%facet_value.b85] +// CHECK:STDOUT: %.loc62_42.1: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc62_42.1 [concrete = constants.%facet_value.b85] +// CHECK:STDOUT: %facet_value.loc62_42.2: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.660, constants.%custom_witness.992, constants.%DestroyImpl.impl_witness.52a, constants.%custom_witness.d56, constants.%custom_witness.68a, constants.%custom_witness.edd, constants.%custom_witness.656, constants.%DestroyImpl.impl_witness.4c3, constants.%custom_witness.1c5, constants.%custom_witness.992, constants.%DestroyImpl.impl_witness.52a) [concrete = constants.%facet_value.b85] +// CHECK:STDOUT: %.loc62_42.2: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc62_42.2 [concrete = constants.%facet_value.b85] +// CHECK:STDOUT: %specific_fn.loc62_42.1: = specific_function %impl.elem2, @T.as_type.as.Iterate.impl.NewCursor(constants.%facet_value.b85) [concrete = constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc62_42.2: = bound_method %mc.ref, %specific_fn.loc62_42.1 // CHECK:STDOUT: %var: ref %tuple.type.de6 = var_storage invalid // CHECK:STDOUT: %.loc62_40.1: %MutableAndConstRange = acquire_value %mc.ref @@ -6009,37 +4854,37 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.next: -// CHECK:STDOUT: %impl.elem3: %.698 = impl_witness_access constants.%Iterate.impl_witness.198, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.ddf] +// CHECK:STDOUT: %impl.elem3: %.343 = impl_witness_access constants.%Iterate.impl_witness.3b4, element3 [concrete = constants.%T.as_type.as.Iterate.impl.Next.353] // CHECK:STDOUT: %bound_method.loc62_42.3: = bound_method %mc.ref, %impl.elem3 -// CHECK:STDOUT: %facet_value.loc62_42.3: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.660, constants.%custom_witness.809, constants.%custom_witness.d56, constants.%custom_witness.68a, constants.%custom_witness.edd, constants.%custom_witness.dc3, constants.%custom_witness.1c5, constants.%custom_witness.809) [concrete = constants.%facet_value.24f] -// CHECK:STDOUT: %.loc62_42.3: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc62_42.3 [concrete = constants.%facet_value.24f] -// CHECK:STDOUT: %facet_value.loc62_42.4: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.660, constants.%custom_witness.809, constants.%custom_witness.d56, constants.%custom_witness.68a, constants.%custom_witness.edd, constants.%custom_witness.dc3, constants.%custom_witness.1c5, constants.%custom_witness.809) [concrete = constants.%facet_value.24f] -// CHECK:STDOUT: %.loc62_42.4: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc62_42.4 [concrete = constants.%facet_value.24f] -// CHECK:STDOUT: %specific_fn.loc62_42.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.24f) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] +// CHECK:STDOUT: %facet_value.loc62_42.3: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.660, constants.%custom_witness.992, constants.%DestroyImpl.impl_witness.52a, constants.%custom_witness.d56, constants.%custom_witness.68a, constants.%custom_witness.edd, constants.%custom_witness.656, constants.%DestroyImpl.impl_witness.4c3, constants.%custom_witness.1c5, constants.%custom_witness.992, constants.%DestroyImpl.impl_witness.52a) [concrete = constants.%facet_value.b85] +// CHECK:STDOUT: %.loc62_42.3: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc62_42.3 [concrete = constants.%facet_value.b85] +// CHECK:STDOUT: %facet_value.loc62_42.4: %CppRange_where.type.d682d6.1 = facet_value constants.%MutableAndConstRange, (constants.%custom_witness.660, constants.%custom_witness.992, constants.%DestroyImpl.impl_witness.52a, constants.%custom_witness.d56, constants.%custom_witness.68a, constants.%custom_witness.edd, constants.%custom_witness.656, constants.%DestroyImpl.impl_witness.4c3, constants.%custom_witness.1c5, constants.%custom_witness.992, constants.%DestroyImpl.impl_witness.52a) [concrete = constants.%facet_value.b85] +// CHECK:STDOUT: %.loc62_42.4: %CppRange_where.type.d682d6.1 = converted constants.%MutableAndConstRange, %facet_value.loc62_42.4 [concrete = constants.%facet_value.b85] +// CHECK:STDOUT: %specific_fn.loc62_42.2: = specific_function %impl.elem3, @T.as_type.as.Iterate.impl.Next(constants.%facet_value.b85) [concrete = constants.%T.as_type.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc62_42.4: = bound_method %mc.ref, %specific_fn.loc62_42.2 -// CHECK:STDOUT: %.loc62_42.5: ref %Optional.006 = temporary_storage +// CHECK:STDOUT: %.loc62_42.5: ref %Optional.81f = temporary_storage // CHECK:STDOUT: %.loc62_40.2: %MutableAndConstRange = acquire_value %mc.ref -// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.006 to %.loc62_42.5 = call %bound_method.loc62_42.4(%.loc62_40.2, %var) -// CHECK:STDOUT: %.loc62_42.6: ref %Optional.006 = temporary %.loc62_42.5, %T.as_type.as.Iterate.impl.Next.call -// CHECK:STDOUT: %.loc62_42.7: %Optional.HasValue.type.06b = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.adc) [concrete = constants.%Optional.HasValue.994] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.06b = name_ref HasValue, %.loc62_42.7 [concrete = constants.%Optional.HasValue.994] +// CHECK:STDOUT: %T.as_type.as.Iterate.impl.Next.call: init %Optional.81f to %.loc62_42.5 = call %bound_method.loc62_42.4(%.loc62_40.2, %var) +// CHECK:STDOUT: %.loc62_42.6: ref %Optional.81f = temporary %.loc62_42.5, %T.as_type.as.Iterate.impl.Next.call +// CHECK:STDOUT: %.loc62_42.7: %Optional.HasValue.type.db4 = specific_constant imports.%Core.import_ref.c82, @Optional(constants.%OptionalStorage.facet.61a) [concrete = constants.%Optional.HasValue.97a] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.db4 = name_ref HasValue, %.loc62_42.7 [concrete = constants.%Optional.HasValue.97a] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc62_42.6, %HasValue.ref -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.adc) [concrete = constants.%Optional.HasValue.specific_fn.c92] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%OptionalStorage.facet.61a) [concrete = constants.%Optional.HasValue.specific_fn.92c] // CHECK:STDOUT: %bound_method.loc62_42.5: = bound_method %.loc62_42.6, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc62_42.8: %Optional.006 = acquire_value %.loc62_42.6 +// CHECK:STDOUT: %.loc62_42.8: %Optional.81f = acquire_value %.loc62_42.6 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc62_42.5(%.loc62_42.8) // CHECK:STDOUT: %.loc62_42.9: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc62_42.10: bool = converted %Optional.HasValue.call, %.loc62_42.9 // CHECK:STDOUT: if %.loc62_42.10 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc62_42.11: %Optional.Get.type.a9b = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.adc) [concrete = constants.%Optional.Get.740] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.a9b = name_ref Get, %.loc62_42.11 [concrete = constants.%Optional.Get.740] +// CHECK:STDOUT: %.loc62_42.11: %Optional.Get.type.0d8 = specific_constant imports.%Core.import_ref.29e, @Optional(constants.%OptionalStorage.facet.61a) [concrete = constants.%Optional.Get.2ea] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.0d8 = name_ref Get, %.loc62_42.11 [concrete = constants.%Optional.Get.2ea] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc62_42.6, %Get.ref -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.adc) [concrete = constants.%Optional.Get.specific_fn.10e] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%OptionalStorage.facet.61a) [concrete = constants.%Optional.Get.specific_fn.132] // CHECK:STDOUT: %bound_method.loc62_42.6: = bound_method %.loc62_42.6, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc62_42.12: ref %ValueType = temporary_storage -// CHECK:STDOUT: %.loc62_42.13: %Optional.006 = acquire_value %.loc62_42.6 +// CHECK:STDOUT: %.loc62_42.13: %Optional.81f = acquire_value %.loc62_42.6 // CHECK:STDOUT: %Optional.Get.call: init %ValueType to %.loc62_42.12 = call %bound_method.loc62_42.6(%.loc62_42.13) // CHECK:STDOUT: %.loc62_42.14: ref %ValueType = temporary %.loc62_42.12, %Optional.Get.call // CHECK:STDOUT: %.loc62_42.15: %ValueType = acquire_value %.loc62_42.14 @@ -6056,17 +4901,33 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %.loc63_9.1: %ptr.403 = as_compatible %addr.loc63 // CHECK:STDOUT: %.loc63_9.2: %ptr.403 = converted %addr.loc63, %.loc63_9.1 // CHECK:STDOUT: %operator_PlusEqual__carbon_thunk.call: ref %ValueType = call imports.%operator_PlusEqual__carbon_thunk.decl(%sum.ref, %.loc63_9.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc62_42.1: = bound_method %.loc62_42.14, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc62_42.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc62_42.1(%.loc62_42.14) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc62_42.2: = bound_method %.loc62_42.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc62_42.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc62_42.2(%.loc62_42.6) +// CHECK:STDOUT: %Destroy.facet.loc62_42.1: %Destroy.type = facet_value constants.%ValueType, (constants.%custom_witness.656, constants.%DestroyImpl.impl_witness.4c3) [concrete = constants.%Destroy.facet.cac] +// CHECK:STDOUT: %.loc62_42.16: %Destroy.type = converted constants.%ValueType, %Destroy.facet.loc62_42.1 [concrete = constants.%Destroy.facet.cac] +// CHECK:STDOUT: %Destroy.facet.loc62_42.2: %Destroy.type = facet_value constants.%ValueType, (constants.%custom_witness.656, constants.%DestroyImpl.impl_witness.4c3) [concrete = constants.%Destroy.facet.cac] +// CHECK:STDOUT: %.loc62_42.17: %Destroy.type = converted constants.%ValueType, %Destroy.facet.loc62_42.2 [concrete = constants.%Destroy.facet.cac] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc62_42.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc62_42.14) +// CHECK:STDOUT: %Destroy.facet.loc62_42.3: %Destroy.type = facet_value constants.%Optional.81f, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.e67) [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %.loc62_42.18: %Destroy.type = converted constants.%Optional.81f, %Destroy.facet.loc62_42.3 [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %Destroy.facet.loc62_42.4: %Destroy.type = facet_value constants.%Optional.81f, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.e67) [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %.loc62_42.19: %Destroy.type = converted constants.%Optional.81f, %Destroy.facet.loc62_42.4 [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc62_42.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc62_42.6) // CHECK:STDOUT: br !for.next // CHECK:STDOUT: // CHECK:STDOUT: !for.done: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc62_42.3: = bound_method %.loc62_42.6, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc62_42.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc62_42.3(%.loc62_42.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc62_42.4: = bound_method %var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc62_42.4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc62_42.4(%var) +// CHECK:STDOUT: %Destroy.facet.loc62_42.5: %Destroy.type = facet_value constants.%Optional.81f, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.e67) [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %.loc62_42.20: %Destroy.type = converted constants.%Optional.81f, %Destroy.facet.loc62_42.5 [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %Destroy.facet.loc62_42.6: %Destroy.type = facet_value constants.%Optional.81f, (constants.%custom_witness.b80ef6.7, constants.%DestroyImpl.impl_witness.e67) [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: %.loc62_42.21: %Destroy.type = converted constants.%Optional.81f, %Destroy.facet.loc62_42.6 [concrete = constants.%Destroy.facet.434] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc62_42.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc62_42.6) +// CHECK:STDOUT: %Destroy.facet.loc62_42.7: %Destroy.type = facet_value constants.%tuple.type.de6, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.2c4) [concrete = constants.%Destroy.facet.a88] +// CHECK:STDOUT: %.loc62_42.22: %Destroy.type = converted constants.%tuple.type.de6, %Destroy.facet.loc62_42.7 [concrete = constants.%Destroy.facet.a88] +// CHECK:STDOUT: %Destroy.facet.loc62_42.8: %Destroy.type = facet_value constants.%tuple.type.de6, (constants.%custom_witness.b80ef6.8, constants.%DestroyImpl.impl_witness.2c4) [concrete = constants.%Destroy.facet.a88] +// CHECK:STDOUT: %.loc62_42.23: %Destroy.type = converted constants.%tuple.type.de6, %Destroy.facet.loc62_42.8 [concrete = constants.%Destroy.facet.a88] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc62_42.4: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -6074,14 +4935,14 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: %R.patt.loc44_17.2 => constants.%R.patt // CHECK:STDOUT: %R.loc44_17.1 => constants.%R // CHECK:STDOUT: %R.as_type.loc44_83.1 => constants.%R.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.611 -// CHECK:STDOUT: %r.param_patt.loc44_81.2 => constants.%r.param_patt.e64 -// CHECK:STDOUT: %r.patt.loc44_81.2 => constants.%r.patt.dcb +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.2ae +// CHECK:STDOUT: %r.param_patt.loc44_81.2 => constants.%r.param_patt.91c +// CHECK:STDOUT: %r.patt.loc44_81.2 => constants.%r.patt.03a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.fc8) { +// CHECK:STDOUT: specific @TestIterate(constants.%facet_value.62f) { // CHECK:STDOUT: %R.patt.loc44_17.2 => constants.%R.patt -// CHECK:STDOUT: %R.loc44_17.1 => constants.%facet_value.fc8 +// CHECK:STDOUT: %R.loc44_17.1 => constants.%facet_value.62f // CHECK:STDOUT: %R.as_type.loc44_83.1 => constants.%MutableAndConstRange // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fdb // CHECK:STDOUT: %r.param_patt.loc44_81.2 => constants.%r.param_patt.3a6 @@ -6089,23 +4950,19 @@ fn TestDriver(var no_begin_end: Cpp.NoBeginEnd, // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc44 => constants.%complete_type.357 -// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.198 -// CHECK:STDOUT: %Iterate.facet.loc48_41.5 => constants.%Iterate.facet.b30 -// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.b5a -// CHECK:STDOUT: %.loc48_41.20 => constants.%.bc1 -// CHECK:STDOUT: %impl.elem2.loc48_41.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.160 -// CHECK:STDOUT: %specific_impl_fn.loc48_41.4 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn -// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.c9a +// CHECK:STDOUT: %Iterate.lookup_impl_witness => constants.%Iterate.impl_witness.3b4 +// CHECK:STDOUT: %Iterate.facet.loc48_41.5 => constants.%Iterate.facet.748 +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type => constants.%Iterate.WithSelf.NewCursor.type.24a +// CHECK:STDOUT: %.loc48_41.26 => constants.%.227 +// CHECK:STDOUT: %impl.elem2.loc48_41.2 => constants.%T.as_type.as.Iterate.impl.NewCursor.8e0 +// CHECK:STDOUT: %specific_impl_fn.loc48_41.3 => constants.%T.as_type.as.Iterate.impl.NewCursor.specific_fn +// CHECK:STDOUT: %impl.elem1 => constants.%Destroy.facet.a88 // CHECK:STDOUT: %as_type => constants.%tuple.type.de6 // CHECK:STDOUT: %require_complete.1 => constants.%complete_type.95d -// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.3b0 -// CHECK:STDOUT: %.loc48_41.21 => constants.%.698 -// CHECK:STDOUT: %impl.elem3.loc48_41.2 => constants.%T.as_type.as.Iterate.impl.Next.ddf -// CHECK:STDOUT: %specific_impl_fn.loc48_41.5 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type => constants.%Destroy.WithSelf.SelfDestruct.type.235 -// CHECK:STDOUT: %.loc48_41.22 => constants.%.a38 -// CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.f8f19d.8 -// CHECK:STDOUT: %impl.elem2.loc48_41.4 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 -// CHECK:STDOUT: %specific_impl_fn.loc48_41.6 => constants.%Destroy.WithSelf.SelfDestruct.db3fdb.10 +// CHECK:STDOUT: %Iterate.WithSelf.Next.type => constants.%Iterate.WithSelf.Next.type.f69 +// CHECK:STDOUT: %.loc48_41.27 => constants.%.343 +// CHECK:STDOUT: %impl.elem3.loc48_41.2 => constants.%T.as_type.as.Iterate.impl.Next.353 +// CHECK:STDOUT: %specific_impl_fn.loc48_41.4 => constants.%T.as_type.as.Iterate.impl.Next.specific_fn +// CHECK:STDOUT: %SelfDestruct.specific_fn.6 => constants.%SelfDestruct.specific_fn.28f // CHECK:STDOUT: } // 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 ef56db90a44f..f8f02c536b7d 100644 --- a/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon +++ b/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon @@ -62,6 +62,11 @@ fn F() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %initializer_list: type = class_type @initializer_list [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.7fc: type = pattern_type %initializer_list [concrete] // CHECK:STDOUT: %_.patt.abb: %pattern_type.7fc = value_binding_pattern _ [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] @@ -90,7 +95,6 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3bd: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] @@ -109,31 +113,24 @@ fn F() { // CHECK:STDOUT: %Consume__carbon_thunk: %Consume__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %initializer_list.initializer_list.type.0fbcd7.2: type = fn_type @initializer_list.initializer_list.loc10 [concrete] // CHECK:STDOUT: %initializer_list.initializer_list.0db5f6.2: %initializer_list.initializer_list.type.0fbcd7.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.965: %pattern_type.7fc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a67: %pattern_type.7fc = wrapper_binding_pattern self, %self.param_patt.965 [concrete] // CHECK:STDOUT: %initializer_list.cpp_destructor.type: type = fn_type @initializer_list.cpp_destructor [concrete] // CHECK:STDOUT: %initializer_list.cpp_destructor: %initializer_list.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_23.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_23.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_23.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc10_23.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_23.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e31: %pattern_type.d4e = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6c6: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt.e31 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_23.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc10_23.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_23.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.c07, %Destroy.WithSelf.SelfDestruct.db3fdb.4 [concrete] +// CHECK:STDOUT: %custom_witness.f53: = custom_witness (%initializer_list.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.de7: %SubobjectDestroy.type = facet_value %initializer_list, (%custom_witness.f53) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.215: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.de7) [concrete] +// CHECK:STDOUT: %Destroy.facet.bf2: %Destroy.type = facet_value %initializer_list, (%custom_witness.f53, %DestroyImpl.impl_witness.215) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_23.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_23.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.046: %Destroy.type = facet_value %i32, (%custom_witness.b80ef6.2, %DestroyImpl.impl_witness.077) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.79c: %SubobjectDestroy.type = facet_value %Array.95c, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.90e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.79c) [concrete] +// CHECK:STDOUT: %Destroy.facet.50a: %Destroy.type = facet_value %Array.95c, (%custom_witness.b80ef6.3, %DestroyImpl.impl_witness.90e) [concrete] // CHECK:STDOUT: %InitListConstructor: type = class_type @InitListConstructor [concrete] // CHECK:STDOUT: %pattern_type.ed6: type = pattern_type %InitListConstructor [concrete] // CHECK:STDOUT: %_.patt.100: %pattern_type.ed6 = value_binding_pattern _ [concrete] @@ -142,14 +139,12 @@ fn F() { // CHECK:STDOUT: %InitListConstructor__carbon_thunk: %InitListConstructor__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %initializer_list.initializer_list.type.0fbcd7.3: type = fn_type @initializer_list.initializer_list.loc12 [concrete] // CHECK:STDOUT: %initializer_list.initializer_list.0db5f6.3: %initializer_list.initializer_list.type.0fbcd7.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.722: %pattern_type.ed6 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.316: %pattern_type.ed6 = wrapper_binding_pattern self, %self.param_patt.722 [concrete] // CHECK:STDOUT: %InitListConstructor.cpp_destructor.type: type = fn_type @InitListConstructor.cpp_destructor [concrete] // CHECK:STDOUT: %InitListConstructor.cpp_destructor: %InitListConstructor.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.fe1: = custom_witness (%InitListConstructor.cpp_destructor), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc9: %SubobjectDestroy.type = facet_value %InitListConstructor, (%custom_witness.fe1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e5e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc9) [concrete] +// CHECK:STDOUT: %Destroy.facet.faa: %Destroy.type = facet_value %InitListConstructor, (%custom_witness.fe1, %DestroyImpl.impl_witness.e5e) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -165,6 +160,8 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %initializer_list.template: %initializer_list.type = struct_value () [concrete = constants.%initializer_list.template] // CHECK:STDOUT: %initializer_list.decl: type = class_decl @initializer_list [concrete = constants.%initializer_list] {} {} +// CHECK:STDOUT: %Core.import_ref.7b5: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/types/optional, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.7b5), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.6b6.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.6b6.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl.6b6 [concrete] // CHECK:STDOUT: %Consume.cpp_overload_set.value: %Consume.cpp_overload_set.type = cpp_overload_set_value @Consume.cpp_overload_set [concrete = constants.%Consume.cpp_overload_set.value] @@ -173,22 +170,12 @@ fn F() { // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %initializer_list.cpp_destructor.decl: %initializer_list.cpp_destructor.type = fn_decl @initializer_list.cpp_destructor [concrete = constants.%initializer_list.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: %InitListConstructor.decl: type = class_decl @InitListConstructor [concrete = constants.%InitListConstructor] {} {} // CHECK:STDOUT: %InitListConstructor__carbon_thunk.decl: %InitListConstructor__carbon_thunk.type = fn_decl @InitListConstructor__carbon_thunk [concrete = constants.%InitListConstructor__carbon_thunk] { // CHECK:STDOUT: // CHECK:STDOUT: } { // CHECK:STDOUT: // CHECK:STDOUT: } -// CHECK:STDOUT: %InitListConstructor.cpp_destructor.decl: %InitListConstructor.cpp_destructor.type = fn_decl @InitListConstructor.cpp_destructor [concrete = constants.%InitListConstructor.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generated { @@ -214,41 +201,6 @@ fn F() { // CHECK:STDOUT: %return.param: ref %initializer_list = out_param call_param1 // CHECK:STDOUT: %return: ref %initializer_list = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_23.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7fc = ref_param_pattern [concrete = constants.%self.param_patt.965] -// CHECK:STDOUT: %self.patt: %pattern_type.7fc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a67] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %initializer_list = ref_param call_param0 -// CHECK:STDOUT: %self: ref %initializer_list = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_23.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc10_23.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_23.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d4e = ref_param_pattern [concrete = constants.%self.param_patt.e31] -// CHECK:STDOUT: %self.patt: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.95c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.95c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc10_23.3 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d4e = ref_param_pattern [concrete = constants.%self.param_patt.e31] -// CHECK:STDOUT: %self.patt: %pattern_type.d4e = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Array.95c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Array.95c = wrapper_binding self, %self.param -// CHECK:STDOUT: } // CHECK:STDOUT: %initializer_list.initializer_list.decl.f8e97d.3: %initializer_list.initializer_list.type.0fbcd7.3 = fn_decl @initializer_list.initializer_list.loc12 [concrete = constants.%initializer_list.initializer_list.0db5f6.3] { // CHECK:STDOUT: %_.param_patt: %pattern_type.d4e = value_param_pattern [concrete = constants.%_.param_patt] // CHECK:STDOUT: %_.patt: %pattern_type.d4e = wrapper_binding_pattern _, %_.param_patt [concrete = constants.%_.patt.a06] @@ -260,13 +212,6 @@ fn F() { // CHECK:STDOUT: %return.param: ref %initializer_list = out_param call_param1 // CHECK:STDOUT: %return: ref %initializer_list = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc12 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ed6 = ref_param_pattern [concrete = constants.%self.param_patt.722] -// CHECK:STDOUT: %self.patt: %pattern_type.ed6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.316] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %InitListConstructor = ref_param call_param0 -// CHECK:STDOUT: %self: ref %InitListConstructor = wrapper_binding self, %self.param -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -375,9 +320,18 @@ fn F() { // CHECK:STDOUT: %.loc10_23.21: ref %initializer_list = value_as_ref %.loc10_23.20 // CHECK:STDOUT: %addr.loc10: %ptr.fac = addr_of %.loc10_23.21 // CHECK:STDOUT: %Consume__carbon_thunk.call: init %empty_tuple.type = call imports.%Consume__carbon_thunk.decl(%addr.loc10) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %.loc10_23.19, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_23.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%.loc10_23.19) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_23.2: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c07) +// CHECK:STDOUT: %Destroy.facet.loc10_23.1: %Destroy.type = facet_value constants.%initializer_list, (constants.%custom_witness.f53, constants.%DestroyImpl.impl_witness.215) [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: %.loc10_23.22: %Destroy.type = converted constants.%initializer_list, %Destroy.facet.loc10_23.1 [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: %Destroy.facet.loc10_23.2: %Destroy.type = facet_value constants.%initializer_list, (constants.%custom_witness.f53, constants.%DestroyImpl.impl_witness.215) [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: %.loc10_23.23: %Destroy.type = converted constants.%initializer_list, %Destroy.facet.loc10_23.2 [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_23.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_23.19) +// CHECK:STDOUT: %Destroy.facet.loc10_23.3: %Destroy.type = facet_value constants.%Array.95c, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.90e) [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: %.loc10_23.24: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc10_23.3 [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: %Destroy.facet.loc10_23.4: %Destroy.type = facet_value constants.%Array.95c, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.90e) [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: %.loc10_23.25: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc10_23.4 [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_23.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_23.16) // CHECK:STDOUT: %int_1.loc12_37: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc12_40: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc12_43: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] @@ -440,14 +394,36 @@ fn F() { // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %_.patt.loc12: %pattern_type.ed6 = value_binding_pattern _ [concrete = constants.%_.patt.100] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12_44.1: = bound_method %.loc12_44.25, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12_44.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12_44.1(%.loc12_44.25) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc12_44.2: = bound_method %.loc12_44.20, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12_44.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc12_44.2(%.loc12_44.20) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12_44.3: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c07) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.loc8_50.19, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_50.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.loc8_50.19) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_50.2: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.c07) +// CHECK:STDOUT: %Destroy.facet.loc12_44.1: %Destroy.type = facet_value constants.%InitListConstructor, (constants.%custom_witness.fe1, constants.%DestroyImpl.impl_witness.e5e) [concrete = constants.%Destroy.facet.faa] +// CHECK:STDOUT: %.loc12_44.27: %Destroy.type = converted constants.%InitListConstructor, %Destroy.facet.loc12_44.1 [concrete = constants.%Destroy.facet.faa] +// CHECK:STDOUT: %Destroy.facet.loc12_44.2: %Destroy.type = facet_value constants.%InitListConstructor, (constants.%custom_witness.fe1, constants.%DestroyImpl.impl_witness.e5e) [concrete = constants.%Destroy.facet.faa] +// CHECK:STDOUT: %.loc12_44.28: %Destroy.type = converted constants.%InitListConstructor, %Destroy.facet.loc12_44.2 [concrete = constants.%Destroy.facet.faa] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc12_44.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc12_44.25) +// CHECK:STDOUT: %Destroy.facet.loc12_44.3: %Destroy.type = facet_value constants.%initializer_list, (constants.%custom_witness.f53, constants.%DestroyImpl.impl_witness.215) [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: %.loc12_44.29: %Destroy.type = converted constants.%initializer_list, %Destroy.facet.loc12_44.3 [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: %Destroy.facet.loc12_44.4: %Destroy.type = facet_value constants.%initializer_list, (constants.%custom_witness.f53, constants.%DestroyImpl.impl_witness.215) [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: %.loc12_44.30: %Destroy.type = converted constants.%initializer_list, %Destroy.facet.loc12_44.4 [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc12_44.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc12_44.20) +// CHECK:STDOUT: %Destroy.facet.loc12_44.5: %Destroy.type = facet_value constants.%Array.95c, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.90e) [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: %.loc12_44.31: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc12_44.5 [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: %Destroy.facet.loc12_44.6: %Destroy.type = facet_value constants.%Array.95c, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.90e) [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: %.loc12_44.32: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc12_44.6 [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc12_44.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc12_44.17) +// CHECK:STDOUT: %Destroy.facet.loc8_50.1: %Destroy.type = facet_value constants.%initializer_list, (constants.%custom_witness.f53, constants.%DestroyImpl.impl_witness.215) [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: %.loc8_50.21: %Destroy.type = converted constants.%initializer_list, %Destroy.facet.loc8_50.1 [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: %Destroy.facet.loc8_50.2: %Destroy.type = facet_value constants.%initializer_list, (constants.%custom_witness.f53, constants.%DestroyImpl.impl_witness.215) [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: %.loc8_50.22: %Destroy.type = converted constants.%initializer_list, %Destroy.facet.loc8_50.2 [concrete = constants.%Destroy.facet.bf2] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_50.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%.loc8_50.19) +// CHECK:STDOUT: %Destroy.facet.loc8_50.3: %Destroy.type = facet_value constants.%Array.95c, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.90e) [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: %.loc8_50.23: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc8_50.3 [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: %Destroy.facet.loc8_50.4: %Destroy.type = facet_value constants.%Array.95c, (constants.%custom_witness.b80ef6.3, constants.%DestroyImpl.impl_witness.90e) [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: %.loc8_50.24: %Destroy.type = converted constants.%Array.95c, %Destroy.facet.loc8_50.4 [concrete = constants.%Destroy.facet.50a] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_50.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.7(%.loc8_50.16) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -455,60 +431,36 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @initializer_list.initializer_list.loc10(%_.param: %Array.95c) -> out %return.param: %initializer_list = "cpp.std.initializer_list.make"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_23.1(%self.param: ref %initializer_list) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_23.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_23.1(%self.param: ref %initializer_list) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %initializer_list.cpp_destructor.call: init %empty_tuple.type = call imports.%initializer_list.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_23.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_23.2(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_23.2(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_23.2(%self.param: ref %Array.95c) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_23.2(%self.param: ref %Array.95c) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc10_23.1: ref %i32 = array_index %self.param, %int_2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_23.1: = bound_method %.loc10_23.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_23.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_23.1(%.loc10_23.1) +// CHECK:STDOUT: %Destroy.facet.loc10_23.1: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_23.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_23.1 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_23.2: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_23.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_23.2 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_23.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc10_23.1) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %.loc10_23.2: ref %i32 = array_index %self.param, %int_1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_23.2: = bound_method %.loc10_23.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_23.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_23.2(%.loc10_23.2) +// CHECK:STDOUT: %.loc10_23.4: ref %i32 = array_index %self.param, %int_1 +// CHECK:STDOUT: %Destroy.facet.loc10_23.3: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_23.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_23.3 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_23.4: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_23.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_23.4 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_23.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc10_23.4) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %.loc10_23.3: ref %i32 = array_index %self.param, %int_0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10_23.3: = bound_method %.loc10_23.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_23.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10_23.3(%.loc10_23.3) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_23.3(%self.param: ref %Array.95c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_23.3(%self.param: ref %Array.95c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc10_23.7: ref %i32 = array_index %self.param, %int_0 +// CHECK:STDOUT: %Destroy.facet.loc10_23.5: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_23.8: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_23.5 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %Destroy.facet.loc10_23.6: %Destroy.type = facet_value constants.%i32, (constants.%custom_witness.b80ef6.2, constants.%DestroyImpl.impl_witness.077) [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: %.loc10_23.9: %Destroy.type = converted constants.%i32, %Destroy.facet.loc10_23.6 [concrete = constants.%Destroy.facet.046] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_23.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc10_23.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @initializer_list.initializer_list.loc12(%_.param: %Array.95c) -> out %return.param: %initializer_list = "cpp.std.initializer_list.make"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %InitListConstructor) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12(%self.param: ref %InitListConstructor) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %InitListConstructor.cpp_destructor.call: init %empty_tuple.type = call imports.%InitListConstructor.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/template/generic_call.carbon b/toolchain/check/testdata/interop/cpp/template/generic_call.carbon index 8dca594d097c..900fd7ddcbd3 100644 --- a/toolchain/check/testdata/interop/cpp/template/generic_call.carbon +++ b/toolchain/check/testdata/interop/cpp/template/generic_call.carbon @@ -38,8 +38,8 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] -// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %x.param_patt.91d: %pattern_type.51d = value_param_pattern [symbolic] @@ -75,22 +75,21 @@ fn G() { // CHECK:STDOUT: %.e18: %.b48 = splice_inst @F.%.loc8_25.10 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.5d6: %.537 = splice_inst @F.%tuple.elem0 [template] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self.0e7: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.869: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self.0e7) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.c97: %Destroy.WithSelf.SelfDestruct.type.869 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.df0 [concrete] -// CHECK:STDOUT: %.8cb: type = type_of_inst @F.%.loc8_3.8 [template] -// CHECK:STDOUT: %.c23: %.8cb = splice_inst @F.%.loc8_3.8 [template] -// CHECK:STDOUT: %.57c: type = type_of_inst @F.%.loc8_3.11 [template] -// CHECK:STDOUT: %.e63: %.57c = splice_inst @F.%.loc8_3.11 [template] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %.5a2: type = type_of_inst @F.%.loc8_3.6 [template] +// CHECK:STDOUT: %.13c: %.5a2 = splice_inst @F.%.loc8_3.6 [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.fa7: type = pattern_type %X [concrete] // CHECK:STDOUT: %x.param_patt.468: %pattern_type.fa7 = value_param_pattern [concrete] // CHECK:STDOUT: %x.patt.af8: %pattern_type.fa7 = wrapper_binding_pattern x, %x.param_patt.468 [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] // CHECK:STDOUT: %S: type = class_type @S [concrete] // CHECK:STDOUT: %inst.splice_block.426619.1: = inst_value [concrete] { // CHECK:STDOUT: %.788: type = splice_block imports.%S.decl [concrete = %S] {} @@ -102,9 +101,9 @@ fn G() { // CHECK:STDOUT: %v.patt.5fa: %pattern_type.981 = ref_binding_pattern v [concrete] // CHECK:STDOUT: %v.var_patt.e69: %pattern_type.981 = var_pattern %v.patt.5fa [concrete] // CHECK:STDOUT: %.de3: require_specific_def_type = require_specific_def @T.as.DefaultOrUnformed.impl(%S) [concrete] -// CHECK:STDOUT: %S.Op.type: type = fn_type @S.Op [concrete] -// CHECK:STDOUT: %S.Op: %S.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.9b4: = custom_witness (%S.Op), @Default [concrete] +// CHECK:STDOUT: %S.Op.type.83af6e.1: type = fn_type @S.Op.1 [concrete] +// CHECK:STDOUT: %S.Op.4dca31.1: %S.Op.type.83af6e.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.9b4: = custom_witness (%S.Op.4dca31.1), @Default [concrete] // CHECK:STDOUT: %Default.facet.602: %Default.type = facet_value %S, (%custom_witness.9b4) [concrete] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness.4c0: = impl_witness imports.%DefaultOrUnformed.impl_witness_table.162, @T.as_type.as.DefaultOrUnformed.impl(%Default.facet.602) [concrete] // CHECK:STDOUT: %T.as_type.as.DefaultOrUnformed.impl.Op.type.46a: type = fn_type @T.as_type.as.DefaultOrUnformed.impl.Op, @T.as_type.as.DefaultOrUnformed.impl(%Default.facet.602) [concrete] @@ -133,31 +132,23 @@ fn G() { // CHECK:STDOUT: %.d332: init %S = splice_block %.f4d {} // CHECK:STDOUT: } // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%inst.splice_block.426619.5) [concrete] -// CHECK:STDOUT: %self.param_patt.471: %pattern_type.981 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.5f0: %pattern_type.981 = wrapper_binding_pattern self, %self.param_patt.471 [concrete] -// CHECK:STDOUT: %S.cpp_destructor.type: type = fn_type @S.cpp_destructor [concrete] -// CHECK:STDOUT: %S.cpp_destructor: %S.cpp_destructor.type = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %S.SubobjectDestroy.type: type = fn_type @S.SubobjectDestroy [concrete] -// CHECK:STDOUT: %S.SubobjectDestroy: %S.SubobjectDestroy.type = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.1bfa2a.2: = custom_witness (%Destroy.WithSelf.Op.403171.2, %S.SubobjectDestroy, %Destroy.WithSelf.SelfDestruct.db3fdb.2), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.edc: %Destroy.type = facet_value %S, (%custom_witness.1bfa2a.2) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.896: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.edc) [concrete] -// CHECK:STDOUT: %.b20: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.896, %Destroy.facet.edc [concrete] +// CHECK:STDOUT: %S.Op.type.83af6e.2: type = fn_type @S.Op.2 [concrete] +// CHECK:STDOUT: %S.Op.4dca31.2: %S.Op.type.83af6e.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.5760f4.2: = custom_witness (%S.Op.4dca31.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.501: %SubobjectDestroy.type = facet_value %S, (%custom_witness.5760f4.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.fdf: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.501) [concrete] +// CHECK:STDOUT: %Destroy.facet.a850d1.1: %Destroy.type = facet_value %S, (%DestroyImpl.impl_witness.fdf, %custom_witness.5760f4.2) [concrete] // CHECK:STDOUT: %inst.splice_block.426619.6: = inst_value [concrete] { -// CHECK:STDOUT: %.249: = splice_block %bound_method { +// CHECK:STDOUT: %.27e: init %empty_tuple.type = splice_block %SelfDestruct.call { // CHECK:STDOUT: %.104182.1: ref %S = specific_inst @F.%v.var, @F(%X) +// CHECK:STDOUT: %Destroy.facet.a850d1.2: %Destroy.type = facet_value %S, (%DestroyImpl.impl_witness.fdf, %custom_witness.5760f4.2) [concrete = %Destroy.facet.a850d1.1] +// CHECK:STDOUT: %.03a2c4.1: %Destroy.type = converted %S, %Destroy.facet.a850d1.2 [concrete = %Destroy.facet.a850d1.1] +// CHECK:STDOUT: %Destroy.facet.a850d1.3: %Destroy.type = facet_value %S, (%DestroyImpl.impl_witness.fdf, %custom_witness.5760f4.2) [concrete = %Destroy.facet.a850d1.1] +// CHECK:STDOUT: %.03a2c4.2: %Destroy.type = converted %S, %Destroy.facet.a850d1.3 [concrete = %Destroy.facet.a850d1.1] // CHECK:STDOUT: -// CHECK:STDOUT: %impl.elem2: %.b20 = impl_witness_access %custom_witness.1bfa2a.2, element2 [concrete = %Destroy.WithSelf.SelfDestruct.db3fdb.2] -// CHECK:STDOUT: %bound_method: = bound_method %.104182.1, %impl.elem2 +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.57337e.2(%.104182.1) // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: %inst.call: = inst_value [concrete] { -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %.249(%.104182.1) -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -170,30 +161,16 @@ fn G() { // CHECK:STDOUT: %Core.import_ref.654: %DefaultOrUnformed.assoc_type = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Core.import_ref.288: @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op.type (%T.as_type.as.DefaultOrUnformed.impl.Op.type.4da) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DefaultOrUnformed.impl.%T.as_type.as.DefaultOrUnformed.impl.Op (constants.%T.as_type.as.DefaultOrUnformed.impl.Op.79f)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.162 = impl_witness_table (%Core.import_ref.288), @T.as_type.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.df0: @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct.type (%Destroy.WithSelf.SelfDestruct.type.869) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct (constants.%Destroy.WithSelf.SelfDestruct.c97)] // CHECK:STDOUT: %X.decl: type = class_decl @X [concrete = constants.%X] {} {} +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %S.decl: type = class_decl @S [concrete = constants.%S] {} {} // CHECK:STDOUT: %Core.import_ref.c82: @DefaultOrUnformed.WithSelf.%DefaultOrUnformed.WithSelf.Op.type (%DefaultOrUnformed.WithSelf.Op.type.8ac) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @DefaultOrUnformed.WithSelf.%DefaultOrUnformed.WithSelf.Op (constants.%DefaultOrUnformed.WithSelf.Op.b27)] -// CHECK:STDOUT: %S.cpp_destructor.decl: %S.cpp_destructor.type = fn_decl @S.cpp_destructor [concrete = constants.%S.cpp_destructor] { -// CHECK:STDOUT: -// CHECK:STDOUT: } { -// CHECK:STDOUT: -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.981 = ref_param_pattern [concrete = constants.%self.param_patt.471] -// CHECK:STDOUT: %self.patt: %pattern_type.981 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.5f0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %S = ref_param call_param0 -// CHECK:STDOUT: %self: ref %S = wrapper_binding self, %self.param -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { -// CHECK:STDOUT: %T.patt.loc7_7.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc7_7.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %x.param_patt.loc7_23.1: @F.%pattern_type.loc7 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc7_23.2 (constants.%x.param_patt.91d)] // CHECK:STDOUT: %x.patt.loc7_23.1: @F.%pattern_type.loc7 (%pattern_type.51d) = wrapper_binding_pattern x, %x.param_patt.loc7_23.1 [symbolic = %x.patt.loc7_23.2 (constants.%x.patt.260)] // CHECK:STDOUT: } { @@ -209,7 +186,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc7_7.2: type) { -// CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc7_7.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_7.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %T.loc7_7.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_7.1 (constants.%T.67d)] // CHECK:STDOUT: %pattern_type.loc7: type = pattern_type %T.loc7_7.1 [symbolic = %pattern_type.loc7 (constants.%pattern_type.51d)] // CHECK:STDOUT: %x.param_patt.loc7_23.2: @F.%pattern_type.loc7 (%pattern_type.51d) = value_param_pattern [symbolic = %x.param_patt.loc7_23.2 (constants.%x.param_patt.91d)] @@ -236,15 +213,12 @@ fn G() { // CHECK:STDOUT: %.loc8_25.10: = call_action (%.loc8_25.3), false [template] // CHECK:STDOUT: %.loc8_25.11: type = type_of_inst %.loc8_25.10 [template = %.loc8_25.11 (constants.%.b48)] // CHECK:STDOUT: %.loc8_25.12: @F.%.loc8_25.11 (%.b48) = splice_inst %.loc8_25.10 [template = %.loc8_25.12 (constants.%.e18)] -// CHECK:STDOUT: %.loc8_3.6: %tuple.type = initialize_action %.loc8_25.5, %.loc8_24.9, %v.var, none, false [template] -// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc8_3.6, element0 [template] -// CHECK:STDOUT: %.loc8_3.7: @F.%.loc8_24.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc8_3.7 (constants.%.5d6)] -// CHECK:STDOUT: %.loc8_3.8: = compound_member_access_action %v.var, constants.%assoc2 [template] -// CHECK:STDOUT: %.loc8_3.9: type = type_of_inst %.loc8_3.8 [template = %.loc8_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc8_3.10: @F.%.loc8_3.9 (%.8cb) = splice_inst %.loc8_3.8 [template = %.loc8_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc8_3.11: = call_action (%.loc8_3.3), true [template] -// CHECK:STDOUT: %.loc8_3.12: type = type_of_inst %.loc8_3.11 [template = %.loc8_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc8_3.13: @F.%.loc8_3.12 (%.57c) = splice_inst %.loc8_3.11 [template = %.loc8_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc8_3.4: %tuple.type = initialize_action %.loc8_25.5, %.loc8_24.9, %v.var, none, false [template] +// CHECK:STDOUT: %tuple.elem0: = tuple_access %.loc8_3.4, element0 [template] +// CHECK:STDOUT: %.loc8_3.5: @F.%.loc8_24.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc8_3.5 (constants.%.5d6)] +// CHECK:STDOUT: %.loc8_3.6: = call_action (constants.%SelfDestruct, %v.var), true [template] +// CHECK:STDOUT: %.loc8_3.7: type = type_of_inst %.loc8_3.6 [template = %.loc8_3.7 (constants.%.5a2)] +// CHECK:STDOUT: %.loc8_3.8: @F.%.loc8_3.7 (%.5a2) = splice_inst %.loc8_3.6 [template = %.loc8_3.8 (constants.%.13c)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @F.%T.loc7_7.1 (%T.67d)) { // CHECK:STDOUT: !entry: @@ -255,7 +229,7 @@ fn G() { // CHECK:STDOUT: %.loc8_25.3: @F.%.loc8_25.8 (%.77d) = splice_inst %.loc8_25.7 [template = %.loc8_25.9 (constants.%.984)] // CHECK:STDOUT: %.loc8_25.4: type = type_of_inst %.loc8_25.10 [template = %.loc8_25.11 (constants.%.b48)] // CHECK:STDOUT: %.loc8_25.5: @F.%.loc8_25.11 (%.b48) = splice_inst %.loc8_25.10 [template = %.loc8_25.12 (constants.%.e18)] -// CHECK:STDOUT: %.loc8_3.1: @F.%.loc8_24.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc8_3.7 (constants.%.5d6)] +// CHECK:STDOUT: %.loc8_3.1: @F.%.loc8_24.9 (%.537) = splice_inst %tuple.elem0 [template = %.loc8_3.5 (constants.%.5d6)] // CHECK:STDOUT: assign %v.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_24.1: type = splice_block %.loc8_24.4 [template = %.loc8_24.9 (constants.%.537)] { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] @@ -271,25 +245,14 @@ fn G() { // CHECK:STDOUT: %v.patt.loc8_15.1: @F.%pattern_type.loc8 (%pattern_type.fcb) = ref_binding_pattern v [template = %v.patt.loc8_15.2 (constants.%v.patt.126)] // CHECK:STDOUT: %v.var_patt.loc8_3.1: @F.%pattern_type.loc8 (%pattern_type.fcb) = var_pattern %v.patt.loc8_15.1 [template = %v.var_patt.loc8_3.2 (constants.%v.var_patt.768)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_3.2: type = type_of_inst %.loc8_3.8 [template = %.loc8_3.9 (constants.%.8cb)] -// CHECK:STDOUT: %.loc8_3.3: @F.%.loc8_3.9 (%.8cb) = splice_inst %.loc8_3.8 [template = %.loc8_3.10 (constants.%.c23)] -// CHECK:STDOUT: %.loc8_3.4: type = type_of_inst %.loc8_3.11 [template = %.loc8_3.12 (constants.%.57c)] -// CHECK:STDOUT: %.loc8_3.5: @F.%.loc8_3.12 (%.57c) = splice_inst %.loc8_3.11 [template = %.loc8_3.13 (constants.%.e63)] +// CHECK:STDOUT: %.loc8_3.2: type = type_of_inst %.loc8_3.6 [template = %.loc8_3.7 (constants.%.5a2)] +// CHECK:STDOUT: %.loc8_3.3: @F.%.loc8_3.7 (%.5a2) = splice_inst %.loc8_3.6 [template = %.loc8_3.8 (constants.%.13c)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %S) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %S) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %S.cpp_destructor.call: init %empty_tuple.type = call imports.%S.cpp_destructor.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc7_7.1 => constants.%T.67d // CHECK:STDOUT: %pattern_type.loc7 => constants.%pattern_type.51d // CHECK:STDOUT: %x.param_patt.loc7_23.2 => constants.%x.param_patt.91d @@ -297,7 +260,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%X) { -// CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc7_7.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc7_7.1 => constants.%X // CHECK:STDOUT: %pattern_type.loc7 => constants.%pattern_type.fa7 // CHECK:STDOUT: %x.param_patt.loc7_23.2 => constants.%x.param_patt.468 @@ -324,14 +287,11 @@ fn G() { // CHECK:STDOUT: %.loc8_25.10 => constants.%inst.splice_block.426619.4 // CHECK:STDOUT: %.loc8_25.11 => constants.%S // CHECK:STDOUT: %.loc8_25.12 => -// CHECK:STDOUT: %.loc8_3.6 => constants.%tuple +// CHECK:STDOUT: %.loc8_3.4 => constants.%tuple // CHECK:STDOUT: %tuple.elem0 => constants.%inst.splice_block.426619.5 -// CHECK:STDOUT: %.loc8_3.7 => -// CHECK:STDOUT: %.loc8_3.8 => constants.%inst.splice_block.426619.6 -// CHECK:STDOUT: %.loc8_3.9 => -// CHECK:STDOUT: %.loc8_3.10 => -// CHECK:STDOUT: %.loc8_3.11 => constants.%inst.call -// CHECK:STDOUT: %.loc8_3.12 => constants.%empty_tuple.type -// CHECK:STDOUT: %.loc8_3.13 => +// CHECK:STDOUT: %.loc8_3.5 => +// CHECK:STDOUT: %.loc8_3.6 => constants.%inst.splice_block.426619.6 +// CHECK:STDOUT: %.loc8_3.7 => constants.%empty_tuple.type +// CHECK:STDOUT: %.loc8_3.8 => // CHECK:STDOUT: } // 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 c66c1dfefed3..747e6497a2b3 100644 --- a/toolchain/check/testdata/interop/cpp/type_alias/import.carbon +++ b/toolchain/check/testdata/interop/cpp/type_alias/import.carbon @@ -89,22 +89,23 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %Copy.WithSelf.Op.type.9a2: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.309: type = fn_type_with_self_type %Copy.WithSelf.Op.type.9a2, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.81f, @ptr.as.Copy.impl.Op(%i32) [concrete] -// CHECK:STDOUT: %self.param_patt.6cc: %pattern_type.7dc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a12: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt.6cc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d4d: %SubobjectDestroy.type = facet_value %ptr.a17, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b8f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d4d) [concrete] +// CHECK:STDOUT: %Destroy.facet.abb: %Destroy.type = facet_value %ptr.a17, (%DestroyImpl.impl_witness.b8f, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -117,37 +118,8 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e474), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.06a: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.20f) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.f12)] // CHECK:STDOUT: %Copy.impl_witness_table.fb0 = impl_witness_table (%Core.import_ref.06a), @ptr.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -159,8 +131,8 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %int_42, %specific_fn.loc8 [concrete = constants.%bound_method] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc8_3.2(%int_42) [concrete = constants.%int_42.db5] -// CHECK:STDOUT: %.loc8_3: init %i32 = converted %int_42, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_42.db5] -// CHECK:STDOUT: assign %n.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %i32 = converted %int_42, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_42.db5] +// CHECK:STDOUT: assign %n.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_13: type = splice_block %foo.ref [concrete = constants.%i32] { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: @@ -180,7 +152,7 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %bound_method.loc10_28.2: = bound_method %addr, %specific_fn.loc10 // CHECK:STDOUT: %ptr.as.Copy.impl.Op.call: init %ptr.a17 = call %bound_method.loc10_28.2(%addr) // CHECK:STDOUT: assign %p.var, %ptr.as.Copy.impl.Op.call -// CHECK:STDOUT: %.loc10: type = splice_block %ptr [concrete = constants.%ptr.a17] { +// CHECK:STDOUT: %.loc10_24: type = splice_block %ptr [concrete = constants.%ptr.a17] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: // CHECK:STDOUT: %bar.ref: type = name_ref bar, %i32.2 [concrete = constants.%i32] @@ -191,34 +163,24 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %p.patt: %pattern_type.7dc = ref_binding_pattern p [concrete = constants.%p.patt] // CHECK:STDOUT: %p.var_patt: %pattern_type.7dc = var_pattern %p.patt [concrete = constants.%p.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %p.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%p.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %n.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%n.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc10_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%p.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%n.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %ptr.a17) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10(%self.param: ref %ptr.a17) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %ptr.a17) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %ptr.a17) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- use_class_typedef.carbon // CHECK:STDOUT: @@ -243,14 +205,17 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.be3, @ptr.as.Copy.impl.Op(%C) [concrete] // CHECK:STDOUT: %pc.patt: %pattern_type.8fa = ref_binding_pattern pc [concrete] // CHECK:STDOUT: %pc.var_patt: %pattern_type.8fa = var_pattern %pc.patt [concrete] -// CHECK:STDOUT: %self.param_patt.7a2: %pattern_type.8fa = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.450: %pattern_type.8fa = wrapper_binding_pattern self, %self.param_patt.7a2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.579: %SubobjectDestroy.type = facet_value %ptr.0a2, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.af6: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.579) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.0a2, (%DestroyImpl.impl_witness.af6, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -262,23 +227,8 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {} // CHECK:STDOUT: %Core.import_ref.06a: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.20f) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.f12)] // CHECK:STDOUT: %Copy.impl_witness_table.fb0 = impl_witness_table (%Core.import_ref.06a), @ptr.as.Copy.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8fa = ref_param_pattern [concrete = constants.%self.param_patt.7a2] -// CHECK:STDOUT: %self.patt: %pattern_type.8fa = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.450] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.0a2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.0a2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8fa = ref_param_pattern [concrete = constants.%self.param_patt.7a2] -// CHECK:STDOUT: %self.patt: %pattern_type.8fa = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.450] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.0a2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.0a2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @H(%c.param: ref %C, %d.param: ref %C) { @@ -292,7 +242,7 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %bound_method.loc9_27.2: = bound_method %addr.loc9, %specific_fn.loc9 // CHECK:STDOUT: %ptr.as.Copy.impl.Op.call.loc9: init %ptr.0a2 = call %bound_method.loc9_27.2(%addr.loc9) // CHECK:STDOUT: assign %pd.var, %ptr.as.Copy.impl.Op.call.loc9 -// CHECK:STDOUT: %.loc9: type = splice_block %ptr.loc9 [concrete = constants.%ptr.0a2] { +// CHECK:STDOUT: %.loc9_23: type = splice_block %ptr.loc9 [concrete = constants.%ptr.0a2] { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %D.ref.loc9: type = name_ref D, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %ptr.loc9: type = ptr_type %D.ref.loc9 [concrete = constants.%ptr.0a2] @@ -311,7 +261,7 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %bound_method.loc10_27.2: = bound_method %addr.loc10, %specific_fn.loc10 // CHECK:STDOUT: %ptr.as.Copy.impl.Op.call.loc10: init %ptr.0a2 = call %bound_method.loc10_27.2(%addr.loc10) // CHECK:STDOUT: assign %pc.var, %ptr.as.Copy.impl.Op.call.loc10 -// CHECK:STDOUT: %.loc10: type = splice_block %ptr.loc10 [concrete = constants.%ptr.0a2] { +// CHECK:STDOUT: %.loc10_23: type = splice_block %ptr.loc10 [concrete = constants.%ptr.0a2] { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, imports.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %ptr.loc10: type = ptr_type %C.ref.loc10 [concrete = constants.%ptr.0a2] @@ -321,21 +271,20 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %pc.patt: %pattern_type.8fa = ref_binding_pattern pc [concrete = constants.%pc.patt] // CHECK:STDOUT: %pc.var_patt: %pattern_type.8fa = var_pattern %pc.patt [concrete = constants.%pc.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %pc.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%pc.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %pd.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%pd.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%ptr.0a2, (constants.%DestroyImpl.impl_witness.af6, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.1: %Destroy.type = converted constants.%ptr.0a2, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%ptr.0a2, (constants.%DestroyImpl.impl_witness.af6, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%ptr.0a2, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%pc.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%ptr.0a2, (constants.%DestroyImpl.impl_witness.af6, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%ptr.0a2, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%ptr.0a2, (constants.%DestroyImpl.impl_witness.af6, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%ptr.0a2, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%pd.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %ptr.0a2) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %ptr.0a2) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %ptr.0a2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10(%self.param: ref %ptr.0a2) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/lifetime.carbon b/toolchain/check/testdata/let/lifetime.carbon index fac179f99ab2..d832aa1fd05d 100644 --- a/toolchain/check/testdata/let/lifetime.carbon +++ b/toolchain/check/testdata/let/lifetime.carbon @@ -47,53 +47,22 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %.367: ref %A = temporary invalid, %A.val [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.9ef = value_binding_pattern b [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_37.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc11_37.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc11_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11_37.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.367, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11_37.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_37.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc11_37.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11_37.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc11_37.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -140,33 +109,34 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc11_37.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_37: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc11_37.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_25: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.367) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_34: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.367) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10_25: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.367) +// CHECK:STDOUT: %Destroy.facet.loc11_37.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_37.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc11_37.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_37.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_37.5: %Destroy.type = converted constants.%A, %Destroy.facet.loc11_37.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11_37: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc11_37.2) +// CHECK:STDOUT: %Destroy.facet.loc11_25.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_25.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc11_25.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_25.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_25.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc11_25.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11_25: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc11_25.2) +// CHECK:STDOUT: %Destroy.facet.loc10_34.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_34.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_34.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_34.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_34.5: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_34.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_34: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc10_34.2) +// CHECK:STDOUT: %Destroy.facet.loc10_25.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_25.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_25.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_25.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_25.5: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_25.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10_25: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc10_25.2) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc11_37.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11_37.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11_37.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_37.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11_37.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.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 16819047060b..f8c1811da805 100644 --- a/toolchain/check/testdata/namespace/merging_with_indirections.carbon +++ b/toolchain/check/testdata/namespace/merging_with_indirections.carbon @@ -175,22 +175,20 @@ fn Run() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %pattern_type.821: type = pattern_type %A [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_11.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_11.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.e92: %pattern_type.821 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.d98: %pattern_type.821 = wrapper_binding_pattern self, %self.param_patt.e92 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_11.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_11.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_11.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_11.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f75: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.074: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f75) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.074, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %a.patt: %pattern_type.821 = ref_binding_pattern a [concrete] // CHECK:STDOUT: %a.var_patt: %pattern_type.821 = var_pattern %a.patt [concrete] // CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete] @@ -206,7 +204,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -220,7 +218,9 @@ fn Run() { // CHECK:STDOUT: %Other.F: %F.type = import_ref Other//b, F, loaded [concrete = constants.%F] // CHECK:STDOUT: %Other.import_ref.8db: = import_ref Other//b, inst{{[0-9A-F]+}} [indirect], loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Other.import_ref.975 = import_ref Other//b, inst{{[0-9A-F]+}} [indirect], unloaded -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Other.NS1: = import_ref Other//b, NS1, loaded // CHECK:STDOUT: %NS1.acfa4a.2: = namespace %Other.NS1, [concrete] { // CHECK:STDOUT: .A = %Other.A @@ -233,37 +233,6 @@ fn Run() { // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_11.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_11.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_11.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.821 = ref_param_pattern [concrete = constants.%self.param_patt.e92] -// CHECK:STDOUT: %self.patt: %pattern_type.821 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d98] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_11.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.821 = ref_param_pattern [concrete = constants.%self.param_patt.e92] -// CHECK:STDOUT: %self.patt: %pattern_type.821 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.d98] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -289,16 +258,20 @@ fn Run() { // CHECK:STDOUT: %.loc7_11.1: ref %A = temporary_storage // CHECK:STDOUT: %F.call.loc7: init %A to %.loc7_11.1 = call %F.ref.loc7() // CHECK:STDOUT: %.loc7_11.2: ref %A = temporary %.loc7_11.1, %F.call.loc7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %.loc7_11.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%.loc7_11.2) +// CHECK:STDOUT: %Destroy.facet.loc7_11.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.074, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_11.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc7_11.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_11.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.074, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_11.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc7_11.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc7_11.2) // CHECK:STDOUT: %a.var: ref %A = var_storage %a.var_patt // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%A, (constants.%DefaultOrUnformed.impl_witness.3dd) [concrete = constants.%DefaultOrUnformed.facet] // CHECK:STDOUT: %.loc10_21.1: %DefaultOrUnformed.type = converted constants.%A, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_21.1 [concrete = constants.%A] // CHECK:STDOUT: %.loc10_21.2: type = converted %.loc10_21.1, %as_type [concrete = constants.%A] // CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.specific_fn: = specific_function constants.%T.as.DefaultOrUnformed.impl.Op.e3d, @T.as.DefaultOrUnformed.impl.Op(constants.%A) [concrete = constants.%T.as.DefaultOrUnformed.impl.Op.specific_fn] -// CHECK:STDOUT: %.loc10_3: ref %A = splice_block %a.var {} -// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %A to %.loc10_3 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() +// CHECK:STDOUT: %.loc10_3.1: ref %A = splice_block %a.var {} +// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %A to %.loc10_3.1 = call %T.as.DefaultOrUnformed.impl.Op.specific_fn() // CHECK:STDOUT: assign %a.var, %T.as.DefaultOrUnformed.impl.Op.call // CHECK:STDOUT: %.loc10_19: type = splice_block %A.ref [concrete = constants.%A] { // CHECK:STDOUT: %Other.ref.loc10: = name_ref Other, imports.%Other [concrete = imports.%Other] @@ -316,32 +289,18 @@ fn Run() { // CHECK:STDOUT: %.loc13: ref %A = splice_block %a.ref {} // CHECK:STDOUT: %F.call.loc13: init %A to %.loc13 = call %F.ref.loc13() // CHECK:STDOUT: assign %a.ref, %F.call.loc13 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.074, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.074, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F [from "b.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_11.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_11.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_11.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_11.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_11.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.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 ad03bed57598..b97f77904cba 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -81,15 +81,20 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -97,7 +102,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -108,24 +113,9 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc26 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -175,8 +165,8 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_5.2: = bound_method %int_0.loc26, %specific_fn.loc26 [concrete = constants.%bound_method] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc26: init %i32 = call %bound_method.loc26_5.2(%int_0.loc26) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc26: init %i32 = converted %int_0.loc26, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc26 [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %A.var, %.loc26 +// CHECK:STDOUT: %.loc26_5.1: init %i32 = converted %int_0.loc26, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc26 [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %A.var, %.loc26_5.1 // CHECK:STDOUT: %i32.loc26: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %A: ref %i32 = wrapper_binding A, %A.var // CHECK:STDOUT: name_binding_decl { @@ -190,8 +180,12 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc29_12.2: = bound_method %.loc29, %specific_fn.loc29 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc29_12.2(%.loc29) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %A.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%A.var) +// CHECK:STDOUT: %Destroy.facet.loc26_5.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc26_5.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_5.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc26_5.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc26_5.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_5.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%A.var) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: // CHECK:STDOUT: !if.else: @@ -205,14 +199,5 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: return %.loc31 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/and.carbon b/toolchain/check/testdata/operators/builtin/and.carbon index 9c5347556efb..0d3c8215fa40 100644 --- a/toolchain/check/testdata/operators/builtin/and.carbon +++ b/toolchain/check/testdata/operators/builtin/and.carbon @@ -67,23 +67,27 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %c.var_patt: %pattern_type.cb1 = var_pattern %c.patt [concrete] // CHECK:STDOUT: %d.patt: %pattern_type.cb1 = ref_binding_pattern d [concrete] // CHECK:STDOUT: %d.var_patt: %pattern_type.cb1 = var_pattern %d.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc23 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet.939: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c50: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.939) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.68f: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.e68) [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type.831 = value_param_pattern [concrete] // CHECK:STDOUT: %x.patt: %pattern_type.831 = wrapper_binding_pattern x, %x.param_patt [concrete] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [concrete] @@ -96,7 +100,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -104,38 +108,9 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.9c3: %bool.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.bda = impl_witness_table (%Core.import_ref.9c3), @bool.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc26 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc23 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -273,8 +248,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %b.var: ref %empty_tuple.type = var_storage %b.var_patt // CHECK:STDOUT: %.loc24_56.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc24_56.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc24_3: init %empty_tuple.type = converted %.loc24_56.1, %.loc24_56.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %b.var, %.loc24_3 +// CHECK:STDOUT: %.loc24_3.1: init %empty_tuple.type = converted %.loc24_56.1, %.loc24_56.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %b.var, %.loc24_3.1 // CHECK:STDOUT: br !.loc24_20 // CHECK:STDOUT: // CHECK:STDOUT: !.loc24_20: @@ -312,8 +287,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %c.var: ref %empty_tuple.type = var_storage %c.var_patt // CHECK:STDOUT: %.loc25_56.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc25_56.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc25_3: init %empty_tuple.type = converted %.loc25_56.1, %.loc25_56.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %c.var, %.loc25_3 +// CHECK:STDOUT: %.loc25_3.1: init %empty_tuple.type = converted %.loc25_56.1, %.loc25_56.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %c.var, %.loc25_3.1 // CHECK:STDOUT: br !.loc25_20 // CHECK:STDOUT: // CHECK:STDOUT: !.loc25_20: @@ -351,8 +326,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var_storage %d.var_patt // CHECK:STDOUT: %.loc26_57.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc26_57.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_3: init %empty_tuple.type = converted %.loc26_57.1, %.loc26_57.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %d.var, %.loc26_3 +// CHECK:STDOUT: %.loc26_3.1: init %empty_tuple.type = converted %.loc26_57.1, %.loc26_57.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %d.var, %.loc26_3.1 // CHECK:STDOUT: br !.loc26_20 // CHECK:STDOUT: // CHECK:STDOUT: !.loc26_20: @@ -387,46 +362,44 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %d.patt: %pattern_type.cb1 = ref_binding_pattern d [concrete = constants.%d.patt] // CHECK:STDOUT: %d.var_patt: %pattern_type.cb1 = var_pattern %d.patt [concrete = constants.%d.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc26: = bound_method %d.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc26: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc26(%d.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc25: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc25: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc25(%c.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc26_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc26_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc26_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc26_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc26_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc26_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call.loc26: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%d.var) +// CHECK:STDOUT: %Destroy.facet.loc25_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc25_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc25_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc25_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc25_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc25_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call.loc25: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc24_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc23_3.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc23_3.1: %Destroy.type = converted bool, %Destroy.facet.loc23_3.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc23_3.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc23_3.2: %Destroy.type = converted bool, %Destroy.facet.loc23_3.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %SelfDestruct.specific_fn.4: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.e68) [concrete = constants.%SelfDestruct.specific_fn.68f] +// CHECK:STDOUT: %SelfDestruct.call.loc23: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26(%self.param: ref %empty_tuple.type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @PartialConstant(%x.param: bool) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var_storage %a.var_patt // CHECK:STDOUT: %.loc30_53.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc30_53.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc30_3: init %empty_tuple.type = converted %.loc30_53.1, %.loc30_53.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %a.var, %.loc30_3 +// CHECK:STDOUT: %.loc30_3.1: init %empty_tuple.type = converted %.loc30_53.1, %.loc30_53.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %a.var, %.loc30_3.1 // CHECK:STDOUT: br !.loc30_20 // CHECK:STDOUT: // CHECK:STDOUT: !.loc30_20: @@ -461,8 +434,12 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %a.patt: %pattern_type.cb1 = ref_binding_pattern a [concrete = constants.%a.patt.728] // CHECK:STDOUT: %a.var_patt: %pattern_type.cb1 = var_pattern %a.patt [concrete = constants.%a.var_patt.06f] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc30_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc30_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc30_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc30_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc30_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc30_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index 029fb5e452ac..7bb8a6ecd03a 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -122,39 +122,41 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.02d: = bound_method %int_10.64f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.002: = bound_method %int_10.64f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_10.6a3: %i32 = int_value 10 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.6cc: %pattern_type.7dc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a12: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt.6cc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc27 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc27 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc27 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc23_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.490: %pattern_type.290 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a39: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt.490 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc23_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.982: %pattern_type.354 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2d1: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt.982 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc27 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d4d: %SubobjectDestroy.type = facet_value %ptr.a17, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b8f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d4d) [concrete] +// CHECK:STDOUT: %Destroy.facet.abb: %Destroy.type = facet_value %ptr.a17, (%DestroyImpl.impl_witness.b8f, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.690: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.abb) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.582: %SubobjectDestroy.type = facet_value %struct_type.a.b.250, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6b7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.582) [concrete] +// CHECK:STDOUT: %Destroy.facet.6bf: %Destroy.type = facet_value %struct_type.a.b.250, (%DestroyImpl.impl_witness.6b7, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.20b: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.6bf) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc19 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ec1: %SubobjectDestroy.type = facet_value %tuple.type.35f, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.df1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ec1) [concrete] +// CHECK:STDOUT: %Destroy.facet.58e: %Destroy.type = facet_value %tuple.type.35f, (%DestroyImpl.impl_witness.df1, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.269: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.58e) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -162,7 +164,7 @@ fn Main() { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -173,66 +175,9 @@ fn Main() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.06a: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.20f) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.f12)] // CHECK:STDOUT: %Copy.impl_witness_table.fb0 = impl_witness_table (%Core.import_ref.06a), @ptr.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc27 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc27 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc23_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.290 = ref_param_pattern [concrete = constants.%self.param_patt.490] -// CHECK:STDOUT: %self.patt: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a39] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.250 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.250 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc23_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.290 = ref_param_pattern [concrete = constants.%self.param_patt.490] -// CHECK:STDOUT: %self.patt: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a39] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.250 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.250 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc19 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.354 = ref_param_pattern [concrete = constants.%self.param_patt.982] -// CHECK:STDOUT: %self.patt: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2d1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.35f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.35f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc19 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.354 = ref_param_pattern [concrete = constants.%self.param_patt.982] -// CHECK:STDOUT: %self.patt: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2d1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.35f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.35f = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -253,8 +198,8 @@ fn Main() { // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_12, %specific_fn.loc16 [concrete = constants.%bound_method.832] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16: init %i32 = call %bound_method.loc16_3.2(%int_12) [concrete = constants.%int_12.32c] -// CHECK:STDOUT: %.loc16: init %i32 = converted %int_12, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16 [concrete = constants.%int_12.32c] -// CHECK:STDOUT: assign %a.var, %.loc16 +// CHECK:STDOUT: %.loc16_3.1: init %i32 = converted %int_12, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16 [concrete = constants.%int_12.32c] +// CHECK:STDOUT: assign %a.var, %.loc16_3.1 // CHECK:STDOUT: %i32.loc16: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %a: ref %i32 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -291,8 +236,8 @@ fn Main() { // CHECK:STDOUT: %tuple.elem1.loc19: ref %i32 = tuple_access %b.var, element1 // CHECK:STDOUT: %.loc19_28.5: init %i32 to %tuple.elem1.loc19 = in_place_init %.loc19_28.4 [concrete = constants.%int_2.2e0] // CHECK:STDOUT: %.loc19_28.6: init %tuple.type.35f to %b.var = tuple_init (%.loc19_28.3, %.loc19_28.5) [concrete = constants.%tuple.380] -// CHECK:STDOUT: %.loc19_3: init %tuple.type.35f = converted %.loc19_28.1, %.loc19_28.6 [concrete = constants.%tuple.380] -// CHECK:STDOUT: assign %b.var, %.loc19_3 +// CHECK:STDOUT: %.loc19_3.1: init %tuple.type.35f = converted %.loc19_28.1, %.loc19_28.6 [concrete = constants.%tuple.380] +// CHECK:STDOUT: assign %b.var, %.loc19_3.1 // CHECK:STDOUT: %.loc19_19.1: type = splice_block %.loc19_19.3 [concrete = constants.%tuple.type.35f] { // CHECK:STDOUT: %i32.loc19_11: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %i32.loc19_16: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -347,8 +292,8 @@ fn Main() { // CHECK:STDOUT: %.loc23_46.6: ref %i32 = struct_access %c.var, element1 // CHECK:STDOUT: %.loc23_46.7: init %i32 to %.loc23_46.6 = in_place_init %.loc23_46.5 [concrete = constants.%int_2.2e0] // CHECK:STDOUT: %.loc23_46.8: init %struct_type.a.b.250 to %c.var = struct_init (%.loc23_46.4, %.loc23_46.7) [concrete = constants.%struct.940] -// CHECK:STDOUT: %.loc23_3: init %struct_type.a.b.250 = converted %.loc23_46.1, %.loc23_46.8 [concrete = constants.%struct.940] -// CHECK:STDOUT: assign %c.var, %.loc23_3 +// CHECK:STDOUT: %.loc23_3.1: init %struct_type.a.b.250 = converted %.loc23_46.1, %.loc23_46.8 [concrete = constants.%struct.940] +// CHECK:STDOUT: assign %c.var, %.loc23_3.1 // CHECK:STDOUT: %.loc23_27: type = splice_block %struct_type.a.b [concrete = constants.%struct_type.a.b.250] { // CHECK:STDOUT: %i32.loc23_15: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %i32.loc23_24: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -388,7 +333,7 @@ fn Main() { // CHECK:STDOUT: %bound_method.loc27_17.2: = bound_method %addr.loc27, %specific_fn.loc27 // CHECK:STDOUT: %ptr.as.Copy.impl.Op.call: init %ptr.a17 = call %bound_method.loc27_17.2(%addr.loc27) // CHECK:STDOUT: assign %p.var, %ptr.as.Copy.impl.Op.call -// CHECK:STDOUT: %.loc27: type = splice_block %ptr [concrete = constants.%ptr.a17] { +// CHECK:STDOUT: %.loc27_13: type = splice_block %ptr [concrete = constants.%ptr.a17] { // CHECK:STDOUT: %i32.loc27: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32.loc27 [concrete = constants.%ptr.a17] // CHECK:STDOUT: } @@ -432,78 +377,74 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc30: init %i32 = call %bound_method.loc30_29.2(%int_10) [concrete = constants.%int_10.6a3] // CHECK:STDOUT: %.loc30_29: init %i32 = converted %int_10, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc30 [concrete = constants.%int_10.6a3] // CHECK:STDOUT: assign %.loc30_3, %.loc30_29 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc27: = bound_method %p.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc27(%p.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23(%c.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc27_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc27_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc27_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc27_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc27_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc27_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abb) [concrete = constants.%SelfDestruct.specific_fn.690] +// CHECK:STDOUT: %SelfDestruct.call.loc27: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%p.var) +// CHECK:STDOUT: %Destroy.facet.loc23_3.1: %Destroy.type = facet_value constants.%struct_type.a.b.250, (constants.%DestroyImpl.impl_witness.6b7, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %.loc23_3.2: %Destroy.type = converted constants.%struct_type.a.b.250, %Destroy.facet.loc23_3.1 [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %Destroy.facet.loc23_3.2: %Destroy.type = facet_value constants.%struct_type.a.b.250, (constants.%DestroyImpl.impl_witness.6b7, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %.loc23_3.3: %Destroy.type = converted constants.%struct_type.a.b.250, %Destroy.facet.loc23_3.2 [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.6bf) [concrete = constants.%SelfDestruct.specific_fn.20b] +// CHECK:STDOUT: %SelfDestruct.call.loc23: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc19_3.1: %Destroy.type = facet_value constants.%tuple.type.35f, (constants.%DestroyImpl.impl_witness.df1, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %.loc19_3.2: %Destroy.type = converted constants.%tuple.type.35f, %Destroy.facet.loc19_3.1 [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %Destroy.facet.loc19_3.2: %Destroy.type = facet_value constants.%tuple.type.35f, (constants.%DestroyImpl.impl_witness.df1, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %.loc19_3.3: %Destroy.type = converted constants.%tuple.type.35f, %Destroy.facet.loc19_3.2 [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.58e) [concrete = constants.%SelfDestruct.specific_fn.269] +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.4: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc27(%self.param: ref %ptr.a17) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc27(%self.param: ref %ptr.a17) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc27(%self.param: ref %ptr.a17) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc27(%self.param: ref %ptr.a17) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23_3.2(%self.param: ref %struct_type.a.b.250) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23_3.2(%self.param: ref %struct_type.a.b.250) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc23_3.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23_3.1: = bound_method %.loc23_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23_3.1(%.loc23_3.1) -// CHECK:STDOUT: %.loc23_3.2: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23_3.2: = bound_method %.loc23_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23_3.2(%.loc23_3.2) +// CHECK:STDOUT: %Destroy.facet.loc23_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc23_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc23_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc23_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc23_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc23_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc23_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc23_3.1) +// CHECK:STDOUT: %.loc23_3.4: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc23_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc23_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc23_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc23_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc23_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc23_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc23_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc23_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23_3.2(%self.param: ref %struct_type.a.b.250) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23_3.2(%self.param: ref %struct_type.a.b.250) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19(%self.param: ref %tuple.type.35f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc19(%self.param: ref %tuple.type.35f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc19_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc19_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc19_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc19_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc19_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc19_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc19_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19_3.2(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19(%self.param: ref %tuple.type.35f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19(%self.param: ref %tuple.type.35f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc19_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc19_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc19_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc19_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc19_3.4: %Destroy.type = converted constants.%i32, %Destroy.facet.loc19_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc19_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon index 54e02c16ceb3..f2fd4f46b800 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon @@ -53,18 +53,19 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %false: bool = bool_literal false [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Bool = %Core.Bool -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Bool: type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = bool] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -174,18 +175,19 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: %false: bool = bool_literal false [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Bool = %Core.Bool -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Bool: type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = bool] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { 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 6f543d1993e7..43b449f7607b 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 @@ -136,15 +136,20 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.02d: = bound_method %int_10.64f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.002: = bound_method %int_10.64f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_10.6a3: %i32 = int_value 10 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc42 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc42 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc42 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc42 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -153,7 +158,7 @@ fn Main() { // CHECK:STDOUT: .Copy = %Core.Copy // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .DefaultOrUnformed = %Core.DefaultOrUnformed -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -169,24 +174,9 @@ fn Main() { // CHECK:STDOUT: %Core.DefaultOrUnformed: type = import_ref Core//prelude/parts/default, DefaultOrUnformed, loaded [concrete = constants.%DefaultOrUnformed.type] // CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc42 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc42 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -256,8 +246,8 @@ fn Main() { // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_3.2: = bound_method %int_0, %specific_fn.loc27 [concrete = constants.%bound_method.036] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc27: init %i32 = call %bound_method.loc27_3.2(%int_0) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc27: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc27 [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %n.var, %.loc27 +// CHECK:STDOUT: %.loc27_3.1: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc27 [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %n.var, %.loc27_3.1 // CHECK:STDOUT: %i32.loc27: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %n: ref %i32 = wrapper_binding n, %n.var // CHECK:STDOUT: name_binding_decl { @@ -393,21 +383,20 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc45: init %i32 = call %bound_method.loc45_27.2(%int_10) [concrete = constants.%int_10.6a3] // CHECK:STDOUT: %.loc45_27: init %i32 = converted %int_10, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc45 [concrete = constants.%int_10.6a3] // CHECK:STDOUT: assign %.loc45_4, %.loc45_27 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc42: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc42: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc42(%a.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc27: = bound_method %n.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc27(%n.var) +// CHECK:STDOUT: %Destroy.facet.loc42_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc42_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc42_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc42_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc42_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc42_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc42: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc27_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc27_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc27_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc27_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc27_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc27_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc27: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%n.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc42(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc42(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc42(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc42(%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 c11b1f295168..d4eeea687db6 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -75,15 +75,20 @@ fn Main() { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -91,7 +96,7 @@ fn Main() { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -102,24 +107,9 @@ fn Main() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc18 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -162,8 +152,8 @@ fn Main() { // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %int_3, %specific_fn.loc18 [concrete = constants.%bound_method.fb0] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc18_3.2(%int_3) [concrete = constants.%int_3.9f3] -// CHECK:STDOUT: %.loc18: init %i32 = converted %int_3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.9f3] -// CHECK:STDOUT: assign %a.var, %.loc18 +// CHECK:STDOUT: %.loc18_3.1: init %i32 = converted %int_3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.9f3] +// CHECK:STDOUT: assign %a.var, %.loc18_3.1 // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %a: ref %i32 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -185,19 +175,14 @@ fn Main() { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref() // CHECK:STDOUT: assign %a.ref.loc24_3, %F.call -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon index cd729370d1e1..2e0d16aeb850 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon @@ -32,45 +32,35 @@ fn Main() { // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc19 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Bool: type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = bool] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc19 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc19 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -95,19 +85,14 @@ fn Main() { // CHECK:STDOUT: %x.patt: %pattern_type.831 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.831 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc19_3.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc19_3.1: %Destroy.type = converted bool, %Destroy.facet.loc19_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc19_3.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc19_3.2: %Destroy.type = converted bool, %Destroy.facet.loc19_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc19(%self.param: ref bool) = "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 a9a873ba9269..9dc3fc350ccd 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -52,22 +52,27 @@ fn Main() { // CHECK:STDOUT: %bound_method: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.9f3: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 56e-1 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -75,24 +80,9 @@ fn Main() { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -113,8 +103,8 @@ fn Main() { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc16_3.2(%int_3) [concrete = constants.%int_3.9f3] -// CHECK:STDOUT: %.loc16: init %i32 = converted %int_3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.9f3] -// CHECK:STDOUT: assign %a.var, %.loc16 +// CHECK:STDOUT: %.loc16_3.1: init %i32 = converted %int_3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.9f3] +// CHECK:STDOUT: assign %a.var, %.loc16_3.1 // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %a: ref %i32 = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -125,19 +115,14 @@ fn Main() { // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 56e-1 [concrete = constants.%float] // CHECK:STDOUT: %.loc20: %i32 = converted %float, [concrete = ] // CHECK:STDOUT: assign %a.ref, -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/or.carbon b/toolchain/check/testdata/operators/builtin/or.carbon index bac5cc3594c9..ac75c6605b61 100644 --- a/toolchain/check/testdata/operators/builtin/or.carbon +++ b/toolchain/check/testdata/operators/builtin/or.carbon @@ -67,23 +67,27 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %d.patt: %pattern_type.cb1 = ref_binding_pattern d [concrete] // CHECK:STDOUT: %d.var_patt: %pattern_type.cb1 = var_pattern %d.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc25 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc25 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc25 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet.939: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c50: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.939) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc25 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.68f: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.e68) [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type.831 = value_param_pattern [concrete] // CHECK:STDOUT: %x.patt: %pattern_type.831 = wrapper_binding_pattern x, %x.param_patt [concrete] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [concrete] @@ -96,7 +100,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -104,38 +108,9 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.9c3: %bool.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.bda = impl_witness_table (%Core.import_ref.9c3), @bool.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc26 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc25 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc25 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -357,8 +332,8 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var_storage %d.var_patt // CHECK:STDOUT: %.loc26_56.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc26_56.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc26_3: init %empty_tuple.type = converted %.loc26_56.1, %.loc26_56.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %d.var, %.loc26_3 +// CHECK:STDOUT: %.loc26_3.1: init %empty_tuple.type = converted %.loc26_56.1, %.loc26_56.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %d.var, %.loc26_3.1 // CHECK:STDOUT: br !.loc26_20 // CHECK:STDOUT: // CHECK:STDOUT: !.loc26_20: @@ -394,38 +369,36 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %d.patt: %pattern_type.cb1 = ref_binding_pattern d [concrete = constants.%d.patt] // CHECK:STDOUT: %d.var_patt: %pattern_type.cb1 = var_pattern %d.patt [concrete = constants.%d.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc26: = bound_method %d.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc26: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc26(%d.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc25: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc25: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc25(%c.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc26_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc26_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc26_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc26_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc26_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc26_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call.loc26: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%d.var) +// CHECK:STDOUT: %Destroy.facet.loc25_3.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc25_3.1: %Destroy.type = converted bool, %Destroy.facet.loc25_3.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc25_3.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc25_3.2: %Destroy.type = converted bool, %Destroy.facet.loc25_3.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.e68) [concrete = constants.%SelfDestruct.specific_fn.68f] +// CHECK:STDOUT: %SelfDestruct.call.loc25: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc24_3.1: %Destroy.type = converted bool, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted bool, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.e68) [concrete = constants.%SelfDestruct.specific_fn.68f] +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc23_3.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc23_3.1: %Destroy.type = converted bool, %Destroy.facet.loc23_3.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc23_3.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc23_3.2: %Destroy.type = converted bool, %Destroy.facet.loc23_3.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %SelfDestruct.specific_fn.4: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.e68) [concrete = constants.%SelfDestruct.specific_fn.68f] +// CHECK:STDOUT: %SelfDestruct.call.loc23: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26(%self.param: ref %empty_tuple.type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc25(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc25(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc25(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc25(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @PartialConstant(%x.param: bool) { // CHECK:STDOUT: !entry: @@ -470,8 +443,12 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %a.patt: %pattern_type.831 = ref_binding_pattern a [concrete = constants.%a.patt.d4ccad.2] // CHECK:STDOUT: %a.var_patt: %pattern_type.831 = var_pattern %a.patt [concrete = constants.%a.var_patt.41b89c.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc30_3.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc30_3.1: %Destroy.type = converted bool, %Destroy.facet.loc30_3.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc30_3.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc30_3.2: %Destroy.type = converted bool, %Destroy.facet.loc30_3.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.e68) [concrete = constants.%SelfDestruct.specific_fn.68f] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/unary_op.carbon b/toolchain/check/testdata/operators/builtin/unary_op.carbon index 8b9214c9cb2f..12ad23d33d60 100644 --- a/toolchain/check/testdata/operators/builtin/unary_op.carbon +++ b/toolchain/check/testdata/operators/builtin/unary_op.carbon @@ -57,30 +57,34 @@ fn Constant() { // CHECK:STDOUT: %b.patt.454: %pattern_type.831 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.831 = var_pattern %b.patt.454 [concrete] // CHECK:STDOUT: %bool.as.Copy.impl.Op.bound: = bound_method %true, %bool.as.Copy.impl.Op [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.40d: %pattern_type.831 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.560: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt.40d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc23 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc23 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc23 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.a87: %SubobjectDestroy.type = facet_value bool, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.778: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.a87) [concrete] +// CHECK:STDOUT: %Destroy.facet.e68: %Destroy.type = facet_value bool, (%DestroyImpl.impl_witness.778, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.68f: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.e68) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc23 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet.939: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c50: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.939) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -88,38 +92,9 @@ fn Constant() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.9c3: %bool.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.bda = impl_witness_table (%Core.import_ref.9c3), @bool.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc24 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.831 = ref_param_pattern [concrete = constants.%self.param_patt.40d] -// CHECK:STDOUT: %self.patt: %pattern_type.831 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.560] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref bool = ref_param call_param0 -// CHECK:STDOUT: %self: ref bool = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc23 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc23 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -173,8 +148,8 @@ fn Constant() { // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var_storage %a.var_patt // CHECK:STDOUT: %.loc23_50.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc23_50.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc23_3: init %empty_tuple.type = converted %.loc23_50.1, %.loc23_50.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %a.var, %.loc23_3 +// CHECK:STDOUT: %.loc23_3.1: init %empty_tuple.type = converted %.loc23_50.1, %.loc23_50.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %a.var, %.loc23_3.1 // CHECK:STDOUT: br !.loc23_24 // CHECK:STDOUT: // CHECK:STDOUT: !.loc23_24: @@ -233,34 +208,24 @@ fn Constant() { // CHECK:STDOUT: %b.patt: %pattern_type.831 = ref_binding_pattern b [concrete = constants.%b.patt.454] // CHECK:STDOUT: %b.var_patt: %pattern_type.831 = var_pattern %b.patt [concrete = constants.%b.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc24_3.1: %Destroy.type = converted bool, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value bool, (constants.%DestroyImpl.impl_witness.778, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted bool, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.e68] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.e68) [concrete = constants.%SelfDestruct.specific_fn.68f] +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc23_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc23_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc23_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc23_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc23_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc23_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call.loc23: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24(%self.param: ref bool) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24(%self.param: ref bool) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24(%self.param: ref bool) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24(%self.param: ref bool) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc23(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc23(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc23(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc23(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon index 1a0e7e54ad1a..42b0276ff11d 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -70,22 +70,20 @@ fn TestRef(b: C) { // CHECK:STDOUT: %AddAssignWith.type.2fb: type = generic_interface_type @AddAssignWith [concrete] // CHECK:STDOUT: %AddAssignWith.generic: %AddAssignWith.type.2fb = struct_value () [concrete] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc32_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc32_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.26a: %pattern_type.4a7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.076: %pattern_type.4a7 = wrapper_binding_pattern self, %self.param_patt.26a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc32_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc32_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc32_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc32_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.076: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6fa: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.076) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.6fa, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -94,7 +92,7 @@ fn TestRef(b: C) { // CHECK:STDOUT: .AddWith = %Core.AddWith // CHECK:STDOUT: .AddAssignWith = %Core.AddAssignWith // CHECK:STDOUT: .Inc = %Core.Inc -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -102,38 +100,9 @@ fn TestRef(b: C) { // CHECK:STDOUT: %Core.AddWith: %AddWith.type.2ef = import_ref Core//prelude/operators/arithmetic, AddWith, loaded [concrete = constants.%AddWith.generic] // CHECK:STDOUT: %Core.AddAssignWith: %AddAssignWith.type.2fb = import_ref Core//prelude/operators/arithmetic, AddAssignWith, loaded [concrete = constants.%AddAssignWith.generic] // CHECK:STDOUT: %Core.Inc: type = import_ref Core//prelude/operators/arithmetic, Inc, loaded [concrete = constants.%Inc.type] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc32_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc32_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc32_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4a7 = ref_param_pattern [concrete = constants.%self.param_patt.26a] -// CHECK:STDOUT: %self.patt: %pattern_type.4a7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.076] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc32_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.4a7 = ref_param_pattern [concrete = constants.%self.param_patt.26a] -// CHECK:STDOUT: %self.patt: %pattern_type.4a7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.076] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -215,8 +184,8 @@ fn TestRef(b: C) { // CHECK:STDOUT: %a.var: ref %C = var_storage %a.var_patt // CHECK:STDOUT: %.loc32_15.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc32_15.2: init %C to %a.var = class_init () [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc32_3: init %C = converted %.loc32_15.1, %.loc32_15.2 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %a.var, %.loc32_3 +// CHECK:STDOUT: %.loc32_3.1: init %C = converted %.loc32_15.1, %.loc32_15.2 [concrete = constants.%C.val] +// CHECK:STDOUT: assign %a.var, %.loc32_3.1 // CHECK:STDOUT: %C.ref.loc32: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %a: ref %C = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -226,30 +195,16 @@ fn TestRef(b: C) { // CHECK:STDOUT: %a.ref.loc35: ref %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b // CHECK:STDOUT: %a.ref.loc38: ref %C = name_ref a, %a -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc32_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.6fa, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc32_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc32_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc32_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.6fa, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc32_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc32_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc32_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc32_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc32_3.2(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc32_3.2(%self.param: ref %C) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc32_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc32_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 46157f761ea5..20c8040389d3 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -55,7 +55,7 @@ fn Test() { // CHECK:STDOUT: %complete_type.31e: = complete_type_witness %struct_type.n [concrete] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.9a5: type = pattern_type type [concrete] +// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete] // CHECK:STDOUT: %ImplicitAs.type.3d3: type = facet_type <@ImplicitAs, @ImplicitAs(%X)> [concrete] // CHECK:STDOUT: %.5c9: = impl_self_witness %i32, @ImplicitAs, @ImplicitAs(%X) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.ffc: = impl_witness @i32.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] @@ -73,7 +73,7 @@ fn Test() { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.3c1: %Int.as.Copy.impl.Op.type.a1d = struct_value () [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %T.patt.3a0: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Copy.impl_witness.8af: = impl_witness imports.%Copy.impl_witness_table.f44, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.648: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.cae: %Int.as.Copy.impl.Op.type.648 = struct_value () [concrete] @@ -114,30 +114,27 @@ fn Test() { // CHECK:STDOUT: %Test: %Test.type = struct_value () [concrete] // CHECK:STDOUT: %Source.specific_fn.e1e: = specific_function %Source, @Source(%X) [concrete] // CHECK:STDOUT: %.71a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.002, %ImplicitAs.facet.f4e [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_20.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc34_20.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc34_20.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.5c4: type = pattern_type %struct_type.n [concrete] -// CHECK:STDOUT: %self.param_patt.d03: %pattern_type.5c4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.3cd: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt.d03 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_20.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc34_20.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc34_20.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc34_20.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc34_20.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc34_20.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc34_20.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc5) [concrete] +// CHECK:STDOUT: %Destroy.facet.689: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.e12, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.399: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.689) [concrete] // CHECK:STDOUT: %Source.specific_fn.9c9: = specific_function %Source, @Source(%i32) [concrete] // CHECK:STDOUT: %.809: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.4ef, %ImplicitAs.facet.0ed [concrete] // CHECK:STDOUT: } @@ -147,7 +144,7 @@ fn Test() { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -156,52 +153,9 @@ fn Test() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_20.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc34_20.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_20.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc34_20.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5c4 = ref_param_pattern [concrete = constants.%self.param_patt.d03] -// CHECK:STDOUT: %self.patt: %pattern_type.5c4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.3cd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.n = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.n = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc34_20.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc34_20.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -248,7 +202,7 @@ fn Test() { // CHECK:STDOUT: %x: %X = wrapper_binding x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %Source.decl: %Source.type = fn_decl @Source [concrete = constants.%Source] { -// CHECK:STDOUT: %T.patt.loc31_20.1: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc31_20.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc31_20.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc31_20.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %return.param_patt.loc31_31.1: @Source.%pattern_type (%pattern_type.51d1c4.2) = out_param_pattern [symbolic = %return.param_patt.loc31_31.2 (constants.%return.param_patt.41d2d9.2)] // CHECK:STDOUT: %return.patt.loc31_28.1: @Source.%pattern_type (%pattern_type.51d1c4.2) = return_slot_pattern %return.param_patt.loc31_31.1, %T.ref.loc31_31 [symbolic = %return.patt.loc31_28.2 (constants.%return.patt.b39)] // CHECK:STDOUT: } { @@ -362,7 +316,7 @@ fn Test() { // CHECK:STDOUT: fn @Sink_X(%x.param: %X); // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Source(%T.loc31_20.2: type) { -// CHECK:STDOUT: %T.patt.loc31_20.2: %pattern_type.9a5 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc31_20.2 (constants.%T.patt.3a0)] +// CHECK:STDOUT: %T.patt.loc31_20.2: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc31_20.2 (constants.%T.patt.3a0592.1)] // CHECK:STDOUT: %T.loc31_20.1: type = symbolic_binding T, 0 [symbolic = %T.loc31_20.1 (constants.%T.67d)] // CHECK:STDOUT: %.loc31_31.2: Core.Form = init_form %T.loc31_20.1 [symbolic = %.loc31_31.2 (constants.%.184347.2)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T.loc31_20.1 [symbolic = %pattern_type (constants.%pattern_type.51d1c4.2)] @@ -400,8 +354,12 @@ fn Test() { // CHECK:STDOUT: %.loc34_20.4: %i32 = value_of_initializer %X.as.ImplicitAs.impl.Convert.call // CHECK:STDOUT: %.loc34_20.5: %i32 = converted %Source.call.loc34, %.loc34_20.4 // CHECK:STDOUT: %Sink_i32.call: init %empty_tuple.type = call %Sink_i32.ref(%.loc34_20.5) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc34: = bound_method %.loc34_20.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc34: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc34(%.loc34_20.2) +// CHECK:STDOUT: %Destroy.facet.loc34_20.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc34_20.6: %Destroy.type = converted constants.%X, %Destroy.facet.loc34_20.1 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc34_20.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc34_20.7: %Destroy.type = converted constants.%X, %Destroy.facet.loc34_20.2 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.689) [concrete = constants.%SelfDestruct.specific_fn.399] +// CHECK:STDOUT: %SelfDestruct.call.loc34: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc34_20.2) // CHECK:STDOUT: %Sink_X.ref: %Sink_X.type = name_ref Sink_X, file.%Sink_X.decl [concrete = constants.%Sink_X] // CHECK:STDOUT: %Source.ref.loc35: %Source.type = name_ref Source, file.%Source.decl [concrete = constants.%Source] // CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -417,59 +375,44 @@ fn Test() { // CHECK:STDOUT: %.loc35_20.5: ref %X = temporary %.loc35_20.1, %.loc35_20.4 // CHECK:STDOUT: %.loc35_20.6: %X = acquire_value %.loc35_20.5 // CHECK:STDOUT: %Sink_X.call: init %empty_tuple.type = call %Sink_X.ref(%.loc35_20.6) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc35: = bound_method %.loc35_20.5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc35: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc35(%.loc35_20.5) +// CHECK:STDOUT: %Destroy.facet.loc35_20.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc35_20.7: %Destroy.type = converted constants.%X, %Destroy.facet.loc35_20.1 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %Destroy.facet.loc35_20.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %.loc35_20.8: %Destroy.type = converted constants.%X, %Destroy.facet.loc35_20.2 [concrete = constants.%Destroy.facet.689] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.689) [concrete = constants.%SelfDestruct.specific_fn.399] +// CHECK:STDOUT: %SelfDestruct.call.loc35: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc35_20.5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_20.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_20.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_20.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_20.1(%self.param: ref %i32) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_20.2(%self.param: ref %struct_type.n) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) +// CHECK:STDOUT: %.loc34_20.1: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc34_20.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc34_20.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc34_20.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc34_20.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc34_20.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc34_20.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc34_20.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_20.2(%self.param: ref %struct_type.n) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc34: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc34, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc34) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_20.2(%self.param: ref %struct_type.n) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_20.2(%self.param: ref %struct_type.n) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc34_20.3(%self.param: ref %X) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc34_20.3(%self.param: ref %X) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %X.elem = name_ref n, @X.%field_decl [concrete = @X.%field_decl] -// CHECK:STDOUT: %.loc34: ref %i32 = class_element_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc34, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc34) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc34_20.3(%self.param: ref %X) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc34_20.3(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %.loc34_20.1: ref %i32 = class_element_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc34_20.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc34_20.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc34_20.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc34_20.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc34_20.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc34_20.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc34_20.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(constants.%T.67d) { -// CHECK:STDOUT: %T.patt.loc31_20.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc31_20.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc31_20.1 => constants.%T.67d // CHECK:STDOUT: %.loc31_31.2 => constants.%.184347.2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.2 @@ -482,7 +425,7 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(constants.%X) { -// CHECK:STDOUT: %T.patt.loc31_20.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc31_20.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc31_20.1 => constants.%X // CHECK:STDOUT: %.loc31_31.2 => constants.%.325 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6cb @@ -495,7 +438,7 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(constants.%i32) { -// CHECK:STDOUT: %T.patt.loc31_20.2 => constants.%T.patt.3a0 +// CHECK:STDOUT: %T.patt.loc31_20.2 => constants.%T.patt.3a0592.1 // CHECK:STDOUT: %T.loc31_20.1 => constants.%i32 // CHECK:STDOUT: %.loc31_31.2 => constants.%.0b3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d94 diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 0335d5627b6b..509188663629 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -200,15 +200,20 @@ fn Main() { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -216,7 +221,7 @@ fn Main() { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -227,24 +232,9 @@ fn Main() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -273,8 +263,8 @@ fn Main() { // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn.loc7 [concrete = constants.%bound_method.3bd] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc7_3.2(%int_1) [concrete = constants.%int_1.68a] -// CHECK:STDOUT: %.loc7: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a] -// CHECK:STDOUT: assign %x.var, %.loc7 +// CHECK:STDOUT: %.loc7_3.1: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a] +// CHECK:STDOUT: assign %x.var, %.loc7_3.1 // CHECK:STDOUT: %i32.loc7: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %x: ref %i32 = wrapper_binding x, %x.var // CHECK:STDOUT: name_binding_decl { @@ -284,12 +274,12 @@ fn Main() { // CHECK:STDOUT: %y.var: ref %i32 = var_storage %y.var_patt // CHECK:STDOUT: %package.ref: = name_ref package, package [concrete = package] // CHECK:STDOUT: %x.ref: ref %i32 = name_ref x, file.%x [concrete = file.%x.var] -// CHECK:STDOUT: %.loc9: %i32 = acquire_value %x.ref +// CHECK:STDOUT: %.loc9_30: %i32 = acquire_value %x.ref // CHECK:STDOUT: %impl.elem0.loc9: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae] -// CHECK:STDOUT: %bound_method.loc9_30.1: = bound_method %.loc9, %impl.elem0.loc9 +// CHECK:STDOUT: %bound_method.loc9_30.1: = bound_method %.loc9_30, %impl.elem0.loc9 // CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] -// CHECK:STDOUT: %bound_method.loc9_30.2: = bound_method %.loc9, %specific_fn.loc9 -// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc9_30.2(%.loc9) +// CHECK:STDOUT: %bound_method.loc9_30.2: = bound_method %.loc9_30, %specific_fn.loc9 +// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc9_30.2(%.loc9_30) // CHECK:STDOUT: assign %y.var, %Int.as.Copy.impl.Op.call // CHECK:STDOUT: %i32.loc9: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %y: ref %i32 = wrapper_binding y, %y.var @@ -297,23 +287,22 @@ fn Main() { // CHECK:STDOUT: %y.patt: %pattern_type.d94 = ref_binding_pattern y [concrete = constants.%y.patt] // CHECK:STDOUT: %y.var_patt: %pattern_type.d94 = var_pattern %y.patt [concrete = constants.%y.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc9: = bound_method %y.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc9(%y.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%y.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%x.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/patterns/underscore.carbon b/toolchain/check/testdata/patterns/underscore.carbon index 8c574afca6d2..478608b07026 100644 --- a/toolchain/check/testdata/patterns/underscore.carbon +++ b/toolchain/check/testdata/patterns/underscore.carbon @@ -109,41 +109,31 @@ fn F() -> {} { // CHECK:STDOUT: %_.patt.bc9: %pattern_type.a96 = value_binding_pattern _ [concrete] // CHECK:STDOUT: %_.patt.3b4: %pattern_type.a96 = ref_binding_pattern _ [concrete] // CHECK:STDOUT: %_.var_patt.f52: %pattern_type.a96 = var_pattern %_.patt.3b4 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6b7: %SubobjectDestroy.type = facet_value %empty_struct_type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.011: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6b7) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_struct_type, (%DestroyImpl.impl_witness.011, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -191,8 +181,8 @@ fn F() -> {} { // CHECK:STDOUT: %_.var: ref %empty_struct_type = var_storage %_.var_patt // CHECK:STDOUT: %.loc9_16.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_16.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc9_3: init %empty_struct_type = converted %.loc9_16.1, %.loc9_16.2 [concrete = constants.%empty_struct] -// CHECK:STDOUT: assign %_.var, %.loc9_3 +// CHECK:STDOUT: %.loc9_3.1: init %empty_struct_type = converted %.loc9_16.1, %.loc9_16.2 [concrete = constants.%empty_struct] +// CHECK:STDOUT: assign %_.var, %.loc9_3.1 // CHECK:STDOUT: %.loc9_11.1: type = splice_block %.loc9_11.3 [concrete = constants.%empty_struct_type] { // CHECK:STDOUT: %.loc9_11.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_11.3: type = converted %.loc9_11.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -202,21 +192,16 @@ fn F() -> {} { // CHECK:STDOUT: %_.patt.loc9: %pattern_type.a96 = ref_binding_pattern _ [concrete = constants.%_.patt.3b4] // CHECK:STDOUT: %_.var_patt: %pattern_type.a96 = var_pattern %_.patt.loc9 [concrete = constants.%_.var_patt.f52] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %_.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%_.var) +// CHECK:STDOUT: %Destroy.facet.loc9_3.1: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.2: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc9_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc9_3.2: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc9_3.3: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc9_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%_.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc9(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index ed0e670befe4..b15fb5ab6ce7 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -63,15 +63,20 @@ fn F() -> i32 { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,7 +84,7 @@ fn F() -> i32 { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -90,24 +95,9 @@ fn F() -> i32 { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -136,8 +126,8 @@ fn F() -> i32 { // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_0, %specific_fn.loc16 [concrete = constants.%bound_method] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc16_3.2(%int_0) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc16: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %n.var, %.loc16 +// CHECK:STDOUT: %.loc16_3.1: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %n.var, %.loc16_3.1 // CHECK:STDOUT: %i32.loc16: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %n: ref %i32 = wrapper_binding n, %n.var // CHECK:STDOUT: name_binding_decl { @@ -155,19 +145,14 @@ fn F() -> i32 { // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_10.2: = bound_method %.loc17_10.2, %specific_fn.loc17 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc17_10.2(%.loc17_10.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %n.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%n.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%n.var) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16(%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 1d2483fbf35f..fc8b530f160c 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -57,7 +57,6 @@ fn F() { // CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.3bd: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] @@ -96,8 +95,8 @@ fn F() { // CHECK:STDOUT: %tuple.be9: %tuple.type.693 = tuple_value (%i32, %i32) [concrete] // CHECK:STDOUT: %tuple.type.35f: type = tuple_type (%i32, %i32) [concrete] // CHECK:STDOUT: %pattern_type.354: type = pattern_type %tuple.type.35f [concrete] -// CHECK:STDOUT: %t.patt: %pattern_type.354 = ref_binding_pattern t [concrete] -// CHECK:STDOUT: %t.var_patt: %pattern_type.354 = var_pattern %t.patt [concrete] +// CHECK:STDOUT: %t.patt.b37: %pattern_type.354 = ref_binding_pattern t [concrete] +// CHECK:STDOUT: %t.var_patt: %pattern_type.354 = var_pattern %t.patt.b37 [concrete] // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.ad8: %tuple.type.f94 = tuple_value (%int_1.5b8, %int_2.ecc) [concrete] // CHECK:STDOUT: %tuple.380: %tuple.type.35f = tuple_value (%int_1.68a, %int_2.2e0) [concrete] @@ -106,47 +105,48 @@ fn F() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %t1.patt: %pattern_type.7dc = ref_binding_pattern t1 [concrete] // CHECK:STDOUT: %t1.var_patt: %pattern_type.7dc = var_pattern %t1.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.6cc: %pattern_type.7dc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a12: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt.6cc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc24 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc22_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.982: %pattern_type.354 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2d1: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt.982 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc22_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc22_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc22_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.f11: %pattern_type.b62 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a94: %pattern_type.b62 = wrapper_binding_pattern self, %self.param_patt.f11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.490: %pattern_type.290 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a39: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt.490 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc24 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d4d: %SubobjectDestroy.type = facet_value %ptr.a17, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b8f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d4d) [concrete] +// CHECK:STDOUT: %Destroy.facet.abb: %Destroy.type = facet_value %ptr.a17, (%DestroyImpl.impl_witness.b8f, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.690: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.abb) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc22_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc22_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ec1: %SubobjectDestroy.type = facet_value %tuple.type.35f, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.df1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ec1) [concrete] +// CHECK:STDOUT: %Destroy.facet.58e: %Destroy.type = facet_value %tuple.type.35f, (%DestroyImpl.impl_witness.df1, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.269: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.58e) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.8c0: %SubobjectDestroy.type = facet_value %ptr.aa2, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.fe7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.8c0) [concrete] +// CHECK:STDOUT: %Destroy.facet.75c: %Destroy.type = facet_value %ptr.aa2, (%DestroyImpl.impl_witness.fe7, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3d5: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.75c) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.582: %SubobjectDestroy.type = facet_value %struct_type.a.b.250, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6b7: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.582) [concrete] +// CHECK:STDOUT: %Destroy.facet.6bf: %Destroy.type = facet_value %struct_type.a.b.250, (%DestroyImpl.impl_witness.6b7, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.20b: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.6bf) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -154,7 +154,7 @@ fn F() { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -165,80 +165,9 @@ fn F() { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.06a: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.20f) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.f12)] // CHECK:STDOUT: %Copy.impl_witness_table.fb0 = impl_witness_table (%Core.import_ref.06a), @ptr.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc24 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc24 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc22_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc22_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.354 = ref_param_pattern [concrete = constants.%self.param_patt.982] -// CHECK:STDOUT: %self.patt: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2d1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.35f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.35f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc22_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.354 = ref_param_pattern [concrete = constants.%self.param_patt.982] -// CHECK:STDOUT: %self.patt: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2d1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.35f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.35f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b62 = ref_param_pattern [concrete = constants.%self.param_patt.f11] -// CHECK:STDOUT: %self.patt: %pattern_type.b62 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a94] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.aa2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.aa2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc18 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.b62 = ref_param_pattern [concrete = constants.%self.param_patt.f11] -// CHECK:STDOUT: %self.patt: %pattern_type.b62 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a94] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.aa2 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.aa2 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.290 = ref_param_pattern [concrete = constants.%self.param_patt.490] -// CHECK:STDOUT: %self.patt: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a39] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.250 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.250 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.290 = ref_param_pattern [concrete = constants.%self.param_patt.490] -// CHECK:STDOUT: %self.patt: %pattern_type.290 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a39] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.250 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.250 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -273,8 +202,8 @@ fn F() { // CHECK:STDOUT: %.loc16_46.6: ref %i32 = struct_access %s.var, element1 // CHECK:STDOUT: %.loc16_46.7: init %i32 to %.loc16_46.6 = in_place_init %.loc16_46.5 [concrete = constants.%int_2.2e0] // CHECK:STDOUT: %.loc16_46.8: init %struct_type.a.b.250 to %s.var = struct_init (%.loc16_46.4, %.loc16_46.7) [concrete = constants.%struct.940] -// CHECK:STDOUT: %.loc16_3: init %struct_type.a.b.250 = converted %.loc16_46.1, %.loc16_46.8 [concrete = constants.%struct.940] -// CHECK:STDOUT: assign %s.var, %.loc16_3 +// CHECK:STDOUT: %.loc16_3.1: init %struct_type.a.b.250 = converted %.loc16_46.1, %.loc16_46.8 [concrete = constants.%struct.940] +// CHECK:STDOUT: assign %s.var, %.loc16_3.1 // CHECK:STDOUT: %.loc16_27: type = splice_block %struct_type.a.b.loc16 [concrete = constants.%struct_type.a.b.250] { // CHECK:STDOUT: %i32.loc16_15: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %i32.loc16_24: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -294,7 +223,7 @@ fn F() { // CHECK:STDOUT: %bound_method.loc18_39.2: = bound_method %addr.loc18, %specific_fn.loc18 // CHECK:STDOUT: %ptr.as.Copy.impl.Op.call.loc18: init %ptr.aa2 = call %bound_method.loc18_39.2(%addr.loc18) // CHECK:STDOUT: assign %p.var, %ptr.as.Copy.impl.Op.call.loc18 -// CHECK:STDOUT: %.loc18: type = splice_block %ptr.loc18 [concrete = constants.%ptr.aa2] { +// CHECK:STDOUT: %.loc18_35: type = splice_block %ptr.loc18 [concrete = constants.%ptr.aa2] { // CHECK:STDOUT: %i32.loc18_22: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %i32.loc18_31: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %struct_type.a.b.loc18: type = struct_type {.a: %i32, .b: %i32} [concrete = constants.%struct_type.a.b.250] @@ -364,8 +293,8 @@ fn F() { // CHECK:STDOUT: %tuple.elem1.loc22: ref %i32 = tuple_access %t.var, element1 // CHECK:STDOUT: %.loc22_28.5: init %i32 to %tuple.elem1.loc22 = in_place_init %.loc22_28.4 [concrete = constants.%int_2.2e0] // CHECK:STDOUT: %.loc22_28.6: init %tuple.type.35f to %t.var = tuple_init (%.loc22_28.3, %.loc22_28.5) [concrete = constants.%tuple.380] -// CHECK:STDOUT: %.loc22_3: init %tuple.type.35f = converted %.loc22_28.1, %.loc22_28.6 [concrete = constants.%tuple.380] -// CHECK:STDOUT: assign %t.var, %.loc22_3 +// CHECK:STDOUT: %.loc22_3.1: init %tuple.type.35f = converted %.loc22_28.1, %.loc22_28.6 [concrete = constants.%tuple.380] +// CHECK:STDOUT: assign %t.var, %.loc22_3.1 // CHECK:STDOUT: %.loc22_19.1: type = splice_block %.loc22_19.3 [concrete = constants.%tuple.type.35f] { // CHECK:STDOUT: %i32.loc22_11: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %i32.loc22_16: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -374,7 +303,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %t: ref %tuple.type.35f = wrapper_binding t, %t.var // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %t.patt: %pattern_type.354 = ref_binding_pattern t [concrete = constants.%t.patt] +// CHECK:STDOUT: %t.patt: %pattern_type.354 = ref_binding_pattern t [concrete = constants.%t.patt.b37] // CHECK:STDOUT: %t.var_patt: %pattern_type.354 = var_pattern %t.patt [concrete = constants.%t.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %t0.var: ref %ptr.a17 = var_storage %t0.var_patt @@ -388,7 +317,7 @@ fn F() { // CHECK:STDOUT: %bound_method.loc23_25.2: = bound_method %addr.loc23, %specific_fn.loc23 // CHECK:STDOUT: %ptr.as.Copy.impl.Op.call.loc23: init %ptr.a17 = call %bound_method.loc23_25.2(%addr.loc23) // CHECK:STDOUT: assign %t0.var, %ptr.as.Copy.impl.Op.call.loc23 -// CHECK:STDOUT: %.loc23: type = splice_block %ptr.loc23 [concrete = constants.%ptr.a17] { +// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr.loc23 [concrete = constants.%ptr.a17] { // CHECK:STDOUT: %i32.loc23: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %ptr.loc23: type = ptr_type %i32.loc23 [concrete = constants.%ptr.a17] // CHECK:STDOUT: } @@ -408,7 +337,7 @@ fn F() { // CHECK:STDOUT: %bound_method.loc24_25.2: = bound_method %addr.loc24, %specific_fn.loc24 // CHECK:STDOUT: %ptr.as.Copy.impl.Op.call.loc24: init %ptr.a17 = call %bound_method.loc24_25.2(%addr.loc24) // CHECK:STDOUT: assign %t1.var, %ptr.as.Copy.impl.Op.call.loc24 -// CHECK:STDOUT: %.loc24: type = splice_block %ptr.loc24 [concrete = constants.%ptr.a17] { +// CHECK:STDOUT: %.loc24_21: type = splice_block %ptr.loc24 [concrete = constants.%ptr.a17] { // CHECK:STDOUT: %i32.loc24: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %ptr.loc24: type = ptr_type %i32.loc24 [concrete = constants.%ptr.a17] // CHECK:STDOUT: } @@ -417,95 +346,94 @@ fn F() { // CHECK:STDOUT: %t1.patt: %pattern_type.7dc = ref_binding_pattern t1 [concrete = constants.%t1.patt] // CHECK:STDOUT: %t1.var_patt: %pattern_type.7dc = var_pattern %t1.patt [concrete = constants.%t1.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc24: = bound_method %t1.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc24: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc24(%t1.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc23: = bound_method %t0.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc23: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc23(%t0.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22: = bound_method %t.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22(%t.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc20: = bound_method %r.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc20(%r.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc19: = bound_method %q.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc19: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc19(%q.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18: = bound_method %p.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18(%p.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %s.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.5 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%s.var) +// CHECK:STDOUT: %Destroy.facet.loc24_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc24_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc24_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc24_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc24_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc24_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abb) [concrete = constants.%SelfDestruct.specific_fn.690] +// CHECK:STDOUT: %SelfDestruct.call.loc24: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%t1.var) +// CHECK:STDOUT: %Destroy.facet.loc23_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc23_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc23_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc23_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc23_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc23_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abb) [concrete = constants.%SelfDestruct.specific_fn.690] +// CHECK:STDOUT: %SelfDestruct.call.loc23: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%t0.var) +// CHECK:STDOUT: %Destroy.facet.loc22_3.1: %Destroy.type = facet_value constants.%tuple.type.35f, (constants.%DestroyImpl.impl_witness.df1, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %.loc22_3.2: %Destroy.type = converted constants.%tuple.type.35f, %Destroy.facet.loc22_3.1 [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %Destroy.facet.loc22_3.2: %Destroy.type = facet_value constants.%tuple.type.35f, (constants.%DestroyImpl.impl_witness.df1, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %.loc22_3.3: %Destroy.type = converted constants.%tuple.type.35f, %Destroy.facet.loc22_3.2 [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.58e) [concrete = constants.%SelfDestruct.specific_fn.269] +// CHECK:STDOUT: %SelfDestruct.call.loc22: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%t.var) +// CHECK:STDOUT: %Destroy.facet.loc20_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc20_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc20_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc20_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc20_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc20_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.4: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abb) [concrete = constants.%SelfDestruct.specific_fn.690] +// CHECK:STDOUT: %SelfDestruct.call.loc20: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%r.var) +// CHECK:STDOUT: %Destroy.facet.loc19_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc19_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc19_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc19_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc19_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc19_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.5: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abb) [concrete = constants.%SelfDestruct.specific_fn.690] +// CHECK:STDOUT: %SelfDestruct.call.loc19: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%q.var) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%ptr.aa2, (constants.%DestroyImpl.impl_witness.fe7, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.75c] +// CHECK:STDOUT: %.loc18_3.1: %Destroy.type = converted constants.%ptr.aa2, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.75c] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%ptr.aa2, (constants.%DestroyImpl.impl_witness.fe7, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.75c] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%ptr.aa2, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.75c] +// CHECK:STDOUT: %SelfDestruct.specific_fn.6: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.75c) [concrete = constants.%SelfDestruct.specific_fn.3d5] +// CHECK:STDOUT: %SelfDestruct.call.loc18: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%p.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%struct_type.a.b.250, (constants.%DestroyImpl.impl_witness.6b7, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%struct_type.a.b.250, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%struct_type.a.b.250, (constants.%DestroyImpl.impl_witness.6b7, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%struct_type.a.b.250, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.6bf] +// CHECK:STDOUT: %SelfDestruct.specific_fn.7: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.6bf) [concrete = constants.%SelfDestruct.specific_fn.20b] +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.7(%s.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc24(%self.param: ref %ptr.a17) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc24(%self.param: ref %ptr.a17) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc24(%self.param: ref %ptr.a17) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc24(%self.param: ref %ptr.a17) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc22_3.2(%self.param: ref %tuple.type.35f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc22_3.2(%self.param: ref %tuple.type.35f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc22_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc22_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc22_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc22_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc22_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc22_3.2(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc22_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc22_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc22_3.4: %Destroy.type = converted constants.%i32, %Destroy.facet.loc22_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc22_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc22_3.2(%self.param: ref %tuple.type.35f) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18(%self.param: ref %ptr.aa2) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc22_3.2(%self.param: ref %tuple.type.35f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18(%self.param: ref %ptr.aa2) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18(%self.param: ref %ptr.aa2) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18(%self.param: ref %ptr.aa2) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16(%self.param: ref %struct_type.a.b.250) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16(%self.param: ref %struct_type.a.b.250) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc16_3.1: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16_3.1: = bound_method %.loc16_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16_3.1(%.loc16_3.1) -// CHECK:STDOUT: %.loc16_3.2: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16_3.2: = bound_method %.loc16_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16_3.2(%.loc16_3.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref %struct_type.a.b.250) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref %struct_type.a.b.250) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc16_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc16_3.1) +// CHECK:STDOUT: %.loc16_3.4: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc16_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc16_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc16_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc16_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc16_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc16_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 928a49c2510c..b55283dd9d87 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -78,23 +78,27 @@ fn F() -> i32 { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet.95d) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet.95d [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.6cc: %pattern_type.7dc = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.a12: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt.6cc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc17 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d4d: %SubobjectDestroy.type = facet_value %ptr.a17, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b8f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d4d) [concrete] +// CHECK:STDOUT: %Destroy.facet.abb: %Destroy.type = facet_value %ptr.a17, (%DestroyImpl.impl_witness.b8f, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.690: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.abb) [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -102,7 +106,7 @@ fn F() -> i32 { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -115,38 +119,9 @@ fn F() -> i32 { // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.06a: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.20f) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.f12)] // CHECK:STDOUT: %Copy.impl_witness_table.fb0 = impl_witness_table (%Core.import_ref.06a), @ptr.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc17 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.7dc = ref_param_pattern [concrete = constants.%self.param_patt.6cc] -// CHECK:STDOUT: %self.patt: %pattern_type.7dc = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.a12] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %ptr.a17 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %ptr.a17 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -175,8 +150,8 @@ fn F() -> i32 { // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_0, %specific_fn.loc16 [concrete = constants.%bound_method] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc16_3.2(%int_0) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc16: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %n.var, %.loc16 +// CHECK:STDOUT: %.loc16_3.1: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %n.var, %.loc16_3.1 // CHECK:STDOUT: %i32.loc16: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %n: ref %i32 = wrapper_binding n, %n.var // CHECK:STDOUT: name_binding_decl { @@ -192,7 +167,7 @@ fn F() -> i32 { // CHECK:STDOUT: %bound_method.loc17_17.2: = bound_method %addr, %specific_fn.loc17 // CHECK:STDOUT: %ptr.as.Copy.impl.Op.call: init %ptr.a17 = call %bound_method.loc17_17.2(%addr) // CHECK:STDOUT: assign %p.var, %ptr.as.Copy.impl.Op.call -// CHECK:STDOUT: %.loc17: type = splice_block %ptr [concrete = constants.%ptr.a17] { +// CHECK:STDOUT: %.loc17_13: type = splice_block %ptr [concrete = constants.%ptr.a17] { // CHECK:STDOUT: %i32.loc17: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32.loc17 [concrete = constants.%ptr.a17] // CHECK:STDOUT: } @@ -210,32 +185,22 @@ fn F() -> i32 { // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc19_10.2: = bound_method %.loc19_10.2, %specific_fn.loc19 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc19_10.2(%.loc19_10.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc17: = bound_method %p.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc17: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc17(%p.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %n.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%n.var) +// CHECK:STDOUT: %Destroy.facet.loc17_3.1: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc17_3.1: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc17_3.1 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %Destroy.facet.loc17_3.2: %Destroy.type = facet_value constants.%ptr.a17, (constants.%DestroyImpl.impl_witness.b8f, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %.loc17_3.2: %Destroy.type = converted constants.%ptr.a17, %Destroy.facet.loc17_3.2 [concrete = constants.%Destroy.facet.abb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abb) [concrete = constants.%SelfDestruct.specific_fn.690] +// CHECK:STDOUT: %SelfDestruct.call.loc17: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%p.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc16: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%n.var) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17(%self.param: ref %ptr.a17) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17(%self.param: ref %ptr.a17) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17(%self.param: ref %ptr.a17) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17(%self.param: ref %ptr.a17) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16(%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 6f271c642afc..2244a7f91a23 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -64,15 +64,20 @@ fn G() -> C { // CHECK:STDOUT: %bound_method.036: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.753: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [concrete] // CHECK:STDOUT: %struct_type.a.b.250: type = struct_type {.a: %i32, .b: %i32} [concrete] @@ -101,7 +106,7 @@ fn G() -> C { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -109,24 +114,9 @@ fn G() -> C { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -183,8 +173,8 @@ fn G() -> C { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.036] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc16_12.2(%int_0) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc16: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %v.var, %.loc16 +// CHECK:STDOUT: %.loc16_12.1: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %v.var, %.loc16_12.1 // CHECK:STDOUT: %i32.loc16: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %v: ref %i32 = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { @@ -192,21 +182,16 @@ fn G() -> C { // CHECK:STDOUT: %v.var_patt: %pattern_type.d94 = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc16_12.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_12.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_12.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_12.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc16_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> out %return.param: %C { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon index 424fdfcc3608..e8dabc0eccca 100644 --- a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon @@ -49,41 +49,31 @@ fn ForgotReturnType() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %v.patt: %pattern_type.cb1 = ref_binding_pattern v [concrete] // CHECK:STDOUT: %v.var_patt: %pattern_type.cb1 = var_pattern %v.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -100,8 +90,8 @@ fn ForgotReturnType() { // CHECK:STDOUT: %v.var: ref %empty_tuple.type = var_storage %v.var_patt // CHECK:STDOUT: %.loc8_32.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_32.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_12: init %empty_tuple.type = converted %.loc8_32.1, %.loc8_32.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %v.var, %.loc8_12 +// CHECK:STDOUT: %.loc8_12.1: init %empty_tuple.type = converted %.loc8_32.1, %.loc8_32.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %v.var, %.loc8_12.1 // CHECK:STDOUT: %.loc8_27.1: type = splice_block %.loc8_27.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc8_27.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_27.3: type = converted %.loc8_27.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -111,21 +101,16 @@ fn ForgotReturnType() { // CHECK:STDOUT: %v.patt: %pattern_type.cb1 = ref_binding_pattern v [concrete = constants.%v.patt] // CHECK:STDOUT: %v.var_patt: %pattern_type.cb1 = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc8_12.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_12.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_12.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_12.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_forgot_return_type.carbon // CHECK:STDOUT: @@ -138,41 +123,31 @@ fn ForgotReturnType() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %v.patt: %pattern_type.cb1 = ref_binding_pattern v [concrete] // CHECK:STDOUT: %v.var_patt: %pattern_type.cb1 = var_pattern %v.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -189,8 +164,8 @@ fn ForgotReturnType() { // CHECK:STDOUT: %v.var: ref %empty_tuple.type = var_storage %v.var_patt // CHECK:STDOUT: %.loc8_32.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_32.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_12: init %empty_tuple.type = converted %.loc8_32.1, %.loc8_32.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %v.var, %.loc8_12 +// CHECK:STDOUT: %.loc8_12.1: init %empty_tuple.type = converted %.loc8_32.1, %.loc8_32.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %v.var, %.loc8_12.1 // CHECK:STDOUT: %.loc8_27.1: type = splice_block %.loc8_27.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc8_27.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_27.3: type = converted %.loc8_27.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -200,19 +175,14 @@ fn ForgotReturnType() { // CHECK:STDOUT: %v.patt: %pattern_type.cb1 = ref_binding_pattern v [concrete = constants.%v.patt] // CHECK:STDOUT: %v.var_patt: %pattern_type.cb1 = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc8_12.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_12.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_12.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_12.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "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 10f2a0cdf157..d5571451eda5 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -77,15 +77,20 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.3bd: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.68a: %i32 = int_value 1 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc21 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc21 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc21 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc21 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %DifferentScopes.type: type = fn_type @DifferentScopes [concrete] // CHECK:STDOUT: %DifferentScopes: %DifferentScopes.type = struct_value () [concrete] // CHECK:STDOUT: %w.patt.26cad8.2: %pattern_type.d94 = ref_binding_pattern w [concrete] @@ -96,7 +101,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -104,24 +109,9 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc21 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc21 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -164,8 +154,8 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_14.2: = bound_method %int_0.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.036] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17: init %i32 = call %bound_method.loc17_14.2(%int_0.loc17) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc17: init %i32 = converted %int_0.loc17, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17 [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %v.var, %.loc17 +// CHECK:STDOUT: %.loc17_14.1: init %i32 = converted %int_0.loc17, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17 [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %v.var, %.loc17_14.1 // CHECK:STDOUT: %i32.loc17: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %v: ref %i32 = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { @@ -179,18 +169,26 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem0.loc21, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_14.2: = bound_method %int_1, %specific_fn.loc21 [concrete = constants.%bound_method.3bd] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21: init %i32 = call %bound_method.loc21_14.2(%int_1) [concrete = constants.%int_1.68a] -// CHECK:STDOUT: %.loc21: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21 [concrete = constants.%int_1.68a] -// CHECK:STDOUT: assign %w.var, %.loc21 +// CHECK:STDOUT: %.loc21_14.1: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21 [concrete = constants.%int_1.68a] +// CHECK:STDOUT: assign %w.var, %.loc21_14.1 // CHECK:STDOUT: %i32.loc21: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %w: ref %i32 = wrapper_binding w, %w.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %w.patt: %pattern_type.d94 = ref_binding_pattern w [concrete = constants.%w.patt.26cad8.1] // CHECK:STDOUT: %w.var_patt: %pattern_type.d94 = var_pattern %w.patt [concrete = constants.%w.var_patt.4a607a.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc21: = bound_method %w.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc21: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc21(%w.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc17: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc17: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc17(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc21_14.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc21_14.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_14.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc21_14.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc21_14.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc21_14.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc21: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%w.var) +// CHECK:STDOUT: %Destroy.facet.loc17_14.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_14.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc17_14.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc17_14.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_14.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc17_14.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc17: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%v.var) // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: @@ -204,16 +202,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: return %.loc23 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc21(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc21(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc21(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc21(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @DifferentScopes() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: @@ -228,8 +217,8 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %specific_fn.loc28: = specific_function %impl.elem0.loc28, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc28_14.2: = bound_method %int_0.loc28, %specific_fn.loc28 [concrete = constants.%bound_method.036] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28: init %i32 = call %bound_method.loc28_14.2(%int_0.loc28) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc28: init %i32 = converted %int_0.loc28, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28 [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %v.var, %.loc28 +// CHECK:STDOUT: %.loc28_14.1: init %i32 = converted %int_0.loc28, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28 [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %v.var, %.loc28_14.1 // CHECK:STDOUT: %i32.loc28: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %v: ref %i32 = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { @@ -247,21 +236,29 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %specific_fn.loc33: = specific_function %impl.elem0.loc33, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc33_16.2: = bound_method %int_1, %specific_fn.loc33 [concrete = constants.%bound_method.3bd] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc33: init %i32 = call %bound_method.loc33_16.2(%int_1) [concrete = constants.%int_1.68a] -// CHECK:STDOUT: %.loc33: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc33 [concrete = constants.%int_1.68a] -// CHECK:STDOUT: assign %w.var, %.loc33 +// CHECK:STDOUT: %.loc33_16.1: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc33 [concrete = constants.%int_1.68a] +// CHECK:STDOUT: assign %w.var, %.loc33_16.1 // CHECK:STDOUT: %i32.loc33: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %w: ref %i32 = wrapper_binding w, %w.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %w.patt: %pattern_type.d94 = ref_binding_pattern w [concrete = constants.%w.patt.26cad8.2] // CHECK:STDOUT: %w.var_patt: %pattern_type.d94 = var_pattern %w.patt [concrete = constants.%w.var_patt.4a607a.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc33: = bound_method %w.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc33: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc33(%w.var) +// CHECK:STDOUT: %Destroy.facet.loc33_16.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc33_16.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_16.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc33_16.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc33_16.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc33_16.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc33: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%w.var) // CHECK:STDOUT: br !if.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc29: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc28: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc28: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc28(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc28_14.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc28_14.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc28_14.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc28_14.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc28_14.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc28_14.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc28: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%v.var) // CHECK:STDOUT: br !if.else.loc27 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc27: diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index 4bf2429f7434..43962fe51c23 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -59,15 +59,20 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.9d0, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.1f7, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.73e: %f64.761 = float_value 0 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.3f8: %pattern_type.667 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df6: %pattern_type.667 = wrapper_binding_pattern self, %self.param_patt.3f8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc19 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc19 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.47f: %SubobjectDestroy.type = facet_value %f64.761, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a23: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.47f) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %f64.761, (%DestroyImpl.impl_witness.a23, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,7 +80,7 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Float = %Core.Float // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -84,24 +89,9 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.0c7: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.c1a) = import_ref Core//prelude/parts/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.48f)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table = impl_witness_table (%Core.import_ref.0c7), @Core.FloatLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc19 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.667 = ref_param_pattern [concrete = constants.%self.param_patt.3f8] -// CHECK:STDOUT: %self.patt: %pattern_type.667 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f64.761 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f64.761 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc19 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.667 = ref_param_pattern [concrete = constants.%self.param_patt.3f8] -// CHECK:STDOUT: %self.patt: %pattern_type.667 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df6] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %f64.761 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %f64.761 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -130,8 +120,8 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_12.2: = bound_method %float, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f64.761 = call %bound_method.loc19_12.2(%float) [concrete = constants.%float.73e] -// CHECK:STDOUT: %.loc19_12: init %f64.761 = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.73e] -// CHECK:STDOUT: assign %v.var, %.loc19_12 +// CHECK:STDOUT: %.loc19_12.1: init %f64.761 = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.73e] +// CHECK:STDOUT: assign %v.var, %.loc19_12.1 // CHECK:STDOUT: %f64: type = type_literal constants.%f64.761 [concrete = constants.%f64.761] // CHECK:STDOUT: %v: ref %f64.761 = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { @@ -139,19 +129,14 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: %v.var_patt: %pattern_type.667 = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc19_17: %f64.761 = acquire_value %v -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc19_12.1: %Destroy.type = facet_value constants.%f64.761, (constants.%DestroyImpl.impl_witness.a23, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc19_12.2: %Destroy.type = converted constants.%f64.761, %Destroy.facet.loc19_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc19_12.2: %Destroy.type = facet_value constants.%f64.761, (constants.%DestroyImpl.impl_witness.a23, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc19_12.3: %Destroy.type = converted constants.%f64.761, %Destroy.facet.loc19_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: return %.loc19_17 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc19(%self.param: ref %f64.761) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc19(%self.param: ref %f64.761) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc19(%self.param: ref %f64.761) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc19(%self.param: ref %f64.761) = "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 fd3dfcc24091..56b27dd7cb4d 100644 --- a/toolchain/check/testdata/return/import_convert_function.carbon +++ b/toolchain/check/testdata/return/import_convert_function.carbon @@ -827,26 +827,22 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.5c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.ad7, %ImplicitAs.facet.3ac [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.1: type = fn_type @C.as.ImplicitAs.impl.Convert.1 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.3cefb0.1: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.1 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.0a5: type = pattern_type %C.920 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.bound.2ac: = bound_method %C.val.95f, %C.as.ImplicitAs.impl.Convert.3cefb0.1 [concrete] // CHECK:STDOUT: %.2eb: ref %C.920 = temporary invalid, %C.val.95f [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a20: %pattern_type.0a5 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f67: %pattern_type.0a5 = wrapper_binding_pattern self, %self.param_patt.a20 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.eba: = bound_method %.2eb, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_26.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0e8: %SubobjectDestroy.type = facet_value %C.920, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.094: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0e8) [concrete] +// CHECK:STDOUT: %Destroy.facet.bcb: %Destroy.type = facet_value %C.920, (%DestroyImpl.impl_witness.094, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2c2: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.bcb) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.3bd: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -857,18 +853,15 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.1d8: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.c0d, %ImplicitAs.facet.c44 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.2: type = fn_type @C.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.3cefb0.2: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.2 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.ac7: type = pattern_type %C.4bc [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.bound.9fe: = bound_method %C.val.190, %C.as.ImplicitAs.impl.Convert.3cefb0.2 [concrete] // CHECK:STDOUT: %.3e0: ref %C.4bc = temporary invalid, %C.val.190 [concrete] -// CHECK:STDOUT: %self.param_patt.ebc: %pattern_type.ac7 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.0db: %pattern_type.ac7 = wrapper_binding_pattern self, %self.param_patt.ebc [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.3ef: = bound_method %.3e0, %Destroy.WithSelf.SelfDestruct.db3fdb.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.571: %SubobjectDestroy.type = facet_value %C.4bc, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a1e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.571) [concrete] +// CHECK:STDOUT: %Destroy.facet.cf6: %Destroy.type = facet_value %C.4bc, (%DestroyImpl.impl_witness.a1e, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.036: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.cf6) [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.a55: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -879,18 +872,15 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.1282: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.daf, %ImplicitAs.facet.dc7 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.3: type = fn_type @C.as.ImplicitAs.impl.Convert.3 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.3cefb0.3: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.3 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.624: type = pattern_type %C.6d6 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.bound.06f: = bound_method %C.val.bfb, %C.as.ImplicitAs.impl.Convert.3cefb0.3 [concrete] // CHECK:STDOUT: %.88b: ref %C.6d6 = temporary invalid, %C.val.bfb [concrete] -// CHECK:STDOUT: %self.param_patt.e0c: %pattern_type.624 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2f4: %pattern_type.624 = wrapper_binding_pattern self, %self.param_patt.e0c [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.63f: = bound_method %.88b, %Destroy.WithSelf.SelfDestruct.db3fdb.4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.2e4: %SubobjectDestroy.type = facet_value %C.6d6, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.a17: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.2e4) [concrete] +// CHECK:STDOUT: %Destroy.facet.b72: %Destroy.type = facet_value %C.6d6, (%DestroyImpl.impl_witness.a17, %custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.81c: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.b72) [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.fb0: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -901,18 +891,15 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.104: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.f96, %ImplicitAs.facet.7d6 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.4: type = fn_type @C.as.ImplicitAs.impl.Convert.4 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.3cefb0.4: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.4 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.c15: type = pattern_type %C.917 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.bound.e85: = bound_method %C.val.b62, %C.as.ImplicitAs.impl.Convert.3cefb0.4 [concrete] // CHECK:STDOUT: %.295: ref %C.917 = temporary invalid, %C.val.b62 [concrete] -// CHECK:STDOUT: %self.param_patt.5ae: %pattern_type.c15 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.8d9: %pattern_type.c15 = wrapper_binding_pattern self, %self.param_patt.5ae [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.5: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.5: %Destroy.WithSelf.Op.type.ef016f.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.5: %Destroy.WithSelf.SelfDestruct.type.fbceb5.5 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.9e2: = bound_method %.295, %Destroy.WithSelf.SelfDestruct.db3fdb.5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.5: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.5: %SubobjectDestroy.WithSelf.Op.type.6870fd.5 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.5: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.5), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.c9c: %SubobjectDestroy.type = facet_value %C.917, (%custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.70f: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.c9c) [concrete] +// CHECK:STDOUT: %Destroy.facet.a9e: %Destroy.type = facet_value %C.917, (%DestroyImpl.impl_witness.70f, %custom_witness.b80ef6.5) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.941: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.a9e) [concrete] // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.776: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.7fa: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -923,18 +910,15 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.ebf: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.ff2, %ImplicitAs.facet.170 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.5: type = fn_type @C.as.ImplicitAs.impl.Convert.5 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.3cefb0.5: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.5 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.dc6: type = pattern_type %C.20d [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.bound.c6b: = bound_method %C.val.c9e, %C.as.ImplicitAs.impl.Convert.3cefb0.5 [concrete] // CHECK:STDOUT: %.85b: ref %C.20d = temporary invalid, %C.val.c9e [concrete] -// CHECK:STDOUT: %self.param_patt.ae2: %pattern_type.dc6 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.ed3: %pattern_type.dc6 = wrapper_binding_pattern self, %self.param_patt.ae2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.6: type = fn_type @Destroy.WithSelf.Op.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.6: %Destroy.WithSelf.Op.type.ef016f.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6: type = fn_type @Destroy.WithSelf.SelfDestruct.loc11 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.6: %Destroy.WithSelf.SelfDestruct.type.fbceb5.6 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.2e1: = bound_method %.85b, %Destroy.WithSelf.SelfDestruct.db3fdb.6 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.6: type = fn_type @SubobjectDestroy.WithSelf.Op.loc11 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.6: %SubobjectDestroy.WithSelf.Op.type.6870fd.6 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.6: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.6), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.69a: %SubobjectDestroy.type = facet_value %C.20d, (%custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.194: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.69a) [concrete] +// CHECK:STDOUT: %Destroy.facet.1a2: %Destroy.type = facet_value %C.20d, (%DestroyImpl.impl_witness.194, %custom_witness.b80ef6.6) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.73c: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.1a2) [concrete] // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f65: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.ab2: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -945,18 +929,15 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.d9e: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.f4c, %ImplicitAs.facet.40a [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.6: type = fn_type @C.as.ImplicitAs.impl.Convert.6 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.3cefb0.6: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.6 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a63: type = pattern_type %C.c2b [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.bound.c22: = bound_method %C.val.7c2, %C.as.ImplicitAs.impl.Convert.3cefb0.6 [concrete] // CHECK:STDOUT: %.441: ref %C.c2b = temporary invalid, %C.val.7c2 [concrete] -// CHECK:STDOUT: %self.param_patt.0e7: %pattern_type.a63 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6fc: %pattern_type.a63 = wrapper_binding_pattern self, %self.param_patt.0e7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.7: type = fn_type @Destroy.WithSelf.Op.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.7: %Destroy.WithSelf.Op.type.ef016f.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7: type = fn_type @Destroy.WithSelf.SelfDestruct.loc12 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.7: %Destroy.WithSelf.SelfDestruct.type.fbceb5.7 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.257: = bound_method %.441, %Destroy.WithSelf.SelfDestruct.db3fdb.7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.7: type = fn_type @SubobjectDestroy.WithSelf.Op.loc12 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.7: %SubobjectDestroy.WithSelf.Op.type.6870fd.7 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.7: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.7), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d99: %SubobjectDestroy.type = facet_value %C.c2b, (%custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.279: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d99) [concrete] +// CHECK:STDOUT: %Destroy.facet.abc: %Destroy.type = facet_value %C.c2b, (%DestroyImpl.impl_witness.279, %custom_witness.b80ef6.7) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c3a: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.abc) [concrete] // CHECK:STDOUT: %int_6.462: Core.IntLiteral = int_value 6 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.dcf: = bound_method %int_6.462, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.c9a: = bound_method %int_6.462, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -967,18 +948,15 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.a38: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f2, %ImplicitAs.facet.0d8 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.7: type = fn_type @C.as.ImplicitAs.impl.Convert.7 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.3cefb0.7: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.7 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.1a9: type = pattern_type %C.09c [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.bound.569: = bound_method %C.val.d14, %C.as.ImplicitAs.impl.Convert.3cefb0.7 [concrete] // CHECK:STDOUT: %.e0f: ref %C.09c = temporary invalid, %C.val.d14 [concrete] -// CHECK:STDOUT: %self.param_patt.3f1: %pattern_type.1a9 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.454: %pattern_type.1a9 = wrapper_binding_pattern self, %self.param_patt.3f1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.8: type = fn_type @Destroy.WithSelf.Op.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.8: %Destroy.WithSelf.Op.type.ef016f.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.8: %Destroy.WithSelf.SelfDestruct.type.fbceb5.8 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.b2f: = bound_method %.e0f, %Destroy.WithSelf.SelfDestruct.db3fdb.8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.8: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.8: %SubobjectDestroy.WithSelf.Op.type.6870fd.8 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.8: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.8), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.298: %SubobjectDestroy.type = facet_value %C.09c, (%custom_witness.b80ef6.8) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.d65: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.298) [concrete] +// CHECK:STDOUT: %Destroy.facet.d15: %Destroy.type = facet_value %C.09c, (%DestroyImpl.impl_witness.d65, %custom_witness.b80ef6.8) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.019: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.d15) [concrete] // CHECK:STDOUT: %int_7.29f: Core.IntLiteral = int_value 7 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5f1: = bound_method %int_7.29f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.a5e: = bound_method %int_7.29f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -989,18 +967,15 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.583: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.c50, %ImplicitAs.facet.09a [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.8: type = fn_type @C.as.ImplicitAs.impl.Convert.8 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.3cefb0.8: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.8 = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.d80: type = pattern_type %C.284 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.bound.076: = bound_method %C.val.015, %C.as.ImplicitAs.impl.Convert.3cefb0.8 [concrete] // CHECK:STDOUT: %.5ca: ref %C.284 = temporary invalid, %C.val.015 [concrete] -// CHECK:STDOUT: %self.param_patt.9b9: %pattern_type.d80 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.960: %pattern_type.d80 = wrapper_binding_pattern self, %self.param_patt.9b9 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.9: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.9: type = fn_type @Destroy.WithSelf.Op.loc14 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.9: %Destroy.WithSelf.Op.type.ef016f.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.9: %Destroy.WithSelf.SelfDestruct.type.fbceb5.9 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.bba: = bound_method %.5ca, %Destroy.WithSelf.SelfDestruct.db3fdb.9 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.9: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.9: %SubobjectDestroy.WithSelf.Op.type.6870fd.9 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.9: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.9), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.641: %SubobjectDestroy.type = facet_value %C.284, (%custom_witness.b80ef6.9) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.4b1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.641) [concrete] +// CHECK:STDOUT: %Destroy.facet.97c: %Destroy.type = facet_value %C.284, (%DestroyImpl.impl_witness.4b1, %custom_witness.b80ef6.9) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.b91: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.97c) [concrete] // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -1009,7 +984,7 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -1058,7 +1033,9 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %P.import_ref.0d5cf9.8: type = import_ref P//library, loc15_31, loaded [concrete = constants.%ImplicitAs.type.164] // CHECK:STDOUT: %P.import_ref.b89e2b.1: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.1 = import_ref P//library, loc8_64, loaded [concrete = constants.%C.as.ImplicitAs.impl.Convert.3cefb0.1] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.32b = impl_witness_table (%P.import_ref.b89e2b.1), @C.as.ImplicitAs.impl.e04 [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %P.import_ref.b89e2b.2: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.2 = import_ref P//library, loc9_64, loaded [concrete = constants.%C.as.ImplicitAs.impl.Convert.3cefb0.2] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.2fe = impl_witness_table (%P.import_ref.b89e2b.2), @C.as.ImplicitAs.impl.c09 [concrete] // CHECK:STDOUT: %P.import_ref.b89e2b.3: %C.as.ImplicitAs.impl.Convert.type.ae6f4c.3 = import_ref P//library, loc10_64, loaded [concrete = constants.%C.as.ImplicitAs.impl.Convert.3cefb0.3] @@ -1076,135 +1053,6 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %P.Make: %Make.type = import_ref P//library, Make, loaded [concrete = constants.%Make] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_26.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_26.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_26.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0a5 = ref_param_pattern [concrete = constants.%self.param_patt.a20] -// CHECK:STDOUT: %self.patt: %pattern_type.0a5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f67] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.920 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.920 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_26.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.0a5 = ref_param_pattern [concrete = constants.%self.param_patt.a20] -// CHECK:STDOUT: %self.patt: %pattern_type.0a5 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f67] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.920 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.920 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ac7 = ref_param_pattern [concrete = constants.%self.param_patt.ebc] -// CHECK:STDOUT: %self.patt: %pattern_type.ac7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0db] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.4bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.4bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.ac7 = ref_param_pattern [concrete = constants.%self.param_patt.ebc] -// CHECK:STDOUT: %self.patt: %pattern_type.ac7 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.0db] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.4bc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.4bc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc9 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.624 = ref_param_pattern [concrete = constants.%self.param_patt.e0c] -// CHECK:STDOUT: %self.patt: %pattern_type.624 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2f4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.6d6 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.6d6 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc9 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.624 = ref_param_pattern [concrete = constants.%self.param_patt.e0c] -// CHECK:STDOUT: %self.patt: %pattern_type.624 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2f4] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.6d6 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.6d6 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.5: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.5 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c15 = ref_param_pattern [concrete = constants.%self.param_patt.5ae] -// CHECK:STDOUT: %self.patt: %pattern_type.c15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8d9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.917 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.917 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.5: %Destroy.WithSelf.Op.type.ef016f.5 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403171.5] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c15 = ref_param_pattern [concrete = constants.%self.param_patt.5ae] -// CHECK:STDOUT: %self.patt: %pattern_type.c15 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8d9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.917 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.917 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.6: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.6 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc11 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc6 = ref_param_pattern [concrete = constants.%self.param_patt.ae2] -// CHECK:STDOUT: %self.patt: %pattern_type.dc6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ed3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.20d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.20d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.6: %Destroy.WithSelf.Op.type.ef016f.6 = fn_decl @Destroy.WithSelf.Op.loc11 [concrete = constants.%Destroy.WithSelf.Op.403171.6] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.dc6 = ref_param_pattern [concrete = constants.%self.param_patt.ae2] -// CHECK:STDOUT: %self.patt: %pattern_type.dc6 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.ed3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.20d = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.20d = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.7: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.7 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc12 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a63 = ref_param_pattern [concrete = constants.%self.param_patt.0e7] -// CHECK:STDOUT: %self.patt: %pattern_type.a63 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6fc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.c2b = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.c2b = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.7: %Destroy.WithSelf.Op.type.ef016f.7 = fn_decl @Destroy.WithSelf.Op.loc12 [concrete = constants.%Destroy.WithSelf.Op.403171.7] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a63 = ref_param_pattern [concrete = constants.%self.param_patt.0e7] -// CHECK:STDOUT: %self.patt: %pattern_type.a63 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6fc] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.c2b = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.c2b = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.8: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.8 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1a9 = ref_param_pattern [concrete = constants.%self.param_patt.3f1] -// CHECK:STDOUT: %self.patt: %pattern_type.1a9 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.454] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.09c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.09c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.8: %Destroy.WithSelf.Op.type.ef016f.8 = fn_decl @Destroy.WithSelf.Op.loc13 [concrete = constants.%Destroy.WithSelf.Op.403171.8] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.1a9 = ref_param_pattern [concrete = constants.%self.param_patt.3f1] -// CHECK:STDOUT: %self.patt: %pattern_type.1a9 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.454] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.09c = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.09c = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.9: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.9 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.9] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d80 = ref_param_pattern [concrete = constants.%self.param_patt.9b9] -// CHECK:STDOUT: %self.patt: %pattern_type.d80 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.960] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.284 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.284 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.9: %Destroy.WithSelf.Op.type.ef016f.9 = fn_decl @Destroy.WithSelf.Op.loc14 [concrete = constants.%Destroy.WithSelf.Op.403171.9] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d80 = ref_param_pattern [concrete = constants.%self.param_patt.9b9] -// CHECK:STDOUT: %self.patt: %pattern_type.d80 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.960] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C.284 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C.284 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -1321,7 +1169,12 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.loc7_26.3: %C.920 = acquire_value %.loc7_26.2 [concrete = constants.%C.val.95f] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.call.loc7: init %D to %.loc6_26.1 = call %bound_method.loc7_35(%.loc7_26.3) // CHECK:STDOUT: %.loc7_35: init %D = converted %.loc7_26.1, %C.as.ImplicitAs.impl.Convert.call.loc7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.eba(constants.%.2eb) +// CHECK:STDOUT: %Destroy.facet.loc7_26.1: %Destroy.type = facet_value constants.%C.920, (constants.%DestroyImpl.impl_witness.094, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.bcb] +// CHECK:STDOUT: %.loc7_26.4: %Destroy.type = converted constants.%C.920, %Destroy.facet.loc7_26.1 [concrete = constants.%Destroy.facet.bcb] +// CHECK:STDOUT: %Destroy.facet.loc7_26.2: %Destroy.type = facet_value constants.%C.920, (constants.%DestroyImpl.impl_witness.094, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.bcb] +// CHECK:STDOUT: %.loc7_26.5: %Destroy.type = converted constants.%C.920, %Destroy.facet.loc7_26.2 [concrete = constants.%Destroy.facet.bcb] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.bcb) [concrete = constants.%SelfDestruct.specific_fn.2c2] +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc7_26.2) // CHECK:STDOUT: return %.loc7_35 to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc7: @@ -1351,7 +1204,12 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.loc8_26.3: %C.4bc = acquire_value %.loc8_26.2 [concrete = constants.%C.val.190] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.call.loc8: init %D to %.loc6_26.2 = call %bound_method.loc8_35(%.loc8_26.3) // CHECK:STDOUT: %.loc8_35: init %D = converted %.loc8_26.1, %C.as.ImplicitAs.impl.Convert.call.loc8 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.3ef(constants.%.3e0) +// CHECK:STDOUT: %Destroy.facet.loc8_26.1: %Destroy.type = facet_value constants.%C.4bc, (constants.%DestroyImpl.impl_witness.a1e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.cf6] +// CHECK:STDOUT: %.loc8_26.4: %Destroy.type = converted constants.%C.4bc, %Destroy.facet.loc8_26.1 [concrete = constants.%Destroy.facet.cf6] +// CHECK:STDOUT: %Destroy.facet.loc8_26.2: %Destroy.type = facet_value constants.%C.4bc, (constants.%DestroyImpl.impl_witness.a1e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.cf6] +// CHECK:STDOUT: %.loc8_26.5: %Destroy.type = converted constants.%C.4bc, %Destroy.facet.loc8_26.2 [concrete = constants.%Destroy.facet.cf6] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.cf6) [concrete = constants.%SelfDestruct.specific_fn.036] +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc8_26.2) // CHECK:STDOUT: return %.loc8_35 to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc8: @@ -1381,7 +1239,12 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.loc9_26.3: %C.6d6 = acquire_value %.loc9_26.2 [concrete = constants.%C.val.bfb] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.call.loc9: init %D to %.loc6_26.3 = call %bound_method.loc9_35(%.loc9_26.3) // CHECK:STDOUT: %.loc9_35: init %D = converted %.loc9_26.1, %C.as.ImplicitAs.impl.Convert.call.loc9 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc9: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.63f(constants.%.88b) +// CHECK:STDOUT: %Destroy.facet.loc9_26.1: %Destroy.type = facet_value constants.%C.6d6, (constants.%DestroyImpl.impl_witness.a17, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.b72] +// CHECK:STDOUT: %.loc9_26.4: %Destroy.type = converted constants.%C.6d6, %Destroy.facet.loc9_26.1 [concrete = constants.%Destroy.facet.b72] +// CHECK:STDOUT: %Destroy.facet.loc9_26.2: %Destroy.type = facet_value constants.%C.6d6, (constants.%DestroyImpl.impl_witness.a17, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.b72] +// CHECK:STDOUT: %.loc9_26.5: %Destroy.type = converted constants.%C.6d6, %Destroy.facet.loc9_26.2 [concrete = constants.%Destroy.facet.b72] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.b72) [concrete = constants.%SelfDestruct.specific_fn.81c] +// CHECK:STDOUT: %SelfDestruct.call.loc9: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc9_26.2) // CHECK:STDOUT: return %.loc9_35 to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc9: @@ -1411,7 +1274,12 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.loc10_26.3: %C.917 = acquire_value %.loc10_26.2 [concrete = constants.%C.val.b62] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.call.loc10: init %D to %.loc6_26.4 = call %bound_method.loc10_35(%.loc10_26.3) // CHECK:STDOUT: %.loc10_35: init %D = converted %.loc10_26.1, %C.as.ImplicitAs.impl.Convert.call.loc10 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.9e2(constants.%.295) +// CHECK:STDOUT: %Destroy.facet.loc10_26.1: %Destroy.type = facet_value constants.%C.917, (constants.%DestroyImpl.impl_witness.70f, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.a9e] +// CHECK:STDOUT: %.loc10_26.4: %Destroy.type = converted constants.%C.917, %Destroy.facet.loc10_26.1 [concrete = constants.%Destroy.facet.a9e] +// CHECK:STDOUT: %Destroy.facet.loc10_26.2: %Destroy.type = facet_value constants.%C.917, (constants.%DestroyImpl.impl_witness.70f, constants.%custom_witness.b80ef6.5) [concrete = constants.%Destroy.facet.a9e] +// CHECK:STDOUT: %.loc10_26.5: %Destroy.type = converted constants.%C.917, %Destroy.facet.loc10_26.2 [concrete = constants.%Destroy.facet.a9e] +// CHECK:STDOUT: %SelfDestruct.specific_fn.4: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.a9e) [concrete = constants.%SelfDestruct.specific_fn.941] +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc10_26.2) // CHECK:STDOUT: return %.loc10_35 to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc10: @@ -1441,7 +1309,12 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.loc11_26.3: %C.20d = acquire_value %.loc11_26.2 [concrete = constants.%C.val.c9e] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.call.loc11: init %D to %.loc6_26.5 = call %bound_method.loc11_35(%.loc11_26.3) // CHECK:STDOUT: %.loc11_35: init %D = converted %.loc11_26.1, %C.as.ImplicitAs.impl.Convert.call.loc11 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.2e1(constants.%.85b) +// CHECK:STDOUT: %Destroy.facet.loc11_26.1: %Destroy.type = facet_value constants.%C.20d, (constants.%DestroyImpl.impl_witness.194, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.1a2] +// CHECK:STDOUT: %.loc11_26.4: %Destroy.type = converted constants.%C.20d, %Destroy.facet.loc11_26.1 [concrete = constants.%Destroy.facet.1a2] +// CHECK:STDOUT: %Destroy.facet.loc11_26.2: %Destroy.type = facet_value constants.%C.20d, (constants.%DestroyImpl.impl_witness.194, constants.%custom_witness.b80ef6.6) [concrete = constants.%Destroy.facet.1a2] +// CHECK:STDOUT: %.loc11_26.5: %Destroy.type = converted constants.%C.20d, %Destroy.facet.loc11_26.2 [concrete = constants.%Destroy.facet.1a2] +// CHECK:STDOUT: %SelfDestruct.specific_fn.5: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.1a2) [concrete = constants.%SelfDestruct.specific_fn.73c] +// CHECK:STDOUT: %SelfDestruct.call.loc11: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%.loc11_26.2) // CHECK:STDOUT: return %.loc11_35 to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc11: @@ -1471,7 +1344,12 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.loc12_26.3: %C.c2b = acquire_value %.loc12_26.2 [concrete = constants.%C.val.7c2] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.call.loc12: init %D to %.loc6_26.6 = call %bound_method.loc12_35(%.loc12_26.3) // CHECK:STDOUT: %.loc12_35: init %D = converted %.loc12_26.1, %C.as.ImplicitAs.impl.Convert.call.loc12 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc12: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.257(constants.%.441) +// CHECK:STDOUT: %Destroy.facet.loc12_26.1: %Destroy.type = facet_value constants.%C.c2b, (constants.%DestroyImpl.impl_witness.279, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.abc] +// CHECK:STDOUT: %.loc12_26.4: %Destroy.type = converted constants.%C.c2b, %Destroy.facet.loc12_26.1 [concrete = constants.%Destroy.facet.abc] +// CHECK:STDOUT: %Destroy.facet.loc12_26.2: %Destroy.type = facet_value constants.%C.c2b, (constants.%DestroyImpl.impl_witness.279, constants.%custom_witness.b80ef6.7) [concrete = constants.%Destroy.facet.abc] +// CHECK:STDOUT: %.loc12_26.5: %Destroy.type = converted constants.%C.c2b, %Destroy.facet.loc12_26.2 [concrete = constants.%Destroy.facet.abc] +// CHECK:STDOUT: %SelfDestruct.specific_fn.6: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.abc) [concrete = constants.%SelfDestruct.specific_fn.c3a] +// CHECK:STDOUT: %SelfDestruct.call.loc12: init %empty_tuple.type = call %SelfDestruct.specific_fn.6(%.loc12_26.2) // CHECK:STDOUT: return %.loc12_35 to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc12: @@ -1501,7 +1379,12 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.loc13_26.3: %C.09c = acquire_value %.loc13_26.2 [concrete = constants.%C.val.d14] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.call.loc13: init %D to %.loc6_26.7 = call %bound_method.loc13_35(%.loc13_26.3) // CHECK:STDOUT: %.loc13_35: init %D = converted %.loc13_26.1, %C.as.ImplicitAs.impl.Convert.call.loc13 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.b2f(constants.%.e0f) +// CHECK:STDOUT: %Destroy.facet.loc13_26.1: %Destroy.type = facet_value constants.%C.09c, (constants.%DestroyImpl.impl_witness.d65, constants.%custom_witness.b80ef6.8) [concrete = constants.%Destroy.facet.d15] +// CHECK:STDOUT: %.loc13_26.4: %Destroy.type = converted constants.%C.09c, %Destroy.facet.loc13_26.1 [concrete = constants.%Destroy.facet.d15] +// CHECK:STDOUT: %Destroy.facet.loc13_26.2: %Destroy.type = facet_value constants.%C.09c, (constants.%DestroyImpl.impl_witness.d65, constants.%custom_witness.b80ef6.8) [concrete = constants.%Destroy.facet.d15] +// CHECK:STDOUT: %.loc13_26.5: %Destroy.type = converted constants.%C.09c, %Destroy.facet.loc13_26.2 [concrete = constants.%Destroy.facet.d15] +// CHECK:STDOUT: %SelfDestruct.specific_fn.7: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.d15) [concrete = constants.%SelfDestruct.specific_fn.019] +// CHECK:STDOUT: %SelfDestruct.call.loc13: init %empty_tuple.type = call %SelfDestruct.specific_fn.7(%.loc13_26.2) // CHECK:STDOUT: return %.loc13_35 to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc13: @@ -1531,7 +1414,12 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: %.loc14_26.3: %C.284 = acquire_value %.loc14_26.2 [concrete = constants.%C.val.015] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.call.loc14: init %D to %.loc6_26.8 = call %bound_method.loc14_35(%.loc14_26.3) // CHECK:STDOUT: %.loc14_35: init %D = converted %.loc14_26.1, %C.as.ImplicitAs.impl.Convert.call.loc14 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound.bba(constants.%.5ca) +// CHECK:STDOUT: %Destroy.facet.loc14_26.1: %Destroy.type = facet_value constants.%C.284, (constants.%DestroyImpl.impl_witness.4b1, constants.%custom_witness.b80ef6.9) [concrete = constants.%Destroy.facet.97c] +// CHECK:STDOUT: %.loc14_26.4: %Destroy.type = converted constants.%C.284, %Destroy.facet.loc14_26.1 [concrete = constants.%Destroy.facet.97c] +// CHECK:STDOUT: %Destroy.facet.loc14_26.2: %Destroy.type = facet_value constants.%C.284, (constants.%DestroyImpl.impl_witness.4b1, constants.%custom_witness.b80ef6.9) [concrete = constants.%Destroy.facet.97c] +// CHECK:STDOUT: %.loc14_26.5: %Destroy.type = converted constants.%C.284, %Destroy.facet.loc14_26.2 [concrete = constants.%Destroy.facet.97c] +// CHECK:STDOUT: %SelfDestruct.specific_fn.8: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.97c) [concrete = constants.%SelfDestruct.specific_fn.b91] +// CHECK:STDOUT: %SelfDestruct.call.loc14: init %empty_tuple.type = call %SelfDestruct.specific_fn.8(%.loc14_26.2) // CHECK:STDOUT: return %.loc14_35 to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc14: @@ -1544,118 +1432,37 @@ fn F0(unused n: i32) -> P.D { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.ImplicitAs.impl.Convert.1 [from "library.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_26.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_26.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_26.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_26.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_26.2(%self.param: ref %C.920) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_26.2(%self.param: ref %C.920) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_26.2(%self.param: ref %C.920) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_26.2(%self.param: ref %C.920) = "no_op"; // 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.4bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %C.4bc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %C.4bc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %C.4bc) = "no_op"; // 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.6d6) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc9(%self.param: ref %C.6d6) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc9(%self.param: ref %C.6d6) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc9(%self.param: ref %C.6d6) = "no_op"; // 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.917) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %C.917) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %C.917) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.5(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.5(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10(%self.param: ref %C.917) = "no_op"; // 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.20d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc11(%self.param: ref %C.20d) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc11(%self.param: ref %C.20d) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.6(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.6(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc11(%self.param: ref %C.20d) = "no_op"; // 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.c2b) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc12(%self.param: ref %C.c2b) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc12(%self.param: ref %C.c2b) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.7(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.7(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc12(%self.param: ref %C.c2b) = "no_op"; // 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.09c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13(%self.param: ref %C.09c) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13(%self.param: ref %C.09c) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.8(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.8(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13(%self.param: ref %C.09c) = "no_op"; // 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.284) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14(%self.param: ref %C.284) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14(%self.param: ref %C.284) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.9(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.9(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14(%self.param: ref %C.284) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Make [from "library.carbon"]; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index 0b19e08863c3..a4c83c9a8002 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -84,22 +84,27 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.762: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.036: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.753: %i32 = int_value 0 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc26 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc26 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -107,24 +112,9 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc26 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc26 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -215,8 +205,8 @@ fn G() -> i32 { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.036] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc26_12.2(%int_0) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc26_12: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %result.var, %.loc26_12 +// CHECK:STDOUT: %.loc26_12.1: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %result.var, %.loc26_12.1 // CHECK:STDOUT: %i32.loc26: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %result: ref %i32 = wrapper_binding result, %result.var // CHECK:STDOUT: name_binding_decl { @@ -224,19 +214,14 @@ fn G() -> i32 { // CHECK:STDOUT: %result.var_patt: %pattern_type.d94 = var_pattern %result.patt [concrete = constants.%result.var_patt.bb0] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc26_22: %i32 = acquire_value %result -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %result.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%result.var) +// CHECK:STDOUT: %Destroy.facet.loc26_12.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc26_12.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc26_12.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc26_12.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc26_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%result.var) // CHECK:STDOUT: return %.loc26_22 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc26(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc26(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc26(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc26(%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 5ca9389cf2b6..708acbf93245 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -66,15 +66,20 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.036: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.753: %i32 = int_value 0 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc17 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc17 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: %w.patt: %pattern_type.d94 = ref_binding_pattern w [concrete] // CHECK:STDOUT: %w.var_patt: %pattern_type.d94 = var_pattern %w.patt [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] @@ -92,7 +97,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: .Bool = %Core.Bool // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -101,27 +106,12 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.Bool: type = import_ref Core//prelude/parts/bool, Bool, loaded [concrete = bool] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc17 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc17 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [concrete] { // CHECK:STDOUT: .Core = imports.%Core @@ -167,16 +157,20 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_14.2: = bound_method %int_0.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.036] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17: init %i32 = call %bound_method.loc17_14.2(%int_0.loc17) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc17: init %i32 = converted %int_0.loc17, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17 [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %v.var, %.loc17 +// CHECK:STDOUT: %.loc17_14.1: init %i32 = converted %int_0.loc17, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17 [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %v.var, %.loc17_14.1 // CHECK:STDOUT: %i32.loc17: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %v: ref %i32 = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: %pattern_type.d94 = ref_binding_pattern v [concrete = constants.%v.patt] // CHECK:STDOUT: %v.var_patt: %pattern_type.d94 = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc17: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc17: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc17(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc17_14.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_14.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc17_14.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc17_14.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc17_14.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc17_14.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc17: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%v.var) // CHECK:STDOUT: br !if.else.loc16 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc16: @@ -191,16 +185,20 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_14.2: = bound_method %int_1, %specific_fn.loc20 [concrete = constants.%bound_method.3bd] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20: init %i32 = call %bound_method.loc20_14.2(%int_1) [concrete = constants.%int_1.68a] -// CHECK:STDOUT: %.loc20: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20 [concrete = constants.%int_1.68a] -// CHECK:STDOUT: assign %w.var, %.loc20 +// CHECK:STDOUT: %.loc20_14.1: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20 [concrete = constants.%int_1.68a] +// CHECK:STDOUT: assign %w.var, %.loc20_14.1 // CHECK:STDOUT: %i32.loc20: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %w: ref %i32 = wrapper_binding w, %w.var // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %w.patt: %pattern_type.d94 = ref_binding_pattern w [concrete = constants.%w.patt] // CHECK:STDOUT: %w.var_patt: %pattern_type.d94 = var_pattern %w.patt [concrete = constants.%w.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc20: = bound_method %w.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc20: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc20(%w.var) +// CHECK:STDOUT: %Destroy.facet.loc20_14.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_14.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_14.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc20_14.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc20_14.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc20_14.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc20: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%w.var) // CHECK:STDOUT: br !if.else.loc19 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc19: @@ -214,16 +212,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: return %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc17(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc17(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc17(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc17(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @EnclosingButAfter(%b.param: bool) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: @@ -238,8 +227,8 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_14.2: = bound_method %int_0, %specific_fn.loc27 [concrete = constants.%bound_method.036] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc27: init %i32 = call %bound_method.loc27_14.2(%int_0) [concrete = constants.%int_0.753] -// CHECK:STDOUT: %.loc27_14: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc27 [concrete = constants.%int_0.753] -// CHECK:STDOUT: assign %v.var, %.loc27_14 +// CHECK:STDOUT: %.loc27_14.1: init %i32 = converted %int_0, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc27 [concrete = constants.%int_0.753] +// CHECK:STDOUT: assign %v.var, %.loc27_14.1 // CHECK:STDOUT: %i32.loc27: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %v: ref %i32 = wrapper_binding v, %v.var // CHECK:STDOUT: name_binding_decl { @@ -247,8 +236,12 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %v.var_patt: %pattern_type.d94 = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc27_19: %i32 = acquire_value %v -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc27: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc27: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc27(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc27_14.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc27_14.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc27_14.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc27_14.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc27_14.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc27_14.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc27: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%v.var) // CHECK:STDOUT: return %.loc27_19 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: @@ -259,8 +252,8 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc30_12.2: = bound_method %int_1, %specific_fn.loc30 [concrete = constants.%bound_method.3bd] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc30: init %i32 = call %bound_method.loc30_12.2(%int_1) [concrete = constants.%int_1.68a] -// CHECK:STDOUT: %.loc30_12: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc30 [concrete = constants.%int_1.68a] -// CHECK:STDOUT: assign %w.var, %.loc30_12 +// CHECK:STDOUT: %.loc30_12.1: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc30 [concrete = constants.%int_1.68a] +// CHECK:STDOUT: assign %w.var, %.loc30_12.1 // CHECK:STDOUT: %i32.loc30: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %w: ref %i32 = wrapper_binding w, %w.var // CHECK:STDOUT: name_binding_decl { @@ -268,8 +261,12 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %w.var_patt: %pattern_type.d94 = var_pattern %w.patt [concrete = constants.%w.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc30_17: %i32 = acquire_value %w -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc30: = bound_method %w.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc30: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc30(%w.var) +// CHECK:STDOUT: %Destroy.facet.loc30_12.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc30_12.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc30_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc30_12.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc30_12.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc30_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc30: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%w.var) // CHECK:STDOUT: return %.loc30_17 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/literal_member_access.carbon b/toolchain/check/testdata/struct/literal_member_access.carbon index 1af791eaf9c1..e53b37dc5ae2 100644 --- a/toolchain/check/testdata/struct/literal_member_access.carbon +++ b/toolchain/check/testdata/struct/literal_member_access.carbon @@ -54,30 +54,34 @@ fn F() -> i32 { // CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete] // CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc18_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_26.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.abf: %pattern_type.2ce = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.f80: %pattern_type.2ce = wrapper_binding_pattern self, %self.param_patt.abf [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc18_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_26.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_26.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_26.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.28c: %SubobjectDestroy.type = facet_value %struct_type.x.y.z, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e7b: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.28c) [concrete] +// CHECK:STDOUT: %Destroy.facet.d52: %Destroy.type = facet_value %struct_type.x.y.z, (%DestroyImpl.impl_witness.e7b, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.0ae: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.d52) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int // CHECK:STDOUT: .Copy = %Core.Copy -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -85,38 +89,9 @@ fn F() -> i32 { // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_26.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc18_26.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_26.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.2ce = ref_param_pattern [concrete = constants.%self.param_patt.abf] -// CHECK:STDOUT: %self.patt: %pattern_type.2ce = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f80] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.x.y.z = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.x.y.z = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc18_26.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.2ce = ref_param_pattern [concrete = constants.%self.param_patt.abf] -// CHECK:STDOUT: %self.patt: %pattern_type.2ce = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.f80] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.x.y.z = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.x.y.z = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -177,42 +152,40 @@ fn F() -> i32 { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc18_38.2: = bound_method %.loc18_38, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc18_38.2(%.loc18_38) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc18_26.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc18_26.2) +// CHECK:STDOUT: %Destroy.facet.loc18_26.1: %Destroy.type = facet_value constants.%struct_type.x.y.z, (constants.%DestroyImpl.impl_witness.e7b, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.d52] +// CHECK:STDOUT: %.loc18_26.9: %Destroy.type = converted constants.%struct_type.x.y.z, %Destroy.facet.loc18_26.1 [concrete = constants.%Destroy.facet.d52] +// CHECK:STDOUT: %Destroy.facet.loc18_26.2: %Destroy.type = facet_value constants.%struct_type.x.y.z, (constants.%DestroyImpl.impl_witness.e7b, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.d52] +// CHECK:STDOUT: %.loc18_26.10: %Destroy.type = converted constants.%struct_type.x.y.z, %Destroy.facet.loc18_26.2 [concrete = constants.%Destroy.facet.d52] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.d52) [concrete = constants.%SelfDestruct.specific_fn.0ae] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc18_26.2) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_26.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_26.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_26.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_26.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_26.2(%self.param: ref %struct_type.x.y.z) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_26.2(%self.param: ref %struct_type.x.y.z) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18_26.1: ref %i32 = struct_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_26.1: = bound_method %.loc18_26.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_26.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_26.1(%.loc18_26.1) -// CHECK:STDOUT: %.loc18_26.2: ref %i32 = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_26.2: = bound_method %.loc18_26.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_26.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_26.2(%.loc18_26.2) -// CHECK:STDOUT: %.loc18_26.3: ref %i32 = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_26.3: = bound_method %.loc18_26.3, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_26.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_26.3(%.loc18_26.3) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_26.2(%self.param: ref %struct_type.x.y.z) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_26.2(%self.param: ref %struct_type.x.y.z) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc18_26.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_26.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_26.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_26.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_26.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_26.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc18_26.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc18_26.1) +// CHECK:STDOUT: %.loc18_26.4: ref %i32 = struct_access %self.param, element1 +// CHECK:STDOUT: %Destroy.facet.loc18_26.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_26.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_26.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_26.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_26.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_26.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc18_26.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc18_26.4) +// CHECK:STDOUT: %.loc18_26.7: ref %i32 = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc18_26.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_26.8: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_26.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_26.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_26.9: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_26.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc18_26.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc18_26.7) // CHECK:STDOUT: return // CHECK:STDOUT: } // 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 8735a4c08941..f23660c36c71 100644 --- a/toolchain/check/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/check/testdata/struct/nested_struct_in_place.carbon @@ -42,91 +42,50 @@ fn G() { // CHECK:STDOUT: %pattern_type.8dd: type = pattern_type %struct_type.a.b.1ac [concrete] // CHECK:STDOUT: %v.patt: %pattern_type.8dd = ref_binding_pattern v [concrete] // CHECK:STDOUT: %v.var_patt: %pattern_type.8dd = var_pattern %v.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a2d: %pattern_type.c97 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eb0: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt.a2d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.845: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c2b) [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7c1: %pattern_type.8dd = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.737: %pattern_type.8dd = wrapper_binding_pattern self, %self.param_patt.7c1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc18_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc18_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc18_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc18_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.2e8: %SubobjectDestroy.type = facet_value %tuple.type.abc, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.62e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.2e8) [concrete] +// CHECK:STDOUT: %Destroy.facet.c1b: %Destroy.type = facet_value %tuple.type.abc, (%DestroyImpl.impl_witness.62e, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.ec2: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.c1b) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.979: %SubobjectDestroy.type = facet_value %struct_type.a.b.1ac, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b1e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.979) [concrete] +// CHECK:STDOUT: %Destroy.facet.d8d: %Destroy.type = facet_value %struct_type.a.b.1ac, (%DestroyImpl.impl_witness.b1e, %custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.39b: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.d8d) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .Int = %Core.Int -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc18_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c97 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.abc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.abc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc18_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c97 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.abc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.abc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc18_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8dd = ref_param_pattern [concrete = constants.%self.param_patt.7c1] -// CHECK:STDOUT: %self.patt: %pattern_type.8dd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.737] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.1ac = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.1ac = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc18_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.8dd = ref_param_pattern [concrete = constants.%self.param_patt.7c1] -// CHECK:STDOUT: %self.patt: %pattern_type.8dd = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.737] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.a.b.1ac = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.a.b.1ac = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -165,8 +124,8 @@ fn G() { // CHECK:STDOUT: %F.call.loc18_80: init %tuple.type.abc to %.loc18_81.2 = call %F.ref.loc18_78() // CHECK:STDOUT: %.loc18_81.3: %struct_type.a.b.1ac = struct_literal (%F.call.loc18_70, %F.call.loc18_80) // CHECK:STDOUT: %.loc18_81.4: init %struct_type.a.b.1ac to %v.var = struct_init (%F.call.loc18_70, %F.call.loc18_80) -// CHECK:STDOUT: %.loc18_3: init %struct_type.a.b.1ac = converted %.loc18_81.3, %.loc18_81.4 -// CHECK:STDOUT: assign %v.var, %.loc18_3 +// CHECK:STDOUT: %.loc18_3.1: init %struct_type.a.b.1ac = converted %.loc18_81.3, %.loc18_81.4 +// CHECK:STDOUT: assign %v.var, %.loc18_3.1 // CHECK:STDOUT: %.loc18_58: type = splice_block %struct_type.a.b [concrete = constants.%struct_type.a.b.1ac] { // CHECK:STDOUT: %i32.loc18_23: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %i32.loc18_28: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -185,65 +144,62 @@ fn G() { // CHECK:STDOUT: %v.patt: %pattern_type.8dd = ref_binding_pattern v [concrete = constants.%v.patt] // CHECK:STDOUT: %v.var_patt: %pattern_type.8dd = var_pattern %v.patt [concrete = constants.%v.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%struct_type.a.b.1ac, (constants.%DestroyImpl.impl_witness.b1e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d8d] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%struct_type.a.b.1ac, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.d8d] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%struct_type.a.b.1ac, (constants.%DestroyImpl.impl_witness.b1e, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.d8d] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%struct_type.a.b.1ac, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.d8d] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.d8d) [concrete = constants.%SelfDestruct.specific_fn.39b] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.2(%self.param: ref %tuple.type.abc) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_3.2(%self.param: ref %tuple.type.abc) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2] // CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_3.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_3.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc18_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_3.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_3.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc18_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.4: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc18_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_3.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_3.3(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc18_3.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc18_3.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc18_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc18_3.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c2b) [concrete = constants.%SelfDestruct.specific_fn.845] +// CHECK:STDOUT: %SelfDestruct.call.loc18_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.2(%self.param: ref %tuple.type.abc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_3.2(%self.param: ref %tuple.type.abc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc18_3.3(%self.param: ref %struct_type.a.b.1ac) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc18_3.3(%self.param: ref %struct_type.a.b.1ac) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc18_3.1: ref %tuple.type.abc = struct_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_3.1: = bound_method %.loc18_3.1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_3.1(%.loc18_3.1) -// CHECK:STDOUT: %.loc18_3.2: ref %tuple.type.abc = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc18_3.2: = bound_method %.loc18_3.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc18_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc18_3.2(%.loc18_3.2) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc18_3.3(%self.param: ref %struct_type.a.b.1ac) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc18_3.3(%self.param: ref %struct_type.a.b.1ac) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc18_3.1: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc18_3.2: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc18_3.1 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %Destroy.facet.loc18_3.2: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc18_3.3: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc18_3.2 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c1b) [concrete = constants.%SelfDestruct.specific_fn.ec2] +// CHECK:STDOUT: %SelfDestruct.call.loc18_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc18_3.1) +// CHECK:STDOUT: %.loc18_3.4: ref %tuple.type.abc = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc18_3.3: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc18_3.5: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc18_3.3 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %Destroy.facet.loc18_3.4: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc18_3.6: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc18_3.4 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.c1b) [concrete = constants.%SelfDestruct.specific_fn.ec2] +// CHECK:STDOUT: %SelfDestruct.call.loc18_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc18_3.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // 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 f0f7dd924330..1edd11ba6126 100644 --- a/toolchain/check/testdata/tuple/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/tuple/in_place_tuple_init.carbon @@ -64,25 +64,25 @@ fn H() { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %v.patt: %pattern_type.354 = ref_binding_pattern v [concrete] // CHECK:STDOUT: %v.var_patt: %pattern_type.354 = var_pattern %v.patt [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.982: %pattern_type.354 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.2d1: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt.982 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.ec1: %SubobjectDestroy.type = facet_value %tuple.type.35f, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.df1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.ec1) [concrete] +// CHECK:STDOUT: %Destroy.facet.58e: %Destroy.type = facet_value %tuple.type.35f, (%DestroyImpl.impl_witness.df1, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.3c1: %Int.as.Copy.impl.Op.type.a1d = struct_value () [symbolic] @@ -96,47 +96,18 @@ fn H() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.3c1)] // CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.354 = ref_param_pattern [concrete = constants.%self.param_patt.982] -// CHECK:STDOUT: %self.patt: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2d1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.35f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.35f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.354 = ref_param_pattern [concrete = constants.%self.param_patt.982] -// CHECK:STDOUT: %self.patt: %pattern_type.354 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.2d1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.35f = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.35f = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> out %return.param: %tuple.type.35f { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.var: ref %tuple.type.35f = var_storage %v.var_patt // CHECK:STDOUT: %F.ref.loc7: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] -// CHECK:STDOUT: %.loc7_3: ref %tuple.type.35f = splice_block %v.var {} -// CHECK:STDOUT: %F.call.loc7: init %tuple.type.35f to %.loc7_3 = call %F.ref.loc7() +// CHECK:STDOUT: %.loc7_3.1: ref %tuple.type.35f = splice_block %v.var {} +// CHECK:STDOUT: %F.call.loc7: init %tuple.type.35f to %.loc7_3.1 = call %F.ref.loc7() // CHECK:STDOUT: assign %v.var, %F.call.loc7 // CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%tuple.type.35f] { // CHECK:STDOUT: %i32.loc7_11: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -157,41 +128,35 @@ fn H() { // CHECK:STDOUT: %F.ref.loc9: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: // CHECK:STDOUT: %F.call.loc9: init %tuple.type.35f to %.loc5_20.1 = call %F.ref.loc9() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%tuple.type.35f, (constants.%DestroyImpl.impl_witness.df1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%tuple.type.35f, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%tuple.type.35f, (constants.%DestroyImpl.impl_witness.df1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%tuple.type.35f, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: return %F.call.loc9 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %tuple.type.35f) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.2(%self.param: ref %tuple.type.35f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %tuple.type.35f) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.2(%self.param: ref %tuple.type.35f) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.4: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -209,8 +174,12 @@ fn H() { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_13.2: = bound_method %.loc15_13, %specific_fn // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc15_13.2(%.loc15_13) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc15_12.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc15_12.2) +// CHECK:STDOUT: %Destroy.facet.loc15_12.1: %Destroy.type = facet_value constants.%tuple.type.35f, (constants.%DestroyImpl.impl_witness.df1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %.loc15_12.3: %Destroy.type = converted constants.%tuple.type.35f, %Destroy.facet.loc15_12.1 [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %Destroy.facet.loc15_12.2: %Destroy.type = facet_value constants.%tuple.type.35f, (constants.%DestroyImpl.impl_witness.df1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: %.loc15_12.4: %Destroy.type = converted constants.%tuple.type.35f, %Destroy.facet.loc15_12.2 [concrete = constants.%Destroy.facet.58e] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc15_12.2) // CHECK:STDOUT: return %Int.as.Copy.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: @@ -224,7 +193,6 @@ fn H() { // CHECK:STDOUT: %tuple.type.531: type = tuple_type (type, type, type) [concrete] // CHECK:STDOUT: %tuple.0a8: %tuple.type.531 = tuple_value (%i32, %i32, %i32) [concrete] // CHECK:STDOUT: %tuple.type.abc: type = tuple_type (%i32, %i32, %i32) [concrete] -// CHECK:STDOUT: %pattern_type.c97: type = pattern_type %tuple.type.abc [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %tuple.type.d58: type = tuple_type (%tuple.type.531, %tuple.type.531) [concrete] @@ -233,34 +201,32 @@ fn H() { // CHECK:STDOUT: %pattern_type.d09: type = pattern_type %tuple.type.860 [concrete] // CHECK:STDOUT: %v.patt.cb2: %pattern_type.d09 = ref_binding_pattern v [concrete] // CHECK:STDOUT: %v.var_patt.9f0: %pattern_type.d09 = var_pattern %v.patt.cb2 [concrete] -// CHECK:STDOUT: %pattern_type.d94: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.a2d: %pattern_type.c97 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.eb0: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt.a2d [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet.c2b: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80ef6.1) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.953: %pattern_type.d09 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.8e7: %pattern_type.d09 = wrapper_binding_pattern self, %self.param_patt.953 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.3: type = fn_type @Destroy.WithSelf.Op.loc7_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.3: %Destroy.WithSelf.Op.type.ef016f.3 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.3 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.3: %Destroy.WithSelf.SelfDestruct.type.fbceb5.3 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.3: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.3: %SubobjectDestroy.WithSelf.Op.type.6870fd.3 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.2e8: %SubobjectDestroy.type = facet_value %tuple.type.abc, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.62e: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.2e8) [concrete] +// CHECK:STDOUT: %Destroy.facet.c1b: %Destroy.type = facet_value %tuple.type.abc, (%DestroyImpl.impl_witness.62e, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.3: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.3), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.45e: %SubobjectDestroy.type = facet_value %tuple.type.860, (%custom_witness.b80ef6.3) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.b57: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.45e) [concrete] +// CHECK:STDOUT: %Destroy.facet.e01: %Destroy.type = facet_value %tuple.type.860, (%DestroyImpl.impl_witness.b57, %custom_witness.b80ef6.3) [concrete] // CHECK:STDOUT: %tuple.type.f8d: type = tuple_type (type, %tuple.type.531, type) [concrete] // CHECK:STDOUT: %tuple.2b8: %tuple.type.f8d = tuple_value (%i32, %tuple.0a8, %i32) [concrete] // CHECK:STDOUT: %tuple.type.3b7: type = tuple_type (%i32, %tuple.type.abc, %i32) [concrete] @@ -285,80 +251,21 @@ fn H() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete] // CHECK:STDOUT: %bound_method.a55: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_2.2e0: %i32 = int_value 2 [concrete] -// CHECK:STDOUT: %self.param_patt.3f2: %pattern_type.427 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.765: %pattern_type.427 = wrapper_binding_pattern self, %self.param_patt.3f2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.4: type = fn_type @Destroy.WithSelf.Op.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.4: %Destroy.WithSelf.Op.type.ef016f.4 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4: type = fn_type @Destroy.WithSelf.SelfDestruct.loc13 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.4: %Destroy.WithSelf.SelfDestruct.type.fbceb5.4 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.4: type = fn_type @SubobjectDestroy.WithSelf.Op.loc13 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.4: %SubobjectDestroy.WithSelf.Op.type.6870fd.4 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.4: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.4), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.d44: %SubobjectDestroy.type = facet_value %tuple.type.3b7, (%custom_witness.b80ef6.4) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.cb5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.d44) [concrete] +// CHECK:STDOUT: %Destroy.facet.fbe: %Destroy.type = facet_value %tuple.type.3b7, (%DestroyImpl.impl_witness.cb5, %custom_witness.b80ef6.4) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c97 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.abc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.abc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c97 = ref_param_pattern [concrete = constants.%self.param_patt.a2d] -// CHECK:STDOUT: %self.patt: %pattern_type.c97 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.eb0] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.abc = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.abc = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.3: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.3 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.3 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d09 = ref_param_pattern [concrete = constants.%self.param_patt.953] -// CHECK:STDOUT: %self.patt: %pattern_type.d09 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8e7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.860 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.860 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.3: %Destroy.WithSelf.Op.type.ef016f.3 = fn_decl @Destroy.WithSelf.Op.loc7_3.3 [concrete = constants.%Destroy.WithSelf.Op.403171.3] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d09 = ref_param_pattern [concrete = constants.%self.param_patt.953] -// CHECK:STDOUT: %self.patt: %pattern_type.d09 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.8e7] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.860 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.860 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.4: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.4 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc13 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.427 = ref_param_pattern [concrete = constants.%self.param_patt.3f2] -// CHECK:STDOUT: %self.patt: %pattern_type.427 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.765] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.3b7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.3b7 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.4: %Destroy.WithSelf.Op.type.ef016f.4 = fn_decl @Destroy.WithSelf.Op.loc13 [concrete = constants.%Destroy.WithSelf.Op.403171.4] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.427 = ref_param_pattern [concrete = constants.%self.param_patt.3f2] -// CHECK:STDOUT: %self.patt: %pattern_type.427 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.765] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.3b7 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.3b7 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %v.var: ref %tuple.type.860 = var_storage %v.var_patt @@ -370,8 +277,8 @@ fn H() { // CHECK:STDOUT: %F.call.loc7_62: init %tuple.type.abc to %tuple.elem1 = call %F.ref.loc7_60() // CHECK:STDOUT: %.loc7_63.1: %tuple.type.860 = tuple_literal (%F.call.loc7_57, %F.call.loc7_62) // CHECK:STDOUT: %.loc7_63.2: init %tuple.type.860 to %v.var = tuple_init (%F.call.loc7_57, %F.call.loc7_62) -// CHECK:STDOUT: %.loc7_3: init %tuple.type.860 = converted %.loc7_63.1, %.loc7_63.2 -// CHECK:STDOUT: assign %v.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %tuple.type.860 = converted %.loc7_63.1, %.loc7_63.2 +// CHECK:STDOUT: assign %v.var, %.loc7_3.1 // CHECK:STDOUT: %.loc7_50.1: type = splice_block %.loc7_50.5 [concrete = constants.%tuple.type.860] { // CHECK:STDOUT: %i32.loc7_19: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %i32.loc7_24: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -391,67 +298,64 @@ fn H() { // CHECK:STDOUT: %v.patt: %pattern_type.d09 = ref_binding_pattern v [concrete = constants.%v.patt.cb2] // CHECK:STDOUT: %v.var_patt: %pattern_type.d09 = var_pattern %v.patt [concrete = constants.%v.var_patt.9f0] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%tuple.type.860, (constants.%DestroyImpl.impl_witness.b57, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.e01] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%tuple.type.860, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.e01] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%tuple.type.860, (constants.%DestroyImpl.impl_witness.b57, constants.%custom_witness.b80ef6.3) [concrete = constants.%Destroy.facet.e01] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%tuple.type.860, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.e01] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.1(%self.param: ref %i32) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.1(%self.param: ref %i32) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.1(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.1(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %tuple.type.abc) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.2(%self.param: ref %tuple.type.abc) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.3 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.4: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.4: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.4 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.3(%tuple.elem0) +// CHECK:STDOUT: %Destroy.facet.loc7_3.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc7_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc7_3.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %tuple.type.abc) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.2(%self.param: ref %tuple.type.abc) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.3(%self.param: ref %tuple.type.860) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.3(%self.param: ref %tuple.type.860) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1: ref %tuple.type.abc = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc7_3.1: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %tuple.type.abc = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.3(%self.param: ref %tuple.type.860) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.3(%self.param: ref %tuple.type.860) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.3(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.3(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc7_3.3 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %Destroy.facet.loc7_3.4: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc7_3.4: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc7_3.4 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -481,8 +385,8 @@ fn H() { // CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %v.var, element2 // CHECK:STDOUT: %.loc13_57.5: init %i32 to %tuple.elem2 = in_place_init %.loc13_57.4 [concrete = constants.%int_2.2e0] // CHECK:STDOUT: %.loc13_57.6: init %tuple.type.3b7 to %v.var = tuple_init (%.loc13_57.3, %F.call, %.loc13_57.5) -// CHECK:STDOUT: %.loc13_3: init %tuple.type.3b7 = converted %.loc13_57.1, %.loc13_57.6 -// CHECK:STDOUT: assign %v.var, %.loc13_3 +// CHECK:STDOUT: %.loc13_3.1: init %tuple.type.3b7 = converted %.loc13_57.1, %.loc13_57.6 +// CHECK:STDOUT: assign %v.var, %.loc13_3.1 // CHECK:STDOUT: %.loc13_43.1: type = splice_block %.loc13_43.4 [concrete = constants.%tuple.type.3b7] { // CHECK:STDOUT: %i32.loc13_18: type = type_literal constants.%i32 [concrete = constants.%i32] // CHECK:STDOUT: %i32.loc13_24: type = type_literal constants.%i32 [concrete = constants.%i32] @@ -499,34 +403,41 @@ fn H() { // CHECK:STDOUT: %v.patt: %pattern_type.427 = ref_binding_pattern v [concrete = constants.%v.patt.f61] // CHECK:STDOUT: %v.var_patt: %pattern_type.427 = var_pattern %v.patt [concrete = constants.%v.var_patt.4b5] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.4 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc13_3.1: %Destroy.type = facet_value constants.%tuple.type.3b7, (constants.%DestroyImpl.impl_witness.cb5, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.fbe] +// CHECK:STDOUT: %.loc13_3.2: %Destroy.type = converted constants.%tuple.type.3b7, %Destroy.facet.loc13_3.1 [concrete = constants.%Destroy.facet.fbe] +// CHECK:STDOUT: %Destroy.facet.loc13_3.2: %Destroy.type = facet_value constants.%tuple.type.3b7, (constants.%DestroyImpl.impl_witness.cb5, constants.%custom_witness.b80ef6.4) [concrete = constants.%Destroy.facet.fbe] +// CHECK:STDOUT: %.loc13_3.3: %Destroy.type = converted constants.%tuple.type.3b7, %Destroy.facet.loc13_3.2 [concrete = constants.%Destroy.facet.fbe] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%v.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc13(%self.param: ref %tuple.type.3b7) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc13(%self.param: ref %tuple.type.3b7) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %self.param, element2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13_3.1: = bound_method %tuple.elem2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13_3.1(%tuple.elem2) +// CHECK:STDOUT: %Destroy.facet.loc13_3.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_3.1: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_3.1 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc13_3.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_3.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_3.2 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem2) // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1: ref %tuple.type.abc = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13_3.2: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13_3.2(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc13_3.3: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc13_3.3: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc13_3.3 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %Destroy.facet.loc13_3.4: %Destroy.type = facet_value constants.%tuple.type.abc, (constants.%DestroyImpl.impl_witness.62e, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: %.loc13_3.4: %Destroy.type = converted constants.%tuple.type.abc, %Destroy.facet.loc13_3.4 [concrete = constants.%Destroy.facet.c1b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13_3.3: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13_3.3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13_3.3(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc13(%self.param: ref %tuple.type.3b7) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc13(%self.param: ref %tuple.type.3b7) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.4(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.4(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc13_3.5: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_3.5: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_3.5 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %Destroy.facet.loc13_3.6: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: %.loc13_3.6: %Destroy.type = converted constants.%i32, %Destroy.facet.loc13_3.6 [concrete = constants.%Destroy.facet.c2b] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13_3.3: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/tuple_pattern.carbon b/toolchain/check/testdata/tuple/tuple_pattern.carbon index a3d2ffbb687f..afc6c8b8b4f1 100644 --- a/toolchain/check/testdata/tuple/tuple_pattern.carbon +++ b/toolchain/check/testdata/tuple/tuple_pattern.carbon @@ -111,55 +111,30 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %d.patt: %pattern_type.a96 = ref_binding_pattern d [concrete] // CHECK:STDOUT: %.a7b: %pattern_type.de4 = tuple_pattern (%c.patt, %d.patt) [concrete] // CHECK:STDOUT: %.var_patt.288: %pattern_type.de4 = var_pattern %.a7b [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7a4: %pattern_type.de4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.690: %pattern_type.de4 = wrapper_binding_pattern self, %self.param_patt.7a4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6b7: %SubobjectDestroy.type = facet_value %empty_struct_type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.011: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6b7) [concrete] +// CHECK:STDOUT: %Destroy.facet.fed: %Destroy.type = facet_value %empty_struct_type, (%DestroyImpl.impl_witness.011, %custom_witness.b80ef6.1) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0c5: %SubobjectDestroy.type = facet_value %tuple.type.b6b, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.607: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0c5) [concrete] +// CHECK:STDOUT: %Destroy.facet.1bf: %Destroy.type = facet_value %tuple.type.b6b, (%DestroyImpl.impl_witness.607, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc8_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.de4 = ref_param_pattern [concrete = constants.%self.param_patt.7a4] -// CHECK:STDOUT: %self.patt: %pattern_type.de4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.690] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.b6b = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.b6b = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc8_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.de4 = ref_param_pattern [concrete = constants.%self.param_patt.7a4] -// CHECK:STDOUT: %self.patt: %pattern_type.de4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.690] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.b6b = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.b6b = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%v.param: %tuple.type.b6b) { @@ -199,8 +174,8 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc7_38.5: init %empty_struct_type = converted %tuple.elem1.loc7_38.1, %.loc7_38.4 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_38.6: init %empty_struct_type to %tuple.elem1.loc7_38.2 = in_place_init %.loc7_38.5 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_38.7: init %tuple.type.b6b to %.var.loc7 = tuple_init (%.loc7_38.3, %.loc7_38.6) [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc7_3: init %tuple.type.b6b = converted %v.ref, %.loc7_38.7 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %.var.loc7, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %tuple.type.b6b = converted %v.ref, %.loc7_38.7 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %.var.loc7, %.loc7_3.1 // CHECK:STDOUT: %tuple.elem0.loc7_3: ref %empty_struct_type = tuple_access %.var.loc7, element0 // CHECK:STDOUT: %tuple.elem1.loc7_3: ref %empty_struct_type = tuple_access %.var.loc7, element1 // CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%empty_struct_type] { @@ -232,8 +207,8 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc8_45.4: init %empty_struct_type = converted %.loc8_44.1, %.loc8_44.2 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_45.5: init %empty_struct_type to %tuple.elem1.loc8_45 = in_place_init %.loc8_45.4 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc8_45.6: init %tuple.type.b6b to %.var.loc8 = tuple_init (%.loc8_45.3, %.loc8_45.5) [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc8_3: init %tuple.type.b6b = converted %.loc8_45.1, %.loc8_45.6 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %.var.loc8, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %tuple.type.b6b = converted %.loc8_45.1, %.loc8_45.6 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %.var.loc8, %.loc8_3.1 // CHECK:STDOUT: %tuple.elem0.loc8_3: ref %empty_struct_type = tuple_access %.var.loc8, element0 // CHECK:STDOUT: %tuple.elem1.loc8_3: ref %empty_struct_type = tuple_access %.var.loc8, element1 // CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.3 [concrete = constants.%empty_struct_type] { @@ -252,43 +227,41 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc8_34: %pattern_type.de4 = tuple_pattern (%c.patt, %d.patt) [concrete = constants.%.a7b] // CHECK:STDOUT: %.var_patt.loc8: %pattern_type.de4 = var_pattern %.loc8_34 [concrete = constants.%.var_patt.288] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %.var.loc8, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%.var.loc8) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %.var.loc7, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%.var.loc7) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.var.loc8) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.var.loc7) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8_3.2(%self.param: ref %tuple.type.b6b) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8_3.2(%self.param: ref %tuple.type.b6b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %empty_struct_type = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc8_3.1: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %empty_struct_type = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_3.2(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8_3.2(%self.param: ref %tuple.type.b6b) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8_3.2(%self.param: ref %tuple.type.b6b) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc8_3.3: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc8_3.3 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %Destroy.facet.loc8_3.4: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc8_3.4: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc8_3.4 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc8_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -309,24 +282,25 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %y.patt.a7119c.1: %pattern_type.a96 = ref_binding_pattern y [concrete] // CHECK:STDOUT: %.4ca32d.1: %pattern_type.de4 = tuple_pattern (%x.patt.691773.1, %y.patt.a7119c.1) [concrete] // CHECK:STDOUT: %.var_patt.c3725e.1: %pattern_type.de4 = var_pattern %.4ca32d.1 [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.7a4: %pattern_type.de4 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.690: %pattern_type.de4 = wrapper_binding_pattern self, %self.param_patt.7a4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.6b7: %SubobjectDestroy.type = facet_value %empty_struct_type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.011: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.6b7) [concrete] +// CHECK:STDOUT: %Destroy.facet.fed: %Destroy.type = facet_value %empty_struct_type, (%DestroyImpl.impl_witness.011, %custom_witness.b80ef6.1) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.0c5: %SubobjectDestroy.type = facet_value %tuple.type.b6b, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.607: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.0c5) [concrete] +// CHECK:STDOUT: %Destroy.facet.1bf: %Destroy.type = facet_value %tuple.type.b6b, (%DestroyImpl.impl_witness.607, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %tuple.patt.29f: %pattern_type.de4 = value_binding_pattern tuple [concrete] // CHECK:STDOUT: %x.patt.691773.2: %pattern_type.a96 = ref_binding_pattern x [concrete] // CHECK:STDOUT: %y.patt.a7119c.2: %pattern_type.a96 = ref_binding_pattern y [concrete] @@ -340,35 +314,9 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.var_patt.c3725e.3: %pattern_type.de4 = var_pattern %.4ca32d.3 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.de4 = ref_param_pattern [concrete = constants.%self.param_patt.7a4] -// CHECK:STDOUT: %self.patt: %pattern_type.de4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.690] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.b6b = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.b6b = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.de4 = ref_param_pattern [concrete = constants.%self.param_patt.7a4] -// CHECK:STDOUT: %self.patt: %pattern_type.de4 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.690] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type.b6b = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type.b6b = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -386,8 +334,8 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc6_32.4: init %empty_struct_type = converted %.loc6_31.1, %.loc6_31.2 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc6_32.5: init %empty_struct_type to %tuple.elem1.loc6 = in_place_init %.loc6_32.4 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc6_32.6: init %tuple.type.b6b to %tuple.var = tuple_init (%.loc6_32.3, %.loc6_32.5) [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc6_3: init %tuple.type.b6b = converted %.loc6_32.1, %.loc6_32.6 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %tuple.var, %.loc6_3 +// CHECK:STDOUT: %.loc6_3.1: init %tuple.type.b6b = converted %.loc6_32.1, %.loc6_32.6 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %tuple.var, %.loc6_3.1 // CHECK:STDOUT: %.loc6_21.1: type = splice_block %.loc6_21.5 [concrete = constants.%tuple.type.b6b] { // CHECK:STDOUT: %.loc6_16: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc6_20: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] @@ -414,8 +362,8 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc7_38.5: init %empty_struct_type = converted %tuple.elem1.loc7_38.1, %.loc7_38.4 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_38.6: init %empty_struct_type to %tuple.elem1.loc7_38.2 = in_place_init %.loc7_38.5 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_38.7: init %tuple.type.b6b to %.var = tuple_init (%.loc7_38.3, %.loc7_38.6) [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc7_3: init %tuple.type.b6b = converted %tuple.ref, %.loc7_38.7 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %tuple.type.b6b = converted %tuple.ref, %.loc7_38.7 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %.var, %.loc7_3.1 // CHECK:STDOUT: %tuple.elem0.loc7_3: ref %empty_struct_type = tuple_access %.var, element0 // CHECK:STDOUT: %tuple.elem1.loc7_3: ref %empty_struct_type = tuple_access %.var, element1 // CHECK:STDOUT: %.loc7_19.1: type = splice_block %.loc7_19.3 [concrete = constants.%empty_struct_type] { @@ -434,43 +382,41 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc7_34: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete = constants.%.4ca32d.1] // CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc7_34 [concrete = constants.%.var_patt.c3725e.1] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc6: = bound_method %tuple.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc6: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc6(%tuple.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.var) +// CHECK:STDOUT: %Destroy.facet.loc6_3.1: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc6_3.2: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc6_3.1 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %Destroy.facet.loc6_3.2: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc6_3.3: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc6_3.2 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc6: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_3.2(%self.param: ref %tuple.type.b6b) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_3.2(%self.param: ref %tuple.type.b6b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %empty_struct_type = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc7_3.1: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %empty_struct_type = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_3.2(%self.param: ref %tuple.type.b6b) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_3.2(%self.param: ref %tuple.type.b6b) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc7_3.3 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %Destroy.facet.loc7_3.4: %Destroy.type = facet_value constants.%empty_struct_type, (constants.%DestroyImpl.impl_witness.011, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: %.loc7_3.4: %Destroy.type = converted constants.%empty_struct_type, %Destroy.facet.loc7_3.4 [concrete = constants.%Destroy.facet.fed] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -510,8 +456,8 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc14_38.5: init %empty_struct_type = converted %tuple.elem1.loc14_38.1, %.loc14_38.4 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc14_38.6: init %empty_struct_type to %tuple.elem1.loc14_38.2 = in_place_init %.loc14_38.5 [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc14_38.7: init %tuple.type.b6b to %.var = tuple_init (%.loc14_38.3, %.loc14_38.6) [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc14_3: init %tuple.type.b6b = converted %tuple.ref, %.loc14_38.7 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %.var, %.loc14_3 +// CHECK:STDOUT: %.loc14_3.1: init %tuple.type.b6b = converted %tuple.ref, %.loc14_38.7 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %.var, %.loc14_3.1 // CHECK:STDOUT: %tuple.elem0.loc14_3: ref %empty_struct_type = tuple_access %.var, element0 // CHECK:STDOUT: %tuple.elem1.loc14_3: ref %empty_struct_type = tuple_access %.var, element1 // CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.3 [concrete = constants.%empty_struct_type] { @@ -530,8 +476,12 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc14_34: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete = constants.%.4ca32d.2] // CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc14_34 [concrete = constants.%.var_patt.c3725e.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.var) +// CHECK:STDOUT: %Destroy.facet.loc14_3.1: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc14_3.2: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc14_3.1 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %Destroy.facet.loc14_3.2: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc14_3.3: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc14_3.2 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -539,8 +489,8 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.var: ref %tuple.type.b6b = var_storage %.var_patt // CHECK:STDOUT: %MakeTuple.ref: %MakeTuple.type = name_ref MakeTuple, file.%MakeTuple.decl [concrete = constants.%MakeTuple] -// CHECK:STDOUT: %.loc22_3: ref %tuple.type.b6b = splice_block %.var {} -// CHECK:STDOUT: %MakeTuple.call: init %tuple.type.b6b to %.loc22_3 = call %MakeTuple.ref() +// CHECK:STDOUT: %.loc22_3.1: ref %tuple.type.b6b = splice_block %.var {} +// CHECK:STDOUT: %MakeTuple.call: init %tuple.type.b6b to %.loc22_3.1 = call %MakeTuple.ref() // CHECK:STDOUT: assign %.var, %MakeTuple.call // CHECK:STDOUT: %tuple.elem0: ref %empty_struct_type = tuple_access %.var, element0 // CHECK:STDOUT: %tuple.elem1: ref %empty_struct_type = tuple_access %.var, element1 @@ -560,8 +510,12 @@ let (a: {}, b: {}) = ({}, {}, {}); // CHECK:STDOUT: %.loc22_34: %pattern_type.de4 = tuple_pattern (%x.patt, %y.patt) [concrete = constants.%.4ca32d.3] // CHECK:STDOUT: %.var_patt: %pattern_type.de4 = var_pattern %.loc22_34 [concrete = constants.%.var_patt.c3725e.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.var) +// CHECK:STDOUT: %Destroy.facet.loc22_3.1: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc22_3.2: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc22_3.1 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %Destroy.facet.loc22_3.2: %Destroy.type = facet_value constants.%tuple.type.b6b, (constants.%DestroyImpl.impl_witness.607, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: %.loc22_3.3: %Destroy.type = converted constants.%tuple.type.b6b, %Destroy.facet.loc22_3.2 [concrete = constants.%Destroy.facet.1bf] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/typeof/basics.carbon b/toolchain/check/testdata/typeof/basics.carbon index 3a750d412f99..6b7d6e6d5e85 100644 --- a/toolchain/check/testdata/typeof/basics.carbon +++ b/toolchain/check/testdata/typeof/basics.carbon @@ -188,52 +188,22 @@ var x: typeof(undeclared); // CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.99a: %pattern_type.98b = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.cbd: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt.99a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.978: %SubobjectDestroy.type = facet_value %C, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.1e5: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.978) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%DestroyImpl.impl_witness.1e5, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.98b = ref_param_pattern [concrete = constants.%self.param_patt.99a] -// CHECK:STDOUT: %self.patt: %pattern_type.98b = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.cbd] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %C = ref_param call_param0 -// CHECK:STDOUT: %self: ref %C = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -241,8 +211,8 @@ var x: typeof(undeclared); // CHECK:STDOUT: %c.var: ref %C = var_storage %c.var_patt // CHECK:STDOUT: %.loc10_35.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_35.2: init %C to %c.var = class_init () [concrete = constants.%C.val] -// CHECK:STDOUT: %.loc10_3: init %C = converted %.loc10_35.1, %.loc10_35.2 [concrete = constants.%C.val] -// CHECK:STDOUT: assign %c.var, %.loc10_3 +// CHECK:STDOUT: %.loc10_3.1: init %C = converted %.loc10_35.1, %.loc10_35.2 [concrete = constants.%C.val] +// CHECK:STDOUT: assign %c.var, %.loc10_3.1 // CHECK:STDOUT: %.loc10_30: type = type_of %Make.call in [concrete = constants.%C] { // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [concrete = constants.%Make] // CHECK:STDOUT: %.loc10_29: ref %C = temporary_storage @@ -253,32 +223,18 @@ var x: typeof(undeclared); // CHECK:STDOUT: %c.patt: %pattern_type.98b = ref_binding_pattern c [concrete = constants.%c.patt] // CHECK:STDOUT: %c.var_patt: %pattern_type.98b = var_pattern %c.patt [concrete = constants.%c.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc10_3.1: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.2: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_3.2: %Destroy.type = facet_value constants.%C, (constants.%DestroyImpl.impl_witness.1e5, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_3.3: %Destroy.type = converted constants.%C, %Destroy.facet.loc10_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%c.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_3.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_3.2(%self.param: ref %C) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_3.2(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- control_flow.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/destroy_control_flow.carbon b/toolchain/check/testdata/var/destroy_control_flow.carbon index cb4beed8b6b3..d4871e85ea81 100644 --- a/toolchain/check/testdata/var/destroy_control_flow.carbon +++ b/toolchain/check/testdata/var/destroy_control_flow.carbon @@ -15,8 +15,7 @@ library "[[@TEST_NAME]]"; class Destructible { - // TODO: Implement Core.Destructor instead. - impl as Core.Destroy { + impl as Core.DestroyImpl { fn Op(self); } }; @@ -139,57 +138,21 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.397 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.397 = var_pattern %b.patt [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.3eb: %pattern_type.397 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.474: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt.3eb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.683: = impl_witness imports.%DestroyImpl.impl_witness_table.fe3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_5.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Destructible, (%DestroyImpl.impl_witness.683, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %Destructible.as.DestroyImpl.impl.Op.type: type = fn_type @Destructible.as.DestroyImpl.impl.Op [concrete] +// CHECK:STDOUT: %Destructible.as.DestroyImpl.impl.Op: %Destructible.as.DestroyImpl.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.Destructible: type = import_ref Main//destructible, Destructible, loaded [concrete = constants.%Destructible] // CHECK:STDOUT: %Main.Use: %Use.type = import_ref Main//destructible, Use, loaded [concrete = constants.%Use] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_5.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_5.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_5.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.397 = ref_param_pattern [concrete = constants.%self.param_patt.3eb] -// CHECK:STDOUT: %self.patt: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.474] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Destructible = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Destructible = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_5.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.397 = ref_param_pattern [concrete = constants.%self.param_patt.3eb] -// CHECK:STDOUT: %self.patt: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.474] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Destructible = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Destructible = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Main.import_ref.745: %Destructible.as.DestroyImpl.impl.Op.type = import_ref Main//destructible, loc6_16, loaded [concrete = constants.%Destructible.as.DestroyImpl.impl.Op] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table.fe3 = impl_witness_table (%Main.import_ref.745), @Destructible.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IfThen(%cond.param: bool) { @@ -197,8 +160,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %a.var: ref %Destructible = var_storage %a.var_patt // CHECK:STDOUT: %.loc7_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_26.2: init %Destructible to %a.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc7_3: init %Destructible = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %a.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %Destructible = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %a.var, %.loc7_3.1 // CHECK:STDOUT: %Destructible.ref.loc7: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %a: ref %Destructible = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -216,8 +179,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %b.var: ref %Destructible = var_storage %b.var_patt // CHECK:STDOUT: %.loc10_28.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_28.2: init %Destructible to %b.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc10_5: init %Destructible = converted %.loc10_28.1, %.loc10_28.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %b.var, %.loc10_5 +// CHECK:STDOUT: %.loc10_5.1: init %Destructible = converted %.loc10_28.1, %.loc10_28.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %b.var, %.loc10_5.1 // CHECK:STDOUT: %Destructible.ref.loc10: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %b: ref %Destructible = wrapper_binding b, %b.var // CHECK:STDOUT: name_binding_decl { @@ -228,8 +191,12 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %b.ref: ref %Destructible = name_ref b, %b // CHECK:STDOUT: %.loc11: %Destructible = ref_tag %b.ref // CHECK:STDOUT: %Use.call.loc11: init %empty_tuple.type = call %Use.ref.loc11(%b.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc10_5.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_5.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc10_5.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_5.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_5.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc10_5.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: @@ -237,32 +204,18 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %a.ref.loc13: ref %Destructible = name_ref a, %a // CHECK:STDOUT: %.loc13: %Destructible = ref_tag %a.ref.loc13 // CHECK:STDOUT: %Use.call.loc13: init %empty_tuple.type = call %Use.ref.loc13(%a.ref.loc13) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_5.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_5.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_5.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_5.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_5.2(%self.param: ref %Destructible) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_5.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- if_else.carbon // CHECK:STDOUT: @@ -280,59 +233,23 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.397 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.397 = var_pattern %b.patt [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.3eb: %pattern_type.397 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.474: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt.3eb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.683: = impl_witness imports.%DestroyImpl.impl_witness_table.fe3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_5.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Destructible, (%DestroyImpl.impl_witness.683, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: %c.patt: %pattern_type.397 = ref_binding_pattern c [concrete] // CHECK:STDOUT: %c.var_patt: %pattern_type.397 = var_pattern %c.patt [concrete] +// CHECK:STDOUT: %Destructible.as.DestroyImpl.impl.Op.type: type = fn_type @Destructible.as.DestroyImpl.impl.Op [concrete] +// CHECK:STDOUT: %Destructible.as.DestroyImpl.impl.Op: %Destructible.as.DestroyImpl.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.Destructible: type = import_ref Main//destructible, Destructible, loaded [concrete = constants.%Destructible] // CHECK:STDOUT: %Main.Use: %Use.type = import_ref Main//destructible, Use, loaded [concrete = constants.%Use] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_5.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_5.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_5.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.397 = ref_param_pattern [concrete = constants.%self.param_patt.3eb] -// CHECK:STDOUT: %self.patt: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.474] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Destructible = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Destructible = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_5.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.397 = ref_param_pattern [concrete = constants.%self.param_patt.3eb] -// CHECK:STDOUT: %self.patt: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.474] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Destructible = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Destructible = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Main.import_ref.745: %Destructible.as.DestroyImpl.impl.Op.type = import_ref Main//destructible, loc6_16, loaded [concrete = constants.%Destructible.as.DestroyImpl.impl.Op] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table.fe3 = impl_witness_table (%Main.import_ref.745), @Destructible.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IfElse(%cond.param: bool) { @@ -340,8 +257,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %a.var: ref %Destructible = var_storage %a.var_patt // CHECK:STDOUT: %.loc7_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_26.2: init %Destructible to %a.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc7_3: init %Destructible = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %a.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %Destructible = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %a.var, %.loc7_3.1 // CHECK:STDOUT: %Destructible.ref.loc7: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %a: ref %Destructible = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -359,8 +276,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %b.var: ref %Destructible = var_storage %b.var_patt // CHECK:STDOUT: %.loc10_28.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_28.2: init %Destructible to %b.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc10_5: init %Destructible = converted %.loc10_28.1, %.loc10_28.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %b.var, %.loc10_5 +// CHECK:STDOUT: %.loc10_5.1: init %Destructible = converted %.loc10_28.1, %.loc10_28.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %b.var, %.loc10_5.1 // CHECK:STDOUT: %Destructible.ref.loc10: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %b: ref %Destructible = wrapper_binding b, %b.var // CHECK:STDOUT: name_binding_decl { @@ -371,16 +288,20 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %b.ref: ref %Destructible = name_ref b, %b // CHECK:STDOUT: %.loc11: %Destructible = ref_tag %b.ref // CHECK:STDOUT: %Use.call.loc11: init %empty_tuple.type = call %Use.ref.loc11(%b.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc10_5.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_5.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc10_5.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_5.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_5.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc10_5.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) // CHECK:STDOUT: br !if.done // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %c.var: ref %Destructible = var_storage %c.var_patt // CHECK:STDOUT: %.loc13_28.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc13_28.2: init %Destructible to %c.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc13_5: init %Destructible = converted %.loc13_28.1, %.loc13_28.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %c.var, %.loc13_5 +// CHECK:STDOUT: %.loc13_5.1: init %Destructible = converted %.loc13_28.1, %.loc13_28.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %c.var, %.loc13_5.1 // CHECK:STDOUT: %Destructible.ref.loc13: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %c: ref %Destructible = wrapper_binding c, %c.var // CHECK:STDOUT: name_binding_decl { @@ -391,8 +312,12 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %c.ref: ref %Destructible = name_ref c, %c // CHECK:STDOUT: %.loc14: %Destructible = ref_tag %c.ref // CHECK:STDOUT: %Use.call.loc14: init %empty_tuple.type = call %Use.ref.loc14(%c.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc13: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc13: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc13(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc13_5.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_5.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc13_5.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc13_5.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc13_5.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc13_5.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc13: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%c.var) // CHECK:STDOUT: br !if.done // CHECK:STDOUT: // CHECK:STDOUT: !if.done: @@ -400,32 +325,18 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %a.ref.loc16: ref %Destructible = name_ref a, %a // CHECK:STDOUT: %.loc16: %Destructible = ref_tag %a.ref.loc16 // CHECK:STDOUT: %Use.call.loc16: init %empty_tuple.type = call %Use.ref.loc16(%a.ref.loc16) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_5.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_5.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_5.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_5.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_5.2(%self.param: ref %Destructible) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_5.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- if_return.carbon // CHECK:STDOUT: @@ -443,57 +354,21 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.397 = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.397 = var_pattern %b.patt [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc10_5.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.3eb: %pattern_type.397 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.474: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt.3eb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc10_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10_5.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.683: = impl_witness imports.%DestroyImpl.impl_witness_table.fe3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10_5.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Destructible, (%DestroyImpl.impl_witness.683, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %Destructible.as.DestroyImpl.impl.Op.type: type = fn_type @Destructible.as.DestroyImpl.impl.Op [concrete] +// CHECK:STDOUT: %Destructible.as.DestroyImpl.impl.Op: %Destructible.as.DestroyImpl.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.Destructible: type = import_ref Main//destructible, Destructible, loaded [concrete = constants.%Destructible] // CHECK:STDOUT: %Main.Use: %Use.type = import_ref Main//destructible, Use, loaded [concrete = constants.%Use] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_5.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc10_5.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10_5.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.397 = ref_param_pattern [concrete = constants.%self.param_patt.3eb] -// CHECK:STDOUT: %self.patt: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.474] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Destructible = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Destructible = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc10_5.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.397 = ref_param_pattern [concrete = constants.%self.param_patt.3eb] -// CHECK:STDOUT: %self.patt: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.474] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Destructible = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Destructible = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Main.import_ref.745: %Destructible.as.DestroyImpl.impl.Op.type = import_ref Main//destructible, loc6_16, loaded [concrete = constants.%Destructible.as.DestroyImpl.impl.Op] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table.fe3 = impl_witness_table (%Main.import_ref.745), @Destructible.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IfReturn(%cond.param: bool) { @@ -501,8 +376,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %a.var: ref %Destructible = var_storage %a.var_patt // CHECK:STDOUT: %.loc7_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_26.2: init %Destructible to %a.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc7_3: init %Destructible = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %a.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %Destructible = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %a.var, %.loc7_3.1 // CHECK:STDOUT: %Destructible.ref.loc7: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %a: ref %Destructible = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -520,8 +395,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %b.var: ref %Destructible = var_storage %b.var_patt // CHECK:STDOUT: %.loc10_28.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_28.2: init %Destructible to %b.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc10_5: init %Destructible = converted %.loc10_28.1, %.loc10_28.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %b.var, %.loc10_5 +// CHECK:STDOUT: %.loc10_5.1: init %Destructible = converted %.loc10_28.1, %.loc10_28.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %b.var, %.loc10_5.1 // CHECK:STDOUT: %Destructible.ref.loc10: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %b: ref %Destructible = wrapper_binding b, %b.var // CHECK:STDOUT: name_binding_decl { @@ -532,39 +407,33 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %b.ref: ref %Destructible = name_ref b, %b // CHECK:STDOUT: %.loc11: %Destructible = ref_tag %b.ref // CHECK:STDOUT: %Use.call.loc11: init %empty_tuple.type = call %Use.ref.loc11(%b.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.1(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc10_5.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_5.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc10_5.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_5.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_5.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc10_5.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%a.var) // CHECK:STDOUT: return // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7_3.2(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.3: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.4: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.3 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.4: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.5: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.4 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10_5.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_5.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10_5.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_5.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10_5.2(%self.param: ref %Destructible) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10_5.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- while_break.carbon // CHECK:STDOUT: @@ -584,57 +453,21 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %b.var_patt: %pattern_type.397 = var_pattern %b.patt [concrete] // CHECK:STDOUT: %c.patt: %pattern_type.397 = ref_binding_pattern c [concrete] // CHECK:STDOUT: %c.var_patt: %pattern_type.397 = var_pattern %c.patt [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc14_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.3eb: %pattern_type.397 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.474: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt.3eb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc14_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.683: = impl_witness imports.%DestroyImpl.impl_witness_table.fe3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Destructible, (%DestroyImpl.impl_witness.683, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %Destructible.as.DestroyImpl.impl.Op.type: type = fn_type @Destructible.as.DestroyImpl.impl.Op [concrete] +// CHECK:STDOUT: %Destructible.as.DestroyImpl.impl.Op: %Destructible.as.DestroyImpl.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.Destructible: type = import_ref Main//destructible, Destructible, loaded [concrete = constants.%Destructible] // CHECK:STDOUT: %Main.Use: %Use.type = import_ref Main//destructible, Use, loaded [concrete = constants.%Use] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc14_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.397 = ref_param_pattern [concrete = constants.%self.param_patt.3eb] -// CHECK:STDOUT: %self.patt: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.474] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Destructible = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Destructible = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc14_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.397 = ref_param_pattern [concrete = constants.%self.param_patt.3eb] -// CHECK:STDOUT: %self.patt: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.474] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Destructible = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Destructible = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Main.import_ref.745: %Destructible.as.DestroyImpl.impl.Op.type = import_ref Main//destructible, loc6_16, loaded [concrete = constants.%Destructible.as.DestroyImpl.impl.Op] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table.fe3 = impl_witness_table (%Main.import_ref.745), @Destructible.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @WhileBreak(%cond.param: bool) { @@ -642,8 +475,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %a.var: ref %Destructible = var_storage %a.var_patt // CHECK:STDOUT: %.loc7_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_26.2: init %Destructible to %a.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc7_3: init %Destructible = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %a.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %Destructible = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %a.var, %.loc7_3.1 // CHECK:STDOUT: %Destructible.ref.loc7: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %a: ref %Destructible = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -668,8 +501,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %b.var: ref %Destructible = var_storage %b.var_patt // CHECK:STDOUT: %.loc11_28.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc11_28.2: init %Destructible to %b.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc11_5: init %Destructible = converted %.loc11_28.1, %.loc11_28.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %b.var, %.loc11_5 +// CHECK:STDOUT: %.loc11_5.1: init %Destructible = converted %.loc11_28.1, %.loc11_28.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %b.var, %.loc11_5.1 // CHECK:STDOUT: %Destructible.ref.loc11: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %b: ref %Destructible = wrapper_binding b, %b.var // CHECK:STDOUT: name_binding_decl { @@ -687,8 +520,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %c.var: ref %Destructible = var_storage %c.var_patt // CHECK:STDOUT: %.loc14_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc14_30.2: init %Destructible to %c.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc14_7: init %Destructible = converted %.loc14_30.1, %.loc14_30.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %c.var, %.loc14_7 +// CHECK:STDOUT: %.loc14_7.1: init %Destructible = converted %.loc14_30.1, %.loc14_30.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %c.var, %.loc14_7.1 // CHECK:STDOUT: %Destructible.ref.loc14: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %c: ref %Destructible = wrapper_binding c, %c.var // CHECK:STDOUT: name_binding_decl { @@ -699,15 +532,27 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %c.ref: ref %Destructible = name_ref c, %c // CHECK:STDOUT: %.loc15: %Destructible = ref_tag %c.ref // CHECK:STDOUT: %Use.call.loc15: init %empty_tuple.type = call %Use.ref.loc15(%c.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14(%c.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11_5.1: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_5.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11_5.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc14_7.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_7.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc14_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc14_7.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_7.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc14_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc11_5.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_5.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc11_5.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_5.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_5.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc11_5.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11_5.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%b.var) // CHECK:STDOUT: br !while.done // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11_5.2: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_5.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11_5.2(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc11_5.3: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_5.4: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc11_5.3 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_5.4: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_5.5: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc11_5.4 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11_5.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%b.var) // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.done: @@ -715,32 +560,18 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %a.ref.loc19: ref %Destructible = name_ref a, %a // CHECK:STDOUT: %.loc19: %Destructible = ref_tag %a.ref.loc19 // CHECK:STDOUT: %Use.call.loc19: init %empty_tuple.type = call %Use.ref.loc19(%a.ref.loc19) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_7.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_7.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_7.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_7.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_7.2(%self.param: ref %Destructible) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_7.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- while_continue.carbon // CHECK:STDOUT: @@ -760,57 +591,21 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %b.var_patt: %pattern_type.397 = var_pattern %b.patt [concrete] // CHECK:STDOUT: %c.patt: %pattern_type.397 = ref_binding_pattern c [concrete] // CHECK:STDOUT: %c.var_patt: %pattern_type.397 = var_pattern %c.patt [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc14_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.3eb: %pattern_type.397 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.474: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt.3eb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc14_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.683: = impl_witness imports.%DestroyImpl.impl_witness_table.fe3 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Destructible, (%DestroyImpl.impl_witness.683, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %Destructible.as.DestroyImpl.impl.Op.type: type = fn_type @Destructible.as.DestroyImpl.impl.Op [concrete] +// CHECK:STDOUT: %Destructible.as.DestroyImpl.impl.Op: %Destructible.as.DestroyImpl.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.Destructible: type = import_ref Main//destructible, Destructible, loaded [concrete = constants.%Destructible] // CHECK:STDOUT: %Main.Use: %Use.type = import_ref Main//destructible, Use, loaded [concrete = constants.%Use] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc14_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.397 = ref_param_pattern [concrete = constants.%self.param_patt.3eb] -// CHECK:STDOUT: %self.patt: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.474] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Destructible = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Destructible = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc14_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.397 = ref_param_pattern [concrete = constants.%self.param_patt.3eb] -// CHECK:STDOUT: %self.patt: %pattern_type.397 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.474] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %Destructible = ref_param call_param0 -// CHECK:STDOUT: %self: ref %Destructible = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Main.import_ref.745: %Destructible.as.DestroyImpl.impl.Op.type = import_ref Main//destructible, loc6_16, loaded [concrete = constants.%Destructible.as.DestroyImpl.impl.Op] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table.fe3 = impl_witness_table (%Main.import_ref.745), @Destructible.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @WhileContinue(%cond.param: bool) { @@ -818,8 +613,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %a.var: ref %Destructible = var_storage %a.var_patt // CHECK:STDOUT: %.loc7_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_26.2: init %Destructible to %a.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc7_3: init %Destructible = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %a.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %Destructible = converted %.loc7_26.1, %.loc7_26.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %a.var, %.loc7_3.1 // CHECK:STDOUT: %Destructible.ref.loc7: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %a: ref %Destructible = wrapper_binding a, %a.var // CHECK:STDOUT: name_binding_decl { @@ -844,8 +639,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %b.var: ref %Destructible = var_storage %b.var_patt // CHECK:STDOUT: %.loc11_28.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc11_28.2: init %Destructible to %b.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc11_5: init %Destructible = converted %.loc11_28.1, %.loc11_28.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %b.var, %.loc11_5 +// CHECK:STDOUT: %.loc11_5.1: init %Destructible = converted %.loc11_28.1, %.loc11_28.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %b.var, %.loc11_5.1 // CHECK:STDOUT: %Destructible.ref.loc11: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %b: ref %Destructible = wrapper_binding b, %b.var // CHECK:STDOUT: name_binding_decl { @@ -863,8 +658,8 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %c.var: ref %Destructible = var_storage %c.var_patt // CHECK:STDOUT: %.loc14_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc14_30.2: init %Destructible to %c.var = class_init () [concrete = constants.%Destructible.val] -// CHECK:STDOUT: %.loc14_7: init %Destructible = converted %.loc14_30.1, %.loc14_30.2 [concrete = constants.%Destructible.val] -// CHECK:STDOUT: assign %c.var, %.loc14_7 +// CHECK:STDOUT: %.loc14_7.1: init %Destructible = converted %.loc14_30.1, %.loc14_30.2 [concrete = constants.%Destructible.val] +// CHECK:STDOUT: assign %c.var, %.loc14_7.1 // CHECK:STDOUT: %Destructible.ref.loc14: type = name_ref Destructible, imports.%Main.Destructible [concrete = constants.%Destructible] // CHECK:STDOUT: %c: ref %Destructible = wrapper_binding c, %c.var // CHECK:STDOUT: name_binding_decl { @@ -875,15 +670,27 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %c.ref: ref %Destructible = name_ref c, %c // CHECK:STDOUT: %.loc15: %Destructible = ref_tag %c.ref // CHECK:STDOUT: %Use.call.loc15: init %empty_tuple.type = call %Use.ref.loc15(%c.ref) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc14: = bound_method %c.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc14: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc14(%c.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11_5.1: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_5.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11_5.1(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc14_7.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_7.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc14_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc14_7.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_7.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc14_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc14: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%c.var) +// CHECK:STDOUT: %Destroy.facet.loc11_5.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_5.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc11_5.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_5.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_5.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc11_5.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11_5.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%b.var) // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc11_5.2: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc11_5.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc11_5.2(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc11_5.3: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_5.4: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc11_5.3 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc11_5.4: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc11_5.5: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc11_5.4 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc11_5.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%b.var) // CHECK:STDOUT: br !while.cond // CHECK:STDOUT: // CHECK:STDOUT: !while.done: @@ -891,30 +698,16 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %a.ref.loc19: ref %Destructible = name_ref a, %a // CHECK:STDOUT: %.loc19: %Destructible = ref_tag %a.ref.loc19 // CHECK:STDOUT: %Use.call.loc19: init %empty_tuple.type = call %Use.ref.loc19(%a.ref.loc19) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%Destructible, (constants.%DestroyImpl.impl_witness.683, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%Destructible, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_7.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_7.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_7.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_7.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_7.2(%self.param: ref %Destructible) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_7.2(%self.param: ref %Destructible) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_duplicate_decl.carbon b/toolchain/check/testdata/var/fail_duplicate_decl.carbon index b989cda53356..bfe854249ac2 100644 --- a/toolchain/check/testdata/var/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/var/fail_duplicate_decl.carbon @@ -35,41 +35,31 @@ fn Main() { // CHECK:STDOUT: %x.var_patt.28d573.1: %pattern_type.cb1 = var_pattern %x.patt.06838d.1 [concrete] // CHECK:STDOUT: %x.patt.06838d.2: %pattern_type.cb1 = ref_binding_pattern x [concrete] // CHECK:STDOUT: %x.var_patt.28d573.2: %pattern_type.cb1 = var_pattern %x.patt.06838d.2 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc7 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -86,8 +76,8 @@ fn Main() { // CHECK:STDOUT: %x.var.loc3: ref %empty_tuple.type = var_storage %x.var_patt.loc3 // CHECK:STDOUT: %.loc3_23.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc3_23.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc3_3: init %empty_tuple.type = converted %.loc3_23.1, %.loc3_23.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var.loc3, %.loc3_3 +// CHECK:STDOUT: %.loc3_3.1: init %empty_tuple.type = converted %.loc3_23.1, %.loc3_23.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var.loc3, %.loc3_3.1 // CHECK:STDOUT: %.loc3_18.1: type = splice_block %.loc3_18.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc3_18.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc3_18.3: type = converted %.loc3_18.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -100,8 +90,8 @@ fn Main() { // CHECK:STDOUT: %x.var.loc7: ref %empty_tuple.type = var_storage %x.var_patt.loc7 // CHECK:STDOUT: %.loc7_23.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_23.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_3: init %empty_tuple.type = converted %.loc7_23.1, %.loc7_23.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var.loc7, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %empty_tuple.type = converted %.loc7_23.1, %.loc7_23.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var.loc7, %.loc7_3.1 // CHECK:STDOUT: %.loc7_18.1: type = splice_block %.loc7_18.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc7_18.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_18.3: type = converted %.loc7_18.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -111,21 +101,20 @@ fn Main() { // CHECK:STDOUT: %x.patt.loc7: %pattern_type.cb1 = ref_binding_pattern x [concrete = constants.%x.patt.06838d.2] // CHECK:STDOUT: %x.var_patt.loc7: %pattern_type.cb1 = var_pattern %x.patt.loc7 [concrete = constants.%x.var_patt.28d573.2] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %x.var.loc7, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%x.var.loc7) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc3: = bound_method %x.var.loc3, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc3(%x.var.loc3) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%x.var.loc7) +// CHECK:STDOUT: %Destroy.facet.loc3_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc3_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc3_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc3_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc3_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc3_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc3: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%x.var.loc3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_init_with_self.carbon b/toolchain/check/testdata/var/fail_init_with_self.carbon index 3e52ef85f6f4..27891a9cdea1 100644 --- a/toolchain/check/testdata/var/fail_init_with_self.carbon +++ b/toolchain/check/testdata/var/fail_init_with_self.carbon @@ -34,41 +34,31 @@ fn Main() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete] // CHECK:STDOUT: %x.var_patt: %pattern_type.cb1 = var_pattern %x.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -94,19 +84,14 @@ fn Main() { // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.cb1 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.1: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/fail_storage_is_literal.carbon b/toolchain/check/testdata/var/fail_storage_is_literal.carbon index 68938d34036a..ed900b32f39b 100644 --- a/toolchain/check/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/check/testdata/var/fail_storage_is_literal.carbon @@ -28,18 +28,19 @@ fn Main() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.0ff: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.0ff = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.0ff = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/var/global_lookup_in_scope.carbon b/toolchain/check/testdata/var/global_lookup_in_scope.carbon index 3183f7b7d447..8086c62a5056 100644 --- a/toolchain/check/testdata/var/global_lookup_in_scope.carbon +++ b/toolchain/check/testdata/var/global_lookup_in_scope.carbon @@ -36,64 +36,38 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] // CHECK:STDOUT: %y.patt: %pattern_type.c4c = ref_binding_pattern y [concrete] // CHECK:STDOUT: %y.var_patt: %pattern_type.c4c = var_pattern %y.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc5_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.37e: %pattern_type.c4c = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.fc9: %pattern_type.c4c = wrapper_binding_pattern self, %self.param_patt.37e [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc5_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet.939: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c50: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.939) [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.035: %SubobjectDestroy.type = facet_value %struct_type.v, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.032: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.035) [concrete] +// CHECK:STDOUT: %Destroy.facet.2bf: %Destroy.type = facet_value %struct_type.v, (%DestroyImpl.impl_witness.032, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.5a7: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.2bf) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc5_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c4c = ref_param_pattern [concrete = constants.%self.param_patt.37e] -// CHECK:STDOUT: %self.patt: %pattern_type.c4c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.fc9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.v = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.v = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc5_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.c4c = ref_param_pattern [concrete = constants.%self.param_patt.37e] -// CHECK:STDOUT: %self.patt: %pattern_type.c4c = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.fc9] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %struct_type.v = ref_param call_param0 -// CHECK:STDOUT: %self: ref %struct_type.v = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -126,8 +100,8 @@ fn Main() { // CHECK:STDOUT: %.loc5_28.3: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_28.4: init %empty_tuple.type = converted %.loc5_28.1, %.loc5_28.3 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_28.5: init %struct_type.v to %y.var = struct_init (%.loc5_28.4) [concrete = constants.%struct] -// CHECK:STDOUT: %.loc5_3: init %struct_type.v = converted %x.ref, %.loc5_28.5 [concrete = constants.%struct] -// CHECK:STDOUT: assign %y.var, %.loc5_3 +// CHECK:STDOUT: %.loc5_3.1: init %struct_type.v = converted %x.ref, %.loc5_28.5 [concrete = constants.%struct] +// CHECK:STDOUT: assign %y.var, %.loc5_3.1 // CHECK:STDOUT: %.loc5_24: type = splice_block %struct_type.v [concrete = constants.%struct_type.v] { // CHECK:STDOUT: %.loc5_23.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_23.2: type = converted %.loc5_23.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -138,36 +112,26 @@ fn Main() { // CHECK:STDOUT: %y.patt: %pattern_type.c4c = ref_binding_pattern y [concrete = constants.%y.patt] // CHECK:STDOUT: %y.var_patt: %pattern_type.c4c = var_pattern %y.patt [concrete = constants.%y.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %y.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%y.var) +// CHECK:STDOUT: %Destroy.facet.loc5_3.1: %Destroy.type = facet_value constants.%struct_type.v, (constants.%DestroyImpl.impl_witness.032, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.2bf] +// CHECK:STDOUT: %.loc5_3.2: %Destroy.type = converted constants.%struct_type.v, %Destroy.facet.loc5_3.1 [concrete = constants.%Destroy.facet.2bf] +// CHECK:STDOUT: %Destroy.facet.loc5_3.2: %Destroy.type = facet_value constants.%struct_type.v, (constants.%DestroyImpl.impl_witness.032, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.2bf] +// CHECK:STDOUT: %.loc5_3.3: %Destroy.type = converted constants.%struct_type.v, %Destroy.facet.loc5_3.2 [concrete = constants.%Destroy.facet.2bf] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.2bf) [concrete = constants.%SelfDestruct.specific_fn.5a7] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%y.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_3.1(%self.param: ref %empty_tuple.type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5_3.1(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5_3.1(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5_3.1(%self.param: ref %empty_tuple.type) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5_3.2(%self.param: ref %struct_type.v) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_3.2(%self.param: ref %struct_type.v) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5: ref %empty_tuple.type = struct_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc5, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc5) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5_3.2(%self.param: ref %struct_type.v) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5_3.2(%self.param: ref %struct_type.v) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %.loc5_3.1: ref %empty_tuple.type = struct_access %self.param, element0 +// CHECK:STDOUT: %Destroy.facet.loc5_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc5_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc5_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc5_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc5_3.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/initialization.carbon b/toolchain/check/testdata/var/initialization.carbon index 346d204c875a..44f273c8efc8 100644 --- a/toolchain/check/testdata/var/initialization.carbon +++ b/toolchain/check/testdata/var/initialization.carbon @@ -69,31 +69,22 @@ fn Main() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete] // CHECK:STDOUT: %x.var_patt: %pattern_type.cb1 = var_pattern %x.patt [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { @@ -101,8 +92,8 @@ fn Main() { // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var_storage %x.var_patt // CHECK:STDOUT: %.loc8_23.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_23.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_3: init %empty_tuple.type = converted %.loc8_23.1, %.loc8_23.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %empty_tuple.type = converted %.loc8_23.1, %.loc8_23.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var, %.loc8_3.1 // CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc8_18.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_18.3: type = converted %.loc8_18.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -112,21 +103,16 @@ fn Main() { // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.cb1 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- uninitialized.carbon // CHECK:STDOUT: @@ -142,36 +128,24 @@ fn Main() { // CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %empty_tuple.type, (%DefaultOrUnformed.impl_witness) [concrete] // CHECK:STDOUT: %empty_tuple.type.as.DefaultOrUnformed.impl.Op.type: type = fn_type @empty_tuple.type.as.DefaultOrUnformed.impl.Op [concrete] // CHECK:STDOUT: %empty_tuple.type.as.DefaultOrUnformed.impl.Op: %empty_tuple.type.as.DefaultOrUnformed.impl.Op.type = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.9c3: %empty_tuple.type.as.DefaultOrUnformed.impl.Op.type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%empty_tuple.type.as.DefaultOrUnformed.impl.Op] // CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table = impl_witness_table (%Core.import_ref.9c3), @empty_tuple.type.as.DefaultOrUnformed.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { @@ -192,19 +166,14 @@ fn Main() { // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.cb1 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.1: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/lifetime.carbon b/toolchain/check/testdata/var/lifetime.carbon index 8e5ad8b824de..a6062da1202b 100644 --- a/toolchain/check/testdata/var/lifetime.carbon +++ b/toolchain/check/testdata/var/lifetime.carbon @@ -63,53 +63,22 @@ fn F() { // CHECK:STDOUT: %A.as.Copy.impl.Op.bound: = bound_method %A.val, %A.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.9ef = ref_binding_pattern b [concrete] // CHECK:STDOUT: %b.var_patt: %pattern_type.9ef = var_pattern %b.patt [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_25.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc16_25.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16_25.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc16_25.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16_25.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.367, %Destroy.WithSelf.SelfDestruct.db3fdb.2 [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16_25.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_25.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc16_25.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16_25.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc16_25.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -136,8 +105,8 @@ fn F() { // CHECK:STDOUT: %tuple.elem1: %A = tuple_access %.loc15_38.2, element1 [concrete = constants.%A.val] // CHECK:STDOUT: %impl.elem0: %.02e = impl_witness_access constants.%Copy.impl_witness.a05, element0 [concrete = constants.%A.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %tuple.elem1, %impl.elem0 [concrete = constants.%A.as.Copy.impl.Op.bound] -// CHECK:STDOUT: %.loc15_3: ref %A = splice_block %a.var {} -// CHECK:STDOUT: %A.as.Copy.impl.Op.call: init %A to %.loc15_3 = call %bound_method(%tuple.elem1) +// CHECK:STDOUT: %.loc15_3.1: ref %A = splice_block %a.var {} +// CHECK:STDOUT: %A.as.Copy.impl.Op.call: init %A to %.loc15_3.1 = call %bound_method(%tuple.elem1) // CHECK:STDOUT: assign %a.var, %A.as.Copy.impl.Op.call // CHECK:STDOUT: %A.ref.loc15_17: type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %a: ref %A = wrapper_binding a, %a.var @@ -153,8 +122,8 @@ fn F() { // CHECK:STDOUT: %.loc16_25.1: init %A = converted %.loc16_23.1, %.loc16_23.3 [concrete = constants.%A.val] // CHECK:STDOUT: %.loc16_25.2: ref %A = temporary %.loc16_23.2, %.loc16_25.1 [concrete = constants.%.367] // CHECK:STDOUT: %Clone.ref: %A.Clone.type = name_ref Clone, @A.%A.Clone.decl [concrete = constants.%A.Clone] -// CHECK:STDOUT: %.loc16_3: ref %A = splice_block %b.var {} -// CHECK:STDOUT: %A.Clone.call: init %A to %.loc16_3 = call %Clone.ref() +// CHECK:STDOUT: %.loc16_3.1: ref %A = splice_block %b.var {} +// CHECK:STDOUT: %A.Clone.call: init %A to %.loc16_3.1 = call %Clone.ref() // CHECK:STDOUT: assign %b.var, %A.Clone.call // CHECK:STDOUT: %A.ref.loc16_17: type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %b: ref %A = wrapper_binding b, %b.var @@ -164,35 +133,40 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.ref() -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16_25: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.367) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc16: = bound_method %b.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc16_3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc16(%b.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15_34: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.367) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15_25: init %empty_tuple.type = call constants.%Destroy.WithSelf.SelfDestruct.bound(constants.%.367) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc15: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc15_3: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc15(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc16_25.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_25.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc16_25.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_25.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_25.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc16_25.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16_25: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc16_25.2) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%A, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc16_3: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%b.var) +// CHECK:STDOUT: %Destroy.facet.loc15_34.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_34.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc15_34.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc15_34.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_34.5: %Destroy.type = converted constants.%A, %Destroy.facet.loc15_34.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15_34: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%.loc15_34.2) +// CHECK:STDOUT: %Destroy.facet.loc15_25.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_25.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc15_25.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc15_25.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_25.5: %Destroy.type = converted constants.%A, %Destroy.facet.loc15_25.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15_25: init %empty_tuple.type = call %SelfDestruct.specific_fn.4(%.loc15_25.2) +// CHECK:STDOUT: %Destroy.facet.loc15_3.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_3.2: %Destroy.type = converted constants.%A, %Destroy.facet.loc15_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc15_3.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc15_3.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc15_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call.loc15_3: init %empty_tuple.type = call %SelfDestruct.specific_fn.5(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16_25.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_25.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16_25.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_25.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16_25.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16_25.2(%self.param: ref %A) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/lookup.carbon b/toolchain/check/testdata/var/lookup.carbon index 74839ef6afc4..9181619b22bc 100644 --- a/toolchain/check/testdata/var/lookup.carbon +++ b/toolchain/check/testdata/var/lookup.carbon @@ -28,41 +28,31 @@ fn Main() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete] // CHECK:STDOUT: %x.var_patt: %pattern_type.cb1 = var_pattern %x.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc16 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc16 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc16 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc16 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -79,8 +69,8 @@ fn Main() { // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var_storage %x.var_patt // CHECK:STDOUT: %.loc16_16.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc16_16.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc16_3: init %empty_tuple.type = converted %.loc16_16.1, %.loc16_16.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var, %.loc16_3 +// CHECK:STDOUT: %.loc16_3.1: init %empty_tuple.type = converted %.loc16_16.1, %.loc16_16.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var, %.loc16_3.1 // CHECK:STDOUT: %.loc16_11.1: type = splice_block %.loc16_11.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc16_11.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc16_11.3: type = converted %.loc16_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -91,19 +81,14 @@ fn Main() { // CHECK:STDOUT: %x.var_patt: %pattern_type.cb1 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } // CHECK:STDOUT: %x.ref: ref %empty_tuple.type = name_ref x, %x -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc16_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc16_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc16_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc16_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc16_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc16(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc16(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc16(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc16(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/shadowing.carbon b/toolchain/check/testdata/var/shadowing.carbon index e6b10481219a..f3881bfb3762 100644 --- a/toolchain/check/testdata/var/shadowing.carbon +++ b/toolchain/check/testdata/var/shadowing.carbon @@ -45,41 +45,31 @@ fn Main() { // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %x.patt.06838d.2: %pattern_type.cb1 = ref_binding_pattern x [concrete] // CHECK:STDOUT: %x.var_patt.28d573.2: %pattern_type.cb1 = var_pattern %x.patt.06838d.2 [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc10 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc10 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc10 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc10 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -98,8 +88,8 @@ fn Main() { // CHECK:STDOUT: %NS.var: ref %empty_tuple.type = var_storage %NS.var_patt // CHECK:STDOUT: %.loc5_17.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_17.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc5_3: init %empty_tuple.type = converted %.loc5_17.1, %.loc5_17.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %NS.var, %.loc5_3 +// CHECK:STDOUT: %.loc5_3.1: init %empty_tuple.type = converted %.loc5_17.1, %.loc5_17.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %NS.var, %.loc5_3.1 // CHECK:STDOUT: %.loc5_12.1: type = splice_block %.loc5_12.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc5_12.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_12.3: type = converted %.loc5_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -117,8 +107,8 @@ fn Main() { // CHECK:STDOUT: %x.var.loc8: ref %empty_tuple.type = var_storage %x.var_patt.loc8 // CHECK:STDOUT: %.loc8_23.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_23.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc8_3: init %empty_tuple.type = converted %.loc8_23.1, %.loc8_23.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var.loc8, %.loc8_3 +// CHECK:STDOUT: %.loc8_3.1: init %empty_tuple.type = converted %.loc8_23.1, %.loc8_23.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var.loc8, %.loc8_3.1 // CHECK:STDOUT: %.loc8_18.1: type = splice_block %.loc8_18.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc8_18.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc8_18.3: type = converted %.loc8_18.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -135,8 +125,8 @@ fn Main() { // CHECK:STDOUT: %x.var.loc10: ref %empty_tuple.type = var_storage %x.var_patt.loc10 // CHECK:STDOUT: %.loc10_18.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc10_18.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc10_5: init %empty_tuple.type = converted %.loc10_18.1, %.loc10_18.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var.loc10, %.loc10_5 +// CHECK:STDOUT: %.loc10_5.1: init %empty_tuple.type = converted %.loc10_18.1, %.loc10_18.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var.loc10, %.loc10_5.1 // CHECK:STDOUT: %.loc10_13.1: type = splice_block %.loc10_13.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc10_13.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc10_13.3: type = converted %.loc10_13.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -151,26 +141,29 @@ fn Main() { // CHECK:STDOUT: %.loc13_10.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc13_7: init %empty_tuple.type = converted %.loc13_10.1, %.loc13_10.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: assign %x.ref, %.loc13_7 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc10: = bound_method %x.var.loc10, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc10: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc10(%x.var.loc10) +// CHECK:STDOUT: %Destroy.facet.loc10_5.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_5.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc10_5.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc10_5.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc10_5.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc10_5.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc10: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%x.var.loc10) // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8: = bound_method %x.var.loc8, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8(%x.var.loc8) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc5: = bound_method %NS.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc5: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc5(%NS.var) +// CHECK:STDOUT: %Destroy.facet.loc8_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc8: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%x.var.loc8) +// CHECK:STDOUT: %Destroy.facet.loc5_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc5_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc5_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc5_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc5: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%NS.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc10(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc10(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc10(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc10(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/var/var_pattern.carbon b/toolchain/check/testdata/var/var_pattern.carbon index 4edec3a198cc..e006057dc63a 100644 --- a/toolchain/check/testdata/var/var_pattern.carbon +++ b/toolchain/check/testdata/var/var_pattern.carbon @@ -176,41 +176,31 @@ fn Call() { // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete] // CHECK:STDOUT: %x.var_patt: %pattern_type.cb1 = var_pattern %x.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc5 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -227,8 +217,8 @@ fn Call() { // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var_storage %x.var_patt // CHECK:STDOUT: %.loc5_27.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_27.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc5_7: init %empty_tuple.type = converted %.loc5_27.1, %.loc5_27.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %x.var, %.loc5_7 +// CHECK:STDOUT: %.loc5_7.1: init %empty_tuple.type = converted %.loc5_27.1, %.loc5_27.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %x.var, %.loc5_7.1 // CHECK:STDOUT: %.loc5_22.1: type = splice_block %.loc5_22.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc5_22.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_22.3: type = converted %.loc5_22.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -238,21 +228,16 @@ fn Call() { // CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete = constants.%x.patt] // CHECK:STDOUT: %x.var_patt: %pattern_type.cb1 = var_pattern %x.patt [concrete = constants.%x.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %x.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%x.var) +// CHECK:STDOUT: %Destroy.facet.loc5_7.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc5_7.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_7.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc5_7.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc5_7.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_7.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%x.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- var_in_tuple.carbon // CHECK:STDOUT: @@ -270,41 +255,31 @@ fn Call() { // CHECK:STDOUT: %pattern_type.5b8: type = pattern_type %tuple.type [concrete] // CHECK:STDOUT: %.5ae: %pattern_type.5b8 = tuple_pattern (%x.patt, %y.var_patt) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc5 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -330,8 +305,8 @@ fn Call() { // CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, %.loc5_44.2 // CHECK:STDOUT: %.loc5_48.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc5_22: init %empty_tuple.type = converted %.loc5_48.1, %.loc5_48.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %y.var, %.loc5_22 +// CHECK:STDOUT: %.loc5_22.1: init %empty_tuple.type = converted %.loc5_48.1, %.loc5_48.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %y.var, %.loc5_22.1 // CHECK:STDOUT: %.loc5_37.1: type = splice_block %.loc5_37.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc5_37.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_37.3: type = converted %.loc5_37.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -343,21 +318,16 @@ fn Call() { // CHECK:STDOUT: %y.var_patt: %pattern_type.cb1 = var_pattern %y.patt [concrete = constants.%y.var_patt] // CHECK:STDOUT: %.loc5_38: %pattern_type.5b8 = tuple_pattern (%x.patt, %y.var_patt) [concrete = constants.%.5ae] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %y.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%y.var) +// CHECK:STDOUT: %Destroy.facet.loc5_22.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc5_22.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_22.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc5_22.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc5_22.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_22.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%y.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- tuple_in_var.carbon // CHECK:STDOUT: @@ -375,65 +345,40 @@ fn Call() { // CHECK:STDOUT: %.8b4: %pattern_type.5b8 = tuple_pattern (%x.patt, %y.patt) [concrete] // CHECK:STDOUT: %.var_patt: %pattern_type.5b8 = var_pattern %.8b4 [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc5_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5_3.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.cd0: %pattern_type.5b8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6c3: %pattern_type.5b8 = wrapper_binding_pattern self, %self.param_patt.cd0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5_3.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5_3.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet.939: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c50: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.939) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc5_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5_3.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.305: %SubobjectDestroy.type = facet_value %tuple.type, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.067: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.305) [concrete] +// CHECK:STDOUT: %Destroy.facet.a37: %Destroy.type = facet_value %tuple.type, (%DestroyImpl.impl_witness.067, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.664: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.a37) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5_3.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc5_3.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5_3.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5b8 = ref_param_pattern [concrete = constants.%self.param_patt.cd0] -// CHECK:STDOUT: %self.patt: %pattern_type.5b8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc5_3.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5b8 = ref_param_pattern [concrete = constants.%self.param_patt.cd0] -// CHECK:STDOUT: %self.patt: %pattern_type.5b8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -460,8 +405,8 @@ fn Call() { // CHECK:STDOUT: %.loc5_45.4: init %empty_tuple.type = converted %.loc5_44.1, %.loc5_44.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_45.5: init %empty_tuple.type to %tuple.elem1.loc5_45 = in_place_init %.loc5_45.4 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_45.6: init %tuple.type to %.var = tuple_init (%.loc5_45.3, %.loc5_45.5) [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc5_3: init %tuple.type = converted %.loc5_45.1, %.loc5_45.6 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %.var, %.loc5_3 +// CHECK:STDOUT: %.loc5_3.1: init %tuple.type = converted %.loc5_45.1, %.loc5_45.6 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %.var, %.loc5_3.1 // CHECK:STDOUT: %tuple.elem0.loc5_3: ref %empty_tuple.type = tuple_access %.var, element0 // CHECK:STDOUT: %tuple.elem1.loc5_3: ref %empty_tuple.type = tuple_access %.var, element1 // CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.3 [concrete = constants.%empty_tuple.type] { @@ -480,41 +425,35 @@ fn Call() { // CHECK:STDOUT: %.loc5_34: %pattern_type.5b8 = tuple_pattern (%x.patt, %y.patt) [concrete = constants.%.8b4] // CHECK:STDOUT: %.var_patt: %pattern_type.5b8 = var_pattern %.loc5_34 [concrete = constants.%.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.var) +// CHECK:STDOUT: %Destroy.facet.loc5_3.1: %Destroy.type = facet_value constants.%tuple.type, (constants.%DestroyImpl.impl_witness.067, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.a37] +// CHECK:STDOUT: %.loc5_3.2: %Destroy.type = converted constants.%tuple.type, %Destroy.facet.loc5_3.1 [concrete = constants.%Destroy.facet.a37] +// CHECK:STDOUT: %Destroy.facet.loc5_3.2: %Destroy.type = facet_value constants.%tuple.type, (constants.%DestroyImpl.impl_witness.067, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.a37] +// CHECK:STDOUT: %.loc5_3.3: %Destroy.type = converted constants.%tuple.type, %Destroy.facet.loc5_3.2 [concrete = constants.%Destroy.facet.a37] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.a37) [concrete = constants.%SelfDestruct.specific_fn.664] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_3.1(%self.param: ref %empty_tuple.type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5_3.1(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5_3.1(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5_3.1(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_3.2(%self.param: ref %tuple.type) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5_3.2(%self.param: ref %tuple.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc5_3.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc5_3.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc5_3.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc5_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc5_3.1: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_3.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc5_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc5_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_3.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call.loc5_3.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc5_3.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc5_3.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc5_3.2(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5_3.2(%self.param: ref %tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5_3.2(%self.param: ref %tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc5_3.3: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc5_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_3.3 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc5_3.4: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc5_3.4: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_3.4 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call.loc5_3.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -534,65 +473,40 @@ fn Call() { // CHECK:STDOUT: %.8b4: %pattern_type.5b8 = tuple_pattern (%x.patt, %y.patt) [concrete] // CHECK:STDOUT: %.var_patt: %pattern_type.5b8 = var_pattern %.8b4 [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc5_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5_7.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.1: %Destroy.WithSelf.SelfDestruct.type.fbceb5.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.cd0: %pattern_type.5b8 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.6c3: %pattern_type.5b8 = wrapper_binding_pattern self, %self.param_patt.cd0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.1: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5_7.1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.1: %SubobjectDestroy.WithSelf.Op.type.6870fd.1 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.1: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.1), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5_7.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet.939: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80ef6.1) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.c50: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.939) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc5_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5_7.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.305: %SubobjectDestroy.type = facet_value %tuple.type, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.067: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.305) [concrete] +// CHECK:STDOUT: %Destroy.facet.a37: %Destroy.type = facet_value %tuple.type, (%DestroyImpl.impl_witness.067, %custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn.664: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.a37) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5_7.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc5_7.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5_7.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5b8 = ref_param_pattern [concrete = constants.%self.param_patt.cd0] -// CHECK:STDOUT: %self.patt: %pattern_type.5b8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc5_7.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.5b8 = ref_param_pattern [concrete = constants.%self.param_patt.cd0] -// CHECK:STDOUT: %self.patt: %pattern_type.5b8 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.6c3] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -619,8 +533,8 @@ fn Call() { // CHECK:STDOUT: %.loc5_49.4: init %empty_tuple.type = converted %.loc5_48.1, %.loc5_48.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_49.5: init %empty_tuple.type to %tuple.elem1.loc5_49 = in_place_init %.loc5_49.4 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc5_49.6: init %tuple.type to %.var = tuple_init (%.loc5_49.3, %.loc5_49.5) [concrete = constants.%tuple] -// CHECK:STDOUT: %.loc5_7: init %tuple.type = converted %.loc5_49.1, %.loc5_49.6 [concrete = constants.%tuple] -// CHECK:STDOUT: assign %.var, %.loc5_7 +// CHECK:STDOUT: %.loc5_7.1: init %tuple.type = converted %.loc5_49.1, %.loc5_49.6 [concrete = constants.%tuple] +// CHECK:STDOUT: assign %.var, %.loc5_7.1 // CHECK:STDOUT: %tuple.elem0.loc5_7: ref %empty_tuple.type = tuple_access %.var, element0 // CHECK:STDOUT: %tuple.elem1.loc5_7: ref %empty_tuple.type = tuple_access %.var, element1 // CHECK:STDOUT: %.loc5_23.1: type = splice_block %.loc5_23.3 [concrete = constants.%empty_tuple.type] { @@ -639,41 +553,35 @@ fn Call() { // CHECK:STDOUT: %.loc5_38: %pattern_type.5b8 = tuple_pattern (%x.patt, %y.patt) [concrete = constants.%.8b4] // CHECK:STDOUT: %.var_patt: %pattern_type.5b8 = var_pattern %.loc5_38 [concrete = constants.%.var_patt] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.var) +// CHECK:STDOUT: %Destroy.facet.loc5_7.1: %Destroy.type = facet_value constants.%tuple.type, (constants.%DestroyImpl.impl_witness.067, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.a37] +// CHECK:STDOUT: %.loc5_7.2: %Destroy.type = converted constants.%tuple.type, %Destroy.facet.loc5_7.1 [concrete = constants.%Destroy.facet.a37] +// CHECK:STDOUT: %Destroy.facet.loc5_7.2: %Destroy.type = facet_value constants.%tuple.type, (constants.%DestroyImpl.impl_witness.067, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet.a37] +// CHECK:STDOUT: %.loc5_7.3: %Destroy.type = converted constants.%tuple.type, %Destroy.facet.loc5_7.2 [concrete = constants.%Destroy.facet.a37] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.a37) [concrete = constants.%SelfDestruct.specific_fn.664] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_7.1(%self.param: ref %empty_tuple.type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5_7.1(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5_7.1(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5_7.1(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5_7.2(%self.param: ref %tuple.type) { +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5_7.2(%self.param: ref %tuple.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access %self.param, element1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc5_7.1: = bound_method %tuple.elem1, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc5_7.1: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc5_7.1(%tuple.elem1) +// CHECK:STDOUT: %Destroy.facet.loc5_7.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc5_7.1: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_7.1 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc5_7.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc5_7.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_7.2 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call.loc5_7.1: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%tuple.elem1) // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access %self.param, element0 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc5_7.2: = bound_method %tuple.elem0, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc5_7.2: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc5_7.2(%tuple.elem0) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5_7.2(%self.param: ref %tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5_7.2(%self.param: ref %tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) +// CHECK:STDOUT: %Destroy.facet.loc5_7.3: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc5_7.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_7.3 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %Destroy.facet.loc5_7.4: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80ef6.1) [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %.loc5_7.4: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc5_7.4 [concrete = constants.%Destroy.facet.939] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet.939) [concrete = constants.%SelfDestruct.specific_fn.c50] +// CHECK:STDOUT: %SelfDestruct.call.loc5_7.2: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%tuple.elem0) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -694,41 +602,31 @@ fn Call() { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %v.patt: %pattern_type.cb1 = ref_binding_pattern v [concrete] // CHECK:STDOUT: %v.var_patt: %pattern_type.cb1 = var_pattern %v.patt [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc4 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc4 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc4 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc4 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -767,8 +665,8 @@ fn Call() { // CHECK:STDOUT: %v.var: ref %empty_tuple.type = var_storage %v.var_patt // CHECK:STDOUT: %.loc7_16.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_16.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc7_3: init %empty_tuple.type = converted %.loc7_16.1, %.loc7_16.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %v.var, %.loc7_3 +// CHECK:STDOUT: %.loc7_3.1: init %empty_tuple.type = converted %.loc7_16.1, %.loc7_16.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %v.var, %.loc7_3.1 // CHECK:STDOUT: %.loc7_11.1: type = splice_block %.loc7_11.3 [concrete = constants.%empty_tuple.type] { // CHECK:STDOUT: %.loc7_11.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_11.3: type = converted %.loc7_11.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -785,26 +683,25 @@ fn Call() { // CHECK:STDOUT: %.loc8_5: %empty_tuple.type = converted %v.ref, %empty_tuple [concrete = constants.%empty_tuple] // CHECK:STDOUT: %y.var: ref %empty_tuple.type = var_storage @F.%y.param_patt // CHECK:STDOUT: %.loc8_9.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc4: init %empty_tuple.type = converted %.loc8_9.1, %.loc8_9.2 [concrete = constants.%empty_tuple] -// CHECK:STDOUT: assign %y.var, %.loc4 +// CHECK:STDOUT: %.loc4_13.1: init %empty_tuple.type = converted %.loc8_9.1, %.loc8_9.2 [concrete = constants.%empty_tuple] +// CHECK:STDOUT: assign %y.var, %.loc4_13.1 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc8_5, %y.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc4: = bound_method %y.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc4: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc4(%y.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc7: = bound_method %v.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc7: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc7(%v.var) +// CHECK:STDOUT: %Destroy.facet.loc4_13.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc4_13.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc4_13.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc4_13.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc4_13.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc4_13.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc4: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%y.var) +// CHECK:STDOUT: %Destroy.facet.loc7_3.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc7_3.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_3.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_3.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc7_3.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc7: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc4(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc4(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc4(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc4(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- public_function.carbon // CHECK:STDOUT: @@ -926,29 +823,25 @@ fn Call() { // CHECK:STDOUT: %y.patt: %pattern_type.cb1 = ref_binding_pattern y [concrete] // CHECK:STDOUT: %y.param_patt: %pattern_type.cb1 = var_param_pattern %y.patt [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Self: %Destroy.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.869: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Self) [symbolic] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.c97: %Destroy.WithSelf.SelfDestruct.type.869 = struct_value () [symbolic] -// CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc2: %Destroy.assoc_type = assoc_entity element2, imports.%Core.import_ref.df0 [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] -// CHECK:STDOUT: %custom_witness.f8f: = custom_witness (%Destroy.WithSelf.Op.403, %Destroy.WithSelf.SubobjectDestroy.d01, %Destroy.WithSelf.SelfDestruct.db3), @Destroy [concrete] -// CHECK:STDOUT: %Destroy.facet.c98: %Destroy.type = facet_value %empty_tuple.type, (%custom_witness.f8f) [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.3ce: type = fn_type @Destroy.WithSelf.SelfDestruct.1, @Destroy.WithSelf(%Destroy.facet.c98) [concrete] -// CHECK:STDOUT: %.496: type = fn_type_with_self_type %Destroy.WithSelf.SelfDestruct.type.3ce, %Destroy.facet.c98 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -957,26 +850,9 @@ fn Call() { // CHECK:STDOUT: import P//default // CHECK:STDOUT: } // CHECK:STDOUT: %P.F: %F.type = import_ref P//default, F, loaded [concrete = constants.%F] -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.8ba: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc2] -// CHECK:STDOUT: %Core.import_ref.df0: @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct.type (%Destroy.WithSelf.SelfDestruct.type.869) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.WithSelf.%Destroy.WithSelf.SelfDestruct (constants.%Destroy.WithSelf.SelfDestruct.c97)] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.2 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1003,25 +879,18 @@ fn Call() { // CHECK:STDOUT: %.1: init %empty_tuple.type = converted %.loc7_12.1, %.loc7_12.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: assign %y.var, %.1 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc7_8.2, %y.var) -// CHECK:STDOUT: %SelfDestruct.ref: %Destroy.assoc_type = name_ref SelfDestruct, imports.%Core.import_ref.8ba [concrete = constants.%assoc2] -// CHECK:STDOUT: %impl.elem2: %.496 = impl_witness_access constants.%custom_witness.f8f, element2 [concrete = constants.%Destroy.WithSelf.SelfDestruct.db3] -// CHECK:STDOUT: %bound_method: = bound_method %y.var, %impl.elem2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %bound_method(%y.var) +// CHECK:STDOUT: %Destroy.facet.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.3: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%y.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F [from "public_function.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.2(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.2(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.2(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.2(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_nested.carbon // CHECK:STDOUT: @@ -1136,41 +1005,31 @@ fn Call() { // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [concrete] // CHECK:STDOUT: %pattern_type.8c1: type = pattern_type %tuple.type [concrete] // CHECK:STDOUT: %.b14: %pattern_type.8c1 = tuple_pattern (%x.patt, %y.var_patt, %z.patt) [concrete] +// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete] +// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %self.param_patt.65a: %pattern_type.cb1 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.df1: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt.65a [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc8 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc8 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.f89: %SubobjectDestroy.type = facet_value %empty_tuple.type, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.674: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.f89) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %empty_tuple.type, (%DestroyImpl.impl_witness.674, %custom_witness.b80) [concrete] +// CHECK:STDOUT: %SelfDestruct.specific_fn: = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [concrete] { -// CHECK:STDOUT: .Destroy = %Core.Destroy +// CHECK:STDOUT: .SelfDestruct = %Core.SelfDestruct // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc8 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc8 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = ref_param_pattern [concrete = constants.%self.param_patt.65a] -// CHECK:STDOUT: %self.patt: %pattern_type.cb1 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.df1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_tuple.type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_tuple.type = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.SelfDestruct: %SelfDestruct.type = import_ref Core//prelude/parts/destroy, SelfDestruct, loaded [concrete = constants.%SelfDestruct] +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1236,25 +1095,28 @@ fn Call() { // CHECK:STDOUT: %z.patt: %pattern_type.cb1 = value_binding_pattern z [concrete = constants.%z.patt] // CHECK:STDOUT: %.loc8_52: %pattern_type.8c1 = tuple_pattern (%x.patt, %y.var_patt, %z.patt) [concrete = constants.%.b14] // CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_69: = bound_method %.loc8_69.2, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_69: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_69(%.loc8_69.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_59: = bound_method %.loc8_59.2, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_59: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_59(%.loc8_59.2) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound.loc8_22: = bound_method %y.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call.loc8_22: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound.loc8_22(%y.var) +// CHECK:STDOUT: %Destroy.facet.loc8_69.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_69.4: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_69.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_69.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_69.5: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_69.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.1: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc8_69: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%.loc8_69.2) +// CHECK:STDOUT: %Destroy.facet.loc8_59.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_59.4: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_59.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_59.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_59.5: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_59.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.2: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc8_59: init %empty_tuple.type = call %SelfDestruct.specific_fn.2(%.loc8_59.2) +// CHECK:STDOUT: %Destroy.facet.loc8_22.1: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_22.1: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_22.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc8_22.2: %Destroy.type = facet_value constants.%empty_tuple.type, (constants.%DestroyImpl.impl_witness.674, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc8_22.2: %Destroy.type = converted constants.%empty_tuple.type, %Destroy.facet.loc8_22.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %SelfDestruct.specific_fn.3: = specific_function constants.%SelfDestruct, @SelfDestruct(constants.%Destroy.facet) [concrete = constants.%SelfDestruct.specific_fn] +// CHECK:STDOUT: %SelfDestruct.call.loc8_22: init %empty_tuple.type = call %SelfDestruct.specific_fn.3(%y.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc8(%self.param: ref %empty_tuple.type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc8(%self.param: ref %empty_tuple.type) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- var_param_from_init.carbon // CHECK:STDOUT: @@ -1270,52 +1132,22 @@ fn Call() { // CHECK:STDOUT: %TakeVar: %TakeVar.type = struct_value () [concrete] // CHECK:STDOUT: %MakeInit.type: type = fn_type @MakeInit [concrete] // CHECK:STDOUT: %MakeInit: %MakeInit.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_12.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc7_12.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.925: %pattern_type.6cb = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.617: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt.925 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc7_12.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc7_12.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc7_12.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc7_12.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.fc5: %SubobjectDestroy.type = facet_value %X, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.e12: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.fc5) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %X, (%DestroyImpl.impl_witness.e12, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_12.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc7_12.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc7_12.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc7_12.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.6cb = ref_param_pattern [concrete = constants.%self.param_patt.925] -// CHECK:STDOUT: %self.patt: %pattern_type.6cb = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.617] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %X = ref_param call_param0 -// CHECK:STDOUT: %self: ref %X = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1339,32 +1171,18 @@ fn Call() { // CHECK:STDOUT: %MakeInit.call: init %X to %a.var = call %MakeInit.ref() // CHECK:STDOUT: assign %a.var, %MakeInit.call // CHECK:STDOUT: %TakeVar.call: init %empty_tuple.type = call %TakeVar.ref(%a.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %a.var, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%a.var) +// CHECK:STDOUT: %Destroy.facet.loc7_12.1: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_12.1: %Destroy.type = converted constants.%X, %Destroy.facet.loc7_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc7_12.2: %Destroy.type = facet_value constants.%X, (constants.%DestroyImpl.impl_witness.e12, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc7_12.2: %Destroy.type = converted constants.%X, %Destroy.facet.loc7_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%a.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc7_12.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_12.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc7_12.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_12.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc7_12.2(%self.param: ref %X) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc7_12.2(%self.param: ref %X) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: --- var_param_from_int_literal.carbon // CHECK:STDOUT: @@ -1393,36 +1211,24 @@ fn Call() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_123.c07: %i32 = int_value 123 [concrete] -// CHECK:STDOUT: %self.param_patt.0c5: %pattern_type.d94 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.749: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt.0c5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfc: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01: %Destroy.WithSelf.SubobjectDestroy.type.dfc = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef0: type = fn_type @Destroy.WithSelf.Op.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403: %Destroy.WithSelf.Op.type.ef0 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbc: type = fn_type @Destroy.WithSelf.SelfDestruct.loc5 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3: %Destroy.WithSelf.SelfDestruct.type.fbc = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.687: type = fn_type @SubobjectDestroy.WithSelf.Op.loc5 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f: %SubobjectDestroy.WithSelf.Op.type.687 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.49a: %SubobjectDestroy.type = facet_value %i32, (%custom_witness.b80) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.077: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.49a) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %i32, (%DestroyImpl.impl_witness.077, %custom_witness.b80) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)] // CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete] -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl: %Destroy.WithSelf.SubobjectDestroy.type.dfc = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc5 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl: %Destroy.WithSelf.Op.type.ef0 = fn_decl @Destroy.WithSelf.Op.loc5 [concrete = constants.%Destroy.WithSelf.Op.403] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.d94 = ref_param_pattern [concrete = constants.%self.param_patt.0c5] -// CHECK:STDOUT: %self.patt: %pattern_type.d94 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.749] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %i32 = ref_param call_param0 -// CHECK:STDOUT: %self: ref %i32 = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1447,23 +1253,18 @@ fn Call() { // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_12.2: = bound_method %int_123, %specific_fn [concrete = constants.%bound_method] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_12.2(%int_123) [concrete = constants.%int_123.c07] -// CHECK:STDOUT: %.loc5: init %i32 = converted %int_123, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_123.c07] +// CHECK:STDOUT: %.loc5_12.1: init %i32 = converted %int_123, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_123.c07] // CHECK:STDOUT: %n.var: ref %i32 = var_storage @TakeVar.%n.param_patt -// CHECK:STDOUT: assign %n.var, %.loc5 +// CHECK:STDOUT: assign %n.var, %.loc5_12.1 // CHECK:STDOUT: %TakeVar.call: init %empty_tuple.type = call %TakeVar.ref(%n.var) -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %n.var, constants.%Destroy.WithSelf.SelfDestruct.db3 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%n.var) +// CHECK:STDOUT: %Destroy.facet.loc5_12.1: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc5_12.2: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_12.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc5_12.2: %Destroy.type = facet_value constants.%i32, (constants.%DestroyImpl.impl_witness.077, constants.%custom_witness.b80) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc5_12.3: %Destroy.type = converted constants.%i32, %Destroy.facet.loc5_12.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%n.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc5(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc5(%self.param: ref %i32) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc5(%self.param: ref %i32) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc5(%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 2c8fb2f292c7..8caaae09294d 100644 --- a/toolchain/check/testdata/while/lifetime.carbon +++ b/toolchain/check/testdata/while/lifetime.carbon @@ -39,57 +39,26 @@ fn F() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %A.F: %A.F.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %pattern_type.9ef: type = pattern_type %A [concrete] // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %self.param_patt.52f: %pattern_type.a96 = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.4b1: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt.52f [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_15.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.1: type = fn_type @Destroy.WithSelf.Op.loc14_15.1 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.1: %Destroy.WithSelf.Op.type.ef016f.1 = struct_value () [concrete] -// CHECK:STDOUT: %self.param_patt.8fb: %pattern_type.9ef = ref_param_pattern [concrete] -// CHECK:STDOUT: %self.patt.e64: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt.8fb [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2: type = fn_type @Destroy.WithSelf.SubobjectDestroy.loc14_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.d01daf.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ef016f.2: type = fn_type @Destroy.WithSelf.Op.loc14_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.Op.403171.2: %Destroy.WithSelf.Op.type.ef016f.2 = struct_value () [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2: type = fn_type @Destroy.WithSelf.SelfDestruct.loc14_15.2 [concrete] -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.db3fdb.2: %Destroy.WithSelf.SelfDestruct.type.fbceb5.2 = struct_value () [concrete] +// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %SubobjectDestroy.type: type = facet_type <@SubobjectDestroy> [concrete] +// CHECK:STDOUT: %T.09f: %SubobjectDestroy.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.type.dea: type = fn_type @T.as_type.as.DestroyImpl.impl.Op, @T.as_type.as.DestroyImpl.impl(%T.09f) [symbolic] +// CHECK:STDOUT: %T.as_type.as.DestroyImpl.impl.Op.6e5: %T.as_type.as.DestroyImpl.impl.Op.type.dea = struct_value () [symbolic] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.type.6870fd.2: type = fn_type @SubobjectDestroy.WithSelf.Op.loc14_15.2 [concrete] +// CHECK:STDOUT: %SubobjectDestroy.WithSelf.Op.30f1ee.2: %SubobjectDestroy.WithSelf.Op.type.6870fd.2 = struct_value () [concrete] +// CHECK:STDOUT: %custom_witness.b80ef6.2: = custom_witness (%SubobjectDestroy.WithSelf.Op.30f1ee.2), @SubobjectDestroy [concrete] +// CHECK:STDOUT: %SubobjectDestroy.facet.9bf: %SubobjectDestroy.type = facet_value %A, (%custom_witness.b80ef6.2) [concrete] +// CHECK:STDOUT: %DestroyImpl.impl_witness.6d1: = impl_witness imports.%DestroyImpl.impl_witness_table, @T.as_type.as.DestroyImpl.impl(%SubobjectDestroy.facet.9bf) [concrete] +// CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %A, (%DestroyImpl.impl_witness.6d1, %custom_witness.b80ef6.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generated { -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.1: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.1 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_15.1 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.1: %Destroy.WithSelf.Op.type.ef016f.1 = fn_decl @Destroy.WithSelf.Op.loc14_15.1 [concrete = constants.%Destroy.WithSelf.Op.403171.1] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = ref_param_pattern [concrete = constants.%self.param_patt.52f] -// CHECK:STDOUT: %self.patt: %pattern_type.a96 = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.4b1] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %empty_struct_type = ref_param call_param0 -// CHECK:STDOUT: %self: ref %empty_struct_type = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.decl.763c71.2: %Destroy.WithSelf.SubobjectDestroy.type.dfcbdb.2 = fn_decl @Destroy.WithSelf.SubobjectDestroy.loc14_15.2 [concrete = constants.%Destroy.WithSelf.SubobjectDestroy.d01daf.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } -// CHECK:STDOUT: %Destroy.WithSelf.Op.decl.5f94cf.2: %Destroy.WithSelf.Op.type.ef016f.2 = fn_decl @Destroy.WithSelf.Op.loc14_15.2 [concrete = constants.%Destroy.WithSelf.Op.403171.2] { -// CHECK:STDOUT: %self.param_patt: %pattern_type.9ef = ref_param_pattern [concrete = constants.%self.param_patt.8fb] -// CHECK:STDOUT: %self.patt: %pattern_type.9ef = wrapper_binding_pattern self, %self.param_patt [concrete = constants.%self.patt.e64] -// CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref %A = ref_param call_param0 -// CHECK:STDOUT: %self: ref %A = wrapper_binding self, %self.param -// CHECK:STDOUT: } +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core.import_ref.74d: @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op.type (%T.as_type.as.DestroyImpl.impl.Op.type.dea) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @T.as_type.as.DestroyImpl.impl.%T.as_type.as.DestroyImpl.impl.Op (constants.%T.as_type.as.DestroyImpl.impl.Op.6e5)] +// CHECK:STDOUT: %DestroyImpl.impl_witness_table = impl_witness_table (%Core.import_ref.74d), @T.as_type.as.DestroyImpl.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { @@ -105,8 +74,12 @@ fn F() { // CHECK:STDOUT: %A.F.call: init bool = call %F.ref() // CHECK:STDOUT: %.loc14_20.1: bool = value_of_initializer %A.F.call // CHECK:STDOUT: %.loc14_20.2: bool = converted %A.F.call, %.loc14_20.1 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.bound: = bound_method %.loc14_15.2, constants.%Destroy.WithSelf.SelfDestruct.db3fdb.2 -// CHECK:STDOUT: %Destroy.WithSelf.SelfDestruct.call: init %empty_tuple.type = call %Destroy.WithSelf.SelfDestruct.bound(%.loc14_15.2) +// CHECK:STDOUT: %Destroy.facet.loc14_15.1: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_15.3: %Destroy.type = converted constants.%A, %Destroy.facet.loc14_15.1 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %Destroy.facet.loc14_15.2: %Destroy.type = facet_value constants.%A, (constants.%DestroyImpl.impl_witness.6d1, constants.%custom_witness.b80ef6.2) [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: %.loc14_15.4: %Destroy.type = converted constants.%A, %Destroy.facet.loc14_15.2 [concrete = constants.%Destroy.facet] +// CHECK:STDOUT: +// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn(%.loc14_15.2) // CHECK:STDOUT: if %.loc14_20.2 br !while.body else br !while.done // CHECK:STDOUT: // CHECK:STDOUT: !while.body: @@ -118,25 +91,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SubobjectDestroy.loc14_15.1(%self.param: ref %empty_struct_type) = "no_op"; +// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc14_15.1(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.Op.loc14_15.1(%self.param: ref %empty_struct_type) = "no_op"; -// CHECK:STDOUT: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_15.1(%self.param: ref %empty_struct_type) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.1(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.1(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } -// 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: -// CHECK:STDOUT: fn @Destroy.WithSelf.SelfDestruct.loc14_15.2(%self.param: ref %A) { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.Op.decl.5f94cf.2(%self.param) -// CHECK:STDOUT: %Destroy.WithSelf.SubobjectDestroy.call: init %empty_tuple.type = call generated.%Destroy.WithSelf.SubobjectDestroy.decl.763c71.2(%self.param) -// CHECK:STDOUT: return -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @SubobjectDestroy.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 160bddb20857..db6d69181481 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_debug.carbon @@ -39,38 +39,38 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: declare i32 @_CRand.Main() local_unnamed_addr // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CNoInlineWithOz.Main() local_unnamed_addr #0 !dbg !10 { +// CHECK:STDOUT: define i32 @_CNoInlineWithOz.Main() local_unnamed_addr #0 !dbg !8 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Rand.call.loc4_15 = tail call i32 @_CRand.Main() #0, !dbg !13 -// CHECK:STDOUT: %Rand.call.loc4_24 = tail call i32 @_CRand.Main() #0, !dbg !14 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %Rand.call.loc4_24, %Rand.call.loc4_15, !dbg !13 -// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call, !dbg !15 +// CHECK:STDOUT: %Rand.call.loc4_15 = tail call i32 @_CRand.Main() #0, !dbg !11 +// CHECK:STDOUT: %Rand.call.loc4_24 = tail call i32 @_CRand.Main() #0, !dbg !12 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %Rand.call.loc4_24, %Rand.call.loc4_15, !dbg !11 +// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() local_unnamed_addr #0 !dbg !16 { +// CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() local_unnamed_addr #0 !dbg !14 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !80 -// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !81 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !80 -// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call.i, !dbg !20 +// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !84 +// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !85 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !84 +// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call.i, !dbg !18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) -// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr nofree captures(none) %a) local_unnamed_addr #1 !dbg !21 { +// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr nofree captures(none) %a) local_unnamed_addr #1 !dbg !19 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: br label %while.body, !dbg !26 +// CHECK:STDOUT: br label %while.body, !dbg !24 // CHECK:STDOUT: // CHECK:STDOUT: while.body: ; preds = %entry, %while.body // CHECK:STDOUT: %n.var.03 = phi i32 [ 0, %entry ], [ %1, %while.body ] -// CHECK:STDOUT: %0 = zext nneg i32 %n.var.03 to i64, !dbg !31 -// CHECK:STDOUT: %.loc16_11.array.index = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %0, !dbg !31 -// 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 !89 -// 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: %0 = zext nneg i32 %n.var.03 to i64, !dbg !29 +// CHECK:STDOUT: %.loc16_11.array.index = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %0, !dbg !29 +// CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call = load i32, ptr %.loc16_11.array.index, align 4, !dbg !29 +// CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call1 = shl i32 %Int.as.MulAssignWith.impl.Op.call, 1, !dbg !29 +// CHECK:STDOUT: store i32 %Int.as.MulAssignWith.impl.Op.call1, ptr %.loc16_11.array.index, align 4, !dbg !29 +// CHECK:STDOUT: %1 = add nuw nsw i32 %n.var.03, 1, !dbg !93 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.call = icmp samesign ult i32 %n.var.03, 65535, !dbg !25 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Less.call, label %while.body, label %while.done, !dbg !24 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %while.body // CHECK:STDOUT: ret void, !dbg !35 @@ -81,17 +81,11 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: uselistorder ptr %.loc16_11.array.index, { 1, 0 } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !37 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !39 -// 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 = !{!75, !76} +// 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) @@ -101,41 +95,37 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !5 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !6 = !{null, !5} // CHECK:STDOUT: !7 = !DISubroutineType(types: !6) -// CHECK:STDOUT: !8 = !{null, !2} -// CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !0, line: 3, type: !4, spFlags: DISPFlagDefinition, unit: !1) -// CHECK:STDOUT: !13 = !DILocation(line: 4, column: 10, scope: !10) -// CHECK:STDOUT: !14 = !DILocation(line: 4, column: 19, scope: !10) -// CHECK:STDOUT: !15 = !DILocation(line: 4, column: 3, scope: !10) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !0, line: 7, type: !4, spFlags: DISPFlagDefinition, unit: !1) -// CHECK:STDOUT: !20 = !DILocation(line: 9, column: 3, scope: !16) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !0, line: 12, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !36) -// CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !5) -// CHECK:STDOUT: !26 = !DILocation(line: 15, column: 9, scope: !21) -// CHECK:STDOUT: !27 = !DILocation(line: 15, column: 10, scope: !21) -// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 5, scope: !21) -// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 1, scope: !21) -// CHECK:STDOUT: !36 = !{!22} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !40) -// 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 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !41, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !49) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !2) -// CHECK:STDOUT: !46 = !{null, !2, !2} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !49 = !{!43} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !41, line: 331, type: !47, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !57) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !2) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !50, type: !2) -// CHECK:STDOUT: !57 = !{!51, !52} -// CHECK:STDOUT: !75 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !76 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !79 = distinct !DILocation(line: 9, column: 10, scope: !16) -// CHECK:STDOUT: !80 = distinct !DILocation(line: 4, column: 10, scope: !10, inlinedAt: !79) -// CHECK:STDOUT: !81 = distinct !DILocation(line: 4, column: 19, scope: !10, inlinedAt: !79) -// CHECK:STDOUT: !87 = distinct !DILocation(line: 17, column: 5, scope: !21) -// CHECK:STDOUT: !88 = distinct !DILocation(line: 398, column: 5, scope: !42, inlinedAt: !87) -// CHECK:STDOUT: !89 = distinct !DILocation(line: 331, column: 3, scope: !50, inlinedAt: !88) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !0, line: 3, type: !4, spFlags: DISPFlagDefinition, unit: !1) +// CHECK:STDOUT: !11 = !DILocation(line: 4, column: 10, scope: !8) +// CHECK:STDOUT: !12 = !DILocation(line: 4, column: 19, scope: !8) +// CHECK:STDOUT: !13 = !DILocation(line: 4, column: 3, scope: !8) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !0, line: 7, type: !4, spFlags: DISPFlagDefinition, unit: !1) +// CHECK:STDOUT: !18 = !DILocation(line: 9, column: 3, scope: !14) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !0, line: 12, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !36) +// CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !19, type: !5) +// CHECK:STDOUT: !24 = !DILocation(line: 15, column: 9, scope: !19) +// CHECK:STDOUT: !25 = !DILocation(line: 15, column: 10, scope: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 16, column: 5, scope: !19) +// CHECK:STDOUT: !32 = !{null, !2} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 1, scope: !19) +// CHECK:STDOUT: !36 = !{!20} +// CHECK:STDOUT: !37 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !37, line: 396, type: !33, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !45) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !2) +// CHECK:STDOUT: !42 = !{null, !2, !2} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !45 = !{!39} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !37, line: 331, type: !43, 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: !83 = distinct !DILocation(line: 9, column: 10, scope: !14) +// CHECK:STDOUT: !84 = distinct !DILocation(line: 4, column: 10, scope: !8, inlinedAt: !83) +// CHECK:STDOUT: !85 = distinct !DILocation(line: 4, column: 19, scope: !8, inlinedAt: !83) +// CHECK:STDOUT: !91 = distinct !DILocation(line: 17, column: 5, scope: !19) +// CHECK:STDOUT: !92 = distinct !DILocation(line: 398, column: 5, scope: !38, inlinedAt: !91) +// CHECK:STDOUT: !93 = distinct !DILocation(line: 331, column: 3, scope: !54, inlinedAt: !92) // CHECK:STDOUT: diff --git a/toolchain/driver/testdata/compile/optimize/optimize_default.carbon b/toolchain/driver/testdata/compile/optimize/optimize_default.carbon index 864f32b12364..782f2dd00b4e 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_default.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_default.carbon @@ -39,38 +39,38 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: declare i32 @_CRand.Main() local_unnamed_addr // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CNoInlineWithOz.Main() local_unnamed_addr #0 !dbg !10 { +// CHECK:STDOUT: define i32 @_CNoInlineWithOz.Main() local_unnamed_addr #0 !dbg !8 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Rand.call.loc4_15 = tail call i32 @_CRand.Main() #0, !dbg !13 -// CHECK:STDOUT: %Rand.call.loc4_24 = tail call i32 @_CRand.Main() #0, !dbg !14 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %Rand.call.loc4_24, %Rand.call.loc4_15, !dbg !13 -// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call, !dbg !15 +// CHECK:STDOUT: %Rand.call.loc4_15 = tail call i32 @_CRand.Main() #0, !dbg !11 +// CHECK:STDOUT: %Rand.call.loc4_24 = tail call i32 @_CRand.Main() #0, !dbg !12 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %Rand.call.loc4_24, %Rand.call.loc4_15, !dbg !11 +// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() local_unnamed_addr #0 !dbg !16 { +// CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() local_unnamed_addr #0 !dbg !14 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !80 -// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !81 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !80 -// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call.i, !dbg !20 +// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !84 +// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !85 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !84 +// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call.i, !dbg !18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) -// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr nofree captures(none) %a) local_unnamed_addr #1 !dbg !21 { +// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr nofree captures(none) %a) local_unnamed_addr #1 !dbg !19 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: br label %while.body, !dbg !26 +// CHECK:STDOUT: br label %while.body, !dbg !24 // CHECK:STDOUT: // CHECK:STDOUT: while.body: ; preds = %entry, %while.body // CHECK:STDOUT: %n.var.03 = phi i32 [ 0, %entry ], [ %1, %while.body ] -// CHECK:STDOUT: %0 = zext nneg i32 %n.var.03 to i64, !dbg !31 -// CHECK:STDOUT: %.loc16_11.array.index = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %0, !dbg !31 -// 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 !89 -// 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: %0 = zext nneg i32 %n.var.03 to i64, !dbg !29 +// CHECK:STDOUT: %.loc16_11.array.index = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %0, !dbg !29 +// CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call = load i32, ptr %.loc16_11.array.index, align 4, !dbg !29 +// CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call1 = shl i32 %Int.as.MulAssignWith.impl.Op.call, 1, !dbg !29 +// CHECK:STDOUT: store i32 %Int.as.MulAssignWith.impl.Op.call1, ptr %.loc16_11.array.index, align 4, !dbg !29 +// CHECK:STDOUT: %1 = add nuw nsw i32 %n.var.03, 1, !dbg !93 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.call = icmp samesign ult i32 %n.var.03, 65535, !dbg !25 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Less.call, label %while.body, label %while.done, !dbg !24 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %while.body // CHECK:STDOUT: ret void, !dbg !35 @@ -81,17 +81,11 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: uselistorder ptr %.loc16_11.array.index, { 1, 0 } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !37 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !39 -// 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 = !{!75, !76} +// 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) @@ -101,41 +95,37 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !5 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !6 = !{null, !5} // CHECK:STDOUT: !7 = !DISubroutineType(types: !6) -// CHECK:STDOUT: !8 = !{null, !2} -// CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !0, line: 3, type: !4, spFlags: DISPFlagDefinition, unit: !1) -// CHECK:STDOUT: !13 = !DILocation(line: 4, column: 10, scope: !10) -// CHECK:STDOUT: !14 = !DILocation(line: 4, column: 19, scope: !10) -// CHECK:STDOUT: !15 = !DILocation(line: 4, column: 3, scope: !10) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !0, line: 7, type: !4, spFlags: DISPFlagDefinition, unit: !1) -// CHECK:STDOUT: !20 = !DILocation(line: 9, column: 3, scope: !16) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !0, line: 12, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !36) -// CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !5) -// CHECK:STDOUT: !26 = !DILocation(line: 15, column: 9, scope: !21) -// CHECK:STDOUT: !27 = !DILocation(line: 15, column: 10, scope: !21) -// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 5, scope: !21) -// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 1, scope: !21) -// CHECK:STDOUT: !36 = !{!22} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !40) -// 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 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !41, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !49) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !2) -// CHECK:STDOUT: !46 = !{null, !2, !2} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !49 = !{!43} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !41, line: 331, type: !47, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !57) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !2) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !50, type: !2) -// CHECK:STDOUT: !57 = !{!51, !52} -// CHECK:STDOUT: !75 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !76 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !79 = distinct !DILocation(line: 9, column: 10, scope: !16) -// CHECK:STDOUT: !80 = distinct !DILocation(line: 4, column: 10, scope: !10, inlinedAt: !79) -// CHECK:STDOUT: !81 = distinct !DILocation(line: 4, column: 19, scope: !10, inlinedAt: !79) -// CHECK:STDOUT: !87 = distinct !DILocation(line: 17, column: 5, scope: !21) -// CHECK:STDOUT: !88 = distinct !DILocation(line: 398, column: 5, scope: !42, inlinedAt: !87) -// CHECK:STDOUT: !89 = distinct !DILocation(line: 331, column: 3, scope: !50, inlinedAt: !88) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !0, line: 3, type: !4, spFlags: DISPFlagDefinition, unit: !1) +// CHECK:STDOUT: !11 = !DILocation(line: 4, column: 10, scope: !8) +// CHECK:STDOUT: !12 = !DILocation(line: 4, column: 19, scope: !8) +// CHECK:STDOUT: !13 = !DILocation(line: 4, column: 3, scope: !8) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !0, line: 7, type: !4, spFlags: DISPFlagDefinition, unit: !1) +// CHECK:STDOUT: !18 = !DILocation(line: 9, column: 3, scope: !14) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !0, line: 12, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !36) +// CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !19, type: !5) +// CHECK:STDOUT: !24 = !DILocation(line: 15, column: 9, scope: !19) +// CHECK:STDOUT: !25 = !DILocation(line: 15, column: 10, scope: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 16, column: 5, scope: !19) +// CHECK:STDOUT: !32 = !{null, !2} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 1, scope: !19) +// CHECK:STDOUT: !36 = !{!20} +// CHECK:STDOUT: !37 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !37, line: 396, type: !33, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !45) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !2) +// CHECK:STDOUT: !42 = !{null, !2, !2} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !45 = !{!39} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !37, line: 331, type: !43, 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: !83 = distinct !DILocation(line: 9, column: 10, scope: !14) +// CHECK:STDOUT: !84 = distinct !DILocation(line: 4, column: 10, scope: !8, inlinedAt: !83) +// CHECK:STDOUT: !85 = distinct !DILocation(line: 4, column: 19, scope: !8, inlinedAt: !83) +// CHECK:STDOUT: !91 = distinct !DILocation(line: 17, column: 5, scope: !19) +// CHECK:STDOUT: !92 = distinct !DILocation(line: 398, column: 5, scope: !38, inlinedAt: !91) +// CHECK:STDOUT: !93 = distinct !DILocation(line: 331, column: 3, scope: !54, inlinedAt: !92) // CHECK:STDOUT: diff --git a/toolchain/driver/testdata/compile/optimize/optimize_none.carbon b/toolchain/driver/testdata/compile/optimize/optimize_none.carbon index 51c9b7769944..d825fbbe3e54 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_none.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_none.carbon @@ -39,88 +39,87 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: declare i32 @_CRand.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define i32 @_CNoInlineWithOz.Main() #0 !dbg !10 { +// CHECK:STDOUT: define i32 @_CNoInlineWithOz.Main() #0 !dbg !8 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Rand.call.loc4_15 = call i32 @_CRand.Main(), !dbg !13 -// CHECK:STDOUT: %Rand.call.loc4_24 = call i32 @_CRand.Main(), !dbg !14 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %Rand.call.loc4_15, %Rand.call.loc4_24, !dbg !13 -// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call, !dbg !15 +// CHECK:STDOUT: %Rand.call.loc4_15 = call i32 @_CRand.Main(), !dbg !11 +// CHECK:STDOUT: %Rand.call.loc4_24 = call i32 @_CRand.Main(), !dbg !12 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %Rand.call.loc4_15, %Rand.call.loc4_24, !dbg !11 +// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() #0 !dbg !16 { +// CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() #0 !dbg !14 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %NoInlineWithOz.call = call i32 @_CNoInlineWithOz.Main(), !dbg !19 -// CHECK:STDOUT: ret i32 %NoInlineWithOz.call, !dbg !20 +// CHECK:STDOUT: %NoInlineWithOz.call = call i32 @_CNoInlineWithOz.Main(), !dbg !17 +// CHECK:STDOUT: ret i32 %NoInlineWithOz.call, !dbg !18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr %a) #0 !dbg !21 { +// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr %a) #0 !dbg !19 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !24 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !24 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !24 -// CHECK:STDOUT: br label %while.cond, !dbg !26 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !22 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !22 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !22 +// CHECK:STDOUT: br label %while.cond, !dbg !24 // CHECK:STDOUT: // CHECK:STDOUT: while.cond: ; preds = %while.body, %entry -// CHECK:STDOUT: %.loc15_10 = load i32, ptr %n.var, align 4, !dbg !27 -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.call = icmp slt i32 %.loc15_10, 65536, !dbg !27 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Less.call, label %while.body, label %while.done, !dbg !26 +// CHECK:STDOUT: %.loc15_10 = load i32, ptr %n.var, align 4, !dbg !25 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.call = icmp slt i32 %.loc15_10, 65536, !dbg !25 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Less.call, label %while.body, label %while.done, !dbg !24 // CHECK:STDOUT: // CHECK:STDOUT: while.body: ; preds = %while.cond -// CHECK:STDOUT: %.loc16_10 = load i32, ptr %n.var, align 4, !dbg !30 -// CHECK:STDOUT: %.loc16_11.array.index = getelementptr inbounds [65536 x i32], ptr %a, i32 0, i32 %.loc16_10, !dbg !31 -// 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 = mul i32 %Int.as.MulAssignWith.impl.Op.call, 2, !dbg !31 -// CHECK:STDOUT: store i32 %Int.as.MulAssignWith.impl.Op.call1, ptr %.loc16_11.array.index, align 4, !dbg !31 -// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %n.var), !dbg !33 +// CHECK:STDOUT: %.loc16_10 = load i32, ptr %n.var, align 4, !dbg !28 +// CHECK:STDOUT: %.loc16_11.array.index = getelementptr inbounds [65536 x i32], ptr %a, i32 0, i32 %.loc16_10, !dbg !29 +// CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call = load i32, ptr %.loc16_11.array.index, align 4, !dbg !29 +// CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call1 = mul i32 %Int.as.MulAssignWith.impl.Op.call, 2, !dbg !29 +// CHECK:STDOUT: store i32 %Int.as.MulAssignWith.impl.Op.call1, ptr %.loc16_11.array.index, align 4, !dbg !29 +// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %n.var), !dbg !31 // CHECK:STDOUT: br label %while.cond, !dbg !34 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %while.cond -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !24 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !22 // CHECK:STDOUT: ret void, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 !42 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !38 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !41 +// CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #0 !dbg !50 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !54 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !54 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !54 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !54 -// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !47 { +// CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: noinline nounwind optnone -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !58 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !63 -// CHECK:STDOUT: ret i32 %1, !dbg !65 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #0 !dbg !54 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !58 +// 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 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !67 { -// CHECK:STDOUT: ret i32 %self, !dbg !73 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(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 !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 = !{!75, !76} +// 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) @@ -130,54 +129,55 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !5 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !6 = !{null, !5} // CHECK:STDOUT: !7 = !DISubroutineType(types: !6) -// CHECK:STDOUT: !8 = !{null, !2} -// CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !0, line: 3, type: !4, spFlags: DISPFlagDefinition, unit: !1) -// CHECK:STDOUT: !13 = !DILocation(line: 4, column: 10, scope: !10) -// CHECK:STDOUT: !14 = !DILocation(line: 4, column: 19, scope: !10) -// CHECK:STDOUT: !15 = !DILocation(line: 4, column: 3, scope: !10) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !0, line: 7, type: !4, spFlags: DISPFlagDefinition, unit: !1) -// CHECK:STDOUT: !19 = !DILocation(line: 9, column: 10, scope: !16) -// CHECK:STDOUT: !20 = !DILocation(line: 9, column: 3, scope: !16) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !0, line: 12, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !36) -// CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !5) -// CHECK:STDOUT: !24 = !DILocation(line: 14, column: 3, scope: !21) -// CHECK:STDOUT: !26 = !DILocation(line: 15, column: 9, scope: !21) -// CHECK:STDOUT: !27 = !DILocation(line: 15, column: 10, scope: !21) -// CHECK:STDOUT: !30 = !DILocation(line: 16, column: 10, scope: !21) -// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 5, scope: !21) -// CHECK:STDOUT: !33 = !DILocation(line: 17, column: 5, scope: !21) -// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 3, scope: !21) -// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 1, scope: !21) -// CHECK:STDOUT: !36 = !{!22} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !40) -// 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 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !41, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !49) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !2) -// CHECK:STDOUT: !45 = !DILocation(line: 398, column: 5, scope: !42) -// CHECK:STDOUT: !46 = !{null, !2, !2} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !48 = !DILocation(line: 396, column: 3, scope: !42) -// CHECK:STDOUT: !49 = !{!43} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !41, line: 331, type: !47, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !57) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !2) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !50, type: !2) -// CHECK:STDOUT: !54 = !DILocation(line: 331, column: 3, scope: !50) -// CHECK:STDOUT: !55 = !{!2, !2} -// CHECK:STDOUT: !56 = !DISubroutineType(types: !55) -// CHECK:STDOUT: !57 = !{!51, !52} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !41, line: 64, type: !56, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !66) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !2) -// CHECK:STDOUT: !63 = !DILocation(line: 66, column: 17, scope: !58) -// CHECK:STDOUT: !65 = !DILocation(line: 66, column: 5, scope: !58) -// CHECK:STDOUT: !66 = !{!59} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !41, line: 59, type: !56, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !74) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !2) -// CHECK:STDOUT: !73 = !DILocation(line: 59, column: 28, scope: !67) -// CHECK:STDOUT: !74 = !{!68} -// CHECK:STDOUT: !75 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !76 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !0, line: 3, type: !4, spFlags: DISPFlagDefinition, unit: !1) +// CHECK:STDOUT: !11 = !DILocation(line: 4, column: 10, scope: !8) +// CHECK:STDOUT: !12 = !DILocation(line: 4, column: 19, scope: !8) +// CHECK:STDOUT: !13 = !DILocation(line: 4, column: 3, scope: !8) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !0, line: 7, type: !4, spFlags: DISPFlagDefinition, unit: !1) +// CHECK:STDOUT: !17 = !DILocation(line: 9, column: 10, scope: !14) +// CHECK:STDOUT: !18 = !DILocation(line: 9, column: 3, scope: !14) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !0, line: 12, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !36) +// CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !19, type: !5) +// CHECK:STDOUT: !22 = !DILocation(line: 14, column: 3, scope: !19) +// CHECK:STDOUT: !24 = !DILocation(line: 15, column: 9, scope: !19) +// CHECK:STDOUT: !25 = !DILocation(line: 15, column: 10, scope: !19) +// CHECK:STDOUT: !28 = !DILocation(line: 16, column: 10, scope: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 16, column: 5, scope: !19) +// CHECK:STDOUT: !31 = !DILocation(line: 17, column: 5, scope: !19) +// CHECK:STDOUT: !32 = !{null, !2} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 3, scope: !19) +// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 1, scope: !19) +// CHECK:STDOUT: !36 = !{!20} +// CHECK:STDOUT: !37 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !37, line: 396, type: !33, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !45) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !2) +// CHECK:STDOUT: !41 = !DILocation(line: 398, column: 5, scope: !38) +// CHECK:STDOUT: !42 = !{null, !2, !2} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = !DILocation(line: 396, column: 3, scope: !38) +// CHECK:STDOUT: !45 = !{!39} +// CHECK:STDOUT: !46 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !46, line: 36, type: !33, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !53) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !2) +// CHECK:STDOUT: !52 = !DILocation(line: 36, column: 1, scope: !47) +// CHECK:STDOUT: !53 = !{!48} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !37, line: 331, type: !43, 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: !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.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !37, 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: !37, 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 0ba56dd5a514..fa4d88679aef 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_size.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_size.carbon @@ -38,81 +38,80 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: declare i32 @_CRand.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: minsize nounwind optsize -// CHECK:STDOUT: define i32 @_CNoInlineWithOz.Main() #0 !dbg !10 { +// CHECK:STDOUT: define i32 @_CNoInlineWithOz.Main() #0 !dbg !8 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Rand.call.loc4_15 = call i32 @_CRand.Main(), !dbg !13 -// CHECK:STDOUT: %Rand.call.loc4_24 = call i32 @_CRand.Main(), !dbg !14 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %Rand.call.loc4_15, %Rand.call.loc4_24, !dbg !13 -// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call, !dbg !15 +// CHECK:STDOUT: %Rand.call.loc4_15 = call i32 @_CRand.Main(), !dbg !11 +// CHECK:STDOUT: %Rand.call.loc4_24 = call i32 @_CRand.Main(), !dbg !12 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %Rand.call.loc4_15, %Rand.call.loc4_24, !dbg !11 +// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: minsize nounwind optsize -// CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() #0 !dbg !16 { +// CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() #0 !dbg !14 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %NoInlineWithOz.call = call i32 @_CNoInlineWithOz.Main(), !dbg !19 -// CHECK:STDOUT: ret i32 %NoInlineWithOz.call, !dbg !20 +// CHECK:STDOUT: %NoInlineWithOz.call = call i32 @_CNoInlineWithOz.Main(), !dbg !17 +// CHECK:STDOUT: ret i32 %NoInlineWithOz.call, !dbg !18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: minsize nounwind optsize -// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr %a) #0 !dbg !21 { +// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr %a) #0 !dbg !19 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !24 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !24 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !24 -// CHECK:STDOUT: br label %while.cond, !dbg !26 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !22 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !22 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !22 +// CHECK:STDOUT: br label %while.cond, !dbg !24 // CHECK:STDOUT: // CHECK:STDOUT: while.cond: ; preds = %while.body, %entry -// CHECK:STDOUT: %.loc15_10 = load i32, ptr %n.var, align 4, !dbg !27 -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.call = icmp slt i32 %.loc15_10, 65536, !dbg !27 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Less.call, label %while.body, label %while.done, !dbg !26 +// CHECK:STDOUT: %.loc15_10 = load i32, ptr %n.var, align 4, !dbg !25 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.call = icmp slt i32 %.loc15_10, 65536, !dbg !25 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Less.call, label %while.body, label %while.done, !dbg !24 // CHECK:STDOUT: // CHECK:STDOUT: while.body: ; preds = %while.cond -// CHECK:STDOUT: %.loc16_10 = load i32, ptr %n.var, align 4, !dbg !30 -// CHECK:STDOUT: %.loc16_11.array.index = getelementptr inbounds [65536 x i32], ptr %a, i32 0, i32 %.loc16_10, !dbg !31 -// 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 = mul i32 %Int.as.MulAssignWith.impl.Op.call, 2, !dbg !31 -// CHECK:STDOUT: store i32 %Int.as.MulAssignWith.impl.Op.call1, ptr %.loc16_11.array.index, align 4, !dbg !31 -// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %n.var), !dbg !33 +// CHECK:STDOUT: %.loc16_10 = load i32, ptr %n.var, align 4, !dbg !28 +// CHECK:STDOUT: %.loc16_11.array.index = getelementptr inbounds [65536 x i32], ptr %a, i32 0, i32 %.loc16_10, !dbg !29 +// CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call = load i32, ptr %.loc16_11.array.index, align 4, !dbg !29 +// CHECK:STDOUT: %Int.as.MulAssignWith.impl.Op.call1 = mul i32 %Int.as.MulAssignWith.impl.Op.call, 2, !dbg !29 +// CHECK:STDOUT: store i32 %Int.as.MulAssignWith.impl.Op.call1, ptr %.loc16_11.array.index, align 4, !dbg !29 +// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %n.var), !dbg !31 // CHECK:STDOUT: br label %while.cond, !dbg !34 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %while.cond -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !24 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !22 // CHECK:STDOUT: ret void, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: minsize nounwind optsize -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 !42 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !38 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !41 +// CHECK:STDOUT: ret void, !dbg !44 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: minsize nounwind optsize +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !47 { +// 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.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #2 !dbg !50 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !54 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !54 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !54 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !54 -// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #2 !dbg !54 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !58 +// 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.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !58 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !63 -// CHECK:STDOUT: ret i32 %1, !dbg !65 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(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 !67 { -// CHECK:STDOUT: ret i32 %self, !dbg !73 +// 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 } @@ -120,7 +119,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 = !{!75, !76} +// 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) @@ -130,54 +129,55 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !5 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !6 = !{null, !5} // CHECK:STDOUT: !7 = !DISubroutineType(types: !6) -// CHECK:STDOUT: !8 = !{null, !2} -// CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !0, line: 3, type: !4, spFlags: DISPFlagDefinition, unit: !1) -// CHECK:STDOUT: !13 = !DILocation(line: 4, column: 10, scope: !10) -// CHECK:STDOUT: !14 = !DILocation(line: 4, column: 19, scope: !10) -// CHECK:STDOUT: !15 = !DILocation(line: 4, column: 3, scope: !10) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !0, line: 7, type: !4, spFlags: DISPFlagDefinition, unit: !1) -// CHECK:STDOUT: !19 = !DILocation(line: 9, column: 10, scope: !16) -// CHECK:STDOUT: !20 = !DILocation(line: 9, column: 3, scope: !16) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !0, line: 12, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !36) -// CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !5) -// CHECK:STDOUT: !24 = !DILocation(line: 14, column: 3, scope: !21) -// CHECK:STDOUT: !26 = !DILocation(line: 15, column: 9, scope: !21) -// CHECK:STDOUT: !27 = !DILocation(line: 15, column: 10, scope: !21) -// CHECK:STDOUT: !30 = !DILocation(line: 16, column: 10, scope: !21) -// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 5, scope: !21) -// CHECK:STDOUT: !33 = !DILocation(line: 17, column: 5, scope: !21) -// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 3, scope: !21) -// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 1, scope: !21) -// CHECK:STDOUT: !36 = !{!22} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !40) -// 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 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !41, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !49) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !2) -// CHECK:STDOUT: !45 = !DILocation(line: 398, column: 5, scope: !42) -// CHECK:STDOUT: !46 = !{null, !2, !2} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !48 = !DILocation(line: 396, column: 3, scope: !42) -// CHECK:STDOUT: !49 = !{!43} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !41, line: 331, type: !47, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !57) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !2) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !50, type: !2) -// CHECK:STDOUT: !54 = !DILocation(line: 331, column: 3, scope: !50) -// CHECK:STDOUT: !55 = !{!2, !2} -// CHECK:STDOUT: !56 = !DISubroutineType(types: !55) -// CHECK:STDOUT: !57 = !{!51, !52} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !41, line: 64, type: !56, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !66) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !2) -// CHECK:STDOUT: !63 = !DILocation(line: 66, column: 17, scope: !58) -// CHECK:STDOUT: !65 = !DILocation(line: 66, column: 5, scope: !58) -// CHECK:STDOUT: !66 = !{!59} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !41, line: 59, type: !56, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !74) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !2) -// CHECK:STDOUT: !73 = !DILocation(line: 59, column: 28, scope: !67) -// CHECK:STDOUT: !74 = !{!68} -// CHECK:STDOUT: !75 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !76 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !0, line: 3, type: !4, spFlags: DISPFlagDefinition, unit: !1) +// CHECK:STDOUT: !11 = !DILocation(line: 4, column: 10, scope: !8) +// CHECK:STDOUT: !12 = !DILocation(line: 4, column: 19, scope: !8) +// CHECK:STDOUT: !13 = !DILocation(line: 4, column: 3, scope: !8) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !0, line: 7, type: !4, spFlags: DISPFlagDefinition, unit: !1) +// CHECK:STDOUT: !17 = !DILocation(line: 9, column: 10, scope: !14) +// CHECK:STDOUT: !18 = !DILocation(line: 9, column: 3, scope: !14) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !0, line: 12, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !36) +// CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !19, type: !5) +// CHECK:STDOUT: !22 = !DILocation(line: 14, column: 3, scope: !19) +// CHECK:STDOUT: !24 = !DILocation(line: 15, column: 9, scope: !19) +// CHECK:STDOUT: !25 = !DILocation(line: 15, column: 10, scope: !19) +// CHECK:STDOUT: !28 = !DILocation(line: 16, column: 10, scope: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 16, column: 5, scope: !19) +// CHECK:STDOUT: !31 = !DILocation(line: 17, column: 5, scope: !19) +// CHECK:STDOUT: !32 = !{null, !2} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 3, scope: !19) +// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 1, scope: !19) +// CHECK:STDOUT: !36 = !{!20} +// CHECK:STDOUT: !37 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !37, line: 396, type: !33, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !45) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !2) +// CHECK:STDOUT: !41 = !DILocation(line: 398, column: 5, scope: !38) +// CHECK:STDOUT: !42 = !{null, !2, !2} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = !DILocation(line: 396, column: 3, scope: !38) +// CHECK:STDOUT: !45 = !{!39} +// CHECK:STDOUT: !46 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !46, line: 36, type: !33, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !53) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !2) +// CHECK:STDOUT: !52 = !DILocation(line: 36, column: 1, scope: !47) +// CHECK:STDOUT: !53 = !{!48} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !37, line: 331, type: !43, 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: !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.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !37, 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: !37, 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 a64902c2b409..62b421110f90 100644 --- a/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon +++ b/toolchain/driver/testdata/compile/optimize/optimize_speed.carbon @@ -39,52 +39,52 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: declare i32 @_CRand.Main() local_unnamed_addr // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CNoInlineWithOz.Main() local_unnamed_addr #0 !dbg !10 { +// CHECK:STDOUT: define i32 @_CNoInlineWithOz.Main() local_unnamed_addr #0 !dbg !8 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Rand.call.loc4_15 = tail call i32 @_CRand.Main() #0, !dbg !13 -// CHECK:STDOUT: %Rand.call.loc4_24 = tail call i32 @_CRand.Main() #0, !dbg !14 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %Rand.call.loc4_24, %Rand.call.loc4_15, !dbg !13 -// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call, !dbg !15 +// CHECK:STDOUT: %Rand.call.loc4_15 = tail call i32 @_CRand.Main() #0, !dbg !11 +// CHECK:STDOUT: %Rand.call.loc4_24 = tail call i32 @_CRand.Main() #0, !dbg !12 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %Rand.call.loc4_24, %Rand.call.loc4_15, !dbg !11 +// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() local_unnamed_addr #0 !dbg !16 { +// CHECK:STDOUT: define i32 @_CCallNoInlineWithOptSize.Main() local_unnamed_addr #0 !dbg !14 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !80 -// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !81 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !80 -// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call.i, !dbg !20 +// CHECK:STDOUT: %Rand.call.loc4_15.i = tail call i32 @_CRand.Main() #0, !dbg !84 +// CHECK:STDOUT: %Rand.call.loc4_24.i = tail call i32 @_CRand.Main() #0, !dbg !85 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call.i = add i32 %Rand.call.loc4_24.i, %Rand.call.loc4_15.i, !dbg !84 +// CHECK:STDOUT: ret i32 %Int.as.AddWith.impl.Op.call.i, !dbg !18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) -// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr nofree captures(none) %a) local_unnamed_addr #1 !dbg !21 { +// CHECK:STDOUT: define void @_CVectorizedWithOptSpeed.Main(ptr nofree captures(none) %a) local_unnamed_addr #1 !dbg !19 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: br label %vector.body, !dbg !26 +// CHECK:STDOUT: br label %vector.body, !dbg !24 // CHECK:STDOUT: // CHECK:STDOUT: vector.body: ; preds = %vector.body, %entry -// CHECK:STDOUT: %index = phi i32 [ 0, %entry ], [ %index.next.1, %vector.body ], !dbg !89 -// 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 -// CHECK:STDOUT: %wide.load = load <4 x i32>, ptr %1, align 4, !dbg !31 -// CHECK:STDOUT: %wide.load4 = load <4 x i32>, ptr %2, align 4, !dbg !31 -// CHECK:STDOUT: %3 = shl <4 x i32> %wide.load, splat (i32 1), !dbg !31 -// CHECK:STDOUT: %4 = shl <4 x i32> %wide.load4, splat (i32 1), !dbg !31 -// CHECK:STDOUT: store <4 x i32> %3, ptr %1, align 4, !dbg !31 -// CHECK:STDOUT: store <4 x i32> %4, ptr %2, align 4, !dbg !31 -// CHECK:STDOUT: %5 = zext nneg i32 %index to i64, !dbg !31 -// CHECK:STDOUT: %6 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %5, !dbg !31 -// CHECK:STDOUT: %7 = getelementptr inbounds nuw i8, ptr %6, i64 32, !dbg !31 -// CHECK:STDOUT: %8 = getelementptr inbounds nuw i8, ptr %6, i64 48, !dbg !31 -// CHECK:STDOUT: %wide.load.1 = load <4 x i32>, ptr %7, align 4, !dbg !31 -// CHECK:STDOUT: %wide.load4.1 = load <4 x i32>, ptr %8, align 4, !dbg !31 -// CHECK:STDOUT: %9 = shl <4 x i32> %wide.load.1, splat (i32 1), !dbg !31 -// 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 !89 -// 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 !97 +// CHECK:STDOUT: %index = phi i32 [ 0, %entry ], [ %index.next.1, %vector.body ], !dbg !93 +// CHECK:STDOUT: %0 = zext nneg i32 %index to i64, !dbg !29 +// CHECK:STDOUT: %1 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %0, !dbg !29 +// CHECK:STDOUT: %2 = getelementptr inbounds nuw i8, ptr %1, i64 16, !dbg !29 +// CHECK:STDOUT: %wide.load = load <4 x i32>, ptr %1, align 4, !dbg !29 +// CHECK:STDOUT: %wide.load4 = load <4 x i32>, ptr %2, align 4, !dbg !29 +// CHECK:STDOUT: %3 = shl <4 x i32> %wide.load, splat (i32 1), !dbg !29 +// CHECK:STDOUT: %4 = shl <4 x i32> %wide.load4, splat (i32 1), !dbg !29 +// CHECK:STDOUT: store <4 x i32> %3, ptr %1, align 4, !dbg !29 +// CHECK:STDOUT: store <4 x i32> %4, ptr %2, align 4, !dbg !29 +// CHECK:STDOUT: %5 = zext nneg i32 %index to i64, !dbg !29 +// CHECK:STDOUT: %6 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %5, !dbg !29 +// CHECK:STDOUT: %7 = getelementptr inbounds nuw i8, ptr %6, i64 32, !dbg !29 +// CHECK:STDOUT: %8 = getelementptr inbounds nuw i8, ptr %6, i64 48, !dbg !29 +// CHECK:STDOUT: %wide.load.1 = load <4 x i32>, ptr %7, align 4, !dbg !29 +// CHECK:STDOUT: %wide.load4.1 = load <4 x i32>, ptr %8, align 4, !dbg !29 +// CHECK:STDOUT: %9 = shl <4 x i32> %wide.load.1, splat (i32 1), !dbg !29 +// CHECK:STDOUT: %10 = shl <4 x i32> %wide.load4.1, splat (i32 1), !dbg !29 +// CHECK:STDOUT: store <4 x i32> %9, ptr %7, align 4, !dbg !29 +// CHECK:STDOUT: store <4 x i32> %10, ptr %8, align 4, !dbg !29 +// CHECK:STDOUT: %index.next.1 = add nuw nsw i32 %index, 16, !dbg !93 +// CHECK:STDOUT: %11 = icmp eq i32 %index.next.1, 65536, !dbg !24 +// CHECK:STDOUT: br i1 %11, label %while.done, label %vector.body, !dbg !24, !llvm.loop !101 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %vector.body // CHECK:STDOUT: ret void, !dbg !35 @@ -97,17 +97,11 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: uselistorder i32 %index.next.1, { 1, 0 } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) local_unnamed_addr #0 !dbg !37 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !39 -// 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 = !{!75, !76} +// 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) @@ -117,43 +111,39 @@ fn VectorizedWithOptSpeed(a: array(i32, 65536)*) { // CHECK:STDOUT: !5 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !6 = !{null, !5} // CHECK:STDOUT: !7 = !DISubroutineType(types: !6) -// CHECK:STDOUT: !8 = !{null, !2} -// CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !0, line: 3, type: !4, spFlags: DISPFlagDefinition, unit: !1) -// CHECK:STDOUT: !13 = !DILocation(line: 4, column: 10, scope: !10) -// CHECK:STDOUT: !14 = !DILocation(line: 4, column: 19, scope: !10) -// CHECK:STDOUT: !15 = !DILocation(line: 4, column: 3, scope: !10) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !0, line: 7, type: !4, spFlags: DISPFlagDefinition, unit: !1) -// CHECK:STDOUT: !20 = !DILocation(line: 9, column: 3, scope: !16) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !0, line: 12, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !36) -// CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !5) -// CHECK:STDOUT: !26 = !DILocation(line: 15, column: 9, scope: !21) -// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 5, scope: !21) -// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 1, scope: !21) -// CHECK:STDOUT: !36 = !{!22} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !0, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !40) -// 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 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !41, line: 396, type: !9, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !49) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !2) -// CHECK:STDOUT: !46 = !{null, !2, !2} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !49 = !{!43} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !41, line: 331, type: !47, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !57) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !2) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 2, scope: !50, type: !2) -// CHECK:STDOUT: !57 = !{!51, !52} -// CHECK:STDOUT: !75 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !76 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !79 = distinct !DILocation(line: 9, column: 10, scope: !16) -// CHECK:STDOUT: !80 = distinct !DILocation(line: 4, column: 10, scope: !10, inlinedAt: !79) -// CHECK:STDOUT: !81 = distinct !DILocation(line: 4, column: 19, scope: !10, inlinedAt: !79) -// CHECK:STDOUT: !87 = distinct !DILocation(line: 17, column: 5, scope: !21) -// CHECK:STDOUT: !88 = distinct !DILocation(line: 398, column: 5, scope: !42, inlinedAt: !87) -// CHECK:STDOUT: !89 = distinct !DILocation(line: 331, column: 3, scope: !50, inlinedAt: !88) -// CHECK:STDOUT: !94 = !{!"llvm.loop.isvectorized", i32 1} -// CHECK:STDOUT: !96 = !{!"llvm.loop.unroll.runtime.disable"} -// CHECK:STDOUT: !97 = distinct !{!97, !94, !96} +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "NoInlineWithOz", linkageName: "_CNoInlineWithOz.Main", scope: null, file: !0, line: 3, type: !4, spFlags: DISPFlagDefinition, unit: !1) +// CHECK:STDOUT: !11 = !DILocation(line: 4, column: 10, scope: !8) +// CHECK:STDOUT: !12 = !DILocation(line: 4, column: 19, scope: !8) +// CHECK:STDOUT: !13 = !DILocation(line: 4, column: 3, scope: !8) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "CallNoInlineWithOptSize", linkageName: "_CCallNoInlineWithOptSize.Main", scope: null, file: !0, line: 7, type: !4, spFlags: DISPFlagDefinition, unit: !1) +// CHECK:STDOUT: !18 = !DILocation(line: 9, column: 3, scope: !14) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "VectorizedWithOptSpeed", linkageName: "_CVectorizedWithOptSpeed.Main", scope: null, file: !0, line: 12, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !36) +// CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !19, type: !5) +// CHECK:STDOUT: !24 = !DILocation(line: 15, column: 9, scope: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 16, column: 5, scope: !19) +// CHECK:STDOUT: !32 = !{null, !2} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 1, scope: !19) +// CHECK:STDOUT: !36 = !{!20} +// CHECK:STDOUT: !37 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !37, line: 396, type: !33, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !45) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !2) +// CHECK:STDOUT: !42 = !{null, !2, !2} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !45 = !{!39} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !37, line: 331, type: !43, 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: !83 = distinct !DILocation(line: 9, column: 10, scope: !14) +// CHECK:STDOUT: !84 = distinct !DILocation(line: 4, column: 10, scope: !8, inlinedAt: !83) +// CHECK:STDOUT: !85 = distinct !DILocation(line: 4, column: 19, scope: !8, inlinedAt: !83) +// CHECK:STDOUT: !91 = distinct !DILocation(line: 17, column: 5, scope: !19) +// CHECK:STDOUT: !92 = distinct !DILocation(line: 398, column: 5, scope: !38, inlinedAt: !91) +// CHECK:STDOUT: !93 = distinct !DILocation(line: 331, column: 3, scope: !54, inlinedAt: !92) +// CHECK:STDOUT: !98 = !{!"llvm.loop.isvectorized", i32 1} +// CHECK:STDOUT: !100 = !{!"llvm.loop.unroll.runtime.disable"} +// CHECK:STDOUT: !101 = distinct !{!101, !98, !100} // CHECK:STDOUT: diff --git a/toolchain/driver/testdata/compile/target_cpu.carbon b/toolchain/driver/testdata/compile/target_cpu.carbon index a569b7a0c62b..cc64d132c553 100644 --- a/toolchain/driver/testdata/compile/target_cpu.carbon +++ b/toolchain/driver/testdata/compile/target_cpu.carbon @@ -44,82 +44,82 @@ fn VectorizedWithAvx2(a: array(i32, 65536)*) { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) -// CHECK:STDOUT: define void @_CVectorizedWithAvx2.Main(ptr nofree captures(none) %a) local_unnamed_addr #0 !dbg !8 { +// CHECK:STDOUT: define void @_CVectorizedWithAvx2.Main(ptr nofree captures(none) %a) local_unnamed_addr #0 !dbg !6 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: br label %vector.body, !dbg !13 +// CHECK:STDOUT: br label %vector.body, !dbg !11 // CHECK:STDOUT: // CHECK:STDOUT: vector.body: ; preds = %vector.body, %entry -// CHECK:STDOUT: %index = phi i64 [ 0, %entry ], [ %index.next.3, %vector.body ], !dbg !80 -// CHECK:STDOUT: %0 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %index, !dbg !18 -// CHECK:STDOUT: %1 = getelementptr inbounds nuw i8, ptr %0, i64 32, !dbg !18 -// CHECK:STDOUT: %2 = getelementptr inbounds nuw i8, ptr %0, i64 64, !dbg !18 -// CHECK:STDOUT: %3 = getelementptr inbounds nuw i8, ptr %0, i64 96, !dbg !18 -// CHECK:STDOUT: %wide.load = load <8 x i32>, ptr %0, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load5 = load <8 x i32>, ptr %1, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load6 = load <8 x i32>, ptr %2, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load7 = load <8 x i32>, ptr %3, align 4, !dbg !18 -// CHECK:STDOUT: %4 = shl <8 x i32> %wide.load, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %5 = shl <8 x i32> %wide.load5, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %6 = shl <8 x i32> %wide.load6, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %7 = shl <8 x i32> %wide.load7, splat (i32 1), !dbg !18 -// CHECK:STDOUT: store <8 x i32> %4, ptr %0, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %5, ptr %1, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %6, ptr %2, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %7, ptr %3, align 4, !dbg !18 -// CHECK:STDOUT: %8 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %index, !dbg !18 -// CHECK:STDOUT: %9 = getelementptr inbounds nuw i8, ptr %8, i64 128, !dbg !18 -// CHECK:STDOUT: %10 = getelementptr inbounds nuw i8, ptr %8, i64 160, !dbg !18 -// CHECK:STDOUT: %11 = getelementptr inbounds nuw i8, ptr %8, i64 192, !dbg !18 -// CHECK:STDOUT: %12 = getelementptr inbounds nuw i8, ptr %8, i64 224, !dbg !18 -// CHECK:STDOUT: %wide.load.1 = load <8 x i32>, ptr %9, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load5.1 = load <8 x i32>, ptr %10, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load6.1 = load <8 x i32>, ptr %11, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load7.1 = load <8 x i32>, ptr %12, align 4, !dbg !18 -// CHECK:STDOUT: %13 = shl <8 x i32> %wide.load.1, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %14 = shl <8 x i32> %wide.load5.1, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %15 = shl <8 x i32> %wide.load6.1, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %16 = shl <8 x i32> %wide.load7.1, splat (i32 1), !dbg !18 -// CHECK:STDOUT: store <8 x i32> %13, ptr %9, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %14, ptr %10, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %15, ptr %11, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %16, ptr %12, align 4, !dbg !18 -// CHECK:STDOUT: %17 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %index, !dbg !18 -// CHECK:STDOUT: %18 = getelementptr inbounds nuw i8, ptr %17, i64 256, !dbg !18 -// CHECK:STDOUT: %19 = getelementptr inbounds nuw i8, ptr %17, i64 288, !dbg !18 -// CHECK:STDOUT: %20 = getelementptr inbounds nuw i8, ptr %17, i64 320, !dbg !18 -// CHECK:STDOUT: %21 = getelementptr inbounds nuw i8, ptr %17, i64 352, !dbg !18 -// CHECK:STDOUT: %wide.load.2 = load <8 x i32>, ptr %18, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load5.2 = load <8 x i32>, ptr %19, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load6.2 = load <8 x i32>, ptr %20, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load7.2 = load <8 x i32>, ptr %21, align 4, !dbg !18 -// CHECK:STDOUT: %22 = shl <8 x i32> %wide.load.2, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %23 = shl <8 x i32> %wide.load5.2, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %24 = shl <8 x i32> %wide.load6.2, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %25 = shl <8 x i32> %wide.load7.2, splat (i32 1), !dbg !18 -// CHECK:STDOUT: store <8 x i32> %22, ptr %18, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %23, ptr %19, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %24, ptr %20, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %25, ptr %21, align 4, !dbg !18 -// CHECK:STDOUT: %26 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %index, !dbg !18 -// CHECK:STDOUT: %27 = getelementptr inbounds nuw i8, ptr %26, i64 384, !dbg !18 -// CHECK:STDOUT: %28 = getelementptr inbounds nuw i8, ptr %26, i64 416, !dbg !18 -// CHECK:STDOUT: %29 = getelementptr inbounds nuw i8, ptr %26, i64 448, !dbg !18 -// CHECK:STDOUT: %30 = getelementptr inbounds nuw i8, ptr %26, i64 480, !dbg !18 -// CHECK:STDOUT: %wide.load.3 = load <8 x i32>, ptr %27, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load5.3 = load <8 x i32>, ptr %28, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load6.3 = load <8 x i32>, ptr %29, align 4, !dbg !18 -// CHECK:STDOUT: %wide.load7.3 = load <8 x i32>, ptr %30, align 4, !dbg !18 -// CHECK:STDOUT: %31 = shl <8 x i32> %wide.load.3, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %32 = shl <8 x i32> %wide.load5.3, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %33 = shl <8 x i32> %wide.load6.3, splat (i32 1), !dbg !18 -// CHECK:STDOUT: %34 = shl <8 x i32> %wide.load7.3, splat (i32 1), !dbg !18 -// CHECK:STDOUT: store <8 x i32> %31, ptr %27, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %32, ptr %28, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %33, ptr %29, align 4, !dbg !18 -// CHECK:STDOUT: store <8 x i32> %34, ptr %30, align 4, !dbg !18 -// CHECK:STDOUT: %index.next.3 = add nuw nsw i64 %index, 128, !dbg !80 -// CHECK:STDOUT: %35 = icmp eq i64 %index.next.3, 65536, !dbg !13 -// CHECK:STDOUT: br i1 %35, label %while.done, label %vector.body, !dbg !13, !llvm.loop !88 +// CHECK:STDOUT: %index = phi i64 [ 0, %entry ], [ %index.next.3, %vector.body ], !dbg !84 +// CHECK:STDOUT: %0 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %index, !dbg !16 +// CHECK:STDOUT: %1 = getelementptr inbounds nuw i8, ptr %0, i64 32, !dbg !16 +// CHECK:STDOUT: %2 = getelementptr inbounds nuw i8, ptr %0, i64 64, !dbg !16 +// CHECK:STDOUT: %3 = getelementptr inbounds nuw i8, ptr %0, i64 96, !dbg !16 +// CHECK:STDOUT: %wide.load = load <8 x i32>, ptr %0, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load5 = load <8 x i32>, ptr %1, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load6 = load <8 x i32>, ptr %2, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load7 = load <8 x i32>, ptr %3, align 4, !dbg !16 +// CHECK:STDOUT: %4 = shl <8 x i32> %wide.load, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %5 = shl <8 x i32> %wide.load5, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %6 = shl <8 x i32> %wide.load6, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %7 = shl <8 x i32> %wide.load7, splat (i32 1), !dbg !16 +// CHECK:STDOUT: store <8 x i32> %4, ptr %0, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %5, ptr %1, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %6, ptr %2, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %7, ptr %3, align 4, !dbg !16 +// CHECK:STDOUT: %8 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %index, !dbg !16 +// CHECK:STDOUT: %9 = getelementptr inbounds nuw i8, ptr %8, i64 128, !dbg !16 +// CHECK:STDOUT: %10 = getelementptr inbounds nuw i8, ptr %8, i64 160, !dbg !16 +// CHECK:STDOUT: %11 = getelementptr inbounds nuw i8, ptr %8, i64 192, !dbg !16 +// CHECK:STDOUT: %12 = getelementptr inbounds nuw i8, ptr %8, i64 224, !dbg !16 +// CHECK:STDOUT: %wide.load.1 = load <8 x i32>, ptr %9, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load5.1 = load <8 x i32>, ptr %10, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load6.1 = load <8 x i32>, ptr %11, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load7.1 = load <8 x i32>, ptr %12, align 4, !dbg !16 +// CHECK:STDOUT: %13 = shl <8 x i32> %wide.load.1, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %14 = shl <8 x i32> %wide.load5.1, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %15 = shl <8 x i32> %wide.load6.1, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %16 = shl <8 x i32> %wide.load7.1, splat (i32 1), !dbg !16 +// CHECK:STDOUT: store <8 x i32> %13, ptr %9, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %14, ptr %10, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %15, ptr %11, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %16, ptr %12, align 4, !dbg !16 +// CHECK:STDOUT: %17 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %index, !dbg !16 +// CHECK:STDOUT: %18 = getelementptr inbounds nuw i8, ptr %17, i64 256, !dbg !16 +// CHECK:STDOUT: %19 = getelementptr inbounds nuw i8, ptr %17, i64 288, !dbg !16 +// CHECK:STDOUT: %20 = getelementptr inbounds nuw i8, ptr %17, i64 320, !dbg !16 +// CHECK:STDOUT: %21 = getelementptr inbounds nuw i8, ptr %17, i64 352, !dbg !16 +// CHECK:STDOUT: %wide.load.2 = load <8 x i32>, ptr %18, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load5.2 = load <8 x i32>, ptr %19, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load6.2 = load <8 x i32>, ptr %20, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load7.2 = load <8 x i32>, ptr %21, align 4, !dbg !16 +// CHECK:STDOUT: %22 = shl <8 x i32> %wide.load.2, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %23 = shl <8 x i32> %wide.load5.2, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %24 = shl <8 x i32> %wide.load6.2, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %25 = shl <8 x i32> %wide.load7.2, splat (i32 1), !dbg !16 +// CHECK:STDOUT: store <8 x i32> %22, ptr %18, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %23, ptr %19, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %24, ptr %20, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %25, ptr %21, align 4, !dbg !16 +// CHECK:STDOUT: %26 = getelementptr inbounds nuw [4 x i8], ptr %a, i64 %index, !dbg !16 +// CHECK:STDOUT: %27 = getelementptr inbounds nuw i8, ptr %26, i64 384, !dbg !16 +// CHECK:STDOUT: %28 = getelementptr inbounds nuw i8, ptr %26, i64 416, !dbg !16 +// CHECK:STDOUT: %29 = getelementptr inbounds nuw i8, ptr %26, i64 448, !dbg !16 +// CHECK:STDOUT: %30 = getelementptr inbounds nuw i8, ptr %26, i64 480, !dbg !16 +// CHECK:STDOUT: %wide.load.3 = load <8 x i32>, ptr %27, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load5.3 = load <8 x i32>, ptr %28, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load6.3 = load <8 x i32>, ptr %29, align 4, !dbg !16 +// CHECK:STDOUT: %wide.load7.3 = load <8 x i32>, ptr %30, align 4, !dbg !16 +// CHECK:STDOUT: %31 = shl <8 x i32> %wide.load.3, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %32 = shl <8 x i32> %wide.load5.3, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %33 = shl <8 x i32> %wide.load6.3, splat (i32 1), !dbg !16 +// CHECK:STDOUT: %34 = shl <8 x i32> %wide.load7.3, splat (i32 1), !dbg !16 +// CHECK:STDOUT: store <8 x i32> %31, ptr %27, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %32, ptr %28, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %33, ptr %29, align 4, !dbg !16 +// CHECK:STDOUT: store <8 x i32> %34, ptr %30, align 4, !dbg !16 +// CHECK:STDOUT: %index.next.3 = add nuw nsw i64 %index, 128, !dbg !84 +// CHECK:STDOUT: %35 = icmp eq i64 %index.next.3, 65536, !dbg !11 +// CHECK:STDOUT: br i1 %35, label %while.done, label %vector.body, !dbg !11, !llvm.loop !92 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %vector.body // CHECK:STDOUT: ret void, !dbg !22 @@ -142,18 +142,11 @@ fn VectorizedWithAvx2(a: array(i32, 65536)*) { // CHECK:STDOUT: uselistorder i64 %index.next.3, { 1, 0 } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) local_unnamed_addr #1 !dbg !24 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !26 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nofree norecurse nosync nounwind memory(argmem: readwrite) "tune-cpu"="znver4" } -// CHECK:STDOUT: attributes #1 = { nounwind "tune-cpu"="znver4" } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!1} -// CHECK:STDOUT: !llvm.module.flags = !{!62, !63, !64, !70, !71} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!69} +// CHECK:STDOUT: !llvm.module.flags = !{!66, !67, !68, !74, !75} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!73} // 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) @@ -161,42 +154,38 @@ fn VectorizedWithAvx2(a: array(i32, 65536)*) { // CHECK:STDOUT: !3 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !4 = !{null, !3} // CHECK:STDOUT: !5 = !DISubroutineType(types: !4) -// CHECK:STDOUT: !6 = !{null, !2} -// CHECK:STDOUT: !7 = !DISubroutineType(types: !6) -// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "VectorizedWithAvx2", linkageName: "_CVectorizedWithAvx2.Main", scope: null, file: !0, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !23) -// CHECK:STDOUT: !9 = !DILocalVariable(arg: 1, scope: !8, type: !3) -// CHECK:STDOUT: !13 = !DILocation(line: 21, column: 9, scope: !8) -// CHECK:STDOUT: !18 = !DILocation(line: 22, column: 5, scope: !8) -// CHECK:STDOUT: !22 = !DILocation(line: 17, column: 1, scope: !8) -// CHECK:STDOUT: !23 = !{!9} -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !0, line: 20, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !27) -// CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !24, type: !2) -// CHECK:STDOUT: !26 = !DILocation(line: 20, column: 3, scope: !24) -// CHECK:STDOUT: !27 = !{!25} -// CHECK:STDOUT: !28 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !28, line: 396, type: !7, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !36) -// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !2) -// CHECK:STDOUT: !33 = !{null, !2, !2} -// CHECK:STDOUT: !34 = !DISubroutineType(types: !33) -// CHECK:STDOUT: !36 = !{!30} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !28, line: 331, type: !34, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !44) -// CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !2) -// CHECK:STDOUT: !39 = !DILocalVariable(arg: 2, scope: !37, type: !2) -// CHECK:STDOUT: !44 = !{!38, !39} -// CHECK:STDOUT: !62 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !63 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !64 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !65 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !66 = !{!"omnipotent char", !65, i64 0} -// CHECK:STDOUT: !67 = !{!"int", !66, i64 0} -// CHECK:STDOUT: !68 = !{!"__libc_errno", !67, i64 0} -// CHECK:STDOUT: !69 = !{!68, !67, i64 0} -// CHECK:STDOUT: !70 = !{i32 7, !"Dwarf Version", i32 5} -// CHECK:STDOUT: !71 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !78 = distinct !DILocation(line: 23, column: 5, scope: !8) -// CHECK:STDOUT: !79 = distinct !DILocation(line: 398, column: 5, scope: !29, inlinedAt: !78) -// CHECK:STDOUT: !80 = distinct !DILocation(line: 331, column: 3, scope: !37, inlinedAt: !79) -// CHECK:STDOUT: !85 = !{!"llvm.loop.isvectorized", i32 1} -// CHECK:STDOUT: !87 = !{!"llvm.loop.unroll.runtime.disable"} -// CHECK:STDOUT: !88 = distinct !{!88, !85, !87} +// CHECK:STDOUT: !6 = distinct !DISubprogram(name: "VectorizedWithAvx2", linkageName: "_CVectorizedWithAvx2.Main", scope: null, file: !0, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !23) +// CHECK:STDOUT: !7 = !DILocalVariable(arg: 1, scope: !6, type: !3) +// CHECK:STDOUT: !11 = !DILocation(line: 21, column: 9, scope: !6) +// CHECK:STDOUT: !16 = !DILocation(line: 22, column: 5, scope: !6) +// CHECK:STDOUT: !19 = !{null, !2} +// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) +// CHECK:STDOUT: !22 = !DILocation(line: 17, column: 1, scope: !6) +// CHECK:STDOUT: !23 = !{!7} +// CHECK:STDOUT: !24 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !24, line: 396, type: !20, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !32) +// CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !2) +// CHECK:STDOUT: !29 = !{null, !2, !2} +// CHECK:STDOUT: !30 = !DISubroutineType(types: !29) +// CHECK:STDOUT: !32 = !{!26} +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !24, line: 331, type: !30, spFlags: DISPFlagDefinition, unit: !1, retainedNodes: !48) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !2) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 2, scope: !41, type: !2) +// CHECK:STDOUT: !48 = !{!42, !43} +// CHECK:STDOUT: !66 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !67 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !68 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !69 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !70 = !{!"omnipotent char", !69, i64 0} +// CHECK:STDOUT: !71 = !{!"int", !70, i64 0} +// CHECK:STDOUT: !72 = !{!"__libc_errno", !71, i64 0} +// CHECK:STDOUT: !73 = !{!72, !71, i64 0} +// CHECK:STDOUT: !74 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !75 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !82 = distinct !DILocation(line: 23, column: 5, scope: !6) +// CHECK:STDOUT: !83 = distinct !DILocation(line: 398, column: 5, scope: !25, inlinedAt: !82) +// CHECK:STDOUT: !84 = distinct !DILocation(line: 331, column: 3, scope: !41, inlinedAt: !83) +// CHECK:STDOUT: !89 = !{!"llvm.loop.isvectorized", i32 1} +// CHECK:STDOUT: !91 = !{!"llvm.loop.unroll.runtime.disable"} +// CHECK:STDOUT: !92 = distinct !{!92, !89, !91} // CHECK:STDOUT: diff --git a/toolchain/language_server/testdata/position/hover_and_goto.carbon b/toolchain/language_server/testdata/position/hover_and_goto.carbon index f5b22efd0aaa..7bbd2bd77100 100644 --- a/toolchain/language_server/testdata/position/hover_and_goto.carbon +++ b/toolchain/language_server/testdata/position/hover_and_goto.carbon @@ -78,7 +78,7 @@ fn Run() { // CHECK:STDOUT: "typeDefinitionProvider": true // CHECK:STDOUT: } // CHECK:STDOUT: } -// CHECK:STDOUT: }Content-Length: 1570{{\r}} +// CHECK:STDOUT: }Content-Length: 1575{{\r}} // CHECK:STDOUT: {{\r}} // CHECK:STDOUT: { // CHECK:STDOUT: "jsonrpc": "2.0", @@ -131,7 +131,7 @@ fn Run() { // CHECK:STDOUT: "source": "carbon" // CHECK:STDOUT: }, // CHECK:STDOUT: { -// CHECK:STDOUT: "message": "`Core.Destroy` implicitly referenced here, but package `Core` not found", +// CHECK:STDOUT: "message": "`Core.SelfDestruct` implicitly referenced here, but package `Core` not found", // CHECK:STDOUT: "range": { // CHECK:STDOUT: "end": { // CHECK:STDOUT: "character": 12, diff --git a/toolchain/lower/testdata/array/array_in_place.carbon b/toolchain/lower/testdata/array/array_in_place.carbon index 6146085e07e5..f6c338c31a96 100644 --- a/toolchain/lower/testdata/array/array_in_place.carbon +++ b/toolchain/lower/testdata/array/array_in_place.carbon @@ -23,63 +23,64 @@ fn G() { // CHECK:STDOUT: declare void @_CF.Main(ptr sret({ i32, i32, i32 })) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !32 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !30 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [2 x { i32, i32, i32 }], align 4, !dbg !33 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !33 -// CHECK:STDOUT: %.loc16_47.6.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %_.var, i32 0, i64 0, !dbg !34 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_47.6.array.index), !dbg !35 -// CHECK:STDOUT: %.loc16_47.5.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %_.var, i32 0, i64 1, !dbg !34 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_47.5.array.index), !dbg !36 -// CHECK:STDOUT: call void @"_CSelfDestruct.192f70889bf95c53:core.Destroy.Core"(ptr %_.var), !dbg !33 -// CHECK:STDOUT: ret void, !dbg !38 +// CHECK:STDOUT: %_.var = alloca [2 x { i32, i32, i32 }], align 4, !dbg !31 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !31 +// CHECK:STDOUT: %.loc16_47.6.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %_.var, i32 0, i64 0, !dbg !32 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_47.6.array.index), !dbg !33 +// CHECK:STDOUT: %.loc16_47.5.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %_.var, i32 0, i64 1, !dbg !32 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_47.5.array.index), !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.cb1358a8dfcca74f(ptr %_.var), !dbg !31 +// CHECK:STDOUT: ret void, !dbg !36 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !39 { +// CHECK:STDOUT: define weak_odr void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !37 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !41 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !39 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem2.tuple.elem), !dbg !39 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !39 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !39 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !39 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !39 +// CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: define weak_odr void @"_COp.192f70889bf95c53:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !45 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !45 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !45 +// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %self, i32 0, i64 1, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %.loc16_3.1.array.index), !dbg !45 +// CHECK:STDOUT: %.loc16_3.4.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %self, i32 0, i64 0, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %.loc16_3.4.array.index), !dbg !45 // CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !47 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.abce894028f59bc0: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.192f70889bf95c53:core.Destroy.Core"(ptr %self) #0 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %self, i32 0, i64 1, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !53 -// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %self, i32 0, i64 0, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !53 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.192f70889bf95c53:core.Destroy.Core"(ptr %self) #0 !dbg !55 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.192f70889bf95c53:core.Destroy.Core"(ptr %self), !dbg !57 -// CHECK:STDOUT: ret void, !dbg !57 -// 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 @_CSelfDestruct.Core.cb1358a8dfcca74f(ptr %t) #0 !dbg !47 { +// CHECK:STDOUT: call void @"_COp.192f70889bf95c53:core.SubobjectDestroy.Core"(ptr %t), !dbg !51 +// CHECK:STDOUT: ret void, !dbg !52 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !54 { +// CHECK:STDOUT: ret void, !dbg !59 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %t) #0 !dbg !61 { +// CHECK:STDOUT: call void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %t), !dbg !65 +// CHECK:STDOUT: ret void, !dbg !66 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6e65c86a129b7677, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -88,40 +89,43 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !14 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIFile(filename: "array_in_place.carbon", directory: "") // CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !26 = !{null} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !22} +// CHECK:STDOUT: !28 = !{null, !23} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = !{null, !23} -// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !20, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !21) -// CHECK:STDOUT: !33 = !DILocation(line: 16, column: 3, scope: !32) -// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 38, scope: !32) -// CHECK:STDOUT: !35 = !DILocation(line: 16, column: 39, scope: !32) -// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 44, scope: !32) -// CHECK:STDOUT: !38 = !DILocation(line: 15, column: 1, scope: !32) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !20, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !42) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !22) -// CHECK:STDOUT: !41 = !DILocation(line: 16, column: 3, scope: !39) -// CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !46) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !20, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 3, scope: !30) +// CHECK:STDOUT: !32 = !DILocation(line: 16, column: 38, scope: !30) +// CHECK:STDOUT: !33 = !DILocation(line: 16, column: 39, scope: !30) +// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 44, scope: !30) +// CHECK:STDOUT: !36 = !DILocation(line: 15, column: 1, scope: !30) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.abce894028f59bc0:core.SubobjectDestroy.Core", scope: null, file: !20, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !42) +// CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !23) +// CHECK:STDOUT: !39 = !DILocation(line: 16, column: 3, scope: !37) +// CHECK:STDOUT: !40 = !{null, !22} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !42 = !{!38} +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.192f70889bf95c53:core.SubobjectDestroy.Core", scope: null, file: !20, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !46) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !23) // CHECK:STDOUT: !45 = !DILocation(line: 16, column: 3, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.abce894028f59bc0:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !50) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.cb1358a8dfcca74f", scope: null, file: !14, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !53) // CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !23) -// CHECK:STDOUT: !49 = !DILocation(line: 16, column: 3, scope: !47) -// CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.192f70889bf95c53:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !54) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !23) -// CHECK:STDOUT: !53 = !DILocation(line: 16, column: 3, scope: !51) -// CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.192f70889bf95c53:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !23) -// CHECK:STDOUT: !57 = !DILocation(line: 16, column: 3, scope: !55) -// CHECK:STDOUT: !58 = !{!56} +// CHECK:STDOUT: !51 = !DILocation(line: 34, column: 5, scope: !47) +// CHECK:STDOUT: !52 = !DILocation(line: 32, column: 1, scope: !47) +// CHECK:STDOUT: !53 = !{!48} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !14, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !60) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !22) +// CHECK:STDOUT: !59 = !DILocation(line: 32, column: 1, scope: !54) +// CHECK:STDOUT: !60 = !{!55} +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6e65c86a129b7677", scope: null, file: !14, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !67) +// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !23) +// CHECK:STDOUT: !65 = !DILocation(line: 34, column: 5, scope: !61) +// CHECK:STDOUT: !66 = !DILocation(line: 32, column: 1, scope: !61) +// CHECK:STDOUT: !67 = !{!62} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/assign_return_value.carbon b/toolchain/lower/testdata/array/assign_return_value.carbon index 3dc11e16a28c..80fcf6386d5f 100644 --- a/toolchain/lower/testdata/array/assign_return_value.carbon +++ b/toolchain/lower/testdata/array/assign_return_value.carbon @@ -23,83 +23,81 @@ fn Run() { // CHECK:STDOUT: @tuple.311.loc13_39 = internal constant { i32, i32 } { i32 12, i32 24 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !32 { +// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !30 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !35 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !35 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.311.loc13_39, i64 8, i1 false), !dbg !36 -// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !33 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.311.loc13_39, i64 8, i1 false), !dbg !34 +// CHECK:STDOUT: ret void, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !37 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [2 x i32], align 4, !dbg !38 -// CHECK:STDOUT: %.loc16_28.1.temp = alloca { i32, i32 }, align 4, !dbg !39 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !38 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc16_28.1.temp), !dbg !39 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_28.1.temp), !dbg !39 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc16_28.1.temp, i32 0, i32 0, !dbg !39 -// CHECK:STDOUT: %.loc16_28.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !39 -// CHECK:STDOUT: %.loc16_28.4.array.index = getelementptr inbounds [2 x i32], ptr %_.var, i32 0, i64 0, !dbg !39 -// CHECK:STDOUT: store i32 %.loc16_28.3, ptr %.loc16_28.4.array.index, align 4, !dbg !39 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc16_28.1.temp, i32 0, i32 1, !dbg !39 -// CHECK:STDOUT: %.loc16_28.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !39 -// CHECK:STDOUT: %.loc16_28.7.array.index = getelementptr inbounds [2 x i32], ptr %_.var, i32 0, i64 1, !dbg !39 -// CHECK:STDOUT: store i32 %.loc16_28.6, ptr %.loc16_28.7.array.index, align 4, !dbg !39 -// CHECK:STDOUT: call void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %.loc16_28.1.temp), !dbg !39 -// CHECK:STDOUT: call void @"_CSelfDestruct.641010f66e2ea46f:core.Destroy.Core"(ptr %_.var), !dbg !38 -// CHECK:STDOUT: ret i32 0, !dbg !41 +// CHECK:STDOUT: %_.var = alloca [2 x i32], align 4, !dbg !36 +// CHECK:STDOUT: %.loc16_28.1.temp = alloca { i32, i32 }, align 4, !dbg !37 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !36 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc16_28.1.temp), !dbg !37 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_28.1.temp), !dbg !37 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc16_28.1.temp, i32 0, i32 0, !dbg !37 +// CHECK:STDOUT: %.loc16_28.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !37 +// CHECK:STDOUT: %.loc16_28.4.array.index = getelementptr inbounds [2 x i32], ptr %_.var, i32 0, i64 0, !dbg !37 +// CHECK:STDOUT: store i32 %.loc16_28.3, ptr %.loc16_28.4.array.index, align 4, !dbg !37 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc16_28.1.temp, i32 0, i32 1, !dbg !37 +// CHECK:STDOUT: %.loc16_28.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !37 +// CHECK:STDOUT: %.loc16_28.7.array.index = getelementptr inbounds [2 x i32], ptr %_.var, i32 0, i64 1, !dbg !37 +// CHECK:STDOUT: store i32 %.loc16_28.6, ptr %.loc16_28.7.array.index, align 4, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %.loc16_28.1.temp), !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f2cee5f6b4c30a4(ptr %_.var), !dbg !36 +// CHECK:STDOUT: ret i32 0, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !42 { +// CHECK:STDOUT: define weak_odr void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !44 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !42 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !42 +// CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: define weak_odr void @"_COp.641010f66e2ea46f:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !48 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !48 +// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 1, !dbg !48 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_3.1.array.index), !dbg !48 +// CHECK:STDOUT: %.loc16_3.4.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 0, !dbg !48 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_3.4.array.index), !dbg !48 // CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !50 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.35f6012581c5aabb: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 @"_CSubobjectDestroy.641010f66e2ea46f:core.Destroy.Core"(ptr %self) #0 !dbg !54 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 1, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !56 -// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 0, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !56 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.641010f66e2ea46f:core.Destroy.Core"(ptr %self) #0 !dbg !58 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.641010f66e2ea46f: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.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // 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 @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %t) #0 !dbg !50 { +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %t), !dbg !54 +// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f2cee5f6b4c30a4(ptr %t) #0 !dbg !57 { +// CHECK:STDOUT: call void @"_COp.641010f66e2ea46f:core.SubobjectDestroy.Core"(ptr %t), !dbg !61 +// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !64 { +// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -109,6 +107,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !14 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIFile(filename: "assign_return_value.carbon", directory: "") // CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -117,35 +116,37 @@ fn Run() { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{!22} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !22} +// CHECK:STDOUT: !28 = !{null, !23} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = !{null, !23} -// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !20, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !21) -// CHECK:STDOUT: !35 = !DILocation(line: 13, column: 31, scope: !32) -// CHECK:STDOUT: !36 = !DILocation(line: 13, column: 24, scope: !32) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !20, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !21) -// CHECK:STDOUT: !38 = !DILocation(line: 16, column: 3, scope: !37) -// CHECK:STDOUT: !39 = !DILocation(line: 16, column: 26, scope: !37) -// CHECK:STDOUT: !41 = !DILocation(line: 15, column: 1, scope: !37) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !20, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !45) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !22) -// CHECK:STDOUT: !44 = !DILocation(line: 16, column: 26, scope: !42) -// CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !49) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !20, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !33 = !DILocation(line: 13, column: 31, scope: !30) +// CHECK:STDOUT: !34 = !DILocation(line: 13, column: 24, scope: !30) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !20, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 3, scope: !35) +// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 26, scope: !35) +// CHECK:STDOUT: !39 = !DILocation(line: 15, column: 1, scope: !35) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp.35f6012581c5aabb:core.SubobjectDestroy.Core", scope: null, file: !20, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !45) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !23) +// CHECK:STDOUT: !42 = !DILocation(line: 16, column: 26, scope: !40) +// CHECK:STDOUT: !43 = !{null, !22} +// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) +// CHECK:STDOUT: !45 = !{!41} +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Op", linkageName: "_COp.641010f66e2ea46f:core.SubobjectDestroy.Core", scope: null, file: !20, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !49) // CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !23) -// CHECK:STDOUT: !48 = !DILocation(line: 16, column: 26, scope: !46) +// CHECK:STDOUT: !48 = !DILocation(line: 16, column: 3, scope: !46) // CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !53) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ffbc82e0019b7bf2", scope: null, file: !14, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !56) // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !23) -// CHECK:STDOUT: !52 = !DILocation(line: 16, column: 26, scope: !50) -// CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.641010f66e2ea46f:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !23) -// CHECK:STDOUT: !56 = !DILocation(line: 16, column: 3, scope: !54) -// CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.641010f66e2ea46f:core.Destroy.Core", scope: null, file: !20, line: 16, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !61) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !23) -// CHECK:STDOUT: !60 = !DILocation(line: 16, column: 3, scope: !58) -// CHECK:STDOUT: !61 = !{!59} +// CHECK:STDOUT: !54 = !DILocation(line: 34, column: 5, scope: !50) +// CHECK:STDOUT: !55 = !DILocation(line: 32, column: 1, scope: !50) +// CHECK:STDOUT: !56 = !{!51} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f2cee5f6b4c30a4", scope: null, file: !14, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !63) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !23) +// CHECK:STDOUT: !61 = !DILocation(line: 34, column: 5, scope: !57) +// CHECK:STDOUT: !62 = !DILocation(line: 32, column: 1, scope: !57) +// CHECK:STDOUT: !63 = !{!58} +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !14, line: 32, type: !44, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !70) +// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !22) +// CHECK:STDOUT: !69 = !DILocation(line: 32, column: 1, scope: !64) +// CHECK:STDOUT: !70 = !{!65} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/base.carbon b/toolchain/lower/testdata/array/base.carbon index 7962fe14261e..4f7fac4cd203 100644 --- a/toolchain/lower/testdata/array/base.carbon +++ b/toolchain/lower/testdata/array/base.carbon @@ -22,179 +22,174 @@ fn Run() { // CHECK:STDOUT: ; ModuleID = 'base.carbon' // CHECK:STDOUT: source_filename = "base.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @array.7dc.loc14_3 = internal constant [1 x i32] [i32 1] -// CHECK:STDOUT: @array.38b.loc15_3 = internal constant [2 x double] [double 1.110000e+01, double 2.200000e+00] -// CHECK:STDOUT: @array.29b.loc16_3 = internal constant [5 x {}] zeroinitializer -// CHECK:STDOUT: @tuple.80e.loc17_3 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } +// CHECK:STDOUT: @array.7dc.loc14_3.1 = internal constant [1 x i32] [i32 1] +// CHECK:STDOUT: @array.38b.loc15_3.1 = internal constant [2 x double] [double 1.110000e+01, double 2.200000e+00] +// CHECK:STDOUT: @array.29b.loc16_3.1 = internal constant [5 x {}] zeroinitializer +// CHECK:STDOUT: @tuple.80e.loc17_3.1 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !44 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var.loc14 = alloca [1 x i32], align 4, !dbg !45 -// CHECK:STDOUT: %_.var.loc15 = alloca [2 x double], align 8, !dbg !48 -// CHECK:STDOUT: %_.var.loc16 = alloca [5 x {}], align 1, !dbg !51 -// CHECK:STDOUT: %d.var = alloca { i32, i32, i32 }, align 4, !dbg !54 -// CHECK:STDOUT: %_.var.loc18 = alloca [3 x i32], align 4, !dbg !57 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc14), !dbg !45 -// CHECK:STDOUT: %.loc14_29.3.array.index = getelementptr inbounds [1 x i32], ptr %_.var.loc14, i32 0, i64 0, !dbg !46 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %_.var.loc14, ptr align 4 @array.7dc.loc14_3, i64 4, i1 false), !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !48 -// CHECK:STDOUT: %.loc15_37.3.array.index = getelementptr inbounds [2 x double], ptr %_.var.loc15, i32 0, i64 0, !dbg !49 -// CHECK:STDOUT: %.loc15_37.6.array.index = getelementptr inbounds [2 x double], ptr %_.var.loc15, i32 0, i64 1, !dbg !49 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc15, ptr align 8 @array.38b.loc15_3, i64 16, i1 false), !dbg !48 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !51 -// CHECK:STDOUT: %.loc16_45.2.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 0, !dbg !52 -// CHECK:STDOUT: %.loc16_45.5.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 1, !dbg !52 -// CHECK:STDOUT: %.loc16_45.8.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 2, !dbg !52 -// CHECK:STDOUT: %.loc16_45.11.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 3, !dbg !52 -// CHECK:STDOUT: %.loc16_45.14.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 4, !dbg !52 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc16, ptr align 1 @array.29b.loc16_3, i64 0, i1 false), !dbg !51 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !54 -// CHECK:STDOUT: %tuple.elem0.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !55 -// CHECK:STDOUT: %tuple.elem1.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !55 -// CHECK:STDOUT: %tuple.elem2.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !55 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %d.var, ptr align 4 @tuple.80e.loc17_3, i64 12, i1 false), !dbg !54 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18), !dbg !57 -// CHECK:STDOUT: %tuple.elem0.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !58 -// CHECK:STDOUT: %.loc18_26.1 = load i32, ptr %tuple.elem0.loc18.tuple.elem, align 4, !dbg !58 -// CHECK:STDOUT: %.loc18_26.2.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 0, !dbg !58 -// CHECK:STDOUT: store i32 %.loc18_26.1, ptr %.loc18_26.2.array.index, align 4, !dbg !58 -// CHECK:STDOUT: %tuple.elem1.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !58 -// CHECK:STDOUT: %.loc18_26.4 = load i32, ptr %tuple.elem1.loc18.tuple.elem, align 4, !dbg !58 -// CHECK:STDOUT: %.loc18_26.5.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 1, !dbg !58 -// CHECK:STDOUT: store i32 %.loc18_26.4, ptr %.loc18_26.5.array.index, align 4, !dbg !58 -// CHECK:STDOUT: %tuple.elem2.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !58 -// CHECK:STDOUT: %.loc18_26.7 = load i32, ptr %tuple.elem2.loc18.tuple.elem, align 4, !dbg !58 -// CHECK:STDOUT: %.loc18_26.8.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 2, !dbg !58 -// CHECK:STDOUT: store i32 %.loc18_26.7, ptr %.loc18_26.8.array.index, align 4, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.95c1f38708147abd:core.Destroy.Core"(ptr %_.var.loc18), !dbg !57 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %d.var), !dbg !54 -// CHECK:STDOUT: call void @"_CSelfDestruct.9cad215553ee7c70:core.Destroy.Core"(ptr %_.var.loc16), !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.7554b27c5eb591f2:core.Destroy.Core"(ptr %_.var.loc15), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.00c89ff9538689ad:core.Destroy.Core"(ptr %_.var.loc14), !dbg !45 -// CHECK:STDOUT: ret i32 0, !dbg !60 +// CHECK:STDOUT: %_.var.loc14 = alloca [1 x i32], align 4, !dbg !43 +// CHECK:STDOUT: %_.var.loc15 = alloca [2 x double], align 8, !dbg !46 +// CHECK:STDOUT: %_.var.loc16 = alloca [5 x {}], align 1, !dbg !49 +// CHECK:STDOUT: %d.var = alloca { i32, i32, i32 }, align 4, !dbg !52 +// CHECK:STDOUT: %_.var.loc18 = alloca [3 x i32], align 4, !dbg !55 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc14), !dbg !43 +// CHECK:STDOUT: %.loc14_29.3.array.index = getelementptr inbounds [1 x i32], ptr %_.var.loc14, i32 0, i64 0, !dbg !44 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %_.var.loc14, ptr align 4 @array.7dc.loc14_3.1, i64 4, i1 false), !dbg !43 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !46 +// CHECK:STDOUT: %.loc15_37.3.array.index = getelementptr inbounds [2 x double], ptr %_.var.loc15, i32 0, i64 0, !dbg !47 +// CHECK:STDOUT: %.loc15_37.6.array.index = getelementptr inbounds [2 x double], ptr %_.var.loc15, i32 0, i64 1, !dbg !47 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc15, ptr align 8 @array.38b.loc15_3.1, i64 16, i1 false), !dbg !46 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !49 +// CHECK:STDOUT: %.loc16_45.2.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 0, !dbg !50 +// CHECK:STDOUT: %.loc16_45.5.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 1, !dbg !50 +// CHECK:STDOUT: %.loc16_45.8.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 2, !dbg !50 +// CHECK:STDOUT: %.loc16_45.11.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 3, !dbg !50 +// CHECK:STDOUT: %.loc16_45.14.array.index = getelementptr inbounds [5 x {}], ptr %_.var.loc16, i32 0, i64 4, !dbg !50 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc16, ptr align 1 @array.29b.loc16_3.1, i64 0, i1 false), !dbg !49 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !52 +// CHECK:STDOUT: %tuple.elem0.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !53 +// CHECK:STDOUT: %tuple.elem1.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !53 +// CHECK:STDOUT: %tuple.elem2.loc17.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !53 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %d.var, ptr align 4 @tuple.80e.loc17_3.1, i64 12, i1 false), !dbg !52 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18), !dbg !55 +// CHECK:STDOUT: %tuple.elem0.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 0, !dbg !56 +// CHECK:STDOUT: %.loc18_26.1 = load i32, ptr %tuple.elem0.loc18.tuple.elem, align 4, !dbg !56 +// CHECK:STDOUT: %.loc18_26.2.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 0, !dbg !56 +// CHECK:STDOUT: store i32 %.loc18_26.1, ptr %.loc18_26.2.array.index, align 4, !dbg !56 +// CHECK:STDOUT: %tuple.elem1.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 1, !dbg !56 +// CHECK:STDOUT: %.loc18_26.4 = load i32, ptr %tuple.elem1.loc18.tuple.elem, align 4, !dbg !56 +// CHECK:STDOUT: %.loc18_26.5.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 1, !dbg !56 +// CHECK:STDOUT: store i32 %.loc18_26.4, ptr %.loc18_26.5.array.index, align 4, !dbg !56 +// CHECK:STDOUT: %tuple.elem2.loc18.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %d.var, i32 0, i32 2, !dbg !56 +// CHECK:STDOUT: %.loc18_26.7 = load i32, ptr %tuple.elem2.loc18.tuple.elem, align 4, !dbg !56 +// CHECK:STDOUT: %.loc18_26.8.array.index = getelementptr inbounds [3 x i32], ptr %_.var.loc18, i32 0, i64 2, !dbg !56 +// CHECK:STDOUT: store i32 %.loc18_26.7, ptr %.loc18_26.8.array.index, align 4, !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.3c9880f178514995(ptr %_.var.loc18), !dbg !55 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %d.var), !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8d76aaea513f4bc7(ptr %_.var.loc16), !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b95d622cb755bca7(ptr %_.var.loc15), !dbg !46 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.aec474ad387dc36a(ptr %_.var.loc14), !dbg !43 +// CHECK:STDOUT: ret i32 0, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !61 { +// CHECK:STDOUT: define weak_odr void @"_COp.95c1f38708147abd:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: %.loc18_3.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !61 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc18_3.1.array.index), !dbg !61 +// CHECK:STDOUT: %.loc18_3.4.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !61 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc18_3.4.array.index), !dbg !61 +// CHECK:STDOUT: %.loc18_3.7.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !61 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc18_3.7.array.index), !dbg !61 +// CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95c1f38708147abd:core.Destroy.Core"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_3.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !67 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_3.1.array.index), !dbg !67 -// CHECK:STDOUT: %.loc18_3.2.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !67 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_3.2.array.index), !dbg !67 -// CHECK:STDOUT: %.loc18_3.3.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !67 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_3.3.array.index), !dbg !67 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !67 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem2.tuple.elem), !dbg !67 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !67 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !67 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !67 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !67 // CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95c1f38708147abd:core.Destroy.Core"(ptr %self) #0 !dbg !69 { +// CHECK:STDOUT: define weak_odr void @"_COp.9cad215553ee7c70:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95c1f38708147abd:core.Destroy.Core"(ptr %self), !dbg !71 +// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 4, !dbg !71 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %.loc16_3.1.array.index), !dbg !71 +// CHECK:STDOUT: %.loc16_3.4.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 3, !dbg !71 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %.loc16_3.4.array.index), !dbg !71 +// CHECK:STDOUT: %.loc16_3.7.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 2, !dbg !71 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %.loc16_3.7.array.index), !dbg !71 +// CHECK:STDOUT: %.loc16_3.10.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 1, !dbg !71 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %.loc16_3.10.array.index), !dbg !71 +// CHECK:STDOUT: %.loc16_3.13.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 0, !dbg !71 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %.loc16_3.13.array.index), !dbg !71 // CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !73 { +// CHECK:STDOUT: define weak_odr void @"_COp.7554b27c5eb591f2:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !73 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !75 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !75 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !75 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !75 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !75 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !75 +// CHECK:STDOUT: %.loc15_3.1.array.index = getelementptr inbounds [2 x double], ptr %self, i32 0, i64 1, !dbg !75 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc15_3.1.array.index), !dbg !75 +// CHECK:STDOUT: %.loc15_3.4.array.index = getelementptr inbounds [2 x double], ptr %self, i32 0, i64 0, !dbg !75 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc15_3.4.array.index), !dbg !75 // CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !77 { +// CHECK:STDOUT: define weak_odr void @"_COp.00c89ff9538689ad:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !77 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self), !dbg !79 +// CHECK:STDOUT: %.loc14_3.1.array.index = getelementptr inbounds [1 x i32], ptr %self, i32 0, i64 0, !dbg !79 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc14_3.1.array.index), !dbg !79 // CHECK:STDOUT: ret void, !dbg !79 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1: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.9cad215553ee7c70:core.Destroy.Core"(ptr %self) #0 !dbg !85 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 4, !dbg !87 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !87 -// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 3, !dbg !87 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !87 -// CHECK:STDOUT: %.loc16_3.3.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 2, !dbg !87 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.3.array.index), !dbg !87 -// CHECK:STDOUT: %.loc16_3.4.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 1, !dbg !87 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.4.array.index), !dbg !87 -// CHECK:STDOUT: %.loc16_3.5.array.index = getelementptr inbounds [5 x {}], ptr %self, i32 0, i64 0, !dbg !87 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc16_3.5.array.index), !dbg !87 -// CHECK:STDOUT: ret void, !dbg !87 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9cad215553ee7c70:core.Destroy.Core"(ptr %self) #0 !dbg !89 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.9cad215553ee7c70: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.7619ac942aa9029a: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.7554b27c5eb591f2:core.Destroy.Core"(ptr %self) #0 !dbg !97 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_3.1.array.index = getelementptr inbounds [2 x double], ptr %self, i32 0, i64 1, !dbg !99 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc15_3.1.array.index), !dbg !99 -// CHECK:STDOUT: %.loc15_3.2.array.index = getelementptr inbounds [2 x double], ptr %self, i32 0, i64 0, !dbg !99 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc15_3.2.array.index), !dbg !99 -// CHECK:STDOUT: ret void, !dbg !99 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7554b27c5eb591f2:core.Destroy.Core"(ptr %self) #0 !dbg !101 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.7554b27c5eb591f2: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.00c89ff9538689ad:core.Destroy.Core"(ptr %self) #0 !dbg !105 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14.array.index = getelementptr inbounds [1 x i32], ptr %self, i32 0, i64 0, !dbg !107 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc14.array.index), !dbg !107 -// CHECK:STDOUT: ret void, !dbg !107 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.00c89ff9538689ad:core.Destroy.Core"(ptr %self) #0 !dbg !109 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.00c89ff9538689ad:core.Destroy.Core"(ptr %self), !dbg !111 -// CHECK:STDOUT: ret void, !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)) #1 // 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 @_CSelfDestruct.Core.3c9880f178514995(ptr %t) #0 !dbg !81 { +// CHECK:STDOUT: call void @"_COp.95c1f38708147abd:core.SubobjectDestroy.Core"(ptr %t), !dbg !85 +// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %t) #0 !dbg !88 { +// CHECK:STDOUT: call void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %t), !dbg !92 +// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8d76aaea513f4bc7(ptr %t) #0 !dbg !95 { +// CHECK:STDOUT: call void @"_COp.9cad215553ee7c70:core.SubobjectDestroy.Core"(ptr %t), !dbg !99 +// CHECK:STDOUT: ret void, !dbg !100 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b95d622cb755bca7(ptr %t) #0 !dbg !102 { +// CHECK:STDOUT: call void @"_COp.7554b27c5eb591f2:core.SubobjectDestroy.Core"(ptr %t), !dbg !106 +// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.aec474ad387dc36a(ptr %t) #0 !dbg !109 { +// CHECK:STDOUT: call void @"_COp.00c89ff9538689ad:core.SubobjectDestroy.Core"(ptr %t), !dbg !113 +// CHECK:STDOUT: ret void, !dbg !114 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !116 { +// CHECK:STDOUT: ret void, !dbg !121 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %t) #0 !dbg !123 { +// CHECK:STDOUT: ret void, !dbg !128 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !130 { +// CHECK:STDOUT: ret void, !dbg !135 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 4, 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9045abb8230cbcdf, { 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.2b38c2ca9f7f1a94, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -204,78 +199,84 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "base.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !37 = !{!36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !{null, !36} -// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !42 = !{null, !41} -// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !34, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !45 = !DILocation(line: 14, column: 3, scope: !44) -// CHECK:STDOUT: !46 = !DILocation(line: 14, column: 26, scope: !44) -// CHECK:STDOUT: !48 = !DILocation(line: 15, column: 3, scope: !44) -// CHECK:STDOUT: !49 = !DILocation(line: 15, column: 26, scope: !44) -// CHECK:STDOUT: !51 = !DILocation(line: 16, column: 3, scope: !44) -// CHECK:STDOUT: !52 = !DILocation(line: 16, column: 25, scope: !44) -// CHECK:STDOUT: !54 = !DILocation(line: 17, column: 3, scope: !44) -// CHECK:STDOUT: !55 = !DILocation(line: 17, column: 28, scope: !44) -// CHECK:STDOUT: !57 = !DILocation(line: 18, column: 3, scope: !44) -// CHECK:STDOUT: !58 = !DILocation(line: 18, column: 26, scope: !44) -// CHECK:STDOUT: !60 = !DILocation(line: 13, column: 1, scope: !44) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !34, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !36) -// CHECK:STDOUT: !63 = !DILocation(line: 18, column: 3, scope: !61) -// CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95c1f38708147abd:core.Destroy.Core", scope: null, file: !34, line: 18, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !68) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !41) -// CHECK:STDOUT: !67 = !DILocation(line: 18, column: 3, scope: !65) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{null, !39} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !34, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !43 = !DILocation(line: 14, column: 3, scope: !42) +// CHECK:STDOUT: !44 = !DILocation(line: 14, column: 26, scope: !42) +// CHECK:STDOUT: !46 = !DILocation(line: 15, column: 3, scope: !42) +// CHECK:STDOUT: !47 = !DILocation(line: 15, column: 26, scope: !42) +// CHECK:STDOUT: !49 = !DILocation(line: 16, column: 3, scope: !42) +// CHECK:STDOUT: !50 = !DILocation(line: 16, column: 25, scope: !42) +// CHECK:STDOUT: !52 = !DILocation(line: 17, column: 3, scope: !42) +// CHECK:STDOUT: !53 = !DILocation(line: 17, column: 28, scope: !42) +// CHECK:STDOUT: !55 = !DILocation(line: 18, column: 3, scope: !42) +// CHECK:STDOUT: !56 = !DILocation(line: 18, column: 26, scope: !42) +// CHECK:STDOUT: !58 = !DILocation(line: 13, column: 1, scope: !42) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95c1f38708147abd:core.SubobjectDestroy.Core", scope: null, file: !34, line: 18, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !64) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !39) +// CHECK:STDOUT: !61 = !DILocation(line: 18, column: 3, scope: !59) +// CHECK:STDOUT: !62 = !{null, !36} +// CHECK:STDOUT: !63 = !DISubroutineType(types: !62) +// CHECK:STDOUT: !64 = !{!60} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.abce894028f59bc0:core.SubobjectDestroy.Core", scope: null, file: !34, line: 17, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !68) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !39) +// CHECK:STDOUT: !67 = !DILocation(line: 17, column: 3, scope: !65) // CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95c1f38708147abd:core.Destroy.Core", scope: null, file: !34, line: 18, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !72) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !41) -// CHECK:STDOUT: !71 = !DILocation(line: 18, column: 3, scope: !69) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "Op", linkageName: "_COp.9cad215553ee7c70:core.SubobjectDestroy.Core", scope: null, file: !34, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !72) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !39) +// CHECK:STDOUT: !71 = !DILocation(line: 16, column: 3, scope: !69) // CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core", scope: null, file: !34, line: 17, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !76) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !41) -// CHECK:STDOUT: !75 = !DILocation(line: 17, column: 3, scope: !73) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7554b27c5eb591f2:core.SubobjectDestroy.Core", scope: null, file: !34, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !76) +// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !39) +// CHECK:STDOUT: !75 = !DILocation(line: 15, column: 3, scope: !73) // CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.abce894028f59bc0:core.Destroy.Core", scope: null, file: !34, line: 17, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !80) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !41) -// CHECK:STDOUT: !79 = !DILocation(line: 17, column: 3, scope: !77) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "Op", linkageName: "_COp.00c89ff9538689ad:core.SubobjectDestroy.Core", scope: null, file: !34, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !80) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !39) +// CHECK:STDOUT: !79 = !DILocation(line: 14, column: 3, scope: !77) // CHECK:STDOUT: !80 = !{!78} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !34, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !84) -// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !41) -// CHECK:STDOUT: !83 = !DILocation(line: 16, column: 3, scope: !81) -// CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9cad215553ee7c70:core.Destroy.Core", scope: null, file: !34, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !88) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !41) -// CHECK:STDOUT: !87 = !DILocation(line: 16, column: 3, scope: !85) -// CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9cad215553ee7c70:core.Destroy.Core", scope: null, file: !34, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !92) -// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !41) -// CHECK:STDOUT: !91 = !DILocation(line: 16, column: 3, scope: !89) -// CHECK:STDOUT: !92 = !{!90} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !34, line: 15, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !96) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !41) -// CHECK:STDOUT: !95 = !DILocation(line: 15, column: 3, scope: !93) -// CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.7554b27c5eb591f2:core.Destroy.Core", scope: null, file: !34, line: 15, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !100) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !41) -// CHECK:STDOUT: !99 = !DILocation(line: 15, column: 3, scope: !97) -// CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7554b27c5eb591f2:core.Destroy.Core", scope: null, file: !34, line: 15, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !104) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !41) -// CHECK:STDOUT: !103 = !DILocation(line: 15, column: 3, scope: !101) -// CHECK:STDOUT: !104 = !{!102} -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.00c89ff9538689ad:core.Destroy.Core", scope: null, file: !34, line: 14, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !108) -// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !41) -// CHECK:STDOUT: !107 = !DILocation(line: 14, column: 3, scope: !105) -// CHECK:STDOUT: !108 = !{!106} -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.00c89ff9538689ad:core.Destroy.Core", scope: null, file: !34, line: 14, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !112) -// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !41) -// CHECK:STDOUT: !111 = !DILocation(line: 14, column: 3, scope: !109) -// CHECK:STDOUT: !112 = !{!110} +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.3c9880f178514995", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !87) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !39) +// CHECK:STDOUT: !85 = !DILocation(line: 34, column: 5, scope: !81) +// CHECK:STDOUT: !86 = !DILocation(line: 32, column: 1, scope: !81) +// CHECK:STDOUT: !87 = !{!82} +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6e65c86a129b7677", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !94) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !39) +// CHECK:STDOUT: !92 = !DILocation(line: 34, column: 5, scope: !88) +// CHECK:STDOUT: !93 = !DILocation(line: 32, column: 1, scope: !88) +// CHECK:STDOUT: !94 = !{!89} +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8d76aaea513f4bc7", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !101) +// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !39) +// CHECK:STDOUT: !99 = !DILocation(line: 34, column: 5, scope: !95) +// CHECK:STDOUT: !100 = !DILocation(line: 32, column: 1, scope: !95) +// CHECK:STDOUT: !101 = !{!96} +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b95d622cb755bca7", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !108) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !39) +// CHECK:STDOUT: !106 = !DILocation(line: 34, column: 5, scope: !102) +// CHECK:STDOUT: !107 = !DILocation(line: 32, column: 1, scope: !102) +// CHECK:STDOUT: !108 = !{!103} +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.aec474ad387dc36a", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !115) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !39) +// CHECK:STDOUT: !113 = !DILocation(line: 34, column: 5, scope: !109) +// CHECK:STDOUT: !114 = !DILocation(line: 32, column: 1, scope: !109) +// CHECK:STDOUT: !115 = !{!110} +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 32, type: !63, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !122) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !36) +// CHECK:STDOUT: !121 = !DILocation(line: 32, column: 1, scope: !116) +// CHECK:STDOUT: !122 = !{!117} +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9045abb8230cbcdf", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !129) +// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !39) +// CHECK:STDOUT: !128 = !DILocation(line: 32, column: 1, scope: !123) +// CHECK:STDOUT: !129 = !{!124} +// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !136) +// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !39) +// CHECK:STDOUT: !135 = !DILocation(line: 32, column: 1, scope: !130) +// CHECK:STDOUT: !136 = !{!131} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/function_param.carbon b/toolchain/lower/testdata/array/function_param.carbon index 7c8a863601ad..877c21031d23 100644 --- a/toolchain/lower/testdata/array/function_param.carbon +++ b/toolchain/lower/testdata/array/function_param.carbon @@ -26,54 +26,55 @@ fn G() -> i32 { // CHECK:STDOUT: @array.loc18_20.15 = internal constant [3 x i32] [i32 1, i32 2, i32 3] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF.Main(ptr %arr, i32 %i) #0 !dbg !32 { +// CHECK:STDOUT: define i32 @_CF.Main(ptr %arr, i32 %i) #0 !dbg !30 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14_15.2.array.index = getelementptr inbounds [3 x i32], ptr %arr, i32 0, i32 %i, !dbg !39 -// CHECK:STDOUT: %.loc14_15.3 = load i32, ptr %.loc14_15.2.array.index, align 4, !dbg !39 -// CHECK:STDOUT: ret i32 %.loc14_15.3, !dbg !41 +// CHECK:STDOUT: %.loc14_15.2.array.index = getelementptr inbounds [3 x i32], ptr %arr, i32 0, i32 %i, !dbg !37 +// CHECK:STDOUT: %.loc14_15.3 = load i32, ptr %.loc14_15.2.array.index, align 4, !dbg !37 +// CHECK:STDOUT: ret i32 %.loc14_15.3, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CG.Main() #0 !dbg !43 { +// CHECK:STDOUT: define i32 @_CG.Main() #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_20.3.temp = alloca [3 x i32], align 4, !dbg !46 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_20.3.temp), !dbg !46 -// CHECK:STDOUT: %.loc18_20.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 0, !dbg !46 -// CHECK:STDOUT: %.loc18_20.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 1, !dbg !46 -// CHECK:STDOUT: %.loc18_20.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 2, !dbg !46 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr @array.loc18_20.15, i32 1), !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.95c1f38708147abd:core.Destroy.Core"(ptr @array), !dbg !46 -// CHECK:STDOUT: ret i32 %F.call, !dbg !48 +// CHECK:STDOUT: %.loc18_20.3.temp = alloca [3 x i32], align 4, !dbg !44 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_20.3.temp), !dbg !44 +// CHECK:STDOUT: %.loc18_20.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 0, !dbg !44 +// CHECK:STDOUT: %.loc18_20.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 1, !dbg !44 +// CHECK:STDOUT: %.loc18_20.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 2, !dbg !44 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr @array.loc18_20.15, i32 1), !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.3c9880f178514995(ptr @array), !dbg !44 +// CHECK:STDOUT: ret i32 %F.call, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_COp.95c1f38708147abd:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !51 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95c1f38708147abd:core.Destroy.Core"(ptr %self) #0 !dbg !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_20.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_20.1.array.index), !dbg !55 -// CHECK:STDOUT: %.loc18_20.2.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_20.2.array.index), !dbg !55 -// CHECK:STDOUT: %.loc18_20.3.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_20.3.array.index), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !55 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95c1f38708147abd:core.Destroy.Core"(ptr %self) #0 !dbg !57 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95c1f38708147abd:core.Destroy.Core"(ptr %self), !dbg !59 -// CHECK:STDOUT: ret void, !dbg !59 +// CHECK:STDOUT: %.loc18_20.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc18_20.1.array.index), !dbg !49 +// CHECK:STDOUT: %.loc18_20.4.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc18_20.4.array.index), !dbg !49 +// CHECK:STDOUT: %.loc18_20.7.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc18_20.7.array.index), !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: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.3c9880f178514995(ptr %t) #0 !dbg !53 { +// CHECK:STDOUT: call void @"_COp.95c1f38708147abd:core.SubobjectDestroy.Core"(ptr %t), !dbg !57 +// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !60 { +// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -82,6 +83,7 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !14 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIFile(filename: "function_param.carbon", directory: "") // CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -90,30 +92,31 @@ fn G() -> i32 { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{!22} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !22} +// CHECK:STDOUT: !28 = !{null, !23} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = !{null, !23} -// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !20, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !42) -// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !23) -// CHECK:STDOUT: !34 = !DILocalVariable(arg: 2, scope: !32, type: !22) -// CHECK:STDOUT: !39 = !DILocation(line: 14, column: 10, scope: !32) -// CHECK:STDOUT: !41 = !DILocation(line: 14, column: 3, scope: !32) -// CHECK:STDOUT: !42 = !{!33, !34} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !20, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !21) -// CHECK:STDOUT: !46 = !DILocation(line: 18, column: 12, scope: !43) -// CHECK:STDOUT: !47 = !DILocation(line: 18, column: 10, scope: !43) -// CHECK:STDOUT: !48 = !DILocation(line: 18, column: 3, scope: !43) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !20, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !52) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !22) -// CHECK:STDOUT: !51 = !DILocation(line: 18, column: 12, scope: !49) -// CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95c1f38708147abd:core.Destroy.Core", scope: null, file: !20, line: 18, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !56) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !20, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !40) +// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !23) +// CHECK:STDOUT: !32 = !DILocalVariable(arg: 2, scope: !30, type: !22) +// CHECK:STDOUT: !37 = !DILocation(line: 14, column: 10, scope: !30) +// CHECK:STDOUT: !39 = !DILocation(line: 14, column: 3, scope: !30) +// CHECK:STDOUT: !40 = !{!31, !32} +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !20, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !44 = !DILocation(line: 18, column: 12, scope: !41) +// CHECK:STDOUT: !45 = !DILocation(line: 18, column: 10, scope: !41) +// CHECK:STDOUT: !46 = !DILocation(line: 18, column: 3, scope: !41) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95c1f38708147abd:core.SubobjectDestroy.Core", scope: null, file: !20, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !52) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !23) +// CHECK:STDOUT: !49 = !DILocation(line: 18, column: 12, scope: !47) +// CHECK:STDOUT: !50 = !{null, !22} +// CHECK:STDOUT: !51 = !DISubroutineType(types: !50) +// CHECK:STDOUT: !52 = !{!48} +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.3c9880f178514995", scope: null, file: !14, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !59) // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !23) -// CHECK:STDOUT: !55 = !DILocation(line: 18, column: 12, scope: !53) -// CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95c1f38708147abd:core.Destroy.Core", scope: null, file: !20, line: 18, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !23) -// CHECK:STDOUT: !59 = !DILocation(line: 18, column: 12, scope: !57) -// CHECK:STDOUT: !60 = !{!58} +// CHECK:STDOUT: !57 = !DILocation(line: 34, column: 5, scope: !53) +// CHECK:STDOUT: !58 = !DILocation(line: 32, column: 1, scope: !53) +// CHECK:STDOUT: !59 = !{!54} +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !14, line: 32, type: !51, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !66) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !22) +// CHECK:STDOUT: !65 = !DILocation(line: 32, column: 1, scope: !60) +// CHECK:STDOUT: !66 = !{!61} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/iterate.carbon b/toolchain/lower/testdata/array/iterate.carbon index 9a8f85e752d6..97c2e9655c7d 100644 --- a/toolchain/lower/testdata/array/iterate.carbon +++ b/toolchain/lower/testdata/array/iterate.carbon @@ -41,234 +41,215 @@ fn F() { // CHECK:STDOUT: %.loc16_43.13.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 3, !dbg !15 // CHECK:STDOUT: %.loc16_43.16.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 4, !dbg !15 // CHECK:STDOUT: %.loc16_43.19.array.index = getelementptr inbounds [6 x i32], ptr %.loc16_43.3.temp, i32 0, i64 5, !dbg !15 -// CHECK:STDOUT: %Array.as.Iterate.impl.NewCursor.call = call i32 @"_CNewCursor.Array.e6a7e802f5bda6f1.Core:Iterate.Core.4f879c7c3bafed31"(ptr @array.loc16_43.24), !dbg !20 +// CHECK:STDOUT: %Array.as.Iterate.impl.NewCursor.call = call i32 @"_CNewCursor.Array.ef119564f44a13e5.Core:Iterate.Core.ea5855de090934bd"(ptr @array.loc16_43.24), !dbg !20 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var), !dbg !20 // CHECK:STDOUT: store i32 %Array.as.Iterate.impl.NewCursor.call, ptr %var, align 4, !dbg !20 // CHECK:STDOUT: br label %for.next, !dbg !20 // CHECK:STDOUT: // CHECK:STDOUT: for.next: ; preds = %for.body, %entry // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_19.5.temp), !dbg !20 -// CHECK:STDOUT: call void @"_CNext.Array.e6a7e802f5bda6f1.Core:Iterate.Core.4f879c7c3bafed31"(ptr %.loc17_19.5.temp, ptr @array.loc16_43.24, ptr %var), !dbg !20 -// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.ebd99c5786039774(ptr %.loc17_19.5.temp), !dbg !20 +// CHECK:STDOUT: call void @"_CNext.Array.ef119564f44a13e5.Core:Iterate.Core.ea5855de090934bd"(ptr %.loc17_19.5.temp, ptr @array.loc16_43.24, ptr %var), !dbg !20 +// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.29b2425ca9ad75a4(ptr %.loc17_19.5.temp), !dbg !20 // CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !20 // CHECK:STDOUT: // CHECK:STDOUT: for.body: ; preds = %for.next -// CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.ebd99c5786039774(ptr %.loc17_19.5.temp), !dbg !20 +// CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.29b2425ca9ad75a4(ptr %.loc17_19.5.temp), !dbg !20 // CHECK:STDOUT: call void @_CG.Main(i32 %Optional.Get.call), !dbg !28 -// CHECK:STDOUT: call void @"_CSelfDestruct.bf93366da8df6472:core.Destroy.Core"(ptr %.loc17_19.5.temp), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %.loc17_19.5.temp), !dbg !20 // CHECK:STDOUT: br label %for.next, !dbg !29 // CHECK:STDOUT: // CHECK:STDOUT: for.done: ; preds = %for.next -// CHECK:STDOUT: call void @"_CSelfDestruct.bf93366da8df6472:core.Destroy.Core"(ptr %.loc17_19.5.temp), !dbg !20 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %var), !dbg !20 -// CHECK:STDOUT: call void @"_CSelfDestruct.85d5d6325bc2f620:core.Destroy.Core"(ptr @array), !dbg !15 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %.loc17_19.5.temp), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %var), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bcf9aa71b59dc36e(ptr @array), !dbg !15 // CHECK:STDOUT: ret void, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr) -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self) #0 !dbg !31 { +// CHECK:STDOUT: define weak_odr void @"_COp.b3126fe3b97d1b85:core.SubobjectDestroy.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.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self) #0 !dbg !35 { +// CHECK:STDOUT: define weak_odr void @"_COp.6f1424a1f3fc4182:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self), !dbg !37 +// CHECK:STDOUT: %.loc17_19.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc17_19.1.has_value), !dbg !37 +// CHECK:STDOUT: %.loc17_19.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.38552a897eb918eb(ptr %.loc17_19.4.value), !dbg !37 // CHECK:STDOUT: ret void, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %self) #0 !dbg !39 { +// CHECK:STDOUT: define weak_odr void @"_COp.e60156a973847ad6:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !39 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc17_19.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc17_19.1.has_value), !dbg !41 +// CHECK:STDOUT: %.loc17_19.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.38552a897eb918eb(ptr %.loc17_19.4.value), !dbg !41 // CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: define weak_odr void @"_COp.85d5d6325bc2f620:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !43 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc16_43.1.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 5, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc16_43.1.array.index), !dbg !45 +// CHECK:STDOUT: %.loc16_43.4.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 4, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc16_43.4.array.index), !dbg !45 +// CHECK:STDOUT: %.loc16_43.7.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 3, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc16_43.7.array.index), !dbg !45 +// CHECK:STDOUT: %.loc16_43.10.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 2, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc16_43.10.array.index), !dbg !45 +// CHECK:STDOUT: %.loc16_43.13.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 1, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc16_43.13.array.index), !dbg !45 +// CHECK:STDOUT: %.loc16_43.16.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 0, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc16_43.16.array.index), !dbg !45 // CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2e0c223a4e2f3d14:core.Destroy.Core"(ptr %self) #0 !dbg !47 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_19.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !49 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc17_19.1.has_value), !dbg !49 -// CHECK:STDOUT: %.loc17_19.2.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !49 -// CHECK:STDOUT: call void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %.loc17_19.2.value), !dbg !49 -// CHECK:STDOUT: ret void, !dbg !49 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2e0c223a4e2f3d14:core.Destroy.Core"(ptr %self) #0 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2e0c223a4e2f3d14: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 @"_CSubobjectDestroy.d2ff3a86a5bbb967:core.Destroy.Core"(ptr %self) #0 !dbg !55 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_19.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !57 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc17_19.1.has_value), !dbg !57 -// CHECK:STDOUT: %.loc17_19.2.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !57 -// CHECK:STDOUT: call void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %.loc17_19.2.value), !dbg !57 -// CHECK:STDOUT: ret void, !dbg !57 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d2ff3a86a5bbb967:core.Destroy.Core"(ptr %self) #0 !dbg !59 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d2ff3a86a5bbb967: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.bf93366da8df6472: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.85d5d6325bc2f620:core.Destroy.Core"(ptr %self) #0 !dbg !67 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_43.1.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 5, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_43.1.array.index), !dbg !69 -// CHECK:STDOUT: %.loc16_43.2.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 4, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_43.2.array.index), !dbg !69 -// CHECK:STDOUT: %.loc16_43.3.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 3, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_43.3.array.index), !dbg !69 -// CHECK:STDOUT: %.loc16_43.4.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 2, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_43.4.array.index), !dbg !69 -// CHECK:STDOUT: %.loc16_43.5.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 1, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_43.5.array.index), !dbg !69 -// CHECK:STDOUT: %.loc16_43.6.array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i64 0, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_43.6.array.index), !dbg !69 -// CHECK:STDOUT: ret void, !dbg !69 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.85d5d6325bc2f620:core.Destroy.Core"(ptr %self) #0 !dbg !71 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.85d5d6325bc2f620:core.Destroy.Core"(ptr %self), !dbg !73 -// CHECK:STDOUT: ret void, !dbg !73 -// 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.Array.e6a7e802f5bda6f1.Core:Iterate.Core.4f879c7c3bafed31"(ptr %self) #0 !dbg !76 { -// CHECK:STDOUT: ret i32 0, !dbg !81 +// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.Array.ef119564f44a13e5.Core:Iterate.Core.ea5855de090934bd"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: ret i32 0, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNext.Array.e6a7e802f5bda6f1.Core:Iterate.Core.4f879c7c3bafed31"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !83 { -// CHECK:STDOUT: %1 = load i32, ptr %cursor, align 4, !dbg !90 -// CHECK:STDOUT: %2 = icmp slt i32 %1, 6, !dbg !90 -// CHECK:STDOUT: br i1 %2, label %3, label %7, !dbg !91 +// CHECK:STDOUT: define linkonce_odr void @"_CNext.Array.ef119564f44a13e5.Core:Iterate.Core.ea5855de090934bd"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !55 { +// CHECK:STDOUT: %1 = load i32, ptr %cursor, align 4, !dbg !62 +// CHECK:STDOUT: %2 = icmp slt i32 %1, 6, !dbg !62 +// CHECK:STDOUT: br i1 %2, label %3, label %7, !dbg !63 // CHECK:STDOUT: // CHECK:STDOUT: 3: ; preds = %0 -// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !93 -// CHECK:STDOUT: %4 = load i32, ptr %cursor, align 4, !dbg !95 -// CHECK:STDOUT: %5 = sub i32 %4, 1, !dbg !95 -// CHECK:STDOUT: %array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i32 %5, !dbg !94 -// CHECK:STDOUT: %6 = load i32, ptr %array.index, align 4, !dbg !94 -// CHECK:STDOUT: call void @_CSome.Optional.Core.ebd99c5786039774(ptr %return, i32 %6), !dbg !96 -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !65 +// CHECK:STDOUT: %4 = load i32, ptr %cursor, align 4, !dbg !67 +// CHECK:STDOUT: %5 = sub i32 %4, 1, !dbg !67 +// CHECK:STDOUT: %array.index = getelementptr inbounds [6 x i32], ptr %self, i32 0, i32 %5, !dbg !66 +// CHECK:STDOUT: %6 = load i32, ptr %array.index, align 4, !dbg !66 +// CHECK:STDOUT: call void @_CSome.Optional.Core.29b2425ca9ad75a4(ptr %return, i32 %6), !dbg !68 +// CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: // CHECK:STDOUT: 7: ; preds = %0 -// CHECK:STDOUT: call void @_CNone.Optional.Core.ebd99c5786039774(ptr %return), !dbg !100 -// CHECK:STDOUT: ret void, !dbg !103 +// CHECK:STDOUT: call void @_CNone.Optional.Core.29b2425ca9ad75a4(ptr %return), !dbg !72 +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.ebd99c5786039774(ptr %self) #0 !dbg !106 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %self), !dbg !112 -// CHECK:STDOUT: ret i1 %1, !dbg !113 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.29b2425ca9ad75a4(ptr %self) #0 !dbg !78 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %self), !dbg !84 +// CHECK:STDOUT: ret i1 %1, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.ebd99c5786039774(ptr %self) #0 !dbg !115 { -// CHECK:STDOUT: %1 = call i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %self), !dbg !121 -// CHECK:STDOUT: ret i32 %1, !dbg !122 +// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.29b2425ca9ad75a4(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: %1 = call i32 @"_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %self), !dbg !93 +// CHECK:STDOUT: ret i32 %1, !dbg !94 // 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 !125 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !128 -// CHECK:STDOUT: ret void, !dbg !131 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %t) #0 !dbg !97 { +// CHECK:STDOUT: ret void, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.ebd99c5786039774(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !133 { -// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %return, i32 %value), !dbg !138 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9a03059f269926ed(ptr %t) #0 !dbg !104 { +// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.bcf9aa71b59dc36e(ptr %t) #0 !dbg !111 { +// CHECK:STDOUT: call void @"_COp.85d5d6325bc2f620:core.SubobjectDestroy.Core"(ptr %t), !dbg !115 +// CHECK:STDOUT: ret void, !dbg !116 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %t) #0 !dbg !118 { +// CHECK:STDOUT: ret void, !dbg !123 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.38552a897eb918eb(ptr %t) #0 !dbg !125 { +// CHECK:STDOUT: ret void, !dbg !130 +// 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 !133 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !136 // CHECK:STDOUT: ret void, !dbg !139 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.ebd99c5786039774(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !141 { -// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %return), !dbg !144 -// CHECK:STDOUT: ret void, !dbg !145 +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.29b2425ca9ad75a4(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !141 { +// CHECK:STDOUT: call void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %return, i32 %value), !dbg !146 +// CHECK:STDOUT: ret void, !dbg !147 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %value) #0 !dbg !146 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !151 -// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !151 -// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !151 -// CHECK:STDOUT: ret i1 %2, !dbg !152 +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.29b2425ca9ad75a4(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !149 { +// CHECK:STDOUT: call void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %return), !dbg !152 +// CHECK:STDOUT: ret void, !dbg !153 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %value) #0 !dbg !154 { -// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !159 -// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !159 -// CHECK:STDOUT: ret i32 %1, !dbg !160 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %value) #0 !dbg !154 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ 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: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %value) #0 !dbg !162 { +// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !167 +// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !167 +// CHECK:STDOUT: ret i32 %1, !dbg !168 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #2 !dbg !162 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !166 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !166 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !166 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !166 -// CHECK:STDOUT: ret void, !dbg !166 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #2 !dbg !170 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !174 +// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !174 +// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !174 +// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !174 +// CHECK:STDOUT: ret void, !dbg !174 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !170 { -// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !179 -// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !179 -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !181 -// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !181 -// CHECK:STDOUT: ret void, !dbg !182 +// CHECK:STDOUT: define linkonce_odr void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !178 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !187 +// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !187 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !189 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !189 +// CHECK:STDOUT: ret void, !dbg !190 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !184 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !191 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !191 -// CHECK:STDOUT: ret void, !dbg !192 +// CHECK:STDOUT: define linkonce_odr void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !192 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !199 +// CHECK:STDOUT: store i8 0, 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 i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !193 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !198 -// CHECK:STDOUT: ret i32 %1, !dbg !200 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !201 { +// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !206 +// CHECK:STDOUT: ret i32 %1, !dbg !208 // 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 !202 { -// CHECK:STDOUT: ret i32 %self, !dbg !208 +// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !210 { +// CHECK:STDOUT: ret i32 %self, !dbg !216 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.bf93366da8df6472:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.c6daab0befde28a8, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9a03059f269926ed, { 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.8242e48f93ef210e, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.38552a897eb918eb, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -301,132 +282,126 @@ fn F() { // CHECK:STDOUT: !28 = !DILocation(line: 18, column: 5, scope: !14) // CHECK:STDOUT: !29 = !DILocation(line: 17, column: 3, scope: !14) // CHECK:STDOUT: !30 = !DILocation(line: 15, column: 1, scope: !14) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b3126fe3b97d1b85:core.SubobjectDestroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !11) // CHECK:STDOUT: !33 = !DILocation(line: 17, column: 7, scope: !31) // CHECK:STDOUT: !34 = !{!32} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b3126fe3b97d1b85:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6f1424a1f3fc4182:core.SubobjectDestroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !11) // CHECK:STDOUT: !37 = !DILocation(line: 17, column: 7, scope: !35) // CHECK:STDOUT: !38 = !{!36} -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.993995cdb1dad067:core.Destroy.Core", scope: null, file: !4, line: 17, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !6) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e60156a973847ad6:core.SubobjectDestroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// 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: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.85d5d6325bc2f620:core.SubobjectDestroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !11) -// CHECK:STDOUT: !45 = !DILocation(line: 17, column: 7, scope: !43) +// CHECK:STDOUT: !45 = !DILocation(line: 16, column: 26, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2e0c223a4e2f3d14: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.2e0c223a4e2f3d14: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.d2ff3a86a5bbb967:core.Destroy.Core", scope: null, file: !4, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) +// CHECK:STDOUT: !47 = !DIFile(filename: "{{.*}}/prelude/iterate.carbon", directory: "") +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.Array.ef119564f44a13e5.Core:Iterate.Core.ea5855de090934bd", scope: null, file: !47, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !11) +// CHECK:STDOUT: !53 = !DILocation(line: 23, column: 38, scope: !48) +// CHECK:STDOUT: !54 = !{!49} +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.Array.ef119564f44a13e5.Core:Iterate.Core.ea5855de090934bd", scope: null, file: !47, line: 24, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) // 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.d2ff3a86a5bbb967: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: "SelfDestruct", linkageName: "_CSelfDestruct.bf93366da8df6472: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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.85d5d6325bc2f620:core.Destroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !11) -// CHECK:STDOUT: !69 = !DILocation(line: 16, column: 26, scope: !67) -// CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.85d5d6325bc2f620: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: 16, column: 26, scope: !71) -// CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = !DIFile(filename: "{{.*}}/prelude/iterate.carbon", directory: "") -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.Array.e6a7e802f5bda6f1.Core:Iterate.Core.4f879c7c3bafed31", scope: null, file: !75, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !82) -// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !11) -// CHECK:STDOUT: !81 = !DILocation(line: 23, column: 38, scope: !76) -// CHECK:STDOUT: !82 = !{!77} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.Array.e6a7e802f5bda6f1.Core:Iterate.Core.4f879c7c3bafed31", scope: null, file: !75, line: 24, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !104) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !11) -// CHECK:STDOUT: !85 = !DILocalVariable(arg: 2, scope: !83, type: !6) -// CHECK:STDOUT: !90 = !DILocation(line: 25, column: 9, scope: !83) -// CHECK:STDOUT: !91 = !DILocation(line: 25, column: 8, scope: !83) -// CHECK:STDOUT: !93 = !DILocation(line: 26, column: 7, scope: !83) -// CHECK:STDOUT: !94 = !DILocation(line: 27, column: 31, scope: !83) -// CHECK:STDOUT: !95 = !DILocation(line: 27, column: 36, scope: !83) -// CHECK:STDOUT: !96 = !DILocation(line: 27, column: 14, scope: !83) -// CHECK:STDOUT: !97 = !{!11, !6} -// CHECK:STDOUT: !98 = !DISubroutineType(types: !97) -// CHECK:STDOUT: !99 = !DILocation(line: 27, column: 7, scope: !83) -// CHECK:STDOUT: !100 = !DILocation(line: 29, column: 14, scope: !83) -// CHECK:STDOUT: !101 = !{!11} -// CHECK:STDOUT: !102 = !DISubroutineType(types: !101) -// CHECK:STDOUT: !103 = !DILocation(line: 29, column: 7, scope: !83) -// CHECK:STDOUT: !104 = !{!84, !85} -// CHECK:STDOUT: !105 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.ebd99c5786039774", scope: null, file: !105, line: 36, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !114) -// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !11) -// CHECK:STDOUT: !112 = !DILocation(line: 37, column: 12, scope: !106) -// CHECK:STDOUT: !113 = !DILocation(line: 37, column: 5, scope: !106) -// CHECK:STDOUT: !114 = !{!107} -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.ebd99c5786039774", scope: null, file: !105, line: 39, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !123) -// CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !11) -// CHECK:STDOUT: !121 = !DILocation(line: 40, column: 12, scope: !115) -// CHECK:STDOUT: !122 = !DILocation(line: 40, column: 5, scope: !115) -// CHECK:STDOUT: !123 = !{!116} -// CHECK:STDOUT: !124 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !124, line: 396, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !132) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 2, scope: !55, type: !6) +// CHECK:STDOUT: !62 = !DILocation(line: 25, column: 9, scope: !55) +// CHECK:STDOUT: !63 = !DILocation(line: 25, column: 8, scope: !55) +// CHECK:STDOUT: !65 = !DILocation(line: 26, column: 7, scope: !55) +// CHECK:STDOUT: !66 = !DILocation(line: 27, column: 31, scope: !55) +// CHECK:STDOUT: !67 = !DILocation(line: 27, column: 36, scope: !55) +// CHECK:STDOUT: !68 = !DILocation(line: 27, column: 14, scope: !55) +// CHECK:STDOUT: !69 = !{!11, !6} +// CHECK:STDOUT: !70 = !DISubroutineType(types: !69) +// CHECK:STDOUT: !71 = !DILocation(line: 27, column: 7, scope: !55) +// CHECK:STDOUT: !72 = !DILocation(line: 29, column: 14, scope: !55) +// CHECK:STDOUT: !73 = !{!11} +// CHECK:STDOUT: !74 = !DISubroutineType(types: !73) +// CHECK:STDOUT: !75 = !DILocation(line: 29, column: 7, scope: !55) +// CHECK:STDOUT: !76 = !{!56, !57} +// CHECK:STDOUT: !77 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.29b2425ca9ad75a4", scope: null, file: !77, line: 36, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !86) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !11) +// CHECK:STDOUT: !84 = !DILocation(line: 37, column: 12, scope: !78) +// CHECK:STDOUT: !85 = !DILocation(line: 37, column: 5, scope: !78) +// CHECK:STDOUT: !86 = !{!79} +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.29b2425ca9ad75a4", scope: null, file: !77, line: 39, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !95) +// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !11) +// CHECK:STDOUT: !93 = !DILocation(line: 40, column: 12, scope: !87) +// CHECK:STDOUT: !94 = !DILocation(line: 40, column: 5, scope: !87) +// CHECK:STDOUT: !95 = !{!88} +// CHECK:STDOUT: !96 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.c6daab0befde28a8", scope: null, file: !96, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !103) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !11) +// CHECK:STDOUT: !102 = !DILocation(line: 36, column: 1, scope: !97) +// CHECK:STDOUT: !103 = !{!98} +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9a03059f269926ed", scope: null, file: !96, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !110) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !6) +// CHECK:STDOUT: !109 = !DILocation(line: 36, column: 1, scope: !104) +// CHECK:STDOUT: !110 = !{!105} +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.bcf9aa71b59dc36e", scope: null, file: !96, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !117) +// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !11) +// CHECK:STDOUT: !115 = !DILocation(line: 38, column: 5, scope: !111) +// CHECK:STDOUT: !116 = !DILocation(line: 36, column: 1, scope: !111) +// CHECK:STDOUT: !117 = !{!112} +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8242e48f93ef210e", scope: null, file: !96, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !124) +// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !11) +// CHECK:STDOUT: !123 = !DILocation(line: 36, column: 1, scope: !118) +// CHECK:STDOUT: !124 = !{!119} +// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.38552a897eb918eb", scope: null, file: !96, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !131) // CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !6) -// CHECK:STDOUT: !128 = !DILocation(line: 398, column: 5, scope: !125) -// CHECK:STDOUT: !129 = !{null, !6, !6} -// CHECK:STDOUT: !130 = !DISubroutineType(types: !129) -// CHECK:STDOUT: !131 = !DILocation(line: 396, column: 3, scope: !125) -// CHECK:STDOUT: !132 = !{!126} -// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.ebd99c5786039774", scope: null, file: !105, line: 33, type: !98, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !140) +// CHECK:STDOUT: !130 = !DILocation(line: 36, column: 1, scope: !125) +// CHECK:STDOUT: !131 = !{!126} +// CHECK:STDOUT: !132 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !132, line: 396, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !140) // CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !6) -// CHECK:STDOUT: !138 = !DILocation(line: 34, column: 12, scope: !133) -// CHECK:STDOUT: !139 = !DILocation(line: 34, column: 5, scope: !133) +// CHECK:STDOUT: !136 = !DILocation(line: 398, column: 5, scope: !133) +// CHECK:STDOUT: !137 = !{null, !6, !6} +// CHECK:STDOUT: !138 = !DISubroutineType(types: !137) +// CHECK:STDOUT: !139 = !DILocation(line: 396, column: 3, scope: !133) // CHECK:STDOUT: !140 = !{!134} -// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.ebd99c5786039774", scope: null, file: !105, line: 30, type: !102, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !144 = !DILocation(line: 31, column: 12, scope: !141) -// CHECK:STDOUT: !145 = !DILocation(line: 31, column: 5, scope: !141) -// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !105, line: 141, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !153) -// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !11) -// CHECK:STDOUT: !151 = !DILocation(line: 142, column: 12, scope: !146) -// CHECK:STDOUT: !152 = !DILocation(line: 142, column: 5, scope: !146) -// CHECK:STDOUT: !153 = !{!147} -// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !105, line: 144, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !161) +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.29b2425ca9ad75a4", scope: null, file: !77, line: 33, type: !70, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !148) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !6) +// CHECK:STDOUT: !146 = !DILocation(line: 34, column: 12, scope: !141) +// CHECK:STDOUT: !147 = !DILocation(line: 34, column: 5, scope: !141) +// CHECK:STDOUT: !148 = !{!142} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.29b2425ca9ad75a4", scope: null, file: !77, line: 30, type: !74, 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.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !77, line: 141, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !161) // CHECK:STDOUT: !155 = !DILocalVariable(arg: 1, scope: !154, type: !11) -// CHECK:STDOUT: !159 = !DILocation(line: 145, column: 12, scope: !154) -// CHECK:STDOUT: !160 = !DILocation(line: 145, column: 5, scope: !154) +// 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: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !124, line: 331, type: !130, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !169) -// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !6) -// CHECK:STDOUT: !164 = !DILocalVariable(arg: 2, scope: !162, type: !6) -// CHECK:STDOUT: !166 = !DILocation(line: 331, column: 3, scope: !162) -// CHECK:STDOUT: !167 = !{!6, !6} -// CHECK:STDOUT: !168 = !DISubroutineType(types: !167) -// CHECK:STDOUT: !169 = !{!163, !164} -// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !105, line: 131, type: !98, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !183) +// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !77, line: 144, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !169) +// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !11) +// 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: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !132, line: 331, type: !138, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !177) // CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !6) -// CHECK:STDOUT: !179 = !DILocation(line: 137, column: 5, scope: !170) -// CHECK:STDOUT: !181 = !DILocation(line: 138, column: 5, scope: !170) -// CHECK:STDOUT: !182 = !DILocation(line: 139, column: 5, scope: !170) -// CHECK:STDOUT: !183 = !{!171} -// CHECK:STDOUT: !184 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !105, line: 125, type: !102, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !191 = !DILocation(line: 128, column: 5, scope: !184) -// CHECK:STDOUT: !192 = !DILocation(line: 129, column: 5, scope: !184) -// CHECK:STDOUT: !193 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !124, line: 64, type: !168, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !201) -// CHECK:STDOUT: !194 = !DILocalVariable(arg: 1, scope: !193, type: !6) -// CHECK:STDOUT: !198 = !DILocation(line: 66, column: 17, scope: !193) -// CHECK:STDOUT: !200 = !DILocation(line: 66, column: 5, scope: !193) -// CHECK:STDOUT: !201 = !{!194} -// CHECK:STDOUT: !202 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !124, line: 59, type: !168, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !209) -// CHECK:STDOUT: !203 = !DILocalVariable(arg: 1, scope: !202, type: !6) -// CHECK:STDOUT: !208 = !DILocation(line: 59, column: 28, scope: !202) -// CHECK:STDOUT: !209 = !{!203} +// CHECK:STDOUT: !172 = !DILocalVariable(arg: 2, scope: !170, type: !6) +// CHECK:STDOUT: !174 = !DILocation(line: 331, column: 3, scope: !170) +// CHECK:STDOUT: !175 = !{!6, !6} +// CHECK:STDOUT: !176 = !DISubroutineType(types: !175) +// CHECK:STDOUT: !177 = !{!171, !172} +// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !77, line: 131, type: !70, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !191) +// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !6) +// CHECK:STDOUT: !187 = !DILocation(line: 137, column: 5, scope: !178) +// CHECK:STDOUT: !189 = !DILocation(line: 138, column: 5, scope: !178) +// CHECK:STDOUT: !190 = !DILocation(line: 139, column: 5, scope: !178) +// CHECK:STDOUT: !191 = !{!179} +// CHECK:STDOUT: !192 = distinct !DISubprogram(name: "None", linkageName: "_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !77, line: 125, type: !74, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !199 = !DILocation(line: 128, column: 5, scope: !192) +// CHECK:STDOUT: !200 = !DILocation(line: 129, column: 5, scope: !192) +// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !132, line: 64, type: !176, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !209) +// CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !201, type: !6) +// CHECK:STDOUT: !206 = !DILocation(line: 66, column: 17, scope: !201) +// CHECK:STDOUT: !208 = !DILocation(line: 66, column: 5, scope: !201) +// CHECK:STDOUT: !209 = !{!202} +// CHECK:STDOUT: !210 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !132, line: 59, type: !176, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !217) +// CHECK:STDOUT: !211 = !DILocalVariable(arg: 1, scope: !210, type: !6) +// CHECK:STDOUT: !216 = !DILocation(line: 59, column: 28, scope: !210) +// CHECK:STDOUT: !217 = !{!211} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/array/layout.carbon b/toolchain/lower/testdata/array/layout.carbon index a48aaa975620..8b22a87a5cdb 100644 --- a/toolchain/lower/testdata/array/layout.carbon +++ b/toolchain/lower/testdata/array/layout.carbon @@ -37,74 +37,73 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: declare void @_CCheck.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !30 { +// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !28 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %v.var = alloca [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], align 8, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !31 -// CHECK:STDOUT: %.loc10_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 0, !dbg !33 -// CHECK:STDOUT: %.loc10_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc10_13.array.index, i32 0, i32 1, !dbg !33 -// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc10_14.b), !dbg !35 -// CHECK:STDOUT: %.loc11_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 1, !dbg !36 -// CHECK:STDOUT: %.loc11_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc11_13.array.index, i32 0, i32 1, !dbg !36 -// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc11_14.b), !dbg !38 -// CHECK:STDOUT: %.loc12_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 2, !dbg !39 -// CHECK:STDOUT: %.loc12_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc12_13.array.index, i32 0, i32 1, !dbg !39 -// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc12_14.b), !dbg !41 -// CHECK:STDOUT: call void @"_CSelfDestruct.5f7e13684853ab71:core.Destroy.Core"(ptr %v.var), !dbg !31 -// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: %v.var = alloca [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], align 8, !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !29 +// CHECK:STDOUT: %.loc10_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 0, !dbg !31 +// CHECK:STDOUT: %.loc10_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc10_13.array.index, i32 0, i32 1, !dbg !31 +// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc10_14.b), !dbg !33 +// CHECK:STDOUT: %.loc11_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 1, !dbg !34 +// CHECK:STDOUT: %.loc11_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc11_13.array.index, i32 0, i32 1, !dbg !34 +// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc11_14.b), !dbg !36 +// CHECK:STDOUT: %.loc12_13.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %v.var, i32 0, i32 2, !dbg !37 +// CHECK:STDOUT: %.loc12_14.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc12_13.array.index, i32 0, i32 1, !dbg !37 +// CHECK:STDOUT: call void @_CCheck.Main(ptr %.loc12_14.b), !dbg !39 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bcc30dc1c10b07a0(ptr %v.var), !dbg !29 +// CHECK:STDOUT: ret void, !dbg !40 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: define weak_odr void @"_COp.933529f2b2a8c0c4:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !45 +// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc9_3.1.b), !dbg !43 +// CHECK:STDOUT: %.loc9_3.4.a = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5ae382a48d083172(ptr %.loc9_3.4.a), !dbg !43 +// CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: define weak_odr void @"_COp.5f7e13684853ab71:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc9_3.1.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 2, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0e76f9b72a8fe67b(ptr %.loc9_3.1.array.index), !dbg !49 +// CHECK:STDOUT: %.loc9_3.4.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 1, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0e76f9b72a8fe67b(ptr %.loc9_3.4.array.index), !dbg !49 +// CHECK:STDOUT: %.loc9_3.7.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 0, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0e76f9b72a8fe67b(ptr %.loc9_3.7.array.index), !dbg !49 // CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.933529f2b2a8c0c4:core.Destroy.Core"(ptr %self) #0 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !53 -// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !53 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.933529f2b2a8c0c4:core.Destroy.Core"(ptr %self) #0 !dbg !55 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.933529f2b2a8c0c4: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.5f7e13684853ab71:core.Destroy.Core"(ptr %self) #0 !dbg !59 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 2, !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.933529f2b2a8c0c4:core.Destroy.Core"(ptr %.loc9_3.1.array.index), !dbg !61 -// CHECK:STDOUT: %.loc9_3.2.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 1, !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.933529f2b2a8c0c4:core.Destroy.Core"(ptr %.loc9_3.2.array.index), !dbg !61 -// CHECK:STDOUT: %.loc9_3.3.array.index = getelementptr inbounds [3 x <{ <{ ptr, i32 }>, [4 x i8] }>], ptr %self, i32 0, i64 0, !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.933529f2b2a8c0c4:core.Destroy.Core"(ptr %.loc9_3.3.array.index), !dbg !61 -// CHECK:STDOUT: ret void, !dbg !61 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5f7e13684853ab71:core.Destroy.Core"(ptr %self) #0 !dbg !63 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5f7e13684853ab71: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: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.bcc30dc1c10b07a0(ptr %t) #0 !dbg !51 { +// CHECK:STDOUT: call void @"_COp.5f7e13684853ab71:core.SubobjectDestroy.Core"(ptr %t), !dbg !55 +// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !58 { +// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.5ae382a48d083172(ptr %t) #0 !dbg !65 { +// CHECK:STDOUT: ret void, !dbg !70 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.0e76f9b72a8fe67b(ptr %t) #0 !dbg !72 { +// CHECK:STDOUT: call void @"_COp.933529f2b2a8c0c4:core.SubobjectDestroy.Core"(ptr %t), !dbg !76 +// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.0e76f9b72a8fe67b, { 2, 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -113,6 +112,7 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !14 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIFile(filename: "element_tail_padding.carbon", directory: "") // CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -121,41 +121,43 @@ var c: array(Core.Int(257), 5) = (1, 2, 3, 4, 5); // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{null} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !22} -// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !20, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !21) -// CHECK:STDOUT: !31 = !DILocation(line: 9, column: 3, scope: !30) -// CHECK:STDOUT: !33 = !DILocation(line: 10, column: 10, scope: !30) -// CHECK:STDOUT: !35 = !DILocation(line: 10, column: 3, scope: !30) -// CHECK:STDOUT: !36 = !DILocation(line: 11, column: 10, scope: !30) -// CHECK:STDOUT: !38 = !DILocation(line: 11, column: 3, scope: !30) -// CHECK:STDOUT: !39 = !DILocation(line: 12, column: 10, scope: !30) -// CHECK:STDOUT: !41 = !DILocation(line: 12, column: 3, scope: !30) -// CHECK:STDOUT: !42 = !DILocation(line: 5, column: 1, scope: !30) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !46) -// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !23) -// CHECK:STDOUT: !45 = !DILocation(line: 9, column: 3, scope: !43) -// CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !20, line: 9, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !22) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !20, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !29 = !DILocation(line: 9, column: 3, scope: !28) +// CHECK:STDOUT: !31 = !DILocation(line: 10, column: 10, scope: !28) +// CHECK:STDOUT: !33 = !DILocation(line: 10, column: 3, scope: !28) +// CHECK:STDOUT: !34 = !DILocation(line: 11, column: 10, scope: !28) +// CHECK:STDOUT: !36 = !DILocation(line: 11, column: 3, scope: !28) +// CHECK:STDOUT: !37 = !DILocation(line: 12, column: 10, scope: !28) +// CHECK:STDOUT: !39 = !DILocation(line: 12, column: 3, scope: !28) +// CHECK:STDOUT: !40 = !DILocation(line: 5, column: 1, scope: !28) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.933529f2b2a8c0c4:core.SubobjectDestroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !46) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !23) +// CHECK:STDOUT: !43 = !DILocation(line: 9, column: 3, scope: !41) +// CHECK:STDOUT: !44 = !{null, !22} +// CHECK:STDOUT: !45 = !DISubroutineType(types: !44) +// CHECK:STDOUT: !46 = !{!42} +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5f7e13684853ab71:core.SubobjectDestroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !50) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !23) // CHECK:STDOUT: !49 = !DILocation(line: 9, column: 3, scope: !47) // CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.933529f2b2a8c0c4:core.Destroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !54) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.bcc30dc1c10b07a0", scope: null, file: !14, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !57) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !23) -// CHECK:STDOUT: !53 = !DILocation(line: 9, column: 3, scope: !51) -// CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.933529f2b2a8c0c4:core.Destroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !23) -// CHECK:STDOUT: !57 = !DILocation(line: 9, column: 3, scope: !55) -// CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5f7e13684853ab71:core.Destroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !62) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !23) -// CHECK:STDOUT: !61 = !DILocation(line: 9, column: 3, scope: !59) -// CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5f7e13684853ab71:core.Destroy.Core", scope: null, file: !20, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !23) -// CHECK:STDOUT: !65 = !DILocation(line: 9, column: 3, scope: !63) -// CHECK:STDOUT: !66 = !{!64} +// CHECK:STDOUT: !55 = !DILocation(line: 34, column: 5, scope: !51) +// CHECK:STDOUT: !56 = !DILocation(line: 32, column: 1, scope: !51) +// CHECK:STDOUT: !57 = !{!52} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !14, line: 32, type: !45, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !64) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !22) +// CHECK:STDOUT: !63 = !DILocation(line: 32, column: 1, scope: !58) +// CHECK:STDOUT: !64 = !{!59} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5ae382a48d083172", scope: null, file: !14, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !71) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !23) +// CHECK:STDOUT: !70 = !DILocation(line: 32, column: 1, scope: !65) +// CHECK:STDOUT: !71 = !{!66} +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.0e76f9b72a8fe67b", scope: null, file: !14, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !78) +// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !23) +// CHECK:STDOUT: !76 = !DILocation(line: 34, column: 5, scope: !72) +// CHECK:STDOUT: !77 = !DILocation(line: 32, column: 1, scope: !72) +// CHECK:STDOUT: !78 = !{!73} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'constant_with_padding.carbon' @@ -166,10 +168,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 !70 { +// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !82 { // 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 !72 -// CHECK:STDOUT: ret void, !dbg !73 +// 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 !84 +// CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -178,16 +180,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 = !{!68} +// CHECK:STDOUT: !llvm.dbg.cu = !{!80} // 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: !26 = !{null} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !67 = !DIFile(filename: "constant_with_padding.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: !70 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !67, type: !27, spFlags: DISPFlagDefinition, unit: !68) -// CHECK:STDOUT: !72 = !DILocation(line: 3, column: 1, scope: !70) -// CHECK:STDOUT: !73 = !DILocation(line: 0, scope: !70) +// CHECK:STDOUT: !79 = !DIFile(filename: "constant_with_padding.carbon", directory: "") +// CHECK:STDOUT: !80 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !79, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !79, type: !27, spFlags: DISPFlagDefinition, unit: !80) +// CHECK:STDOUT: !84 = !DILocation(line: 3, column: 1, scope: !82) +// CHECK:STDOUT: !85 = !DILocation(line: 0, scope: !82) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/char.carbon b/toolchain/lower/testdata/builtins/char.carbon index 87f694b7b31a..06a641985d28 100644 --- a/toolchain/lower/testdata/builtins/char.carbon +++ b/toolchain/lower/testdata/builtins/char.carbon @@ -24,31 +24,24 @@ fn Example() -> char { // CHECK:STDOUT: source_filename = "basic.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i8 @_CExample.Main() #0 !dbg !11 { +// CHECK:STDOUT: define i8 @_CExample.Main() #0 !dbg !9 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca i8, align 1, !dbg !14 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !14 -// CHECK:STDOUT: store i8 97, ptr %c.var, align 1, !dbg !14 -// CHECK:STDOUT: %.loc6 = load i8, ptr %c.var, align 1, !dbg !16 -// CHECK:STDOUT: call void @"_CSelfDestruct.8839c9ace2be9137:core.Destroy.Core"(ptr %c.var), !dbg !14 +// CHECK:STDOUT: %c.var = alloca i8, align 1, !dbg !12 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !12 +// CHECK:STDOUT: store i8 97, ptr %c.var, align 1, !dbg !12 +// CHECK:STDOUT: %.loc6 = load i8, ptr %c.var, align 1, !dbg !14 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.00174ca91d483df7(ptr %c.var), !dbg !12 // CHECK:STDOUT: ret i8 %.loc6, !dbg !17 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core"(ptr %self) #0 !dbg !18 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !20 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8839c9ace2be9137: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: 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 @_CSelfDestruct.Core.00174ca91d483df7(ptr %t) #0 !dbg !19 { +// CHECK:STDOUT: ret void, !dbg !24 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -62,18 +55,15 @@ fn Example() -> char { // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_unsigned) // CHECK:STDOUT: !7 = !{!6} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !9 = !{null, !6} -// CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Example", linkageName: "_CExample.Main", scope: null, file: !4, line: 4, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !14 = !DILocation(line: 5, column: 3, scope: !11) -// CHECK:STDOUT: !16 = !DILocation(line: 6, column: 10, scope: !11) -// CHECK:STDOUT: !17 = !DILocation(line: 6, column: 3, scope: !11) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core", scope: null, file: !4, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !21) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.8839c9ace2be9137: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: !9 = distinct !DISubprogram(name: "Example", linkageName: "_CExample.Main", scope: null, file: !4, line: 4, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !12 = !DILocation(line: 5, column: 3, scope: !9) +// CHECK:STDOUT: !14 = !DILocation(line: 6, column: 10, scope: !9) +// CHECK:STDOUT: !15 = !{null, !6} +// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) +// CHECK:STDOUT: !17 = !DILocation(line: 6, column: 3, scope: !9) +// CHECK:STDOUT: !18 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.00174ca91d483df7", scope: null, file: !18, line: 36, type: !16, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !19, type: !6) +// CHECK:STDOUT: !24 = !DILocation(line: 36, column: 1, scope: !19) +// CHECK:STDOUT: !25 = !{!20} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/cpp.carbon b/toolchain/lower/testdata/builtins/cpp.carbon index bcb4e0ec5006..f121f0cdb9c4 100644 --- a/toolchain/lower/testdata/builtins/cpp.carbon +++ b/toolchain/lower/testdata/builtins/cpp.carbon @@ -48,104 +48,95 @@ fn Test() { // CHECK:STDOUT: @array = internal constant [4 x i32] [i32 1, i32 2, i32 3, i32 4] // CHECK:STDOUT: @array.loc25_52.18 = internal constant [4 x i32] [i32 1, i32 2, i32 3, i32 4] // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %self) #0 !dbg !16 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !18 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: declare void @_CTakePointerPointer.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CTakePointerSize.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !20 { +// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !13 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc25_53.1.temp = alloca [16 x i8], align 8, !dbg !21 -// CHECK:STDOUT: %.loc25_52.3.temp = alloca [4 x i32], align 4, !dbg !22 -// CHECK:STDOUT: %.loc26_47.1.temp = alloca [16 x i8], align 8, !dbg !24 -// CHECK:STDOUT: %.loc26_46.3.temp = alloca [4 x i32], align 4, !dbg !25 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_53.1.temp), !dbg !21 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_52.3.temp), !dbg !22 -// CHECK:STDOUT: %.loc25_52.4.array.index = getelementptr inbounds [4 x i32], ptr %.loc25_52.3.temp, i32 0, i64 0, !dbg !22 -// CHECK:STDOUT: %.loc25_52.7.array.index = getelementptr inbounds [4 x i32], ptr %.loc25_52.3.temp, i32 0, i64 1, !dbg !22 -// CHECK:STDOUT: %.loc25_52.10.array.index = getelementptr inbounds [4 x i32], ptr %.loc25_52.3.temp, i32 0, i64 2, !dbg !22 -// CHECK:STDOUT: %.loc25_52.13.array.index = getelementptr inbounds [4 x i32], ptr %.loc25_52.3.temp, i32 0, i64 3, !dbg !22 -// CHECK:STDOUT: %MakePointerPointer.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc25_53.1.temp, i32 0, i32 0, !dbg !21 -// CHECK:STDOUT: store ptr @array.loc25_52.18, ptr %MakePointerPointer.call.init_list.begin, align 8, !dbg !21 -// CHECK:STDOUT: %MakePointerPointer.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %.loc25_53.1.temp, i32 0, i32 8, !dbg !21 -// CHECK:STDOUT: store ptr getelementptr inbounds (i8, ptr @array.loc25_52.18, i64 16), ptr %MakePointerPointer.call.init_list.end, align 8, !dbg !21 -// CHECK:STDOUT: call void @_CTakePointerPointer.Main(ptr %.loc25_53.1.temp), !dbg !23 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2bbdd6ca1ad449b:core.Destroy.Core"(ptr %.loc25_53.1.temp), !dbg !21 -// CHECK:STDOUT: call void @"_CSelfDestruct.f09a8402c9d45995:core.Destroy.Core"(ptr @array), !dbg !22 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_47.1.temp), !dbg !24 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_46.3.temp), !dbg !25 -// CHECK:STDOUT: %.loc26_46.4.array.index = getelementptr inbounds [4 x i32], ptr %.loc26_46.3.temp, i32 0, i64 0, !dbg !25 -// CHECK:STDOUT: %.loc26_46.7.array.index = getelementptr inbounds [4 x i32], ptr %.loc26_46.3.temp, i32 0, i64 1, !dbg !25 -// CHECK:STDOUT: %.loc26_46.10.array.index = getelementptr inbounds [4 x i32], ptr %.loc26_46.3.temp, i32 0, i64 2, !dbg !25 -// CHECK:STDOUT: %.loc26_46.13.array.index = getelementptr inbounds [4 x i32], ptr %.loc26_46.3.temp, i32 0, i64 3, !dbg !25 -// CHECK:STDOUT: %MakePointerSize.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc26_47.1.temp, i32 0, i32 0, !dbg !24 -// CHECK:STDOUT: store ptr @array.loc25_52.18, ptr %MakePointerSize.call.init_list.begin, align 8, !dbg !24 -// CHECK:STDOUT: %MakePointerSize.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %.loc26_47.1.temp, i32 0, i32 8, !dbg !24 -// CHECK:STDOUT: store i64 4, ptr %MakePointerSize.call.init_list.size, align 8, !dbg !24 -// CHECK:STDOUT: call void @_CTakePointerSize.Main(ptr %.loc26_47.1.temp), !dbg !26 -// CHECK:STDOUT: call void @"_CSelfDestruct.f6ab4fc1968c35c6:core.Destroy.Core"(ptr %.loc26_47.1.temp), !dbg !24 -// CHECK:STDOUT: call void @"_CSelfDestruct.f09a8402c9d45995:core.Destroy.Core"(ptr @array), !dbg !25 -// CHECK:STDOUT: ret void, !dbg !27 +// CHECK:STDOUT: %.loc25_53.1.temp = alloca [16 x i8], align 8, !dbg !14 +// CHECK:STDOUT: %.loc25_52.3.temp = alloca [4 x i32], align 4, !dbg !15 +// CHECK:STDOUT: %.loc26_47.1.temp = alloca [16 x i8], align 8, !dbg !17 +// CHECK:STDOUT: %.loc26_46.3.temp = alloca [4 x i32], align 4, !dbg !18 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_53.1.temp), !dbg !14 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_52.3.temp), !dbg !15 +// CHECK:STDOUT: %.loc25_52.4.array.index = getelementptr inbounds [4 x i32], ptr %.loc25_52.3.temp, i32 0, i64 0, !dbg !15 +// CHECK:STDOUT: %.loc25_52.7.array.index = getelementptr inbounds [4 x i32], ptr %.loc25_52.3.temp, i32 0, i64 1, !dbg !15 +// CHECK:STDOUT: %.loc25_52.10.array.index = getelementptr inbounds [4 x i32], ptr %.loc25_52.3.temp, i32 0, i64 2, !dbg !15 +// CHECK:STDOUT: %.loc25_52.13.array.index = getelementptr inbounds [4 x i32], ptr %.loc25_52.3.temp, i32 0, i64 3, !dbg !15 +// CHECK:STDOUT: %MakePointerPointer.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc25_53.1.temp, i32 0, i32 0, !dbg !14 +// CHECK:STDOUT: store ptr @array.loc25_52.18, ptr %MakePointerPointer.call.init_list.begin, align 8, !dbg !14 +// CHECK:STDOUT: %MakePointerPointer.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %.loc25_53.1.temp, i32 0, i32 8, !dbg !14 +// CHECK:STDOUT: store ptr getelementptr inbounds (i8, ptr @array.loc25_52.18, i64 16), ptr %MakePointerPointer.call.init_list.end, align 8, !dbg !14 +// CHECK:STDOUT: call void @_CTakePointerPointer.Main(ptr %.loc25_53.1.temp), !dbg !16 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.39207dab71498c5c(ptr %.loc25_53.1.temp), !dbg !14 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.74a1f892059422e4(ptr @array), !dbg !15 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_47.1.temp), !dbg !17 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_46.3.temp), !dbg !18 +// CHECK:STDOUT: %.loc26_46.4.array.index = getelementptr inbounds [4 x i32], ptr %.loc26_46.3.temp, i32 0, i64 0, !dbg !18 +// CHECK:STDOUT: %.loc26_46.7.array.index = getelementptr inbounds [4 x i32], ptr %.loc26_46.3.temp, i32 0, i64 1, !dbg !18 +// CHECK:STDOUT: %.loc26_46.10.array.index = getelementptr inbounds [4 x i32], ptr %.loc26_46.3.temp, i32 0, i64 2, !dbg !18 +// CHECK:STDOUT: %.loc26_46.13.array.index = getelementptr inbounds [4 x i32], ptr %.loc26_46.3.temp, i32 0, i64 3, !dbg !18 +// CHECK:STDOUT: %MakePointerSize.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %.loc26_47.1.temp, i32 0, i32 0, !dbg !17 +// CHECK:STDOUT: store ptr @array.loc25_52.18, ptr %MakePointerSize.call.init_list.begin, align 8, !dbg !17 +// CHECK:STDOUT: %MakePointerSize.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %.loc26_47.1.temp, i32 0, i32 8, !dbg !17 +// CHECK:STDOUT: store i64 4, ptr %MakePointerSize.call.init_list.size, align 8, !dbg !17 +// CHECK:STDOUT: call void @_CTakePointerSize.Main(ptr %.loc26_47.1.temp), !dbg !19 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2a5ba50a7d699637(ptr %.loc26_47.1.temp), !dbg !17 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.74a1f892059422e4(ptr @array), !dbg !18 +// CHECK:STDOUT: ret void, !dbg !20 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2bbdd6ca1ad449b:core.Destroy.Core"(ptr %self) #0 !dbg !28 { +// CHECK:STDOUT: define weak_odr void @"_COp.f09a8402c9d45995:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !21 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !30 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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 @"_CSubobjectDestroy.f09a8402c9d45995:core.Destroy.Core"(ptr %self) #0 !dbg !36 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc25_52.1.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 3, !dbg !38 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc25_52.1.array.index), !dbg !38 -// CHECK:STDOUT: %.loc25_52.2.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 2, !dbg !38 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc25_52.2.array.index), !dbg !38 -// CHECK:STDOUT: %.loc25_52.3.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 1, !dbg !38 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc25_52.3.array.index), !dbg !38 -// CHECK:STDOUT: %.loc25_52.4.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 0, !dbg !38 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc25_52.4.array.index), !dbg !38 -// CHECK:STDOUT: ret void, !dbg !38 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f09a8402c9d45995:core.Destroy.Core"(ptr %self) #0 !dbg !40 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f09a8402c9d45995: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.f6ab4fc1968c35c6:core.Destroy.Core"(ptr %self) #0 !dbg !44 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !46 +// CHECK:STDOUT: %.loc25_52.1.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 3, !dbg !23 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc25_52.1.array.index), !dbg !23 +// CHECK:STDOUT: %.loc25_52.4.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 2, !dbg !23 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc25_52.4.array.index), !dbg !23 +// CHECK:STDOUT: %.loc25_52.7.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 1, !dbg !23 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc25_52.7.array.index), !dbg !23 +// CHECK:STDOUT: %.loc25_52.10.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 0, !dbg !23 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc25_52.10.array.index), !dbg !23 +// CHECK:STDOUT: ret void, !dbg !23 // 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 @_CSelfDestruct.Core.39207dab71498c5c(ptr %t) #0 !dbg !28 { +// CHECK:STDOUT: ret void, !dbg !33 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.74a1f892059422e4(ptr %t) #0 !dbg !35 { +// CHECK:STDOUT: call void @"_COp.f09a8402c9d45995:core.SubobjectDestroy.Core"(ptr %t), !dbg !39 +// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2a5ba50a7d699637(ptr %t) #0 !dbg !42 { +// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9a03059f269926ed(ptr %t) #0 !dbg !49 { +// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.f09a8402c9d45995:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.74a1f892059422e4, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9a03059f269926ed, { 3, 2, 1, 0 } // 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 = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!48, !49, !50, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!55} +// CHECK:STDOUT: !llvm.module.flags = !{!56, !57, !58, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!63} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -157,47 +148,44 @@ fn Test() { // CHECK:STDOUT: !10 = !DISubroutineType(types: !9) // CHECK:STDOUT: !11 = !{null} // CHECK:STDOUT: !12 = !DISubroutineType(types: !11) -// CHECK:STDOUT: !13 = !{null, !6} -// CHECK:STDOUT: !14 = !DISubroutineType(types: !13) -// CHECK:STDOUT: !15 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !15, line: 164, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !19) -// CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !16, type: !8) -// CHECK:STDOUT: !18 = !DILocation(line: 164, column: 19, scope: !16) -// CHECK:STDOUT: !19 = !{!17} -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !4, line: 24, type: !12, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !21 = !DILocation(line: 25, column: 22, scope: !20) -// CHECK:STDOUT: !22 = !DILocation(line: 25, column: 41, scope: !20) -// CHECK:STDOUT: !23 = !DILocation(line: 25, column: 3, scope: !20) -// CHECK:STDOUT: !24 = !DILocation(line: 26, column: 19, scope: !20) -// CHECK:STDOUT: !25 = !DILocation(line: 26, column: 35, scope: !20) -// CHECK:STDOUT: !26 = !DILocation(line: 26, column: 3, scope: !20) -// CHECK:STDOUT: !27 = !DILocation(line: 24, column: 1, scope: !20) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2bbdd6ca1ad449b:core.Destroy.Core", scope: null, file: !4, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) +// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !4, line: 24, type: !12, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !14 = !DILocation(line: 25, column: 22, scope: !13) +// CHECK:STDOUT: !15 = !DILocation(line: 25, column: 41, scope: !13) +// CHECK:STDOUT: !16 = !DILocation(line: 25, column: 3, scope: !13) +// CHECK:STDOUT: !17 = !DILocation(line: 26, column: 19, scope: !13) +// CHECK:STDOUT: !18 = !DILocation(line: 26, column: 35, scope: !13) +// CHECK:STDOUT: !19 = !DILocation(line: 26, column: 3, scope: !13) +// CHECK:STDOUT: !20 = !DILocation(line: 24, column: 1, scope: !13) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f09a8402c9d45995:core.SubobjectDestroy.Core", scope: null, file: !4, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !26) +// CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !8) +// CHECK:STDOUT: !23 = !DILocation(line: 25, column: 41, scope: !21) +// CHECK:STDOUT: !24 = !{null, !6} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = !{!22} +// CHECK:STDOUT: !27 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.39207dab71498c5c", scope: null, file: !27, line: 36, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) // CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !8) -// CHECK:STDOUT: !30 = !DILocation(line: 25, column: 22, scope: !28) -// CHECK:STDOUT: !31 = !{!29} -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 25, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) -// 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.f09a8402c9d45995:core.Destroy.Core", scope: null, file: !4, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) -// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !8) -// CHECK:STDOUT: !38 = !DILocation(line: 25, column: 41, scope: !36) -// CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f09a8402c9d45995: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: "SelfDestruct", linkageName: "_CSelfDestruct.f6ab4fc1968c35c6:core.Destroy.Core", scope: null, file: !4, line: 26, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !8) -// CHECK:STDOUT: !46 = !DILocation(line: 26, column: 19, scope: !44) -// CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !49 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !51 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !52 = !{!"omnipotent char", !51, i64 0} -// CHECK:STDOUT: !53 = !{!"int", !52, i64 0} -// CHECK:STDOUT: !54 = !{!"__libc_errno", !53, i64 0} -// CHECK:STDOUT: !55 = !{!54, !53, i64 0} +// CHECK:STDOUT: !33 = !DILocation(line: 36, column: 1, scope: !28) +// CHECK:STDOUT: !34 = !{!29} +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.74a1f892059422e4", scope: null, file: !27, line: 36, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !8) +// CHECK:STDOUT: !39 = !DILocation(line: 38, column: 5, scope: !35) +// CHECK:STDOUT: !40 = !DILocation(line: 36, column: 1, scope: !35) +// CHECK:STDOUT: !41 = !{!36} +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2a5ba50a7d699637", scope: null, file: !27, line: 36, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !48) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !8) +// CHECK:STDOUT: !47 = !DILocation(line: 36, column: 1, scope: !42) +// CHECK:STDOUT: !48 = !{!43} +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9a03059f269926ed", scope: null, file: !27, line: 36, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) +// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !6) +// CHECK:STDOUT: !54 = !DILocation(line: 36, column: 1, scope: !49) +// CHECK:STDOUT: !55 = !{!50} +// 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: diff --git a/toolchain/lower/testdata/builtins/maybe_unformed.carbon b/toolchain/lower/testdata/builtins/maybe_unformed.carbon index ebe4decd4761..cc5a36c71668 100644 --- a/toolchain/lower/testdata/builtins/maybe_unformed.carbon +++ b/toolchain/lower/testdata/builtins/maybe_unformed.carbon @@ -90,97 +90,81 @@ fn PassAdapterBool() { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc28_21.1.temp), !dbg !63 // CHECK:STDOUT: call void @_CMakeBool.Main(ptr %.loc28_21.1.temp), !dbg !63 // CHECK:STDOUT: call void @_CTakeBool.Main(ptr %.loc28_21.1.temp), !dbg !64 -// CHECK:STDOUT: call void @"_CSelfDestruct.2ec8e1132c6ccd4f:core.Destroy.Core"(ptr %.loc28_21.1.temp), !dbg !63 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9d6c9c9ca086f431(ptr %.loc28_21.1.temp), !dbg !63 // CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2ec8e1132c6ccd4f:core.Destroy.Core"(ptr %self) #0 !dbg !66 { +// CHECK:STDOUT: define void @_CConvertBoolToUnformedBool.Main(ptr %b) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !68 +// CHECK:STDOUT: call void @_CTakeBool.Main(ptr %b), !dbg !71 +// CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CConvertBoolToUnformedBool.Main(ptr %b) #0 !dbg !70 { +// CHECK:STDOUT: define void @_CTakeAdapterI32.Main(i32 %_) #0 !dbg !74 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CTakeBool.Main(ptr %b), !dbg !75 -// CHECK:STDOUT: ret void, !dbg !76 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTakeAdapterI32.Main(i32 %_) #0 !dbg !78 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !81 +// CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @_CMakeAdapterI32.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassAdapterI32.Main() #0 !dbg !83 { +// CHECK:STDOUT: define void @_CPassAdapterI32.Main() #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc48_33.1.temp = alloca i32, align 4, !dbg !84 -// CHECK:STDOUT: %MakeAdapterI32.call = call i32 @_CMakeAdapterI32.Main(), !dbg !84 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc48_33.1.temp), !dbg !84 -// CHECK:STDOUT: store i32 %MakeAdapterI32.call, ptr %.loc48_33.1.temp, align 4, !dbg !84 -// CHECK:STDOUT: %.loc48_33.3 = load i32, ptr %.loc48_33.1.temp, align 4, !dbg !84 -// CHECK:STDOUT: call void @_CTakeAdapterI32.Main(i32 %.loc48_33.3), !dbg !85 -// CHECK:STDOUT: call void @"_CSelfDestruct.a791bc030d5250bb:core.Destroy.Core"(ptr %.loc48_33.1.temp), !dbg !84 -// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: %.loc48_33.1.temp = alloca i32, align 4, !dbg !80 +// CHECK:STDOUT: %MakeAdapterI32.call = call i32 @_CMakeAdapterI32.Main(), !dbg !80 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc48_33.1.temp), !dbg !80 +// CHECK:STDOUT: store i32 %MakeAdapterI32.call, ptr %.loc48_33.1.temp, align 4, !dbg !80 +// CHECK:STDOUT: %.loc48_33.3 = load i32, ptr %.loc48_33.1.temp, align 4, !dbg !80 +// CHECK:STDOUT: call void @_CTakeAdapterI32.Main(i32 %.loc48_33.3), !dbg !81 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b0cad517913c41b8(ptr %.loc48_33.1.temp), !dbg !80 +// CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_COp.b3126fe3b97d1b85:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define void @_CTakeAdapterBool.Main(ptr %_) #0 !dbg !87 { // 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.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self) #0 !dbg !95 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b3126fe3b97d1b85: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.a791bc030d5250bb: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 void @_CTakeAdapterBool.Main(ptr %_) #0 !dbg !103 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !106 +// CHECK:STDOUT: ret void, !dbg !90 // 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 !108 { +// CHECK:STDOUT: define void @_CPassAdapterBool.Main() #0 !dbg !92 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc55_35.1.temp = alloca i1, align 1, !dbg !109 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc55_35.1.temp), !dbg !109 -// CHECK:STDOUT: call void @_CMakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !109 -// CHECK:STDOUT: call void @_CTakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !110 -// CHECK:STDOUT: call void @"_CSelfDestruct.bbcf308035266cab:core.Destroy.Core"(ptr %.loc55_35.1.temp), !dbg !109 -// CHECK:STDOUT: ret void, !dbg !111 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bbcf308035266cab:core.Destroy.Core"(ptr %self) #0 !dbg !112 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !114 +// CHECK:STDOUT: %.loc55_35.1.temp = alloca i1, align 1, !dbg !93 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc55_35.1.temp), !dbg !93 +// CHECK:STDOUT: call void @_CMakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !93 +// CHECK:STDOUT: call void @_CTakeAdapterBool.Main(ptr %.loc55_35.1.temp), !dbg !94 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.fd9d713231488556(ptr %.loc55_35.1.temp), !dbg !93 +// 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.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9d6c9c9ca086f431(ptr %t) #0 !dbg !96 { +// CHECK:STDOUT: ret void, !dbg !101 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b0cad517913c41b8(ptr %t) #0 !dbg !103 { +// CHECK:STDOUT: ret void, !dbg !108 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.fd9d713231488556(ptr %t) #0 !dbg !110 { +// CHECK:STDOUT: ret void, !dbg !115 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } // CHECK:STDOUT: @@ -192,6 +176,7 @@ fn PassAdapterBool() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "maybe_unformed.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -218,49 +203,41 @@ fn PassAdapterBool() { // CHECK:STDOUT: !63 = !DILocation(line: 28, column: 12, scope: !62) // CHECK:STDOUT: !64 = !DILocation(line: 28, column: 3, scope: !62) // CHECK:STDOUT: !65 = !DILocation(line: 26, column: 1, scope: !62) -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2ec8e1132c6ccd4f:core.Destroy.Core", scope: null, file: !34, line: 28, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !69) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "ConvertBoolToUnformedBool", linkageName: "_CConvertBoolToUnformedBool.Main", scope: null, file: !34, line: 31, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !73) // CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !39) -// CHECK:STDOUT: !68 = !DILocation(line: 28, column: 12, scope: !66) -// CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "ConvertBoolToUnformedBool", linkageName: "_CConvertBoolToUnformedBool.Main", scope: null, file: !34, line: 31, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !77) -// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !39) -// CHECK:STDOUT: !75 = !DILocation(line: 32, column: 3, scope: !70) -// CHECK:STDOUT: !76 = !DILocation(line: 31, column: 1, scope: !70) -// CHECK:STDOUT: !77 = !{!71} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "TakeAdapterI32", linkageName: "_CTakeAdapterI32.Main", scope: null, file: !34, line: 42, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !82) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !36) -// CHECK:STDOUT: !81 = !DILocation(line: 42, column: 1, scope: !78) -// CHECK:STDOUT: !82 = !{!79} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "PassAdapterI32", linkageName: "_CPassAdapterI32.Main", scope: null, file: !34, line: 45, type: !45, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !84 = !DILocation(line: 48, column: 18, scope: !83) -// CHECK:STDOUT: !85 = !DILocation(line: 48, column: 3, scope: !83) -// CHECK:STDOUT: !86 = !DILocation(line: 45, column: 1, scope: !83) -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !34, line: 48, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !90) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !36) -// CHECK:STDOUT: !89 = !DILocation(line: 48, column: 18, scope: !87) -// CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core", scope: null, file: !34, line: 48, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !94) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !39) -// CHECK:STDOUT: !93 = !DILocation(line: 48, column: 18, scope: !91) -// CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b3126fe3b97d1b85:core.Destroy.Core", scope: null, file: !34, line: 48, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !98) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !39) -// CHECK:STDOUT: !97 = !DILocation(line: 48, column: 18, scope: !95) -// CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a791bc030d5250bb:core.Destroy.Core", scope: null, file: !34, line: 48, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !102) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !36) -// CHECK:STDOUT: !101 = !DILocation(line: 48, column: 18, scope: !99) -// CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "TakeAdapterBool", linkageName: "_CTakeAdapterBool.Main", scope: null, file: !34, line: 51, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !107) -// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !39) -// CHECK:STDOUT: !106 = !DILocation(line: 51, column: 1, scope: !103) -// CHECK:STDOUT: !107 = !{!104} -// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "PassAdapterBool", linkageName: "_CPassAdapterBool.Main", scope: null, file: !34, line: 54, type: !45, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !109 = !DILocation(line: 55, column: 19, scope: !108) -// CHECK:STDOUT: !110 = !DILocation(line: 55, column: 3, scope: !108) -// CHECK:STDOUT: !111 = !DILocation(line: 54, column: 1, scope: !108) -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bbcf308035266cab:core.Destroy.Core", scope: null, file: !34, line: 55, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !115) -// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !39) -// CHECK:STDOUT: !114 = !DILocation(line: 55, column: 19, scope: !112) -// CHECK:STDOUT: !115 = !{!113} +// CHECK:STDOUT: !71 = !DILocation(line: 32, column: 3, scope: !66) +// CHECK:STDOUT: !72 = !DILocation(line: 31, column: 1, scope: !66) +// CHECK:STDOUT: !73 = !{!67} +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "TakeAdapterI32", linkageName: "_CTakeAdapterI32.Main", scope: null, file: !34, line: 42, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !78) +// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !36) +// CHECK:STDOUT: !77 = !DILocation(line: 42, column: 1, scope: !74) +// CHECK:STDOUT: !78 = !{!75} +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "PassAdapterI32", linkageName: "_CPassAdapterI32.Main", scope: null, file: !34, line: 45, type: !45, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !80 = !DILocation(line: 48, column: 18, scope: !79) +// CHECK:STDOUT: !81 = !DILocation(line: 48, column: 3, scope: !79) +// CHECK:STDOUT: !82 = !DILocation(line: 45, column: 1, scope: !79) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b3126fe3b97d1b85:core.SubobjectDestroy.Core", scope: null, file: !34, line: 48, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !86) +// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !39) +// CHECK:STDOUT: !85 = !DILocation(line: 48, column: 18, scope: !83) +// CHECK:STDOUT: !86 = !{!84} +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "TakeAdapterBool", linkageName: "_CTakeAdapterBool.Main", scope: null, file: !34, line: 51, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !91) +// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !39) +// CHECK:STDOUT: !90 = !DILocation(line: 51, column: 1, scope: !87) +// CHECK:STDOUT: !91 = !{!88} +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "PassAdapterBool", linkageName: "_CPassAdapterBool.Main", scope: null, file: !34, line: 54, type: !45, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !93 = !DILocation(line: 55, column: 19, scope: !92) +// CHECK:STDOUT: !94 = !DILocation(line: 55, column: 3, scope: !92) +// CHECK:STDOUT: !95 = !DILocation(line: 54, column: 1, scope: !92) +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9d6c9c9ca086f431", scope: null, file: !26, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !102) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !39) +// CHECK:STDOUT: !101 = !DILocation(line: 32, column: 1, scope: !96) +// CHECK:STDOUT: !102 = !{!97} +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b0cad517913c41b8", scope: null, file: !26, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !109) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !36) +// CHECK:STDOUT: !108 = !DILocation(line: 32, column: 1, scope: !103) +// CHECK:STDOUT: !109 = !{!104} +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.fd9d713231488556", scope: null, file: !26, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !116) +// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !39) +// CHECK:STDOUT: !115 = !DILocation(line: 32, column: 1, scope: !110) +// CHECK:STDOUT: !116 = !{!111} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/no_op.carbon b/toolchain/lower/testdata/builtins/no_op.carbon index 0e76a1fe30ee..6c3e9dbf64b1 100644 --- a/toolchain/lower/testdata/builtins/no_op.carbon +++ b/toolchain/lower/testdata/builtins/no_op.carbon @@ -38,77 +38,78 @@ fn J() { // CHECK:STDOUT: source_filename = "no_op.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !13 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !16 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !14 +// CHECK:STDOUT: ret void, !dbg !17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !15 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !18 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !18 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !18 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %a.var), !dbg !18 -// CHECK:STDOUT: ret void, !dbg !21 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !21 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !21 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %a.var), !dbg !21 +// CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !22 { +// CHECK:STDOUT: define void @_CH.Main() #0 !dbg !28 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !24 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CH.Main() #0 !dbg !26 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !29 +// CHECK:STDOUT: ret void, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CI.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CJ.Main() #0 !dbg !30 { +// CHECK:STDOUT: define void @_CJ.Main() #0 !dbg !32 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc33_11.1.temp = alloca {}, align 1, !dbg !31 -// CHECK:STDOUT: call void @_CI.Main(), !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc33_11.1.temp), !dbg !31 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc33_11.1.temp), !dbg !31 -// CHECK:STDOUT: ret void, !dbg !32 +// CHECK:STDOUT: %.loc33_11.1.temp = alloca {}, align 1, !dbg !33 +// CHECK:STDOUT: call void @_CI.Main(), !dbg !33 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc33_11.1.temp), !dbg !33 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %.loc33_11.1.temp), !dbg !33 +// CHECK:STDOUT: ret void, !dbg !34 // 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 @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %t) #0 !dbg !35 { +// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9045abb8230cbcdf, { 1, 0 } // 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 = !{!7} +// CHECK:STDOUT: !llvm.dbg.cu = !{!13} // 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: !6 = !DIFile(filename: "no_op.carbon", directory: "") -// CHECK:STDOUT: !7 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !8 = !{null} -// CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !11 = !{null, !10} -// CHECK:STDOUT: !12 = !DISubroutineType(types: !11) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !6, line: 17, type: !9, spFlags: DISPFlagDefinition, unit: !7) -// CHECK:STDOUT: !14 = !DILocation(line: 17, column: 1, scope: !13) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !6, line: 21, type: !9, spFlags: DISPFlagDefinition, unit: !7) -// CHECK:STDOUT: !18 = !DILocation(line: 22, column: 3, scope: !15) -// CHECK:STDOUT: !21 = !DILocation(line: 23, column: 3, scope: !15) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !6, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !25) -// CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !22, type: !10) -// CHECK:STDOUT: !24 = !DILocation(line: 22, column: 3, scope: !22) -// CHECK:STDOUT: !25 = !{!23} -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !6, line: 26, type: !9, spFlags: DISPFlagDefinition, unit: !7) -// CHECK:STDOUT: !29 = !DILocation(line: 27, column: 3, scope: !26) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "J", linkageName: "_CJ.Main", scope: null, file: !6, line: 32, type: !9, spFlags: DISPFlagDefinition, unit: !7) -// CHECK:STDOUT: !31 = !DILocation(line: 33, column: 9, scope: !30) -// CHECK:STDOUT: !32 = !DILocation(line: 32, column: 1, scope: !30) +// CHECK:STDOUT: !4 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") +// CHECK:STDOUT: !12 = !DIFile(filename: "no_op.carbon", directory: "") +// CHECK:STDOUT: !13 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !12, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !14 = !{null} +// CHECK:STDOUT: !15 = !DISubroutineType(types: !14) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !12, line: 17, type: !15, spFlags: DISPFlagDefinition, unit: !13) +// CHECK:STDOUT: !17 = !DILocation(line: 17, column: 1, scope: !16) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !12, line: 21, type: !15, spFlags: DISPFlagDefinition, unit: !13) +// CHECK:STDOUT: !21 = !DILocation(line: 22, column: 3, scope: !18) +// CHECK:STDOUT: !24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !25 = !{null, !24} +// CHECK:STDOUT: !26 = !DISubroutineType(types: !25) +// CHECK:STDOUT: !27 = !DILocation(line: 23, column: 3, scope: !18) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !12, line: 26, type: !15, spFlags: DISPFlagDefinition, unit: !13) +// CHECK:STDOUT: !31 = !DILocation(line: 27, column: 3, scope: !28) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "J", linkageName: "_CJ.Main", scope: null, file: !12, line: 32, type: !15, spFlags: DISPFlagDefinition, unit: !13) +// CHECK:STDOUT: !33 = !DILocation(line: 33, column: 9, scope: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 32, column: 1, scope: !32) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9045abb8230cbcdf", scope: null, file: !4, line: 32, type: !26, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !41) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !24) +// CHECK:STDOUT: !40 = !DILocation(line: 32, column: 1, scope: !35) +// CHECK:STDOUT: !41 = !{!36} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/adapt.carbon b/toolchain/lower/testdata/class/adapt.carbon index afab314a0d0e..1576b1eef2a6 100644 --- a/toolchain/lower/testdata/class/adapt.carbon +++ b/toolchain/lower/testdata/class/adapt.carbon @@ -64,92 +64,79 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: @PairOfInts.val.loc9_28 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMake.PairOfInts.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !32 { +// CHECK:STDOUT: define void @_CMake.PairOfInts.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !30 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_27.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !35 -// CHECK:STDOUT: %.loc9_27.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !35 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @PairOfInts.val.loc9_28, i64 8, i1 false), !dbg !36 -// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: %.loc9_27.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: %.loc9_27.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !33 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @PairOfInts.val.loc9_28, i64 8, i1 false), !dbg !34 +// CHECK:STDOUT: ret void, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMake.PairAdapter.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !37 { +// CHECK:STDOUT: define void @_CMake.PairAdapter.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CMake.PairOfInts.Main(ptr %return), !dbg !40 -// CHECK:STDOUT: ret void, !dbg !41 +// CHECK:STDOUT: call void @_CMake.PairOfInts.Main(ptr %return), !dbg !38 +// CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CGetB.PairAdapter.Main(ptr %self) #0 !dbg !42 { +// CHECK:STDOUT: define i32 @_CGetB.PairAdapter.Main(ptr %self) #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22_14.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !50 -// CHECK:STDOUT: %.loc22_14.2 = load i32, ptr %.loc22_14.1.b, align 4, !dbg !50 -// CHECK:STDOUT: ret i32 %.loc22_14.2, !dbg !51 +// CHECK:STDOUT: %.loc22_14.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !48 +// CHECK:STDOUT: %.loc22_14.2 = load i32, ptr %.loc22_14.1.b, align 4, !dbg !48 +// CHECK:STDOUT: ret i32 %.loc22_14.2, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CUse.Main() #0 !dbg !53 { +// CHECK:STDOUT: define i32 @_CUse.Main() #0 !dbg !51 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %pa.var = alloca { i32, i32 }, align 4, !dbg !56 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %pa.var), !dbg !56 -// CHECK:STDOUT: call void @_CMake.PairAdapter.Main(ptr %pa.var), !dbg !57 -// CHECK:STDOUT: %PairAdapter.GetB.call = call i32 @_CGetB.PairAdapter.Main(ptr %pa.var), !dbg !59 -// CHECK:STDOUT: call void @"_CSelfDestruct.865f2ef613cc5c67:core.Destroy.Core"(ptr %pa.var), !dbg !56 -// CHECK:STDOUT: ret i32 %PairAdapter.GetB.call, !dbg !60 +// CHECK:STDOUT: %pa.var = alloca { i32, i32 }, align 4, !dbg !54 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %pa.var), !dbg !54 +// CHECK:STDOUT: call void @_CMake.PairAdapter.Main(ptr %pa.var), !dbg !55 +// CHECK:STDOUT: %PairAdapter.GetB.call = call i32 @_CGetB.PairAdapter.Main(ptr %pa.var), !dbg !57 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.fb94fb1298d84111(ptr %pa.var), !dbg !54 +// CHECK:STDOUT: ret i32 %PairAdapter.GetB.call, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !61 { +// CHECK:STDOUT: define weak_odr void @"_COp.2508ed710019eba8:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: %.loc27_3.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !61 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc27_3.1.b), !dbg !61 +// CHECK:STDOUT: %.loc27_3.4.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !61 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc27_3.4.a), !dbg !61 +// CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_COp.a031f5a2c623d311:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !65 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc27_3.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !67 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc27_3.1.b), !dbg !67 -// CHECK:STDOUT: %.loc27_3.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !67 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc27_3.2.a), !dbg !67 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc27_3.1.b), !dbg !67 +// CHECK:STDOUT: %.loc27_3.4.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !67 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc27_3.4.a), !dbg !67 // CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !69 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2508ed710019eba8: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.a031f5a2c623d311:core.Destroy.Core"(ptr %self) #0 !dbg !73 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc27_3.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !75 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc27_3.1.b), !dbg !75 -// CHECK:STDOUT: %.loc27_3.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !75 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc27_3.2.a), !dbg !75 -// CHECK:STDOUT: ret void, !dbg !75 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a031f5a2c623d311:core.Destroy.Core"(ptr %self) #0 !dbg !77 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.a031f5a2c623d311: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.865f2ef613cc5c67: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: 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: 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 @_CSelfDestruct.Core.fb94fb1298d84111(ptr %t) #0 !dbg !69 { +// CHECK:STDOUT: ret void, !dbg !74 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !76 { +// CHECK:STDOUT: ret void, !dbg !81 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 3, 2, 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -158,6 +145,7 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "adapt_class.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -168,87 +156,79 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{!20} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !20} +// CHECK:STDOUT: !28 = !{null, !21} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = !{null, !21} -// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.PairOfInts.Main", scope: null, file: !18, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !35 = !DILocation(line: 9, column: 12, scope: !32) -// CHECK:STDOUT: !36 = !DILocation(line: 9, column: 5, scope: !32) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.PairAdapter.Main", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !40 = !DILocation(line: 17, column: 12, scope: !37) -// CHECK:STDOUT: !41 = !DILocation(line: 17, column: 5, scope: !37) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "GetB", linkageName: "_CGetB.PairAdapter.Main", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !21) -// CHECK:STDOUT: !50 = !DILocation(line: 22, column: 12, scope: !42) -// CHECK:STDOUT: !51 = !DILocation(line: 22, column: 5, scope: !42) -// CHECK:STDOUT: !52 = !{!43} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !18, line: 26, type: !27, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !56 = !DILocation(line: 27, column: 3, scope: !53) -// CHECK:STDOUT: !57 = !DILocation(line: 27, column: 25, scope: !53) -// CHECK:STDOUT: !59 = !DILocation(line: 28, column: 10, scope: !53) -// CHECK:STDOUT: !60 = !DILocation(line: 28, column: 3, scope: !53) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 27, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) -// 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.2508ed710019eba8:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !68) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.PairOfInts.Main", scope: null, file: !18, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !33 = !DILocation(line: 9, column: 12, scope: !30) +// CHECK:STDOUT: !34 = !DILocation(line: 9, column: 5, scope: !30) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.PairAdapter.Main", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !38 = !DILocation(line: 17, column: 12, scope: !35) +// CHECK:STDOUT: !39 = !DILocation(line: 17, column: 5, scope: !35) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "GetB", linkageName: "_CGetB.PairAdapter.Main", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !50) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !21) +// CHECK:STDOUT: !48 = !DILocation(line: 22, column: 12, scope: !40) +// CHECK:STDOUT: !49 = !DILocation(line: 22, column: 5, scope: !40) +// CHECK:STDOUT: !50 = !{!41} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !18, line: 26, type: !27, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !54 = !DILocation(line: 27, column: 3, scope: !51) +// CHECK:STDOUT: !55 = !DILocation(line: 27, column: 25, scope: !51) +// CHECK:STDOUT: !57 = !DILocation(line: 28, column: 10, scope: !51) +// CHECK:STDOUT: !58 = !DILocation(line: 28, column: 3, scope: !51) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2508ed710019eba8:core.SubobjectDestroy.Core", scope: null, file: !18, line: 27, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !21) +// CHECK:STDOUT: !61 = !DILocation(line: 27, column: 3, scope: !59) +// CHECK:STDOUT: !62 = !{null, !20} +// CHECK:STDOUT: !63 = !DISubroutineType(types: !62) +// CHECK:STDOUT: !64 = !{!60} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a031f5a2c623d311:core.SubobjectDestroy.Core", scope: null, file: !18, line: 27, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !68) // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !21) // CHECK:STDOUT: !67 = !DILocation(line: 27, column: 3, scope: !65) // CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2508ed710019eba8:core.Destroy.Core", scope: null, file: !18, line: 27, type: !31, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !72) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.fb94fb1298d84111", scope: null, file: !10, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !75) // 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.a031f5a2c623d311: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.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: "SelfDestruct", linkageName: "_CSelfDestruct.865f2ef613cc5c67: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: !74 = !DILocation(line: 32, column: 1, scope: !69) +// CHECK:STDOUT: !75 = !{!70} +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !63, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !82) +// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !20) +// CHECK:STDOUT: !81 = !DILocation(line: 32, column: 1, scope: !76) +// CHECK:STDOUT: !82 = !{!77} // 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 !89 { +// CHECK:STDOUT: define i32 @"_COp.Int.Main:Copy.Core"(i32 %self) #0 !dbg !87 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %self, !dbg !96 +// CHECK:STDOUT: ret i32 %self, !dbg !94 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CDoStuff.Main(i32 %a) #0 !dbg !98 { +// CHECK:STDOUT: define i32 @_CDoStuff.Main(i32 %a) #0 !dbg !96 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.Copy.impl.Op.call = call i32 @"_COp.Int.Main:Copy.Core"(i32 %a), !dbg !103 -// CHECK:STDOUT: ret i32 %Int.as.Copy.impl.Op.call, !dbg !104 +// CHECK:STDOUT: %Int.as.Copy.impl.Op.call = call i32 @"_COp.Int.Main:Copy.Core"(i32 %a), !dbg !101 +// CHECK:STDOUT: ret i32 %Int.as.Copy.impl.Op.call, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!86} +// CHECK:STDOUT: !llvm.dbg.cu = !{!84} // 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: !85 = !DIFile(filename: "adapt_int.carbon", directory: "") -// CHECK:STDOUT: !86 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !85, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !87 = !{!20, !20} -// CHECK:STDOUT: !88 = !DISubroutineType(types: !87) -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.Main:Copy.Core", scope: null, file: !85, line: 8, type: !88, spFlags: DISPFlagDefinition, unit: !86, retainedNodes: !97) -// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !20) -// CHECK:STDOUT: !96 = !DILocation(line: 8, column: 27, scope: !89) -// CHECK:STDOUT: !97 = !{!90} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "DoStuff", linkageName: "_CDoStuff.Main", scope: null, file: !85, line: 12, type: !88, spFlags: DISPFlagDefinition, unit: !86, retainedNodes: !105) -// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !20) -// CHECK:STDOUT: !103 = !DILocation(line: 13, column: 10, scope: !98) -// CHECK:STDOUT: !104 = !DILocation(line: 13, column: 3, scope: !98) -// CHECK:STDOUT: !105 = !{!99} +// CHECK:STDOUT: !83 = !DIFile(filename: "adapt_int.carbon", directory: "") +// CHECK:STDOUT: !84 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !83, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !85 = !{!20, !20} +// CHECK:STDOUT: !86 = !DISubroutineType(types: !85) +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.Main:Copy.Core", scope: null, file: !83, line: 8, type: !86, spFlags: DISPFlagDefinition, unit: !84, retainedNodes: !95) +// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !20) +// CHECK:STDOUT: !94 = !DILocation(line: 8, column: 27, scope: !87) +// CHECK:STDOUT: !95 = !{!88} +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "DoStuff", linkageName: "_CDoStuff.Main", scope: null, file: !83, line: 12, type: !86, spFlags: DISPFlagDefinition, unit: !84, retainedNodes: !103) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !20) +// CHECK:STDOUT: !101 = !DILocation(line: 13, column: 10, scope: !96) +// CHECK:STDOUT: !102 = !DILocation(line: 13, column: 3, scope: !96) +// CHECK:STDOUT: !103 = !{!97} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/basic.carbon b/toolchain/lower/testdata/class/basic.carbon index 0911edab871b..5322aaccfbf0 100644 --- a/toolchain/lower/testdata/class/basic.carbon +++ b/toolchain/lower/testdata/class/basic.carbon @@ -29,70 +29,62 @@ fn Run() { // CHECK:STDOUT: declare void @_CF.Main(ptr sret({ i32, ptr }), ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !30 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !28 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i32, ptr }, align 8, !dbg !31 -// CHECK:STDOUT: %_.var = alloca { i32, ptr }, align 8, !dbg !33 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !33 -// CHECK:STDOUT: call void @_CF.Main(ptr %_.var, ptr %c.var), !dbg !35 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !31 -// CHECK:STDOUT: ret i32 0, !dbg !37 +// CHECK:STDOUT: %c.var = alloca { i32, ptr }, align 8, !dbg !29 +// CHECK:STDOUT: %_.var = alloca { i32, ptr }, align 8, !dbg !31 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !31 +// CHECK:STDOUT: call void @_CF.Main(ptr %_.var, ptr %c.var), !dbg !33 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %_.var), !dbg !31 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %c.var), !dbg !29 +// CHECK:STDOUT: ret i32 0, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !38 { +// CHECK:STDOUT: define weak_odr void @"_COp.430a24cb589cd791:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !36 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: %.loc22_3.1.b = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bc2719126434d85a(ptr %.loc22_3.1.b), !dbg !38 +// CHECK:STDOUT: %.loc22_3.4.a = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc22_3.4.a), !dbg !38 +// CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %self) #0 !dbg !42 { +// CHECK:STDOUT: define weak_odr void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !42 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc22_3.1.b = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !44 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bc2719126434d85a(ptr %.loc22_3.1.b), !dbg !44 +// CHECK:STDOUT: %.loc22_3.4.a = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !44 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc22_3.4.a), !dbg !44 // CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.430a24cb589cd791:core.Destroy.Core"(ptr %self) #0 !dbg !46 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22_3.1.b = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %.loc22_3.1.b), !dbg !48 -// CHECK:STDOUT: %.loc22_3.2.a = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc22_3.2.a), !dbg !48 -// CHECK:STDOUT: ret void, !dbg !48 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.430a24cb589cd791:core.Destroy.Core"(ptr %self) #0 !dbg !50 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.430a24cb589cd791: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 @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !54 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22_3.1.b = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %.loc22_3.1.b), !dbg !56 -// CHECK:STDOUT: %.loc22_3.2.a = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc22_3.2.a), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !56 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !58 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575: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: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !46 { +// CHECK:STDOUT: call void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %t), !dbg !50 +// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.bc2719126434d85a(ptr %t) #0 !dbg !53 { +// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !60 { +// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.356af3b6aef18564, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.bc2719126434d85a, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -102,43 +94,41 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "basic.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{!20} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !26 = !{null, !21} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !21} -// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 21, column: 3, scope: !30) -// CHECK:STDOUT: !33 = !DILocation(line: 22, column: 3, scope: !30) -// CHECK:STDOUT: !35 = !DILocation(line: 22, column: 14, scope: !30) -// CHECK:STDOUT: !37 = !DILocation(line: 20, column: 1, scope: !30) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 22, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.6b633cf020343e69:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 21, column: 3, scope: !28) +// CHECK:STDOUT: !31 = !DILocation(line: 22, column: 3, scope: !28) +// CHECK:STDOUT: !33 = !DILocation(line: 22, column: 14, scope: !28) +// CHECK:STDOUT: !35 = !DILocation(line: 20, column: 1, scope: !28) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.430a24cb589cd791:core.SubobjectDestroy.Core", scope: null, file: !18, line: 22, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) +// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !21) +// CHECK:STDOUT: !38 = !DILocation(line: 22, column: 3, scope: !36) +// CHECK:STDOUT: !39 = !{null, !20} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !{!37} +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.08d9e38b928ba575:core.SubobjectDestroy.Core", scope: null, file: !18, line: 22, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !21) // CHECK:STDOUT: !44 = !DILocation(line: 22, column: 3, scope: !42) // CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.430a24cb589cd791:core.Destroy.Core", scope: null, file: !18, line: 22, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) // 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.430a24cb589cd791: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.08d9e38b928ba575: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.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: !50 = !DILocation(line: 34, column: 5, scope: !46) +// CHECK:STDOUT: !51 = !DILocation(line: 32, column: 1, scope: !46) +// CHECK:STDOUT: !52 = !{!47} +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.bc2719126434d85a", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !21) +// CHECK:STDOUT: !58 = !DILocation(line: 32, column: 1, scope: !53) +// CHECK:STDOUT: !59 = !{!54} +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !40, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !66) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !20) +// CHECK:STDOUT: !65 = !DILocation(line: 32, column: 1, scope: !60) +// CHECK:STDOUT: !66 = !{!61} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/convert.carbon b/toolchain/lower/testdata/class/convert.carbon index defab3e1d4bb..3fbe03d5694f 100644 --- a/toolchain/lower/testdata/class/convert.carbon +++ b/toolchain/lower/testdata/class/convert.carbon @@ -42,7 +42,7 @@ fn F(ref d: partial D) -> ref partial B { // CHECK:STDOUT: ; ModuleID = 'class_to_int.carbon' // CHECK:STDOUT: source_filename = "class_to_int.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @IntWrapper.val.loc14_3 = internal constant { i32 } { i32 42 } +// CHECK:STDOUT: @IntWrapper.val.loc14_3.1 = internal constant { i32 } { i32 42 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define i32 @"_CConvert.IntWrapper.Main:ImplicitAs.55456748a8a2eb70.Core"(ptr %self) #0 !dbg !30 { @@ -64,55 +64,49 @@ fn F(ref d: partial D) -> ref partial B { // CHECK:STDOUT: %w.var = alloca { i32 }, align 4, !dbg !44 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !44 // CHECK:STDOUT: %.loc14_31.3.n = getelementptr inbounds nuw { i32 }, ptr %w.var, i32 0, i32 0, !dbg !45 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %w.var, ptr align 4 @IntWrapper.val.loc14_3, i64 4, i1 false), !dbg !44 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %w.var, ptr align 4 @IntWrapper.val.loc14_3.1, i64 4, i1 false), !dbg !44 // CHECK:STDOUT: %IntWrapper.as.ImplicitAs.impl.Convert.call = call i32 @"_CConvert.IntWrapper.Main:ImplicitAs.55456748a8a2eb70.Core"(ptr %w.var), !dbg !47 // CHECK:STDOUT: call void @_CConsume.Main(i32 %IntWrapper.as.ImplicitAs.impl.Convert.call), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.aecc0ff76a42614a:core.Destroy.Core"(ptr %w.var), !dbg !44 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b75e154fba7ce8d1(ptr %w.var), !dbg !44 // CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !50 { +// CHECK:STDOUT: define weak_odr void @"_COp.4d465ab19434f81c:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !50 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc14_3.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc14_3.1.n), !dbg !52 // CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4d465ab19434f81c:core.Destroy.Core"(ptr %self) #0 !dbg !54 { +// CHECK:STDOUT: define weak_odr void @"_COp.aecc0ff76a42614a:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !54 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc14.n), !dbg !56 +// CHECK:STDOUT: %.loc14_3.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc14_3.1.n), !dbg !56 // CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4d465ab19434f81c:core.Destroy.Core"(ptr %self) #0 !dbg !58 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4d465ab19434f81c: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.aecc0ff76a42614a:core.Destroy.Core"(ptr %self) #0 !dbg !62 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !64 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc14.n), !dbg !64 -// CHECK:STDOUT: ret void, !dbg !64 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.aecc0ff76a42614a:core.Destroy.Core"(ptr %self) #0 !dbg !66 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.aecc0ff76a42614a: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: // 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 @_CSelfDestruct.Core.b75e154fba7ce8d1(ptr %t) #0 !dbg !58 { +// CHECK:STDOUT: call void @"_COp.aecc0ff76a42614a:core.SubobjectDestroy.Core"(ptr %t), !dbg !62 +// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !65 { +// CHECK:STDOUT: ret void, !dbg !70 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -121,6 +115,7 @@ fn F(ref d: partial D) -> ref partial B { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "class_to_int.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -148,52 +143,49 @@ fn F(ref d: partial D) -> ref partial B { // CHECK:STDOUT: !47 = !DILocation(line: 15, column: 11, scope: !43) // CHECK:STDOUT: !48 = !DILocation(line: 15, column: 3, scope: !43) // CHECK:STDOUT: !49 = !DILocation(line: 13, column: 1, scope: !43) -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 14, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !20) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4d465ab19434f81c:core.SubobjectDestroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !21) // CHECK:STDOUT: !52 = !DILocation(line: 14, column: 3, scope: !50) // CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4d465ab19434f81c:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp.aecc0ff76a42614a:core.SubobjectDestroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !21) // CHECK:STDOUT: !56 = !DILocation(line: 14, column: 3, scope: !54) // CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4d465ab19434f81c:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !61) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b75e154fba7ce8d1", scope: null, file: !10, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) // 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.aecc0ff76a42614a: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.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: !62 = !DILocation(line: 34, column: 5, scope: !58) +// CHECK:STDOUT: !63 = !DILocation(line: 32, column: 1, scope: !58) +// CHECK:STDOUT: !64 = !{!59} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !20) +// CHECK:STDOUT: !70 = !DILocation(line: 32, column: 1, scope: !65) +// CHECK:STDOUT: !71 = !{!66} // 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 !74 { +// CHECK:STDOUT: define ptr @_CF.Main(ptr %d) #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_13.1.base = getelementptr inbounds nuw { {} }, ptr %d, i32 0, i32 0, !dbg !80 -// CHECK:STDOUT: ret ptr %.loc7_13.1.base, !dbg !80 +// CHECK:STDOUT: %.loc7_13.1.base = getelementptr inbounds nuw { {} }, ptr %d, i32 0, i32 0, !dbg !82 +// CHECK:STDOUT: ret ptr %.loc7_13.1.base, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!71} +// CHECK:STDOUT: !llvm.dbg.cu = !{!73} // 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: !70 = !DIFile(filename: "partial_class_to_partial_base.carbon", directory: "") -// CHECK:STDOUT: !71 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !70, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !72 = !{!21, !21} -// CHECK:STDOUT: !73 = !DISubroutineType(types: !72) -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !70, line: 6, type: !73, spFlags: DISPFlagDefinition, unit: !71, retainedNodes: !81) -// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !21) -// CHECK:STDOUT: !80 = !DILocation(line: 7, column: 5, scope: !74) -// CHECK:STDOUT: !81 = !{!75} +// CHECK:STDOUT: !72 = !DIFile(filename: "partial_class_to_partial_base.carbon", directory: "") +// CHECK:STDOUT: !73 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !72, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !74 = !{!21, !21} +// CHECK:STDOUT: !75 = !DISubroutineType(types: !74) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !72, line: 6, type: !75, spFlags: DISPFlagDefinition, unit: !73, retainedNodes: !83) +// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !21) +// CHECK:STDOUT: !82 = !DILocation(line: 7, column: 5, scope: !76) +// CHECK:STDOUT: !83 = !{!77} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/field.carbon b/toolchain/lower/testdata/class/field.carbon index 21df7c3ae7fe..f830a19841d3 100644 --- a/toolchain/lower/testdata/class/field.carbon +++ b/toolchain/lower/testdata/class/field.carbon @@ -73,78 +73,72 @@ fn Run() { // CHECK:STDOUT: source_filename = "basic.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF.Main(ptr %c) #0 !dbg !30 { +// CHECK:STDOUT: define i32 @_CF.Main(ptr %c) #0 !dbg !28 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc10_13.1.b = getelementptr inbounds nuw { i32, ptr }, ptr %c, i32 0, i32 1, !dbg !35 -// CHECK:STDOUT: %.loc10_13.2 = load ptr, ptr %.loc10_13.1.b, align 8, !dbg !35 -// CHECK:STDOUT: %.loc10_16.1.a = getelementptr inbounds nuw { i32, ptr }, ptr %.loc10_13.2, i32 0, i32 0, !dbg !37 -// CHECK:STDOUT: %.loc10_16.2 = load i32, ptr %.loc10_16.1.a, align 4, !dbg !37 -// CHECK:STDOUT: ret i32 %.loc10_16.2, !dbg !38 +// CHECK:STDOUT: %.loc10_13.1.b = getelementptr inbounds nuw { i32, ptr }, ptr %c, i32 0, i32 1, !dbg !33 +// CHECK:STDOUT: %.loc10_13.2 = load ptr, ptr %.loc10_13.1.b, align 8, !dbg !33 +// CHECK:STDOUT: %.loc10_16.1.a = getelementptr inbounds nuw { i32, ptr }, ptr %.loc10_13.2, i32 0, i32 0, !dbg !35 +// CHECK:STDOUT: %.loc10_16.2 = load i32, ptr %.loc10_16.1.a, align 4, !dbg !35 +// CHECK:STDOUT: ret i32 %.loc10_16.2, !dbg !36 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !40 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i32, ptr }, align 8, !dbg !43 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !43 -// CHECK:STDOUT: %.loc15_4.a = getelementptr inbounds nuw { i32, ptr }, ptr %c.var, i32 0, i32 0, !dbg !45 -// CHECK:STDOUT: store i32 1, ptr %.loc15_4.a, align 4, !dbg !45 -// CHECK:STDOUT: %.loc16.b = getelementptr inbounds nuw { i32, ptr }, ptr %c.var, i32 0, i32 1, !dbg !46 -// CHECK:STDOUT: store ptr %c.var, ptr %.loc16.b, align 8, !dbg !46 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr %c.var), !dbg !50 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !43 -// CHECK:STDOUT: ret i32 %F.call, !dbg !51 +// CHECK:STDOUT: %c.var = alloca { i32, ptr }, align 8, !dbg !41 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !41 +// CHECK:STDOUT: %.loc15_4.a = getelementptr inbounds nuw { i32, ptr }, ptr %c.var, i32 0, i32 0, !dbg !43 +// CHECK:STDOUT: store i32 1, ptr %.loc15_4.a, align 4, !dbg !43 +// CHECK:STDOUT: %.loc16.b = getelementptr inbounds nuw { i32, ptr }, ptr %c.var, i32 0, i32 1, !dbg !44 +// CHECK:STDOUT: store ptr %c.var, ptr %.loc16.b, align 8, !dbg !44 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr %c.var), !dbg !48 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %c.var), !dbg !41 +// CHECK:STDOUT: ret i32 %F.call, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_COp.430a24cb589cd791:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !50 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: %.loc14_3.1.b = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bc2719126434d85a(ptr %.loc14_3.1.b), !dbg !52 +// CHECK:STDOUT: %.loc14_3.4.a = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc14_3.4.a), !dbg !52 +// CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc14_3.1.b = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !58 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bc2719126434d85a(ptr %.loc14_3.1.b), !dbg !58 +// CHECK:STDOUT: %.loc14_3.4.a = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !58 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc14_3.4.a), !dbg !58 // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.430a24cb589cd791:core.Destroy.Core"(ptr %self) #0 !dbg !60 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14_3.1.b = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !62 -// CHECK:STDOUT: call void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %.loc14_3.1.b), !dbg !62 -// CHECK:STDOUT: %.loc14_3.2.a = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !62 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc14_3.2.a), !dbg !62 -// CHECK:STDOUT: ret void, !dbg !62 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.430a24cb589cd791:core.Destroy.Core"(ptr %self) #0 !dbg !64 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.430a24cb589cd791: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 @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !68 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14_3.1.b = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %.loc14_3.1.b), !dbg !70 -// CHECK:STDOUT: %.loc14_3.2.a = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc14_3.2.a), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !70 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !72 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !74 -// CHECK:STDOUT: ret void, !dbg !74 -// 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 @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !60 { +// CHECK:STDOUT: call void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %t), !dbg !64 +// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.bc2719126434d85a(ptr %t) #0 !dbg !67 { +// CHECK:STDOUT: ret void, !dbg !72 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !74 { +// CHECK:STDOUT: ret void, !dbg !79 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.bc2719126434d85a, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -153,6 +147,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "basic.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -161,46 +156,43 @@ fn Run() { // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{!20} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !26 = !{null, !21} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !21} -// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) -// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !21) -// CHECK:STDOUT: !35 = !DILocation(line: 10, column: 12, scope: !30) -// CHECK:STDOUT: !37 = !DILocation(line: 10, column: 10, scope: !30) -// CHECK:STDOUT: !38 = !DILocation(line: 10, column: 3, scope: !30) -// CHECK:STDOUT: !39 = !{!31} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !43 = !DILocation(line: 14, column: 3, scope: !40) -// CHECK:STDOUT: !45 = !DILocation(line: 15, column: 3, scope: !40) -// CHECK:STDOUT: !46 = !DILocation(line: 16, column: 3, scope: !40) -// CHECK:STDOUT: !50 = !DILocation(line: 17, column: 10, scope: !40) -// CHECK:STDOUT: !51 = !DILocation(line: 17, column: 3, scope: !40) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.6b633cf020343e69:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !37) +// CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !21) +// CHECK:STDOUT: !33 = !DILocation(line: 10, column: 12, scope: !28) +// CHECK:STDOUT: !35 = !DILocation(line: 10, column: 10, scope: !28) +// CHECK:STDOUT: !36 = !DILocation(line: 10, column: 3, scope: !28) +// CHECK:STDOUT: !37 = !{!29} +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !41 = !DILocation(line: 14, column: 3, scope: !38) +// CHECK:STDOUT: !43 = !DILocation(line: 15, column: 3, scope: !38) +// CHECK:STDOUT: !44 = !DILocation(line: 16, column: 3, scope: !38) +// CHECK:STDOUT: !48 = !DILocation(line: 17, column: 10, scope: !38) +// CHECK:STDOUT: !49 = !DILocation(line: 17, column: 3, scope: !38) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp.430a24cb589cd791:core.SubobjectDestroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !21) +// CHECK:STDOUT: !52 = !DILocation(line: 14, column: 3, scope: !50) +// CHECK:STDOUT: !53 = !{null, !20} +// CHECK:STDOUT: !54 = !DISubroutineType(types: !53) +// CHECK:STDOUT: !55 = !{!51} +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "Op", linkageName: "_COp.08d9e38b928ba575:core.SubobjectDestroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !21) // CHECK:STDOUT: !58 = !DILocation(line: 14, column: 3, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.430a24cb589cd791:core.Destroy.Core", scope: null, file: !18, line: 14, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !66) // 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.430a24cb589cd791: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.08d9e38b928ba575: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.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: !64 = !DILocation(line: 34, column: 5, scope: !60) +// CHECK:STDOUT: !65 = !DILocation(line: 32, column: 1, scope: !60) +// CHECK:STDOUT: !66 = !{!61} +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.bc2719126434d85a", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !73) +// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !21) +// CHECK:STDOUT: !72 = !DILocation(line: 32, column: 1, scope: !67) +// CHECK:STDOUT: !73 = !{!68} +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !54, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !80) +// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !20) +// CHECK:STDOUT: !79 = !DILocation(line: 32, column: 1, scope: !74) +// CHECK:STDOUT: !80 = !{!75} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'inplace_init_with_nonconst.carbon' @@ -209,71 +201,39 @@ 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 !78 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %o.var = alloca {}, align 1, !dbg !79 -// CHECK:STDOUT: %_.var = alloca { ptr, {} }, align 8, !dbg !81 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %o.var), !dbg !79 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !81 -// CHECK:STDOUT: %.loc15_33.2.a = getelementptr inbounds nuw { ptr, {} }, ptr %_.var, i32 0, i32 0, !dbg !84 -// CHECK:STDOUT: store ptr %o.var, ptr %.loc15_33.2.a, align 8, !dbg !84 -// CHECK:STDOUT: %.loc15_33.4.b = getelementptr inbounds nuw { ptr, {} }, ptr %_.var, i32 0, i32 1, !dbg !84 -// 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 !84 -// CHECK:STDOUT: call void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %_.var), !dbg !81 -// CHECK:STDOUT: call void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %o.var), !dbg !79 -// CHECK:STDOUT: ret i32 0, !dbg !86 +// CHECK:STDOUT: %o.var = alloca {}, align 1, !dbg !84 +// CHECK:STDOUT: %_.var = alloca { ptr, {} }, align 8, !dbg !86 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %o.var), !dbg !84 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !86 +// CHECK:STDOUT: %.loc15_33.2.a = getelementptr inbounds nuw { ptr, {} }, ptr %_.var, i32 0, i32 0, !dbg !89 +// CHECK:STDOUT: store ptr %o.var, ptr %.loc15_33.2.a, align 8, !dbg !89 +// CHECK:STDOUT: %.loc15_33.4.b = getelementptr inbounds nuw { ptr, {} }, ptr %_.var, i32 0, i32 1, !dbg !89 +// 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 !89 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bbd1117e7624c951(ptr %_.var), !dbg !86 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6804c0187df0ed58(ptr %o.var), !dbg !84 +// CHECK:STDOUT: ret i32 0, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core"(ptr %self) #0 !dbg !87 { +// CHECK:STDOUT: define weak_odr void @"_COp.fa5d2a8a45149476:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !92 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: %.loc15_3.1.b = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 1, !dbg !94 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6804c0187df0ed58(ptr %.loc15_3.1.b), !dbg !94 +// CHECK:STDOUT: %.loc15_3.4.a = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 0, !dbg !94 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8ded91761d540301(ptr %.loc15_3.4.a), !dbg !94 +// CHECK:STDOUT: ret void, !dbg !94 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_COp.2fbae80a61a11ec7:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !96 { // 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.6a519b95f6f059eb: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.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !99 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_3.1.b = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 1, !dbg !101 -// CHECK:STDOUT: call void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %.loc15_3.1.b), !dbg !101 -// CHECK:STDOUT: %.loc15_3.2.a = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 0, !dbg !101 -// CHECK:STDOUT: call void @"_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core"(ptr %.loc15_3.2.a), !dbg !101 -// CHECK:STDOUT: ret void, !dbg !101 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !103 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.fa5d2a8a45149476: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.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !107 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_3.1.b = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 1, !dbg !109 -// CHECK:STDOUT: call void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %.loc15_3.1.b), !dbg !109 -// CHECK:STDOUT: %.loc15_3.2.a = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 0, !dbg !109 -// CHECK:STDOUT: call void @"_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core"(ptr %.loc15_3.2.a), !dbg !109 -// CHECK:STDOUT: ret void, !dbg !109 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !111 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self), !dbg !113 -// CHECK:STDOUT: ret void, !dbg !113 +// CHECK:STDOUT: %.loc15_3.1.b = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 1, !dbg !98 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6804c0187df0ed58(ptr %.loc15_3.1.b), !dbg !98 +// CHECK:STDOUT: %.loc15_3.4.a = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 0, !dbg !98 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8ded91761d540301(ptr %.loc15_3.4.a), !dbg !98 +// CHECK:STDOUT: ret void, !dbg !98 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -282,58 +242,70 @@ fn Run() { // 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 @_CSelfDestruct.Core.bbd1117e7624c951(ptr %t) #0 !dbg !100 { +// CHECK:STDOUT: call void @"_COp.2fbae80a61a11ec7:core.SubobjectDestroy.Core"(ptr %t), !dbg !104 +// CHECK:STDOUT: ret void, !dbg !105 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6804c0187df0ed58(ptr %t) #0 !dbg !107 { +// CHECK:STDOUT: ret void, !dbg !112 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8ded91761d540301(ptr %t) #0 !dbg !114 { +// CHECK:STDOUT: ret void, !dbg !119 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6804c0187df0ed58, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.8ded91761d540301, { 1, 0 } // 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 = !{!77} +// CHECK:STDOUT: !llvm.dbg.cu = !{!82} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{!20} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !28 = !{null, !21} -// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !76 = !DIFile(filename: "inplace_init_with_nonconst.carbon", directory: "") -// CHECK:STDOUT: !77 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !76, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !76, line: 11, type: !25, spFlags: DISPFlagDefinition, unit: !77) -// CHECK:STDOUT: !79 = !DILocation(line: 12, column: 3, scope: !78) -// CHECK:STDOUT: !81 = !DILocation(line: 15, column: 3, scope: !78) -// CHECK:STDOUT: !84 = !DILocation(line: 15, column: 16, scope: !78) -// CHECK:STDOUT: !86 = !DILocation(line: 11, column: 1, scope: !78) -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core", scope: null, file: !76, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !90) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !21) -// CHECK:STDOUT: !89 = !DILocation(line: 15, column: 3, scope: !87) -// CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !76, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !77, 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.6a519b95f6f059eb:core.Destroy.Core", scope: null, file: !76, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !77, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !76, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !77, 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: "SelfDestruct", linkageName: "_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !76, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !77, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !76, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !110) +// CHECK:STDOUT: !26 = !{null, !21} +// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) +// CHECK:STDOUT: !81 = !DIFile(filename: "inplace_init_with_nonconst.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: "Run", linkageName: "main", scope: null, file: !81, line: 11, type: !25, spFlags: DISPFlagDefinition, unit: !82) +// CHECK:STDOUT: !84 = !DILocation(line: 12, column: 3, scope: !83) +// CHECK:STDOUT: !86 = !DILocation(line: 15, column: 3, scope: !83) +// CHECK:STDOUT: !89 = !DILocation(line: 15, column: 16, scope: !83) +// CHECK:STDOUT: !91 = !DILocation(line: 11, column: 1, scope: !83) +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fa5d2a8a45149476:core.SubobjectDestroy.Core", scope: null, file: !81, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !95) +// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !21) +// CHECK:STDOUT: !94 = !DILocation(line: 15, column: 3, scope: !92) +// CHECK:STDOUT: !95 = !{!93} +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2fbae80a61a11ec7:core.SubobjectDestroy.Core", scope: null, file: !81, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !99) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !21) +// CHECK:STDOUT: !98 = !DILocation(line: 15, column: 3, scope: !96) +// CHECK:STDOUT: !99 = !{!97} +// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.bbd1117e7624c951", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !106) +// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !21) +// CHECK:STDOUT: !104 = !DILocation(line: 34, column: 5, scope: !100) +// CHECK:STDOUT: !105 = !DILocation(line: 32, column: 1, scope: !100) +// CHECK:STDOUT: !106 = !{!101} +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6804c0187df0ed58", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !113) // 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: "SelfDestruct", linkageName: "_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !76, line: 15, type: !29, spFlags: DISPFlagDefinition, unit: !77, 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: !112 = !DILocation(line: 32, column: 1, scope: !107) +// CHECK:STDOUT: !113 = !{!108} +// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8ded91761d540301", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !82, retainedNodes: !120) +// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !21) +// CHECK:STDOUT: !119 = !DILocation(line: 32, column: 1, scope: !114) +// CHECK:STDOUT: !120 = !{!115} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'implicit_init_with_nonempty_nonconst.carbon' @@ -342,96 +314,56 @@ 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 !117 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !123 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %o.var = alloca { i32 }, align 4, !dbg !118 -// CHECK:STDOUT: %_.var = alloca <{ ptr, { i32 } }>, align 8, !dbg !120 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %o.var), !dbg !118 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !120 -// CHECK:STDOUT: %.loc17_40.2.a = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %_.var, i32 0, i32 0, !dbg !123 -// CHECK:STDOUT: store ptr %o.var, ptr %.loc17_40.2.a, align 8, !dbg !123 -// CHECK:STDOUT: %.loc17_40.4.b = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %_.var, i32 0, i32 1, !dbg !123 -// CHECK:STDOUT: %.loc17_39.3.v = getelementptr inbounds nuw { i32 }, ptr %.loc17_40.4.b, i32 0, i32 0, !dbg !124 -// 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 !123 -// CHECK:STDOUT: call void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %_.var), !dbg !120 -// CHECK:STDOUT: call void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %o.var), !dbg !118 -// CHECK:STDOUT: ret i32 0, !dbg !126 +// CHECK:STDOUT: %o.var = alloca { i32 }, align 4, !dbg !124 +// CHECK:STDOUT: %_.var = alloca <{ ptr, { i32 } }>, align 8, !dbg !126 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %o.var), !dbg !124 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !126 +// CHECK:STDOUT: %.loc17_40.2.a = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %_.var, i32 0, i32 0, !dbg !129 +// CHECK:STDOUT: store ptr %o.var, ptr %.loc17_40.2.a, align 8, !dbg !129 +// CHECK:STDOUT: %.loc17_40.4.b = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %_.var, i32 0, i32 1, !dbg !129 +// CHECK:STDOUT: %.loc17_39.3.v = getelementptr inbounds nuw { i32 }, ptr %.loc17_40.4.b, i32 0, i32 0, !dbg !130 +// 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 !129 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bbd1117e7624c951(ptr %_.var), !dbg !126 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6804c0187df0ed58(ptr %o.var), !dbg !124 +// CHECK:STDOUT: ret i32 0, !dbg !132 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core"(ptr %self) #0 !dbg !127 { +// CHECK:STDOUT: define weak_odr void @"_COp.8ce97e948e8f3b32:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !133 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !129 +// CHECK:STDOUT: %.loc17_3.1.v = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !135 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc17_3.1.v), !dbg !135 +// CHECK:STDOUT: ret void, !dbg !135 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !131 { +// CHECK:STDOUT: define weak_odr void @"_COp.6a519b95f6f059eb:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !137 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !133 +// CHECK:STDOUT: %.loc17_3.1.v = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !139 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc17_3.1.v), !dbg !139 +// CHECK:STDOUT: ret void, !dbg !139 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8ce97e948e8f3b32:core.Destroy.Core"(ptr %self) #0 !dbg !135 { +// CHECK:STDOUT: define weak_odr void @"_COp.fa5d2a8a45149476:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !141 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17.v = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !137 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc17.v), !dbg !137 -// CHECK:STDOUT: ret void, !dbg !137 +// CHECK:STDOUT: %.loc17_3.1.b = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %self, i32 0, i32 1, !dbg !143 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6804c0187df0ed58(ptr %.loc17_3.1.b), !dbg !143 +// CHECK:STDOUT: %.loc17_3.4.a = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %self, i32 0, i32 0, !dbg !143 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8ded91761d540301(ptr %.loc17_3.4.a), !dbg !143 +// CHECK:STDOUT: ret void, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8ce97e948e8f3b32:core.Destroy.Core"(ptr %self) #0 !dbg !139 { +// CHECK:STDOUT: define weak_odr void @"_COp.2fbae80a61a11ec7:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !145 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8ce97e948e8f3b32:core.Destroy.Core"(ptr %self), !dbg !141 -// CHECK:STDOUT: ret void, !dbg !141 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.6a519b95f6f059eb:core.Destroy.Core"(ptr %self) #0 !dbg !143 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17.v = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !145 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc17.v), !dbg !145 -// CHECK:STDOUT: ret void, !dbg !145 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %self) #0 !dbg !147 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.6a519b95f6f059eb: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 @"_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !151 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_3.1.b = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %self, i32 0, i32 1, !dbg !153 -// CHECK:STDOUT: call void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %.loc17_3.1.b), !dbg !153 -// CHECK:STDOUT: %.loc17_3.2.a = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %self, i32 0, i32 0, !dbg !153 -// CHECK:STDOUT: call void @"_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core"(ptr %.loc17_3.2.a), !dbg !153 -// CHECK:STDOUT: ret void, !dbg !153 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core"(ptr %self) #0 !dbg !155 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.fa5d2a8a45149476: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 @"_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !159 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_3.1.b = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %self, i32 0, i32 1, !dbg !161 -// CHECK:STDOUT: call void @"_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core"(ptr %.loc17_3.1.b), !dbg !161 -// CHECK:STDOUT: %.loc17_3.2.a = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %self, i32 0, i32 0, !dbg !161 -// CHECK:STDOUT: call void @"_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core"(ptr %.loc17_3.2.a), !dbg !161 -// CHECK:STDOUT: ret void, !dbg !161 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self) #0 !dbg !163 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core"(ptr %self), !dbg !165 -// CHECK:STDOUT: ret void, !dbg !165 +// CHECK:STDOUT: %.loc17_3.1.b = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %self, i32 0, i32 1, !dbg !147 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6804c0187df0ed58(ptr %.loc17_3.1.b), !dbg !147 +// CHECK:STDOUT: %.loc17_3.4.a = getelementptr inbounds nuw <{ ptr, { i32 } }>, ptr %self, i32 0, i32 0, !dbg !147 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8ded91761d540301(ptr %.loc17_3.4.a), !dbg !147 +// CHECK:STDOUT: ret void, !dbg !147 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -440,71 +372,91 @@ fn Run() { // 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 @_CSelfDestruct.Core.bbd1117e7624c951(ptr %t) #0 !dbg !149 { +// CHECK:STDOUT: call void @"_COp.2fbae80a61a11ec7:core.SubobjectDestroy.Core"(ptr %t), !dbg !153 +// CHECK:STDOUT: ret void, !dbg !154 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6804c0187df0ed58(ptr %t) #0 !dbg !156 { +// CHECK:STDOUT: call void @"_COp.6a519b95f6f059eb:core.SubobjectDestroy.Core"(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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !163 { +// CHECK:STDOUT: ret void, !dbg !168 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8ded91761d540301(ptr %t) #0 !dbg !170 { +// CHECK:STDOUT: ret void, !dbg !175 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6804c0187df0ed58, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.8ded91761d540301, { 1, 0 } // 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 = !{!116} +// CHECK:STDOUT: !llvm.dbg.cu = !{!122} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{!20} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !26 = !{null, !21} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !21} -// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !115 = !DIFile(filename: "implicit_init_with_nonempty_nonconst.carbon", directory: "") -// CHECK:STDOUT: !116 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !115, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !115, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !116) -// CHECK:STDOUT: !118 = !DILocation(line: 14, column: 3, scope: !117) -// CHECK:STDOUT: !120 = !DILocation(line: 17, column: 3, scope: !117) -// CHECK:STDOUT: !123 = !DILocation(line: 17, column: 16, scope: !117) -// CHECK:STDOUT: !124 = !DILocation(line: 17, column: 31, scope: !117) -// CHECK:STDOUT: !126 = !DILocation(line: 13, column: 1, scope: !117) -// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d7c3fbe4c84d0842:core.Destroy.Core", scope: null, file: !115, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !130) -// CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !127, type: !21) -// CHECK:STDOUT: !129 = !DILocation(line: 17, column: 3, scope: !127) -// CHECK:STDOUT: !130 = !{!128} -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !115, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !134) -// CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !20) -// CHECK:STDOUT: !133 = !DILocation(line: 17, column: 3, scope: !131) -// CHECK:STDOUT: !134 = !{!132} -// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8ce97e948e8f3b32:core.Destroy.Core", scope: null, file: !115, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !138) -// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !21) -// CHECK:STDOUT: !137 = !DILocation(line: 17, column: 3, scope: !135) -// CHECK:STDOUT: !138 = !{!136} -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8ce97e948e8f3b32:core.Destroy.Core", scope: null, file: !115, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !142) -// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !21) -// CHECK:STDOUT: !141 = !DILocation(line: 17, column: 3, scope: !139) -// CHECK:STDOUT: !142 = !{!140} -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.6a519b95f6f059eb:core.Destroy.Core", scope: null, file: !115, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !116, 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: "SelfDestruct", linkageName: "_CSelfDestruct.6a519b95f6f059eb:core.Destroy.Core", scope: null, file: !115, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !116, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !115, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !116, 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: "SelfDestruct", linkageName: "_CSelfDestruct.fa5d2a8a45149476:core.Destroy.Core", scope: null, file: !115, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !116, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !115, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !116, 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: "SelfDestruct", linkageName: "_CSelfDestruct.2fbae80a61a11ec7:core.Destroy.Core", scope: null, file: !115, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !116, 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: !53 = !{null, !20} +// CHECK:STDOUT: !54 = !DISubroutineType(types: !53) +// CHECK:STDOUT: !121 = !DIFile(filename: "implicit_init_with_nonempty_nonconst.carbon", directory: "") +// CHECK:STDOUT: !122 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !121, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !121, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !122) +// CHECK:STDOUT: !124 = !DILocation(line: 14, column: 3, scope: !123) +// CHECK:STDOUT: !126 = !DILocation(line: 17, column: 3, scope: !123) +// CHECK:STDOUT: !129 = !DILocation(line: 17, column: 16, scope: !123) +// CHECK:STDOUT: !130 = !DILocation(line: 17, column: 31, scope: !123) +// CHECK:STDOUT: !132 = !DILocation(line: 13, column: 1, scope: !123) +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8ce97e948e8f3b32:core.SubobjectDestroy.Core", scope: null, file: !121, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !136) +// CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !21) +// CHECK:STDOUT: !135 = !DILocation(line: 17, column: 3, scope: !133) +// CHECK:STDOUT: !136 = !{!134} +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6a519b95f6f059eb:core.SubobjectDestroy.Core", scope: null, file: !121, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !140) +// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !21) +// CHECK:STDOUT: !139 = !DILocation(line: 17, column: 3, scope: !137) +// CHECK:STDOUT: !140 = !{!138} +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fa5d2a8a45149476:core.SubobjectDestroy.Core", scope: null, file: !121, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !144) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !21) +// CHECK:STDOUT: !143 = !DILocation(line: 17, column: 3, scope: !141) +// CHECK:STDOUT: !144 = !{!142} +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2fbae80a61a11ec7:core.SubobjectDestroy.Core", scope: null, file: !121, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !148) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !21) +// CHECK:STDOUT: !147 = !DILocation(line: 17, column: 3, scope: !145) +// CHECK:STDOUT: !148 = !{!146} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.bbd1117e7624c951", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !155) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !21) +// CHECK:STDOUT: !153 = !DILocation(line: 34, column: 5, scope: !149) +// CHECK:STDOUT: !154 = !DILocation(line: 32, column: 1, scope: !149) +// CHECK:STDOUT: !155 = !{!150} +// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6804c0187df0ed58", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !162) +// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !21) +// CHECK:STDOUT: !160 = !DILocation(line: 34, column: 5, scope: !156) +// CHECK:STDOUT: !161 = !DILocation(line: 32, column: 1, scope: !156) +// CHECK:STDOUT: !162 = !{!157} +// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !54, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !169) +// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !20) +// CHECK:STDOUT: !168 = !DILocation(line: 32, column: 1, scope: !163) +// CHECK:STDOUT: !169 = !{!164} +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8ded91761d540301", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !176) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !21) +// CHECK:STDOUT: !175 = !DILocation(line: 32, column: 1, scope: !170) +// CHECK:STDOUT: !176 = !{!171} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/generic.carbon b/toolchain/lower/testdata/class/generic.carbon index a8e4e75a1b5a..5b4e38ac5888 100644 --- a/toolchain/lower/testdata/class/generic.carbon +++ b/toolchain/lower/testdata/class/generic.carbon @@ -290,202 +290,135 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: ; ModuleID = 'access.carbon' // CHECK:STDOUT: source_filename = "access.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @C.val.b50.loc16_3 = internal constant { i1, i32 } { i1 true, i32 0 } -// CHECK:STDOUT: @C.val.988.loc26_3 = internal constant { i1, {} } { i1 true, {} zeroinitializer } -// CHECK:STDOUT: @C.val.519.loc31_3 = internal constant { i1, { i32, i32, i32 } } { i1 true, { i32, i32, i32 } { i32 1, i32 2, i32 3 } } +// CHECK:STDOUT: @C.val.b50.loc16_3.1 = internal constant { i1, i32 } { i1 true, i32 0 } +// CHECK:STDOUT: @C.val.988.loc26_3.1 = internal constant { i1, {} } { i1 true, {} zeroinitializer } +// CHECK:STDOUT: @C.val.519.loc31_3.1 = internal constant { i1, { i32, i32, i32 } } { i1 true, { i32, i32, i32 } { i32 1, i32 2, i32 3 } } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CAccessBool.Main() #0 !dbg !133 { +// CHECK:STDOUT: define i1 @_CAccessBool.Main() #0 !dbg !131 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i1, i32 }, align 4, !dbg !136 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !136 -// CHECK:STDOUT: %.loc16_37.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 0, !dbg !137 -// CHECK:STDOUT: %.loc16_37.5.w = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 1, !dbg !137 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.b50.loc16_3, i64 8, i1 false), !dbg !136 -// CHECK:STDOUT: %C.GetBool.call = call i1 @_CGetBool.C.Main.2fad9574e050607e(ptr %c.var), !dbg !139 -// CHECK:STDOUT: call void @"_CSelfDestruct.60fa09dfa67c3255:core.Destroy.Core"(ptr %c.var), !dbg !136 -// CHECK:STDOUT: ret i1 %C.GetBool.call, !dbg !140 +// CHECK:STDOUT: %c.var = alloca { i1, i32 }, align 4, !dbg !134 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !134 +// CHECK:STDOUT: %.loc16_37.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 0, !dbg !135 +// CHECK:STDOUT: %.loc16_37.5.w = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 1, !dbg !135 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.b50.loc16_3.1, i64 8, i1 false), !dbg !134 +// CHECK:STDOUT: %C.GetBool.call = call i1 @_CGetBool.C.Main.2fad9574e050607e(ptr %c.var), !dbg !137 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ab3d3663b9d81a60(ptr %c.var), !dbg !134 +// CHECK:STDOUT: ret i1 %C.GetBool.call, !dbg !138 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !141 { +// CHECK:STDOUT: define weak_odr void @"_COp.9cc75fcc6aa0f77e:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !139 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !143 +// CHECK:STDOUT: %.loc16_3.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !141 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_3.1.w), !dbg !141 +// CHECK:STDOUT: %.loc16_3.4.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !141 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %.loc16_3.4.v), !dbg !141 +// CHECK:STDOUT: ret void, !dbg !141 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !145 { +// CHECK:STDOUT: define weak_odr void @"_COp.60fa09dfa67c3255:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !145 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc16_3.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !147 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_3.1.w), !dbg !147 +// CHECK:STDOUT: %.loc16_3.4.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !147 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %.loc16_3.4.v), !dbg !147 // CHECK:STDOUT: ret void, !dbg !147 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.9cc75fcc6aa0f77e:core.Destroy.Core"(ptr %self) #0 !dbg !149 { +// CHECK:STDOUT: define i32 @_CAccessInt.Main() #0 !dbg !149 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !151 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_3.1.w), !dbg !151 -// CHECK:STDOUT: %.loc16_3.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !151 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc16_3.2.v), !dbg !151 -// CHECK:STDOUT: ret void, !dbg !151 +// CHECK:STDOUT: %c.var = alloca { i1, i32 }, align 4, !dbg !152 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !152 +// CHECK:STDOUT: %.loc21_37.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 0, !dbg !153 +// CHECK:STDOUT: %.loc21_37.5.w = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 1, !dbg !153 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.b50.loc16_3.1, i64 8, i1 false), !dbg !152 +// CHECK:STDOUT: %C.GetT.call = call i32 @_CGetT.C.Main.2fad9574e050607e(ptr %c.var), !dbg !155 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ab3d3663b9d81a60(ptr %c.var), !dbg !152 +// CHECK:STDOUT: ret i32 %C.GetT.call, !dbg !158 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9cc75fcc6aa0f77e:core.Destroy.Core"(ptr %self) #0 !dbg !153 { +// CHECK:STDOUT: define void @_CAccessEmpty.Main() #0 !dbg !159 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.9cc75fcc6aa0f77e:core.Destroy.Core"(ptr %self), !dbg !155 -// CHECK:STDOUT: ret void, !dbg !155 +// CHECK:STDOUT: %c.var = alloca { i1, {} }, align 1, !dbg !162 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !162 +// CHECK:STDOUT: %.loc26_37.2.v = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 0, !dbg !163 +// CHECK:STDOUT: %.loc26_37.4.w = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 1, !dbg !163 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.988.loc26_3.1, i64 1, i1 false), !dbg !162 +// CHECK:STDOUT: call void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %c.var), !dbg !165 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.3900ebc9e1b9b76c(ptr %c.var), !dbg !162 +// CHECK:STDOUT: ret void, !dbg !166 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.60fa09dfa67c3255:core.Destroy.Core"(ptr %self) #0 !dbg !157 { +// CHECK:STDOUT: define weak_odr void @"_COp.82468d70c8d12e86:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !167 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !159 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_3.1.w), !dbg !159 -// CHECK:STDOUT: %.loc16_3.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !159 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc16_3.2.v), !dbg !159 -// CHECK:STDOUT: ret void, !dbg !159 +// CHECK:STDOUT: %.loc26_3.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !169 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %.loc26_3.1.w), !dbg !169 +// CHECK:STDOUT: %.loc26_3.4.v = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 0, !dbg !169 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %.loc26_3.4.v), !dbg !169 +// CHECK:STDOUT: ret void, !dbg !169 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.60fa09dfa67c3255:core.Destroy.Core"(ptr %self) #0 !dbg !161 { +// CHECK:STDOUT: define weak_odr void @"_COp.c5eb22fa295bd608:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !171 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.60fa09dfa67c3255:core.Destroy.Core"(ptr %self), !dbg !163 -// CHECK:STDOUT: ret void, !dbg !163 +// CHECK:STDOUT: %.loc26_3.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !173 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %.loc26_3.1.w), !dbg !173 +// CHECK:STDOUT: %.loc26_3.4.v = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 0, !dbg !173 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %.loc26_3.4.v), !dbg !173 +// CHECK:STDOUT: ret void, !dbg !173 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CAccessInt.Main() #0 !dbg !165 { +// CHECK:STDOUT: define void @_CAccessTuple.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !175 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i1, i32 }, align 4, !dbg !168 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !168 -// CHECK:STDOUT: %.loc21_37.2.v = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 0, !dbg !169 -// CHECK:STDOUT: %.loc21_37.5.w = getelementptr inbounds nuw { i1, i32 }, ptr %c.var, i32 0, i32 1, !dbg !169 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.b50.loc16_3, i64 8, i1 false), !dbg !168 -// CHECK:STDOUT: %C.GetT.call = call i32 @_CGetT.C.Main.2fad9574e050607e(ptr %c.var), !dbg !171 -// CHECK:STDOUT: call void @"_CSelfDestruct.60fa09dfa67c3255:core.Destroy.Core"(ptr %c.var), !dbg !168 -// CHECK:STDOUT: ret i32 %C.GetT.call, !dbg !174 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CAccessEmpty.Main() #0 !dbg !175 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i1, {} }, align 1, !dbg !178 +// CHECK:STDOUT: %c.var = alloca { i1, { i32, i32, i32 } }, align 4, !dbg !178 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !178 -// CHECK:STDOUT: %.loc26_37.2.v = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 0, !dbg !179 -// CHECK:STDOUT: %.loc26_37.4.w = getelementptr inbounds nuw { i1, {} }, ptr %c.var, i32 0, i32 1, !dbg !179 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.988.loc26_3, i64 1, i1 false), !dbg !178 -// CHECK:STDOUT: call void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %c.var), !dbg !181 -// CHECK:STDOUT: call void @"_CSelfDestruct.c5eb22fa295bd608:core.Destroy.Core"(ptr %c.var), !dbg !178 -// CHECK:STDOUT: ret void, !dbg !182 +// CHECK:STDOUT: %.loc31_57.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 0, !dbg !179 +// CHECK:STDOUT: %.loc31_57.4.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 1, !dbg !179 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 0, !dbg !180 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 1, !dbg !180 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 2, !dbg !180 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.519.loc31_3.1, i64 16, i1 false), !dbg !178 +// CHECK:STDOUT: call void @_CGetT.C.Main.2d2ea40c1a2cefdc(ptr %return, ptr %c.var), !dbg !182 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.771b959080479bc3(ptr %c.var), !dbg !178 +// CHECK:STDOUT: ret void, !dbg !183 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !183 { +// CHECK:STDOUT: define weak_odr void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !184 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !185 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !186 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem2.tuple.elem), !dbg !186 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !186 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !186 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !186 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !186 +// CHECK:STDOUT: ret void, !dbg !186 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core"(ptr %self) #0 !dbg !187 { +// CHECK:STDOUT: define weak_odr void @"_COp.05c1094bbb356a00:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !188 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc26_3.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !189 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc26_3.1.w), !dbg !189 -// CHECK:STDOUT: %.loc26_3.2.v = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 0, !dbg !189 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc26_3.2.v), !dbg !189 -// CHECK:STDOUT: ret void, !dbg !189 +// CHECK:STDOUT: %.loc31_3.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !190 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %.loc31_3.1.w), !dbg !190 +// CHECK:STDOUT: %.loc31_3.4.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !190 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %.loc31_3.4.v), !dbg !190 +// CHECK:STDOUT: ret void, !dbg !190 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.82468d70c8d12e86:core.Destroy.Core"(ptr %self) #0 !dbg !191 { +// CHECK:STDOUT: define weak_odr void @"_COp.5086a777629bcf0b:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !192 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core"(ptr %self), !dbg !193 -// CHECK:STDOUT: ret void, !dbg !193 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.c5eb22fa295bd608:core.Destroy.Core"(ptr %self) #0 !dbg !195 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc26_3.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !197 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc26_3.1.w), !dbg !197 -// CHECK:STDOUT: %.loc26_3.2.v = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 0, !dbg !197 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc26_3.2.v), !dbg !197 -// CHECK:STDOUT: ret void, !dbg !197 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c5eb22fa295bd608:core.Destroy.Core"(ptr %self) #0 !dbg !199 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c5eb22fa295bd608: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 void @_CAccessTuple.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !203 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i1, { i32, i32, i32 } }, align 4, !dbg !206 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !206 -// CHECK:STDOUT: %.loc31_57.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 0, !dbg !207 -// CHECK:STDOUT: %.loc31_57.4.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %c.var, i32 0, i32 1, !dbg !207 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 0, !dbg !208 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 1, !dbg !208 -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc31_57.4.w, i32 0, i32 2, !dbg !208 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @C.val.519.loc31_3, i64 16, i1 false), !dbg !206 -// CHECK:STDOUT: call void @_CGetT.C.Main.2d2ea40c1a2cefdc(ptr %return, ptr %c.var), !dbg !210 -// CHECK:STDOUT: call void @"_CSelfDestruct.5086a777629bcf0b:core.Destroy.Core"(ptr %c.var), !dbg !206 -// CHECK:STDOUT: ret void, !dbg !211 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !212 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !214 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !214 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !214 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !214 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !214 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !214 -// CHECK:STDOUT: ret void, !dbg !214 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !216 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self), !dbg !218 -// CHECK:STDOUT: ret void, !dbg !218 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.05c1094bbb356a00:core.Destroy.Core"(ptr %self) #0 !dbg !220 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc31_3.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !222 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %.loc31_3.1.w), !dbg !222 -// CHECK:STDOUT: %.loc31_3.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !222 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc31_3.2.v), !dbg !222 -// CHECK:STDOUT: ret void, !dbg !222 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.05c1094bbb356a00:core.Destroy.Core"(ptr %self) #0 !dbg !224 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.05c1094bbb356a00:core.Destroy.Core"(ptr %self), !dbg !226 -// CHECK:STDOUT: ret void, !dbg !226 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5086a777629bcf0b:core.Destroy.Core"(ptr %self) #0 !dbg !228 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc31_3.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !230 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %.loc31_3.1.w), !dbg !230 -// CHECK:STDOUT: %.loc31_3.2.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !230 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc31_3.2.v), !dbg !230 -// CHECK:STDOUT: ret void, !dbg !230 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5086a777629bcf0b:core.Destroy.Core"(ptr %self) #0 !dbg !232 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5086a777629bcf0b:core.Destroy.Core"(ptr %self), !dbg !234 -// CHECK:STDOUT: ret void, !dbg !234 +// CHECK:STDOUT: %.loc31_3.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !194 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %.loc31_3.1.w), !dbg !194 +// CHECK:STDOUT: %.loc31_3.4.v = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !194 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %.loc31_3.4.v), !dbg !194 +// CHECK:STDOUT: ret void, !dbg !194 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -495,57 +428,101 @@ 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.2fad9574e050607e(ptr %self) #0 !dbg !236 { +// CHECK:STDOUT: define linkonce_odr i1 @_CGetBool.C.Main.2fad9574e050607e(ptr %self) #0 !dbg !196 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6_16.1.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !241 -// CHECK:STDOUT: %.loc6_16.2 = load i8, ptr %.loc6_16.1.v, align 1, !dbg !241 -// CHECK:STDOUT: %.loc6_16.21 = trunc i8 %.loc6_16.2 to i1, !dbg !241 -// CHECK:STDOUT: ret i1 %.loc6_16.21, !dbg !242 +// CHECK:STDOUT: %.loc6_16.1.v = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 0, !dbg !201 +// CHECK:STDOUT: %.loc6_16.2 = load i8, ptr %.loc6_16.1.v, align 1, !dbg !201 +// CHECK:STDOUT: %.loc6_16.21 = trunc i8 %.loc6_16.2 to i1, !dbg !201 +// CHECK:STDOUT: ret i1 %.loc6_16.21, !dbg !202 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGetT.C.Main.2fad9574e050607e(ptr %self) #0 !dbg !244 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !249 -// CHECK:STDOUT: %.loc9_16.2 = load i32, ptr %.loc9_16.1.w, align 4, !dbg !249 -// CHECK:STDOUT: ret i32 %.loc9_16.2, !dbg !250 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ab3d3663b9d81a60(ptr %t) #0 !dbg !204 { +// CHECK:STDOUT: call void @"_COp.60fa09dfa67c3255:core.SubobjectDestroy.Core"(ptr %t), !dbg !208 +// CHECK:STDOUT: ret void, !dbg !209 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %self) #0 !dbg !252 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !257 -// CHECK:STDOUT: ret void, !dbg !258 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !211 { +// CHECK:STDOUT: ret void, !dbg !216 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.2d2ea40c1a2cefdc(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !260 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !265 -// CHECK:STDOUT: call void @"_COp.6753b13effab4291:Copy.Core.dc98eaa6ba6c4450"(ptr %return, ptr %.loc9_16.1.w), !dbg !265 -// CHECK:STDOUT: ret void, !dbg !266 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %t) #0 !dbg !218 { +// CHECK:STDOUT: ret void, !dbg !223 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.6753b13effab4291:Copy.Core.dc98eaa6ba6c4450"(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !268 { -// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !273 -// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !273 -// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !274 -// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !275 -// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !275 -// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !274 -// CHECK:STDOUT: %tuple.elem5 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !276 -// CHECK:STDOUT: %tuple.elem.load6 = load i32, ptr %tuple.elem5, align 4, !dbg !276 -// CHECK:STDOUT: %tuple.elem7 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !274 -// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !274 -// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !274 -// CHECK:STDOUT: store i32 %tuple.elem.load6, ptr %tuple.elem7, align 4, !dbg !274 -// CHECK:STDOUT: ret void, !dbg !277 +// CHECK:STDOUT: define linkonce_odr i32 @_CGetT.C.Main.2fad9574e050607e(ptr %self) #0 !dbg !225 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, i32 }, ptr %self, i32 0, i32 1, !dbg !230 +// CHECK:STDOUT: %.loc9_16.2 = load i32, ptr %.loc9_16.1.w, align 4, !dbg !230 +// CHECK:STDOUT: ret i32 %.loc9_16.2, !dbg !231 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.22bf4b2f6c4322a2(ptr %self) #0 !dbg !233 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, {} }, ptr %self, i32 0, i32 1, !dbg !238 +// CHECK:STDOUT: ret void, !dbg !239 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.3900ebc9e1b9b76c(ptr %t) #0 !dbg !241 { +// CHECK:STDOUT: call void @"_COp.c5eb22fa295bd608:core.SubobjectDestroy.Core"(ptr %t), !dbg !245 +// CHECK:STDOUT: ret void, !dbg !246 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %t) #0 !dbg !248 { +// CHECK:STDOUT: ret void, !dbg !253 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CGetT.C.Main.2d2ea40c1a2cefdc(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !255 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc9_16.1.w = getelementptr inbounds nuw { i1, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !260 +// CHECK:STDOUT: call void @"_COp.6753b13effab4291:Copy.Core.dc98eaa6ba6c4450"(ptr %return, ptr %.loc9_16.1.w), !dbg !260 +// CHECK:STDOUT: ret void, !dbg !261 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.771b959080479bc3(ptr %t) #0 !dbg !263 { +// CHECK:STDOUT: call void @"_COp.5086a777629bcf0b:core.SubobjectDestroy.Core"(ptr %t), !dbg !267 +// CHECK:STDOUT: ret void, !dbg !268 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %t) #0 !dbg !270 { +// CHECK:STDOUT: call void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %t), !dbg !274 +// CHECK:STDOUT: ret void, !dbg !275 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @"_COp.6753b13effab4291:Copy.Core.dc98eaa6ba6c4450"(ptr sret({ i32, i32, i32 }) %return, ptr %self) #0 !dbg !277 { +// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !282 +// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !282 +// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !283 +// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !284 +// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !284 +// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !283 +// CHECK:STDOUT: %tuple.elem5 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !285 +// CHECK:STDOUT: %tuple.elem.load6 = load i32, ptr %tuple.elem5, align 4, !dbg !285 +// CHECK:STDOUT: %tuple.elem7 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !283 +// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !283 +// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !283 +// CHECK:STDOUT: store i32 %tuple.elem.load6, ptr %tuple.elem7, align 4, !dbg !283 +// CHECK:STDOUT: ret void, !dbg !286 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.ab3d3663b9d81a60, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.29e6aa423646b61a, { 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9045abb8230cbcdf, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6e65c86a129b7677, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -556,6 +533,7 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !11 = !DIFile(filename: "min_prelude/parts/copy.carbon", directory: "") +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !38 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !40 = !{!39} @@ -566,129 +544,121 @@ fn AccessTuple() -> (i32, i32, i32) { // CHECK:STDOUT: !124 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !123, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !125 = !{null, !39} // CHECK:STDOUT: !126 = !DISubroutineType(types: !125) -// CHECK:STDOUT: !127 = !{null, !38} +// CHECK:STDOUT: !127 = !{!38} // CHECK:STDOUT: !128 = !DISubroutineType(types: !127) -// CHECK:STDOUT: !129 = !{!38} +// CHECK:STDOUT: !129 = !{null} // CHECK:STDOUT: !130 = !DISubroutineType(types: !129) -// CHECK:STDOUT: !131 = !{null} -// CHECK:STDOUT: !132 = !DISubroutineType(types: !131) -// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "AccessBool", linkageName: "_CAccessBool.Main", scope: null, file: !123, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !124) -// CHECK:STDOUT: !136 = !DILocation(line: 16, column: 3, scope: !133) -// CHECK:STDOUT: !137 = !DILocation(line: 16, column: 19, scope: !133) -// CHECK:STDOUT: !139 = !DILocation(line: 17, column: 10, scope: !133) -// CHECK:STDOUT: !140 = !DILocation(line: 17, column: 3, scope: !133) -// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !144) -// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !39) -// CHECK:STDOUT: !143 = !DILocation(line: 16, column: 3, scope: !141) -// CHECK:STDOUT: !144 = !{!142} -// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !123, line: 16, type: !128, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !148) -// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !38) +// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "AccessBool", linkageName: "_CAccessBool.Main", scope: null, file: !123, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !124) +// CHECK:STDOUT: !134 = !DILocation(line: 16, column: 3, scope: !131) +// CHECK:STDOUT: !135 = !DILocation(line: 16, column: 19, scope: !131) +// CHECK:STDOUT: !137 = !DILocation(line: 17, column: 10, scope: !131) +// CHECK:STDOUT: !138 = !DILocation(line: 17, column: 3, scope: !131) +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "Op", linkageName: "_COp.9cc75fcc6aa0f77e:core.SubobjectDestroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !144) +// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !39) +// CHECK:STDOUT: !141 = !DILocation(line: 16, column: 3, scope: !139) +// CHECK:STDOUT: !142 = !{null, !38} +// CHECK:STDOUT: !143 = !DISubroutineType(types: !142) +// CHECK:STDOUT: !144 = !{!140} +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "Op", linkageName: "_COp.60fa09dfa67c3255:core.SubobjectDestroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !148) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !39) // CHECK:STDOUT: !147 = !DILocation(line: 16, column: 3, scope: !145) // CHECK:STDOUT: !148 = !{!146} -// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9cc75fcc6aa0f77e:core.Destroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !152) -// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !39) -// CHECK:STDOUT: !151 = !DILocation(line: 16, column: 3, scope: !149) -// CHECK:STDOUT: !152 = !{!150} -// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9cc75fcc6aa0f77e:core.Destroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !156) -// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !39) -// CHECK:STDOUT: !155 = !DILocation(line: 16, column: 3, scope: !153) -// CHECK:STDOUT: !156 = !{!154} -// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.60fa09dfa67c3255:core.Destroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !160) -// CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !39) -// CHECK:STDOUT: !159 = !DILocation(line: 16, column: 3, scope: !157) -// CHECK:STDOUT: !160 = !{!158} -// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.60fa09dfa67c3255:core.Destroy.Core", scope: null, file: !123, line: 16, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !164) -// CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !39) -// CHECK:STDOUT: !163 = !DILocation(line: 16, column: 3, scope: !161) -// CHECK:STDOUT: !164 = !{!162} -// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "AccessInt", linkageName: "_CAccessInt.Main", scope: null, file: !123, line: 20, type: !130, spFlags: DISPFlagDefinition, unit: !124) -// CHECK:STDOUT: !168 = !DILocation(line: 21, column: 3, scope: !165) -// CHECK:STDOUT: !169 = !DILocation(line: 21, column: 19, scope: !165) -// CHECK:STDOUT: !171 = !DILocation(line: 22, column: 10, scope: !165) -// CHECK:STDOUT: !172 = !{!38, !39} -// CHECK:STDOUT: !173 = !DISubroutineType(types: !172) -// CHECK:STDOUT: !174 = !DILocation(line: 22, column: 3, scope: !165) -// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "AccessEmpty", linkageName: "_CAccessEmpty.Main", scope: null, file: !123, line: 25, type: !132, spFlags: DISPFlagDefinition, unit: !124) -// CHECK:STDOUT: !178 = !DILocation(line: 26, column: 3, scope: !175) -// CHECK:STDOUT: !179 = !DILocation(line: 26, column: 18, scope: !175) -// CHECK:STDOUT: !181 = !DILocation(line: 27, column: 10, scope: !175) -// CHECK:STDOUT: !182 = !DILocation(line: 27, column: 3, scope: !175) -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !186) -// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !39) -// CHECK:STDOUT: !185 = !DILocation(line: 26, column: 3, scope: !183) -// CHECK:STDOUT: !186 = !{!184} -// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.82468d70c8d12e86:core.Destroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !190) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !39) -// CHECK:STDOUT: !189 = !DILocation(line: 26, column: 3, scope: !187) -// CHECK:STDOUT: !190 = !{!188} -// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.82468d70c8d12e86:core.Destroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !194) -// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !39) -// CHECK:STDOUT: !193 = !DILocation(line: 26, column: 3, scope: !191) -// CHECK:STDOUT: !194 = !{!192} -// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c5eb22fa295bd608:core.Destroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !198) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !39) -// CHECK:STDOUT: !197 = !DILocation(line: 26, column: 3, scope: !195) -// CHECK:STDOUT: !198 = !{!196} -// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c5eb22fa295bd608:core.Destroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !202) -// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !39) -// CHECK:STDOUT: !201 = !DILocation(line: 26, column: 3, scope: !199) -// CHECK:STDOUT: !202 = !{!200} -// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "AccessTuple", linkageName: "_CAccessTuple.Main", scope: null, file: !123, line: 30, type: !41, spFlags: DISPFlagDefinition, unit: !124) -// CHECK:STDOUT: !206 = !DILocation(line: 31, column: 3, scope: !203) -// CHECK:STDOUT: !207 = !DILocation(line: 31, column: 31, scope: !203) -// CHECK:STDOUT: !208 = !DILocation(line: 31, column: 48, scope: !203) -// CHECK:STDOUT: !210 = !DILocation(line: 32, column: 10, scope: !203) -// CHECK:STDOUT: !211 = !DILocation(line: 32, column: 3, scope: !203) -// CHECK:STDOUT: !212 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !215) -// CHECK:STDOUT: !213 = !DILocalVariable(arg: 1, scope: !212, type: !39) -// CHECK:STDOUT: !214 = !DILocation(line: 31, column: 3, scope: !212) -// CHECK:STDOUT: !215 = !{!213} -// CHECK:STDOUT: !216 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.abce894028f59bc0:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !219) -// CHECK:STDOUT: !217 = !DILocalVariable(arg: 1, scope: !216, type: !39) -// CHECK:STDOUT: !218 = !DILocation(line: 31, column: 3, scope: !216) -// CHECK:STDOUT: !219 = !{!217} -// CHECK:STDOUT: !220 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.05c1094bbb356a00:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !223) -// CHECK:STDOUT: !221 = !DILocalVariable(arg: 1, scope: !220, type: !39) -// CHECK:STDOUT: !222 = !DILocation(line: 31, column: 3, scope: !220) -// CHECK:STDOUT: !223 = !{!221} -// CHECK:STDOUT: !224 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.05c1094bbb356a00:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !227) -// CHECK:STDOUT: !225 = !DILocalVariable(arg: 1, scope: !224, type: !39) -// CHECK:STDOUT: !226 = !DILocation(line: 31, column: 3, scope: !224) -// CHECK:STDOUT: !227 = !{!225} -// CHECK:STDOUT: !228 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5086a777629bcf0b:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !231) -// CHECK:STDOUT: !229 = !DILocalVariable(arg: 1, scope: !228, type: !39) -// CHECK:STDOUT: !230 = !DILocation(line: 31, column: 3, scope: !228) -// CHECK:STDOUT: !231 = !{!229} -// CHECK:STDOUT: !232 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5086a777629bcf0b:core.Destroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !235) -// CHECK:STDOUT: !233 = !DILocalVariable(arg: 1, scope: !232, type: !39) -// CHECK:STDOUT: !234 = !DILocation(line: 31, column: 3, scope: !232) -// CHECK:STDOUT: !235 = !{!233} -// CHECK:STDOUT: !236 = distinct !DISubprogram(name: "GetBool", linkageName: "_CGetBool.C.Main.2fad9574e050607e", scope: null, file: !123, line: 5, type: !110, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !243) -// CHECK:STDOUT: !237 = !DILocalVariable(arg: 1, scope: !236, type: !39) -// CHECK:STDOUT: !241 = !DILocation(line: 6, column: 12, scope: !236) -// CHECK:STDOUT: !242 = !DILocation(line: 6, column: 5, scope: !236) -// CHECK:STDOUT: !243 = !{!237} -// CHECK:STDOUT: !244 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.2fad9574e050607e", scope: null, file: !123, line: 8, type: !173, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !251) -// CHECK:STDOUT: !245 = !DILocalVariable(arg: 1, scope: !244, type: !39) -// CHECK:STDOUT: !249 = !DILocation(line: 9, column: 12, scope: !244) -// CHECK:STDOUT: !250 = !DILocation(line: 9, column: 5, scope: !244) -// CHECK:STDOUT: !251 = !{!245} -// CHECK:STDOUT: !252 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.22bf4b2f6c4322a2", scope: null, file: !123, line: 8, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !259) -// CHECK:STDOUT: !253 = !DILocalVariable(arg: 1, scope: !252, type: !39) -// CHECK:STDOUT: !257 = !DILocation(line: 9, column: 12, scope: !252) -// CHECK:STDOUT: !258 = !DILocation(line: 9, column: 5, scope: !252) -// CHECK:STDOUT: !259 = !{!253} -// CHECK:STDOUT: !260 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.2d2ea40c1a2cefdc", scope: null, file: !123, line: 8, type: !110, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !267) -// CHECK:STDOUT: !261 = !DILocalVariable(arg: 1, scope: !260, type: !39) -// CHECK:STDOUT: !265 = !DILocation(line: 9, column: 12, scope: !260) -// CHECK:STDOUT: !266 = !DILocation(line: 9, column: 5, scope: !260) -// CHECK:STDOUT: !267 = !{!261} -// CHECK:STDOUT: !268 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6753b13effab4291:Copy.Core.dc98eaa6ba6c4450", scope: null, file: !11, line: 58, type: !110, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !278) -// CHECK:STDOUT: !269 = !DILocalVariable(arg: 1, scope: !268, type: !39) -// CHECK:STDOUT: !273 = !DILocation(line: 59, column: 13, scope: !268) -// CHECK:STDOUT: !274 = !DILocation(line: 59, column: 12, scope: !268) -// CHECK:STDOUT: !275 = !DILocation(line: 59, column: 26, scope: !268) -// CHECK:STDOUT: !276 = !DILocation(line: 59, column: 39, scope: !268) -// CHECK:STDOUT: !277 = !DILocation(line: 59, column: 5, scope: !268) -// CHECK:STDOUT: !278 = !{!269} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "AccessInt", linkageName: "_CAccessInt.Main", scope: null, file: !123, line: 20, type: !128, spFlags: DISPFlagDefinition, unit: !124) +// CHECK:STDOUT: !152 = !DILocation(line: 21, column: 3, scope: !149) +// CHECK:STDOUT: !153 = !DILocation(line: 21, column: 19, scope: !149) +// CHECK:STDOUT: !155 = !DILocation(line: 22, column: 10, scope: !149) +// CHECK:STDOUT: !156 = !{!38, !39} +// CHECK:STDOUT: !157 = !DISubroutineType(types: !156) +// CHECK:STDOUT: !158 = !DILocation(line: 22, column: 3, scope: !149) +// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "AccessEmpty", linkageName: "_CAccessEmpty.Main", scope: null, file: !123, line: 25, type: !130, spFlags: DISPFlagDefinition, unit: !124) +// CHECK:STDOUT: !162 = !DILocation(line: 26, column: 3, scope: !159) +// CHECK:STDOUT: !163 = !DILocation(line: 26, column: 18, scope: !159) +// CHECK:STDOUT: !165 = !DILocation(line: 27, column: 10, scope: !159) +// CHECK:STDOUT: !166 = !DILocation(line: 27, column: 3, scope: !159) +// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "Op", linkageName: "_COp.82468d70c8d12e86:core.SubobjectDestroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !170) +// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !39) +// CHECK:STDOUT: !169 = !DILocation(line: 26, column: 3, scope: !167) +// CHECK:STDOUT: !170 = !{!168} +// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c5eb22fa295bd608:core.SubobjectDestroy.Core", scope: null, file: !123, line: 26, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !174) +// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !39) +// CHECK:STDOUT: !173 = !DILocation(line: 26, column: 3, scope: !171) +// CHECK:STDOUT: !174 = !{!172} +// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "AccessTuple", linkageName: "_CAccessTuple.Main", scope: null, file: !123, line: 30, type: !41, spFlags: DISPFlagDefinition, unit: !124) +// CHECK:STDOUT: !178 = !DILocation(line: 31, column: 3, scope: !175) +// CHECK:STDOUT: !179 = !DILocation(line: 31, column: 31, scope: !175) +// CHECK:STDOUT: !180 = !DILocation(line: 31, column: 48, scope: !175) +// CHECK:STDOUT: !182 = !DILocation(line: 32, column: 10, scope: !175) +// CHECK:STDOUT: !183 = !DILocation(line: 32, column: 3, scope: !175) +// CHECK:STDOUT: !184 = distinct !DISubprogram(name: "Op", linkageName: "_COp.abce894028f59bc0:core.SubobjectDestroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !187) +// CHECK:STDOUT: !185 = !DILocalVariable(arg: 1, scope: !184, type: !39) +// CHECK:STDOUT: !186 = !DILocation(line: 31, column: 3, scope: !184) +// CHECK:STDOUT: !187 = !{!185} +// CHECK:STDOUT: !188 = distinct !DISubprogram(name: "Op", linkageName: "_COp.05c1094bbb356a00:core.SubobjectDestroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !191) +// CHECK:STDOUT: !189 = !DILocalVariable(arg: 1, scope: !188, type: !39) +// CHECK:STDOUT: !190 = !DILocation(line: 31, column: 3, scope: !188) +// CHECK:STDOUT: !191 = !{!189} +// CHECK:STDOUT: !192 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5086a777629bcf0b:core.SubobjectDestroy.Core", scope: null, file: !123, line: 31, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !195) +// CHECK:STDOUT: !193 = !DILocalVariable(arg: 1, scope: !192, type: !39) +// CHECK:STDOUT: !194 = !DILocation(line: 31, column: 3, scope: !192) +// CHECK:STDOUT: !195 = !{!193} +// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "GetBool", linkageName: "_CGetBool.C.Main.2fad9574e050607e", scope: null, file: !123, line: 5, type: !110, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !203) +// CHECK:STDOUT: !197 = !DILocalVariable(arg: 1, scope: !196, type: !39) +// CHECK:STDOUT: !201 = !DILocation(line: 6, column: 12, scope: !196) +// CHECK:STDOUT: !202 = !DILocation(line: 6, column: 5, scope: !196) +// CHECK:STDOUT: !203 = !{!197} +// CHECK:STDOUT: !204 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ab3d3663b9d81a60", scope: null, file: !26, line: 32, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !210) +// CHECK:STDOUT: !205 = !DILocalVariable(arg: 1, scope: !204, type: !39) +// CHECK:STDOUT: !208 = !DILocation(line: 34, column: 5, scope: !204) +// CHECK:STDOUT: !209 = !DILocation(line: 32, column: 1, scope: !204) +// CHECK:STDOUT: !210 = !{!205} +// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 32, type: !143, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !217) +// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !38) +// CHECK:STDOUT: !216 = !DILocation(line: 32, column: 1, scope: !211) +// CHECK:STDOUT: !217 = !{!212} +// CHECK:STDOUT: !218 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.29e6aa423646b61a", scope: null, file: !26, line: 32, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !224) +// CHECK:STDOUT: !219 = !DILocalVariable(arg: 1, scope: !218, type: !39) +// CHECK:STDOUT: !223 = !DILocation(line: 32, column: 1, scope: !218) +// CHECK:STDOUT: !224 = !{!219} +// CHECK:STDOUT: !225 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.2fad9574e050607e", scope: null, file: !123, line: 8, type: !157, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !232) +// CHECK:STDOUT: !226 = !DILocalVariable(arg: 1, scope: !225, type: !39) +// CHECK:STDOUT: !230 = !DILocation(line: 9, column: 12, scope: !225) +// CHECK:STDOUT: !231 = !DILocation(line: 9, column: 5, scope: !225) +// CHECK:STDOUT: !232 = !{!226} +// CHECK:STDOUT: !233 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.22bf4b2f6c4322a2", scope: null, file: !123, line: 8, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !240) +// CHECK:STDOUT: !234 = !DILocalVariable(arg: 1, scope: !233, type: !39) +// CHECK:STDOUT: !238 = !DILocation(line: 9, column: 12, scope: !233) +// CHECK:STDOUT: !239 = !DILocation(line: 9, column: 5, scope: !233) +// CHECK:STDOUT: !240 = !{!234} +// CHECK:STDOUT: !241 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.3900ebc9e1b9b76c", scope: null, file: !26, line: 32, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !247) +// CHECK:STDOUT: !242 = !DILocalVariable(arg: 1, scope: !241, type: !39) +// CHECK:STDOUT: !245 = !DILocation(line: 34, column: 5, scope: !241) +// CHECK:STDOUT: !246 = !DILocation(line: 32, column: 1, scope: !241) +// CHECK:STDOUT: !247 = !{!242} +// CHECK:STDOUT: !248 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9045abb8230cbcdf", scope: null, file: !26, line: 32, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !254) +// CHECK:STDOUT: !249 = !DILocalVariable(arg: 1, scope: !248, type: !39) +// CHECK:STDOUT: !253 = !DILocation(line: 32, column: 1, scope: !248) +// CHECK:STDOUT: !254 = !{!249} +// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "GetT", linkageName: "_CGetT.C.Main.2d2ea40c1a2cefdc", scope: null, file: !123, line: 8, type: !110, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !262) +// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !39) +// CHECK:STDOUT: !260 = !DILocation(line: 9, column: 12, scope: !255) +// CHECK:STDOUT: !261 = !DILocation(line: 9, column: 5, scope: !255) +// CHECK:STDOUT: !262 = !{!256} +// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.771b959080479bc3", scope: null, file: !26, line: 32, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !269) +// CHECK:STDOUT: !264 = !DILocalVariable(arg: 1, scope: !263, type: !39) +// CHECK:STDOUT: !267 = !DILocation(line: 34, column: 5, scope: !263) +// CHECK:STDOUT: !268 = !DILocation(line: 32, column: 1, scope: !263) +// CHECK:STDOUT: !269 = !{!264} +// CHECK:STDOUT: !270 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6e65c86a129b7677", scope: null, file: !26, line: 32, type: !126, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !276) +// CHECK:STDOUT: !271 = !DILocalVariable(arg: 1, scope: !270, type: !39) +// CHECK:STDOUT: !274 = !DILocation(line: 34, column: 5, scope: !270) +// CHECK:STDOUT: !275 = !DILocation(line: 32, column: 1, scope: !270) +// CHECK:STDOUT: !276 = !{!271} +// CHECK:STDOUT: !277 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6753b13effab4291:Copy.Core.dc98eaa6ba6c4450", scope: null, file: !11, line: 58, type: !110, spFlags: DISPFlagDefinition, unit: !124, retainedNodes: !287) +// CHECK:STDOUT: !278 = !DILocalVariable(arg: 1, scope: !277, type: !39) +// CHECK:STDOUT: !282 = !DILocation(line: 59, column: 13, scope: !277) +// CHECK:STDOUT: !283 = !DILocation(line: 59, column: 12, scope: !277) +// CHECK:STDOUT: !284 = !DILocation(line: 59, column: 26, scope: !277) +// CHECK:STDOUT: !285 = !DILocation(line: 59, column: 39, scope: !277) +// CHECK:STDOUT: !286 = !DILocation(line: 59, column: 5, scope: !277) +// CHECK:STDOUT: !287 = !{!278} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/static.carbon b/toolchain/lower/testdata/class/static.carbon index 2a74cf5af8b0..a84466813026 100644 --- a/toolchain/lower/testdata/class/static.carbon +++ b/toolchain/lower/testdata/class/static.carbon @@ -104,34 +104,27 @@ fn Run() -> i32 { // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind // CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.C.Main"(ptr %self) #1 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(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.cb8adced19392b99:core.Destroy.Core"(ptr %self) #2 !dbg !47 { +// CHECK:STDOUT: define i32 @main() #2 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: %F.call = call i32 @_Z1Fv(), !dbg !50 +// CHECK:STDOUT: ret i32 %F.call, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// 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: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #2 !dbg !55 { +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #2 !dbg !55 { +// CHECK:STDOUT: define internal void @_C__global_init.Main() #2 !dbg !52 { // CHECK:STDOUT: entry: -// 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 internal void @_C__global_init.Main() #2 !dbg !60 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: store i32 123, ptr @_Cx.C.Main, align 4, !dbg !61 -// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: store i32 123, ptr @_Cx.C.Main, align 4, !dbg !53 +// CHECK:STDOUT: ret void, !dbg !54 // 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" } @@ -139,8 +132,8 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #2 = { nounwind } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!37} -// CHECK:STDOUT: !llvm.module.flags = !{!63, !64, !65, !6, !7} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!67} +// CHECK:STDOUT: !llvm.module.flags = !{!62, !63, !64, !6, !7} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!66} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0} @@ -148,6 +141,7 @@ fn Run() -> i32 { // CHECK:STDOUT: !3 = !{!2, !2, i64 0} // CHECK:STDOUT: !6 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !7 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !14 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !24 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !25 = !{null} // CHECK:STDOUT: !26 = !DISubroutineType(types: !25) @@ -162,23 +156,19 @@ fn Run() -> i32 { // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !38) // CHECK:STDOUT: !45 = !DILocation(line: 4, column: 1, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !36, line: 4, type: !40, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !50) -// 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: "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: "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: !47 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !36, line: 14, type: !42, spFlags: DISPFlagDefinition, unit: !37) +// CHECK:STDOUT: !50 = !DILocation(line: 15, column: 10, scope: !47) +// CHECK:STDOUT: !51 = !DILocation(line: 15, column: 3, scope: !47) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !36, type: !26, spFlags: DISPFlagDefinition, unit: !37) +// CHECK:STDOUT: !53 = !DILocation(line: 5, column: 10, scope: !52) +// CHECK:STDOUT: !54 = !DILocation(line: 0, scope: !52) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !14, line: 32, type: !40, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !61) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !38) +// CHECK:STDOUT: !60 = !DILocation(line: 32, column: 1, scope: !55) +// CHECK:STDOUT: !61 = !{!56} +// CHECK:STDOUT: !62 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !63 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !64 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !65 = !{!"__libc_errno", !2, i64 0} +// CHECK:STDOUT: !66 = !{!65, !2, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/virtual.carbon b/toolchain/lower/testdata/class/virtual.carbon index 96ae54b02802..b5da52abebc6 100644 --- a/toolchain/lower/testdata/class/virtual.carbon +++ b/toolchain/lower/testdata/class/virtual.carbon @@ -270,8 +270,8 @@ fn Use() { // CHECK:STDOUT: // CHECK:STDOUT: @"_CIntermediate.Classes.$vtable" = external unnamed_addr constant ptr // CHECK:STDOUT: @"_CDerived.Classes.$vtable" = external unnamed_addr constant ptr -// CHECK:STDOUT: @Base.val.loc7_3 = internal constant {} zeroinitializer -// CHECK:STDOUT: @Intermediate.val.54b.loc8_3 = internal constant { ptr, {} } { ptr @"_CIntermediate.Classes.$vtable", {} zeroinitializer } +// CHECK:STDOUT: @Base.val.loc7_3.1 = internal constant {} zeroinitializer +// CHECK:STDOUT: @Intermediate.val.54b.loc8_3.1 = internal constant { ptr, {} } { ptr @"_CIntermediate.Classes.$vtable", {} zeroinitializer } // CHECK:STDOUT: @Derived.val.loc9_49.5 = internal constant { { ptr, {} } } { { ptr, {} } { ptr poison, {} zeroinitializer } } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind @@ -282,11 +282,11 @@ fn Use() { // CHECK:STDOUT: %_.var.loc9 = alloca { { ptr, {} } }, align 8, !dbg !48 // CHECK:STDOUT: %_.var.loc12 = alloca { { ptr, {} } }, align 8, !dbg !52 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc7), !dbg !43 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc7, ptr align 1 @Base.val.loc7_3, i64 0, i1 false), !dbg !43 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc7, ptr align 1 @Base.val.loc7_3.1, i64 0, i1 false), !dbg !43 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc8), !dbg !45 // CHECK:STDOUT: %.loc8_44.2.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %_.var.loc8, i32 0, i32 0, !dbg !46 // CHECK:STDOUT: %.loc8_44.4.base = getelementptr inbounds nuw { ptr, {} }, ptr %_.var.loc8, i32 0, i32 1, !dbg !46 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc8, ptr align 8 @Intermediate.val.54b.loc8_3, i64 8, i1 false), !dbg !45 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc8, ptr align 8 @Intermediate.val.54b.loc8_3.1, i64 8, i1 false), !dbg !45 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc9), !dbg !48 // CHECK:STDOUT: %.loc9_49.2.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %_.var.loc9, i32 0, i32 0, !dbg !49 // CHECK:STDOUT: %.loc9_48.2.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %.loc9_49.2.base, i32 0, i32 0, !dbg !50 @@ -296,10 +296,10 @@ fn Use() { // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc9, ptr align 8 @Derived.val.loc9_49.5, i64 8, i1 false), !dbg !49 // CHECK:STDOUT: store ptr @"_CDerived.Classes.$vtable", ptr %.loc9_49.7.vptr, align 8, !dbg !49 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc12), !dbg !52 -// CHECK:STDOUT: call void @"_CSelfDestruct.43ed5d0e08fc7556:core.Destroy.Core"(ptr %_.var.loc12), !dbg !52 -// CHECK:STDOUT: call void @"_CSelfDestruct.43ed5d0e08fc7556:core.Destroy.Core"(ptr %_.var.loc9), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.4487e305711510e9:core.Destroy.Core"(ptr %_.var.loc8), !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.bf085e1f873e33df:core.Destroy.Core"(ptr %_.var.loc7), !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.782e958155c50b7f(ptr %_.var.loc12), !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.782e958155c50b7f(ptr %_.var.loc9), !dbg !48 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.cdf25659568e17c7(ptr %_.var.loc8), !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.1a272360695ec208(ptr %_.var.loc7), !dbg !43 // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -308,92 +308,46 @@ fn Use() { // CHECK:STDOUT: declare void @"_CFn:thunk:Intermediate.Classes:Derived.Classes"(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_COp.f7b08e0f33b30342:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !55 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc12_3.1.base = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 1, !dbg !57 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.1a272360695ec208(ptr %.loc12_3.1.base), !dbg !57 +// CHECK:STDOUT: %.loc12_3.4.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 0, !dbg !57 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %.loc12_3.4.vptr), !dbg !57 // CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_COp.4487e305711510e9:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !59 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc12_3.1.base = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 1, !dbg !61 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.1a272360695ec208(ptr %.loc12_3.1.base), !dbg !61 // CHECK:STDOUT: ret void, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bf085e1f873e33df:core.Destroy.Core"(ptr %self) #0 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_COp.3c3534e993db7939:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !63 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc12_3.1.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %self, i32 0, i32 0, !dbg !65 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.cdf25659568e17c7(ptr %.loc12_3.1.base), !dbg !65 // CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f7b08e0f33b30342:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define weak_odr void @"_COp.43ed5d0e08fc7556:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12_3.1.base = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 1, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.bf085e1f873e33df:core.Destroy.Core"(ptr %.loc12_3.1.base), !dbg !69 -// CHECK:STDOUT: %.loc12_3.2.vptr = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 0, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %.loc12_3.2.vptr), !dbg !69 +// CHECK:STDOUT: %.loc12_3.1.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %self, i32 0, i32 0, !dbg !69 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.cdf25659568e17c7(ptr %.loc12_3.1.base), !dbg !69 // CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f7b08e0f33b30342:core.Destroy.Core"(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: define void @_CUse.Create(ptr %v) #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 @"_CSubobjectDestroy.4487e305711510e9:core.Destroy.Core"(ptr %self) #0 !dbg !75 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12.base = getelementptr inbounds nuw { ptr, {} }, ptr %self, i32 0, i32 1, !dbg !77 -// CHECK:STDOUT: call void @"_CSelfDestruct.bf085e1f873e33df:core.Destroy.Core"(ptr %.loc12.base), !dbg !77 -// CHECK:STDOUT: ret void, !dbg !77 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// 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 @"_CSubobjectDestroy.3c3534e993db7939:core.Destroy.Core"(ptr %self) #0 !dbg !83 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %self, i32 0, i32 0, !dbg !85 -// CHECK:STDOUT: call void @"_CSelfDestruct.4487e305711510e9:core.Destroy.Core"(ptr %.loc12.base), !dbg !85 -// CHECK:STDOUT: ret void, !dbg !85 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// 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 @"_CSubobjectDestroy.43ed5d0e08fc7556:core.Destroy.Core"(ptr %self) #0 !dbg !91 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12.base = getelementptr inbounds nuw { { ptr, {} } }, ptr %self, i32 0, i32 0, !dbg !93 -// CHECK:STDOUT: call void @"_CSelfDestruct.4487e305711510e9:core.Destroy.Core"(ptr %.loc12.base), !dbg !93 -// CHECK:STDOUT: ret void, !dbg !93 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// 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 void @_CUse.Create(ptr %v) #0 !dbg !99 { -// CHECK:STDOUT: entry: -// 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: %Intermediate.Fn.call.vtable = load ptr, ptr %v, align 8, !dbg !74 +// CHECK:STDOUT: %Intermediate.Fn.call = call ptr @llvm.load.relative.i32(ptr %Intermediate.Fn.call.vtable, i32 0), !dbg !74 +// CHECK:STDOUT: call void %Intermediate.Fn.call(ptr %v), !dbg !74 +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -402,13 +356,37 @@ fn Use() { // 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 @_CSelfDestruct.Core.782e958155c50b7f(ptr %t) #0 !dbg !77 { +// CHECK:STDOUT: call void @"_COp.43ed5d0e08fc7556:core.SubobjectDestroy.Core"(ptr %t), !dbg !81 +// CHECK:STDOUT: ret void, !dbg !82 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.cdf25659568e17c7(ptr %t) #0 !dbg !84 { +// CHECK:STDOUT: call void @"_COp.4487e305711510e9:core.SubobjectDestroy.Core"(ptr %t), !dbg !88 +// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.1a272360695ec208(ptr %t) #0 !dbg !91 { +// CHECK:STDOUT: ret void, !dbg !96 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %t) #0 !dbg !98 { +// CHECK:STDOUT: ret void, !dbg !103 +// 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: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.43ed5d0e08fc7556:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.782e958155c50b7f, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.cdf25659568e17c7, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.1a272360695ec208, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -419,6 +397,7 @@ fn Use() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !21 = !{null, !20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) @@ -435,55 +414,45 @@ fn Use() { // CHECK:STDOUT: !50 = !DILocation(line: 9, column: 37, scope: !42) // CHECK:STDOUT: !52 = !DILocation(line: 12, column: 3, scope: !42) // CHECK:STDOUT: !54 = !DILocation(line: 6, column: 1, scope: !42) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !58) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f7b08e0f33b30342:core.SubobjectDestroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !58) // CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !20) // CHECK:STDOUT: !57 = !DILocation(line: 12, column: 3, scope: !55) // CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !62) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4487e305711510e9:core.SubobjectDestroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !62) // 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: "SelfDestruct", linkageName: "_CSelfDestruct.bf085e1f873e33df:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !66) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3c3534e993db7939:core.SubobjectDestroy.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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f7b08e0f33b30342:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !70) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "Op", linkageName: "_COp.43ed5d0e08fc7556:core.SubobjectDestroy.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: "SelfDestruct", linkageName: "_CSelfDestruct.f7b08e0f33b30342:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !74) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Create", scope: null, file: !38, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !76) // 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: "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: "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: "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: "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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.43ed5d0e08fc7556:core.Destroy.Core", scope: null, file: !38, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !94) +// CHECK:STDOUT: !74 = !DILocation(line: 16, column: 3, scope: !71) +// CHECK:STDOUT: !75 = !DILocation(line: 15, column: 1, scope: !71) +// CHECK:STDOUT: !76 = !{!72} +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.782e958155c50b7f", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !83) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !20) +// CHECK:STDOUT: !81 = !DILocation(line: 34, column: 5, scope: !77) +// CHECK:STDOUT: !82 = !DILocation(line: 32, column: 1, scope: !77) +// CHECK:STDOUT: !83 = !{!78} +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.cdf25659568e17c7", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !90) +// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !20) +// CHECK:STDOUT: !88 = !DILocation(line: 34, column: 5, scope: !84) +// CHECK:STDOUT: !89 = !DILocation(line: 32, column: 1, scope: !84) +// CHECK:STDOUT: !90 = !{!85} +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.1a272360695ec208", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !97) // 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: "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: "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: !102 = !DILocation(line: 16, column: 3, scope: !99) -// CHECK:STDOUT: !103 = !DILocation(line: 15, column: 1, scope: !99) -// CHECK:STDOUT: !104 = !{!100} +// CHECK:STDOUT: !96 = !DILocation(line: 32, column: 1, scope: !91) +// CHECK:STDOUT: !97 = !{!92} +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.96c9f45941b9e5e6", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !104) +// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !20) +// CHECK:STDOUT: !103 = !DILocation(line: 32, column: 1, scope: !98) +// CHECK:STDOUT: !104 = !{!99} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'create_named_ctor.carbon' @@ -594,93 +563,84 @@ fn Use() { // CHECK:STDOUT: source_filename = "member_init.carbon" // CHECK:STDOUT: // CHECK:STDOUT: @"_CBase.MemberInit.$vtable" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CFn.Base.MemberInit to i64), i64 ptrtoint (ptr @"_CBase.MemberInit.$vtable" to i64)) to i32)] -// CHECK:STDOUT: @Base.val.loc13_3 = internal constant <{ ptr, i32 }> <{ ptr @"_CBase.MemberInit.$vtable", i32 3 }> +// CHECK:STDOUT: @Base.val.loc13_3.1 = 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 !146 { +// CHECK:STDOUT: define void @_CFn.Base.MemberInit(ptr %self) #0 !dbg !144 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !149 +// CHECK:STDOUT: ret void, !dbg !147 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CFn.MemberInit() #0 !dbg !151 { +// CHECK:STDOUT: define void @_CFn.MemberInit() #0 !dbg !149 { // CHECK:STDOUT: entry: -// 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.72395be3dbbe8946:core.Destroy.Core"(ptr %i.var), !dbg !152 +// CHECK:STDOUT: %i.var = alloca i32, align 4, !dbg !150 +// CHECK:STDOUT: %v.var = alloca <{ ptr, i32 }>, align 8, !dbg !152 +// CHECK:STDOUT: %_.var = alloca <{ ptr, i32 }>, align 8, !dbg !157 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %i.var), !dbg !150 +// CHECK:STDOUT: store i32 3, ptr %i.var, align 4, !dbg !150 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !152 +// CHECK:STDOUT: %.loc11_24.2.vptr = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %v.var, i32 0, i32 0, !dbg !154 +// CHECK:STDOUT: %.loc11_23 = load i32, ptr %i.var, align 4, !dbg !153 +// CHECK:STDOUT: %.loc11_24.4.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %v.var, i32 0, i32 1, !dbg !154 +// CHECK:STDOUT: store i32 %.loc11_23, ptr %.loc11_24.4.m, align 4, !dbg !154 +// CHECK:STDOUT: store ptr @"_CBase.MemberInit.$vtable", ptr %.loc11_24.2.vptr, align 8, !dbg !154 +// CHECK:STDOUT: %.loc12_4.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %v.var, i32 0, i32 1, !dbg !156 +// CHECK:STDOUT: store i32 5, ptr %.loc12_4.m, align 4, !dbg !156 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !157 +// CHECK:STDOUT: %.loc13_24.2.vptr = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %_.var, i32 0, i32 0, !dbg !158 +// CHECK:STDOUT: %.loc13_24.5.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %_.var, i32 0, i32 1, !dbg !158 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var, ptr align 8 @Base.val.loc13_3.1, i64 12, i1 false), !dbg !157 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e060f28027e68740(ptr %_.var), !dbg !157 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e060f28027e68740(ptr %v.var), !dbg !152 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %i.var), !dbg !150 // 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 !163 { +// CHECK:STDOUT: define weak_odr void @"_COp.9bdba0482390b229:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !163 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc13_3.1.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !165 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc13_3.1.m), !dbg !165 +// CHECK:STDOUT: %.loc13_3.4.vptr = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !165 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %.loc13_3.4.vptr), !dbg !165 // CHECK:STDOUT: ret void, !dbg !165 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !167 { +// CHECK:STDOUT: define weak_odr void @"_COp.c6dbe0017b4c8d16:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !167 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc13_3.1.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !169 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc13_3.1.m), !dbg !169 // CHECK:STDOUT: ret void, !dbg !169 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.9bdba0482390b229:core.Destroy.Core"(ptr %self) #0 !dbg !171 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc13_3.1.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !173 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc13_3.1.m), !dbg !173 -// CHECK:STDOUT: %.loc13_3.2.vptr = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !173 -// CHECK:STDOUT: call void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %.loc13_3.2.vptr), !dbg !173 -// CHECK:STDOUT: ret void, !dbg !173 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9bdba0482390b229:core.Destroy.Core"(ptr %self) #0 !dbg !175 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.9bdba0482390b229: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.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %self) #0 !dbg !179 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc13.m = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !181 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc13.m), !dbg !181 -// CHECK:STDOUT: ret void, !dbg !181 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c6dbe0017b4c8d16:core.Destroy.Core"(ptr %self) #0 !dbg !183 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c6dbe0017b4c8d16: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: // 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 @_CSelfDestruct.Core.e060f28027e68740(ptr %t) #0 !dbg !171 { +// CHECK:STDOUT: call void @"_COp.c6dbe0017b4c8d16:core.SubobjectDestroy.Core"(ptr %t), !dbg !175 +// CHECK:STDOUT: ret void, !dbg !176 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !178 { +// CHECK:STDOUT: ret void, !dbg !183 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %t) #0 !dbg !185 { +// CHECK:STDOUT: ret void, !dbg !190 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.c6dbe0017b4c8d16:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.e060f28027e68740, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -690,6 +650,7 @@ fn Use() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !21 = !{null, !20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) @@ -698,45 +659,42 @@ fn Use() { // 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: !144 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.Base.MemberInit", scope: null, file: !141, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !148) +// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !20) +// CHECK:STDOUT: !147 = !DILocation(line: 6, column: 3, scope: !144) +// CHECK:STDOUT: !148 = !{!145} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "Fn", linkageName: "_CFn.MemberInit", scope: null, file: !141, line: 9, type: !41, spFlags: DISPFlagDefinition, unit: !142) +// CHECK:STDOUT: !150 = !DILocation(line: 10, column: 3, scope: !149) +// CHECK:STDOUT: !152 = !DILocation(line: 11, column: 3, scope: !149) +// CHECK:STDOUT: !153 = !DILocation(line: 11, column: 23, scope: !149) +// CHECK:STDOUT: !154 = !DILocation(line: 11, column: 17, scope: !149) +// CHECK:STDOUT: !156 = !DILocation(line: 12, column: 3, scope: !149) +// CHECK:STDOUT: !157 = !DILocation(line: 13, column: 3, scope: !149) +// CHECK:STDOUT: !158 = !DILocation(line: 13, column: 17, scope: !149) +// CHECK:STDOUT: !160 = !{null, !143} +// CHECK:STDOUT: !161 = !DISubroutineType(types: !160) +// CHECK:STDOUT: !162 = !DILocation(line: 9, column: 1, scope: !149) +// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "Op", linkageName: "_COp.9bdba0482390b229:core.SubobjectDestroy.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.72395be3dbbe8946: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: !167 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c6dbe0017b4c8d16:core.SubobjectDestroy.Core", scope: null, file: !141, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !170) +// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !20) // CHECK:STDOUT: !169 = !DILocation(line: 13, column: 3, scope: !167) // CHECK:STDOUT: !170 = !{!168} -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9bdba0482390b229:core.Destroy.Core", scope: null, file: !141, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !174) +// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e060f28027e68740", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !177) // CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !20) -// CHECK:STDOUT: !173 = !DILocation(line: 13, column: 3, scope: !171) -// CHECK:STDOUT: !174 = !{!172} -// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9bdba0482390b229: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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c6dbe0017b4c8d16: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: "SelfDestruct", linkageName: "_CSelfDestruct.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: !175 = !DILocation(line: 34, column: 5, scope: !171) +// CHECK:STDOUT: !176 = !DILocation(line: 32, column: 1, scope: !171) +// CHECK:STDOUT: !177 = !{!172} +// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !161, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !184) +// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !143) +// CHECK:STDOUT: !183 = !DILocation(line: 32, column: 1, scope: !178) +// CHECK:STDOUT: !184 = !{!179} +// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.96c9f45941b9e5e6", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !191) +// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !20) +// CHECK:STDOUT: !190 = !DILocation(line: 32, column: 1, scope: !185) +// CHECK:STDOUT: !191 = !{!186} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'member_brace_init.carbon' @@ -749,82 +707,48 @@ 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 !189 { +// CHECK:STDOUT: define void @_CUse.Main() #0 !dbg !194 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { { ptr } }, align 8, !dbg !190 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !190 -// CHECK:STDOUT: %.loc13_32.2.base = getelementptr inbounds nuw { { ptr } }, ptr %_.var, i32 0, i32 0, !dbg !191 -// CHECK:STDOUT: %.loc13_31.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc13_32.2.base, i32 0, i32 0, !dbg !192 -// CHECK:STDOUT: %.loc13_32.6.base = getelementptr inbounds nuw { { ptr } }, ptr %_.var, i32 0, i32 0, !dbg !191 -// CHECK:STDOUT: %.loc13_32.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc13_32.6.base, i32 0, i32 0, !dbg !191 -// 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 !191 -// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc13_32.7.vptr, align 8, !dbg !191 -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %_.var), !dbg !190 -// CHECK:STDOUT: ret void, !dbg !194 +// CHECK:STDOUT: %_.var = alloca { { ptr } }, align 8, !dbg !195 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !195 +// CHECK:STDOUT: %.loc13_32.2.base = getelementptr inbounds nuw { { ptr } }, ptr %_.var, i32 0, i32 0, !dbg !196 +// CHECK:STDOUT: %.loc13_31.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc13_32.2.base, i32 0, i32 0, !dbg !197 +// CHECK:STDOUT: %.loc13_32.6.base = getelementptr inbounds nuw { { ptr } }, ptr %_.var, i32 0, i32 0, !dbg !196 +// CHECK:STDOUT: %.loc13_32.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc13_32.6.base, i32 0, i32 0, !dbg !196 +// 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 !196 +// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc13_32.7.vptr, align 8, !dbg !196 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9ede905be876779b(ptr %_.var), !dbg !195 +// CHECK:STDOUT: ret void, !dbg !199 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !195 { +// CHECK:STDOUT: define weak_odr void @"_COp.95528a86e1127e2d:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !200 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !197 +// CHECK:STDOUT: %.loc13_3.1.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !202 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %.loc13_3.1.vptr), !dbg !202 +// CHECK:STDOUT: ret void, !dbg !202 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !199 { +// CHECK:STDOUT: define weak_odr void @"_COp.294df737cd074d60:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !204 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc13.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !201 -// CHECK:STDOUT: call void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %.loc13.vptr), !dbg !201 -// CHECK:STDOUT: ret void, !dbg !201 +// CHECK:STDOUT: ret void, !dbg !206 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !203 { +// CHECK:STDOUT: define weak_odr void @"_COp.caed8a96bf328d09:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !208 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !205 -// CHECK:STDOUT: ret void, !dbg !205 +// CHECK:STDOUT: %.loc13_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !210 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a4aefa05e08cd2e1(ptr %.loc13_3.1.base), !dbg !210 +// CHECK:STDOUT: ret void, !dbg !210 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !207 { +// CHECK:STDOUT: define weak_odr void @"_COp.b25525d21a9bd472:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !212 { // 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.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !211 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.294df737cd074d60: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.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !215 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc13.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !217 -// CHECK:STDOUT: call void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %.loc13.base), !dbg !217 -// CHECK:STDOUT: ret void, !dbg !217 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !219 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.caed8a96bf328d09: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.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !223 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc13.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !225 -// CHECK:STDOUT: call void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %.loc13.base), !dbg !225 -// CHECK:STDOUT: ret void, !dbg !225 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !227 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !229 -// CHECK:STDOUT: ret void, !dbg !229 +// CHECK:STDOUT: %.loc13_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !214 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a4aefa05e08cd2e1(ptr %.loc13_3.1.base), !dbg !214 +// CHECK:STDOUT: ret void, !dbg !214 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -833,62 +757,77 @@ fn Use() { // 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 @_CSelfDestruct.Core.9ede905be876779b(ptr %t) #0 !dbg !216 { +// CHECK:STDOUT: call void @"_COp.b25525d21a9bd472:core.SubobjectDestroy.Core"(ptr %t), !dbg !220 +// CHECK:STDOUT: ret void, !dbg !221 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %t) #0 !dbg !223 { +// CHECK:STDOUT: ret void, !dbg !228 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.a4aefa05e08cd2e1(ptr %t) #0 !dbg !230 { +// CHECK:STDOUT: call void @"_COp.294df737cd074d60:core.SubobjectDestroy.Core"(ptr %t), !dbg !234 +// CHECK:STDOUT: ret void, !dbg !235 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.a4aefa05e08cd2e1, { 1, 0 } +// 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 = !{!188} +// CHECK:STDOUT: !llvm.dbg.cu = !{!193} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // 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: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !187 = !DIFile(filename: "member_brace_init.carbon", directory: "") -// CHECK:STDOUT: !188 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !187, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !187, line: 12, type: !41, spFlags: DISPFlagDefinition, unit: !188) -// CHECK:STDOUT: !190 = !DILocation(line: 13, column: 3, scope: !189) -// CHECK:STDOUT: !191 = !DILocation(line: 13, column: 21, scope: !189) -// CHECK:STDOUT: !192 = !DILocation(line: 13, column: 30, scope: !189) -// CHECK:STDOUT: !194 = !DILocation(line: 12, column: 1, scope: !189) -// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !187, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !188, 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: !199 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !187, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !188, 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: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !187, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !188, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core", scope: null, file: !187, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !188, 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: "SelfDestruct", linkageName: "_CSelfDestruct.294df737cd074d60:core.Destroy.Core", scope: null, file: !187, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !188, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !187, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !188, 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: "SelfDestruct", linkageName: "_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !187, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !188, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !187, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !188, retainedNodes: !226) +// CHECK:STDOUT: !192 = !DIFile(filename: "member_brace_init.carbon", directory: "") +// CHECK:STDOUT: !193 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !192, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !194 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !192, line: 12, type: !41, spFlags: DISPFlagDefinition, unit: !193) +// CHECK:STDOUT: !195 = !DILocation(line: 13, column: 3, scope: !194) +// CHECK:STDOUT: !196 = !DILocation(line: 13, column: 21, scope: !194) +// CHECK:STDOUT: !197 = !DILocation(line: 13, column: 30, scope: !194) +// CHECK:STDOUT: !199 = !DILocation(line: 12, column: 1, scope: !194) +// CHECK:STDOUT: !200 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95528a86e1127e2d:core.SubobjectDestroy.Core", scope: null, file: !192, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !193, retainedNodes: !203) +// CHECK:STDOUT: !201 = !DILocalVariable(arg: 1, scope: !200, type: !20) +// CHECK:STDOUT: !202 = !DILocation(line: 13, column: 3, scope: !200) +// CHECK:STDOUT: !203 = !{!201} +// CHECK:STDOUT: !204 = distinct !DISubprogram(name: "Op", linkageName: "_COp.294df737cd074d60:core.SubobjectDestroy.Core", scope: null, file: !192, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !193, retainedNodes: !207) +// CHECK:STDOUT: !205 = !DILocalVariable(arg: 1, scope: !204, type: !20) +// CHECK:STDOUT: !206 = !DILocation(line: 13, column: 3, scope: !204) +// CHECK:STDOUT: !207 = !{!205} +// CHECK:STDOUT: !208 = distinct !DISubprogram(name: "Op", linkageName: "_COp.caed8a96bf328d09:core.SubobjectDestroy.Core", scope: null, file: !192, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !193, retainedNodes: !211) +// CHECK:STDOUT: !209 = !DILocalVariable(arg: 1, scope: !208, type: !20) +// CHECK:STDOUT: !210 = !DILocation(line: 13, column: 3, scope: !208) +// CHECK:STDOUT: !211 = !{!209} +// CHECK:STDOUT: !212 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b25525d21a9bd472:core.SubobjectDestroy.Core", scope: null, file: !192, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !193, retainedNodes: !215) +// CHECK:STDOUT: !213 = !DILocalVariable(arg: 1, scope: !212, type: !20) +// CHECK:STDOUT: !214 = !DILocation(line: 13, column: 3, scope: !212) +// CHECK:STDOUT: !215 = !{!213} +// CHECK:STDOUT: !216 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9ede905be876779b", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !193, retainedNodes: !222) +// CHECK:STDOUT: !217 = !DILocalVariable(arg: 1, scope: !216, type: !20) +// CHECK:STDOUT: !220 = !DILocation(line: 34, column: 5, scope: !216) +// CHECK:STDOUT: !221 = !DILocation(line: 32, column: 1, scope: !216) +// CHECK:STDOUT: !222 = !{!217} +// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.96c9f45941b9e5e6", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !193, retainedNodes: !229) // 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: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !187, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !188, 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: !228 = !DILocation(line: 32, column: 1, scope: !223) +// CHECK:STDOUT: !229 = !{!224} +// CHECK:STDOUT: !230 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.a4aefa05e08cd2e1", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !193, retainedNodes: !236) +// CHECK:STDOUT: !231 = !DILocalVariable(arg: 1, scope: !230, type: !20) +// CHECK:STDOUT: !234 = !DILocation(line: 34, column: 5, scope: !230) +// CHECK:STDOUT: !235 = !DILocation(line: 32, column: 1, scope: !230) +// CHECK:STDOUT: !236 = !{!231} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call.carbon' @@ -899,12 +838,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 !233 { +// CHECK:STDOUT: define void @_CUse.Main(ptr %b) #0 !dbg !239 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %b, align 8, !dbg !236 -// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !236 -// CHECK:STDOUT: call void %Base.F.call(ptr %b), !dbg !236 -// CHECK:STDOUT: ret void, !dbg !237 +// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %b, align 8, !dbg !242 +// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !242 +// CHECK:STDOUT: call void %Base.F.call(ptr %b), !dbg !242 +// CHECK:STDOUT: ret void, !dbg !243 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read) @@ -913,7 +852,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 = !{!232} +// CHECK:STDOUT: !llvm.dbg.cu = !{!238} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -921,13 +860,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: !231 = !DIFile(filename: "call.carbon", directory: "") -// CHECK:STDOUT: !232 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !231, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !233 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !231, line: 8, type: !22, spFlags: DISPFlagDefinition, unit: !232, retainedNodes: !238) -// CHECK:STDOUT: !234 = !DILocalVariable(arg: 1, scope: !233, type: !20) -// CHECK:STDOUT: !236 = !DILocation(line: 9, column: 3, scope: !233) -// CHECK:STDOUT: !237 = !DILocation(line: 8, column: 1, scope: !233) -// CHECK:STDOUT: !238 = !{!234} +// CHECK:STDOUT: !237 = !DIFile(filename: "call.carbon", directory: "") +// CHECK:STDOUT: !238 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !237, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !237, line: 8, type: !22, spFlags: DISPFlagDefinition, unit: !238, retainedNodes: !244) +// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !20) +// CHECK:STDOUT: !242 = !DILocation(line: 9, column: 3, scope: !239) +// CHECK:STDOUT: !243 = !DILocation(line: 8, column: 1, scope: !239) +// CHECK:STDOUT: !244 = !{!240} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call_impl.carbon' @@ -942,93 +881,59 @@ 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 !241 { +// CHECK:STDOUT: define weak_odr void @"_CF:thunk:Base.Main:Derived.Main"(ptr %self) #0 !dbg !247 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Derived.Main(ptr %self), !dbg !244 -// CHECK:STDOUT: ret void, !dbg !244 +// CHECK:STDOUT: call void @_CF.Derived.Main(ptr %self), !dbg !250 +// CHECK:STDOUT: ret void, !dbg !250 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CUse.Main() #1 !dbg !246 { +// CHECK:STDOUT: define void @_CUse.Main() #1 !dbg !252 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %v.var = alloca { { ptr } }, align 8, !dbg !247 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !247 -// CHECK:STDOUT: %.loc14_32.2.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !248 -// CHECK:STDOUT: %.loc14_31.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc14_32.2.base, i32 0, i32 0, !dbg !249 -// CHECK:STDOUT: %.loc14_32.6.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !248 -// CHECK:STDOUT: %.loc14_32.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc14_32.6.base, i32 0, i32 0, !dbg !248 -// 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 !248 -// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc14_32.7.vptr, align 8, !dbg !248 -// CHECK:STDOUT: %.loc15_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !251 -// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %.loc15_3.1.base, align 8, !dbg !251 -// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !251 -// CHECK:STDOUT: call void %Base.F.call(ptr %.loc15_3.1.base), !dbg !251 -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %v.var), !dbg !247 -// CHECK:STDOUT: ret void, !dbg !252 +// CHECK:STDOUT: %v.var = alloca { { ptr } }, align 8, !dbg !253 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !253 +// CHECK:STDOUT: %.loc14_32.2.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !254 +// CHECK:STDOUT: %.loc14_31.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc14_32.2.base, i32 0, i32 0, !dbg !255 +// CHECK:STDOUT: %.loc14_32.6.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !254 +// CHECK:STDOUT: %.loc14_32.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc14_32.6.base, i32 0, i32 0, !dbg !254 +// 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 !254 +// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc14_32.7.vptr, align 8, !dbg !254 +// CHECK:STDOUT: %.loc15_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %v.var, i32 0, i32 0, !dbg !257 +// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %.loc15_3.1.base, align 8, !dbg !257 +// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !257 +// CHECK:STDOUT: call void %Base.F.call(ptr %.loc15_3.1.base), !dbg !257 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9ede905be876779b(ptr %v.var), !dbg !253 +// CHECK:STDOUT: ret void, !dbg !258 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #1 !dbg !253 { +// CHECK:STDOUT: define weak_odr void @"_COp.95528a86e1127e2d:core.SubobjectDestroy.Core"(ptr %self) #1 !dbg !259 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !255 +// CHECK:STDOUT: %.loc14_3.1.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !261 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %.loc14_3.1.vptr), !dbg !261 +// CHECK:STDOUT: ret void, !dbg !261 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #1 !dbg !257 { +// CHECK:STDOUT: define weak_odr void @"_COp.294df737cd074d60:core.SubobjectDestroy.Core"(ptr %self) #1 !dbg !263 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !259 -// CHECK:STDOUT: call void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %.loc14.vptr), !dbg !259 -// CHECK:STDOUT: ret void, !dbg !259 +// CHECK:STDOUT: ret void, !dbg !265 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #1 !dbg !261 { +// CHECK:STDOUT: define weak_odr void @"_COp.caed8a96bf328d09:core.SubobjectDestroy.Core"(ptr %self) #1 !dbg !267 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !263 -// CHECK:STDOUT: ret void, !dbg !263 +// CHECK:STDOUT: %.loc14_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !269 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a4aefa05e08cd2e1(ptr %.loc14_3.1.base), !dbg !269 +// CHECK:STDOUT: ret void, !dbg !269 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self) #1 !dbg !265 { +// CHECK:STDOUT: define weak_odr void @"_COp.b25525d21a9bd472:core.SubobjectDestroy.Core"(ptr %self) #1 !dbg !271 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !267 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %self) #1 !dbg !269 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self), !dbg !271 -// CHECK:STDOUT: ret void, !dbg !271 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #1 !dbg !273 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !275 -// CHECK:STDOUT: call void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %.loc14.base), !dbg !275 -// CHECK:STDOUT: ret void, !dbg !275 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #1 !dbg !277 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self), !dbg !279 -// CHECK:STDOUT: ret void, !dbg !279 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #1 !dbg !281 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !283 -// CHECK:STDOUT: call void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %.loc14.base), !dbg !283 -// CHECK:STDOUT: ret void, !dbg !283 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #1 !dbg !285 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !287 -// CHECK:STDOUT: ret void, !dbg !287 +// CHECK:STDOUT: %.loc14_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !273 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a4aefa05e08cd2e1(ptr %.loc14_3.1.base), !dbg !273 +// CHECK:STDOUT: ret void, !dbg !273 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -1040,212 +945,174 @@ fn Use() { // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read) // CHECK:STDOUT: declare ptr @llvm.load.relative.i32(ptr, i32) #3 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9ede905be876779b(ptr %t) #1 !dbg !275 { +// CHECK:STDOUT: call void @"_COp.b25525d21a9bd472:core.SubobjectDestroy.Core"(ptr %t), !dbg !279 +// CHECK:STDOUT: ret void, !dbg !280 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %t) #1 !dbg !282 { +// CHECK:STDOUT: ret void, !dbg !287 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.a4aefa05e08cd2e1(ptr %t) #1 !dbg !289 { +// CHECK:STDOUT: call void @"_COp.294df737cd074d60:core.SubobjectDestroy.Core"(ptr %t), !dbg !293 +// CHECK:STDOUT: ret void, !dbg !294 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.a4aefa05e08cd2e1, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { alwaysinline nounwind } // CHECK:STDOUT: attributes #1 = { nounwind } // 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 = !{!240} +// CHECK:STDOUT: !llvm.dbg.cu = !{!246} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // 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: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !239 = !DIFile(filename: "call_impl.carbon", directory: "") -// CHECK:STDOUT: !240 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !239, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !241 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !239, line: 10, type: !22, spFlags: DISPFlagDefinition, unit: !240, retainedNodes: !245) -// CHECK:STDOUT: !242 = !DILocalVariable(arg: 1, scope: !241, type: !20) -// CHECK:STDOUT: !244 = !DILocation(line: 10, column: 3, scope: !241) -// CHECK:STDOUT: !245 = !{!242} -// CHECK:STDOUT: !246 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !239, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !240) -// CHECK:STDOUT: !247 = !DILocation(line: 14, column: 3, scope: !246) -// CHECK:STDOUT: !248 = !DILocation(line: 14, column: 21, scope: !246) -// CHECK:STDOUT: !249 = !DILocation(line: 14, column: 30, scope: !246) -// CHECK:STDOUT: !251 = !DILocation(line: 15, column: 3, scope: !246) -// CHECK:STDOUT: !252 = !DILocation(line: 13, column: 1, scope: !246) -// CHECK:STDOUT: !253 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !239, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !240, retainedNodes: !256) -// CHECK:STDOUT: !254 = !DILocalVariable(arg: 1, scope: !253, type: !20) -// CHECK:STDOUT: !255 = !DILocation(line: 14, column: 3, scope: !253) -// CHECK:STDOUT: !256 = !{!254} -// CHECK:STDOUT: !257 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !239, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !240, 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: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !239, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !240, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core", scope: null, file: !239, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !240, 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: "SelfDestruct", linkageName: "_CSelfDestruct.294df737cd074d60:core.Destroy.Core", scope: null, file: !239, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !240, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !239, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !240, 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: "SelfDestruct", linkageName: "_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !239, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !240, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !239, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !240, 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: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !239, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !240, 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: !245 = !DIFile(filename: "call_impl.carbon", directory: "") +// CHECK:STDOUT: !246 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !245, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !245, line: 10, type: !22, spFlags: DISPFlagDefinition, unit: !246, retainedNodes: !251) +// CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !20) +// CHECK:STDOUT: !250 = !DILocation(line: 10, column: 3, scope: !247) +// CHECK:STDOUT: !251 = !{!248} +// CHECK:STDOUT: !252 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !245, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !246) +// CHECK:STDOUT: !253 = !DILocation(line: 14, column: 3, scope: !252) +// CHECK:STDOUT: !254 = !DILocation(line: 14, column: 21, scope: !252) +// CHECK:STDOUT: !255 = !DILocation(line: 14, column: 30, scope: !252) +// CHECK:STDOUT: !257 = !DILocation(line: 15, column: 3, scope: !252) +// CHECK:STDOUT: !258 = !DILocation(line: 13, column: 1, scope: !252) +// CHECK:STDOUT: !259 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95528a86e1127e2d:core.SubobjectDestroy.Core", scope: null, file: !245, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !246, retainedNodes: !262) +// CHECK:STDOUT: !260 = !DILocalVariable(arg: 1, scope: !259, type: !20) +// CHECK:STDOUT: !261 = !DILocation(line: 14, column: 3, scope: !259) +// CHECK:STDOUT: !262 = !{!260} +// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "Op", linkageName: "_COp.294df737cd074d60:core.SubobjectDestroy.Core", scope: null, file: !245, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !246, retainedNodes: !266) +// CHECK:STDOUT: !264 = !DILocalVariable(arg: 1, scope: !263, type: !20) +// CHECK:STDOUT: !265 = !DILocation(line: 14, column: 3, scope: !263) +// CHECK:STDOUT: !266 = !{!264} +// CHECK:STDOUT: !267 = distinct !DISubprogram(name: "Op", linkageName: "_COp.caed8a96bf328d09:core.SubobjectDestroy.Core", scope: null, file: !245, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !246, retainedNodes: !270) +// CHECK:STDOUT: !268 = !DILocalVariable(arg: 1, scope: !267, type: !20) +// CHECK:STDOUT: !269 = !DILocation(line: 14, column: 3, scope: !267) +// CHECK:STDOUT: !270 = !{!268} +// CHECK:STDOUT: !271 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b25525d21a9bd472:core.SubobjectDestroy.Core", scope: null, file: !245, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !246, retainedNodes: !274) +// CHECK:STDOUT: !272 = !DILocalVariable(arg: 1, scope: !271, type: !20) +// CHECK:STDOUT: !273 = !DILocation(line: 14, column: 3, scope: !271) +// CHECK:STDOUT: !274 = !{!272} +// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9ede905be876779b", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !246, retainedNodes: !281) +// CHECK:STDOUT: !276 = !DILocalVariable(arg: 1, scope: !275, type: !20) +// CHECK:STDOUT: !279 = !DILocation(line: 34, column: 5, scope: !275) +// CHECK:STDOUT: !280 = !DILocation(line: 32, column: 1, scope: !275) +// CHECK:STDOUT: !281 = !{!276} +// CHECK:STDOUT: !282 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.96c9f45941b9e5e6", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !246, retainedNodes: !288) +// CHECK:STDOUT: !283 = !DILocalVariable(arg: 1, scope: !282, type: !20) +// CHECK:STDOUT: !287 = !DILocation(line: 32, column: 1, scope: !282) +// CHECK:STDOUT: !288 = !{!283} +// CHECK:STDOUT: !289 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.a4aefa05e08cd2e1", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !246, retainedNodes: !295) +// CHECK:STDOUT: !290 = !DILocalVariable(arg: 1, scope: !289, type: !20) +// CHECK:STDOUT: !293 = !DILocation(line: 34, column: 5, scope: !289) +// CHECK:STDOUT: !294 = !DILocation(line: 32, column: 1, scope: !289) +// CHECK:STDOUT: !295 = !{!290} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_noop.carbon' // CHECK:STDOUT: source_filename = "generic_noop.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!290} +// CHECK:STDOUT: !llvm.dbg.cu = !{!297} // 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: !289 = !DIFile(filename: "generic_noop.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: !296 = !DIFile(filename: "generic_noop.carbon", directory: "") +// CHECK:STDOUT: !297 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !296, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_use.carbon' // CHECK:STDOUT: source_filename = "generic_use.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @"_CBase.Main.$vtable.2f8a0042309f394e" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CF.Base.Main.2f8a0042309f394e to i64), i64 ptrtoint (ptr @"_CBase.Main.$vtable.2f8a0042309f394e" to i64)) to i32)] -// CHECK:STDOUT: @"_CBase.Main.$vtable.d7d44a05ee79f1b8" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CF.Base.Main.d7d44a05ee79f1b8 to i64), i64 ptrtoint (ptr @"_CBase.Main.$vtable.d7d44a05ee79f1b8" to i64)) to i32)] -// CHECK:STDOUT: @Base.val.e0a.loc16_3 = internal constant { ptr } { ptr @"_CBase.Main.$vtable.2f8a0042309f394e" } -// CHECK:STDOUT: @Base.val.329.loc17_3 = internal constant { ptr } { ptr @"_CBase.Main.$vtable.d7d44a05ee79f1b8" } +// CHECK:STDOUT: @"_CBase.Main.$vtable.947fa7adaf50ddfd" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CF.Base.Main.947fa7adaf50ddfd to i64), i64 ptrtoint (ptr @"_CBase.Main.$vtable.947fa7adaf50ddfd" to i64)) to i32)] +// CHECK:STDOUT: @"_CBase.Main.$vtable.1977607cd7948753" = unnamed_addr constant [1 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @_CF.Base.Main.1977607cd7948753 to i64), i64 ptrtoint (ptr @"_CBase.Main.$vtable.1977607cd7948753" to i64)) to i32)] +// CHECK:STDOUT: @Base.val.65a.loc16_3.1 = internal constant { ptr } { ptr @"_CBase.Main.$vtable.947fa7adaf50ddfd" } +// CHECK:STDOUT: @Base.val.b6e.loc17_3.1 = internal constant { ptr } { ptr @"_CBase.Main.$vtable.1977607cd7948753" } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !293 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var.loc16 = alloca { ptr }, align 8, !dbg !294 -// CHECK:STDOUT: %_.var.loc17 = alloca { ptr }, align 8, !dbg !297 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !294 -// CHECK:STDOUT: %.loc16_22.2.vptr = getelementptr inbounds nuw { ptr }, ptr %_.var.loc16, i32 0, i32 0, !dbg !295 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc16, ptr align 8 @Base.val.e0a.loc16_3, i64 8, i1 false), !dbg !294 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc17), !dbg !297 -// CHECK:STDOUT: %.loc17_22.2.vptr = getelementptr inbounds nuw { ptr }, ptr %_.var.loc17, i32 0, i32 0, !dbg !298 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc17, ptr align 8 @Base.val.329.loc17_3, i64 8, i1 false), !dbg !297 -// CHECK:STDOUT: call void @"_CSelfDestruct.e8f1edf60e6cf258:core.Destroy.Core"(ptr %_.var.loc17), !dbg !297 -// CHECK:STDOUT: call void @"_CSelfDestruct.0166b5493230fdb7:core.Destroy.Core"(ptr %_.var.loc16), !dbg !294 -// CHECK:STDOUT: ret void, !dbg !300 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !301 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !303 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.13f86630f401913f:core.Destroy.Core"(ptr %self) #0 !dbg !305 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !300 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %_.var.loc16 = alloca { ptr }, align 8, !dbg !301 +// CHECK:STDOUT: %_.var.loc17 = alloca { ptr }, align 8, !dbg !304 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !301 +// CHECK:STDOUT: %.loc16_22.2.vptr = getelementptr inbounds nuw { ptr }, ptr %_.var.loc16, i32 0, i32 0, !dbg !302 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc16, ptr align 8 @Base.val.65a.loc16_3.1, i64 8, i1 false), !dbg !301 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc17), !dbg !304 +// CHECK:STDOUT: %.loc17_22.2.vptr = getelementptr inbounds nuw { ptr }, ptr %_.var.loc17, i32 0, i32 0, !dbg !305 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc17, ptr align 8 @Base.val.b6e.loc17_3.1, i64 8, i1 false), !dbg !304 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.51b6e8888a2a2103(ptr %_.var.loc17), !dbg !304 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.053043cd456173f1(ptr %_.var.loc16), !dbg !301 // CHECK:STDOUT: ret void, !dbg !307 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f2f12ab22a0a6b87:core.Destroy.Core"(ptr %self) #0 !dbg !309 { +// CHECK:STDOUT: define weak_odr void @"_COp.f2f12ab22a0a6b87:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !308 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17.v = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !311 -// CHECK:STDOUT: call void @"_CSelfDestruct.13f86630f401913f:core.Destroy.Core"(ptr %.loc17.v), !dbg !311 -// CHECK:STDOUT: ret void, !dbg !311 +// CHECK:STDOUT: %.loc17_17.1.v = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !310 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.947fa7adaf50ddfd(ptr %.loc17_17.1.v), !dbg !310 +// CHECK:STDOUT: ret void, !dbg !310 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2f12ab22a0a6b87:core.Destroy.Core"(ptr %self) #0 !dbg !313 { +// CHECK:STDOUT: define weak_odr void @"_COp.8578661a61c8bbbf:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !312 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f2f12ab22a0a6b87:core.Destroy.Core"(ptr %self), !dbg !315 -// CHECK:STDOUT: ret void, !dbg !315 +// CHECK:STDOUT: %.loc17_17.1.v = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !314 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.947fa7adaf50ddfd(ptr %.loc17_17.1.v), !dbg !314 +// CHECK:STDOUT: ret void, !dbg !314 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8578661a61c8bbbf:core.Destroy.Core"(ptr %self) #0 !dbg !317 { +// CHECK:STDOUT: define weak_odr void @"_COp.95528a86e1127e2d:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !316 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17.v = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !319 -// CHECK:STDOUT: call void @"_CSelfDestruct.13f86630f401913f:core.Destroy.Core"(ptr %.loc17.v), !dbg !319 -// CHECK:STDOUT: ret void, !dbg !319 +// CHECK:STDOUT: %.loc17_3.1.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !318 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %.loc17_3.1.vptr), !dbg !318 +// CHECK:STDOUT: ret void, !dbg !318 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8578661a61c8bbbf:core.Destroy.Core"(ptr %self) #0 !dbg !321 { +// CHECK:STDOUT: define weak_odr void @"_COp.85c28669c0012288:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !320 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8578661a61c8bbbf:core.Destroy.Core"(ptr %self), !dbg !323 -// CHECK:STDOUT: ret void, !dbg !323 +// CHECK:STDOUT: ret void, !dbg !322 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !325 { +// CHECK:STDOUT: define weak_odr void @"_COp.56a1eb541200ab4f:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !324 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !327 +// CHECK:STDOUT: ret void, !dbg !326 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !329 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.947fa7adaf50ddfd(ptr %self) #0 !dbg !328 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !331 -// CHECK:STDOUT: call void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %.loc17.vptr), !dbg !331 -// CHECK:STDOUT: ret void, !dbg !331 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !331 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !331 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.947fa7adaf50ddfd(ptr %_.var), !dbg !331 +// CHECK:STDOUT: ret void, !dbg !333 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !333 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.1977607cd7948753(ptr %self) #0 !dbg !335 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !335 -// CHECK:STDOUT: ret void, !dbg !335 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e8f1edf60e6cf258:core.Destroy.Core"(ptr %self) #0 !dbg !337 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !339 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e8f1edf60e6cf258:core.Destroy.Core"(ptr %self) #0 !dbg !341 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e8f1edf60e6cf258:core.Destroy.Core"(ptr %self), !dbg !343 -// CHECK:STDOUT: ret void, !dbg !343 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0166b5493230fdb7:core.Destroy.Core"(ptr %self) #0 !dbg !345 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !347 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0166b5493230fdb7:core.Destroy.Core"(ptr %self) #0 !dbg !349 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0166b5493230fdb7: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 linkonce_odr void @_CF.Base.Main.2f8a0042309f394e(ptr %self) #0 !dbg !353 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !356 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !356 -// CHECK:STDOUT: call void @"_CSelfDestruct.13f86630f401913f:core.Destroy.Core"(ptr %_.var), !dbg !356 -// CHECK:STDOUT: ret void, !dbg !358 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.d7d44a05ee79f1b8(ptr %self) #0 !dbg !360 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { {} }, align 1, !dbg !363 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !363 -// CHECK:STDOUT: call void @"_CSelfDestruct.8578661a61c8bbbf:core.Destroy.Core"(ptr %_.var), !dbg !363 -// CHECK:STDOUT: ret void, !dbg !365 +// CHECK:STDOUT: %_.var = alloca { {} }, align 1, !dbg !338 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !338 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.1977607cd7948753(ptr %_.var), !dbg !338 +// CHECK:STDOUT: ret void, !dbg !340 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -1254,93 +1121,114 @@ fn Use() { // 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 @_CSelfDestruct.Core.51b6e8888a2a2103(ptr %t) #0 !dbg !342 { +// CHECK:STDOUT: call void @"_COp.85c28669c0012288:core.SubobjectDestroy.Core"(ptr %t), !dbg !346 +// CHECK:STDOUT: ret void, !dbg !347 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.053043cd456173f1(ptr %t) #0 !dbg !349 { +// CHECK:STDOUT: call void @"_COp.56a1eb541200ab4f:core.SubobjectDestroy.Core"(ptr %t), !dbg !353 +// CHECK:STDOUT: ret void, !dbg !354 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.947fa7adaf50ddfd(ptr %t) #0 !dbg !356 { +// CHECK:STDOUT: ret void, !dbg !361 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %t) #0 !dbg !363 { +// CHECK:STDOUT: ret void, !dbg !368 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.1977607cd7948753(ptr %t) #0 !dbg !370 { +// CHECK:STDOUT: call void @"_COp.8578661a61c8bbbf:core.SubobjectDestroy.Core"(ptr %t), !dbg !374 +// CHECK:STDOUT: ret void, !dbg !375 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.947fa7adaf50ddfd, { 2, 1, 0 } // 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 = !{!292} +// CHECK:STDOUT: !llvm.dbg.cu = !{!299} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // 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: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !291 = !DIFile(filename: "generic_use.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: "F", linkageName: "_CF.Main", scope: null, file: !291, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !292) -// CHECK:STDOUT: !294 = !DILocation(line: 16, column: 3, scope: !293) -// CHECK:STDOUT: !295 = !DILocation(line: 16, column: 21, scope: !293) -// CHECK:STDOUT: !297 = !DILocation(line: 17, column: 3, scope: !293) -// CHECK:STDOUT: !298 = !DILocation(line: 17, column: 21, scope: !293) -// CHECK:STDOUT: !300 = !DILocation(line: 15, column: 1, scope: !293) -// CHECK:STDOUT: !301 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !291, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !304) -// CHECK:STDOUT: !302 = !DILocalVariable(arg: 1, scope: !301, type: !20) -// CHECK:STDOUT: !303 = !DILocation(line: 16, column: 10, scope: !301) -// CHECK:STDOUT: !304 = !{!302} -// CHECK:STDOUT: !305 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.13f86630f401913f:core.Destroy.Core", scope: null, file: !291, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !292, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f2f12ab22a0a6b87:core.Destroy.Core", scope: null, file: !291, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !312) -// CHECK:STDOUT: !310 = !DILocalVariable(arg: 1, scope: !309, type: !20) -// CHECK:STDOUT: !311 = !DILocation(line: 17, column: 10, scope: !309) -// CHECK:STDOUT: !312 = !{!310} -// CHECK:STDOUT: !313 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2f12ab22a0a6b87:core.Destroy.Core", scope: null, file: !291, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !316) -// CHECK:STDOUT: !314 = !DILocalVariable(arg: 1, scope: !313, type: !20) -// CHECK:STDOUT: !315 = !DILocation(line: 17, column: 10, scope: !313) -// CHECK:STDOUT: !316 = !{!314} -// CHECK:STDOUT: !317 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8578661a61c8bbbf:core.Destroy.Core", scope: null, file: !291, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !320) -// CHECK:STDOUT: !318 = !DILocalVariable(arg: 1, scope: !317, type: !20) -// CHECK:STDOUT: !319 = !DILocation(line: 17, column: 10, scope: !317) -// CHECK:STDOUT: !320 = !{!318} -// CHECK:STDOUT: !321 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8578661a61c8bbbf:core.Destroy.Core", scope: null, file: !291, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !324) -// CHECK:STDOUT: !322 = !DILocalVariable(arg: 1, scope: !321, type: !20) -// CHECK:STDOUT: !323 = !DILocation(line: 17, column: 10, scope: !321) -// CHECK:STDOUT: !324 = !{!322} -// CHECK:STDOUT: !325 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !291, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !328) -// CHECK:STDOUT: !326 = !DILocalVariable(arg: 1, scope: !325, type: !20) -// CHECK:STDOUT: !327 = !DILocation(line: 17, column: 3, scope: !325) -// CHECK:STDOUT: !328 = !{!326} -// CHECK:STDOUT: !329 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !291, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !332) -// CHECK:STDOUT: !330 = !DILocalVariable(arg: 1, scope: !329, type: !20) -// CHECK:STDOUT: !331 = !DILocation(line: 17, column: 3, scope: !329) -// CHECK:STDOUT: !332 = !{!330} -// CHECK:STDOUT: !333 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !291, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !336) -// CHECK:STDOUT: !334 = !DILocalVariable(arg: 1, scope: !333, type: !20) -// CHECK:STDOUT: !335 = !DILocation(line: 17, column: 3, scope: !333) -// CHECK:STDOUT: !336 = !{!334} -// CHECK:STDOUT: !337 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e8f1edf60e6cf258:core.Destroy.Core", scope: null, file: !291, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !340) -// CHECK:STDOUT: !338 = !DILocalVariable(arg: 1, scope: !337, type: !20) -// CHECK:STDOUT: !339 = !DILocation(line: 17, column: 3, scope: !337) -// CHECK:STDOUT: !340 = !{!338} -// CHECK:STDOUT: !341 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e8f1edf60e6cf258:core.Destroy.Core", scope: null, file: !291, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !292, 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.0166b5493230fdb7:core.Destroy.Core", scope: null, file: !291, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !348) -// CHECK:STDOUT: !346 = !DILocalVariable(arg: 1, scope: !345, type: !20) -// CHECK:STDOUT: !347 = !DILocation(line: 16, column: 3, scope: !345) -// CHECK:STDOUT: !348 = !{!346} -// CHECK:STDOUT: !349 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0166b5493230fdb7:core.Destroy.Core", scope: null, file: !291, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !352) +// CHECK:STDOUT: !298 = !DIFile(filename: "generic_use.carbon", directory: "") +// CHECK:STDOUT: !299 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !298, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !300 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !298, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !299) +// CHECK:STDOUT: !301 = !DILocation(line: 16, column: 3, scope: !300) +// CHECK:STDOUT: !302 = !DILocation(line: 16, column: 21, scope: !300) +// CHECK:STDOUT: !304 = !DILocation(line: 17, column: 3, scope: !300) +// CHECK:STDOUT: !305 = !DILocation(line: 17, column: 21, scope: !300) +// CHECK:STDOUT: !307 = !DILocation(line: 15, column: 1, scope: !300) +// CHECK:STDOUT: !308 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f2f12ab22a0a6b87:core.SubobjectDestroy.Core", scope: null, file: !298, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !311) +// CHECK:STDOUT: !309 = !DILocalVariable(arg: 1, scope: !308, type: !20) +// CHECK:STDOUT: !310 = !DILocation(line: 17, column: 10, scope: !308) +// CHECK:STDOUT: !311 = !{!309} +// CHECK:STDOUT: !312 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8578661a61c8bbbf:core.SubobjectDestroy.Core", scope: null, file: !298, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !315) +// CHECK:STDOUT: !313 = !DILocalVariable(arg: 1, scope: !312, type: !20) +// CHECK:STDOUT: !314 = !DILocation(line: 17, column: 10, scope: !312) +// CHECK:STDOUT: !315 = !{!313} +// CHECK:STDOUT: !316 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95528a86e1127e2d:core.SubobjectDestroy.Core", scope: null, file: !298, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !319) +// CHECK:STDOUT: !317 = !DILocalVariable(arg: 1, scope: !316, type: !20) +// CHECK:STDOUT: !318 = !DILocation(line: 17, column: 3, scope: !316) +// CHECK:STDOUT: !319 = !{!317} +// CHECK:STDOUT: !320 = distinct !DISubprogram(name: "Op", linkageName: "_COp.85c28669c0012288:core.SubobjectDestroy.Core", scope: null, file: !298, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !323) +// CHECK:STDOUT: !321 = !DILocalVariable(arg: 1, scope: !320, type: !20) +// CHECK:STDOUT: !322 = !DILocation(line: 17, column: 3, scope: !320) +// CHECK:STDOUT: !323 = !{!321} +// CHECK:STDOUT: !324 = distinct !DISubprogram(name: "Op", linkageName: "_COp.56a1eb541200ab4f:core.SubobjectDestroy.Core", scope: null, file: !298, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !327) +// CHECK:STDOUT: !325 = !DILocalVariable(arg: 1, scope: !324, type: !20) +// CHECK:STDOUT: !326 = !DILocation(line: 16, column: 3, scope: !324) +// CHECK:STDOUT: !327 = !{!325} +// CHECK:STDOUT: !328 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.947fa7adaf50ddfd", scope: null, file: !298, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !334) +// CHECK:STDOUT: !329 = !DILocalVariable(arg: 1, scope: !328, type: !20) +// CHECK:STDOUT: !331 = !DILocation(line: 6, column: 5, scope: !328) +// CHECK:STDOUT: !333 = !DILocation(line: 5, column: 3, scope: !328) +// CHECK:STDOUT: !334 = !{!329} +// CHECK:STDOUT: !335 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.1977607cd7948753", scope: null, file: !298, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !341) +// CHECK:STDOUT: !336 = !DILocalVariable(arg: 1, scope: !335, type: !20) +// CHECK:STDOUT: !338 = !DILocation(line: 6, column: 5, scope: !335) +// CHECK:STDOUT: !340 = !DILocation(line: 5, column: 3, scope: !335) +// CHECK:STDOUT: !341 = !{!336} +// CHECK:STDOUT: !342 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.51b6e8888a2a2103", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !348) +// CHECK:STDOUT: !343 = !DILocalVariable(arg: 1, scope: !342, type: !20) +// CHECK:STDOUT: !346 = !DILocation(line: 34, column: 5, scope: !342) +// CHECK:STDOUT: !347 = !DILocation(line: 32, column: 1, scope: !342) +// CHECK:STDOUT: !348 = !{!343} +// CHECK:STDOUT: !349 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.053043cd456173f1", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !355) // CHECK:STDOUT: !350 = !DILocalVariable(arg: 1, scope: !349, type: !20) -// CHECK:STDOUT: !351 = !DILocation(line: 16, column: 3, scope: !349) -// CHECK:STDOUT: !352 = !{!350} -// CHECK:STDOUT: !353 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.2f8a0042309f394e", scope: null, file: !291, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !359) -// CHECK:STDOUT: !354 = !DILocalVariable(arg: 1, scope: !353, type: !20) -// CHECK:STDOUT: !356 = !DILocation(line: 6, column: 5, scope: !353) -// CHECK:STDOUT: !358 = !DILocation(line: 5, column: 3, scope: !353) -// CHECK:STDOUT: !359 = !{!354} -// CHECK:STDOUT: !360 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.d7d44a05ee79f1b8", scope: null, file: !291, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !292, retainedNodes: !366) -// CHECK:STDOUT: !361 = !DILocalVariable(arg: 1, scope: !360, type: !20) -// CHECK:STDOUT: !363 = !DILocation(line: 6, column: 5, scope: !360) -// CHECK:STDOUT: !365 = !DILocation(line: 5, column: 3, scope: !360) -// CHECK:STDOUT: !366 = !{!361} +// CHECK:STDOUT: !353 = !DILocation(line: 34, column: 5, scope: !349) +// CHECK:STDOUT: !354 = !DILocation(line: 32, column: 1, scope: !349) +// CHECK:STDOUT: !355 = !{!350} +// CHECK:STDOUT: !356 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.947fa7adaf50ddfd", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !362) +// CHECK:STDOUT: !357 = !DILocalVariable(arg: 1, scope: !356, type: !20) +// CHECK:STDOUT: !361 = !DILocation(line: 32, column: 1, scope: !356) +// CHECK:STDOUT: !362 = !{!357} +// CHECK:STDOUT: !363 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.96c9f45941b9e5e6", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !369) +// CHECK:STDOUT: !364 = !DILocalVariable(arg: 1, scope: !363, type: !20) +// CHECK:STDOUT: !368 = !DILocation(line: 32, column: 1, scope: !363) +// CHECK:STDOUT: !369 = !{!364} +// CHECK:STDOUT: !370 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.1977607cd7948753", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !376) +// CHECK:STDOUT: !371 = !DILocalVariable(arg: 1, scope: !370, type: !20) +// CHECK:STDOUT: !374 = !DILocation(line: 34, column: 5, scope: !370) +// CHECK:STDOUT: !375 = !DILocation(line: 32, column: 1, scope: !370) +// CHECK:STDOUT: !376 = !{!371} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_base.carbon' @@ -1349,145 +1237,126 @@ 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 !369 { +// CHECK:STDOUT: define void @_CMake.Main() #0 !dbg !379 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { { ptr } }, align 8, !dbg !370 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !370 -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %_.var), !dbg !370 -// CHECK:STDOUT: ret void, !dbg !372 +// CHECK:STDOUT: %_.var = alloca { { ptr } }, align 8, !dbg !380 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !380 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9ede905be876779b(ptr %_.var), !dbg !380 +// CHECK:STDOUT: ret void, !dbg !382 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !373 { +// CHECK:STDOUT: define weak_odr void @"_COp.95528a86e1127e2d:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !383 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !375 +// CHECK:STDOUT: %.loc15_3.1.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !385 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %.loc15_3.1.vptr), !dbg !385 +// CHECK:STDOUT: ret void, !dbg !385 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !377 { +// CHECK:STDOUT: define weak_odr void @"_COp.fe75085f268e05b2:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !387 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !379 -// CHECK:STDOUT: call void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %.loc15.vptr), !dbg !379 -// CHECK:STDOUT: ret void, !dbg !379 +// CHECK:STDOUT: ret void, !dbg !389 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !381 { +// CHECK:STDOUT: define weak_odr void @"_COp.66111a67d7c24ae0:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !391 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self), !dbg !383 -// CHECK:STDOUT: ret void, !dbg !383 +// CHECK:STDOUT: %.loc15_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !393 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0a8de00cae90c5e4(ptr %.loc15_3.1.base), !dbg !393 +// CHECK:STDOUT: ret void, !dbg !393 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.fe75085f268e05b2:core.Destroy.Core"(ptr %self) #0 !dbg !385 { +// CHECK:STDOUT: define weak_odr void @"_COp.b25525d21a9bd472:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !395 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !387 +// CHECK:STDOUT: %.loc15_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !397 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0a8de00cae90c5e4(ptr %.loc15_3.1.base), !dbg !397 +// CHECK:STDOUT: ret void, !dbg !397 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fe75085f268e05b2:core.Destroy.Core"(ptr %self) #0 !dbg !389 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Base.Main.6d6a4a2512463e59(ptr %self) #0 !dbg !399 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.fe75085f268e05b2:core.Destroy.Core"(ptr %self), !dbg !391 -// CHECK:STDOUT: ret void, !dbg !391 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.66111a67d7c24ae0:core.Destroy.Core"(ptr %self) #0 !dbg !393 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !395 -// CHECK:STDOUT: call void @"_CSelfDestruct.fe75085f268e05b2:core.Destroy.Core"(ptr %.loc15.base), !dbg !395 -// CHECK:STDOUT: ret void, !dbg !395 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.66111a67d7c24ae0:core.Destroy.Core"(ptr %self) #0 !dbg !397 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.66111a67d7c24ae0: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.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !401 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !403 -// CHECK:STDOUT: call void @"_CSelfDestruct.fe75085f268e05b2:core.Destroy.Core"(ptr %.loc15.base), !dbg !403 -// CHECK:STDOUT: ret void, !dbg !403 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !405 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472: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 linkonce_odr void @_CF.Base.Main.6d6a4a2512463e59(ptr %self) #0 !dbg !409 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !412 +// CHECK:STDOUT: ret void, !dbg !402 // 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 @_CSelfDestruct.Core.9ede905be876779b(ptr %t) #0 !dbg !404 { +// CHECK:STDOUT: call void @"_COp.b25525d21a9bd472:core.SubobjectDestroy.Core"(ptr %t), !dbg !408 +// CHECK:STDOUT: ret void, !dbg !409 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %t) #0 !dbg !411 { +// CHECK:STDOUT: ret void, !dbg !416 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.0a8de00cae90c5e4(ptr %t) #0 !dbg !418 { +// CHECK:STDOUT: call void @"_COp.fe75085f268e05b2:core.SubobjectDestroy.Core"(ptr %t), !dbg !422 +// CHECK:STDOUT: ret void, !dbg !423 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.0a8de00cae90c5e4, { 1, 0 } +// 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 = !{!368} +// CHECK:STDOUT: !llvm.dbg.cu = !{!378} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // 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: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !367 = !DIFile(filename: "generic_base.carbon", directory: "") -// CHECK:STDOUT: !368 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !367, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !369 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !367, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !368) -// CHECK:STDOUT: !370 = !DILocation(line: 15, column: 3, scope: !369) -// CHECK:STDOUT: !372 = !DILocation(line: 14, column: 1, scope: !369) -// CHECK:STDOUT: !373 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !367, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !368, retainedNodes: !376) -// CHECK:STDOUT: !374 = !DILocalVariable(arg: 1, scope: !373, type: !20) -// CHECK:STDOUT: !375 = !DILocation(line: 15, column: 3, scope: !373) -// CHECK:STDOUT: !376 = !{!374} -// CHECK:STDOUT: !377 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !367, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !368, 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: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !367, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !368, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fe75085f268e05b2:core.Destroy.Core", scope: null, file: !367, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !368, 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: "SelfDestruct", linkageName: "_CSelfDestruct.fe75085f268e05b2:core.Destroy.Core", scope: null, file: !367, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !368, 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.66111a67d7c24ae0:core.Destroy.Core", scope: null, file: !367, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !368, 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.66111a67d7c24ae0:core.Destroy.Core", scope: null, file: !367, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !368, 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.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !367, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !368, 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.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !367, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !368, 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: "F", linkageName: "_CF.Base.Main.6d6a4a2512463e59", scope: null, file: !367, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !368, retainedNodes: !413) -// CHECK:STDOUT: !410 = !DILocalVariable(arg: 1, scope: !409, type: !20) -// CHECK:STDOUT: !412 = !DILocation(line: 5, column: 3, scope: !409) -// CHECK:STDOUT: !413 = !{!410} +// CHECK:STDOUT: !377 = !DIFile(filename: "generic_base.carbon", directory: "") +// CHECK:STDOUT: !378 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !377, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !379 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main", scope: null, file: !377, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !378) +// CHECK:STDOUT: !380 = !DILocation(line: 15, column: 3, scope: !379) +// CHECK:STDOUT: !382 = !DILocation(line: 14, column: 1, scope: !379) +// CHECK:STDOUT: !383 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95528a86e1127e2d:core.SubobjectDestroy.Core", scope: null, file: !377, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !386) +// CHECK:STDOUT: !384 = !DILocalVariable(arg: 1, scope: !383, type: !20) +// CHECK:STDOUT: !385 = !DILocation(line: 15, column: 3, scope: !383) +// CHECK:STDOUT: !386 = !{!384} +// CHECK:STDOUT: !387 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fe75085f268e05b2:core.SubobjectDestroy.Core", scope: null, file: !377, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !390) +// CHECK:STDOUT: !388 = !DILocalVariable(arg: 1, scope: !387, type: !20) +// CHECK:STDOUT: !389 = !DILocation(line: 15, column: 3, scope: !387) +// CHECK:STDOUT: !390 = !{!388} +// CHECK:STDOUT: !391 = distinct !DISubprogram(name: "Op", linkageName: "_COp.66111a67d7c24ae0:core.SubobjectDestroy.Core", scope: null, file: !377, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !394) +// CHECK:STDOUT: !392 = !DILocalVariable(arg: 1, scope: !391, type: !20) +// CHECK:STDOUT: !393 = !DILocation(line: 15, column: 3, scope: !391) +// CHECK:STDOUT: !394 = !{!392} +// CHECK:STDOUT: !395 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b25525d21a9bd472:core.SubobjectDestroy.Core", scope: null, file: !377, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !398) +// CHECK:STDOUT: !396 = !DILocalVariable(arg: 1, scope: !395, type: !20) +// CHECK:STDOUT: !397 = !DILocation(line: 15, column: 3, scope: !395) +// CHECK:STDOUT: !398 = !{!396} +// CHECK:STDOUT: !399 = distinct !DISubprogram(name: "F", linkageName: "_CF.Base.Main.6d6a4a2512463e59", scope: null, file: !377, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !403) +// CHECK:STDOUT: !400 = !DILocalVariable(arg: 1, scope: !399, type: !20) +// CHECK:STDOUT: !402 = !DILocation(line: 5, column: 3, scope: !399) +// CHECK:STDOUT: !403 = !{!400} +// CHECK:STDOUT: !404 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9ede905be876779b", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !410) +// CHECK:STDOUT: !405 = !DILocalVariable(arg: 1, scope: !404, type: !20) +// CHECK:STDOUT: !408 = !DILocation(line: 34, column: 5, scope: !404) +// CHECK:STDOUT: !409 = !DILocation(line: 32, column: 1, scope: !404) +// CHECK:STDOUT: !410 = !{!405} +// CHECK:STDOUT: !411 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.96c9f45941b9e5e6", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !417) +// CHECK:STDOUT: !412 = !DILocalVariable(arg: 1, scope: !411, type: !20) +// CHECK:STDOUT: !416 = !DILocation(line: 32, column: 1, scope: !411) +// CHECK:STDOUT: !417 = !{!412} +// CHECK:STDOUT: !418 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.0a8de00cae90c5e4", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !424) +// CHECK:STDOUT: !419 = !DILocalVariable(arg: 1, scope: !418, type: !20) +// CHECK:STDOUT: !422 = !DILocation(line: 34, column: 5, scope: !418) +// CHECK:STDOUT: !423 = !DILocation(line: 32, column: 1, scope: !418) +// CHECK:STDOUT: !424 = !{!419} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'thunk.carbon' @@ -1504,132 +1373,80 @@ 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 !420 { +// CHECK:STDOUT: define void @_CF.Derived.Main(ptr sret({}) %return, ptr %self, ptr %n) #0 !dbg !431 { // 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 !427 -// CHECK:STDOUT: ret void, !dbg !427 +// 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 !438 +// CHECK:STDOUT: ret void, !dbg !438 // 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 !429 { +// CHECK:STDOUT: define weak_odr void @"_CF:thunk:Base.Main:Derived.Main"(ptr sret({}) %return, ptr %self, ptr %n) #1 !dbg !440 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_52.2.temp = alloca {}, align 1, !dbg !433 -// CHECK:STDOUT: %.loc17_52.4.temp = alloca {}, align 1, !dbg !433 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_52.2.temp), !dbg !433 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_52.4.temp), !dbg !433 -// CHECK:STDOUT: call void @"_CConvert.From.Main:ImplicitAs.a3bb440f6426a7d6.Core"(ptr %.loc17_52.4.temp, ptr %n), !dbg !433 -// CHECK:STDOUT: call void @_CF.Derived.Main(ptr %.loc17_52.2.temp, ptr %self, ptr %.loc17_52.4.temp), !dbg !433 -// CHECK:STDOUT: call void @"_CConvert.From.Main:ImplicitAs.a3bb440f6426a7d6.Core"(ptr %return, ptr %.loc17_52.2.temp), !dbg !433 -// CHECK:STDOUT: call void @"_CSelfDestruct.c2a743abd057cb33:core.Destroy.Core"(ptr %.loc17_52.2.temp), !dbg !433 -// CHECK:STDOUT: call void @"_CSelfDestruct.7ef2e8c2f12d163a:core.Destroy.Core"(ptr %.loc17_52.4.temp), !dbg !433 -// CHECK:STDOUT: ret void, !dbg !433 +// CHECK:STDOUT: %.loc17_52.2.temp = alloca {}, align 1, !dbg !444 +// CHECK:STDOUT: %.loc17_52.4.temp = alloca {}, align 1, !dbg !444 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_52.2.temp), !dbg !444 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_52.4.temp), !dbg !444 +// CHECK:STDOUT: call void @"_CConvert.From.Main:ImplicitAs.a3bb440f6426a7d6.Core"(ptr %.loc17_52.4.temp, ptr %n), !dbg !444 +// CHECK:STDOUT: call void @_CF.Derived.Main(ptr %.loc17_52.2.temp, ptr %self, ptr %.loc17_52.4.temp), !dbg !444 +// CHECK:STDOUT: call void @"_CConvert.From.Main:ImplicitAs.a3bb440f6426a7d6.Core"(ptr %return, ptr %.loc17_52.2.temp), !dbg !444 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e78f8db79d6ac06d(ptr %.loc17_52.2.temp), !dbg !444 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0b0eb9f9bcd515e4(ptr %.loc17_52.4.temp), !dbg !444 +// CHECK:STDOUT: ret void, !dbg !444 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !435 { +// CHECK:STDOUT: define void @_CUse.Main() #0 !dbg !446 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !437 +// CHECK:STDOUT: %d.var = alloca { { ptr } }, align 8, !dbg !447 +// CHECK:STDOUT: %.loc25_10.1.temp = alloca {}, align 1, !dbg !455 +// CHECK:STDOUT: %.loc25_9.2.temp = alloca {}, align 1, !dbg !456 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !447 +// CHECK:STDOUT: %.loc23_31.2.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !448 +// CHECK:STDOUT: %.loc23_30.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc23_31.2.base, i32 0, i32 0, !dbg !449 +// CHECK:STDOUT: %.loc23_31.6.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !448 +// CHECK:STDOUT: %.loc23_31.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc23_31.6.base, i32 0, i32 0, !dbg !448 +// 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 !448 +// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc23_31.7.vptr, align 8, !dbg !448 +// CHECK:STDOUT: %.loc24_18.2.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !452 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_10.1.temp), !dbg !455 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_9.2.temp), !dbg !456 +// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %.loc25_10.1.temp, align 8, !dbg !455 +// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !455 +// CHECK:STDOUT: call void %Base.F.call(ptr %.loc25_10.1.temp, ptr %.loc24_18.2.base, ptr @From.val.loc18_14), !dbg !455 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0b0eb9f9bcd515e4(ptr %.loc25_10.1.temp), !dbg !455 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e78f8db79d6ac06d(ptr @From.val), !dbg !456 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9ede905be876779b(ptr %d.var), !dbg !447 +// 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 !439 { +// CHECK:STDOUT: define weak_odr void @"_COp.95528a86e1127e2d:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !458 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !441 +// CHECK:STDOUT: %.loc23_3.1.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !460 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %.loc23_3.1.vptr), !dbg !460 +// CHECK:STDOUT: ret void, !dbg !460 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7ef2e8c2f12d163a:core.Destroy.Core"(ptr %self) #0 !dbg !443 { +// CHECK:STDOUT: define weak_odr void @"_COp.294df737cd074d60:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !462 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !445 +// CHECK:STDOUT: ret void, !dbg !464 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CUse.Main() #0 !dbg !447 { +// CHECK:STDOUT: define weak_odr void @"_COp.caed8a96bf328d09:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !466 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %d.var = alloca { { ptr } }, align 8, !dbg !448 -// CHECK:STDOUT: %.loc25_10.1.temp = alloca {}, align 1, !dbg !456 -// CHECK:STDOUT: %.loc25_9.2.temp = alloca {}, align 1, !dbg !457 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !448 -// CHECK:STDOUT: %.loc23_31.2.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !449 -// CHECK:STDOUT: %.loc23_30.2.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc23_31.2.base, i32 0, i32 0, !dbg !450 -// CHECK:STDOUT: %.loc23_31.6.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !449 -// CHECK:STDOUT: %.loc23_31.7.vptr = getelementptr inbounds nuw { ptr }, ptr %.loc23_31.6.base, i32 0, i32 0, !dbg !449 -// 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 !449 -// CHECK:STDOUT: store ptr @"_CDerived.Main.$vtable", ptr %.loc23_31.7.vptr, align 8, !dbg !449 -// CHECK:STDOUT: %.loc24_18.2.base = getelementptr inbounds nuw { { ptr } }, ptr %d.var, i32 0, i32 0, !dbg !453 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_10.1.temp), !dbg !456 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_9.2.temp), !dbg !457 -// CHECK:STDOUT: %Base.F.call.vtable = load ptr, ptr %.loc25_10.1.temp, align 8, !dbg !456 -// CHECK:STDOUT: %Base.F.call = call ptr @llvm.load.relative.i32(ptr %Base.F.call.vtable, i32 0), !dbg !456 -// CHECK:STDOUT: call void %Base.F.call(ptr %.loc25_10.1.temp, ptr %.loc24_18.2.base, ptr @From.val.loc18_14), !dbg !456 -// CHECK:STDOUT: call void @"_CSelfDestruct.7ef2e8c2f12d163a:core.Destroy.Core"(ptr %.loc25_10.1.temp), !dbg !456 -// CHECK:STDOUT: call void @"_CSelfDestruct.c2a743abd057cb33:core.Destroy.Core"(ptr @From.val), !dbg !457 -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %d.var), !dbg !448 -// CHECK:STDOUT: ret void, !dbg !458 +// CHECK:STDOUT: %.loc23_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !468 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a4aefa05e08cd2e1(ptr %.loc23_3.1.base), !dbg !468 +// CHECK:STDOUT: ret void, !dbg !468 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %self) #0 !dbg !459 { +// CHECK:STDOUT: define weak_odr void @"_COp.b25525d21a9bd472:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !470 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !461 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !463 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc23.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !465 -// CHECK:STDOUT: call void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %.loc23.vptr), !dbg !465 -// CHECK:STDOUT: ret void, !dbg !465 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !467 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95528a86e1127e2d: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 weak_odr void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !471 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !473 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %self) #0 !dbg !475 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self), !dbg !477 -// CHECK:STDOUT: ret void, !dbg !477 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !479 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc23.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !481 -// CHECK:STDOUT: call void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %.loc23.base), !dbg !481 -// CHECK:STDOUT: ret void, !dbg !481 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core"(ptr %self) #0 !dbg !483 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core"(ptr %self), !dbg !485 -// CHECK:STDOUT: ret void, !dbg !485 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !487 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc23.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !489 -// CHECK:STDOUT: call void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %.loc23.base), !dbg !489 -// CHECK:STDOUT: ret void, !dbg !489 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #0 !dbg !491 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !493 -// CHECK:STDOUT: ret void, !dbg !493 +// CHECK:STDOUT: %.loc23_3.1.base = getelementptr inbounds nuw { { ptr } }, ptr %self, i32 0, i32 0, !dbg !472 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a4aefa05e08cd2e1(ptr %.loc23_3.1.base), !dbg !472 +// CHECK:STDOUT: ret void, !dbg !472 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -1638,96 +1455,117 @@ fn Use() { // 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 void @_CSelfDestruct.Core.e78f8db79d6ac06d(ptr %t) #0 !dbg !474 { +// CHECK:STDOUT: ret void, !dbg !479 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.0b0eb9f9bcd515e4(ptr %t) #0 !dbg !481 { +// CHECK:STDOUT: ret void, !dbg !486 +// 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) #3 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9ede905be876779b(ptr %t) #0 !dbg !488 { +// CHECK:STDOUT: call void @"_COp.b25525d21a9bd472:core.SubobjectDestroy.Core"(ptr %t), !dbg !492 +// CHECK:STDOUT: ret void, !dbg !493 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %t) #0 !dbg !495 { +// CHECK:STDOUT: ret void, !dbg !500 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.a4aefa05e08cd2e1(ptr %t) #0 !dbg !502 { +// CHECK:STDOUT: call void @"_COp.294df737cd074d60:core.SubobjectDestroy.Core"(ptr %t), !dbg !506 +// CHECK:STDOUT: ret void, !dbg !507 +// 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, { 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.e78f8db79d6ac06d, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.0b0eb9f9bcd515e4, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.a4aefa05e08cd2e1, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { alwaysinline nounwind } // 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 = !{!415} +// CHECK:STDOUT: !llvm.dbg.cu = !{!426} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // 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: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !414 = !DIFile(filename: "thunk.carbon", directory: "") -// CHECK:STDOUT: !415 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !414, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !418 = !{!20, !20, !20} -// CHECK:STDOUT: !419 = !DISubroutineType(types: !418) -// CHECK:STDOUT: !420 = distinct !DISubprogram(name: "F", linkageName: "_CF.Derived.Main", scope: null, file: !414, line: 17, type: !419, spFlags: DISPFlagDefinition, unit: !415, retainedNodes: !428) -// CHECK:STDOUT: !421 = !DILocalVariable(arg: 1, scope: !420, type: !20) -// CHECK:STDOUT: !422 = !DILocalVariable(arg: 2, scope: !420, type: !20) -// CHECK:STDOUT: !427 = !DILocation(line: 18, column: 5, scope: !420) -// CHECK:STDOUT: !428 = !{!421, !422} -// CHECK:STDOUT: !429 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !414, line: 17, type: !419, spFlags: DISPFlagDefinition, unit: !415, retainedNodes: !434) -// CHECK:STDOUT: !430 = !DILocalVariable(arg: 1, scope: !429, type: !20) -// CHECK:STDOUT: !431 = !DILocalVariable(arg: 2, scope: !429, type: !20) -// CHECK:STDOUT: !433 = !DILocation(line: 17, column: 3, scope: !429) -// CHECK:STDOUT: !434 = !{!430, !431} -// CHECK:STDOUT: !435 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !414, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !415, retainedNodes: !438) -// CHECK:STDOUT: !436 = !DILocalVariable(arg: 1, scope: !435, type: !20) -// CHECK:STDOUT: !437 = !DILocation(line: 17, column: 3, scope: !435) -// CHECK:STDOUT: !438 = !{!436} -// CHECK:STDOUT: !439 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c2a743abd057cb33:core.Destroy.Core", scope: null, file: !414, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !415, 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.7ef2e8c2f12d163a:core.Destroy.Core", scope: null, file: !414, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !415, 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: "Use", linkageName: "_CUse.Main", scope: null, file: !414, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !415) -// CHECK:STDOUT: !448 = !DILocation(line: 23, column: 3, scope: !447) -// CHECK:STDOUT: !449 = !DILocation(line: 23, column: 20, scope: !447) -// CHECK:STDOUT: !450 = !DILocation(line: 23, column: 29, scope: !447) -// CHECK:STDOUT: !453 = !DILocation(line: 24, column: 18, scope: !447) -// CHECK:STDOUT: !456 = !DILocation(line: 25, column: 3, scope: !447) -// CHECK:STDOUT: !457 = !DILocation(line: 25, column: 8, scope: !447) -// CHECK:STDOUT: !458 = !DILocation(line: 22, column: 1, scope: !447) -// CHECK:STDOUT: !459 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core", scope: null, file: !414, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !415, retainedNodes: !462) -// CHECK:STDOUT: !460 = !DILocalVariable(arg: 1, scope: !459, type: !20) -// CHECK:STDOUT: !461 = !DILocation(line: 23, column: 3, scope: !459) -// CHECK:STDOUT: !462 = !{!460} -// CHECK:STDOUT: !463 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !414, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !415, retainedNodes: !466) -// CHECK:STDOUT: !464 = !DILocalVariable(arg: 1, scope: !463, type: !20) -// CHECK:STDOUT: !465 = !DILocation(line: 23, column: 3, scope: !463) -// CHECK:STDOUT: !466 = !{!464} -// CHECK:STDOUT: !467 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95528a86e1127e2d:core.Destroy.Core", scope: null, file: !414, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !415, retainedNodes: !470) -// CHECK:STDOUT: !468 = !DILocalVariable(arg: 1, scope: !467, type: !20) -// CHECK:STDOUT: !469 = !DILocation(line: 23, column: 3, scope: !467) -// CHECK:STDOUT: !470 = !{!468} -// CHECK:STDOUT: !471 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core", scope: null, file: !414, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !415, 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: "SelfDestruct", linkageName: "_CSelfDestruct.294df737cd074d60:core.Destroy.Core", scope: null, file: !414, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !415, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !414, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !415, 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: "SelfDestruct", linkageName: "_CSelfDestruct.caed8a96bf328d09:core.Destroy.Core", scope: null, file: !414, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !415, 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.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !414, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !415, 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.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !414, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !415, 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: !425 = !DIFile(filename: "thunk.carbon", directory: "") +// CHECK:STDOUT: !426 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !425, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !429 = !{!20, !20, !20} +// CHECK:STDOUT: !430 = !DISubroutineType(types: !429) +// CHECK:STDOUT: !431 = distinct !DISubprogram(name: "F", linkageName: "_CF.Derived.Main", scope: null, file: !425, line: 17, type: !430, spFlags: DISPFlagDefinition, unit: !426, retainedNodes: !439) +// CHECK:STDOUT: !432 = !DILocalVariable(arg: 1, scope: !431, type: !20) +// CHECK:STDOUT: !433 = !DILocalVariable(arg: 2, scope: !431, type: !20) +// CHECK:STDOUT: !438 = !DILocation(line: 18, column: 5, scope: !431) +// CHECK:STDOUT: !439 = !{!432, !433} +// CHECK:STDOUT: !440 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:Base.Main:Derived.Main", scope: null, file: !425, line: 17, type: !430, spFlags: DISPFlagDefinition, unit: !426, retainedNodes: !445) +// CHECK:STDOUT: !441 = !DILocalVariable(arg: 1, scope: !440, type: !20) +// CHECK:STDOUT: !442 = !DILocalVariable(arg: 2, scope: !440, type: !20) +// CHECK:STDOUT: !444 = !DILocation(line: 17, column: 3, scope: !440) +// CHECK:STDOUT: !445 = !{!441, !442} +// CHECK:STDOUT: !446 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !425, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !426) +// CHECK:STDOUT: !447 = !DILocation(line: 23, column: 3, scope: !446) +// CHECK:STDOUT: !448 = !DILocation(line: 23, column: 20, scope: !446) +// CHECK:STDOUT: !449 = !DILocation(line: 23, column: 29, scope: !446) +// CHECK:STDOUT: !452 = !DILocation(line: 24, column: 18, scope: !446) +// CHECK:STDOUT: !455 = !DILocation(line: 25, column: 3, scope: !446) +// CHECK:STDOUT: !456 = !DILocation(line: 25, column: 8, scope: !446) +// CHECK:STDOUT: !457 = !DILocation(line: 22, column: 1, scope: !446) +// CHECK:STDOUT: !458 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95528a86e1127e2d:core.SubobjectDestroy.Core", scope: null, file: !425, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !426, retainedNodes: !461) +// CHECK:STDOUT: !459 = !DILocalVariable(arg: 1, scope: !458, type: !20) +// CHECK:STDOUT: !460 = !DILocation(line: 23, column: 3, scope: !458) +// CHECK:STDOUT: !461 = !{!459} +// CHECK:STDOUT: !462 = distinct !DISubprogram(name: "Op", linkageName: "_COp.294df737cd074d60:core.SubobjectDestroy.Core", scope: null, file: !425, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !426, retainedNodes: !465) +// CHECK:STDOUT: !463 = !DILocalVariable(arg: 1, scope: !462, type: !20) +// CHECK:STDOUT: !464 = !DILocation(line: 23, column: 3, scope: !462) +// CHECK:STDOUT: !465 = !{!463} +// CHECK:STDOUT: !466 = distinct !DISubprogram(name: "Op", linkageName: "_COp.caed8a96bf328d09:core.SubobjectDestroy.Core", scope: null, file: !425, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !426, retainedNodes: !469) +// CHECK:STDOUT: !467 = !DILocalVariable(arg: 1, scope: !466, type: !20) +// CHECK:STDOUT: !468 = !DILocation(line: 23, column: 3, scope: !466) +// CHECK:STDOUT: !469 = !{!467} +// CHECK:STDOUT: !470 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b25525d21a9bd472:core.SubobjectDestroy.Core", scope: null, file: !425, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !426, retainedNodes: !473) +// CHECK:STDOUT: !471 = !DILocalVariable(arg: 1, scope: !470, type: !20) +// CHECK:STDOUT: !472 = !DILocation(line: 23, column: 3, scope: !470) +// CHECK:STDOUT: !473 = !{!471} +// CHECK:STDOUT: !474 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e78f8db79d6ac06d", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !426, retainedNodes: !480) +// CHECK:STDOUT: !475 = !DILocalVariable(arg: 1, scope: !474, type: !20) +// CHECK:STDOUT: !479 = !DILocation(line: 32, column: 1, scope: !474) +// CHECK:STDOUT: !480 = !{!475} +// CHECK:STDOUT: !481 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.0b0eb9f9bcd515e4", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !426, retainedNodes: !487) +// CHECK:STDOUT: !482 = !DILocalVariable(arg: 1, scope: !481, type: !20) +// CHECK:STDOUT: !486 = !DILocation(line: 32, column: 1, scope: !481) +// CHECK:STDOUT: !487 = !{!482} +// CHECK:STDOUT: !488 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9ede905be876779b", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !426, retainedNodes: !494) +// CHECK:STDOUT: !489 = !DILocalVariable(arg: 1, scope: !488, type: !20) +// CHECK:STDOUT: !492 = !DILocation(line: 34, column: 5, scope: !488) +// CHECK:STDOUT: !493 = !DILocation(line: 32, column: 1, scope: !488) +// CHECK:STDOUT: !494 = !{!489} +// CHECK:STDOUT: !495 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.96c9f45941b9e5e6", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !426, retainedNodes: !501) +// CHECK:STDOUT: !496 = !DILocalVariable(arg: 1, scope: !495, type: !20) +// CHECK:STDOUT: !500 = !DILocation(line: 32, column: 1, scope: !495) +// CHECK:STDOUT: !501 = !{!496} +// CHECK:STDOUT: !502 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.a4aefa05e08cd2e1", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !426, retainedNodes: !508) +// CHECK:STDOUT: !503 = !DILocalVariable(arg: 1, scope: !502, type: !20) +// CHECK:STDOUT: !506 = !DILocation(line: 34, column: 5, scope: !502) +// CHECK:STDOUT: !507 = !DILocation(line: 32, column: 1, scope: !502) +// CHECK:STDOUT: !508 = !{!503} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/for/bindings.carbon b/toolchain/lower/testdata/for/bindings.carbon index 839a29e774ec..084ce7740372 100644 --- a/toolchain/lower/testdata/for/bindings.carbon +++ b/toolchain/lower/testdata/for/bindings.carbon @@ -35,153 +35,89 @@ fn For() { // CHECK:STDOUT: ; ModuleID = 'bindings.carbon' // CHECK:STDOUT: source_filename = "bindings.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @EmptyRange.val.loc27_3 = internal constant {} zeroinitializer -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !16 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !18 -// CHECK:STDOUT: } +// CHECK:STDOUT: @EmptyRange.val.loc27_3.1 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CF.Main(i32, ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CFor.Main() #0 !dbg !20 { +// CHECK:STDOUT: define void @_CFor.Main() #0 !dbg !14 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %r.var = alloca {}, align 1, !dbg !21 -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !23 -// CHECK:STDOUT: %var = alloca {}, align 1, !dbg !26 -// CHECK:STDOUT: %.loc29_33.1.temp = alloca <{ { i32, i32 }, i1 }>, align 4, !dbg !26 -// CHECK:STDOUT: %.loc29_33.8.temp = alloca { i32, i32 }, align 4, !dbg !26 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %r.var), !dbg !21 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %r.var, ptr align 1 @EmptyRange.val.loc27_3, i64 0, i1 false), !dbg !21 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !23 -// CHECK:STDOUT: call void @"_CNewCursor.EmptyRange.a081b942542726db.Main:Iterate.Core.5198edb523100189"(ptr %r.var), !dbg !26 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var), !dbg !26 -// CHECK:STDOUT: br label %for.next, !dbg !26 +// CHECK:STDOUT: %r.var = alloca {}, align 1, !dbg !15 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !17 +// CHECK:STDOUT: %var = alloca {}, align 1, !dbg !20 +// CHECK:STDOUT: %.loc29_33.1.temp = alloca <{ { i32, i32 }, i1 }>, align 4, !dbg !20 +// CHECK:STDOUT: %.loc29_33.8.temp = alloca { i32, i32 }, align 4, !dbg !20 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %r.var), !dbg !15 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %r.var, ptr align 1 @EmptyRange.val.loc27_3.1, i64 0, i1 false), !dbg !15 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !17 +// CHECK:STDOUT: call void @"_CNewCursor.EmptyRange.b30481ddd22ae53e.Main:Iterate.Core.3c6fb8ac8f4bd886"(ptr %r.var), !dbg !20 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var), !dbg !20 +// CHECK:STDOUT: br label %for.next, !dbg !20 // CHECK:STDOUT: // CHECK:STDOUT: for.next: ; preds = %for.body, %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_33.1.temp), !dbg !26 -// CHECK:STDOUT: call void @"_CNext.EmptyRange.a081b942542726db.Main:Iterate.Core.5198edb523100189"(ptr %.loc29_33.1.temp, ptr %r.var, ptr %var), !dbg !26 -// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.3bd04128f9cedf9b(ptr %.loc29_33.1.temp), !dbg !26 -// CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !26 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_33.1.temp), !dbg !20 +// CHECK:STDOUT: call void @"_CNext.EmptyRange.b30481ddd22ae53e.Main:Iterate.Core.3c6fb8ac8f4bd886"(ptr %.loc29_33.1.temp, ptr %r.var, ptr %var), !dbg !20 +// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.dc5ffaddab9fc53e(ptr %.loc29_33.1.temp), !dbg !20 +// CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !20 // CHECK:STDOUT: // CHECK:STDOUT: for.body: ; preds = %for.next -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_33.8.temp), !dbg !26 -// CHECK:STDOUT: call void @_CGet.Optional.Core.3bd04128f9cedf9b(ptr %.loc29_33.8.temp, ptr %.loc29_33.1.temp), !dbg !26 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc29_33.8.temp, i32 0, i32 0, !dbg !26 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc29_33.8.temp, i32 0, i32 1, !dbg !26 -// CHECK:STDOUT: %.loc29_33.11 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !26 -// CHECK:STDOUT: %.loc29_33.12 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !26 -// CHECK:STDOUT: store i32 %.loc29_33.12, ptr %n.var, align 4, !dbg !23 -// CHECK:STDOUT: call void @_CF.Main(i32 %.loc29_33.11, ptr %n.var), !dbg !36 -// CHECK:STDOUT: call void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %.loc29_33.8.temp), !dbg !26 -// CHECK:STDOUT: call void @"_CSelfDestruct.e38ce69b868eb38e:core.Destroy.Core"(ptr %.loc29_33.1.temp), !dbg !26 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !23 -// CHECK:STDOUT: br label %for.next, !dbg !37 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_33.8.temp), !dbg !20 +// CHECK:STDOUT: call void @_CGet.Optional.Core.dc5ffaddab9fc53e(ptr %.loc29_33.8.temp, ptr %.loc29_33.1.temp), !dbg !20 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc29_33.8.temp, i32 0, i32 0, !dbg !20 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc29_33.8.temp, i32 0, i32 1, !dbg !20 +// CHECK:STDOUT: %.loc29_33.11 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !20 +// CHECK:STDOUT: %.loc29_33.12 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !20 +// CHECK:STDOUT: store i32 %.loc29_33.12, ptr %n.var, align 4, !dbg !17 +// CHECK:STDOUT: call void @_CF.Main(i32 %.loc29_33.11, ptr %n.var), !dbg !30 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %.loc29_33.8.temp), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.decc97f51bbf9647(ptr %.loc29_33.1.temp), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !17 +// CHECK:STDOUT: br label %for.next, !dbg !33 // CHECK:STDOUT: // CHECK:STDOUT: for.done: ; preds = %for.next -// CHECK:STDOUT: call void @"_CSelfDestruct.e38ce69b868eb38e:core.Destroy.Core"(ptr %.loc29_33.1.temp), !dbg !26 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !23 -// CHECK:STDOUT: call void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %var), !dbg !26 -// CHECK:STDOUT: call void @"_CSelfDestruct.a68122aa61d8c461:core.Destroy.Core"(ptr %r.var), !dbg !21 -// CHECK:STDOUT: ret void, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.decc97f51bbf9647(ptr %.loc29_33.1.temp), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !17 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.61b5bb2079973306(ptr %var), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.feee70e0690b5123(ptr %r.var), !dbg !15 +// CHECK:STDOUT: ret void, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !39 { +// CHECK:STDOUT: define weak_odr void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !35 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !37 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !37 +// CHECK:STDOUT: ret void, !dbg !37 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define weak_odr void @"_COp.0c4f898a89556950:core.SubobjectDestroy.Core"(ptr %self) #0 !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 @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: define weak_odr void @"_COp.e13bb226a5f60f67:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !45 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !45 +// CHECK:STDOUT: %.loc29_33.1.has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %self, i32 0, i32 1, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %.loc29_33.1.has_value), !dbg !45 +// CHECK:STDOUT: %.loc29_33.4.value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %self, i32 0, i32 0, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.22464d2e6bd3df35(ptr %.loc29_33.4.value), !dbg !45 // CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: define weak_odr void @"_COp.3a40968e4559dd32:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self), !dbg !49 +// CHECK:STDOUT: %.loc29_33.1.has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %self, i32 0, i32 1, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %.loc29_33.1.has_value), !dbg !49 +// CHECK:STDOUT: %.loc29_33.4.value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %self, i32 0, i32 0, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.22464d2e6bd3df35(ptr %.loc29_33.4.value), !dbg !49 // CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0c4f898a89556950: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.0c4f898a89556950:core.Destroy.Core"(ptr %self) #0 !dbg !55 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0c4f898a89556950: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.51058dcfe1179225: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.48e0adf639fe7af4: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.e4a178aaee29c61e:core.Destroy.Core"(ptr %self) #0 !dbg !67 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc29_33.1.has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %self, i32 0, i32 1, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc29_33.1.has_value), !dbg !69 -// CHECK:STDOUT: %.loc29_33.2.value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %self, i32 0, i32 0, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.51058dcfe1179225:core.Destroy.Core"(ptr %.loc29_33.2.value), !dbg !69 -// CHECK:STDOUT: ret void, !dbg !69 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e4a178aaee29c61e:core.Destroy.Core"(ptr %self) #0 !dbg !71 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e4a178aaee29c61e: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.27ec56b84ea99a5a:core.Destroy.Core"(ptr %self) #0 !dbg !75 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc29_33.1.has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %self, i32 0, i32 1, !dbg !77 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc29_33.1.has_value), !dbg !77 -// CHECK:STDOUT: %.loc29_33.2.value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %self, i32 0, i32 0, !dbg !77 -// CHECK:STDOUT: call void @"_CSelfDestruct.51058dcfe1179225:core.Destroy.Core"(ptr %.loc29_33.2.value), !dbg !77 -// CHECK:STDOUT: ret void, !dbg !77 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.27ec56b84ea99a5a:core.Destroy.Core"(ptr %self) #0 !dbg !79 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.27ec56b84ea99a5a: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.e38ce69b868eb38e: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 @"_CSelfDestruct.a68122aa61d8c461: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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -189,75 +125,113 @@ 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.5198edb523100189"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define linkonce_odr void @"_CNewCursor.EmptyRange.b30481ddd22ae53e.Main:Iterate.Core.3c6fb8ac8f4bd886"(ptr %self) #0 !dbg !51 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !96 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNext.EmptyRange.a081b942542726db.Main:Iterate.Core.5198edb523100189"(ptr sret(<{ { i32, i32 }, i1 }>) %return, ptr %self, ptr %_) #0 !dbg !98 { +// CHECK:STDOUT: define linkonce_odr void @"_CNext.EmptyRange.b30481ddd22ae53e.Main:Iterate.Core.3c6fb8ac8f4bd886"(ptr sret(<{ { i32, i32 }, i1 }>) %return, ptr %self, ptr %_) #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CNone.Optional.Core.3bd04128f9cedf9b(ptr %return), !dbg !105 -// CHECK:STDOUT: ret void, !dbg !108 +// CHECK:STDOUT: call void @_CNone.Optional.Core.dc5ffaddab9fc53e(ptr %return), !dbg !65 +// CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.3bd04128f9cedf9b(ptr %self) #0 !dbg !111 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.5198edb523100189"(ptr %self), !dbg !117 -// CHECK:STDOUT: ret i1 %1, !dbg !118 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.dc5ffaddab9fc53e(ptr %self) #0 !dbg !71 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.3c6fb8ac8f4bd886"(ptr %self), !dbg !77 +// CHECK:STDOUT: ret i1 %1, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CGet.Optional.Core.3bd04128f9cedf9b(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !120 { -// CHECK:STDOUT: call void @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.5198edb523100189"(ptr %return, ptr %self), !dbg !126 -// CHECK:STDOUT: ret void, !dbg !127 +// CHECK:STDOUT: define linkonce_odr void @_CGet.Optional.Core.dc5ffaddab9fc53e(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !80 { +// CHECK:STDOUT: call void @"_CGet.c1cc3e41344c17ec:OptionalStorage.Core.3c6fb8ac8f4bd886"(ptr %return, ptr %self), !dbg !86 +// CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.3bd04128f9cedf9b(ptr sret(<{ { i32, i32 }, i1 }>) %return) #0 !dbg !129 { -// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.5198edb523100189"(ptr %return), !dbg !132 -// CHECK:STDOUT: ret void, !dbg !133 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %t) #0 !dbg !90 { +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %t), !dbg !94 +// CHECK:STDOUT: ret void, !dbg !95 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.5198edb523100189"(ptr %value) #0 !dbg !134 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %value, i32 0, i32 1, !dbg !139 -// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !139 -// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !139 -// CHECK:STDOUT: ret i1 %2, !dbg !140 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.decc97f51bbf9647(ptr %t) #0 !dbg !97 { +// CHECK:STDOUT: ret void, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.5198edb523100189"(ptr sret({ i32, i32 }) %return, ptr %value) #0 !dbg !142 { -// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %value, i32 0, i32 0, !dbg !147 -// CHECK:STDOUT: call void @"_COp.4e4edddc7580c79b:Copy.Core.3eda18978e8f48e1"(ptr %return, ptr %value1), !dbg !147 -// CHECK:STDOUT: ret void, !dbg !148 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !104 { +// CHECK:STDOUT: ret void, !dbg !109 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.5198edb523100189"(ptr sret(<{ { i32, i32 }, i1 }>) %return) #0 !dbg !150 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %return, i32 0, i32 1, !dbg !157 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !157 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.61b5bb2079973306(ptr %t) #0 !dbg !111 { +// CHECK:STDOUT: ret void, !dbg !116 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.feee70e0690b5123(ptr %t) #0 !dbg !118 { +// CHECK:STDOUT: ret void, !dbg !123 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %t) #0 !dbg !125 { +// CHECK:STDOUT: ret void, !dbg !130 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.22464d2e6bd3df35(ptr %t) #0 !dbg !132 { +// CHECK:STDOUT: ret void, !dbg !137 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.dc5ffaddab9fc53e(ptr sret(<{ { i32, i32 }, i1 }>) %return) #0 !dbg !139 { +// CHECK:STDOUT: call void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.3c6fb8ac8f4bd886"(ptr %return), !dbg !142 +// CHECK:STDOUT: ret void, !dbg !143 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.3c6fb8ac8f4bd886"(ptr %value) #0 !dbg !144 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %value, i32 0, i32 1, !dbg !149 +// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !149 +// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !149 +// CHECK:STDOUT: ret i1 %2, !dbg !150 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @"_CGet.c1cc3e41344c17ec:OptionalStorage.Core.3c6fb8ac8f4bd886"(ptr sret({ i32, i32 }) %return, ptr %value) #0 !dbg !152 { +// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %value, i32 0, i32 0, !dbg !157 +// CHECK:STDOUT: call void @"_COp.4e4edddc7580c79b:Copy.Core.3eda18978e8f48e1"(ptr %return, ptr %value1), !dbg !157 // CHECK:STDOUT: ret void, !dbg !158 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.4e4edddc7580c79b:Copy.Core.3eda18978e8f48e1"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !160 { -// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !165 -// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !165 -// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !166 -// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !167 -// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !167 -// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !166 -// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !166 -// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !166 +// CHECK:STDOUT: define linkonce_odr void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.3c6fb8ac8f4bd886"(ptr sret(<{ { i32, i32 }, i1 }>) %return) #0 !dbg !160 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ { i32, i32 }, i1 }>, ptr %return, i32 0, i32 1, !dbg !167 +// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !167 // CHECK:STDOUT: ret void, !dbg !168 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @"_COp.4e4edddc7580c79b:Copy.Core.3eda18978e8f48e1"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !170 { +// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !175 +// CHECK:STDOUT: %tuple.elem.load = load i32, ptr %tuple.elem, align 4, !dbg !175 +// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !176 +// CHECK:STDOUT: %tuple.elem2 = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !177 +// CHECK:STDOUT: %tuple.elem.load3 = load i32, ptr %tuple.elem2, align 4, !dbg !177 +// CHECK:STDOUT: %tuple.elem4 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !176 +// CHECK:STDOUT: store i32 %tuple.elem.load, ptr %tuple.elem1, align 4, !dbg !176 +// CHECK:STDOUT: store i32 %tuple.elem.load3, ptr %tuple.elem4, align 4, !dbg !176 +// CHECK:STDOUT: ret void, !dbg !178 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", { 0, 1, 3, 2 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.e38ce69b868eb38e:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.decc97f51bbf9647, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.29e6aa423646b61a, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.22464d2e6bd3df35, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -271,124 +245,114 @@ fn For() { // CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !4, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !8 = !{null, !7} -// CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !12 = !{null} +// CHECK:STDOUT: !10 = !{null} +// CHECK:STDOUT: !11 = !DISubroutineType(types: !10) +// CHECK:STDOUT: !12 = !{null, !7} // CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = !{null, !6} -// CHECK:STDOUT: !15 = !DISubroutineType(types: !14) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !4, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !19) -// CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !16, type: !7) -// CHECK:STDOUT: !18 = !DILocation(line: 14, column: 44, scope: !16) -// CHECK:STDOUT: !19 = !{!17} -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !4, line: 26, type: !13, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !21 = !DILocation(line: 27, column: 3, scope: !20) -// CHECK:STDOUT: !23 = !DILocation(line: 29, column: 17, scope: !20) -// CHECK:STDOUT: !26 = !DILocation(line: 29, column: 7, scope: !20) -// CHECK:STDOUT: !27 = !{!7, !7, !7} -// CHECK:STDOUT: !28 = !DISubroutineType(types: !27) -// CHECK:STDOUT: !29 = !{!7, !7} -// CHECK:STDOUT: !30 = !DISubroutineType(types: !29) -// CHECK:STDOUT: !36 = !DILocation(line: 30, column: 5, scope: !20) -// CHECK:STDOUT: !37 = !DILocation(line: 29, column: 3, scope: !20) -// CHECK:STDOUT: !38 = !DILocation(line: 26, column: 1, scope: !20) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 27, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !6) -// CHECK:STDOUT: !41 = !DILocation(line: 27, column: 10, scope: !39) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !4, line: 26, type: !11, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !15 = !DILocation(line: 27, column: 3, scope: !14) +// CHECK:STDOUT: !17 = !DILocation(line: 29, column: 17, scope: !14) +// CHECK:STDOUT: !20 = !DILocation(line: 29, column: 7, scope: !14) +// CHECK:STDOUT: !21 = !{!7, !7, !7} +// CHECK:STDOUT: !22 = !DISubroutineType(types: !21) +// CHECK:STDOUT: !23 = !{!7, !7} +// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) +// CHECK:STDOUT: !30 = !DILocation(line: 30, column: 5, scope: !14) +// CHECK:STDOUT: !31 = !{null, !6} +// CHECK:STDOUT: !32 = !DISubroutineType(types: !31) +// CHECK:STDOUT: !33 = !DILocation(line: 29, column: 3, scope: !14) +// CHECK:STDOUT: !34 = !DILocation(line: 26, column: 1, scope: !14) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.35f6012581c5aabb:core.SubobjectDestroy.Core", scope: null, file: !4, line: 27, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !7) +// CHECK:STDOUT: !37 = !DILocation(line: 27, column: 10, scope: !35) +// CHECK:STDOUT: !38 = !{!36} +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0c4f898a89556950:core.SubobjectDestroy.Core", scope: null, file: !4, line: 29, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !7) +// CHECK:STDOUT: !41 = !DILocation(line: 29, column: 7, scope: !39) // CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !4, line: 27, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e13bb226a5f60f67:core.SubobjectDestroy.Core", scope: null, file: !4, line: 29, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !7) -// CHECK:STDOUT: !45 = !DILocation(line: 27, column: 10, scope: !43) +// CHECK:STDOUT: !45 = !DILocation(line: 29, column: 7, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !4, line: 27, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3a40968e4559dd32:core.SubobjectDestroy.Core", scope: null, file: !4, line: 29, type: !13, 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: !49 = !DILocation(line: 29, column: 7, scope: !47) // CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0c4f898a89556950:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.EmptyRange.b30481ddd22ae53e.Main:Iterate.Core.3c6fb8ac8f4bd886", scope: null, file: !4, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !57) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !7) -// CHECK:STDOUT: !53 = !DILocation(line: 29, column: 7, scope: !51) -// CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0c4f898a89556950: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: 29, column: 7, scope: !55) -// CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.51058dcfe1179225: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.48e0adf639fe7af4: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.e4a178aaee29c61e: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.e4a178aaee29c61e:core.Destroy.Core", scope: null, file: !4, line: 29, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) +// CHECK:STDOUT: !56 = !DILocation(line: 16, column: 7, scope: !51) +// CHECK:STDOUT: !57 = !{!52} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.EmptyRange.b30481ddd22ae53e.Main:Iterate.Core.3c6fb8ac8f4bd886", scope: null, file: !4, line: 18, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !69) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !7) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 2, scope: !58, type: !7) +// CHECK:STDOUT: !65 = !DILocation(line: 19, column: 14, scope: !58) +// CHECK:STDOUT: !66 = !{!7} +// CHECK:STDOUT: !67 = !DISubroutineType(types: !66) +// CHECK:STDOUT: !68 = !DILocation(line: 19, column: 7, scope: !58) +// CHECK:STDOUT: !69 = !{!59, !60} +// CHECK:STDOUT: !70 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.dc5ffaddab9fc53e", scope: null, file: !70, line: 36, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !79) // 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.27ec56b84ea99a5a: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: "SelfDestruct", linkageName: "_CSelfDestruct.27ec56b84ea99a5a: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.e38ce69b868eb38e: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: "SelfDestruct", linkageName: "_CSelfDestruct.a68122aa61d8c461:core.Destroy.Core", scope: null, file: !4, line: 27, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !90) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !7) -// CHECK:STDOUT: !89 = !DILocation(line: 27, column: 3, scope: !87) -// CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.EmptyRange.a081b942542726db.Main:Iterate.Core.5198edb523100189", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !97) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !7) -// CHECK:STDOUT: !96 = !DILocation(line: 16, column: 7, scope: !91) -// CHECK:STDOUT: !97 = !{!92} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.EmptyRange.a081b942542726db.Main:Iterate.Core.5198edb523100189", scope: null, file: !4, line: 18, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !109) -// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !7) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 2, scope: !98, type: !7) -// CHECK:STDOUT: !105 = !DILocation(line: 19, column: 14, scope: !98) -// CHECK:STDOUT: !106 = !{!7} -// CHECK:STDOUT: !107 = !DISubroutineType(types: !106) -// CHECK:STDOUT: !108 = !DILocation(line: 19, column: 7, scope: !98) -// CHECK:STDOUT: !109 = !{!99, !100} -// CHECK:STDOUT: !110 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.3bd04128f9cedf9b", scope: null, file: !110, line: 36, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !119) +// CHECK:STDOUT: !77 = !DILocation(line: 37, column: 12, scope: !71) +// CHECK:STDOUT: !78 = !DILocation(line: 37, column: 5, scope: !71) +// CHECK:STDOUT: !79 = !{!72} +// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.dc5ffaddab9fc53e", scope: null, file: !70, line: 39, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !88) +// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !7) +// CHECK:STDOUT: !86 = !DILocation(line: 40, column: 12, scope: !80) +// CHECK:STDOUT: !87 = !DILocation(line: 40, column: 5, scope: !80) +// CHECK:STDOUT: !88 = !{!81} +// CHECK:STDOUT: !89 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ffbc82e0019b7bf2", scope: null, file: !89, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !96) +// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !7) +// CHECK:STDOUT: !94 = !DILocation(line: 38, column: 5, scope: !90) +// CHECK:STDOUT: !95 = !DILocation(line: 36, column: 1, scope: !90) +// CHECK:STDOUT: !96 = !{!91} +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.decc97f51bbf9647", scope: null, file: !89, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !103) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !7) +// CHECK:STDOUT: !102 = !DILocation(line: 36, column: 1, scope: !97) +// CHECK:STDOUT: !103 = !{!98} +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !89, line: 36, type: !32, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !110) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !6) +// CHECK:STDOUT: !109 = !DILocation(line: 36, column: 1, scope: !104) +// CHECK:STDOUT: !110 = !{!105} +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.61b5bb2079973306", scope: null, file: !89, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !117) // CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !7) -// CHECK:STDOUT: !117 = !DILocation(line: 37, column: 12, scope: !111) -// CHECK:STDOUT: !118 = !DILocation(line: 37, column: 5, scope: !111) -// CHECK:STDOUT: !119 = !{!112} -// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.3bd04128f9cedf9b", scope: null, file: !110, line: 39, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !128) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !7) -// CHECK:STDOUT: !126 = !DILocation(line: 40, column: 12, scope: !120) -// CHECK:STDOUT: !127 = !DILocation(line: 40, column: 5, scope: !120) -// CHECK:STDOUT: !128 = !{!121} -// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.3bd04128f9cedf9b", scope: null, file: !110, line: 30, type: !107, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !132 = !DILocation(line: 31, column: 12, scope: !129) -// CHECK:STDOUT: !133 = !DILocation(line: 31, column: 5, scope: !129) -// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.5198edb523100189", scope: null, file: !110, line: 141, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !141) -// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !7) -// CHECK:STDOUT: !139 = !DILocation(line: 142, column: 12, scope: !134) -// CHECK:STDOUT: !140 = !DILocation(line: 142, column: 5, scope: !134) -// CHECK:STDOUT: !141 = !{!135} -// CHECK:STDOUT: !142 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.5198edb523100189", scope: null, file: !110, line: 144, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !149) -// CHECK:STDOUT: !143 = !DILocalVariable(arg: 1, scope: !142, type: !7) -// CHECK:STDOUT: !147 = !DILocation(line: 145, column: 12, scope: !142) -// CHECK:STDOUT: !148 = !DILocation(line: 145, column: 5, scope: !142) -// CHECK:STDOUT: !149 = !{!143} -// CHECK:STDOUT: !150 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.5198edb523100189", scope: null, file: !110, line: 125, type: !107, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !157 = !DILocation(line: 128, column: 5, scope: !150) -// CHECK:STDOUT: !158 = !DILocation(line: 129, column: 5, scope: !150) -// CHECK:STDOUT: !159 = !DIFile(filename: "{{.*}}/prelude/copy.carbon", directory: "") -// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e4edddc7580c79b:Copy.Core.3eda18978e8f48e1", scope: null, file: !159, line: 62, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !169) -// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !7) -// CHECK:STDOUT: !165 = !DILocation(line: 63, column: 13, scope: !160) -// CHECK:STDOUT: !166 = !DILocation(line: 63, column: 12, scope: !160) -// CHECK:STDOUT: !167 = !DILocation(line: 63, column: 26, scope: !160) -// CHECK:STDOUT: !168 = !DILocation(line: 63, column: 5, scope: !160) -// CHECK:STDOUT: !169 = !{!161} +// CHECK:STDOUT: !116 = !DILocation(line: 36, column: 1, scope: !111) +// CHECK:STDOUT: !117 = !{!112} +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.feee70e0690b5123", scope: null, file: !89, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !124) +// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !7) +// CHECK:STDOUT: !123 = !DILocation(line: 36, column: 1, scope: !118) +// CHECK:STDOUT: !124 = !{!119} +// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.29e6aa423646b61a", scope: null, file: !89, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !131) +// CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !7) +// CHECK:STDOUT: !130 = !DILocation(line: 36, column: 1, scope: !125) +// CHECK:STDOUT: !131 = !{!126} +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.22464d2e6bd3df35", scope: null, file: !89, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !138) +// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !7) +// CHECK:STDOUT: !137 = !DILocation(line: 36, column: 1, scope: !132) +// CHECK:STDOUT: !138 = !{!133} +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.dc5ffaddab9fc53e", scope: null, file: !70, line: 30, type: !67, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !142 = !DILocation(line: 31, column: 12, scope: !139) +// CHECK:STDOUT: !143 = !DILocation(line: 31, column: 5, scope: !139) +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.c1cc3e41344c17ec:OptionalStorage.Core.3c6fb8ac8f4bd886", scope: null, file: !70, line: 141, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !151) +// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !7) +// CHECK:STDOUT: !149 = !DILocation(line: 142, column: 12, scope: !144) +// CHECK:STDOUT: !150 = !DILocation(line: 142, column: 5, scope: !144) +// CHECK:STDOUT: !151 = !{!145} +// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.c1cc3e41344c17ec:OptionalStorage.Core.3c6fb8ac8f4bd886", scope: null, file: !70, line: 144, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !159) +// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !7) +// CHECK:STDOUT: !157 = !DILocation(line: 145, column: 12, scope: !152) +// CHECK:STDOUT: !158 = !DILocation(line: 145, column: 5, scope: !152) +// CHECK:STDOUT: !159 = !{!153} +// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "None", linkageName: "_CNone.c1cc3e41344c17ec:OptionalStorage.Core.3c6fb8ac8f4bd886", scope: null, file: !70, line: 125, type: !67, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !167 = !DILocation(line: 128, column: 5, scope: !160) +// CHECK:STDOUT: !168 = !DILocation(line: 129, column: 5, scope: !160) +// CHECK:STDOUT: !169 = !DIFile(filename: "{{.*}}/prelude/copy.carbon", directory: "") +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4e4edddc7580c79b:Copy.Core.3eda18978e8f48e1", scope: null, file: !169, line: 62, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !179) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !7) +// CHECK:STDOUT: !175 = !DILocation(line: 63, column: 13, scope: !170) +// CHECK:STDOUT: !176 = !DILocation(line: 63, column: 12, scope: !170) +// CHECK:STDOUT: !177 = !DILocation(line: 63, column: 26, scope: !170) +// CHECK:STDOUT: !178 = !DILocation(line: 63, column: 5, scope: !170) +// CHECK:STDOUT: !179 = !{!171} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/for/break_continue.carbon b/toolchain/lower/testdata/for/break_continue.carbon index 1faee1015884..97191ca97637 100644 --- a/toolchain/lower/testdata/for/break_continue.carbon +++ b/toolchain/lower/testdata/for/break_continue.carbon @@ -33,276 +33,250 @@ fn For() { // CHECK:STDOUT: declare void @_CH.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CFor.Main() #0 !dbg !18 { +// CHECK:STDOUT: define void @_CFor.Main() #0 !dbg !16 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_32.1.temp = alloca { i32, i32 }, align 4, !dbg !20 -// CHECK:STDOUT: %var = alloca i32, align 4, !dbg !21 -// CHECK:STDOUT: %.loc18_33.1.temp = alloca <{ i32, i1 }>, align 4, !dbg !21 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_32.1.temp), !dbg !20 -// CHECK:STDOUT: call void @_CRange.Core(ptr %.loc18_32.1.temp, i32 100), !dbg !20 -// CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.call = call i32 @"_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %.loc18_32.1.temp), !dbg !21 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var), !dbg !21 -// CHECK:STDOUT: store i32 %IntRange.as.Iterate.impl.NewCursor.call, ptr %var, align 4, !dbg !21 -// CHECK:STDOUT: br label %for.next, !dbg !21 +// CHECK:STDOUT: %.loc18_32.1.temp = alloca { i32, i32 }, align 4, !dbg !18 +// CHECK:STDOUT: %var = alloca i32, align 4, !dbg !19 +// CHECK:STDOUT: %.loc18_33.1.temp = alloca <{ i32, i1 }>, align 4, !dbg !19 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_32.1.temp), !dbg !18 +// CHECK:STDOUT: call void @_CRange.Core(ptr %.loc18_32.1.temp, i32 100), !dbg !18 +// CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.call = call i32 @"_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %.loc18_32.1.temp), !dbg !19 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var), !dbg !19 +// CHECK:STDOUT: store i32 %IntRange.as.Iterate.impl.NewCursor.call, ptr %var, align 4, !dbg !19 +// CHECK:STDOUT: br label %for.next, !dbg !19 // CHECK:STDOUT: // CHECK:STDOUT: for.next: ; preds = %if.else.loc20, %if.then.loc20, %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_33.1.temp), !dbg !21 -// CHECK:STDOUT: call void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %.loc18_33.1.temp, ptr %.loc18_32.1.temp, ptr %var), !dbg !21 -// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.ebd99c5786039774(ptr %.loc18_33.1.temp), !dbg !21 -// CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !21 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_33.1.temp), !dbg !19 +// CHECK:STDOUT: call void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %.loc18_33.1.temp, ptr %.loc18_32.1.temp, ptr %var), !dbg !19 +// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.29b2425ca9ad75a4(ptr %.loc18_33.1.temp), !dbg !19 +// CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !19 // CHECK:STDOUT: // CHECK:STDOUT: for.body: ; preds = %for.next -// CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.ebd99c5786039774(ptr %.loc18_33.1.temp), !dbg !21 -// CHECK:STDOUT: %F.call = call i1 @_CF.Main(), !dbg !28 -// CHECK:STDOUT: br i1 %F.call, label %if.then.loc19, label %if.else.loc19, !dbg !29 +// CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.29b2425ca9ad75a4(ptr %.loc18_33.1.temp), !dbg !19 +// CHECK:STDOUT: %F.call = call i1 @_CF.Main(), !dbg !26 +// CHECK:STDOUT: br i1 %F.call, label %if.then.loc19, label %if.else.loc19, !dbg !27 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc19: ; preds = %for.body -// CHECK:STDOUT: br label %for.done, !dbg !30 +// CHECK:STDOUT: br label %for.done, !dbg !28 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc19: ; preds = %for.body -// CHECK:STDOUT: %G.call = call i1 @_CG.Main(), !dbg !31 -// CHECK:STDOUT: br i1 %G.call, label %if.then.loc20, label %if.else.loc20, !dbg !32 +// CHECK:STDOUT: %G.call = call i1 @_CG.Main(), !dbg !29 +// CHECK:STDOUT: br i1 %G.call, label %if.then.loc20, label %if.else.loc20, !dbg !30 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc20: ; preds = %if.else.loc19 -// CHECK:STDOUT: call void @"_CSelfDestruct.bf93366da8df6472:core.Destroy.Core"(ptr %.loc18_33.1.temp), !dbg !21 -// CHECK:STDOUT: br label %for.next, !dbg !33 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %.loc18_33.1.temp), !dbg !19 +// CHECK:STDOUT: br label %for.next, !dbg !31 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc20: ; preds = %if.else.loc19 -// CHECK:STDOUT: call void @_CH.Main(), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.bf93366da8df6472:core.Destroy.Core"(ptr %.loc18_33.1.temp), !dbg !21 -// CHECK:STDOUT: br label %for.next, !dbg !35 +// CHECK:STDOUT: call void @_CH.Main(), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %.loc18_33.1.temp), !dbg !19 +// CHECK:STDOUT: br label %for.next, !dbg !33 // CHECK:STDOUT: // CHECK:STDOUT: for.done: ; preds = %if.then.loc19, %for.next -// CHECK:STDOUT: call void @"_CSelfDestruct.bf93366da8df6472:core.Destroy.Core"(ptr %.loc18_33.1.temp), !dbg !21 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %var), !dbg !21 -// CHECK:STDOUT: call void @"_CSelfDestruct.30087fca60df1631:core.Destroy.Core"(ptr %.loc18_32.1.temp), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %.loc18_33.1.temp), !dbg !19 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %var), !dbg !19 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ab8fcbb9cd97e8e7(ptr %.loc18_32.1.temp), !dbg !18 // CHECK:STDOUT: ret void, !dbg !36 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CRange.Core(ptr sret({ i32, i32 }), i32) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr) -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self) #0 !dbg !37 { +// CHECK:STDOUT: define weak_odr void @"_COp.b3126fe3b97d1b85:core.SubobjectDestroy.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 @"_CSelfDestruct.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_COp.6f1424a1f3fc4182:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self), !dbg !43 +// CHECK:STDOUT: %.loc18_33.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc18_33.1.has_value), !dbg !43 +// CHECK:STDOUT: %.loc18_33.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.38552a897eb918eb(ptr %.loc18_33.4.value), !dbg !43 // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_COp.e60156a973847ad6:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc18_33.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc18_33.1.has_value), !dbg !47 +// CHECK:STDOUT: %.loc18_33.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.38552a897eb918eb(ptr %.loc18_33.4.value), !dbg !47 // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define weak_odr void @"_COp.7e86931818f7778c:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc18_32.1.end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !51 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc18_32.1.end), !dbg !51 +// CHECK:STDOUT: %.loc18_32.4.start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !51 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc18_32.4.start), !dbg !51 // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2e0c223a4e2f3d14:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_COp.30087fca60df1631:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_33.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc18_33.1.has_value), !dbg !55 -// CHECK:STDOUT: %.loc18_33.2.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %.loc18_33.2.value), !dbg !55 +// CHECK:STDOUT: %.loc18_32.1.end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !55 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc18_32.1.end), !dbg !55 +// CHECK:STDOUT: %.loc18_32.4.start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !55 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc18_32.4.start), !dbg !55 // CHECK:STDOUT: ret void, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2e0c223a4e2f3d14:core.Destroy.Core"(ptr %self) #0 !dbg !57 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2e0c223a4e2f3d14: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 @"_CSubobjectDestroy.d2ff3a86a5bbb967:core.Destroy.Core"(ptr %self) #0 !dbg !61 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_33.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !63 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc18_33.1.has_value), !dbg !63 -// CHECK:STDOUT: %.loc18_33.2.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !63 -// CHECK:STDOUT: call void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %.loc18_33.2.value), !dbg !63 -// CHECK:STDOUT: ret void, !dbg !63 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d2ff3a86a5bbb967:core.Destroy.Core"(ptr %self) #0 !dbg !65 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d2ff3a86a5bbb967: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.bf93366da8df6472: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 @"_CSubobjectDestroy.7e86931818f7778c:core.Destroy.Core"(ptr %self) #0 !dbg !73 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_32.1.end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !75 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_32.1.end), !dbg !75 -// CHECK:STDOUT: %.loc18_32.2.start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !75 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_32.2.start), !dbg !75 -// CHECK:STDOUT: ret void, !dbg !75 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7e86931818f7778c:core.Destroy.Core"(ptr %self) #0 !dbg !77 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.7e86931818f7778c: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.30087fca60df1631:core.Destroy.Core"(ptr %self) #0 !dbg !81 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_32.1.end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !83 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_32.1.end), !dbg !83 -// CHECK:STDOUT: %.loc18_32.2.start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !83 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_32.2.start), !dbg !83 -// CHECK:STDOUT: ret void, !dbg !83 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.30087fca60df1631:core.Destroy.Core"(ptr %self) #0 !dbg !85 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.30087fca60df1631:core.Destroy.Core"(ptr %self), !dbg !87 -// CHECK:STDOUT: ret void, !dbg !87 -// 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 !92 { -// CHECK:STDOUT: %start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !97 -// CHECK:STDOUT: %1 = load i32, ptr %start, align 4, !dbg !97 -// CHECK:STDOUT: ret i32 %1, !dbg !98 +// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: %start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !65 +// CHECK:STDOUT: %1 = load i32, ptr %start, align 4, !dbg !65 +// CHECK:STDOUT: ret i32 %1, !dbg !66 // 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 !100 { -// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !107 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !107 -// CHECK:STDOUT: %2 = load i32, ptr %cursor, align 4, !dbg !108 -// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !107 -// CHECK:STDOUT: %end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !111 -// CHECK:STDOUT: %3 = load i32, ptr %end, align 4, !dbg !111 -// CHECK:STDOUT: %4 = load i32, ptr %1, align 4, !dbg !110 -// CHECK:STDOUT: %5 = icmp slt i32 %4, %3, !dbg !110 -// CHECK:STDOUT: br i1 %5, label %6, label %8, !dbg !112 +// CHECK:STDOUT: define linkonce_odr void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !68 { +// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !75 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !75 +// CHECK:STDOUT: %2 = load i32, ptr %cursor, align 4, !dbg !76 +// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !75 +// CHECK:STDOUT: %end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !79 +// CHECK:STDOUT: %3 = load i32, ptr %end, align 4, !dbg !79 +// CHECK:STDOUT: %4 = load i32, ptr %1, align 4, !dbg !78 +// CHECK:STDOUT: %5 = icmp slt i32 %4, %3, !dbg !78 +// CHECK:STDOUT: br i1 %5, label %6, label %8, !dbg !80 // CHECK:STDOUT: // CHECK:STDOUT: 6: ; preds = %0 -// 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.ebd99c5786039774(ptr %return, i32 %7), !dbg !116 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %1), !dbg !107 -// CHECK:STDOUT: ret void, !dbg !117 +// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !82 +// CHECK:STDOUT: %7 = load i32, ptr %1, align 4, !dbg !83 +// CHECK:STDOUT: call void @_CSome.Optional.Core.29b2425ca9ad75a4(ptr %return, i32 %7), !dbg !84 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %1), !dbg !75 +// CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: // CHECK:STDOUT: 8: ; preds = %0 -// CHECK:STDOUT: call void @_CNone.Optional.Core.ebd99c5786039774(ptr %return), !dbg !118 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %1), !dbg !107 -// CHECK:STDOUT: ret void, !dbg !119 +// CHECK:STDOUT: call void @_CNone.Optional.Core.29b2425ca9ad75a4(ptr %return), !dbg !86 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %1), !dbg !75 +// CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.ebd99c5786039774(ptr %self) #0 !dbg !122 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %self), !dbg !128 -// CHECK:STDOUT: ret i1 %1, !dbg !129 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.29b2425ca9ad75a4(ptr %self) #0 !dbg !90 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %self), !dbg !96 +// CHECK:STDOUT: ret i1 %1, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.ebd99c5786039774(ptr %self) #0 !dbg !131 { -// CHECK:STDOUT: %1 = call i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %self), !dbg !137 -// CHECK:STDOUT: ret i32 %1, !dbg !138 +// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.29b2425ca9ad75a4(ptr %self) #0 !dbg !99 { +// CHECK:STDOUT: %1 = call i32 @"_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %self), !dbg !105 +// CHECK:STDOUT: ret i32 %1, !dbg !106 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %t) #0 !dbg !109 { +// CHECK:STDOUT: ret void, !dbg !114 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9a03059f269926ed(ptr %t) #0 !dbg !116 { +// CHECK:STDOUT: ret void, !dbg !121 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ab8fcbb9cd97e8e7(ptr %t) #0 !dbg !123 { +// CHECK:STDOUT: call void @"_COp.30087fca60df1631:core.SubobjectDestroy.Core"(ptr %t), !dbg !127 +// CHECK:STDOUT: ret void, !dbg !128 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %t) #0 !dbg !130 { +// CHECK:STDOUT: ret void, !dbg !135 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.38552a897eb918eb(ptr %t) #0 !dbg !137 { +// CHECK:STDOUT: ret void, !dbg !142 // 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 !141 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !144 -// CHECK:STDOUT: ret void, !dbg !147 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !145 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !148 +// CHECK:STDOUT: ret void, !dbg !151 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.ebd99c5786039774(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !149 { -// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %return, i32 %value), !dbg !154 -// CHECK:STDOUT: ret void, !dbg !155 +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.29b2425ca9ad75a4(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !153 { +// CHECK:STDOUT: call void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %return, i32 %value), !dbg !158 +// CHECK:STDOUT: ret void, !dbg !159 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.ebd99c5786039774(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !157 { -// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %return), !dbg !160 -// CHECK:STDOUT: ret void, !dbg !161 +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.29b2425ca9ad75a4(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !161 { +// CHECK:STDOUT: call void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %return), !dbg !164 +// CHECK:STDOUT: ret void, !dbg !165 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %value) #0 !dbg !162 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !167 -// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !167 -// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !167 -// CHECK:STDOUT: ret i1 %2, !dbg !168 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %value) #0 !dbg !166 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !171 +// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !171 +// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !171 +// CHECK:STDOUT: ret i1 %2, !dbg !172 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %value) #0 !dbg !170 { -// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !175 -// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !175 -// CHECK:STDOUT: ret i32 %1, !dbg !176 +// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %value) #0 !dbg !174 { +// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !179 +// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !179 +// CHECK:STDOUT: ret i32 %1, !dbg !180 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #2 !dbg !178 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !182 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !182 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !182 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !182 -// CHECK:STDOUT: ret void, !dbg !182 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #2 !dbg !182 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !186 +// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !186 +// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !186 +// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !186 +// CHECK:STDOUT: ret void, !dbg !186 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !186 { -// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !195 -// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !195 -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !197 -// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !197 -// CHECK:STDOUT: ret void, !dbg !198 +// CHECK:STDOUT: define linkonce_odr void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !190 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !199 +// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !199 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !201 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !201 +// CHECK:STDOUT: ret void, !dbg !202 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !200 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !207 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !207 -// CHECK:STDOUT: ret void, !dbg !208 +// CHECK:STDOUT: define linkonce_odr void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !204 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !211 +// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !211 +// CHECK:STDOUT: ret void, !dbg !212 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !209 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !214 -// CHECK:STDOUT: ret i32 %1, !dbg !216 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !213 { +// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !218 +// CHECK:STDOUT: ret i32 %1, !dbg !220 // 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 !218 { -// CHECK:STDOUT: ret i32 %self, !dbg !224 +// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !222 { +// CHECK:STDOUT: ret i32 %self, !dbg !228 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.bf93366da8df6472:core.Destroy.Core", { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 3, 2, 1 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.c6daab0befde28a8, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9a03059f269926ed, { 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.8242e48f93ef210e, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.38552a897eb918eb, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -323,161 +297,151 @@ fn For() { // CHECK:STDOUT: !11 = !DISubroutineType(types: !10) // CHECK:STDOUT: !12 = !{!7, !6} // CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = !{null, !6} +// CHECK:STDOUT: !14 = !{null, !7} // CHECK:STDOUT: !15 = !DISubroutineType(types: !14) -// CHECK:STDOUT: !16 = !{null, !7} -// CHECK:STDOUT: !17 = !DISubroutineType(types: !16) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !4, line: 17, type: !11, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !20 = !DILocation(line: 18, column: 18, scope: !18) -// CHECK:STDOUT: !21 = !DILocation(line: 18, column: 7, scope: !18) -// CHECK:STDOUT: !22 = !{!6, !7} +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !4, line: 17, type: !11, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !18 = !DILocation(line: 18, column: 18, scope: !16) +// CHECK:STDOUT: !19 = !DILocation(line: 18, column: 7, scope: !16) +// CHECK:STDOUT: !20 = !{!6, !7} +// CHECK:STDOUT: !21 = !DISubroutineType(types: !20) +// CHECK:STDOUT: !22 = !{!7, !7, !6} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{!7, !7, !6} +// CHECK:STDOUT: !24 = !{!7, !7} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{!7, !7} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !DILocation(line: 19, column: 9, scope: !18) -// CHECK:STDOUT: !29 = !DILocation(line: 19, column: 8, scope: !18) -// CHECK:STDOUT: !30 = !DILocation(line: 19, column: 16, scope: !18) -// CHECK:STDOUT: !31 = !DILocation(line: 20, column: 9, scope: !18) -// CHECK:STDOUT: !32 = !DILocation(line: 20, column: 8, scope: !18) -// CHECK:STDOUT: !33 = !DILocation(line: 20, column: 16, scope: !18) -// CHECK:STDOUT: !34 = !DILocation(line: 21, column: 5, scope: !18) -// CHECK:STDOUT: !35 = !DILocation(line: 18, column: 3, scope: !18) -// CHECK:STDOUT: !36 = !DILocation(line: 17, column: 1, scope: !18) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !40) +// CHECK:STDOUT: !26 = !DILocation(line: 19, column: 9, scope: !16) +// CHECK:STDOUT: !27 = !DILocation(line: 19, column: 8, scope: !16) +// CHECK:STDOUT: !28 = !DILocation(line: 19, column: 16, scope: !16) +// CHECK:STDOUT: !29 = !DILocation(line: 20, column: 9, scope: !16) +// CHECK:STDOUT: !30 = !DILocation(line: 20, column: 8, scope: !16) +// CHECK:STDOUT: !31 = !DILocation(line: 20, column: 16, scope: !16) +// CHECK:STDOUT: !32 = !DILocation(line: 21, column: 5, scope: !16) +// CHECK:STDOUT: !33 = !DILocation(line: 18, column: 3, scope: !16) +// CHECK:STDOUT: !34 = !{null, !6} +// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) +// CHECK:STDOUT: !36 = !DILocation(line: 17, column: 1, scope: !16) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b3126fe3b97d1b85:core.SubobjectDestroy.Core", scope: null, file: !4, line: 18, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !40) // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !7) // CHECK:STDOUT: !39 = !DILocation(line: 18, column: 7, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b3126fe3b97d1b85:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6f1424a1f3fc4182:core.SubobjectDestroy.Core", scope: null, file: !4, line: 18, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !7) // CHECK:STDOUT: !43 = !DILocation(line: 18, column: 7, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.993995cdb1dad067:core.Destroy.Core", scope: null, file: !4, line: 18, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !6) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e60156a973847ad6:core.SubobjectDestroy.Core", scope: null, file: !4, line: 18, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !48) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !7) // CHECK:STDOUT: !47 = !DILocation(line: 18, column: 7, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7e86931818f7778c:core.SubobjectDestroy.Core", scope: null, file: !4, line: 18, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !52) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !7) -// CHECK:STDOUT: !51 = !DILocation(line: 18, column: 7, scope: !49) +// CHECK:STDOUT: !51 = !DILocation(line: 18, column: 18, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2e0c223a4e2f3d14:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30087fca60df1631:core.SubobjectDestroy.Core", scope: null, file: !4, line: 18, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !56) // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !7) -// CHECK:STDOUT: !55 = !DILocation(line: 18, column: 7, scope: !53) +// CHECK:STDOUT: !55 = !DILocation(line: 18, column: 18, scope: !53) // CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2e0c223a4e2f3d14:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !7) -// CHECK:STDOUT: !59 = !DILocation(line: 18, column: 7, scope: !57) -// CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d2ff3a86a5bbb967:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !7) -// CHECK:STDOUT: !63 = !DILocation(line: 18, column: 7, scope: !61) -// CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d2ff3a86a5bbb967:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !7) -// CHECK:STDOUT: !67 = !DILocation(line: 18, column: 7, scope: !65) -// CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bf93366da8df6472:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !72) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !7) -// CHECK:STDOUT: !71 = !DILocation(line: 18, column: 7, scope: !69) -// CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.7e86931818f7778c:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !7) -// CHECK:STDOUT: !75 = !DILocation(line: 18, column: 18, scope: !73) -// CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7e86931818f7778c:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !80) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !7) -// CHECK:STDOUT: !79 = !DILocation(line: 18, column: 18, scope: !77) -// CHECK:STDOUT: !80 = !{!78} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.30087fca60df1631:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) -// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !7) -// CHECK:STDOUT: !83 = !DILocation(line: 18, column: 18, scope: !81) -// CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.30087fca60df1631:core.Destroy.Core", scope: null, file: !4, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !88) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !7) -// CHECK:STDOUT: !87 = !DILocation(line: 18, column: 18, scope: !85) -// CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !91 = !DIFile(filename: "{{.*}}/prelude/range.carbon", directory: "") -// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !91, line: 19, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !99) -// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !7) -// CHECK:STDOUT: !97 = !DILocation(line: 19, column: 43, scope: !92) -// CHECK:STDOUT: !98 = !DILocation(line: 19, column: 36, scope: !92) -// CHECK:STDOUT: !99 = !{!93} -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !91, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !120) -// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !7) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 2, scope: !100, type: !6) -// CHECK:STDOUT: !107 = !DILocation(line: 21, column: 7, scope: !100) -// CHECK:STDOUT: !108 = !DILocation(line: 21, column: 27, scope: !100) -// CHECK:STDOUT: !110 = !DILocation(line: 22, column: 11, scope: !100) -// CHECK:STDOUT: !111 = !DILocation(line: 22, column: 19, scope: !100) -// CHECK:STDOUT: !112 = !DILocation(line: 22, column: 10, scope: !100) -// CHECK:STDOUT: !114 = !DILocation(line: 23, column: 9, scope: !100) -// CHECK:STDOUT: !115 = !DILocation(line: 24, column: 38, scope: !100) -// CHECK:STDOUT: !116 = !DILocation(line: 24, column: 16, scope: !100) -// CHECK:STDOUT: !117 = !DILocation(line: 24, column: 9, scope: !100) -// CHECK:STDOUT: !118 = !DILocation(line: 26, column: 16, scope: !100) -// CHECK:STDOUT: !119 = !DILocation(line: 26, column: 9, scope: !100) -// CHECK:STDOUT: !120 = !{!101, !102} -// CHECK:STDOUT: !121 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.ebd99c5786039774", scope: null, file: !121, line: 36, type: !27, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !130) -// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !7) -// CHECK:STDOUT: !128 = !DILocation(line: 37, column: 12, scope: !122) -// CHECK:STDOUT: !129 = !DILocation(line: 37, column: 5, scope: !122) -// CHECK:STDOUT: !130 = !{!123} -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.ebd99c5786039774", scope: null, file: !121, line: 39, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139) -// CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !7) -// CHECK:STDOUT: !137 = !DILocation(line: 40, column: 12, scope: !131) -// CHECK:STDOUT: !138 = !DILocation(line: 40, column: 5, scope: !131) -// CHECK:STDOUT: !139 = !{!132} -// CHECK:STDOUT: !140 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !140, line: 396, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !148) -// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !6) -// CHECK:STDOUT: !144 = !DILocation(line: 398, column: 5, scope: !141) -// CHECK:STDOUT: !145 = !{null, !6, !6} -// CHECK:STDOUT: !146 = !DISubroutineType(types: !145) -// CHECK:STDOUT: !147 = !DILocation(line: 396, column: 3, scope: !141) -// CHECK:STDOUT: !148 = !{!142} -// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.ebd99c5786039774", scope: null, file: !121, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !156) -// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !6) -// CHECK:STDOUT: !154 = !DILocation(line: 34, column: 12, scope: !149) -// CHECK:STDOUT: !155 = !DILocation(line: 34, column: 5, scope: !149) -// CHECK:STDOUT: !156 = !{!150} -// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.ebd99c5786039774", scope: null, file: !121, line: 30, type: !9, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !160 = !DILocation(line: 31, column: 12, scope: !157) -// CHECK:STDOUT: !161 = !DILocation(line: 31, column: 5, scope: !157) -// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !121, line: 141, type: !27, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !169) -// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !7) -// CHECK:STDOUT: !167 = !DILocation(line: 142, column: 12, scope: !162) -// CHECK:STDOUT: !168 = !DILocation(line: 142, column: 5, scope: !162) -// CHECK:STDOUT: !169 = !{!163} -// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !121, line: 144, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !177) -// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !7) -// CHECK:STDOUT: !175 = !DILocation(line: 145, column: 12, scope: !170) -// CHECK:STDOUT: !176 = !DILocation(line: 145, column: 5, scope: !170) -// CHECK:STDOUT: !177 = !{!171} -// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !140, line: 331, type: !146, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !185) -// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !6) -// CHECK:STDOUT: !180 = !DILocalVariable(arg: 2, scope: !178, type: !6) -// CHECK:STDOUT: !182 = !DILocation(line: 331, column: 3, scope: !178) -// CHECK:STDOUT: !183 = !{!6, !6} -// CHECK:STDOUT: !184 = !DISubroutineType(types: !183) -// CHECK:STDOUT: !185 = !{!179, !180} -// CHECK:STDOUT: !186 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !121, line: 131, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !199) -// CHECK:STDOUT: !187 = !DILocalVariable(arg: 1, scope: !186, type: !6) -// CHECK:STDOUT: !195 = !DILocation(line: 137, column: 5, scope: !186) -// CHECK:STDOUT: !197 = !DILocation(line: 138, column: 5, scope: !186) -// CHECK:STDOUT: !198 = !DILocation(line: 139, column: 5, scope: !186) -// CHECK:STDOUT: !199 = !{!187} -// CHECK:STDOUT: !200 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !121, line: 125, type: !9, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !207 = !DILocation(line: 128, column: 5, scope: !200) -// CHECK:STDOUT: !208 = !DILocation(line: 129, column: 5, scope: !200) -// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !140, line: 64, type: !184, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !217) -// CHECK:STDOUT: !210 = !DILocalVariable(arg: 1, scope: !209, type: !6) -// CHECK:STDOUT: !214 = !DILocation(line: 66, column: 17, scope: !209) -// CHECK:STDOUT: !216 = !DILocation(line: 66, column: 5, scope: !209) -// CHECK:STDOUT: !217 = !{!210} -// CHECK:STDOUT: !218 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !140, line: 59, type: !184, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !225) -// CHECK:STDOUT: !219 = !DILocalVariable(arg: 1, scope: !218, type: !6) -// CHECK:STDOUT: !224 = !DILocation(line: 59, column: 28, scope: !218) -// CHECK:STDOUT: !225 = !{!219} +// CHECK:STDOUT: !59 = !DIFile(filename: "{{.*}}/prelude/range.carbon", directory: "") +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !59, line: 19, type: !21, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !67) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !7) +// CHECK:STDOUT: !65 = !DILocation(line: 19, column: 43, scope: !60) +// CHECK:STDOUT: !66 = !DILocation(line: 19, column: 36, scope: !60) +// CHECK:STDOUT: !67 = !{!61} +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !59, line: 20, type: !23, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !88) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !7) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 2, scope: !68, type: !6) +// CHECK:STDOUT: !75 = !DILocation(line: 21, column: 7, scope: !68) +// CHECK:STDOUT: !76 = !DILocation(line: 21, column: 27, scope: !68) +// CHECK:STDOUT: !78 = !DILocation(line: 22, column: 11, scope: !68) +// CHECK:STDOUT: !79 = !DILocation(line: 22, column: 19, scope: !68) +// CHECK:STDOUT: !80 = !DILocation(line: 22, column: 10, scope: !68) +// CHECK:STDOUT: !82 = !DILocation(line: 23, column: 9, scope: !68) +// CHECK:STDOUT: !83 = !DILocation(line: 24, column: 38, scope: !68) +// CHECK:STDOUT: !84 = !DILocation(line: 24, column: 16, scope: !68) +// CHECK:STDOUT: !85 = !DILocation(line: 24, column: 9, scope: !68) +// CHECK:STDOUT: !86 = !DILocation(line: 26, column: 16, scope: !68) +// CHECK:STDOUT: !87 = !DILocation(line: 26, column: 9, scope: !68) +// CHECK:STDOUT: !88 = !{!69, !70} +// CHECK:STDOUT: !89 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.29b2425ca9ad75a4", scope: null, file: !89, line: 36, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !98) +// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !7) +// CHECK:STDOUT: !96 = !DILocation(line: 37, column: 12, scope: !90) +// CHECK:STDOUT: !97 = !DILocation(line: 37, column: 5, scope: !90) +// CHECK:STDOUT: !98 = !{!91} +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.29b2425ca9ad75a4", scope: null, file: !89, line: 39, type: !21, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !107) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !7) +// CHECK:STDOUT: !105 = !DILocation(line: 40, column: 12, scope: !99) +// CHECK:STDOUT: !106 = !DILocation(line: 40, column: 5, scope: !99) +// CHECK:STDOUT: !107 = !{!100} +// CHECK:STDOUT: !108 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.c6daab0befde28a8", scope: null, file: !108, line: 36, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !115) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !7) +// CHECK:STDOUT: !114 = !DILocation(line: 36, column: 1, scope: !109) +// CHECK:STDOUT: !115 = !{!110} +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9a03059f269926ed", scope: null, file: !108, line: 36, type: !35, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !122) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !6) +// CHECK:STDOUT: !121 = !DILocation(line: 36, column: 1, scope: !116) +// CHECK:STDOUT: !122 = !{!117} +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ab8fcbb9cd97e8e7", scope: null, file: !108, line: 36, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !129) +// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !7) +// CHECK:STDOUT: !127 = !DILocation(line: 38, column: 5, scope: !123) +// CHECK:STDOUT: !128 = !DILocation(line: 36, column: 1, scope: !123) +// CHECK:STDOUT: !129 = !{!124} +// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8242e48f93ef210e", scope: null, file: !108, line: 36, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !136) +// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !7) +// CHECK:STDOUT: !135 = !DILocation(line: 36, column: 1, scope: !130) +// CHECK:STDOUT: !136 = !{!131} +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.38552a897eb918eb", scope: null, file: !108, line: 36, type: !35, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !143) +// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !6) +// CHECK:STDOUT: !142 = !DILocation(line: 36, column: 1, scope: !137) +// CHECK:STDOUT: !143 = !{!138} +// CHECK:STDOUT: !144 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !144, line: 396, type: !35, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !152) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !6) +// CHECK:STDOUT: !148 = !DILocation(line: 398, column: 5, scope: !145) +// CHECK:STDOUT: !149 = !{null, !6, !6} +// CHECK:STDOUT: !150 = !DISubroutineType(types: !149) +// CHECK:STDOUT: !151 = !DILocation(line: 396, column: 3, scope: !145) +// CHECK:STDOUT: !152 = !{!146} +// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.29b2425ca9ad75a4", scope: null, file: !89, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !160) +// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !6) +// CHECK:STDOUT: !158 = !DILocation(line: 34, column: 12, scope: !153) +// CHECK:STDOUT: !159 = !DILocation(line: 34, column: 5, scope: !153) +// CHECK:STDOUT: !160 = !{!154} +// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.29b2425ca9ad75a4", scope: null, file: !89, line: 30, type: !9, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !164 = !DILocation(line: 31, column: 12, scope: !161) +// CHECK:STDOUT: !165 = !DILocation(line: 31, column: 5, scope: !161) +// CHECK:STDOUT: !166 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !89, line: 141, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !173) +// CHECK:STDOUT: !167 = !DILocalVariable(arg: 1, scope: !166, type: !7) +// CHECK:STDOUT: !171 = !DILocation(line: 142, column: 12, scope: !166) +// CHECK:STDOUT: !172 = !DILocation(line: 142, column: 5, scope: !166) +// CHECK:STDOUT: !173 = !{!167} +// CHECK:STDOUT: !174 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !89, line: 144, type: !21, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !181) +// CHECK:STDOUT: !175 = !DILocalVariable(arg: 1, scope: !174, type: !7) +// CHECK:STDOUT: !179 = !DILocation(line: 145, column: 12, scope: !174) +// CHECK:STDOUT: !180 = !DILocation(line: 145, column: 5, scope: !174) +// CHECK:STDOUT: !181 = !{!175} +// CHECK:STDOUT: !182 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !144, line: 331, type: !150, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !189) +// CHECK:STDOUT: !183 = !DILocalVariable(arg: 1, scope: !182, type: !6) +// CHECK:STDOUT: !184 = !DILocalVariable(arg: 2, scope: !182, type: !6) +// CHECK:STDOUT: !186 = !DILocation(line: 331, column: 3, scope: !182) +// CHECK:STDOUT: !187 = !{!6, !6} +// CHECK:STDOUT: !188 = !DISubroutineType(types: !187) +// CHECK:STDOUT: !189 = !{!183, !184} +// CHECK:STDOUT: !190 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !89, line: 131, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !203) +// CHECK:STDOUT: !191 = !DILocalVariable(arg: 1, scope: !190, type: !6) +// CHECK:STDOUT: !199 = !DILocation(line: 137, column: 5, scope: !190) +// CHECK:STDOUT: !201 = !DILocation(line: 138, column: 5, scope: !190) +// CHECK:STDOUT: !202 = !DILocation(line: 139, column: 5, scope: !190) +// CHECK:STDOUT: !203 = !{!191} +// CHECK:STDOUT: !204 = distinct !DISubprogram(name: "None", linkageName: "_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !89, line: 125, type: !9, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !211 = !DILocation(line: 128, column: 5, scope: !204) +// CHECK:STDOUT: !212 = !DILocation(line: 129, column: 5, scope: !204) +// CHECK:STDOUT: !213 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !144, line: 64, type: !188, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !221) +// CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !213, type: !6) +// CHECK:STDOUT: !218 = !DILocation(line: 66, column: 17, scope: !213) +// CHECK:STDOUT: !220 = !DILocation(line: 66, column: 5, scope: !213) +// CHECK:STDOUT: !221 = !{!214} +// CHECK:STDOUT: !222 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !144, line: 59, type: !188, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !229) +// CHECK:STDOUT: !223 = !DILocalVariable(arg: 1, scope: !222, type: !6) +// CHECK:STDOUT: !228 = !DILocation(line: 59, column: 28, scope: !222) +// CHECK:STDOUT: !229 = !{!223} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/for/for.carbon b/toolchain/lower/testdata/for/for.carbon index 269b5473682c..d021a01978bb 100644 --- a/toolchain/lower/testdata/for/for.carbon +++ b/toolchain/lower/testdata/for/for.carbon @@ -33,263 +33,237 @@ fn For() { // CHECK:STDOUT: declare void @_CH.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CFor.Main() #0 !dbg !16 { +// CHECK:STDOUT: define void @_CFor.Main() #0 !dbg !14 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc19_32.1.temp = alloca { i32, i32 }, align 4, !dbg !19 -// CHECK:STDOUT: %var = alloca i32, align 4, !dbg !20 -// CHECK:STDOUT: %.loc19_33.1.temp = alloca <{ i32, i1 }>, align 4, !dbg !20 -// CHECK:STDOUT: call void @_CF.Main(), !dbg !17 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_32.1.temp), !dbg !19 -// CHECK:STDOUT: call void @_CRange.Core(ptr %.loc19_32.1.temp, i32 100), !dbg !19 -// CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.call = call i32 @"_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %.loc19_32.1.temp), !dbg !20 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var), !dbg !20 -// CHECK:STDOUT: store i32 %IntRange.as.Iterate.impl.NewCursor.call, ptr %var, align 4, !dbg !20 -// CHECK:STDOUT: br label %for.next, !dbg !20 +// CHECK:STDOUT: %.loc19_32.1.temp = alloca { i32, i32 }, align 4, !dbg !17 +// CHECK:STDOUT: %var = alloca i32, align 4, !dbg !18 +// CHECK:STDOUT: %.loc19_33.1.temp = alloca <{ i32, i1 }>, align 4, !dbg !18 +// CHECK:STDOUT: call void @_CF.Main(), !dbg !15 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_32.1.temp), !dbg !17 +// CHECK:STDOUT: call void @_CRange.Core(ptr %.loc19_32.1.temp, i32 100), !dbg !17 +// CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.call = call i32 @"_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %.loc19_32.1.temp), !dbg !18 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var), !dbg !18 +// CHECK:STDOUT: store i32 %IntRange.as.Iterate.impl.NewCursor.call, ptr %var, align 4, !dbg !18 +// CHECK:STDOUT: br label %for.next, !dbg !18 // CHECK:STDOUT: // CHECK:STDOUT: for.next: ; preds = %for.body, %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_33.1.temp), !dbg !20 -// CHECK:STDOUT: call void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %.loc19_33.1.temp, ptr %.loc19_32.1.temp, ptr %var), !dbg !20 -// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.ebd99c5786039774(ptr %.loc19_33.1.temp), !dbg !20 -// CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !20 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_33.1.temp), !dbg !18 +// CHECK:STDOUT: call void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %.loc19_33.1.temp, ptr %.loc19_32.1.temp, ptr %var), !dbg !18 +// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.29b2425ca9ad75a4(ptr %.loc19_33.1.temp), !dbg !18 +// CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !18 // CHECK:STDOUT: // CHECK:STDOUT: for.body: ; preds = %for.next -// CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.ebd99c5786039774(ptr %.loc19_33.1.temp), !dbg !20 -// CHECK:STDOUT: call void @_CG.Main(), !dbg !27 -// CHECK:STDOUT: call void @"_CSelfDestruct.bf93366da8df6472:core.Destroy.Core"(ptr %.loc19_33.1.temp), !dbg !20 -// CHECK:STDOUT: br label %for.next, !dbg !28 +// CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.29b2425ca9ad75a4(ptr %.loc19_33.1.temp), !dbg !18 +// CHECK:STDOUT: call void @_CG.Main(), !dbg !25 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %.loc19_33.1.temp), !dbg !18 +// CHECK:STDOUT: br label %for.next, !dbg !26 // CHECK:STDOUT: // CHECK:STDOUT: for.done: ; preds = %for.next -// CHECK:STDOUT: call void @"_CSelfDestruct.bf93366da8df6472:core.Destroy.Core"(ptr %.loc19_33.1.temp), !dbg !20 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %var), !dbg !20 -// CHECK:STDOUT: call void @"_CSelfDestruct.30087fca60df1631:core.Destroy.Core"(ptr %.loc19_32.1.temp), !dbg !19 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %.loc19_33.1.temp), !dbg !18 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %var), !dbg !18 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ab8fcbb9cd97e8e7(ptr %.loc19_32.1.temp), !dbg !17 // CHECK:STDOUT: call void @_CH.Main(), !dbg !29 // CHECK:STDOUT: ret void, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CRange.Core(ptr sret({ i32, i32 }), i32) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr) -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self) #0 !dbg !31 { +// CHECK:STDOUT: define weak_odr void @"_COp.b3126fe3b97d1b85:core.SubobjectDestroy.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.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self) #0 !dbg !35 { +// CHECK:STDOUT: define weak_odr void @"_COp.6f1424a1f3fc4182:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self), !dbg !37 +// CHECK:STDOUT: %.loc19_33.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc19_33.1.has_value), !dbg !37 +// CHECK:STDOUT: %.loc19_33.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.38552a897eb918eb(ptr %.loc19_33.4.value), !dbg !37 // CHECK:STDOUT: ret void, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %self) #0 !dbg !39 { +// CHECK:STDOUT: define weak_odr void @"_COp.e60156a973847ad6:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !39 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc19_33.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc19_33.1.has_value), !dbg !41 +// CHECK:STDOUT: %.loc19_33.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.38552a897eb918eb(ptr %.loc19_33.4.value), !dbg !41 // CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: define weak_odr void @"_COp.7e86931818f7778c:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !43 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc19_32.1.end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc19_32.1.end), !dbg !45 +// CHECK:STDOUT: %.loc19_32.4.start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc19_32.4.start), !dbg !45 // CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2e0c223a4e2f3d14:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: define weak_odr void @"_COp.30087fca60df1631:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc19_33.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !49 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc19_33.1.has_value), !dbg !49 -// CHECK:STDOUT: %.loc19_33.2.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !49 -// CHECK:STDOUT: call void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %.loc19_33.2.value), !dbg !49 +// CHECK:STDOUT: %.loc19_32.1.end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc19_32.1.end), !dbg !49 +// CHECK:STDOUT: %.loc19_32.4.start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc19_32.4.start), !dbg !49 // CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2e0c223a4e2f3d14:core.Destroy.Core"(ptr %self) #0 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2e0c223a4e2f3d14: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 @"_CSubobjectDestroy.d2ff3a86a5bbb967:core.Destroy.Core"(ptr %self) #0 !dbg !55 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc19_33.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !57 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc19_33.1.has_value), !dbg !57 -// CHECK:STDOUT: %.loc19_33.2.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !57 -// CHECK:STDOUT: call void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %.loc19_33.2.value), !dbg !57 -// CHECK:STDOUT: ret void, !dbg !57 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d2ff3a86a5bbb967:core.Destroy.Core"(ptr %self) #0 !dbg !59 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d2ff3a86a5bbb967: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.bf93366da8df6472: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.7e86931818f7778c:core.Destroy.Core"(ptr %self) #0 !dbg !67 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc19_32.1.end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc19_32.1.end), !dbg !69 -// CHECK:STDOUT: %.loc19_32.2.start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc19_32.2.start), !dbg !69 -// CHECK:STDOUT: ret void, !dbg !69 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7e86931818f7778c:core.Destroy.Core"(ptr %self) #0 !dbg !71 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.7e86931818f7778c: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.30087fca60df1631:core.Destroy.Core"(ptr %self) #0 !dbg !75 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc19_32.1.end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !77 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc19_32.1.end), !dbg !77 -// CHECK:STDOUT: %.loc19_32.2.start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !77 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc19_32.2.start), !dbg !77 -// CHECK:STDOUT: ret void, !dbg !77 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.30087fca60df1631:core.Destroy.Core"(ptr %self) #0 !dbg !79 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.30087fca60df1631: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.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 !86 { -// CHECK:STDOUT: %start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !91 -// CHECK:STDOUT: %1 = load i32, ptr %start, align 4, !dbg !91 -// CHECK:STDOUT: ret i32 %1, !dbg !92 +// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !54 { +// CHECK:STDOUT: %start = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !59 +// CHECK:STDOUT: %1 = load i32, ptr %start, align 4, !dbg !59 +// CHECK:STDOUT: ret i32 %1, !dbg !60 // 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 !94 { -// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !101 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !101 -// CHECK:STDOUT: %2 = load i32, ptr %cursor, align 4, !dbg !102 -// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !101 -// CHECK:STDOUT: %end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !105 -// CHECK:STDOUT: %3 = load i32, ptr %end, align 4, !dbg !105 -// CHECK:STDOUT: %4 = load i32, ptr %1, align 4, !dbg !104 -// CHECK:STDOUT: %5 = icmp slt i32 %4, %3, !dbg !104 -// CHECK:STDOUT: br i1 %5, label %6, label %8, !dbg !106 +// CHECK:STDOUT: define linkonce_odr void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !62 { +// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !69 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !69 +// CHECK:STDOUT: %2 = load i32, ptr %cursor, align 4, !dbg !70 +// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !69 +// CHECK:STDOUT: %end = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !73 +// CHECK:STDOUT: %3 = load i32, ptr %end, align 4, !dbg !73 +// CHECK:STDOUT: %4 = load i32, ptr %1, align 4, !dbg !72 +// CHECK:STDOUT: %5 = icmp slt i32 %4, %3, !dbg !72 +// CHECK:STDOUT: br i1 %5, label %6, label %8, !dbg !74 // CHECK:STDOUT: // CHECK:STDOUT: 6: ; preds = %0 -// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !108 -// CHECK:STDOUT: %7 = load i32, ptr %1, align 4, !dbg !109 -// CHECK:STDOUT: call void @_CSome.Optional.Core.ebd99c5786039774(ptr %return, i32 %7), !dbg !110 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %1), !dbg !101 -// CHECK:STDOUT: ret void, !dbg !111 +// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !76 +// CHECK:STDOUT: %7 = load i32, ptr %1, align 4, !dbg !77 +// CHECK:STDOUT: call void @_CSome.Optional.Core.29b2425ca9ad75a4(ptr %return, i32 %7), !dbg !78 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %1), !dbg !69 +// CHECK:STDOUT: ret void, !dbg !79 // CHECK:STDOUT: // CHECK:STDOUT: 8: ; preds = %0 -// CHECK:STDOUT: call void @_CNone.Optional.Core.ebd99c5786039774(ptr %return), !dbg !112 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %1), !dbg !101 -// CHECK:STDOUT: ret void, !dbg !115 +// CHECK:STDOUT: call void @_CNone.Optional.Core.29b2425ca9ad75a4(ptr %return), !dbg !80 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %1), !dbg !69 +// CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.ebd99c5786039774(ptr %self) #0 !dbg !118 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %self), !dbg !124 -// CHECK:STDOUT: ret i1 %1, !dbg !125 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.29b2425ca9ad75a4(ptr %self) #0 !dbg !86 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %self), !dbg !92 +// CHECK:STDOUT: ret i1 %1, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.ebd99c5786039774(ptr %self) #0 !dbg !127 { -// CHECK:STDOUT: %1 = call i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %self), !dbg !133 -// CHECK:STDOUT: ret i32 %1, !dbg !134 +// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.29b2425ca9ad75a4(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: %1 = call i32 @"_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %self), !dbg !101 +// CHECK:STDOUT: ret i32 %1, !dbg !102 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %t) #0 !dbg !105 { +// CHECK:STDOUT: ret void, !dbg !110 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9a03059f269926ed(ptr %t) #0 !dbg !112 { +// CHECK:STDOUT: ret void, !dbg !117 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ab8fcbb9cd97e8e7(ptr %t) #0 !dbg !119 { +// CHECK:STDOUT: call void @"_COp.30087fca60df1631:core.SubobjectDestroy.Core"(ptr %t), !dbg !123 +// CHECK:STDOUT: ret void, !dbg !124 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %t) #0 !dbg !126 { +// CHECK:STDOUT: ret void, !dbg !131 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.38552a897eb918eb(ptr %t) #0 !dbg !133 { +// CHECK:STDOUT: ret void, !dbg !138 // 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 !137 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !140 -// CHECK:STDOUT: ret void, !dbg !143 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !141 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !144 +// CHECK:STDOUT: ret void, !dbg !147 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.ebd99c5786039774(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !145 { -// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %return, i32 %value), !dbg !150 -// CHECK:STDOUT: ret void, !dbg !151 +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.29b2425ca9ad75a4(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !149 { +// CHECK:STDOUT: call void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %return, i32 %value), !dbg !154 +// CHECK:STDOUT: ret void, !dbg !155 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.ebd99c5786039774(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !153 { -// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %return), !dbg !156 -// CHECK:STDOUT: ret void, !dbg !157 +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.29b2425ca9ad75a4(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !157 { +// CHECK:STDOUT: call void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %return), !dbg !160 +// CHECK:STDOUT: ret void, !dbg !161 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %value) #0 !dbg !158 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !163 -// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !163 -// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !163 -// CHECK:STDOUT: ret i1 %2, !dbg !164 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %value) #0 !dbg !162 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !167 +// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !167 +// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !167 +// CHECK:STDOUT: ret i1 %2, !dbg !168 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr %value) #0 !dbg !166 { -// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !171 -// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !171 -// CHECK:STDOUT: ret i32 %1, !dbg !172 +// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %value) #0 !dbg !170 { +// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !175 +// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !175 +// CHECK:STDOUT: ret i32 %1, !dbg !176 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #2 !dbg !174 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !178 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !178 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !178 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !178 -// CHECK:STDOUT: ret void, !dbg !178 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #2 !dbg !178 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !182 +// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !182 +// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !182 +// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !182 +// CHECK:STDOUT: ret void, !dbg !182 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !182 { -// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !191 -// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !191 -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !193 -// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !193 -// CHECK:STDOUT: ret void, !dbg !194 +// CHECK:STDOUT: define linkonce_odr void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !186 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !195 +// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !195 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !197 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !197 +// CHECK:STDOUT: ret void, !dbg !198 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !196 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !203 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !203 -// CHECK:STDOUT: ret void, !dbg !204 +// CHECK:STDOUT: define linkonce_odr void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !200 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !207 +// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !207 +// CHECK:STDOUT: ret void, !dbg !208 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !205 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !210 -// CHECK:STDOUT: ret i32 %1, !dbg !212 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !209 { +// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !214 +// CHECK:STDOUT: ret i32 %1, !dbg !216 // 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 !214 { -// CHECK:STDOUT: ret i32 %self, !dbg !220 +// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !218 { +// CHECK:STDOUT: ret i32 %self, !dbg !224 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.bf93366da8df6472:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 3, 2, 1 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.c6daab0befde28a8, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9a03059f269926ed, { 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.8242e48f93ef210e, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.38552a897eb918eb, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -308,159 +282,149 @@ fn For() { // CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !10 = !{!9, !6} // CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{null, !6} +// CHECK:STDOUT: !12 = !{null, !9} // CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = !{null, !9} -// CHECK:STDOUT: !15 = !DISubroutineType(types: !14) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !4, line: 17, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !17 = !DILocation(line: 18, column: 3, scope: !16) -// CHECK:STDOUT: !19 = !DILocation(line: 19, column: 18, scope: !16) -// CHECK:STDOUT: !20 = !DILocation(line: 19, column: 7, scope: !16) -// CHECK:STDOUT: !21 = !{!6, !9} +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "For", linkageName: "_CFor.Main", scope: null, file: !4, line: 17, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !15 = !DILocation(line: 18, column: 3, scope: !14) +// CHECK:STDOUT: !17 = !DILocation(line: 19, column: 18, scope: !14) +// CHECK:STDOUT: !18 = !DILocation(line: 19, column: 7, scope: !14) +// CHECK:STDOUT: !19 = !{!6, !9} +// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) +// CHECK:STDOUT: !21 = !{!9, !9, !6} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{!9, !9, !6} +// CHECK:STDOUT: !23 = !{!9, !9} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !{!9, !9} -// CHECK:STDOUT: !26 = !DISubroutineType(types: !25) -// CHECK:STDOUT: !27 = !DILocation(line: 20, column: 5, scope: !16) -// CHECK:STDOUT: !28 = !DILocation(line: 19, column: 3, scope: !16) -// CHECK:STDOUT: !29 = !DILocation(line: 22, column: 3, scope: !16) -// CHECK:STDOUT: !30 = !DILocation(line: 17, column: 1, scope: !16) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) +// CHECK:STDOUT: !25 = !DILocation(line: 20, column: 5, scope: !14) +// CHECK:STDOUT: !26 = !DILocation(line: 19, column: 3, scope: !14) +// CHECK:STDOUT: !27 = !{null, !6} +// CHECK:STDOUT: !28 = !DISubroutineType(types: !27) +// CHECK:STDOUT: !29 = !DILocation(line: 22, column: 3, scope: !14) +// CHECK:STDOUT: !30 = !DILocation(line: 17, column: 1, scope: !14) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b3126fe3b97d1b85:core.SubobjectDestroy.Core", scope: null, file: !4, line: 19, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !9) // CHECK:STDOUT: !33 = !DILocation(line: 19, column: 7, scope: !31) // CHECK:STDOUT: !34 = !{!32} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b3126fe3b97d1b85:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6f1424a1f3fc4182:core.SubobjectDestroy.Core", scope: null, file: !4, line: 19, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !38) // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !9) // CHECK:STDOUT: !37 = !DILocation(line: 19, column: 7, scope: !35) // CHECK:STDOUT: !38 = !{!36} -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.993995cdb1dad067:core.Destroy.Core", scope: null, file: !4, line: 19, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !6) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e60156a973847ad6:core.SubobjectDestroy.Core", scope: null, file: !4, line: 19, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !9) // CHECK:STDOUT: !41 = !DILocation(line: 19, column: 7, scope: !39) // CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7e86931818f7778c:core.SubobjectDestroy.Core", scope: null, file: !4, line: 19, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !9) -// CHECK:STDOUT: !45 = !DILocation(line: 19, column: 7, scope: !43) +// CHECK:STDOUT: !45 = !DILocation(line: 19, column: 18, scope: !43) // CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2e0c223a4e2f3d14:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.30087fca60df1631:core.SubobjectDestroy.Core", scope: null, file: !4, line: 19, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) // CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !9) -// CHECK:STDOUT: !49 = !DILocation(line: 19, column: 7, scope: !47) +// CHECK:STDOUT: !49 = !DILocation(line: 19, column: 18, scope: !47) // CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2e0c223a4e2f3d14:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !9) -// CHECK:STDOUT: !53 = !DILocation(line: 19, column: 7, scope: !51) -// CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d2ff3a86a5bbb967:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !9) -// CHECK:STDOUT: !57 = !DILocation(line: 19, column: 7, scope: !55) -// CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d2ff3a86a5bbb967:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !62) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !9) -// CHECK:STDOUT: !61 = !DILocation(line: 19, column: 7, scope: !59) -// CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bf93366da8df6472:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !9) -// CHECK:STDOUT: !65 = !DILocation(line: 19, column: 7, scope: !63) -// CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.7e86931818f7778c:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !9) -// CHECK:STDOUT: !69 = !DILocation(line: 19, column: 18, scope: !67) -// CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7e86931818f7778c:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !9) -// CHECK:STDOUT: !73 = !DILocation(line: 19, column: 18, scope: !71) -// CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.30087fca60df1631:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !78) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !9) -// CHECK:STDOUT: !77 = !DILocation(line: 19, column: 18, scope: !75) -// CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.30087fca60df1631:core.Destroy.Core", scope: null, file: !4, line: 19, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !82) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !9) -// CHECK:STDOUT: !81 = !DILocation(line: 19, column: 18, scope: !79) -// CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !85 = !DIFile(filename: "{{.*}}/prelude/range.carbon", directory: "") -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !85, line: 19, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !93) +// CHECK:STDOUT: !53 = !DIFile(filename: "{{.*}}/prelude/range.carbon", directory: "") +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !53, line: 19, type: !20, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !61) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !9) +// CHECK:STDOUT: !59 = !DILocation(line: 19, column: 43, scope: !54) +// CHECK:STDOUT: !60 = !DILocation(line: 19, column: 36, scope: !54) +// CHECK:STDOUT: !61 = !{!55} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !53, line: 20, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !9) +// CHECK:STDOUT: !64 = !DILocalVariable(arg: 2, scope: !62, type: !6) +// CHECK:STDOUT: !69 = !DILocation(line: 21, column: 7, scope: !62) +// CHECK:STDOUT: !70 = !DILocation(line: 21, column: 27, scope: !62) +// CHECK:STDOUT: !72 = !DILocation(line: 22, column: 11, scope: !62) +// CHECK:STDOUT: !73 = !DILocation(line: 22, column: 19, scope: !62) +// CHECK:STDOUT: !74 = !DILocation(line: 22, column: 10, scope: !62) +// CHECK:STDOUT: !76 = !DILocation(line: 23, column: 9, scope: !62) +// CHECK:STDOUT: !77 = !DILocation(line: 24, column: 38, scope: !62) +// CHECK:STDOUT: !78 = !DILocation(line: 24, column: 16, scope: !62) +// CHECK:STDOUT: !79 = !DILocation(line: 24, column: 9, scope: !62) +// CHECK:STDOUT: !80 = !DILocation(line: 26, column: 16, scope: !62) +// CHECK:STDOUT: !81 = !{!9} +// CHECK:STDOUT: !82 = !DISubroutineType(types: !81) +// CHECK:STDOUT: !83 = !DILocation(line: 26, column: 9, scope: !62) +// CHECK:STDOUT: !84 = !{!63, !64} +// CHECK:STDOUT: !85 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.29b2425ca9ad75a4", scope: null, file: !85, line: 36, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !94) // CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !9) -// CHECK:STDOUT: !91 = !DILocation(line: 19, column: 43, scope: !86) -// CHECK:STDOUT: !92 = !DILocation(line: 19, column: 36, scope: !86) -// CHECK:STDOUT: !93 = !{!87} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8", scope: null, file: !85, line: 20, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !116) -// 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: 21, column: 7, scope: !94) -// CHECK:STDOUT: !102 = !DILocation(line: 21, column: 27, scope: !94) -// CHECK:STDOUT: !104 = !DILocation(line: 22, column: 11, scope: !94) -// CHECK:STDOUT: !105 = !DILocation(line: 22, column: 19, scope: !94) -// CHECK:STDOUT: !106 = !DILocation(line: 22, column: 10, scope: !94) -// CHECK:STDOUT: !108 = !DILocation(line: 23, column: 9, scope: !94) -// CHECK:STDOUT: !109 = !DILocation(line: 24, column: 38, scope: !94) -// CHECK:STDOUT: !110 = !DILocation(line: 24, column: 16, scope: !94) -// CHECK:STDOUT: !111 = !DILocation(line: 24, column: 9, scope: !94) -// CHECK:STDOUT: !112 = !DILocation(line: 26, column: 16, scope: !94) -// CHECK:STDOUT: !113 = !{!9} -// CHECK:STDOUT: !114 = !DISubroutineType(types: !113) -// CHECK:STDOUT: !115 = !DILocation(line: 26, column: 9, scope: !94) -// CHECK:STDOUT: !116 = !{!95, !96} -// CHECK:STDOUT: !117 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.ebd99c5786039774", scope: null, file: !117, line: 36, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !126) -// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !9) -// CHECK:STDOUT: !124 = !DILocation(line: 37, column: 12, scope: !118) -// CHECK:STDOUT: !125 = !DILocation(line: 37, column: 5, scope: !118) -// CHECK:STDOUT: !126 = !{!119} -// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.ebd99c5786039774", scope: null, file: !117, line: 39, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135) -// CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !127, type: !9) -// CHECK:STDOUT: !133 = !DILocation(line: 40, column: 12, scope: !127) -// CHECK:STDOUT: !134 = !DILocation(line: 40, column: 5, scope: !127) -// CHECK:STDOUT: !135 = !{!128} -// CHECK:STDOUT: !136 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !136, line: 396, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !144) -// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !6) -// CHECK:STDOUT: !140 = !DILocation(line: 398, column: 5, scope: !137) -// CHECK:STDOUT: !141 = !{null, !6, !6} -// CHECK:STDOUT: !142 = !DISubroutineType(types: !141) -// CHECK:STDOUT: !143 = !DILocation(line: 396, column: 3, scope: !137) -// CHECK:STDOUT: !144 = !{!138} -// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.ebd99c5786039774", scope: null, file: !117, line: 33, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !152) -// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !6) -// CHECK:STDOUT: !150 = !DILocation(line: 34, column: 12, scope: !145) -// CHECK:STDOUT: !151 = !DILocation(line: 34, column: 5, scope: !145) -// CHECK:STDOUT: !152 = !{!146} -// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.ebd99c5786039774", scope: null, file: !117, line: 30, type: !114, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !156 = !DILocation(line: 31, column: 12, scope: !153) -// CHECK:STDOUT: !157 = !DILocation(line: 31, column: 5, scope: !153) -// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !117, line: 141, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !165) -// CHECK:STDOUT: !159 = !DILocalVariable(arg: 1, scope: !158, type: !9) -// CHECK:STDOUT: !163 = !DILocation(line: 142, column: 12, scope: !158) -// CHECK:STDOUT: !164 = !DILocation(line: 142, column: 5, scope: !158) -// CHECK:STDOUT: !165 = !{!159} -// CHECK:STDOUT: !166 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !117, line: 144, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !173) -// CHECK:STDOUT: !167 = !DILocalVariable(arg: 1, scope: !166, type: !9) -// CHECK:STDOUT: !171 = !DILocation(line: 145, column: 12, scope: !166) -// CHECK:STDOUT: !172 = !DILocation(line: 145, column: 5, scope: !166) -// CHECK:STDOUT: !173 = !{!167} -// CHECK:STDOUT: !174 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !136, line: 331, type: !142, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !181) -// CHECK:STDOUT: !175 = !DILocalVariable(arg: 1, scope: !174, type: !6) -// CHECK:STDOUT: !176 = !DILocalVariable(arg: 2, scope: !174, type: !6) -// CHECK:STDOUT: !178 = !DILocation(line: 331, column: 3, scope: !174) -// CHECK:STDOUT: !179 = !{!6, !6} -// CHECK:STDOUT: !180 = !DISubroutineType(types: !179) -// CHECK:STDOUT: !181 = !{!175, !176} -// CHECK:STDOUT: !182 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !117, line: 131, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !195) -// CHECK:STDOUT: !183 = !DILocalVariable(arg: 1, scope: !182, type: !6) -// CHECK:STDOUT: !191 = !DILocation(line: 137, column: 5, scope: !182) -// CHECK:STDOUT: !193 = !DILocation(line: 138, column: 5, scope: !182) -// CHECK:STDOUT: !194 = !DILocation(line: 139, column: 5, scope: !182) -// CHECK:STDOUT: !195 = !{!183} -// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d86245b043c956e8", scope: null, file: !117, line: 125, type: !114, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !203 = !DILocation(line: 128, column: 5, scope: !196) -// CHECK:STDOUT: !204 = !DILocation(line: 129, column: 5, scope: !196) -// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !136, line: 64, type: !180, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !213) -// CHECK:STDOUT: !206 = !DILocalVariable(arg: 1, scope: !205, type: !6) -// CHECK:STDOUT: !210 = !DILocation(line: 66, column: 17, scope: !205) -// CHECK:STDOUT: !212 = !DILocation(line: 66, column: 5, scope: !205) -// CHECK:STDOUT: !213 = !{!206} -// CHECK:STDOUT: !214 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !136, line: 59, type: !180, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !221) -// CHECK:STDOUT: !215 = !DILocalVariable(arg: 1, scope: !214, type: !6) -// CHECK:STDOUT: !220 = !DILocation(line: 59, column: 28, scope: !214) -// CHECK:STDOUT: !221 = !{!215} +// CHECK:STDOUT: !92 = !DILocation(line: 37, column: 12, scope: !86) +// CHECK:STDOUT: !93 = !DILocation(line: 37, column: 5, scope: !86) +// CHECK:STDOUT: !94 = !{!87} +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.29b2425ca9ad75a4", scope: null, file: !85, line: 39, type: !20, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !103) +// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !9) +// CHECK:STDOUT: !101 = !DILocation(line: 40, column: 12, scope: !95) +// CHECK:STDOUT: !102 = !DILocation(line: 40, column: 5, scope: !95) +// CHECK:STDOUT: !103 = !{!96} +// CHECK:STDOUT: !104 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.c6daab0befde28a8", scope: null, file: !104, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !111) +// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !9) +// CHECK:STDOUT: !110 = !DILocation(line: 36, column: 1, scope: !105) +// CHECK:STDOUT: !111 = !{!106} +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9a03059f269926ed", scope: null, file: !104, line: 36, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !118) +// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !6) +// CHECK:STDOUT: !117 = !DILocation(line: 36, column: 1, scope: !112) +// CHECK:STDOUT: !118 = !{!113} +// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ab8fcbb9cd97e8e7", scope: null, file: !104, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !125) +// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !9) +// CHECK:STDOUT: !123 = !DILocation(line: 38, column: 5, scope: !119) +// CHECK:STDOUT: !124 = !DILocation(line: 36, column: 1, scope: !119) +// CHECK:STDOUT: !125 = !{!120} +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8242e48f93ef210e", scope: null, file: !104, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !132) +// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !9) +// CHECK:STDOUT: !131 = !DILocation(line: 36, column: 1, scope: !126) +// CHECK:STDOUT: !132 = !{!127} +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.38552a897eb918eb", scope: null, file: !104, line: 36, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139) +// CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !6) +// CHECK:STDOUT: !138 = !DILocation(line: 36, column: 1, scope: !133) +// CHECK:STDOUT: !139 = !{!134} +// CHECK:STDOUT: !140 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !140, line: 396, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !148) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !6) +// CHECK:STDOUT: !144 = !DILocation(line: 398, column: 5, scope: !141) +// CHECK:STDOUT: !145 = !{null, !6, !6} +// CHECK:STDOUT: !146 = !DISubroutineType(types: !145) +// CHECK:STDOUT: !147 = !DILocation(line: 396, column: 3, scope: !141) +// CHECK:STDOUT: !148 = !{!142} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.29b2425ca9ad75a4", scope: null, file: !85, line: 33, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !156) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !6) +// CHECK:STDOUT: !154 = !DILocation(line: 34, column: 12, scope: !149) +// CHECK:STDOUT: !155 = !DILocation(line: 34, column: 5, scope: !149) +// CHECK:STDOUT: !156 = !{!150} +// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.29b2425ca9ad75a4", scope: null, file: !85, line: 30, type: !82, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !160 = !DILocation(line: 31, column: 12, scope: !157) +// CHECK:STDOUT: !161 = !DILocation(line: 31, column: 5, scope: !157) +// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !85, line: 141, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !169) +// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !9) +// CHECK:STDOUT: !167 = !DILocation(line: 142, column: 12, scope: !162) +// CHECK:STDOUT: !168 = !DILocation(line: 142, column: 5, scope: !162) +// CHECK:STDOUT: !169 = !{!163} +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !85, line: 144, type: !20, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !177) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !9) +// CHECK:STDOUT: !175 = !DILocation(line: 145, column: 12, scope: !170) +// CHECK:STDOUT: !176 = !DILocation(line: 145, column: 5, scope: !170) +// CHECK:STDOUT: !177 = !{!171} +// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !140, line: 331, type: !146, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !185) +// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !6) +// CHECK:STDOUT: !180 = !DILocalVariable(arg: 2, scope: !178, type: !6) +// CHECK:STDOUT: !182 = !DILocation(line: 331, column: 3, scope: !178) +// CHECK:STDOUT: !183 = !{!6, !6} +// CHECK:STDOUT: !184 = !DISubroutineType(types: !183) +// CHECK:STDOUT: !185 = !{!179, !180} +// CHECK:STDOUT: !186 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !85, line: 131, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !199) +// CHECK:STDOUT: !187 = !DILocalVariable(arg: 1, scope: !186, type: !6) +// CHECK:STDOUT: !195 = !DILocation(line: 137, column: 5, scope: !186) +// CHECK:STDOUT: !197 = !DILocation(line: 138, column: 5, scope: !186) +// CHECK:STDOUT: !198 = !DILocation(line: 139, column: 5, scope: !186) +// CHECK:STDOUT: !199 = !{!187} +// CHECK:STDOUT: !200 = distinct !DISubprogram(name: "None", linkageName: "_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !85, line: 125, type: !82, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !207 = !DILocation(line: 128, column: 5, scope: !200) +// CHECK:STDOUT: !208 = !DILocation(line: 129, column: 5, scope: !200) +// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !140, line: 64, type: !184, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !217) +// CHECK:STDOUT: !210 = !DILocalVariable(arg: 1, scope: !209, type: !6) +// CHECK:STDOUT: !214 = !DILocation(line: 66, column: 17, scope: !209) +// CHECK:STDOUT: !216 = !DILocation(line: 66, column: 5, scope: !209) +// CHECK:STDOUT: !217 = !{!210} +// CHECK:STDOUT: !218 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !140, line: 59, type: !184, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !225) +// CHECK:STDOUT: !219 = !DILocalVariable(arg: 1, scope: !218, type: !6) +// CHECK:STDOUT: !224 = !DILocation(line: 59, column: 28, scope: !218) +// CHECK:STDOUT: !225 = !{!219} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/empty_struct.carbon b/toolchain/lower/testdata/function/call/empty_struct.carbon index 9cc81b287f34..2bf5cd5d6d2f 100644 --- a/toolchain/lower/testdata/function/call/empty_struct.carbon +++ b/toolchain/lower/testdata/function/call/empty_struct.carbon @@ -23,30 +23,29 @@ fn Main() { // CHECK:STDOUT: source_filename = "empty_struct.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CEcho.Main() #0 !dbg !21 { +// CHECK:STDOUT: define void @_CEcho.Main() #0 !dbg !18 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !25 +// CHECK:STDOUT: ret void, !dbg !22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !26 { +// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !27 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !27 -// CHECK:STDOUT: call void @_CEcho.Main(), !dbg !28 -// CHECK:STDOUT: call void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %_.var), !dbg !27 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !24 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !24 +// CHECK:STDOUT: call void @_CEcho.Main(), !dbg !25 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.61b5bb2079973306(ptr %_.var), !dbg !24 // CHECK:STDOUT: ret void, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99: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: 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 @_CSelfDestruct.Core.61b5bb2079973306(ptr %t) #0 !dbg !31 { +// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -55,21 +54,22 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !14 = !DIFile(filename: "empty_struct.carbon", directory: "") // CHECK:STDOUT: !15 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !14, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DISubroutineType(types: !16) -// CHECK:STDOUT: !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !19 = !{null, !18} -// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !14, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !15) -// CHECK:STDOUT: !25 = !DILocation(line: 14, column: 3, scope: !21) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !14, line: 17, type: !17, spFlags: DISPFlagDefinition, unit: !15) -// CHECK:STDOUT: !27 = !DILocation(line: 18, column: 3, scope: !26) -// CHECK:STDOUT: !28 = !DILocation(line: 18, column: 15, scope: !26) -// CHECK:STDOUT: !30 = !DILocation(line: 17, column: 1, scope: !26) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !14, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !34) -// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !18) -// CHECK:STDOUT: !33 = !DILocation(line: 18, column: 3, scope: !31) -// CHECK:STDOUT: !34 = !{!32} +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !14, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !15) +// CHECK:STDOUT: !22 = !DILocation(line: 14, column: 3, scope: !18) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !14, line: 17, type: !17, spFlags: DISPFlagDefinition, unit: !15) +// CHECK:STDOUT: !24 = !DILocation(line: 18, column: 3, scope: !23) +// CHECK:STDOUT: !25 = !DILocation(line: 18, column: 15, scope: !23) +// CHECK:STDOUT: !27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !28 = !{null, !27} +// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) +// CHECK:STDOUT: !30 = !DILocation(line: 17, column: 1, scope: !23) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.61b5bb2079973306", scope: null, file: !6, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !37) +// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !27) +// CHECK:STDOUT: !36 = !DILocation(line: 32, column: 1, scope: !31) +// CHECK:STDOUT: !37 = !{!32} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/empty_tuple.carbon b/toolchain/lower/testdata/function/call/empty_tuple.carbon index 0c58c31a5643..41b1e507bd23 100644 --- a/toolchain/lower/testdata/function/call/empty_tuple.carbon +++ b/toolchain/lower/testdata/function/call/empty_tuple.carbon @@ -23,30 +23,29 @@ fn Main() { // CHECK:STDOUT: source_filename = "empty_tuple.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CEcho.Main() #0 !dbg !21 { +// CHECK:STDOUT: define void @_CEcho.Main() #0 !dbg !18 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !26 +// CHECK:STDOUT: ret void, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !27 { +// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !24 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !28 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !28 -// CHECK:STDOUT: call void @_CEcho.Main(), !dbg !29 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %_.var), !dbg !28 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !25 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !25 +// CHECK:STDOUT: call void @_CEcho.Main(), !dbg !26 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %_.var), !dbg !25 // CHECK:STDOUT: ret void, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1: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: 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 @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %t) #0 !dbg !32 { +// CHECK:STDOUT: ret void, !dbg !37 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -55,21 +54,22 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !14 = !DIFile(filename: "empty_tuple.carbon", directory: "") // CHECK:STDOUT: !15 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !14, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DISubroutineType(types: !16) -// CHECK:STDOUT: !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !19 = !{null, !18} -// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !14, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !15) -// CHECK:STDOUT: !26 = !DILocation(line: 14, column: 3, scope: !21) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !14, line: 17, type: !17, spFlags: DISPFlagDefinition, unit: !15) -// CHECK:STDOUT: !28 = !DILocation(line: 18, column: 3, scope: !27) -// CHECK:STDOUT: !29 = !DILocation(line: 18, column: 15, scope: !27) -// CHECK:STDOUT: !31 = !DILocation(line: 17, column: 1, scope: !27) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !14, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !35) -// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !18) -// CHECK:STDOUT: !34 = !DILocation(line: 18, column: 3, scope: !32) -// CHECK:STDOUT: !35 = !{!33} +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !14, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !15) +// CHECK:STDOUT: !23 = !DILocation(line: 14, column: 3, scope: !18) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !14, line: 17, type: !17, spFlags: DISPFlagDefinition, unit: !15) +// CHECK:STDOUT: !25 = !DILocation(line: 18, column: 3, scope: !24) +// CHECK:STDOUT: !26 = !DILocation(line: 18, column: 15, scope: !24) +// CHECK:STDOUT: !28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !29 = !{null, !28} +// CHECK:STDOUT: !30 = !DISubroutineType(types: !29) +// CHECK:STDOUT: !31 = !DILocation(line: 17, column: 1, scope: !24) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9045abb8230cbcdf", scope: null, file: !6, line: 32, type: !30, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !38) +// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !28) +// CHECK:STDOUT: !37 = !DILocation(line: 32, column: 1, scope: !32) +// CHECK:STDOUT: !38 = !{!33} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/form.carbon b/toolchain/lower/testdata/function/call/form.carbon index 179e84d12765..7469bb8b3534 100644 --- a/toolchain/lower/testdata/function/call/form.carbon +++ b/toolchain/lower/testdata/function/call/form.carbon @@ -145,19 +145,18 @@ fn H(d: D) { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !26 // CHECK:STDOUT: store i32 0, ptr %y.var, align 4, !dbg !26 // CHECK:STDOUT: call void @_CF.Main(ptr %y.var), !dbg !30 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %y.var), !dbg !26 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %y.var), !dbg !26 // CHECK:STDOUT: ret void, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !32 { +// CHECK:STDOUT: ret void, !dbg !37 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -166,6 +165,7 @@ fn H(d: D) { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "ref_form_param.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -177,10 +177,10 @@ fn H(d: D) { // CHECK:STDOUT: !26 = !DILocation(line: 6, column: 3, scope: !25) // CHECK:STDOUT: !30 = !DILocation(line: 7, column: 3, scope: !25) // CHECK:STDOUT: !31 = !DILocation(line: 5, column: 1, scope: !25) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !35) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !38) // 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: !37 = !DILocation(line: 32, column: 1, scope: !32) +// CHECK:STDOUT: !38 = !{!33} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'var_form_param.carbon' @@ -189,48 +189,48 @@ fn H(d: D) { // CHECK:STDOUT: declare void @_CF.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !38 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !39 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !39 -// CHECK:STDOUT: store i32 0, ptr %x.var, align 4, !dbg !39 -// CHECK:STDOUT: call void @_CF.Main(ptr %x.var), !dbg !40 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %x.var), !dbg !39 -// CHECK:STDOUT: ret void, !dbg !41 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !42 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !41 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !42 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !42 +// CHECK:STDOUT: store i32 0, ptr %x.var, align 4, !dbg !42 +// CHECK:STDOUT: call void @_CF.Main(ptr %x.var), !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %x.var), !dbg !42 // CHECK:STDOUT: ret void, !dbg !44 // 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !45 { +// CHECK:STDOUT: ret void, !dbg !50 +// 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 = !{!37} +// CHECK:STDOUT: !llvm.dbg.cu = !{!40} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{null, !20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !23 = !{null} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !36 = !DIFile(filename: "var_form_param.carbon", directory: "") -// CHECK:STDOUT: !37 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !36, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !36, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !37) -// CHECK:STDOUT: !39 = !DILocation(line: 3, column: 6, scope: !38) -// CHECK:STDOUT: !40 = !DILocation(line: 6, column: 3, scope: !38) -// CHECK:STDOUT: !41 = !DILocation(line: 5, column: 1, scope: !38) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !36, line: 3, type: !22, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !45) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !20) -// CHECK:STDOUT: !44 = !DILocation(line: 3, column: 6, scope: !42) -// CHECK:STDOUT: !45 = !{!43} +// CHECK:STDOUT: !39 = !DIFile(filename: "var_form_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: "G", linkageName: "_CG.Main", scope: null, file: !39, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !40) +// CHECK:STDOUT: !42 = !DILocation(line: 3, column: 6, scope: !41) +// CHECK:STDOUT: !43 = !DILocation(line: 6, column: 3, scope: !41) +// CHECK:STDOUT: !44 = !DILocation(line: 5, column: 1, scope: !41) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !51) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) +// CHECK:STDOUT: !50 = !DILocation(line: 32, column: 1, scope: !45) +// CHECK:STDOUT: !51 = !{!46} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'val_form_param.carbon' @@ -239,26 +239,26 @@ fn H(d: D) { // CHECK:STDOUT: declare void @_CF.Main(i32) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !48 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !54 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main(i32 0), !dbg !49 -// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: call void @_CF.Main(i32 0), !dbg !55 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!47} +// CHECK:STDOUT: !llvm.dbg.cu = !{!53} // 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: !46 = !DIFile(filename: "val_form_param.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 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !46, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !47) -// CHECK:STDOUT: !49 = !DILocation(line: 6, column: 3, scope: !48) -// CHECK:STDOUT: !50 = !DILocation(line: 5, column: 1, scope: !48) +// CHECK:STDOUT: !52 = !DIFile(filename: "val_form_param.carbon", directory: "") +// CHECK:STDOUT: !53 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !52, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !52, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !53) +// CHECK:STDOUT: !55 = !DILocation(line: 6, column: 3, scope: !54) +// CHECK:STDOUT: !56 = !DILocation(line: 5, column: 1, scope: !54) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'ref_return_form.carbon' @@ -267,26 +267,26 @@ fn H(d: D) { // CHECK:STDOUT: declare ptr @_CF.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !56 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call ptr @_CF.Main(), !dbg !57 -// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: %F.call = call ptr @_CF.Main(), !dbg !63 +// CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!52} +// CHECK:STDOUT: !llvm.dbg.cu = !{!58} // 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: !51 = !DIFile(filename: "ref_return_form.carbon", directory: "") -// CHECK:STDOUT: !52 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !51, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !51, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !52) -// CHECK:STDOUT: !57 = !DILocation(line: 6, column: 27, scope: !56) -// CHECK:STDOUT: !60 = !DILocation(line: 5, column: 1, scope: !56) +// CHECK:STDOUT: !57 = !DIFile(filename: "ref_return_form.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: !62 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !57, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !58) +// CHECK:STDOUT: !63 = !DILocation(line: 6, column: 27, scope: !62) +// CHECK:STDOUT: !66 = !DILocation(line: 5, column: 1, scope: !62) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'var_return_form.carbon' @@ -295,48 +295,48 @@ fn H(d: D) { // CHECK:STDOUT: declare i32 @_CF.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !65 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !66 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !66 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !67 -// CHECK:STDOUT: store i32 %F.call, ptr %x.var, align 4, !dbg !66 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %x.var), !dbg !66 -// CHECK:STDOUT: ret void, !dbg !70 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !71 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !73 +// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !72 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !72 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !73 +// CHECK:STDOUT: store i32 %F.call, ptr %x.var, align 4, !dbg !72 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %x.var), !dbg !72 +// 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: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !77 { +// CHECK:STDOUT: ret void, !dbg !82 +// 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 = !{!62} +// CHECK:STDOUT: !llvm.dbg.cu = !{!68} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{null, !20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !23 = !{null} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !61 = !DIFile(filename: "var_return_form.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: !65 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !61, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !62) -// CHECK:STDOUT: !66 = !DILocation(line: 6, column: 14, scope: !65) -// CHECK:STDOUT: !67 = !DILocation(line: 6, column: 27, scope: !65) -// CHECK:STDOUT: !70 = !DILocation(line: 5, column: 1, scope: !65) -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !61, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !62, retainedNodes: !74) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !20) -// CHECK:STDOUT: !73 = !DILocation(line: 6, column: 14, scope: !71) -// CHECK:STDOUT: !74 = !{!72} +// CHECK:STDOUT: !67 = !DIFile(filename: "var_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: !71 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !67, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !68) +// CHECK:STDOUT: !72 = !DILocation(line: 6, column: 14, scope: !71) +// CHECK:STDOUT: !73 = !DILocation(line: 6, column: 27, scope: !71) +// CHECK:STDOUT: !76 = !DILocation(line: 5, column: 1, scope: !71) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !68, retainedNodes: !83) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !20) +// CHECK:STDOUT: !82 = !DILocation(line: 32, column: 1, scope: !77) +// CHECK:STDOUT: !83 = !{!78} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'val_return_form.carbon' @@ -345,47 +345,47 @@ fn H(d: D) { // CHECK:STDOUT: declare i32 @_CF.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !77 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !86 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !78 -// CHECK:STDOUT: ret void, !dbg !81 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !87 +// CHECK:STDOUT: ret void, !dbg !90 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!76} +// CHECK:STDOUT: !llvm.dbg.cu = !{!85} // 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: !75 = !DIFile(filename: "val_return_form.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: "G", linkageName: "_CG.Main", scope: null, file: !75, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !76) -// CHECK:STDOUT: !78 = !DILocation(line: 6, column: 23, scope: !77) -// CHECK:STDOUT: !81 = !DILocation(line: 5, column: 1, scope: !77) +// CHECK:STDOUT: !84 = !DIFile(filename: "val_return_form.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: "G", linkageName: "_CG.Main", scope: null, file: !84, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !85) +// CHECK:STDOUT: !87 = !DILocation(line: 6, column: 23, scope: !86) +// CHECK:STDOUT: !90 = !DILocation(line: 5, column: 1, scope: !86) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'val_return_form_definition.carbon' // CHECK:STDOUT: source_filename = "val_return_form_definition.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF.Main() #0 !dbg !84 { +// CHECK:STDOUT: define i32 @_CF.Main() #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 1, !dbg !87 +// CHECK:STDOUT: ret i32 1, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !88 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !97 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !89 -// CHECK:STDOUT: ret void, !dbg !92 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main(), !dbg !98 +// CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!83} +// CHECK:STDOUT: !llvm.dbg.cu = !{!92} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -393,42 +393,42 @@ fn H(d: D) { // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !23 = !{null} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !63 = !{!20} -// CHECK:STDOUT: !64 = !DISubroutineType(types: !63) -// CHECK:STDOUT: !82 = !DIFile(filename: "val_return_form_definition.carbon", directory: "") -// CHECK:STDOUT: !83 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !82, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !82, line: 3, type: !64, spFlags: DISPFlagDefinition, unit: !83) -// CHECK:STDOUT: !87 = !DILocation(line: 4, column: 3, scope: !84) -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !82, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !83) -// CHECK:STDOUT: !89 = !DILocation(line: 8, column: 23, scope: !88) -// CHECK:STDOUT: !92 = !DILocation(line: 7, column: 1, scope: !88) +// CHECK:STDOUT: !69 = !{!20} +// CHECK:STDOUT: !70 = !DISubroutineType(types: !69) +// CHECK:STDOUT: !91 = !DIFile(filename: "val_return_form_definition.carbon", directory: "") +// CHECK:STDOUT: !92 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !91, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !91, line: 3, type: !70, spFlags: DISPFlagDefinition, unit: !92) +// CHECK:STDOUT: !96 = !DILocation(line: 4, column: 3, scope: !93) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !91, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !92) +// CHECK:STDOUT: !98 = !DILocation(line: 8, column: 23, scope: !97) +// CHECK:STDOUT: !101 = !DILocation(line: 7, column: 1, scope: !97) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'val_return_form_class_definition.carbon' // CHECK:STDOUT: source_filename = "val_return_form_class_definition.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CF.Main(ptr %c) #0 !dbg !97 { +// CHECK:STDOUT: define ptr @_CF.Main(ptr %c) #0 !dbg !106 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %c, !dbg !103 +// CHECK:STDOUT: ret ptr %c, !dbg !112 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!94} +// CHECK:STDOUT: !llvm.dbg.cu = !{!103} // 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: !53 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !93 = !DIFile(filename: "val_return_form_class_definition.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 = !{!53, !53} -// CHECK:STDOUT: !96 = !DISubroutineType(types: !95) -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !93, line: 6, type: !96, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !104) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !53) -// CHECK:STDOUT: !103 = !DILocation(line: 7, column: 3, scope: !97) -// CHECK:STDOUT: !104 = !{!98} +// CHECK:STDOUT: !59 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !102 = !DIFile(filename: "val_return_form_class_definition.carbon", directory: "") +// CHECK:STDOUT: !103 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !102, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !104 = !{!59, !59} +// CHECK:STDOUT: !105 = !DISubroutineType(types: !104) +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !102, line: 6, type: !105, spFlags: DISPFlagDefinition, unit: !103, retainedNodes: !113) +// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !59) +// CHECK:STDOUT: !112 = !DILocation(line: 7, column: 3, scope: !106) +// CHECK:STDOUT: !113 = !{!107} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'ref_return_class.carbon' @@ -437,26 +437,26 @@ fn H(d: D) { // CHECK:STDOUT: declare ptr @_CF.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !107 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !116 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call ptr @_CF.Main(), !dbg !108 -// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: %F.call = call ptr @_CF.Main(), !dbg !117 +// CHECK:STDOUT: ret void, !dbg !118 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!106} +// CHECK:STDOUT: !llvm.dbg.cu = !{!115} // 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: !105 = !DIFile(filename: "ref_return_class.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 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !105, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !106) -// CHECK:STDOUT: !108 = !DILocation(line: 8, column: 3, scope: !107) -// CHECK:STDOUT: !109 = !DILocation(line: 7, column: 1, scope: !107) +// CHECK:STDOUT: !114 = !DIFile(filename: "ref_return_class.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: !116 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !114, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !115) +// CHECK:STDOUT: !117 = !DILocation(line: 8, column: 3, scope: !116) +// CHECK:STDOUT: !118 = !DILocation(line: 7, column: 1, scope: !116) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'val_return_class.carbon' @@ -465,80 +465,80 @@ fn H(d: D) { // CHECK:STDOUT: declare ptr @_CF.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !112 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !121 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call ptr @_CF.Main(), !dbg !113 -// CHECK:STDOUT: ret void, !dbg !114 +// CHECK:STDOUT: %F.call = call ptr @_CF.Main(), !dbg !122 +// CHECK:STDOUT: ret void, !dbg !123 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!111} +// CHECK:STDOUT: !llvm.dbg.cu = !{!120} // 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: !110 = !DIFile(filename: "val_return_class.carbon", directory: "") -// CHECK:STDOUT: !111 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !110, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !110, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !111) -// CHECK:STDOUT: !113 = !DILocation(line: 8, column: 3, scope: !112) -// CHECK:STDOUT: !114 = !DILocation(line: 7, column: 1, scope: !112) +// CHECK:STDOUT: !119 = !DIFile(filename: "val_return_class.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: "G", linkageName: "_CG.Main", scope: null, file: !119, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !120) +// CHECK:STDOUT: !122 = !DILocation(line: 8, column: 3, scope: !121) +// CHECK:STDOUT: !123 = !DILocation(line: 7, column: 1, scope: !121) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'ref_return_class_generic.carbon' // CHECK:STDOUT: source_filename = "ref_return_class_generic.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @"_CF.D.Main:I.Main"(ptr %self) #0 !dbg !119 { +// CHECK:STDOUT: define ptr @"_CF.D.Main:I.Main"(ptr %self) #0 !dbg !128 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_39.1.p = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !124 -// CHECK:STDOUT: %.loc16_39.2 = load ptr, ptr %.loc16_39.1.p, align 8, !dbg !124 -// CHECK:STDOUT: ret ptr %.loc16_39.2, !dbg !126 +// CHECK:STDOUT: %.loc16_39.1.p = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !133 +// CHECK:STDOUT: %.loc16_39.2 = load ptr, ptr %.loc16_39.1.p, align 8, !dbg !133 +// CHECK:STDOUT: ret ptr %.loc16_39.2, !dbg !135 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CH.Main(ptr %d) #0 !dbg !128 { +// CHECK:STDOUT: define void @_CH.Main(ptr %d) #0 !dbg !137 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CG.Main.c3fdce5fe96ec8d5(ptr %d), !dbg !132 -// CHECK:STDOUT: ret void, !dbg !133 +// CHECK:STDOUT: call void @_CG.Main.c3fdce5fe96ec8d5(ptr %d), !dbg !141 +// CHECK:STDOUT: ret void, !dbg !142 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.c3fdce5fe96ec8d5(ptr %x) #0 !dbg !135 { +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.c3fdce5fe96ec8d5(ptr %x) #0 !dbg !144 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %I.WithSelf.F.call = call ptr @"_CF.D.Main:I.Main"(ptr %x), !dbg !138 -// CHECK:STDOUT: ret void, !dbg !139 +// CHECK:STDOUT: %I.WithSelf.F.call = call ptr @"_CF.D.Main:I.Main"(ptr %x), !dbg !147 +// CHECK:STDOUT: ret void, !dbg !148 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!116} +// CHECK:STDOUT: !llvm.dbg.cu = !{!125} // 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: !53 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !95 = !{!53, !53} -// CHECK:STDOUT: !96 = !DISubroutineType(types: !95) -// CHECK:STDOUT: !115 = !DIFile(filename: "ref_return_class_generic.carbon", directory: "") -// CHECK:STDOUT: !116 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !115, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !117 = !{null, !53} -// CHECK:STDOUT: !118 = !DISubroutineType(types: !117) -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "F", linkageName: "_CF.D.Main:I.Main", scope: null, file: !115, line: 16, type: !96, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !127) -// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !53) -// CHECK:STDOUT: !124 = !DILocation(line: 16, column: 35, scope: !119) -// CHECK:STDOUT: !126 = !DILocation(line: 16, column: 27, scope: !119) -// CHECK:STDOUT: !127 = !{!120} -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !115, line: 20, type: !118, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !134) -// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !53) -// CHECK:STDOUT: !132 = !DILocation(line: 21, column: 3, scope: !128) -// CHECK:STDOUT: !133 = !DILocation(line: 20, column: 1, scope: !128) -// CHECK:STDOUT: !134 = !{!129} -// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c3fdce5fe96ec8d5", scope: null, file: !115, line: 9, type: !118, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !140) -// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !53) -// CHECK:STDOUT: !138 = !DILocation(line: 10, column: 3, scope: !135) -// CHECK:STDOUT: !139 = !DILocation(line: 9, column: 1, scope: !135) -// CHECK:STDOUT: !140 = !{!136} +// CHECK:STDOUT: !59 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !104 = !{!59, !59} +// CHECK:STDOUT: !105 = !DISubroutineType(types: !104) +// CHECK:STDOUT: !124 = !DIFile(filename: "ref_return_class_generic.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: !126 = !{null, !59} +// CHECK:STDOUT: !127 = !DISubroutineType(types: !126) +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "F", linkageName: "_CF.D.Main:I.Main", scope: null, file: !124, line: 16, type: !105, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !136) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !59) +// CHECK:STDOUT: !133 = !DILocation(line: 16, column: 35, scope: !128) +// CHECK:STDOUT: !135 = !DILocation(line: 16, column: 27, scope: !128) +// CHECK:STDOUT: !136 = !{!129} +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !124, line: 20, type: !127, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !143) +// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !59) +// CHECK:STDOUT: !141 = !DILocation(line: 21, column: 3, scope: !137) +// CHECK:STDOUT: !142 = !DILocation(line: 20, column: 1, scope: !137) +// CHECK:STDOUT: !143 = !{!138} +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c3fdce5fe96ec8d5", scope: null, file: !124, line: 9, type: !127, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !149) +// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !59) +// CHECK:STDOUT: !147 = !DILocation(line: 10, column: 3, scope: !144) +// CHECK:STDOUT: !148 = !DILocation(line: 9, column: 1, scope: !144) +// CHECK:STDOUT: !149 = !{!145} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/i32.carbon b/toolchain/lower/testdata/function/call/i32.carbon index bb7193dbf92d..afc1bf2d1c7a 100644 --- a/toolchain/lower/testdata/function/call/i32.carbon +++ b/toolchain/lower/testdata/function/call/i32.carbon @@ -23,31 +23,30 @@ fn Main() { // CHECK:STDOUT: source_filename = "i32.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CEcho.Main(i32 %a) #0 !dbg !27 { +// CHECK:STDOUT: define i32 @_CEcho.Main(i32 %a) #0 !dbg !25 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %a, !dbg !33 +// CHECK:STDOUT: ret i32 %a, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !35 { +// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !33 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !36 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !36 -// CHECK:STDOUT: %Echo.call = call i32 @_CEcho.Main(i32 1), !dbg !37 -// CHECK:STDOUT: store i32 %Echo.call, ptr %_.var, align 4, !dbg !36 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var), !dbg !36 +// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !34 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !34 +// CHECK:STDOUT: %Echo.call = call i32 @_CEcho.Main(i32 1), !dbg !35 +// CHECK:STDOUT: store i32 %Echo.call, ptr %_.var, align 4, !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var), !dbg !34 // CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !40 { +// CHECK:STDOUT: ret void, !dbg !45 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -56,6 +55,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "i32.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -63,18 +63,18 @@ fn Main() { // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !23 = !{null} // CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !{null, !20} -// CHECK:STDOUT: !26 = !DISubroutineType(types: !25) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !34) -// CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !27, type: !20) -// CHECK:STDOUT: !33 = !DILocation(line: 14, column: 3, scope: !27) -// CHECK:STDOUT: !34 = !{!28} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !18, line: 17, type: !24, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !36 = !DILocation(line: 18, column: 3, scope: !35) -// CHECK:STDOUT: !37 = !DILocation(line: 18, column: 16, scope: !35) -// CHECK:STDOUT: !39 = !DILocation(line: 17, column: 1, scope: !35) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 18, type: !26, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !32) +// CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !20) +// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 3, scope: !25) +// CHECK:STDOUT: !32 = !{!26} +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !18, line: 17, type: !24, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !34 = !DILocation(line: 18, column: 3, scope: !33) +// CHECK:STDOUT: !35 = !DILocation(line: 18, column: 16, scope: !33) +// CHECK:STDOUT: !37 = !{null, !20} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DILocation(line: 17, column: 1, scope: !33) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !46) // 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: !45 = !DILocation(line: 32, column: 1, scope: !40) +// CHECK:STDOUT: !46 = !{!41} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon b/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon index 5c98e8c8af93..35a13e61bfe9 100644 --- a/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon +++ b/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon @@ -24,43 +24,42 @@ fn Main() { // CHECK:STDOUT: source_filename = "implicit_empty_tuple_as_arg.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CFoo.Main() #0 !dbg !21 { +// CHECK:STDOUT: define void @_CFoo.Main() #0 !dbg !18 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !22 +// CHECK:STDOUT: ret void, !dbg !19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CBar.Main() #0 !dbg !23 { +// CHECK:STDOUT: define void @_CBar.Main() #0 !dbg !20 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !28 +// CHECK:STDOUT: ret void, !dbg !25 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !29 { +// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !30 -// CHECK:STDOUT: %.loc19_23.1.temp = alloca {}, align 1, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !30 -// CHECK:STDOUT: call void @_CFoo.Main(), !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_23.1.temp), !dbg !31 -// CHECK:STDOUT: call void @_CBar.Main(), !dbg !32 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %.loc19_23.1.temp), !dbg !31 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %_.var), !dbg !30 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !27 +// CHECK:STDOUT: %.loc19_23.1.temp = alloca {}, align 1, !dbg !28 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !27 +// CHECK:STDOUT: call void @_CFoo.Main(), !dbg !28 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_23.1.temp), !dbg !28 +// CHECK:STDOUT: call void @_CBar.Main(), !dbg !29 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %.loc19_23.1.temp), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %_.var), !dbg !27 // CHECK:STDOUT: ret void, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1: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: 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 @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %t) #0 !dbg !35 { +// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9045abb8230cbcdf, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -70,24 +69,25 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !14 = !DIFile(filename: "implicit_empty_tuple_as_arg.carbon", directory: "") // CHECK:STDOUT: !15 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !14, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DISubroutineType(types: !16) -// CHECK:STDOUT: !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !19 = !{null, !18} -// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !14, line: 14, type: !17, spFlags: DISPFlagDefinition, unit: !15) -// CHECK:STDOUT: !22 = !DILocation(line: 14, column: 1, scope: !21) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Bar", linkageName: "_CBar.Main", scope: null, file: !14, line: 16, type: !17, spFlags: DISPFlagDefinition, unit: !15) -// CHECK:STDOUT: !28 = !DILocation(line: 16, column: 23, scope: !23) -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !14, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !15) -// CHECK:STDOUT: !30 = !DILocation(line: 19, column: 3, scope: !29) -// CHECK:STDOUT: !31 = !DILocation(line: 19, column: 19, scope: !29) -// CHECK:STDOUT: !32 = !DILocation(line: 19, column: 15, scope: !29) -// CHECK:STDOUT: !34 = !DILocation(line: 18, column: 1, scope: !29) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !14, line: 19, type: !20, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !38) -// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !18) -// CHECK:STDOUT: !37 = !DILocation(line: 19, column: 19, scope: !35) -// CHECK:STDOUT: !38 = !{!36} +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Foo", linkageName: "_CFoo.Main", scope: null, file: !14, line: 14, type: !17, spFlags: DISPFlagDefinition, unit: !15) +// CHECK:STDOUT: !19 = !DILocation(line: 14, column: 1, scope: !18) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Bar", linkageName: "_CBar.Main", scope: null, file: !14, line: 16, type: !17, spFlags: DISPFlagDefinition, unit: !15) +// CHECK:STDOUT: !25 = !DILocation(line: 16, column: 23, scope: !20) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !14, line: 18, type: !17, spFlags: DISPFlagDefinition, unit: !15) +// CHECK:STDOUT: !27 = !DILocation(line: 19, column: 3, scope: !26) +// CHECK:STDOUT: !28 = !DILocation(line: 19, column: 19, scope: !26) +// CHECK:STDOUT: !29 = !DILocation(line: 19, column: 15, scope: !26) +// CHECK:STDOUT: !31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !32 = !{null, !31} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 18, column: 1, scope: !26) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9045abb8230cbcdf", scope: null, file: !6, line: 32, type: !33, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !41) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !31) +// CHECK:STDOUT: !40 = !DILocation(line: 32, column: 1, scope: !35) +// CHECK:STDOUT: !41 = !{!36} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/ref_param.carbon b/toolchain/lower/testdata/function/call/ref_param.carbon index 92503fe217aa..f4f9eedc8546 100644 --- a/toolchain/lower/testdata/function/call/ref_param.carbon +++ b/toolchain/lower/testdata/function/call/ref_param.carbon @@ -34,19 +34,18 @@ fn Main() { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !31 // CHECK:STDOUT: store i32 0, ptr %a.var, align 4, !dbg !31 // CHECK:STDOUT: call void @_CDoNothing.Main(ptr %a.var), !dbg !35 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %a.var), !dbg !31 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %a.var), !dbg !31 // CHECK:STDOUT: ret void, !dbg !36 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !37 { +// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -55,6 +54,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "ref_param.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -70,8 +70,8 @@ fn Main() { // CHECK:STDOUT: !31 = !DILocation(line: 16, column: 3, scope: !30) // CHECK:STDOUT: !35 = !DILocation(line: 17, column: 3, scope: !30) // CHECK:STDOUT: !36 = !DILocation(line: 15, column: 1, scope: !30) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) // 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: !42 = !DILocation(line: 32, column: 1, scope: !37) +// CHECK:STDOUT: !43 = !{!38} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/ref_return.carbon b/toolchain/lower/testdata/function/call/ref_return.carbon index 4f9ea8f66db2..ac8bc10c00bd 100644 --- a/toolchain/lower/testdata/function/call/ref_return.carbon +++ b/toolchain/lower/testdata/function/call/ref_return.carbon @@ -24,32 +24,31 @@ fn Main() { // CHECK:STDOUT: source_filename = "ref_return.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CEcho.Main(ptr %x) #0 !dbg !28 { +// CHECK:STDOUT: define ptr @_CEcho.Main(ptr %x) #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %x, !dbg !34 +// CHECK:STDOUT: ret ptr %x, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !36 { +// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !34 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !37 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !37 -// CHECK:STDOUT: store i32 0, ptr %a.var, align 4, !dbg !37 -// CHECK:STDOUT: %Echo.call = call ptr @_CEcho.Main(ptr %a.var), !dbg !41 -// CHECK:STDOUT: store i32 1, ptr %Echo.call, align 4, !dbg !41 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %a.var), !dbg !37 +// CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !35 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !35 +// CHECK:STDOUT: store i32 0, ptr %a.var, align 4, !dbg !35 +// CHECK:STDOUT: %Echo.call = call ptr @_CEcho.Main(ptr %a.var), !dbg !39 +// CHECK:STDOUT: store i32 1, ptr %Echo.call, align 4, !dbg !39 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %a.var), !dbg !35 // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !43 { +// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -58,6 +57,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "ref_return.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -66,18 +66,18 @@ fn Main() { // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !35) -// CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !20) -// CHECK:STDOUT: !34 = !DILocation(line: 14, column: 3, scope: !28) -// CHECK:STDOUT: !35 = !{!29} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !18, line: 17, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !37 = !DILocation(line: 18, column: 3, scope: !36) -// CHECK:STDOUT: !41 = !DILocation(line: 19, column: 3, scope: !36) -// CHECK:STDOUT: !42 = !DILocation(line: 17, column: 1, scope: !36) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !46) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Echo", linkageName: "_CEcho.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !33) +// CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !20) +// CHECK:STDOUT: !32 = !DILocation(line: 14, column: 3, scope: !26) +// CHECK:STDOUT: !33 = !{!27} +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !18, line: 17, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !35 = !DILocation(line: 18, column: 3, scope: !34) +// CHECK:STDOUT: !39 = !DILocation(line: 19, column: 3, scope: !34) +// CHECK:STDOUT: !40 = !{null, !20} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !42 = !DILocation(line: 17, column: 1, scope: !34) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) // 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: !48 = !DILocation(line: 32, column: 1, scope: !43) +// CHECK:STDOUT: !49 = !{!44} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/return_implicit.carbon b/toolchain/lower/testdata/function/call/return_implicit.carbon index 500e267ace80..dbea3f4a5036 100644 --- a/toolchain/lower/testdata/function/call/return_implicit.carbon +++ b/toolchain/lower/testdata/function/call/return_implicit.carbon @@ -23,30 +23,29 @@ fn Main() { // CHECK:STDOUT: source_filename = "return_implicit.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMakeImplicitEmptyTuple.Main() #0 !dbg !21 { +// CHECK:STDOUT: define void @_CMakeImplicitEmptyTuple.Main() #0 !dbg !18 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !22 +// CHECK:STDOUT: ret void, !dbg !19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !23 { +// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !20 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !24 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !24 -// CHECK:STDOUT: call void @_CMakeImplicitEmptyTuple.Main(), !dbg !25 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %_.var), !dbg !24 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !21 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !21 +// CHECK:STDOUT: call void @_CMakeImplicitEmptyTuple.Main(), !dbg !22 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %_.var), !dbg !21 // CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !28 { -// CHECK:STDOUT: entry: -// 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: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %t) #0 !dbg !28 { +// CHECK:STDOUT: ret void, !dbg !33 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -55,21 +54,22 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !14 = !DIFile(filename: "return_implicit.carbon", directory: "") // CHECK:STDOUT: !15 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !14, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DISubroutineType(types: !16) -// CHECK:STDOUT: !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !19 = !{null, !18} -// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "MakeImplicitEmptyTuple", linkageName: "_CMakeImplicitEmptyTuple.Main", scope: null, file: !14, line: 14, type: !17, spFlags: DISPFlagDefinition, unit: !15) -// CHECK:STDOUT: !22 = !DILocation(line: 14, column: 1, scope: !21) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !14, line: 17, type: !17, spFlags: DISPFlagDefinition, unit: !15) -// CHECK:STDOUT: !24 = !DILocation(line: 18, column: 3, scope: !23) -// CHECK:STDOUT: !25 = !DILocation(line: 18, column: 15, scope: !23) -// CHECK:STDOUT: !27 = !DILocation(line: 17, column: 1, scope: !23) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !14, line: 18, type: !20, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !31) -// CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !18) -// CHECK:STDOUT: !30 = !DILocation(line: 18, column: 3, scope: !28) -// CHECK:STDOUT: !31 = !{!29} +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "MakeImplicitEmptyTuple", linkageName: "_CMakeImplicitEmptyTuple.Main", scope: null, file: !14, line: 14, type: !17, spFlags: DISPFlagDefinition, unit: !15) +// CHECK:STDOUT: !19 = !DILocation(line: 14, column: 1, scope: !18) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !14, line: 17, type: !17, spFlags: DISPFlagDefinition, unit: !15) +// CHECK:STDOUT: !21 = !DILocation(line: 18, column: 3, scope: !20) +// CHECK:STDOUT: !22 = !DILocation(line: 18, column: 15, scope: !20) +// CHECK:STDOUT: !24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !25 = !{null, !24} +// CHECK:STDOUT: !26 = !DISubroutineType(types: !25) +// CHECK:STDOUT: !27 = !DILocation(line: 17, column: 1, scope: !20) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9045abb8230cbcdf", scope: null, file: !6, line: 32, type: !26, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !34) +// CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !24) +// CHECK:STDOUT: !33 = !DILocation(line: 32, column: 1, scope: !28) +// CHECK:STDOUT: !34 = !{!29} // 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 3c7d8817c461..efc6bd44126f 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 @@ -25,60 +25,61 @@ fn Main() { // CHECK:STDOUT: @tuple.05e.loc18_20.6 = internal constant { i32, i32 } { i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32, i32 }) %return, { i32 } %b, ptr %c) #0 !dbg !30 { +// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32, i32 }) %return, { i32 } %b, ptr %c) #0 !dbg !28 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.loc14_12.tuple.elem = extractvalue { i32 } %b, 0, !dbg !38 -// CHECK:STDOUT: %tuple.elem0.loc14_17.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %c, i32 0, i32 0, !dbg !39 -// CHECK:STDOUT: %tuple.elem0.loc14_17.tuple.elem.load = load i32, ptr %tuple.elem0.loc14_17.tuple.elem, align 4, !dbg !39 -// CHECK:STDOUT: %tuple.elem1.loc14_22.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %c, i32 0, i32 1, !dbg !40 -// CHECK:STDOUT: %tuple.elem1.loc14_22.tuple.elem.load = load i32, ptr %tuple.elem1.loc14_22.tuple.elem, align 4, !dbg !40 -// CHECK:STDOUT: %tuple.elem0.loc14_24.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !41 -// CHECK:STDOUT: store i32 %tuple.elem0.loc14_12.tuple.elem, ptr %tuple.elem0.loc14_24.tuple.elem, align 4, !dbg !41 -// CHECK:STDOUT: %tuple.elem1.loc14_24.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !41 -// CHECK:STDOUT: store i32 %tuple.elem0.loc14_17.tuple.elem.load, ptr %tuple.elem1.loc14_24.tuple.elem, align 4, !dbg !41 -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !41 -// CHECK:STDOUT: store i32 %tuple.elem1.loc14_22.tuple.elem.load, ptr %tuple.elem2.tuple.elem, align 4, !dbg !41 -// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: %tuple.elem0.loc14_12.tuple.elem = extractvalue { i32 } %b, 0, !dbg !36 +// CHECK:STDOUT: %tuple.elem0.loc14_17.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %c, i32 0, i32 0, !dbg !37 +// CHECK:STDOUT: %tuple.elem0.loc14_17.tuple.elem.load = load i32, ptr %tuple.elem0.loc14_17.tuple.elem, align 4, !dbg !37 +// CHECK:STDOUT: %tuple.elem1.loc14_22.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %c, i32 0, i32 1, !dbg !38 +// CHECK:STDOUT: %tuple.elem1.loc14_22.tuple.elem.load = load i32, ptr %tuple.elem1.loc14_22.tuple.elem, align 4, !dbg !38 +// CHECK:STDOUT: %tuple.elem0.loc14_24.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !39 +// CHECK:STDOUT: store i32 %tuple.elem0.loc14_12.tuple.elem, ptr %tuple.elem0.loc14_24.tuple.elem, align 4, !dbg !39 +// CHECK:STDOUT: %tuple.elem1.loc14_24.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !39 +// CHECK:STDOUT: store i32 %tuple.elem0.loc14_17.tuple.elem.load, ptr %tuple.elem1.loc14_24.tuple.elem, align 4, !dbg !39 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !39 +// CHECK:STDOUT: store i32 %tuple.elem1.loc14_22.tuple.elem.load, ptr %tuple.elem2.tuple.elem, align 4, !dbg !39 +// CHECK:STDOUT: ret void, !dbg !40 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !44 { +// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_21.1.temp = alloca { i32, i32, i32 }, align 4, !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_21.1.temp), !dbg !45 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc18_21.1.temp, { i32 } { i32 1 }, ptr @tuple.05e.loc18_20.6), !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %.loc18_21.1.temp), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !46 +// CHECK:STDOUT: %.loc18_21.1.temp = alloca { i32, i32, i32 }, align 4, !dbg !43 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_21.1.temp), !dbg !43 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc18_21.1.temp, { i32 } { i32 1 }, ptr @tuple.05e.loc18_20.6), !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %.loc18_21.1.temp), !dbg !43 +// CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: define weak_odr void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !49 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !53 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !53 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !53 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !55 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self), !dbg !57 -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem2.tuple.elem), !dbg !47 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !47 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !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: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %t) #0 !dbg !51 { +// CHECK:STDOUT: call void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %t), !dbg !55 +// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !58 { +// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -87,6 +88,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "tuple_param_with_return_slot.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -95,32 +97,33 @@ fn Main() { // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !26 = !{null, !21} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !21} -// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) -// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !21) -// CHECK:STDOUT: !32 = !DILocalVariable(arg: 2, scope: !30, type: !21) -// CHECK:STDOUT: !38 = !DILocation(line: 14, column: 11, scope: !30) -// CHECK:STDOUT: !39 = !DILocation(line: 14, column: 16, scope: !30) -// CHECK:STDOUT: !40 = !DILocation(line: 14, column: 21, scope: !30) -// CHECK:STDOUT: !41 = !DILocation(line: 14, column: 10, scope: !30) -// CHECK:STDOUT: !42 = !DILocation(line: 14, column: 3, scope: !30) -// CHECK:STDOUT: !43 = !{!31, !32} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !18, line: 17, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !45 = !DILocation(line: 18, column: 3, scope: !44) -// CHECK:STDOUT: !46 = !DILocation(line: 17, column: 1, scope: !44) -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946: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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core", scope: null, file: !18, line: 18, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) +// CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !21) +// CHECK:STDOUT: !30 = !DILocalVariable(arg: 2, scope: !28, type: !21) +// CHECK:STDOUT: !36 = !DILocation(line: 14, column: 11, scope: !28) +// CHECK:STDOUT: !37 = !DILocation(line: 14, column: 16, scope: !28) +// CHECK:STDOUT: !38 = !DILocation(line: 14, column: 21, scope: !28) +// CHECK:STDOUT: !39 = !DILocation(line: 14, column: 10, scope: !28) +// CHECK:STDOUT: !40 = !DILocation(line: 14, column: 3, scope: !28) +// CHECK:STDOUT: !41 = !{!29, !30} +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !18, line: 17, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !43 = !DILocation(line: 18, column: 3, scope: !42) +// CHECK:STDOUT: !44 = !DILocation(line: 17, column: 1, scope: !42) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.abce894028f59bc0:core.SubobjectDestroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !50) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !21) +// CHECK:STDOUT: !47 = !DILocation(line: 18, column: 3, scope: !45) +// CHECK:STDOUT: !48 = !{null, !20} +// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) +// CHECK:STDOUT: !50 = !{!46} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6e65c86a129b7677", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !21) -// CHECK:STDOUT: !53 = !DILocation(line: 18, column: 3, scope: !51) -// CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.abce894028f59bc0: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: !55 = !DILocation(line: 34, column: 5, scope: !51) +// CHECK:STDOUT: !56 = !DILocation(line: 32, column: 1, scope: !51) +// CHECK:STDOUT: !57 = !{!52} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !49, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !20) +// CHECK:STDOUT: !63 = !DILocation(line: 32, column: 1, scope: !58) +// CHECK:STDOUT: !64 = !{!59} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/var_param.carbon b/toolchain/lower/testdata/function/call/var_param.carbon index 79e5f2eda0a9..44494ff6972a 100644 --- a/toolchain/lower/testdata/function/call/var_param.carbon +++ b/toolchain/lower/testdata/function/call/var_param.carbon @@ -35,19 +35,18 @@ fn Main() { // CHECK:STDOUT: store i32 0, ptr %a.var, align 4, !dbg !31 // CHECK:STDOUT: %.loc17 = load i32, ptr %a.var, align 4, !dbg !33 // CHECK:STDOUT: call void @_CDoNothing.Main(i32 %.loc17), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %a.var), !dbg !31 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %a.var), !dbg !31 // CHECK:STDOUT: ret void, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !36 { +// CHECK:STDOUT: ret void, !dbg !41 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -56,6 +55,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "var_param.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -72,8 +72,8 @@ fn Main() { // CHECK:STDOUT: !33 = !DILocation(line: 17, column: 13, scope: !30) // CHECK:STDOUT: !34 = !DILocation(line: 17, column: 3, scope: !30) // CHECK:STDOUT: !35 = !DILocation(line: 15, column: 1, scope: !30) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !42) // 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: !41 = !DILocation(line: 32, column: 1, scope: !36) +// CHECK:STDOUT: !42 = !{!37} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/definition/deduced_return.carbon b/toolchain/lower/testdata/function/definition/deduced_return.carbon index fbec2481c0f4..64f79a92dbf4 100644 --- a/toolchain/lower/testdata/function/definition/deduced_return.carbon +++ b/toolchain/lower/testdata/function/definition/deduced_return.carbon @@ -42,94 +42,86 @@ fn Use() -> i32 { // CHECK:STDOUT: @C.val.7af.loc27_12 = internal constant { i32, i32 } { i32 3, i32 4 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CCopy.Main() #0 !dbg !46 { +// CHECK:STDOUT: define i32 @_CCopy.Main() #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 1, !dbg !48 +// CHECK:STDOUT: ret i32 1, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInPlace.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !49 { +// CHECK:STDOUT: define void @_CInPlace.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc23_25.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !50 -// CHECK:STDOUT: %.loc23_25.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !50 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @C.val.32e.loc23_31, i64 8, i1 false), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: %.loc23_25.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !48 +// CHECK:STDOUT: %.loc23_25.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !48 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @C.val.32e.loc23_31, i64 8, i1 false), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CReturnedVar.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !52 { +// CHECK:STDOUT: define void @_CReturnedVar.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !50 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc27_38.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !54 -// CHECK:STDOUT: %.loc27_38.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !54 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @C.val.7af.loc27_12, i64 8, i1 false), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: %.loc27_38.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !52 +// CHECK:STDOUT: %.loc27_38.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !52 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @C.val.7af.loc27_12, i64 8, i1 false), !dbg !53 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CUse.Main() #0 !dbg !59 { +// CHECK:STDOUT: define i32 @_CUse.Main() #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc32_29.1.temp = alloca { i32, i32 }, align 4, !dbg !62 -// CHECK:STDOUT: %.loc33_33.1.temp = alloca { i32, i32 }, align 4, !dbg !65 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc32_29.1.temp), !dbg !62 -// CHECK:STDOUT: call void @_CInPlace.Main(ptr %.loc32_29.1.temp), !dbg !62 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc33_33.1.temp), !dbg !65 -// CHECK:STDOUT: call void @_CReturnedVar.Main(ptr %.loc33_33.1.temp), !dbg !65 -// CHECK:STDOUT: %Copy.call = call i32 @_CCopy.Main(), !dbg !68 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc33_33.1.temp), !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc32_29.1.temp), !dbg !62 -// CHECK:STDOUT: ret i32 %Copy.call, !dbg !69 +// CHECK:STDOUT: %.loc32_29.1.temp = alloca { i32, i32 }, align 4, !dbg !60 +// CHECK:STDOUT: %.loc33_33.1.temp = alloca { i32, i32 }, align 4, !dbg !63 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc32_29.1.temp), !dbg !60 +// CHECK:STDOUT: call void @_CInPlace.Main(ptr %.loc32_29.1.temp), !dbg !60 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc33_33.1.temp), !dbg !63 +// CHECK:STDOUT: call void @_CReturnedVar.Main(ptr %.loc33_33.1.temp), !dbg !63 +// CHECK:STDOUT: %Copy.call = call i32 @_CCopy.Main(), !dbg !66 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %.loc33_33.1.temp), !dbg !63 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %.loc32_29.1.temp), !dbg !60 +// CHECK:STDOUT: ret i32 %Copy.call, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !70 { +// CHECK:STDOUT: define weak_odr void @"_COp.2508ed710019eba8:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !72 +// CHECK:STDOUT: %.loc33_33.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !70 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc33_33.1.b), !dbg !70 +// CHECK:STDOUT: %.loc33_33.4.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !70 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc33_33.4.a), !dbg !70 +// CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !74 { +// CHECK:STDOUT: define weak_odr void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !74 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc33_33.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !76 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc33_33.1.b), !dbg !76 -// CHECK:STDOUT: %.loc33_33.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !76 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc33_33.2.a), !dbg !76 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc33_33.1.b), !dbg !76 +// CHECK:STDOUT: %.loc33_33.4.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !76 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc33_33.4.a), !dbg !76 // CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !78 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2508ed710019eba8: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.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !82 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc33_33.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !84 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc33_33.1.b), !dbg !84 -// CHECK:STDOUT: %.loc33_33.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !84 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc33_33.2.a), !dbg !84 -// 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: call void @"_CSubobjectDestroy.08d9e38b928ba575: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.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // 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 @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !78 { +// CHECK:STDOUT: call void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %t), !dbg !82 +// CHECK:STDOUT: ret void, !dbg !83 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !85 { +// CHECK:STDOUT: ret void, !dbg !90 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.356af3b6aef18564, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -139,6 +131,7 @@ fn Use() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "deduced_return.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -147,42 +140,39 @@ fn Use() -> i32 { // CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !40 = !{!39} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !{null, !36} +// CHECK:STDOUT: !42 = !{null, !39} // CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = !{null, !39} -// CHECK:STDOUT: !45 = !DISubroutineType(types: !44) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.Main", scope: null, file: !34, line: 18, type: !38, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !48 = !DILocation(line: 19, column: 3, scope: !46) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "InPlace", linkageName: "_CInPlace.Main", scope: null, file: !34, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !50 = !DILocation(line: 23, column: 10, scope: !49) -// CHECK:STDOUT: !51 = !DILocation(line: 23, column: 3, scope: !49) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "ReturnedVar", linkageName: "_CReturnedVar.Main", scope: null, file: !34, line: 26, type: !41, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !54 = !DILocation(line: 27, column: 23, scope: !52) -// CHECK:STDOUT: !55 = !DILocation(line: 27, column: 12, scope: !52) -// CHECK:STDOUT: !58 = !DILocation(line: 28, column: 3, scope: !52) -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !34, line: 31, type: !38, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !62 = !DILocation(line: 32, column: 21, scope: !59) -// CHECK:STDOUT: !65 = !DILocation(line: 33, column: 21, scope: !59) -// CHECK:STDOUT: !68 = !DILocation(line: 34, column: 10, scope: !59) -// CHECK:STDOUT: !69 = !DILocation(line: 34, column: 3, scope: !59) -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !34, line: 33, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !73) -// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !36) -// CHECK:STDOUT: !72 = !DILocation(line: 33, column: 21, scope: !70) -// CHECK:STDOUT: !73 = !{!71} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core", scope: null, file: !34, line: 33, type: !45, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !77) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.Main", scope: null, file: !34, line: 18, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !46 = !DILocation(line: 19, column: 3, scope: !44) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "InPlace", linkageName: "_CInPlace.Main", scope: null, file: !34, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !48 = !DILocation(line: 23, column: 10, scope: !47) +// CHECK:STDOUT: !49 = !DILocation(line: 23, column: 3, scope: !47) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "ReturnedVar", linkageName: "_CReturnedVar.Main", scope: null, file: !34, line: 26, type: !41, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !52 = !DILocation(line: 27, column: 23, scope: !50) +// CHECK:STDOUT: !53 = !DILocation(line: 27, column: 12, scope: !50) +// CHECK:STDOUT: !56 = !DILocation(line: 28, column: 3, scope: !50) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !34, line: 31, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !60 = !DILocation(line: 32, column: 21, scope: !57) +// CHECK:STDOUT: !63 = !DILocation(line: 33, column: 21, scope: !57) +// CHECK:STDOUT: !66 = !DILocation(line: 34, column: 10, scope: !57) +// CHECK:STDOUT: !67 = !DILocation(line: 34, column: 3, scope: !57) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2508ed710019eba8:core.SubobjectDestroy.Core", scope: null, file: !34, line: 33, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !73) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !39) +// CHECK:STDOUT: !70 = !DILocation(line: 33, column: 21, scope: !68) +// CHECK:STDOUT: !71 = !{null, !36} +// CHECK:STDOUT: !72 = !DISubroutineType(types: !71) +// CHECK:STDOUT: !73 = !{!69} +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "Op", linkageName: "_COp.08d9e38b928ba575:core.SubobjectDestroy.Core", scope: null, file: !34, line: 33, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !77) // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !39) // CHECK:STDOUT: !76 = !DILocation(line: 33, column: 21, scope: !74) // CHECK:STDOUT: !77 = !{!75} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2508ed710019eba8:core.Destroy.Core", scope: null, file: !34, line: 33, type: !45, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !81) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !26, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !84) // CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !39) -// CHECK:STDOUT: !80 = !DILocation(line: 33, column: 21, scope: !78) -// CHECK:STDOUT: !81 = !{!79} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !34, line: 33, type: !45, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !85) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !39) -// CHECK:STDOUT: !84 = !DILocation(line: 33, column: 21, scope: !82) -// CHECK:STDOUT: !85 = !{!83} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !34, line: 33, type: !45, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !89) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !39) -// CHECK:STDOUT: !88 = !DILocation(line: 33, column: 21, scope: !86) -// CHECK:STDOUT: !89 = !{!87} +// CHECK:STDOUT: !82 = !DILocation(line: 34, column: 5, scope: !78) +// CHECK:STDOUT: !83 = !DILocation(line: 32, column: 1, scope: !78) +// CHECK:STDOUT: !84 = !{!79} +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 32, type: !72, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !91) +// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !36) +// CHECK:STDOUT: !90 = !DILocation(line: 32, column: 1, scope: !85) +// CHECK:STDOUT: !91 = !{!86} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/definition/destroy.carbon b/toolchain/lower/testdata/function/definition/destroy.carbon index 8e60f386794e..0fe2e963c613 100644 --- a/toolchain/lower/testdata/function/definition/destroy.carbon +++ b/toolchain/lower/testdata/function/definition/destroy.carbon @@ -89,26 +89,19 @@ fn InitLet() { // CHECK:STDOUT: %.loc12_6.2.temp = alloca {}, align 1, !dbg !27 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_6.2.temp), !dbg !27 // CHECK:STDOUT: call void @_CF.Main(ptr @C.val.loc12_6.6), !dbg !28 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr @C.val), !dbg !27 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr @C.val), !dbg !27 // CHECK:STDOUT: call void @_CG.Main(), !dbg !29 // CHECK:STDOUT: ret void, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99: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.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: 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 @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !31 { +// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -117,6 +110,7 @@ fn InitLet() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !14 = !DIFile(filename: "let_param.carbon", directory: "") // CHECK:STDOUT: !15 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !14, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -133,51 +127,35 @@ fn InitLet() { // CHECK:STDOUT: !28 = !DILocation(line: 12, column: 3, scope: !26) // CHECK:STDOUT: !29 = !DILocation(line: 13, column: 3, scope: !26) // CHECK:STDOUT: !30 = !DILocation(line: 11, column: 1, scope: !26) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !14, line: 12, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !34) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !6, line: 32, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !37) // 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: "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: !36 = !DILocation(line: 32, column: 1, scope: !31) +// CHECK:STDOUT: !37 = !{!32} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'var_param.carbon' // CHECK:STDOUT: source_filename = "var_param.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @C.val.loc6 = internal constant {} zeroinitializer +// CHECK:STDOUT: @C.val.loc6_6.1 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main(ptr %_) #0 !dbg !41 { +// CHECK:STDOUT: define void @_CF.Main(ptr %_) #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !45 +// CHECK:STDOUT: ret void, !dbg !44 // 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 !47 { +// CHECK:STDOUT: define void @_CCallF.Main() #0 !dbg !46 { // CHECK:STDOUT: entry: -// 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 !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: %_.var = alloca {}, align 1, !dbg !47 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !47 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var, ptr align 1 @C.val.loc6_6.1, i64 0, i1 false), !dbg !47 +// CHECK:STDOUT: call void @_CF.Main(ptr %_.var), !dbg !48 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %_.var), !dbg !47 +// CHECK:STDOUT: call void @_CG.Main(), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -186,38 +164,40 @@ fn InitLet() { // 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 @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !51 { +// CHECK:STDOUT: ret void, !dbg !56 +// 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 = !{!40} +// CHECK:STDOUT: !llvm.dbg.cu = !{!39} // 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: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !17 = !{null, !16} // CHECK:STDOUT: !18 = !DISubroutineType(types: !17) // CHECK:STDOUT: !19 = !{null} // CHECK:STDOUT: !20 = !DISubroutineType(types: !19) -// 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: !38 = !DIFile(filename: "var_param.carbon", directory: "") +// CHECK:STDOUT: !39 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !38, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !38, line: 6, type: !18, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !45) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !16) +// CHECK:STDOUT: !44 = !DILocation(line: 6, column: 1, scope: !40) +// CHECK:STDOUT: !45 = !{!41} +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !38, line: 11, type: !20, spFlags: DISPFlagDefinition, unit: !39) +// CHECK:STDOUT: !47 = !DILocation(line: 6, column: 6, scope: !46) +// CHECK:STDOUT: !48 = !DILocation(line: 12, column: 3, scope: !46) +// CHECK:STDOUT: !49 = !DILocation(line: 13, column: 3, scope: !46) +// CHECK:STDOUT: !50 = !DILocation(line: 11, column: 1, scope: !46) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !6, line: 32, type: !18, spFlags: DISPFlagDefinition, unit: !39, retainedNodes: !57) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !16) +// CHECK:STDOUT: !56 = !DILocation(line: 32, column: 1, scope: !51) +// CHECK:STDOUT: !57 = !{!52} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'return_slot.carbon' @@ -226,53 +206,41 @@ 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 !64 { +// CHECK:STDOUT: define void @_CF.Main(ptr sret({}) %return) #0 !dbg !62 { // 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 !67 -// CHECK:STDOUT: ret void, !dbg !67 +// 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 !65 +// CHECK:STDOUT: ret void, !dbg !65 // 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 !68 { +// CHECK:STDOUT: define void @_CForward.Main(ptr sret({}) %return) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main(ptr %return), !dbg !71 -// CHECK:STDOUT: ret void, !dbg !72 +// CHECK:STDOUT: call void @_CF.Main(ptr %return), !dbg !69 +// CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitVar.Main() #0 !dbg !73 { +// CHECK:STDOUT: define void @_CInitVar.Main() #0 !dbg !71 { // CHECK:STDOUT: entry: -// 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: %_.var = alloca {}, align 1, !dbg !72 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !72 +// CHECK:STDOUT: call void @_CF.Main(ptr %_.var), !dbg !73 +// CHECK:STDOUT: call void @_CG.Main(), !dbg !75 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %_.var), !dbg !72 +// CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !79 { +// CHECK:STDOUT: define void @_CInitLet.Main() #0 !dbg !77 { // 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.08d9e38b928ba575: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 void @_CInitLet.Main() #0 !dbg !87 { -// CHECK:STDOUT: entry: -// 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: %.loc22_16.1.temp = alloca {}, align 1, !dbg !78 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_16.1.temp), !dbg !78 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc22_16.1.temp), !dbg !78 +// CHECK:STDOUT: call void @_CG.Main(), !dbg !81 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %.loc22_16.1.temp), !dbg !78 +// CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -281,46 +249,49 @@ fn InitLet() { // 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 @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !83 { +// CHECK:STDOUT: ret void, !dbg !88 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.356af3b6aef18564, { 1, 0 } // 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 = !{!61} +// CHECK:STDOUT: !llvm.dbg.cu = !{!59} // 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: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !17 = !{null, !16} // CHECK:STDOUT: !18 = !DISubroutineType(types: !17) // CHECK:STDOUT: !19 = !{null} // CHECK:STDOUT: !20 = !DISubroutineType(types: !19) -// 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: !58 = !DIFile(filename: "return_slot.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 = !{!16} +// CHECK:STDOUT: !61 = !DISubroutineType(types: !60) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !58, line: 6, type: !61, spFlags: DISPFlagDefinition, unit: !59) +// CHECK:STDOUT: !65 = !DILocation(line: 7, column: 3, scope: !62) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Forward", linkageName: "_CForward.Main", scope: null, file: !58, line: 12, type: !61, spFlags: DISPFlagDefinition, unit: !59) +// CHECK:STDOUT: !69 = !DILocation(line: 13, column: 10, scope: !66) +// CHECK:STDOUT: !70 = !DILocation(line: 13, column: 3, scope: !66) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "InitVar", linkageName: "_CInitVar.Main", scope: null, file: !58, line: 16, type: !20, spFlags: DISPFlagDefinition, unit: !59) +// CHECK:STDOUT: !72 = !DILocation(line: 17, column: 3, scope: !71) +// CHECK:STDOUT: !73 = !DILocation(line: 17, column: 14, scope: !71) +// CHECK:STDOUT: !75 = !DILocation(line: 18, column: 3, scope: !71) +// CHECK:STDOUT: !76 = !DILocation(line: 16, column: 1, scope: !71) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "InitLet", linkageName: "_CInitLet.Main", scope: null, file: !58, line: 21, type: !20, spFlags: DISPFlagDefinition, unit: !59) +// CHECK:STDOUT: !78 = !DILocation(line: 22, column: 14, scope: !77) +// CHECK:STDOUT: !81 = !DILocation(line: 23, column: 3, scope: !77) +// CHECK:STDOUT: !82 = !DILocation(line: 21, column: 1, scope: !77) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !6, line: 32, type: !18, spFlags: DISPFlagDefinition, unit: !59, retainedNodes: !89) // 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: !88 = !DILocation(line: 32, column: 1, scope: !83) +// CHECK:STDOUT: !89 = !{!84} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/definition/terse.carbon b/toolchain/lower/testdata/function/definition/terse.carbon index aa7afe5e9e64..8701e9aec9ce 100644 --- a/toolchain/lower/testdata/function/definition/terse.carbon +++ b/toolchain/lower/testdata/function/definition/terse.carbon @@ -69,91 +69,90 @@ fn Test(c: C) -> i32 { // CHECK:STDOUT: source_filename = "main.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CLocalId.Main(i32 %x) #0 !dbg !41 { +// CHECK:STDOUT: define i32 @_CLocalId.Main(i32 %x) #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !44 +// CHECK:STDOUT: ret i32 %x, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CUnit.Main() #0 !dbg !46 { +// CHECK:STDOUT: define void @_CUnit.Main() #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: ret void, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMakePair.Main(ptr sret({ i32, i32 }) %return, i32 %x, i32 %y) #0 !dbg !48 { +// CHECK:STDOUT: define void @_CMakePair.Main(ptr sret({ i32, i32 }) %return, i32 %x, i32 %y) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_47.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: store i32 %x, ptr %.loc9_47.3.a, align 4, !dbg !53 -// CHECK:STDOUT: %.loc9_47.5.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !53 -// CHECK:STDOUT: store i32 %y, ptr %.loc9_47.5.b, align 4, !dbg !53 -// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: %.loc9_47.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !51 +// CHECK:STDOUT: store i32 %x, ptr %.loc9_47.3.a, align 4, !dbg !51 +// CHECK:STDOUT: %.loc9_47.5.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !51 +// CHECK:STDOUT: store i32 %y, ptr %.loc9_47.5.b, align 4, !dbg !51 +// CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CGet.C.Main(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define i32 @_CGet.C.Main(ptr %self) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12_29.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !60 -// CHECK:STDOUT: %.loc12_29.2 = load i32, ptr %.loc12_29.1.x, align 4, !dbg !60 -// CHECK:STDOUT: ret i32 %.loc12_29.2, !dbg !60 +// CHECK:STDOUT: %.loc12_29.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !58 +// CHECK:STDOUT: %.loc12_29.2 = load i32, ptr %.loc12_29.1.x, align 4, !dbg !58 +// CHECK:STDOUT: ret i32 %.loc12_29.2, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTest.Main(ptr %c) #0 !dbg !62 { +// CHECK:STDOUT: define i32 @_CTest.Main(ptr %c) #0 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_71.1.temp = alloca { i32, i32 }, align 4, !dbg !71 -// CHECK:STDOUT: %struct = alloca { i32, i32 }, align 4, !dbg !71 -// CHECK:STDOUT: call void @_CUnit.Main(), !dbg !67 -// CHECK:STDOUT: %C.Get.call = call i32 @_CGet.C.Main(ptr %c), !dbg !68 -// CHECK:STDOUT: %ImportedId.call = call i32 @_CImportedId.Main(i32 %C.Get.call), !dbg !69 -// CHECK:STDOUT: %LocalId.call = call i32 @_CLocalId.Main(i32 2), !dbg !70 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_71.1.temp), !dbg !71 -// CHECK:STDOUT: call void @_CMakePair.Main(ptr %.loc18_71.1.temp, i32 %ImportedId.call, i32 %LocalId.call), !dbg !71 -// CHECK:STDOUT: %.loc18_71.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %.loc18_71.1.temp, i32 0, i32 0, !dbg !71 -// CHECK:STDOUT: %.loc18_71.4 = load i32, ptr %.loc18_71.3.a, align 4, !dbg !71 -// CHECK:STDOUT: %.loc18_71.5.b = getelementptr inbounds nuw { i32, i32 }, ptr %.loc18_71.1.temp, i32 0, i32 1, !dbg !71 -// CHECK:STDOUT: %.loc18_71.6 = load i32, ptr %.loc18_71.5.b, align 4, !dbg !71 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %struct), !dbg !71 -// CHECK:STDOUT: %struct1 = getelementptr inbounds nuw { i32, i32 }, ptr %struct, i32 0, i32 0, !dbg !71 -// CHECK:STDOUT: store i32 %.loc18_71.4, ptr %struct1, align 4, !dbg !71 -// CHECK:STDOUT: %struct2 = getelementptr inbounds nuw { i32, i32 }, ptr %struct, i32 0, i32 1, !dbg !71 -// CHECK:STDOUT: store i32 %.loc18_71.6, ptr %struct2, align 4, !dbg !71 -// CHECK:STDOUT: %.loc19.a = getelementptr inbounds nuw { i32, i32 }, ptr %struct, i32 0, i32 0, !dbg !74 -// CHECK:STDOUT: %.loc19.a.load = load i32, ptr %.loc19.a, align 4, !dbg !74 -// CHECK:STDOUT: call void @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core"(ptr %.loc18_71.1.temp), !dbg !71 -// CHECK:STDOUT: ret i32 %.loc19.a.load, !dbg !75 +// CHECK:STDOUT: %.loc18_71.1.temp = alloca { i32, i32 }, align 4, !dbg !69 +// CHECK:STDOUT: %struct = alloca { i32, i32 }, align 4, !dbg !69 +// CHECK:STDOUT: call void @_CUnit.Main(), !dbg !65 +// CHECK:STDOUT: %C.Get.call = call i32 @_CGet.C.Main(ptr %c), !dbg !66 +// CHECK:STDOUT: %ImportedId.call = call i32 @_CImportedId.Main(i32 %C.Get.call), !dbg !67 +// CHECK:STDOUT: %LocalId.call = call i32 @_CLocalId.Main(i32 2), !dbg !68 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_71.1.temp), !dbg !69 +// CHECK:STDOUT: call void @_CMakePair.Main(ptr %.loc18_71.1.temp, i32 %ImportedId.call, i32 %LocalId.call), !dbg !69 +// CHECK:STDOUT: %.loc18_71.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %.loc18_71.1.temp, i32 0, i32 0, !dbg !69 +// CHECK:STDOUT: %.loc18_71.4 = load i32, ptr %.loc18_71.3.a, align 4, !dbg !69 +// CHECK:STDOUT: %.loc18_71.5.b = getelementptr inbounds nuw { i32, i32 }, ptr %.loc18_71.1.temp, i32 0, i32 1, !dbg !69 +// CHECK:STDOUT: %.loc18_71.6 = load i32, ptr %.loc18_71.5.b, align 4, !dbg !69 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %struct), !dbg !69 +// CHECK:STDOUT: %struct1 = getelementptr inbounds nuw { i32, i32 }, ptr %struct, i32 0, i32 0, !dbg !69 +// CHECK:STDOUT: store i32 %.loc18_71.4, ptr %struct1, align 4, !dbg !69 +// CHECK:STDOUT: %struct2 = getelementptr inbounds nuw { i32, i32 }, ptr %struct, i32 0, i32 1, !dbg !69 +// CHECK:STDOUT: store i32 %.loc18_71.6, ptr %struct2, align 4, !dbg !69 +// CHECK:STDOUT: %.loc19.a = getelementptr inbounds nuw { i32, i32 }, ptr %struct, i32 0, i32 0, !dbg !72 +// CHECK:STDOUT: %.loc19.a.load = load i32, ptr %.loc19.a, align 4, !dbg !72 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ad01ed096e1f14e2(ptr %.loc18_71.1.temp), !dbg !69 +// CHECK:STDOUT: ret i32 %.loc19.a.load, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @_CImportedId.Main(i32) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !77 { +// CHECK:STDOUT: define weak_odr void @"_COp.2508ed710019eba8:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !79 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !81 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_71.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !83 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_71.1.b), !dbg !83 -// CHECK:STDOUT: %.loc18_71.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !83 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18_71.2.a), !dbg !83 -// CHECK:STDOUT: ret void, !dbg !83 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !85 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core"(ptr %self), !dbg !87 -// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: %.loc18_71.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !77 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc18_71.1.b), !dbg !77 +// CHECK:STDOUT: %.loc18_71.4.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !77 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc18_71.4.a), !dbg !77 +// CHECK:STDOUT: ret void, !dbg !77 // 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 @_CSelfDestruct.Core.ad01ed096e1f14e2(ptr %t) #0 !dbg !81 { +// CHECK:STDOUT: call void @"_COp.2508ed710019eba8:core.SubobjectDestroy.Core"(ptr %t), !dbg !85 +// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !88 { +// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -163,6 +162,7 @@ fn Test(c: C) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20, !20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) @@ -175,45 +175,46 @@ fn Test(c: C) -> i32 { // CHECK:STDOUT: !34 = !DISubroutineType(types: !33) // CHECK:STDOUT: !35 = !{!20, !32} // CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !{null, !20} +// CHECK:STDOUT: !37 = !{null, !32} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !{null, !32} -// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "LocalId", linkageName: "_CLocalId.Main", scope: null, file: !28, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !45) -// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !20) -// CHECK:STDOUT: !44 = !DILocation(line: 5, column: 23, scope: !41) -// CHECK:STDOUT: !45 = !{!42} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Unit", linkageName: "_CUnit.Main", scope: null, file: !28, line: 7, type: !31, spFlags: DISPFlagDefinition, unit: !29) -// CHECK:STDOUT: !47 = !DILocation(line: 7, column: 14, scope: !46) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "MakePair", linkageName: "_CMakePair.Main", scope: null, file: !28, line: 9, type: !34, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !56) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !20) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 2, scope: !48, type: !20) -// CHECK:STDOUT: !53 = !DILocation(line: 9, column: 32, scope: !48) -// CHECK:STDOUT: !56 = !{!49, !50} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.C.Main", scope: null, file: !28, line: 12, type: !36, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !61) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !32) -// CHECK:STDOUT: !60 = !DILocation(line: 12, column: 25, scope: !57) -// CHECK:STDOUT: !61 = !{!58} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !28, line: 16, type: !36, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !76) -// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !32) -// CHECK:STDOUT: !67 = !DILocation(line: 17, column: 3, scope: !62) -// CHECK:STDOUT: !68 = !DILocation(line: 18, column: 51, scope: !62) -// CHECK:STDOUT: !69 = !DILocation(line: 18, column: 40, scope: !62) -// CHECK:STDOUT: !70 = !DILocation(line: 18, column: 61, scope: !62) -// CHECK:STDOUT: !71 = !DILocation(line: 18, column: 31, scope: !62) -// CHECK:STDOUT: !74 = !DILocation(line: 19, column: 10, scope: !62) -// CHECK:STDOUT: !75 = !DILocation(line: 19, column: 3, scope: !62) -// CHECK:STDOUT: !76 = !{!63} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !28, line: 18, type: !38, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !80) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !20) -// CHECK:STDOUT: !79 = !DILocation(line: 18, column: 31, scope: !77) -// CHECK:STDOUT: !80 = !{!78} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core", scope: null, file: !28, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !84) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "LocalId", linkageName: "_CLocalId.Main", scope: null, file: !28, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !43) +// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !20) +// CHECK:STDOUT: !42 = !DILocation(line: 5, column: 23, scope: !39) +// CHECK:STDOUT: !43 = !{!40} +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Unit", linkageName: "_CUnit.Main", scope: null, file: !28, line: 7, type: !31, spFlags: DISPFlagDefinition, unit: !29) +// CHECK:STDOUT: !45 = !DILocation(line: 7, column: 14, scope: !44) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "MakePair", linkageName: "_CMakePair.Main", scope: null, file: !28, line: 9, type: !34, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !54) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !20) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 2, scope: !46, type: !20) +// CHECK:STDOUT: !51 = !DILocation(line: 9, column: 32, scope: !46) +// CHECK:STDOUT: !54 = !{!47, !48} +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.C.Main", scope: null, file: !28, line: 12, type: !36, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !59) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !32) +// CHECK:STDOUT: !58 = !DILocation(line: 12, column: 25, scope: !55) +// CHECK:STDOUT: !59 = !{!56} +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !28, line: 16, type: !36, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !74) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !32) +// CHECK:STDOUT: !65 = !DILocation(line: 17, column: 3, scope: !60) +// CHECK:STDOUT: !66 = !DILocation(line: 18, column: 51, scope: !60) +// CHECK:STDOUT: !67 = !DILocation(line: 18, column: 40, scope: !60) +// CHECK:STDOUT: !68 = !DILocation(line: 18, column: 61, scope: !60) +// CHECK:STDOUT: !69 = !DILocation(line: 18, column: 31, scope: !60) +// CHECK:STDOUT: !72 = !DILocation(line: 19, column: 10, scope: !60) +// CHECK:STDOUT: !73 = !DILocation(line: 19, column: 3, scope: !60) +// CHECK:STDOUT: !74 = !{!61} +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2508ed710019eba8:core.SubobjectDestroy.Core", scope: null, file: !28, line: 18, type: !38, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !80) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !32) +// CHECK:STDOUT: !77 = !DILocation(line: 18, column: 31, scope: !75) +// CHECK:STDOUT: !78 = !{null, !20} +// CHECK:STDOUT: !79 = !DISubroutineType(types: !78) +// CHECK:STDOUT: !80 = !{!76} +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ad01ed096e1f14e2", scope: null, file: !10, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !87) // CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !32) -// CHECK:STDOUT: !83 = !DILocation(line: 18, column: 31, scope: !81) -// CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2508ed710019eba8:core.Destroy.Core", scope: null, file: !28, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !88) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !32) -// CHECK:STDOUT: !87 = !DILocation(line: 18, column: 31, scope: !85) -// CHECK:STDOUT: !88 = !{!86} +// CHECK:STDOUT: !85 = !DILocation(line: 34, column: 5, scope: !81) +// CHECK:STDOUT: !86 = !DILocation(line: 32, column: 1, scope: !81) +// CHECK:STDOUT: !87 = !{!82} +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !79, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !94) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !20) +// CHECK:STDOUT: !93 = !DILocation(line: 32, column: 1, scope: !88) +// CHECK:STDOUT: !94 = !{!89} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/definition/var_param.carbon b/toolchain/lower/testdata/function/definition/var_param.carbon index 994367995c32..56f8ce0ed0fe 100644 --- a/toolchain/lower/testdata/function/definition/var_param.carbon +++ b/toolchain/lower/testdata/function/definition/var_param.carbon @@ -35,7 +35,7 @@ fn Call() { // CHECK:STDOUT: source_filename = "var_param.carbon" // CHECK:STDOUT: // CHECK:STDOUT: @X.val = internal constant {} zeroinitializer -// CHECK:STDOUT: @X.val.loc16 = internal constant {} zeroinitializer +// CHECK:STDOUT: @X.val.loc16_13.1 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define void @_COneVar_i32.Main(ptr %_) #0 !dbg !30 { @@ -80,60 +80,52 @@ fn Call() { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !68 // CHECK:STDOUT: store i32 1, ptr %_.var.loc15, align 4, !dbg !68 // CHECK:STDOUT: call void @_COneVar_i32.Main(ptr %_.var.loc15), !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var.loc15), !dbg !68 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var.loc15), !dbg !68 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !70 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc16, ptr align 1 @X.val.loc16, i64 0, i1 false), !dbg !70 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc16, ptr align 1 @X.val.loc16_13.1, i64 0, i1 false), !dbg !70 // CHECK:STDOUT: call void @_COneVar_X.Main(ptr %_.var.loc16), !dbg !71 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %_.var.loc16), !dbg !70 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %_.var.loc16), !dbg !70 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18_12), !dbg !72 // CHECK:STDOUT: store i32 1, ptr %_.var.loc18_12, align 4, !dbg !72 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18_24), !dbg !73 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc18_24, ptr align 1 @X.val.loc16, i64 0, i1 false), !dbg !73 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc18_24, ptr align 1 @X.val.loc16_13.1, i64 0, i1 false), !dbg !73 // CHECK:STDOUT: call void @_CTwoVars.Main(ptr %_.var.loc18_12, ptr %_.var.loc18_24), !dbg !74 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %_.var.loc18_24), !dbg !73 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var.loc18_12), !dbg !72 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %_.var.loc18_24), !dbg !73 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var.loc18_12), !dbg !72 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc20), !dbg !75 // CHECK:STDOUT: store i32 1, ptr %_.var.loc20, align 4, !dbg !75 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_18.2.temp), !dbg !76 -// CHECK:STDOUT: call void @_CVarThenLet.Main(ptr %_.var.loc20, ptr @X.val.loc16), !dbg !77 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr @X.val), !dbg !76 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var.loc20), !dbg !75 +// CHECK:STDOUT: call void @_CVarThenLet.Main(ptr %_.var.loc20, ptr @X.val.loc16_13.1), !dbg !77 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr @X.val), !dbg !76 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var.loc20), !dbg !75 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc21), !dbg !78 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc21, ptr align 1 @X.val.loc16, i64 0, i1 false), !dbg !78 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc21, ptr align 1 @X.val.loc16_13.1, i64 0, i1 false), !dbg !78 // CHECK:STDOUT: call void @_CLetThenVar.Main(i32 1, ptr %_.var.loc21), !dbg !79 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %_.var.loc21), !dbg !78 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %_.var.loc21), !dbg !78 // CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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 @"_CSelfDestruct.cb8adced19392b99: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.8b0bf151036f045a: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !81 { +// 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.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 @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %t) #0 !dbg !88 { +// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", { 2, 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", { 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.2abb6e2621dcf00d, { 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -143,6 +135,7 @@ fn Call() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "var_param.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -192,16 +185,12 @@ fn Call() { // CHECK:STDOUT: !78 = !DILocation(line: 21, column: 23, scope: !67) // CHECK:STDOUT: !79 = !DILocation(line: 30, column: 3, scope: !67) // CHECK:STDOUT: !80 = !DILocation(line: 23, column: 1, scope: !67) -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 15, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !84) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !87) // 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: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !88) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !23) -// CHECK:STDOUT: !87 = !DILocation(line: 16, column: 13, scope: !85) -// CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a: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: !86 = !DILocation(line: 32, column: 1, scope: !81) +// CHECK:STDOUT: !87 = !{!82} +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2abb6e2621dcf00d", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !94) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !23) +// CHECK:STDOUT: !93 = !DILocation(line: 32, column: 1, scope: !88) +// CHECK:STDOUT: !94 = !{!89} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call.carbon b/toolchain/lower/testdata/function/generic/call.carbon index 1367c44e2ee1..d49866794b04 100644 --- a/toolchain/lower/testdata/function/generic/call.carbon +++ b/toolchain/lower/testdata/function/generic/call.carbon @@ -35,68 +35,38 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: %type.28 = type {} // CHECK:STDOUT: -// CHECK:STDOUT: @C.val.loc20_3 = internal constant {} zeroinitializer -// CHECK:STDOUT: @D.val.loc21_3 = internal constant {} zeroinitializer +// CHECK:STDOUT: @C.val.loc20_3.1 = internal constant {} zeroinitializer +// CHECK:STDOUT: @D.val.loc21_3.1 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !44 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !45 -// CHECK:STDOUT: %d.var = alloca {}, align 1, !dbg !47 -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !49 -// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !51 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !45 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc20_3, i64 0, i1 false), !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !47 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %d.var, ptr align 1 @D.val.loc21_3, i64 0, i1 false), !dbg !47 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !49 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !49 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !51 -// CHECK:STDOUT: store double 0.000000e+00, ptr %m.var, align 8, !dbg !51 -// CHECK:STDOUT: call void @_CF.Main.9522ff908e97e267(ptr %c.var), !dbg !54 -// CHECK:STDOUT: call void @_CF.Main.9522ff908e97e267(ptr %d.var), !dbg !56 -// CHECK:STDOUT: %.loc27 = load i32, ptr %n.var, align 4, !dbg !57 -// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(i32 %.loc27), !dbg !58 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !40 +// CHECK:STDOUT: %d.var = alloca {}, align 1, !dbg !42 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !44 +// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !46 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !40 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc20_3.1, i64 0, i1 false), !dbg !40 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !42 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %d.var, ptr align 1 @D.val.loc21_3.1, i64 0, i1 false), !dbg !42 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !44 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !44 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !46 +// CHECK:STDOUT: store double 0.000000e+00, ptr %m.var, align 8, !dbg !46 +// CHECK:STDOUT: call void @_CF.Main.9522ff908e97e267(ptr %c.var), !dbg !49 +// CHECK:STDOUT: call void @_CF.Main.9522ff908e97e267(ptr %d.var), !dbg !54 +// CHECK:STDOUT: %.loc27 = load i32, ptr %n.var, align 4, !dbg !55 +// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(i32 %.loc27), !dbg !56 // CHECK:STDOUT: %.loc28 = load double, ptr %m.var, align 8, !dbg !59 // CHECK:STDOUT: call void @_CF.Main.b709b3b9ccbae883(double %.loc28), !dbg !60 // CHECK:STDOUT: call void @_CF.Main.99ea8cc237f84c8d(%type.28 zeroinitializer), !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %m.var), !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !49 -// CHECK:STDOUT: call void @"_CSelfDestruct.a50fd899f969e609:core.Destroy.Core"(ptr %d.var), !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %m.var), !dbg !46 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !44 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0ee92c77788c7639(ptr %d.var), !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %c.var), !dbg !40 // CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7619ac942aa9029a: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.72395be3dbbe8946: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.cb8adced19392b99: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.a50fd899f969e609: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.08d9e38b928ba575: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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -104,27 +74,47 @@ 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 !83 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9522ff908e97e267(ptr %_) #0 !dbg !63 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !66 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.55456748a8a2eb70(i32 %_) #0 !dbg !73 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !76 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.b709b3b9ccbae883(double %_) #0 !dbg !78 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !81 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.99ea8cc237f84c8d(%type.28 %_) #0 !dbg !83 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.55456748a8a2eb70(i32 %_) #0 !dbg !93 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !96 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !88 { +// CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.b709b3b9ccbae883(double %_) #0 !dbg !98 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !101 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !95 { +// CHECK:STDOUT: ret void, !dbg !100 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.99ea8cc237f84c8d(%type.28 %_) #0 !dbg !103 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !106 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.0ee92c77788c7639(ptr %t) #0 !dbg !102 { +// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !109 { +// CHECK:STDOUT: ret void, !dbg !114 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -140,63 +130,60 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "call.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !37 = !{null} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !40 = !{null, !39} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !{null, !36} -// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !34, line: 19, type: !38, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !45 = !DILocation(line: 20, column: 3, scope: !44) -// CHECK:STDOUT: !47 = !DILocation(line: 21, column: 3, scope: !44) -// CHECK:STDOUT: !49 = !DILocation(line: 22, column: 3, scope: !44) -// CHECK:STDOUT: !51 = !DILocation(line: 23, column: 3, scope: !44) -// CHECK:STDOUT: !54 = !DILocation(line: 25, column: 3, scope: !44) -// CHECK:STDOUT: !56 = !DILocation(line: 26, column: 3, scope: !44) -// CHECK:STDOUT: !57 = !DILocation(line: 27, column: 5, scope: !44) -// CHECK:STDOUT: !58 = !DILocation(line: 27, column: 3, scope: !44) -// CHECK:STDOUT: !59 = !DILocation(line: 28, column: 5, scope: !44) -// CHECK:STDOUT: !60 = !DILocation(line: 28, column: 3, scope: !44) -// CHECK:STDOUT: !61 = !DILocation(line: 29, column: 3, scope: !44) -// CHECK:STDOUT: !62 = !DILocation(line: 19, column: 1, scope: !44) -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !34, line: 23, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !39) -// CHECK:STDOUT: !65 = !DILocation(line: 23, column: 3, scope: !63) -// CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !34, line: 22, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !70) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !36) -// CHECK:STDOUT: !69 = !DILocation(line: 22, column: 3, scope: !67) -// CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !34, line: 21, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !74) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !39) -// CHECK:STDOUT: !73 = !DILocation(line: 21, column: 3, scope: !71) -// CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a50fd899f969e609:core.Destroy.Core", scope: null, file: !34, line: 21, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !78) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !39) -// CHECK:STDOUT: !77 = !DILocation(line: 21, column: 3, scope: !75) -// CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !34, line: 20, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !82) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !39) -// CHECK:STDOUT: !81 = !DILocation(line: 20, column: 3, scope: !79) -// CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !34, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !87) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !39) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !34, line: 19, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !40 = !DILocation(line: 20, column: 3, scope: !39) +// CHECK:STDOUT: !42 = !DILocation(line: 21, column: 3, scope: !39) +// CHECK:STDOUT: !44 = !DILocation(line: 22, column: 3, scope: !39) +// CHECK:STDOUT: !46 = !DILocation(line: 23, column: 3, scope: !39) +// CHECK:STDOUT: !49 = !DILocation(line: 25, column: 3, scope: !39) +// CHECK:STDOUT: !50 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !51 = !{null, !50} +// CHECK:STDOUT: !52 = !DISubroutineType(types: !51) +// CHECK:STDOUT: !54 = !DILocation(line: 26, column: 3, scope: !39) +// CHECK:STDOUT: !55 = !DILocation(line: 27, column: 5, scope: !39) +// CHECK:STDOUT: !56 = !DILocation(line: 27, column: 3, scope: !39) +// CHECK:STDOUT: !57 = !{null, !36} +// CHECK:STDOUT: !58 = !DISubroutineType(types: !57) +// CHECK:STDOUT: !59 = !DILocation(line: 28, column: 5, scope: !39) +// CHECK:STDOUT: !60 = !DILocation(line: 28, column: 3, scope: !39) +// CHECK:STDOUT: !61 = !DILocation(line: 29, column: 3, scope: !39) +// CHECK:STDOUT: !62 = !DILocation(line: 19, column: 1, scope: !39) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !34, line: 13, type: !52, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !67) +// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !50) +// CHECK:STDOUT: !66 = !DILocation(line: 13, column: 1, scope: !63) +// CHECK:STDOUT: !67 = !{!64} +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.55456748a8a2eb70", scope: null, file: !34, line: 13, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !77) +// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !36) +// CHECK:STDOUT: !76 = !DILocation(line: 13, column: 1, scope: !73) +// CHECK:STDOUT: !77 = !{!74} +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b709b3b9ccbae883", scope: null, file: !34, line: 13, type: !52, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !82) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !50) +// CHECK:STDOUT: !81 = !DILocation(line: 13, column: 1, scope: !78) +// CHECK:STDOUT: !82 = !{!79} +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.99ea8cc237f84c8d", scope: null, file: !34, line: 13, type: !52, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !87) +// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !50) // CHECK:STDOUT: !86 = !DILocation(line: 13, column: 1, scope: !83) // CHECK:STDOUT: !87 = !{!84} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.55456748a8a2eb70", scope: null, file: !34, line: 13, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !97) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !36) -// CHECK:STDOUT: !96 = !DILocation(line: 13, column: 1, scope: !93) -// CHECK:STDOUT: !97 = !{!94} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b709b3b9ccbae883", scope: null, file: !34, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !102) -// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !39) -// CHECK:STDOUT: !101 = !DILocation(line: 13, column: 1, scope: !98) -// CHECK:STDOUT: !102 = !{!99} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.99ea8cc237f84c8d", scope: null, file: !34, line: 13, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !107) -// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !39) -// CHECK:STDOUT: !106 = !DILocation(line: 13, column: 1, scope: !103) -// CHECK:STDOUT: !107 = !{!104} +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !26, line: 32, type: !52, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !94) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !50) +// CHECK:STDOUT: !93 = !DILocation(line: 32, column: 1, scope: !88) +// CHECK:STDOUT: !94 = !{!89} +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 32, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !101) +// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !36) +// CHECK:STDOUT: !100 = !DILocation(line: 32, column: 1, scope: !95) +// CHECK:STDOUT: !101 = !{!96} +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.0ee92c77788c7639", scope: null, file: !26, line: 32, type: !52, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !108) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !50) +// CHECK:STDOUT: !107 = !DILocation(line: 32, column: 1, scope: !102) +// CHECK:STDOUT: !108 = !{!103} +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !26, line: 32, type: !52, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !115) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !50) +// CHECK:STDOUT: !114 = !DILocation(line: 32, column: 1, scope: !109) +// CHECK:STDOUT: !115 = !{!110} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_basic.carbon b/toolchain/lower/testdata/function/generic/call_basic.carbon index 46291205fb0c..8ecc5c98f28c 100644 --- a/toolchain/lower/testdata/function/generic/call_basic.carbon +++ b/toolchain/lower/testdata/function/generic/call_basic.carbon @@ -64,74 +64,32 @@ fn M() { // CHECK:STDOUT: @C.val.loc15_43 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_COp.C.Main:Copy.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !46 { +// CHECK:STDOUT: define void @"_COp.C.Main:Copy.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.loc15_43, i64 0, i1 false), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.loc15_43, i64 0, i1 false), !dbg !47 +// CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !49 { // 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.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.036a5d5004ea8020: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.6fa1811d66e6eb5d: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.a17e1ddde5b22223: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.7619ac942aa9029a: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 void @_CM.Main() #0 !dbg !77 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !78 -// CHECK:STDOUT: %p.var = alloca double, align 8, !dbg !80 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !78 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !78 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %p.var), !dbg !80 -// CHECK:STDOUT: store double 1.000000e+00, ptr %p.var, align 8, !dbg !80 -// CHECK:STDOUT: %.loc52 = load i32, ptr %n.var, align 4, !dbg !82 -// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(i32 %.loc52), !dbg !83 -// CHECK:STDOUT: %.loc53_18 = load i32, ptr %n.var, align 4, !dbg !84 -// CHECK:STDOUT: %G.call.loc53 = call i32 @_CG.Main.d86245b043c956e8(i32 %.loc53_18), !dbg !85 -// CHECK:STDOUT: %.loc54 = load double, ptr %p.var, align 8, !dbg !90 -// CHECK:STDOUT: call void @_CF.Main.b709b3b9ccbae883(double %.loc54), !dbg !91 -// CHECK:STDOUT: %.loc55_18 = load double, ptr %p.var, align 8, !dbg !92 -// CHECK:STDOUT: %G.call.loc55 = call double @_CG.Main.bf8f5dcfaf2cedb9(double %.loc55_18), !dbg !93 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %p.var), !dbg !80 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !78 -// CHECK:STDOUT: ret void, !dbg !96 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !97 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !50 +// CHECK:STDOUT: %p.var = alloca double, align 8, !dbg !52 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !50 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !50 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %p.var), !dbg !52 +// CHECK:STDOUT: store double 1.000000e+00, ptr %p.var, align 8, !dbg !52 +// CHECK:STDOUT: %.loc52 = load i32, ptr %n.var, align 4, !dbg !54 +// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(i32 %.loc52), !dbg !55 +// CHECK:STDOUT: %.loc53_18 = load i32, ptr %n.var, align 4, !dbg !58 +// CHECK:STDOUT: %G.call.loc53 = call i32 @_CG.Main.091764f9509e9823(i32 %.loc53_18), !dbg !59 +// CHECK:STDOUT: %.loc54 = load double, ptr %p.var, align 8, !dbg !64 +// CHECK:STDOUT: call void @_CF.Main.b709b3b9ccbae883(double %.loc54), !dbg !65 +// CHECK:STDOUT: %.loc55_18 = load double, ptr %p.var, align 8, !dbg !68 +// CHECK:STDOUT: %G.call.loc55 = call double @_CG.Main.b5920d783ed6ed2a(double %.loc55_18), !dbg !69 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %p.var), !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !50 +// CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -141,163 +99,199 @@ 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.55456748a8a2eb70(i32 %_) #0 !dbg !101 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.55456748a8a2eb70(i32 %_) #0 !dbg !73 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !104 +// CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.d86245b043c956e8(i32 %x) #0 !dbg !106 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.091764f9509e9823(i32 %x) #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc29_6.3.temp = alloca i32, align 4, !dbg !112 -// CHECK:STDOUT: %.loc31_8.3.temp = alloca i32, align 4, !dbg !115 -// CHECK:STDOUT: %.loc31_9.3.temp = alloca i32, align 4, !dbg !116 -// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !117 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !121 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !125 -// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !129 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !133 -// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !136 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !112 -// CHECK:STDOUT: %H.call.loc29 = call i32 @_CH.Main.2fad9574e050607e(i32 %x), !dbg !112 -// CHECK:STDOUT: store i32 %H.call.loc29, ptr %.loc29_6.3.temp, align 4, !dbg !112 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !112 -// CHECK:STDOUT: %H.call.loc30 = call %type.28 @_CH.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !113 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !115 -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.d86245b043c956e8(i32 %x), !dbg !115 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !116 -// CHECK:STDOUT: store i32 %G.call, ptr %.loc31_8.3.temp, align 4, !dbg !115 -// CHECK:STDOUT: %.loc31_8.5 = load i32, ptr %.loc31_8.3.temp, align 4, !dbg !115 -// CHECK:STDOUT: %H.call.loc31 = call i32 @_CH.Main.2fad9574e050607e(i32 %.loc31_8.5), !dbg !116 -// CHECK:STDOUT: store i32 %H.call.loc31, ptr %.loc31_9.3.temp, align 4, !dbg !116 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !116 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !115 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !117 -// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !117 -// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !119 -// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.21aefb7dfdebb8e4(double %.loc35_5), !dbg !120 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !121 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !121 -// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !123 -// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc37_5), !dbg !124 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !125 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !125 -// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !127 -// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc39_5), !dbg !128 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !129 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !129 -// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !131 -// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc41_5), !dbg !132 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !133 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !136 -// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !136 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !136 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !133 -// CHECK:STDOUT: call void @"_CSelfDestruct.036a5d5004ea8020:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !129 -// CHECK:STDOUT: call void @"_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !125 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !121 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %var_f64.var), !dbg !117 -// CHECK:STDOUT: ret i32 %x, !dbg !138 +// CHECK:STDOUT: %.loc29_6.3.temp = alloca i32, align 4, !dbg !84 +// CHECK:STDOUT: %.loc31_8.3.temp = alloca i32, align 4, !dbg !87 +// CHECK:STDOUT: %.loc31_9.3.temp = alloca i32, align 4, !dbg !88 +// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !89 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !93 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !97 +// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !101 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !105 +// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !108 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !84 +// CHECK:STDOUT: %H.call.loc29 = call i32 @_CH.Main.2fad9574e050607e(i32 %x), !dbg !84 +// CHECK:STDOUT: store i32 %H.call.loc29, ptr %.loc29_6.3.temp, align 4, !dbg !84 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc29_6.3.temp), !dbg !84 +// CHECK:STDOUT: %H.call.loc30 = call %type.28 @_CH.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !85 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !87 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.091764f9509e9823(i32 %x), !dbg !87 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !88 +// CHECK:STDOUT: store i32 %G.call, ptr %.loc31_8.3.temp, align 4, !dbg !87 +// CHECK:STDOUT: %.loc31_8.5 = load i32, ptr %.loc31_8.3.temp, align 4, !dbg !87 +// CHECK:STDOUT: %H.call.loc31 = call i32 @_CH.Main.2fad9574e050607e(i32 %.loc31_8.5), !dbg !88 +// CHECK:STDOUT: store i32 %H.call.loc31, ptr %.loc31_9.3.temp, align 4, !dbg !88 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc31_9.3.temp), !dbg !88 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc31_8.3.temp), !dbg !87 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !89 +// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !89 +// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !91 +// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.21aefb7dfdebb8e4(double %.loc35_5), !dbg !92 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !93 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !93 +// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !95 +// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc37_5), !dbg !96 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !97 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !97 +// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !99 +// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc39_5), !dbg !100 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !101 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !101 +// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !103 +// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc41_5), !dbg !104 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !105 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !108 +// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !108 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %.loc43_6.3.temp), !dbg !108 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %c.var), !dbg !105 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.eadf459918fc387c(ptr %ptr_i8.var), !dbg !101 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b18855c76072615b(ptr %ptr_f64.var), !dbg !97 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %ptr_i32.var), !dbg !93 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %var_f64.var), !dbg !89 +// CHECK:STDOUT: ret i32 %x, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.b709b3b9ccbae883(double %_) #0 !dbg !140 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.b709b3b9ccbae883(double %_) #0 !dbg !112 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !143 +// CHECK:STDOUT: ret void, !dbg !115 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CG.Main.bf8f5dcfaf2cedb9(double %x) #0 !dbg !145 { +// CHECK:STDOUT: define linkonce_odr double @_CG.Main.b5920d783ed6ed2a(double %x) #0 !dbg !117 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc29_6.3.temp = alloca double, align 8, !dbg !151 -// CHECK:STDOUT: %.loc31_8.3.temp = alloca double, align 8, !dbg !154 -// CHECK:STDOUT: %.loc31_9.3.temp = alloca double, align 8, !dbg !155 -// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !156 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !160 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !164 -// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !168 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !172 -// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !175 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !151 -// CHECK:STDOUT: %H.call.loc29 = call double @_CH.Main.21aefb7dfdebb8e4(double %x), !dbg !151 -// CHECK:STDOUT: store double %H.call.loc29, ptr %.loc29_6.3.temp, align 8, !dbg !151 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !151 -// CHECK:STDOUT: %H.call.loc30 = call %type.28 @_CH.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !152 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !154 -// CHECK:STDOUT: %G.call = call double @_CG.Main.bf8f5dcfaf2cedb9(double %x), !dbg !154 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !155 -// CHECK:STDOUT: store double %G.call, ptr %.loc31_8.3.temp, align 8, !dbg !154 -// CHECK:STDOUT: %.loc31_8.5 = load double, ptr %.loc31_8.3.temp, align 8, !dbg !154 -// CHECK:STDOUT: %H.call.loc31 = call double @_CH.Main.21aefb7dfdebb8e4(double %.loc31_8.5), !dbg !155 -// CHECK:STDOUT: store double %H.call.loc31, ptr %.loc31_9.3.temp, align 8, !dbg !155 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !155 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !154 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !156 -// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !156 -// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !158 -// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.21aefb7dfdebb8e4(double %.loc35_5), !dbg !159 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !160 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !160 -// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !162 -// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc37_5), !dbg !163 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !164 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !164 -// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !166 -// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc39_5), !dbg !167 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !168 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !168 -// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !170 -// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc41_5), !dbg !171 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !172 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !175 -// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !175 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !175 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !172 -// CHECK:STDOUT: call void @"_CSelfDestruct.036a5d5004ea8020:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !168 -// CHECK:STDOUT: call void @"_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !164 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !160 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %var_f64.var), !dbg !156 -// CHECK:STDOUT: ret double %x, !dbg !177 +// CHECK:STDOUT: %.loc29_6.3.temp = alloca double, align 8, !dbg !123 +// CHECK:STDOUT: %.loc31_8.3.temp = alloca double, align 8, !dbg !126 +// CHECK:STDOUT: %.loc31_9.3.temp = alloca double, align 8, !dbg !127 +// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !128 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !132 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !136 +// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !140 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !144 +// CHECK:STDOUT: %.loc43_6.3.temp = alloca {}, align 1, !dbg !147 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !123 +// CHECK:STDOUT: %H.call.loc29 = call double @_CH.Main.21aefb7dfdebb8e4(double %x), !dbg !123 +// CHECK:STDOUT: store double %H.call.loc29, ptr %.loc29_6.3.temp, align 8, !dbg !123 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc29_6.3.temp), !dbg !123 +// CHECK:STDOUT: %H.call.loc30 = call %type.28 @_CH.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !124 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !126 +// CHECK:STDOUT: %G.call = call double @_CG.Main.b5920d783ed6ed2a(double %x), !dbg !126 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_9.3.temp), !dbg !127 +// CHECK:STDOUT: store double %G.call, ptr %.loc31_8.3.temp, align 8, !dbg !126 +// CHECK:STDOUT: %.loc31_8.5 = load double, ptr %.loc31_8.3.temp, align 8, !dbg !126 +// CHECK:STDOUT: %H.call.loc31 = call double @_CH.Main.21aefb7dfdebb8e4(double %.loc31_8.5), !dbg !127 +// CHECK:STDOUT: store double %H.call.loc31, ptr %.loc31_9.3.temp, align 8, !dbg !127 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc31_9.3.temp), !dbg !127 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc31_8.3.temp), !dbg !126 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !128 +// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !128 +// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !130 +// CHECK:STDOUT: %H.call.loc35 = call double @_CH.Main.21aefb7dfdebb8e4(double %.loc35_5), !dbg !131 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !132 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !132 +// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !134 +// CHECK:STDOUT: %H.call.loc37 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc37_5), !dbg !135 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !136 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !136 +// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !138 +// CHECK:STDOUT: %H.call.loc39 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc39_5), !dbg !139 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !140 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !140 +// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !142 +// CHECK:STDOUT: %H.call.loc41 = call ptr @_CH.Main.417c9c4a651ab31b(ptr %.loc41_5), !dbg !143 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !144 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc43_6.3.temp), !dbg !147 +// CHECK:STDOUT: call void @_CH.Main.42513763e01cba2c(ptr %.loc43_6.3.temp, ptr %c.var), !dbg !147 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %.loc43_6.3.temp), !dbg !147 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %c.var), !dbg !144 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.eadf459918fc387c(ptr %ptr_i8.var), !dbg !140 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b18855c76072615b(ptr %ptr_f64.var), !dbg !136 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %ptr_i32.var), !dbg !132 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %var_f64.var), !dbg !128 +// CHECK:STDOUT: ret double %x, !dbg !149 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CH.Main.2fad9574e050607e(i32 %x) #0 !dbg !179 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !185 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !151 { +// CHECK:STDOUT: ret void, !dbg !156 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.28 @_CH.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !187 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.28 %x, !dbg !193 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !158 { +// CHECK:STDOUT: ret void, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CH.Main.21aefb7dfdebb8e4(double %x) #0 !dbg !195 { +// CHECK:STDOUT: define linkonce_odr i32 @_CH.Main.2fad9574e050607e(i32 %x) #0 !dbg !165 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret double %x, !dbg !201 +// CHECK:STDOUT: ret i32 %x, !dbg !171 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CH.Main.417c9c4a651ab31b(ptr %x) #0 !dbg !203 { +// CHECK:STDOUT: define linkonce_odr %type.28 @_CH.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !173 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %x, !dbg !209 +// CHECK:STDOUT: ret %type.28 %x, !dbg !179 // 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 !227 { +// CHECK:STDOUT: define linkonce_odr double @_CH.Main.21aefb7dfdebb8e4(double %x) #0 !dbg !181 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_COp.C.Main:Copy.Core"(ptr %return, ptr %x), !dbg !232 +// CHECK:STDOUT: ret double %x, !dbg !187 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @_CH.Main.417c9c4a651ab31b(ptr %x) #0 !dbg !189 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret ptr %x, !dbg !195 +// 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 !213 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @"_COp.C.Main:Copy.Core"(ptr %return, ptr %x), !dbg !218 +// CHECK:STDOUT: ret void, !dbg !219 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !221 { +// CHECK:STDOUT: ret void, !dbg !226 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.eadf459918fc387c(ptr %t) #0 !dbg !228 { // CHECK:STDOUT: ret void, !dbg !233 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b18855c76072615b(ptr %t) #0 !dbg !235 { +// CHECK:STDOUT: ret void, !dbg !240 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !242 { +// CHECK:STDOUT: ret void, !dbg !247 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 18 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.2b38c2ca9f7f1a94, { 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @_CH.Main.2fad9574e050607e, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @_CH.Main.c3359c2c217ad593, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @_CH.Main.21aefb7dfdebb8e4, { 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @_CH.Main.417c9c4a651ab31b, { 5, 2, 0, 4, 3, 1 } // CHECK:STDOUT: uselistorder ptr @_CH.Main.42513763e01cba2c, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.356af3b6aef18564, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.eadf459918fc387c, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.b18855c76072615b, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.4f29d15a20894e9b, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -307,135 +301,132 @@ fn M() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "call_basic.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !38 = !{!37, !37} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !37} +// CHECK:STDOUT: !40 = !{null} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !{null} -// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = !{null, !36} -// CHECK:STDOUT: !45 = !DISubroutineType(types: !44) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Op", linkageName: "_COp.C.Main:Copy.Core", scope: null, file: !34, line: 15, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !52) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !37) -// CHECK:STDOUT: !51 = !DILocation(line: 15, column: 34, scope: !46) -// CHECK:STDOUT: !52 = !{!47} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !34, line: 43, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !56) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !37) -// CHECK:STDOUT: !55 = !DILocation(line: 43, column: 3, scope: !53) -// CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !34, line: 43, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !37) -// CHECK:STDOUT: !59 = !DILocation(line: 43, column: 3, scope: !57) -// CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.036a5d5004ea8020:core.Destroy.Core", scope: null, file: !34, line: 40, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !37) -// CHECK:STDOUT: !63 = !DILocation(line: 40, column: 3, scope: !61) -// CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core", scope: null, file: !34, line: 38, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !68) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !37) -// CHECK:STDOUT: !67 = !DILocation(line: 38, column: 3, scope: !65) -// CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !34, line: 36, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !72) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !37) -// CHECK:STDOUT: !71 = !DILocation(line: 36, column: 3, scope: !69) -// CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !34, line: 34, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !76) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !37) -// CHECK:STDOUT: !75 = !DILocation(line: 34, column: 3, scope: !73) -// CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 48, type: !43, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !78 = !DILocation(line: 49, column: 3, scope: !77) -// CHECK:STDOUT: !80 = !DILocation(line: 50, column: 3, scope: !77) -// CHECK:STDOUT: !82 = !DILocation(line: 52, column: 5, scope: !77) -// CHECK:STDOUT: !83 = !DILocation(line: 52, column: 3, scope: !77) -// CHECK:STDOUT: !84 = !DILocation(line: 53, column: 18, scope: !77) -// CHECK:STDOUT: !85 = !DILocation(line: 53, column: 16, scope: !77) -// CHECK:STDOUT: !86 = !{!36, !36} -// CHECK:STDOUT: !87 = !DISubroutineType(types: !86) -// CHECK:STDOUT: !90 = !DILocation(line: 54, column: 5, scope: !77) -// CHECK:STDOUT: !91 = !DILocation(line: 54, column: 3, scope: !77) -// CHECK:STDOUT: !92 = !DILocation(line: 55, column: 18, scope: !77) -// CHECK:STDOUT: !93 = !DILocation(line: 55, column: 16, scope: !77) -// CHECK:STDOUT: !96 = !DILocation(line: 48, column: 1, scope: !77) -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !34, line: 53, type: !45, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !100) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !36) -// CHECK:STDOUT: !99 = !DILocation(line: 53, column: 16, scope: !97) -// CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.55456748a8a2eb70", scope: null, file: !34, line: 19, type: !45, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !105) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !36) -// CHECK:STDOUT: !104 = !DILocation(line: 19, column: 1, scope: !101) -// CHECK:STDOUT: !105 = !{!102} -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.d86245b043c956e8", scope: null, file: !34, line: 28, type: !87, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !139) -// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !36) -// CHECK:STDOUT: !112 = !DILocation(line: 29, column: 3, scope: !106) -// CHECK:STDOUT: !113 = !DILocation(line: 30, column: 3, scope: !106) -// CHECK:STDOUT: !115 = !DILocation(line: 31, column: 5, scope: !106) -// CHECK:STDOUT: !116 = !DILocation(line: 31, column: 3, scope: !106) -// CHECK:STDOUT: !117 = !DILocation(line: 34, column: 3, scope: !106) -// CHECK:STDOUT: !119 = !DILocation(line: 35, column: 5, scope: !106) -// CHECK:STDOUT: !120 = !DILocation(line: 35, column: 3, scope: !106) -// CHECK:STDOUT: !121 = !DILocation(line: 36, column: 3, scope: !106) -// CHECK:STDOUT: !123 = !DILocation(line: 37, column: 5, scope: !106) -// CHECK:STDOUT: !124 = !DILocation(line: 37, column: 3, scope: !106) -// CHECK:STDOUT: !125 = !DILocation(line: 38, column: 3, scope: !106) -// CHECK:STDOUT: !127 = !DILocation(line: 39, column: 5, scope: !106) -// CHECK:STDOUT: !128 = !DILocation(line: 39, column: 3, scope: !106) -// CHECK:STDOUT: !129 = !DILocation(line: 40, column: 3, scope: !106) -// CHECK:STDOUT: !131 = !DILocation(line: 41, column: 5, scope: !106) -// CHECK:STDOUT: !132 = !DILocation(line: 41, column: 3, scope: !106) -// CHECK:STDOUT: !133 = !DILocation(line: 42, column: 3, scope: !106) -// CHECK:STDOUT: !136 = !DILocation(line: 43, column: 3, scope: !106) -// CHECK:STDOUT: !138 = !DILocation(line: 45, column: 3, scope: !106) -// CHECK:STDOUT: !139 = !{!107} -// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b709b3b9ccbae883", scope: null, file: !34, line: 19, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !144) -// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !37) -// CHECK:STDOUT: !143 = !DILocation(line: 19, column: 1, scope: !140) -// CHECK:STDOUT: !144 = !{!141} -// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.bf8f5dcfaf2cedb9", scope: null, file: !34, line: 28, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !178) -// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !37) -// CHECK:STDOUT: !151 = !DILocation(line: 29, column: 3, scope: !145) -// CHECK:STDOUT: !152 = !DILocation(line: 30, column: 3, scope: !145) -// CHECK:STDOUT: !154 = !DILocation(line: 31, column: 5, scope: !145) -// CHECK:STDOUT: !155 = !DILocation(line: 31, column: 3, scope: !145) -// CHECK:STDOUT: !156 = !DILocation(line: 34, column: 3, scope: !145) -// CHECK:STDOUT: !158 = !DILocation(line: 35, column: 5, scope: !145) -// CHECK:STDOUT: !159 = !DILocation(line: 35, column: 3, scope: !145) -// CHECK:STDOUT: !160 = !DILocation(line: 36, column: 3, scope: !145) -// CHECK:STDOUT: !162 = !DILocation(line: 37, column: 5, scope: !145) -// CHECK:STDOUT: !163 = !DILocation(line: 37, column: 3, scope: !145) -// CHECK:STDOUT: !164 = !DILocation(line: 38, column: 3, scope: !145) -// CHECK:STDOUT: !166 = !DILocation(line: 39, column: 5, scope: !145) -// CHECK:STDOUT: !167 = !DILocation(line: 39, column: 3, scope: !145) -// CHECK:STDOUT: !168 = !DILocation(line: 40, column: 3, scope: !145) -// CHECK:STDOUT: !170 = !DILocation(line: 41, column: 5, scope: !145) -// CHECK:STDOUT: !171 = !DILocation(line: 41, column: 3, scope: !145) -// CHECK:STDOUT: !172 = !DILocation(line: 42, column: 3, scope: !145) -// CHECK:STDOUT: !175 = !DILocation(line: 43, column: 3, scope: !145) -// CHECK:STDOUT: !177 = !DILocation(line: 45, column: 3, scope: !145) -// CHECK:STDOUT: !178 = !{!146} -// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.2fad9574e050607e", scope: null, file: !34, line: 22, type: !87, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !186) -// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !36) -// CHECK:STDOUT: !185 = !DILocation(line: 23, column: 3, scope: !179) -// CHECK:STDOUT: !186 = !{!180} -// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c3359c2c217ad593", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !194) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !37) -// CHECK:STDOUT: !193 = !DILocation(line: 23, column: 3, scope: !187) -// CHECK:STDOUT: !194 = !{!188} -// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.21aefb7dfdebb8e4", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !202) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !37) -// CHECK:STDOUT: !201 = !DILocation(line: 23, column: 3, scope: !195) -// CHECK:STDOUT: !202 = !{!196} -// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.417c9c4a651ab31b", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !210) -// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !37) -// CHECK:STDOUT: !209 = !DILocation(line: 23, column: 3, scope: !203) -// CHECK:STDOUT: !210 = !{!204} -// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.42513763e01cba2c", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !234) -// CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !37) -// CHECK:STDOUT: !232 = !DILocation(line: 23, column: 10, scope: !227) -// CHECK:STDOUT: !233 = !DILocation(line: 23, column: 3, scope: !227) -// CHECK:STDOUT: !234 = !{!228} +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.C.Main:Copy.Core", scope: null, file: !34, line: 15, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !48) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !37) +// CHECK:STDOUT: !47 = !DILocation(line: 15, column: 34, scope: !42) +// CHECK:STDOUT: !48 = !{!43} +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 48, type: !41, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !50 = !DILocation(line: 49, column: 3, scope: !49) +// CHECK:STDOUT: !52 = !DILocation(line: 50, column: 3, scope: !49) +// CHECK:STDOUT: !54 = !DILocation(line: 52, column: 5, scope: !49) +// CHECK:STDOUT: !55 = !DILocation(line: 52, column: 3, scope: !49) +// CHECK:STDOUT: !56 = !{null, !36} +// CHECK:STDOUT: !57 = !DISubroutineType(types: !56) +// CHECK:STDOUT: !58 = !DILocation(line: 53, column: 18, scope: !49) +// CHECK:STDOUT: !59 = !DILocation(line: 53, column: 16, scope: !49) +// CHECK:STDOUT: !60 = !{!36, !36} +// CHECK:STDOUT: !61 = !DISubroutineType(types: !60) +// CHECK:STDOUT: !64 = !DILocation(line: 54, column: 5, scope: !49) +// CHECK:STDOUT: !65 = !DILocation(line: 54, column: 3, scope: !49) +// CHECK:STDOUT: !66 = !{null, !37} +// CHECK:STDOUT: !67 = !DISubroutineType(types: !66) +// CHECK:STDOUT: !68 = !DILocation(line: 55, column: 18, scope: !49) +// CHECK:STDOUT: !69 = !DILocation(line: 55, column: 16, scope: !49) +// CHECK:STDOUT: !72 = !DILocation(line: 48, column: 1, scope: !49) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.55456748a8a2eb70", scope: null, file: !34, line: 19, type: !57, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !77) +// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !36) +// CHECK:STDOUT: !76 = !DILocation(line: 19, column: 1, scope: !73) +// CHECK:STDOUT: !77 = !{!74} +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.091764f9509e9823", scope: null, file: !34, line: 28, type: !61, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !111) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !36) +// CHECK:STDOUT: !84 = !DILocation(line: 29, column: 3, scope: !78) +// CHECK:STDOUT: !85 = !DILocation(line: 30, column: 3, scope: !78) +// CHECK:STDOUT: !87 = !DILocation(line: 31, column: 5, scope: !78) +// CHECK:STDOUT: !88 = !DILocation(line: 31, column: 3, scope: !78) +// CHECK:STDOUT: !89 = !DILocation(line: 34, column: 3, scope: !78) +// CHECK:STDOUT: !91 = !DILocation(line: 35, column: 5, scope: !78) +// CHECK:STDOUT: !92 = !DILocation(line: 35, column: 3, scope: !78) +// CHECK:STDOUT: !93 = !DILocation(line: 36, column: 3, scope: !78) +// CHECK:STDOUT: !95 = !DILocation(line: 37, column: 5, scope: !78) +// CHECK:STDOUT: !96 = !DILocation(line: 37, column: 3, scope: !78) +// CHECK:STDOUT: !97 = !DILocation(line: 38, column: 3, scope: !78) +// CHECK:STDOUT: !99 = !DILocation(line: 39, column: 5, scope: !78) +// CHECK:STDOUT: !100 = !DILocation(line: 39, column: 3, scope: !78) +// CHECK:STDOUT: !101 = !DILocation(line: 40, column: 3, scope: !78) +// CHECK:STDOUT: !103 = !DILocation(line: 41, column: 5, scope: !78) +// CHECK:STDOUT: !104 = !DILocation(line: 41, column: 3, scope: !78) +// CHECK:STDOUT: !105 = !DILocation(line: 42, column: 3, scope: !78) +// CHECK:STDOUT: !108 = !DILocation(line: 43, column: 3, scope: !78) +// CHECK:STDOUT: !110 = !DILocation(line: 45, column: 3, scope: !78) +// CHECK:STDOUT: !111 = !{!79} +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b709b3b9ccbae883", scope: null, file: !34, line: 19, type: !67, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !116) +// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !37) +// CHECK:STDOUT: !115 = !DILocation(line: 19, column: 1, scope: !112) +// CHECK:STDOUT: !116 = !{!113} +// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.b5920d783ed6ed2a", scope: null, file: !34, line: 28, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !150) +// CHECK:STDOUT: !118 = !DILocalVariable(arg: 1, scope: !117, type: !37) +// CHECK:STDOUT: !123 = !DILocation(line: 29, column: 3, scope: !117) +// CHECK:STDOUT: !124 = !DILocation(line: 30, column: 3, scope: !117) +// CHECK:STDOUT: !126 = !DILocation(line: 31, column: 5, scope: !117) +// CHECK:STDOUT: !127 = !DILocation(line: 31, column: 3, scope: !117) +// CHECK:STDOUT: !128 = !DILocation(line: 34, column: 3, scope: !117) +// CHECK:STDOUT: !130 = !DILocation(line: 35, column: 5, scope: !117) +// CHECK:STDOUT: !131 = !DILocation(line: 35, column: 3, scope: !117) +// CHECK:STDOUT: !132 = !DILocation(line: 36, column: 3, scope: !117) +// CHECK:STDOUT: !134 = !DILocation(line: 37, column: 5, scope: !117) +// CHECK:STDOUT: !135 = !DILocation(line: 37, column: 3, scope: !117) +// CHECK:STDOUT: !136 = !DILocation(line: 38, column: 3, scope: !117) +// CHECK:STDOUT: !138 = !DILocation(line: 39, column: 5, scope: !117) +// CHECK:STDOUT: !139 = !DILocation(line: 39, column: 3, scope: !117) +// CHECK:STDOUT: !140 = !DILocation(line: 40, column: 3, scope: !117) +// CHECK:STDOUT: !142 = !DILocation(line: 41, column: 5, scope: !117) +// CHECK:STDOUT: !143 = !DILocation(line: 41, column: 3, scope: !117) +// CHECK:STDOUT: !144 = !DILocation(line: 42, column: 3, scope: !117) +// CHECK:STDOUT: !147 = !DILocation(line: 43, column: 3, scope: !117) +// CHECK:STDOUT: !149 = !DILocation(line: 45, column: 3, scope: !117) +// CHECK:STDOUT: !150 = !{!118} +// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !26, line: 32, type: !67, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !157) +// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !37) +// CHECK:STDOUT: !156 = !DILocation(line: 32, column: 1, scope: !151) +// CHECK:STDOUT: !157 = !{!152} +// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 32, type: !57, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !164) +// CHECK:STDOUT: !159 = !DILocalVariable(arg: 1, scope: !158, type: !36) +// CHECK:STDOUT: !163 = !DILocation(line: 32, column: 1, scope: !158) +// CHECK:STDOUT: !164 = !{!159} +// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.2fad9574e050607e", scope: null, file: !34, line: 22, type: !61, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !172) +// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !36) +// CHECK:STDOUT: !171 = !DILocation(line: 23, column: 3, scope: !165) +// CHECK:STDOUT: !172 = !{!166} +// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.c3359c2c217ad593", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !180) +// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !37) +// CHECK:STDOUT: !179 = !DILocation(line: 23, column: 3, scope: !173) +// CHECK:STDOUT: !180 = !{!174} +// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.21aefb7dfdebb8e4", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !188) +// CHECK:STDOUT: !182 = !DILocalVariable(arg: 1, scope: !181, type: !37) +// CHECK:STDOUT: !187 = !DILocation(line: 23, column: 3, scope: !181) +// CHECK:STDOUT: !188 = !{!182} +// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.417c9c4a651ab31b", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !196) +// CHECK:STDOUT: !190 = !DILocalVariable(arg: 1, scope: !189, type: !37) +// CHECK:STDOUT: !195 = !DILocation(line: 23, column: 3, scope: !189) +// CHECK:STDOUT: !196 = !{!190} +// CHECK:STDOUT: !213 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.42513763e01cba2c", scope: null, file: !34, line: 22, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !220) +// CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !213, type: !37) +// CHECK:STDOUT: !218 = !DILocation(line: 23, column: 10, scope: !213) +// CHECK:STDOUT: !219 = !DILocation(line: 23, column: 3, scope: !213) +// CHECK:STDOUT: !220 = !{!214} +// CHECK:STDOUT: !221 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !26, line: 32, type: !67, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !227) +// CHECK:STDOUT: !222 = !DILocalVariable(arg: 1, scope: !221, type: !37) +// CHECK:STDOUT: !226 = !DILocation(line: 32, column: 1, scope: !221) +// CHECK:STDOUT: !227 = !{!222} +// CHECK:STDOUT: !228 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.eadf459918fc387c", scope: null, file: !26, line: 32, type: !67, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !234) +// CHECK:STDOUT: !229 = !DILocalVariable(arg: 1, scope: !228, type: !37) +// CHECK:STDOUT: !233 = !DILocation(line: 32, column: 1, scope: !228) +// CHECK:STDOUT: !234 = !{!229} +// CHECK:STDOUT: !235 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b18855c76072615b", scope: null, file: !26, line: 32, type: !67, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !241) +// CHECK:STDOUT: !236 = !DILocalVariable(arg: 1, scope: !235, type: !37) +// CHECK:STDOUT: !240 = !DILocation(line: 32, column: 1, scope: !235) +// CHECK:STDOUT: !241 = !{!236} +// CHECK:STDOUT: !242 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !26, line: 32, type: !67, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !248) +// CHECK:STDOUT: !243 = !DILocalVariable(arg: 1, scope: !242, type: !37) +// CHECK:STDOUT: !247 = !DILocation(line: 32, column: 1, scope: !242) +// CHECK:STDOUT: !248 = !{!243} // 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 d0d84c8b50a4..950167ba69a5 100644 --- a/toolchain/lower/testdata/function/generic/call_basic_depth.carbon +++ b/toolchain/lower/testdata/function/generic/call_basic_depth.carbon @@ -41,62 +41,61 @@ fn M() -> i32 { // CHECK:STDOUT: source_filename = "call_basic_depth.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CM.Main() #0 !dbg !25 { +// CHECK:STDOUT: define i32 @_CM.Main() #0 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !28 -// CHECK:STDOUT: %m.var = alloca i32, align 4, !dbg !30 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !28 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !28 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !30 -// CHECK:STDOUT: store i32 poison, ptr %m.var, align 4, !dbg !30 -// CHECK:STDOUT: %.loc34 = load i32, ptr %n.var, align 4, !dbg !32 -// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(i32 %.loc34), !dbg !33 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !26 +// CHECK:STDOUT: %m.var = alloca i32, align 4, !dbg !28 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !26 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !26 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !28 +// CHECK:STDOUT: store i32 poison, ptr %m.var, align 4, !dbg !28 +// CHECK:STDOUT: %.loc34 = load i32, ptr %n.var, align 4, !dbg !30 +// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(i32 %.loc34), !dbg !31 // CHECK:STDOUT: %.loc35_9 = load i32, ptr %n.var, align 4, !dbg !35 -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.d86245b043c956e8(i32 %.loc35_9), !dbg !36 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.091764f9509e9823(i32 %.loc35_9), !dbg !36 // CHECK:STDOUT: store i32 %G.call, ptr %m.var, align 4, !dbg !34 // CHECK:STDOUT: %.loc36 = load i32, ptr %m.var, align 4, !dbg !39 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %m.var), !dbg !30 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %m.var), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !26 // CHECK:STDOUT: ret i32 %.loc36, !dbg !40 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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.55456748a8a2eb70(i32 %_) #0 !dbg !45 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.55456748a8a2eb70(i32 %_) #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.d86245b043c956e8(i32 %x) #0 !dbg !50 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.091764f9509e9823(i32 %x) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc25_6.3.temp = alloca i32, align 4, !dbg !56 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_6.3.temp), !dbg !56 -// CHECK:STDOUT: %H.call = call i32 @_CH.Main.2fad9574e050607e(i32 %x), !dbg !56 -// CHECK:STDOUT: store i32 %H.call, ptr %.loc25_6.3.temp, align 4, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc25_6.3.temp), !dbg !56 -// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(i32 %x), !dbg !58 -// CHECK:STDOUT: ret i32 %x, !dbg !60 +// CHECK:STDOUT: %.loc25_6.3.temp = alloca i32, align 4, !dbg !52 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_6.3.temp), !dbg !52 +// CHECK:STDOUT: %H.call = call i32 @_CH.Main.2fad9574e050607e(i32 %x), !dbg !52 +// CHECK:STDOUT: store i32 %H.call, ptr %.loc25_6.3.temp, align 4, !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc25_6.3.temp), !dbg !52 +// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(i32 %x), !dbg !54 +// CHECK:STDOUT: ret i32 %x, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CH.Main.2fad9574e050607e(i32 %x) #0 !dbg !62 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !58 { +// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i32 @_CH.Main.2fad9574e050607e(i32 %x) #0 !dbg !65 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(i32 %x), !dbg !68 -// CHECK:STDOUT: ret i32 %x, !dbg !70 +// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(i32 %x), !dbg !71 +// CHECK:STDOUT: ret i32 %x, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", { 0, 2, 1 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 2, 1 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -106,42 +105,43 @@ fn M() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "call_basic_depth.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !18, line: 30, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !28 = !DILocation(line: 31, column: 3, scope: !25) -// CHECK:STDOUT: !30 = !DILocation(line: 32, column: 3, scope: !25) -// CHECK:STDOUT: !32 = !DILocation(line: 34, column: 5, scope: !25) -// CHECK:STDOUT: !33 = !DILocation(line: 34, column: 3, scope: !25) -// CHECK:STDOUT: !34 = !DILocation(line: 35, column: 3, scope: !25) -// CHECK:STDOUT: !35 = !DILocation(line: 35, column: 9, scope: !25) -// CHECK:STDOUT: !36 = !DILocation(line: 35, column: 7, scope: !25) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !18, line: 30, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !26 = !DILocation(line: 31, column: 3, scope: !23) +// CHECK:STDOUT: !28 = !DILocation(line: 32, column: 3, scope: !23) +// CHECK:STDOUT: !30 = !DILocation(line: 34, column: 5, scope: !23) +// CHECK:STDOUT: !31 = !DILocation(line: 34, column: 3, scope: !23) +// CHECK:STDOUT: !32 = !{null, !20} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 35, column: 3, scope: !23) +// CHECK:STDOUT: !35 = !DILocation(line: 35, column: 9, scope: !23) +// CHECK:STDOUT: !36 = !DILocation(line: 35, column: 7, scope: !23) // CHECK:STDOUT: !37 = !{!20, !20} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !DILocation(line: 36, column: 10, scope: !25) -// CHECK:STDOUT: !40 = !DILocation(line: 36, column: 3, scope: !25) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 35, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) +// CHECK:STDOUT: !39 = !DILocation(line: 36, column: 10, scope: !23) +// CHECK:STDOUT: !40 = !DILocation(line: 36, column: 3, scope: !23) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.55456748a8a2eb70", scope: null, file: !18, line: 16, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) // 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: "F", linkageName: "_CF.Main.55456748a8a2eb70", scope: null, file: !18, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) -// CHECK:STDOUT: !48 = !DILocation(line: 16, column: 1, scope: !45) -// CHECK:STDOUT: !49 = !{!46} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.d86245b043c956e8", scope: null, file: !18, line: 24, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !61) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !20) -// CHECK:STDOUT: !56 = !DILocation(line: 25, column: 3, scope: !50) -// CHECK:STDOUT: !58 = !DILocation(line: 26, column: 3, scope: !50) -// CHECK:STDOUT: !60 = !DILocation(line: 27, column: 3, scope: !50) -// CHECK:STDOUT: !61 = !{!51} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.2fad9574e050607e", scope: null, file: !18, line: 19, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) -// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !20) -// CHECK:STDOUT: !68 = !DILocation(line: 20, column: 3, scope: !62) -// CHECK:STDOUT: !70 = !DILocation(line: 21, column: 3, scope: !62) -// CHECK:STDOUT: !71 = !{!63} +// CHECK:STDOUT: !44 = !DILocation(line: 16, column: 1, scope: !41) +// CHECK:STDOUT: !45 = !{!42} +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.091764f9509e9823", scope: null, file: !18, line: 24, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !20) +// CHECK:STDOUT: !52 = !DILocation(line: 25, column: 3, scope: !46) +// CHECK:STDOUT: !54 = !DILocation(line: 26, column: 3, scope: !46) +// CHECK:STDOUT: !56 = !DILocation(line: 27, column: 3, scope: !46) +// CHECK:STDOUT: !57 = !{!47} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !20) +// CHECK:STDOUT: !63 = !DILocation(line: 32, column: 1, scope: !58) +// CHECK:STDOUT: !64 = !{!59} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main.2fad9574e050607e", scope: null, file: !18, line: 19, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !74) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !20) +// CHECK:STDOUT: !71 = !DILocation(line: 20, column: 3, scope: !65) +// CHECK:STDOUT: !73 = !DILocation(line: 21, column: 3, scope: !65) +// CHECK:STDOUT: !74 = !{!66} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon b/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon index 04ba9c03ed78..e02a8dec1f35 100644 --- a/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon +++ b/toolchain/lower/testdata/function/generic/call_dedup_ptr.carbon @@ -28,54 +28,51 @@ fn M() { // CHECK:STDOUT: source_filename = "call_dedup_ptr.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !41 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !42 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !48 -// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !52 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !42 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !42 -// CHECK:STDOUT: %.loc19_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !44 -// CHECK:STDOUT: %F.call.loc19 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc19_5), !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !48 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !48 -// CHECK:STDOUT: %.loc21_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !50 -// CHECK:STDOUT: %F.call.loc21 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc21_5), !dbg !51 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !52 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !52 -// CHECK:STDOUT: %.loc23_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !54 -// CHECK:STDOUT: %F.call.loc23 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc23_5), !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.036a5d5004ea8020:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !52 -// CHECK:STDOUT: call void @"_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !42 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !39 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !46 +// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !50 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !39 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !39 +// CHECK:STDOUT: %.loc19_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !41 +// CHECK:STDOUT: %F.call.loc19 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc19_5), !dbg !42 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !46 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !46 +// CHECK:STDOUT: %.loc21_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !48 +// CHECK:STDOUT: %F.call.loc21 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc21_5), !dbg !49 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !50 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !50 +// CHECK:STDOUT: %.loc23_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !52 +// CHECK:STDOUT: %F.call.loc23 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc23_5), !dbg !53 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.eadf459918fc387c(ptr %ptr_i8.var), !dbg !50 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b18855c76072615b(ptr %ptr_f64.var), !dbg !46 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %ptr_i32.var), !dbg !39 // CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.036a5d5004ea8020: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.6fa1811d66e6eb5d: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.a17e1ddde5b22223: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: 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.417c9c4a651ab31b(ptr %x) #0 !dbg !69 { +// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.417c9c4a651ab31b(ptr %x) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %x, !dbg !75 +// CHECK:STDOUT: ret ptr %x, !dbg !63 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.eadf459918fc387c(ptr %t) #0 !dbg !81 { +// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b18855c76072615b(ptr %t) #0 !dbg !88 { +// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !95 { +// CHECK:STDOUT: ret void, !dbg !100 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -90,40 +87,41 @@ fn M() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "call_dedup_ptr.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !{null} // CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !39 = !{null, !38} -// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 17, type: !37, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !42 = !DILocation(line: 18, column: 3, scope: !41) -// CHECK:STDOUT: !44 = !DILocation(line: 19, column: 5, scope: !41) -// CHECK:STDOUT: !45 = !DILocation(line: 19, column: 3, scope: !41) -// CHECK:STDOUT: !46 = !{!38, !38} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !48 = !DILocation(line: 20, column: 3, scope: !41) -// CHECK:STDOUT: !50 = !DILocation(line: 21, column: 5, scope: !41) -// CHECK:STDOUT: !51 = !DILocation(line: 21, column: 3, scope: !41) -// CHECK:STDOUT: !52 = !DILocation(line: 22, column: 3, scope: !41) -// CHECK:STDOUT: !54 = !DILocation(line: 23, column: 5, scope: !41) -// CHECK:STDOUT: !55 = !DILocation(line: 23, column: 3, scope: !41) -// CHECK:STDOUT: !56 = !DILocation(line: 17, column: 1, scope: !41) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.036a5d5004ea8020:core.Destroy.Core", scope: null, file: !34, line: 22, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !38) -// CHECK:STDOUT: !59 = !DILocation(line: 22, column: 3, scope: !57) -// CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core", scope: null, file: !34, line: 20, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !38) -// CHECK:STDOUT: !63 = !DILocation(line: 20, column: 3, scope: !61) -// CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !34, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !68) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !38) -// CHECK:STDOUT: !67 = !DILocation(line: 18, column: 3, scope: !65) -// CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.417c9c4a651ab31b", scope: null, file: !34, line: 13, type: !47, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !76) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !38) -// CHECK:STDOUT: !75 = !DILocation(line: 14, column: 3, scope: !69) -// CHECK:STDOUT: !76 = !{!70} +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 17, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !39 = !DILocation(line: 18, column: 3, scope: !38) +// CHECK:STDOUT: !41 = !DILocation(line: 19, column: 5, scope: !38) +// CHECK:STDOUT: !42 = !DILocation(line: 19, column: 3, scope: !38) +// CHECK:STDOUT: !43 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !44 = !{!43, !43} +// CHECK:STDOUT: !45 = !DISubroutineType(types: !44) +// CHECK:STDOUT: !46 = !DILocation(line: 20, column: 3, scope: !38) +// CHECK:STDOUT: !48 = !DILocation(line: 21, column: 5, scope: !38) +// CHECK:STDOUT: !49 = !DILocation(line: 21, column: 3, scope: !38) +// CHECK:STDOUT: !50 = !DILocation(line: 22, column: 3, scope: !38) +// CHECK:STDOUT: !52 = !DILocation(line: 23, column: 5, scope: !38) +// CHECK:STDOUT: !53 = !DILocation(line: 23, column: 3, scope: !38) +// CHECK:STDOUT: !54 = !{null, !43} +// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) +// CHECK:STDOUT: !56 = !DILocation(line: 17, column: 1, scope: !38) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.417c9c4a651ab31b", scope: null, file: !34, line: 13, type: !45, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !64) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !43) +// CHECK:STDOUT: !63 = !DILocation(line: 14, column: 3, scope: !57) +// CHECK:STDOUT: !64 = !{!58} +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.eadf459918fc387c", scope: null, file: !26, line: 32, type: !55, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !87) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !43) +// CHECK:STDOUT: !86 = !DILocation(line: 32, column: 1, scope: !81) +// CHECK:STDOUT: !87 = !{!82} +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b18855c76072615b", scope: null, file: !26, line: 32, type: !55, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !94) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !43) +// CHECK:STDOUT: !93 = !DILocation(line: 32, column: 1, scope: !88) +// CHECK:STDOUT: !94 = !{!89} +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !26, line: 32, type: !55, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !101) +// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !43) +// CHECK:STDOUT: !100 = !DILocation(line: 32, column: 1, scope: !95) +// CHECK:STDOUT: !101 = !{!96} // 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 5f8e6020e1cb..2f1a34c173c1 100644 --- a/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon +++ b/toolchain/lower/testdata/function/generic/call_deref_ptr.carbon @@ -47,106 +47,102 @@ fn M() { // CHECK:STDOUT: %type.28 = type {} // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !44 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !45 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !47 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !45 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !47 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !47 -// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !49 -// CHECK:STDOUT: call void @_CF.Main.d86245b043c956e8(ptr %.loc39_5), !dbg !50 -// CHECK:STDOUT: %.loc40_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !51 -// CHECK:STDOUT: call void @_CF.Main.bf8f5dcfaf2cedb9(ptr %.loc40_5), !dbg !52 -// CHECK:STDOUT: call void @"_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !53 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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.7619ac942aa9029a: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.6fa1811d66e6eb5d: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.a17e1ddde5b22223:core.Destroy.Core"(ptr %self) #0 !dbg !66 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !68 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !40 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !42 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !40 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !40 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !42 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !42 +// CHECK:STDOUT: %.loc39_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !44 +// CHECK:STDOUT: call void @_CF.Main.091764f9509e9823(ptr %.loc39_5), !dbg !45 +// CHECK:STDOUT: %.loc40_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !49 +// CHECK:STDOUT: call void @_CF.Main.b5920d783ed6ed2a(ptr %.loc40_5), !dbg !50 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b18855c76072615b(ptr %ptr_f64.var), !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %ptr_i32.var), !dbg !40 +// 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.d86245b043c956e8(ptr %x) #0 !dbg !70 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.091764f9509e9823(ptr %x) #0 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %A.call = call %type.28 @_CA.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !73 -// CHECK:STDOUT: call void @_CB.Main.d86245b043c956e8(ptr %x), !dbg !77 -// CHECK:STDOUT: ret void, !dbg !78 +// CHECK:STDOUT: %A.call = call %type.28 @_CA.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !55 +// CHECK:STDOUT: call void @_CB.Main.091764f9509e9823(ptr %x), !dbg !59 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.bf8f5dcfaf2cedb9(ptr %x) #0 !dbg !80 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.b5920d783ed6ed2a(ptr %x) #0 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %A.call = call %type.28 @_CA.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !83 -// CHECK:STDOUT: call void @_CB.Main.bf8f5dcfaf2cedb9(ptr %x), !dbg !85 -// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: %A.call = call %type.28 @_CA.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !65 +// CHECK:STDOUT: call void @_CB.Main.b5920d783ed6ed2a(ptr %x), !dbg !67 +// CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.28 @_CA.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !88 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.28 %x, !dbg !94 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b18855c76072615b(ptr %t) #0 !dbg !70 { +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.d86245b043c956e8(ptr %x) #0 !dbg !96 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc27_7.3.temp = alloca i32, align 4, !dbg !101 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !101 -// CHECK:STDOUT: %.loc27_5.2 = load i32, ptr %x, align 4, !dbg !100 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.2fad9574e050607e(i32 %.loc27_5.2), !dbg !101 -// CHECK:STDOUT: store i32 %D.call, ptr %.loc27_7.3.temp, align 4, !dbg !101 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc27_7.3.temp), !dbg !101 -// CHECK:STDOUT: ret void, !dbg !104 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !77 { +// CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.bf8f5dcfaf2cedb9(ptr %x) #0 !dbg !106 { +// CHECK:STDOUT: define linkonce_odr %type.28 @_CA.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !84 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc27_7.3.temp = alloca double, align 8, !dbg !111 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !111 -// CHECK:STDOUT: %.loc27_5.2 = load double, ptr %x, align 8, !dbg !110 -// CHECK:STDOUT: %D.call = call double @_CD.Main.21aefb7dfdebb8e4(double %.loc27_5.2), !dbg !111 -// CHECK:STDOUT: store double %D.call, ptr %.loc27_7.3.temp, align 8, !dbg !111 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc27_7.3.temp), !dbg !111 -// CHECK:STDOUT: ret void, !dbg !112 +// CHECK:STDOUT: ret %type.28 %x, !dbg !90 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.2fad9574e050607e(i32 %x) #0 !dbg !114 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.091764f9509e9823(ptr %x) #0 !dbg !92 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !120 +// CHECK:STDOUT: %.loc27_7.3.temp = alloca i32, align 4, !dbg !97 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !97 +// CHECK:STDOUT: %.loc27_5.2 = load i32, ptr %x, align 4, !dbg !96 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.2fad9574e050607e(i32 %.loc27_5.2), !dbg !97 +// CHECK:STDOUT: store i32 %D.call, ptr %.loc27_7.3.temp, align 4, !dbg !97 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc27_7.3.temp), !dbg !97 +// CHECK:STDOUT: ret void, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CD.Main.21aefb7dfdebb8e4(double %x) #0 !dbg !122 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.b5920d783ed6ed2a(ptr %x) #0 !dbg !104 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret double %x, !dbg !128 +// CHECK:STDOUT: %.loc27_7.3.temp = alloca double, align 8, !dbg !109 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_7.3.temp), !dbg !109 +// CHECK:STDOUT: %.loc27_5.2 = load double, ptr %x, align 8, !dbg !108 +// CHECK:STDOUT: %D.call = call double @_CD.Main.21aefb7dfdebb8e4(double %.loc27_5.2), !dbg !109 +// CHECK:STDOUT: store double %D.call, ptr %.loc27_7.3.temp, align 8, !dbg !109 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc27_7.3.temp), !dbg !109 +// CHECK:STDOUT: ret void, !dbg !110 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.2fad9574e050607e(i32 %x) #0 !dbg !112 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret i32 %x, !dbg !118 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !120 { +// CHECK:STDOUT: ret void, !dbg !125 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr double @_CD.Main.21aefb7dfdebb8e4(double %x) #0 !dbg !127 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret double %x, !dbg !133 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !135 { +// CHECK:STDOUT: ret void, !dbg !140 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -161,78 +157,79 @@ fn M() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "call_deref_ptr.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !37 = !{null} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !{null, !36} -// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !42 = !{null, !41} -// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 35, type: !38, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !45 = !DILocation(line: 36, column: 3, scope: !44) -// CHECK:STDOUT: !47 = !DILocation(line: 37, column: 3, scope: !44) -// CHECK:STDOUT: !49 = !DILocation(line: 39, column: 5, scope: !44) -// CHECK:STDOUT: !50 = !DILocation(line: 39, column: 3, scope: !44) -// CHECK:STDOUT: !51 = !DILocation(line: 40, column: 5, scope: !44) -// CHECK:STDOUT: !52 = !DILocation(line: 40, column: 3, scope: !44) -// CHECK:STDOUT: !53 = !DILocation(line: 35, column: 1, scope: !44) -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !34, line: 39, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !36) -// CHECK:STDOUT: !56 = !DILocation(line: 39, column: 3, scope: !54) -// CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !34, line: 40, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !61) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !41) -// CHECK:STDOUT: !60 = !DILocation(line: 40, column: 3, scope: !58) -// CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core", scope: null, file: !34, line: 37, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !65) -// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !41) -// CHECK:STDOUT: !64 = !DILocation(line: 37, column: 3, scope: !62) -// CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !34, line: 36, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !69) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !41) -// CHECK:STDOUT: !68 = !DILocation(line: 36, column: 3, scope: !66) -// CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.d86245b043c956e8", scope: null, file: !34, line: 30, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !79) -// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !41) -// CHECK:STDOUT: !73 = !DILocation(line: 31, column: 3, scope: !70) -// CHECK:STDOUT: !74 = !{!41, !41} -// CHECK:STDOUT: !75 = !DISubroutineType(types: !74) -// CHECK:STDOUT: !77 = !DILocation(line: 32, column: 3, scope: !70) -// CHECK:STDOUT: !78 = !DILocation(line: 30, column: 1, scope: !70) -// CHECK:STDOUT: !79 = !{!71} -// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.bf8f5dcfaf2cedb9", scope: null, file: !34, line: 30, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !87) -// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !41) -// CHECK:STDOUT: !83 = !DILocation(line: 31, column: 3, scope: !80) -// CHECK:STDOUT: !85 = !DILocation(line: 32, column: 3, scope: !80) -// CHECK:STDOUT: !86 = !DILocation(line: 30, column: 1, scope: !80) -// CHECK:STDOUT: !87 = !{!81} -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c3359c2c217ad593", scope: null, file: !34, line: 18, type: !75, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !95) -// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !41) -// CHECK:STDOUT: !94 = !DILocation(line: 19, column: 3, scope: !88) -// CHECK:STDOUT: !95 = !{!89} -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.d86245b043c956e8", scope: null, file: !34, line: 26, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !105) -// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !41) -// CHECK:STDOUT: !100 = !DILocation(line: 27, column: 5, scope: !96) -// CHECK:STDOUT: !101 = !DILocation(line: 27, column: 3, scope: !96) -// CHECK:STDOUT: !102 = !{!36, !36} -// CHECK:STDOUT: !103 = !DISubroutineType(types: !102) -// CHECK:STDOUT: !104 = !DILocation(line: 26, column: 1, scope: !96) -// CHECK:STDOUT: !105 = !{!97} -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.bf8f5dcfaf2cedb9", scope: null, file: !34, line: 26, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !113) -// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !41) -// CHECK:STDOUT: !110 = !DILocation(line: 27, column: 5, scope: !106) -// CHECK:STDOUT: !111 = !DILocation(line: 27, column: 3, scope: !106) -// CHECK:STDOUT: !112 = !DILocation(line: 26, column: 1, scope: !106) -// CHECK:STDOUT: !113 = !{!107} -// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2fad9574e050607e", scope: null, file: !34, line: 22, type: !103, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !121) -// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !36) -// CHECK:STDOUT: !120 = !DILocation(line: 23, column: 3, scope: !114) -// CHECK:STDOUT: !121 = !{!115} -// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.21aefb7dfdebb8e4", scope: null, file: !34, line: 22, type: !75, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !129) -// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !41) -// CHECK:STDOUT: !128 = !DILocation(line: 23, column: 3, scope: !122) -// CHECK:STDOUT: !129 = !{!123} +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 35, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !40 = !DILocation(line: 36, column: 3, scope: !39) +// CHECK:STDOUT: !42 = !DILocation(line: 37, column: 3, scope: !39) +// CHECK:STDOUT: !44 = !DILocation(line: 39, column: 5, scope: !39) +// CHECK:STDOUT: !45 = !DILocation(line: 39, column: 3, scope: !39) +// CHECK:STDOUT: !46 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !47 = !{null, !46} +// CHECK:STDOUT: !48 = !DISubroutineType(types: !47) +// CHECK:STDOUT: !49 = !DILocation(line: 40, column: 5, scope: !39) +// CHECK:STDOUT: !50 = !DILocation(line: 40, column: 3, scope: !39) +// CHECK:STDOUT: !51 = !DILocation(line: 35, column: 1, scope: !39) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.091764f9509e9823", scope: null, file: !34, line: 30, type: !48, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !61) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !46) +// CHECK:STDOUT: !55 = !DILocation(line: 31, column: 3, scope: !52) +// CHECK:STDOUT: !56 = !{!46, !46} +// CHECK:STDOUT: !57 = !DISubroutineType(types: !56) +// CHECK:STDOUT: !59 = !DILocation(line: 32, column: 3, scope: !52) +// CHECK:STDOUT: !60 = !DILocation(line: 30, column: 1, scope: !52) +// CHECK:STDOUT: !61 = !{!53} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b5920d783ed6ed2a", scope: null, file: !34, line: 30, type: !48, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !69) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !46) +// CHECK:STDOUT: !65 = !DILocation(line: 31, column: 3, scope: !62) +// CHECK:STDOUT: !67 = !DILocation(line: 32, column: 3, scope: !62) +// CHECK:STDOUT: !68 = !DILocation(line: 30, column: 1, scope: !62) +// CHECK:STDOUT: !69 = !{!63} +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b18855c76072615b", scope: null, file: !26, line: 32, type: !48, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !76) +// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !46) +// CHECK:STDOUT: !75 = !DILocation(line: 32, column: 1, scope: !70) +// CHECK:STDOUT: !76 = !{!71} +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !26, line: 32, type: !48, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !83) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !46) +// CHECK:STDOUT: !82 = !DILocation(line: 32, column: 1, scope: !77) +// CHECK:STDOUT: !83 = !{!78} +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c3359c2c217ad593", scope: null, file: !34, line: 18, type: !57, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !91) +// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !46) +// CHECK:STDOUT: !90 = !DILocation(line: 19, column: 3, scope: !84) +// CHECK:STDOUT: !91 = !{!85} +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.091764f9509e9823", scope: null, file: !34, line: 26, type: !48, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !103) +// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !46) +// CHECK:STDOUT: !96 = !DILocation(line: 27, column: 5, scope: !92) +// CHECK:STDOUT: !97 = !DILocation(line: 27, column: 3, scope: !92) +// CHECK:STDOUT: !98 = !{!36, !36} +// CHECK:STDOUT: !99 = !DISubroutineType(types: !98) +// CHECK:STDOUT: !100 = !{null, !36} +// CHECK:STDOUT: !101 = !DISubroutineType(types: !100) +// CHECK:STDOUT: !102 = !DILocation(line: 26, column: 1, scope: !92) +// CHECK:STDOUT: !103 = !{!93} +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.b5920d783ed6ed2a", scope: null, file: !34, line: 26, type: !48, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !111) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !46) +// CHECK:STDOUT: !108 = !DILocation(line: 27, column: 5, scope: !104) +// CHECK:STDOUT: !109 = !DILocation(line: 27, column: 3, scope: !104) +// CHECK:STDOUT: !110 = !DILocation(line: 26, column: 1, scope: !104) +// CHECK:STDOUT: !111 = !{!105} +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2fad9574e050607e", scope: null, file: !34, line: 22, type: !99, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !119) +// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !36) +// CHECK:STDOUT: !118 = !DILocation(line: 23, column: 3, scope: !112) +// CHECK:STDOUT: !119 = !{!113} +// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 32, type: !101, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !126) +// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !36) +// CHECK:STDOUT: !125 = !DILocation(line: 32, column: 1, scope: !120) +// CHECK:STDOUT: !126 = !{!121} +// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.21aefb7dfdebb8e4", scope: null, file: !34, line: 22, type: !57, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !134) +// CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !127, type: !46) +// CHECK:STDOUT: !133 = !DILocation(line: 23, column: 3, scope: !127) +// CHECK:STDOUT: !134 = !{!128} +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !26, line: 32, type: !48, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !141) +// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !46) +// CHECK:STDOUT: !140 = !DILocation(line: 32, column: 1, scope: !135) +// CHECK:STDOUT: !141 = !{!136} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon index 172ef4f3a43c..145ffe193a4d 100644 --- a/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_associated_const.carbon @@ -42,48 +42,46 @@ fn H() { // CHECK:STDOUT: source_filename = "call_different_associated_const.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CH.Main() #0 !dbg !41 { +// CHECK:STDOUT: define void @_CH.Main() #0 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CG.Main.0676fa98bb7dbd66(), !dbg !42 -// CHECK:STDOUT: call void @_CG.Main.3e979ea3a37f4bf1(), !dbg !43 -// CHECK:STDOUT: ret void, !dbg !44 +// CHECK:STDOUT: call void @_CG.Main.0676fa98bb7dbd66(), !dbg !39 +// CHECK:STDOUT: call void @_CG.Main.3e979ea3a37f4bf1(), !dbg !40 +// CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core"(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.0676fa98bb7dbd66() #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: %_.var = alloca ptr, align 8, !dbg !43 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !43 +// CHECK:STDOUT: store ptr poison, ptr %_.var, align 8, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.393ac80c0c8a44df(ptr %_.var), !dbg !43 +// CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.3e979ea3a37f4bf1() #0 !dbg !49 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !51 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.0676fa98bb7dbd66() #0 !dbg !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca ptr, align 8, !dbg !54 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !54 -// CHECK:STDOUT: store ptr poison, ptr %_.var, align 8, !dbg !54 -// CHECK:STDOUT: call void @"_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core"(ptr %_.var), !dbg !54 -// CHECK:STDOUT: ret void, !dbg !56 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.3e979ea3a37f4bf1() #0 !dbg !57 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca ptr, align 8, !dbg !58 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !58 -// CHECK:STDOUT: store ptr poison, ptr %_.var, align 8, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %_.var), !dbg !58 -// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: %_.var = alloca ptr, align 8, !dbg !50 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !50 +// CHECK:STDOUT: store ptr poison, ptr %_.var, align 8, !dbg !50 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %_.var), !dbg !50 +// CHECK:STDOUT: ret void, !dbg !52 // 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 @_CSelfDestruct.Core.393ac80c0c8a44df(ptr %t) #0 !dbg !53 { +// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !60 { +// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } // CHECK:STDOUT: @@ -95,29 +93,30 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "call_different_associated_const.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !{null} // CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !39 = !{null, !38} -// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !34, line: 35, type: !37, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !42 = !DILocation(line: 36, column: 3, scope: !41) -// CHECK:STDOUT: !43 = !DILocation(line: 37, column: 3, scope: !41) -// CHECK:STDOUT: !44 = !DILocation(line: 35, column: 1, scope: !41) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core", scope: null, file: !34, line: 23, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !38) -// CHECK:STDOUT: !47 = !DILocation(line: 23, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !34, line: 23, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !52) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !38) -// CHECK:STDOUT: !51 = !DILocation(line: 23, column: 3, scope: !49) -// CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.0676fa98bb7dbd66", scope: null, file: !34, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !54 = !DILocation(line: 23, column: 3, scope: !53) -// CHECK:STDOUT: !56 = !DILocation(line: 22, column: 1, scope: !53) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.3e979ea3a37f4bf1", scope: null, file: !34, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !58 = !DILocation(line: 23, column: 3, scope: !57) -// CHECK:STDOUT: !60 = !DILocation(line: 22, column: 1, scope: !57) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "H", linkageName: "_CH.Main", scope: null, file: !34, line: 35, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !39 = !DILocation(line: 36, column: 3, scope: !38) +// CHECK:STDOUT: !40 = !DILocation(line: 37, column: 3, scope: !38) +// CHECK:STDOUT: !41 = !DILocation(line: 35, column: 1, scope: !38) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.0676fa98bb7dbd66", scope: null, file: !34, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !43 = !DILocation(line: 23, column: 3, scope: !42) +// CHECK:STDOUT: !45 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !46 = !{null, !45} +// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) +// CHECK:STDOUT: !48 = !DILocation(line: 22, column: 1, scope: !42) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.3e979ea3a37f4bf1", scope: null, file: !34, line: 22, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !50 = !DILocation(line: 23, column: 3, scope: !49) +// CHECK:STDOUT: !52 = !DILocation(line: 22, column: 1, scope: !49) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.393ac80c0c8a44df", scope: null, file: !26, line: 32, type: !47, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !59) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !45) +// CHECK:STDOUT: !58 = !DILocation(line: 32, column: 1, scope: !53) +// CHECK:STDOUT: !59 = !{!54} +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !26, line: 32, type: !47, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !66) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !45) +// CHECK:STDOUT: !65 = !DILocation(line: 32, column: 1, scope: !60) +// CHECK:STDOUT: !66 = !{!61} // 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 c45f4bd08eb0..37c260aa18de 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 @@ -50,70 +50,68 @@ fn Run() { // CHECK:STDOUT: @printf.int.format = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !16 { +// CHECK:STDOUT: define i1 @"_CF.X.Main:I.Main"() #0 !dbg !12 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !18 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !15 +// CHECK:STDOUT: ret i1 false, !dbg !16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @"_CF.X.Main:I.Main"() #0 !dbg !20 { +// CHECK:STDOUT: define i32 @"_CF.Y.Main:I.Main"() #0 !dbg !17 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !23 -// CHECK:STDOUT: ret i1 false, !dbg !24 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !20 +// CHECK:STDOUT: ret i32 2, !dbg !21 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !25 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !22 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !27 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_CF.Y.Main:I.Main"() #0 !dbg !29 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !32 -// CHECK:STDOUT: ret i32 2, !dbg !33 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !34 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CG.Main.d0cc85b6c89517e3(), !dbg !35 -// CHECK:STDOUT: call void @_CG.Main.e8d4d639bae9ba40(), !dbg !38 -// CHECK:STDOUT: ret i32 0, !dbg !39 +// CHECK:STDOUT: call void @_CG.Main.d0cc85b6c89517e3(), !dbg !23 +// CHECK:STDOUT: call void @_CG.Main.e8d4d639bae9ba40(), !dbg !26 +// CHECK:STDOUT: ret i32 0, !dbg !27 // 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 !40 { +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.d0cc85b6c89517e3() #0 !dbg !28 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc38_20.1.temp = alloca i1, align 1, !dbg !41 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc38_20.1.temp), !dbg !41 -// CHECK:STDOUT: %I.WithSelf.F.call = call i1 @"_CF.X.Main:I.Main"(), !dbg !41 -// CHECK:STDOUT: %.loc38_20.2 = zext i1 %I.WithSelf.F.call to i8, !dbg !41 -// CHECK:STDOUT: store i8 %.loc38_20.2, ptr %.loc38_20.1.temp, align 1, !dbg !41 -// CHECK:STDOUT: %.loc38_20.3 = load i8, ptr %.loc38_20.1.temp, align 1, !dbg !41 -// CHECK:STDOUT: %.loc38_20.31 = trunc i8 %.loc38_20.3 to i1, !dbg !41 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc38_20.1.temp), !dbg !41 -// CHECK:STDOUT: ret void, !dbg !44 +// CHECK:STDOUT: %.loc38_20.1.temp = alloca i1, align 1, !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc38_20.1.temp), !dbg !29 +// CHECK:STDOUT: %I.WithSelf.F.call = call i1 @"_CF.X.Main:I.Main"(), !dbg !29 +// CHECK:STDOUT: %.loc38_20.2 = zext i1 %I.WithSelf.F.call to i8, !dbg !29 +// CHECK:STDOUT: store i8 %.loc38_20.2, ptr %.loc38_20.1.temp, align 1, !dbg !29 +// CHECK:STDOUT: %.loc38_20.3 = load i8, ptr %.loc38_20.1.temp, align 1, !dbg !29 +// CHECK:STDOUT: %.loc38_20.31 = trunc i8 %.loc38_20.3 to i1, !dbg !29 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %.loc38_20.1.temp), !dbg !29 +// CHECK:STDOUT: ret void, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CG.Main.e8d4d639bae9ba40() #0 !dbg !45 { +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.e8d4d639bae9ba40() #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc38_20.1.temp = alloca i32, align 4, !dbg !46 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc38_20.1.temp), !dbg !46 -// CHECK:STDOUT: %I.WithSelf.F.call = call i32 @"_CF.Y.Main:I.Main"(), !dbg !46 -// CHECK:STDOUT: store i32 %I.WithSelf.F.call, ptr %.loc38_20.1.temp, align 4, !dbg !46 -// CHECK:STDOUT: %.loc38_20.3 = load i32, ptr %.loc38_20.1.temp, align 4, !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc38_20.1.temp), !dbg !46 -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: %.loc38_20.1.temp = alloca i32, align 4, !dbg !36 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc38_20.1.temp), !dbg !36 +// CHECK:STDOUT: %I.WithSelf.F.call = call i32 @"_CF.Y.Main:I.Main"(), !dbg !36 +// CHECK:STDOUT: store i32 %I.WithSelf.F.call, ptr %.loc38_20.1.temp, align 4, !dbg !36 +// CHECK:STDOUT: %.loc38_20.3 = load i32, ptr %.loc38_20.1.temp, align 4, !dbg !36 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc38_20.1.temp), !dbg !36 +// 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: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %t) #0 !dbg !43 { +// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !50 { +// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @printf, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } @@ -130,38 +128,39 @@ fn Run() { // CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !4, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !8 = !{null, !7} +// CHECK:STDOUT: !8 = !{!7} // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !10 = !{!7} +// CHECK:STDOUT: !10 = !{!6} // CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{null, !6} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = !{!6} -// CHECK:STDOUT: !15 = !DISubroutineType(types: !14) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 21, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !19) -// CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !16, type: !7) -// CHECK:STDOUT: !18 = !DILocation(line: 21, column: 24, scope: !16) -// CHECK:STDOUT: !19 = !{!17} -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !4, line: 22, type: !11, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !23 = !DILocation(line: 23, column: 5, scope: !20) -// CHECK:STDOUT: !24 = !DILocation(line: 24, column: 5, scope: !20) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 28, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !28) -// 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: "F", linkageName: "_CF.Y.Main:I.Main", scope: null, file: !4, line: 29, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !32 = !DILocation(line: 30, column: 5, scope: !29) -// CHECK:STDOUT: !33 = !DILocation(line: 31, column: 5, scope: !29) -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !4, line: 41, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !35 = !DILocation(line: 42, column: 3, scope: !34) -// CHECK:STDOUT: !36 = !{null} -// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !38 = !DILocation(line: 43, column: 3, scope: !34) -// CHECK:STDOUT: !39 = !DILocation(line: 41, column: 1, scope: !34) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.d0cc85b6c89517e3", scope: null, file: !4, line: 37, type: !37, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !41 = !DILocation(line: 38, column: 16, scope: !40) -// CHECK:STDOUT: !44 = !DILocation(line: 37, column: 1, scope: !40) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.e8d4d639bae9ba40", scope: null, file: !4, line: 37, type: !37, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !46 = !DILocation(line: 38, column: 16, scope: !45) -// CHECK:STDOUT: !49 = !DILocation(line: 37, column: 1, scope: !45) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !4, line: 22, type: !9, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !15 = !DILocation(line: 23, column: 5, scope: !12) +// CHECK:STDOUT: !16 = !DILocation(line: 24, column: 5, scope: !12) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "F", linkageName: "_CF.Y.Main:I.Main", scope: null, file: !4, line: 29, type: !11, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !20 = !DILocation(line: 30, column: 5, scope: !17) +// CHECK:STDOUT: !21 = !DILocation(line: 31, column: 5, scope: !17) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !4, line: 41, type: !11, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !23 = !DILocation(line: 42, column: 3, scope: !22) +// CHECK:STDOUT: !24 = !{null} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = !DILocation(line: 43, column: 3, scope: !22) +// CHECK:STDOUT: !27 = !DILocation(line: 41, column: 1, scope: !22) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.d0cc85b6c89517e3", scope: null, file: !4, line: 37, type: !25, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !29 = !DILocation(line: 38, column: 16, scope: !28) +// CHECK:STDOUT: !32 = !{null, !7} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 37, column: 1, scope: !28) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.e8d4d639bae9ba40", scope: null, file: !4, line: 37, type: !25, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !36 = !DILocation(line: 38, column: 16, scope: !35) +// CHECK:STDOUT: !39 = !{null, !6} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !DILocation(line: 37, column: 1, scope: !35) +// CHECK:STDOUT: !42 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.29e6aa423646b61a", scope: null, file: !42, line: 36, type: !33, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !49) +// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !7) +// CHECK:STDOUT: !48 = !DILocation(line: 36, column: 1, scope: !43) +// CHECK:STDOUT: !49 = !{!44} +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !42, line: 36, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !56) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !6) +// CHECK:STDOUT: !55 = !DILocation(line: 36, column: 1, scope: !50) +// CHECK:STDOUT: !56 = !{!51} // 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 e42c5a03e6fe..ba4c6b29e5c4 100644 --- a/toolchain/lower/testdata/function/generic/call_different_specific.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_specific.carbon @@ -51,78 +51,71 @@ fn M(ptr_i32: i32*, ptr_f64: f64*) { // CHECK:STDOUT: %type.0 = type {} // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main(ptr %ptr_i32, ptr %ptr_f64) #0 !dbg !14 { +// CHECK:STDOUT: define void @_CM.Main(ptr %ptr_i32, ptr %ptr_f64) #0 !dbg !10 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.d86245b043c956e8(ptr %ptr_i32), !dbg !20 -// CHECK:STDOUT: call void @_CF.Main.bf8f5dcfaf2cedb9(ptr %ptr_f64), !dbg !22 -// CHECK:STDOUT: ret void, !dbg !23 +// CHECK:STDOUT: call void @_CF.Main.091764f9509e9823(ptr %ptr_i32), !dbg !16 +// CHECK:STDOUT: call void @_CF.Main.b5920d783ed6ed2a(ptr %ptr_f64), !dbg !20 +// CHECK:STDOUT: ret void, !dbg !21 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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.7619ac942aa9029a:core.Destroy.Core"(ptr %self) #0 !dbg !29 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.091764f9509e9823(ptr %x) #0 !dbg !23 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %A.call = call %type.0 @_CA.Main.c3359c2c217ad593(%type.0 zeroinitializer), !dbg !26 +// CHECK:STDOUT: call void @_CB.Main.091764f9509e9823(ptr %x), !dbg !30 // CHECK:STDOUT: ret void, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.d86245b043c956e8(ptr %x) #0 !dbg !33 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.b5920d783ed6ed2a(ptr %x) #0 !dbg !33 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %A.call = call %type.0 @_CA.Main.c3359c2c217ad593(%type.0 zeroinitializer), !dbg !36 -// CHECK:STDOUT: call void @_CB.Main.d86245b043c956e8(ptr %x), !dbg !40 -// CHECK:STDOUT: ret void, !dbg !41 +// CHECK:STDOUT: call void @_CB.Main.b5920d783ed6ed2a(ptr %x), !dbg !38 +// CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.bf8f5dcfaf2cedb9(ptr %x) #0 !dbg !43 { +// CHECK:STDOUT: define linkonce_odr %type.0 @_CA.Main.c3359c2c217ad593(%type.0 %x) #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %A.call = call %type.0 @_CA.Main.c3359c2c217ad593(%type.0 zeroinitializer), !dbg !46 -// CHECK:STDOUT: call void @_CB.Main.bf8f5dcfaf2cedb9(ptr %x), !dbg !48 -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: ret %type.0 %x, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.0 @_CA.Main.c3359c2c217ad593(%type.0 %x) #0 !dbg !51 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.091764f9509e9823(ptr %x) #0 !dbg !49 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.0 %x, !dbg !57 +// CHECK:STDOUT: %.loc34_7.3.temp = alloca i32, align 4, !dbg !54 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !54 +// CHECK:STDOUT: %.loc34_5.2 = load i32, ptr %x, align 4, !dbg !53 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.2fad9574e050607e(i32 %.loc34_5.2), !dbg !54 +// CHECK:STDOUT: store i32 %D.call, ptr %.loc34_7.3.temp, align 4, !dbg !54 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc34_7.3.temp), !dbg !54 +// CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.d86245b043c956e8(ptr %x) #0 !dbg !59 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.b5920d783ed6ed2a(ptr %x) #0 !dbg !61 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc34_7.3.temp = alloca i32, align 4, !dbg !64 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !64 -// CHECK:STDOUT: %.loc34_5.2 = load i32, ptr %x, align 4, !dbg !63 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.2fad9574e050607e(i32 %.loc34_5.2), !dbg !64 -// CHECK:STDOUT: store i32 %D.call, ptr %.loc34_7.3.temp, align 4, !dbg !64 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc34_7.3.temp), !dbg !64 +// CHECK:STDOUT: %.loc34_7.3.temp = alloca double, align 8, !dbg !66 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !66 +// CHECK:STDOUT: %.loc34_5.2 = load double, ptr %x, align 8, !dbg !65 +// CHECK:STDOUT: %D.call = call double @_CD.Main.21aefb7dfdebb8e4(double %.loc34_5.2), !dbg !66 +// CHECK:STDOUT: store double %D.call, ptr %.loc34_7.3.temp, align 8, !dbg !66 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc34_7.3.temp), !dbg !66 // CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.bf8f5dcfaf2cedb9(ptr %x) #0 !dbg !69 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc34_7.3.temp = alloca double, align 8, !dbg !74 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !74 -// CHECK:STDOUT: %.loc34_5.2 = load double, ptr %x, align 8, !dbg !73 -// CHECK:STDOUT: %D.call = call double @_CD.Main.21aefb7dfdebb8e4(double %.loc34_5.2), !dbg !74 -// CHECK:STDOUT: store double %D.call, ptr %.loc34_7.3.temp, align 8, !dbg !74 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc34_7.3.temp), !dbg !74 -// 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: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.2fad9574e050607e(i32 %x) #0 !dbg !77 { +// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.2fad9574e050607e(i32 %x) #0 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !83 +// CHECK:STDOUT: ret i32 %x, !dbg !75 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !78 { +// CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind @@ -131,6 +124,11 @@ fn M(ptr_i32: i32*, ptr_f64: f64*) { // CHECK:STDOUT: ret double %x, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !93 { +// CHECK:STDOUT: ret void, !dbg !98 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_CA.Main.c3359c2c217ad593, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } @@ -149,63 +147,64 @@ fn M(ptr_i32: i32*, ptr_f64: f64*) { // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !{null, !7, !7} // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !10 = !{null, !6} -// CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{null, !7} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 42, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !24) -// CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !14, type: !7) -// CHECK:STDOUT: !16 = !DILocalVariable(arg: 2, scope: !14, type: !7) -// CHECK:STDOUT: !20 = !DILocation(line: 43, column: 3, scope: !14) -// CHECK:STDOUT: !22 = !DILocation(line: 44, column: 3, scope: !14) -// CHECK:STDOUT: !23 = !DILocation(line: 42, column: 1, scope: !14) -// CHECK:STDOUT: !24 = !{!15, !16} -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 43, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !28) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !4, line: 44, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) -// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !7) -// CHECK:STDOUT: !31 = !DILocation(line: 44, column: 3, scope: !29) -// CHECK:STDOUT: !32 = !{!30} -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.d86245b043c956e8", scope: null, file: !4, line: 37, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 42, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !22) +// CHECK:STDOUT: !11 = !DILocalVariable(arg: 1, scope: !10, type: !7) +// CHECK:STDOUT: !12 = !DILocalVariable(arg: 2, scope: !10, type: !7) +// CHECK:STDOUT: !16 = !DILocation(line: 43, column: 3, scope: !10) +// CHECK:STDOUT: !17 = !{null, !7} +// CHECK:STDOUT: !18 = !DISubroutineType(types: !17) +// CHECK:STDOUT: !20 = !DILocation(line: 44, column: 3, scope: !10) +// CHECK:STDOUT: !21 = !DILocation(line: 42, column: 1, scope: !10) +// CHECK:STDOUT: !22 = !{!11, !12} +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.091764f9509e9823", scope: null, file: !4, line: 37, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) +// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !23, type: !7) +// CHECK:STDOUT: !26 = !DILocation(line: 38, column: 3, scope: !23) +// CHECK:STDOUT: !27 = !{!7, !7} +// CHECK:STDOUT: !28 = !DISubroutineType(types: !27) +// CHECK:STDOUT: !30 = !DILocation(line: 39, column: 3, scope: !23) +// CHECK:STDOUT: !31 = !DILocation(line: 37, column: 1, scope: !23) +// CHECK:STDOUT: !32 = !{!24} +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.b5920d783ed6ed2a", scope: null, file: !4, line: 37, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !40) // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !33, type: !7) // CHECK:STDOUT: !36 = !DILocation(line: 38, column: 3, scope: !33) -// CHECK:STDOUT: !37 = !{!7, !7} -// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !40 = !DILocation(line: 39, column: 3, scope: !33) -// CHECK:STDOUT: !41 = !DILocation(line: 37, column: 1, scope: !33) -// CHECK:STDOUT: !42 = !{!34} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.bf8f5dcfaf2cedb9", scope: null, file: !4, line: 37, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) -// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !7) -// CHECK:STDOUT: !46 = !DILocation(line: 38, column: 3, scope: !43) -// CHECK:STDOUT: !48 = !DILocation(line: 39, column: 3, scope: !43) -// CHECK:STDOUT: !49 = !DILocation(line: 37, column: 1, scope: !43) -// CHECK:STDOUT: !50 = !{!44} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c3359c2c217ad593", scope: null, file: !4, line: 25, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !58) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !7) -// CHECK:STDOUT: !57 = !DILocation(line: 26, column: 3, scope: !51) -// CHECK:STDOUT: !58 = !{!52} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.d86245b043c956e8", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !7) -// CHECK:STDOUT: !63 = !DILocation(line: 34, column: 5, scope: !59) -// CHECK:STDOUT: !64 = !DILocation(line: 34, column: 3, scope: !59) -// CHECK:STDOUT: !65 = !{!6, !6} -// CHECK:STDOUT: !66 = !DISubroutineType(types: !65) -// CHECK:STDOUT: !67 = !DILocation(line: 33, column: 1, scope: !59) -// CHECK:STDOUT: !68 = !{!60} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.bf8f5dcfaf2cedb9", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !7) -// CHECK:STDOUT: !73 = !DILocation(line: 34, column: 5, scope: !69) -// CHECK:STDOUT: !74 = !DILocation(line: 34, column: 3, scope: !69) -// CHECK:STDOUT: !75 = !DILocation(line: 33, column: 1, scope: !69) +// CHECK:STDOUT: !38 = !DILocation(line: 39, column: 3, scope: !33) +// CHECK:STDOUT: !39 = !DILocation(line: 37, column: 1, scope: !33) +// CHECK:STDOUT: !40 = !{!34} +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.c3359c2c217ad593", scope: null, file: !4, line: 25, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !48) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !7) +// CHECK:STDOUT: !47 = !DILocation(line: 26, column: 3, scope: !41) +// CHECK:STDOUT: !48 = !{!42} +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.091764f9509e9823", scope: null, file: !4, line: 33, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !60) +// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !7) +// CHECK:STDOUT: !53 = !DILocation(line: 34, column: 5, scope: !49) +// CHECK:STDOUT: !54 = !DILocation(line: 34, column: 3, scope: !49) +// CHECK:STDOUT: !55 = !{!6, !6} +// CHECK:STDOUT: !56 = !DISubroutineType(types: !55) +// CHECK:STDOUT: !57 = !{null, !6} +// CHECK:STDOUT: !58 = !DISubroutineType(types: !57) +// CHECK:STDOUT: !59 = !DILocation(line: 33, column: 1, scope: !49) +// CHECK:STDOUT: !60 = !{!50} +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.b5920d783ed6ed2a", scope: null, file: !4, line: 33, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68) +// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !7) +// CHECK:STDOUT: !65 = !DILocation(line: 34, column: 5, scope: !61) +// CHECK:STDOUT: !66 = !DILocation(line: 34, column: 3, scope: !61) +// CHECK:STDOUT: !67 = !DILocation(line: 33, column: 1, scope: !61) +// CHECK:STDOUT: !68 = !{!62} +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2fad9574e050607e", scope: null, file: !4, line: 29, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !6) +// CHECK:STDOUT: !75 = !DILocation(line: 30, column: 3, scope: !69) // CHECK:STDOUT: !76 = !{!70} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2fad9574e050607e", scope: null, file: !4, line: 29, type: !66, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !6) -// CHECK:STDOUT: !83 = !DILocation(line: 30, column: 3, scope: !77) -// CHECK:STDOUT: !84 = !{!78} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 29, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) +// CHECK:STDOUT: !77 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !77, line: 36, type: !58, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !6) +// CHECK:STDOUT: !83 = !DILocation(line: 36, column: 1, scope: !78) +// CHECK:STDOUT: !84 = !{!79} +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 29, type: !28, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) // CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !7) // CHECK:STDOUT: !91 = !DILocation(line: 30, column: 3, scope: !85) // CHECK:STDOUT: !92 = !{!86} +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !77, line: 36, type: !18, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !99) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !7) +// CHECK:STDOUT: !98 = !DILocation(line: 36, column: 1, scope: !93) +// CHECK:STDOUT: !99 = !{!94} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_method.carbon b/toolchain/lower/testdata/function/generic/call_method.carbon index c81b0ae81320..b7dcfe333050 100644 --- a/toolchain/lower/testdata/function/generic/call_method.carbon +++ b/toolchain/lower/testdata/function/generic/call_method.carbon @@ -26,42 +26,24 @@ fn CallF() -> i32 { // CHECK:STDOUT: ; ModuleID = 'call_method.carbon' // CHECK:STDOUT: source_filename = "call_method.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @C.val.loc20_3 = internal constant {} zeroinitializer +// CHECK:STDOUT: @C.val.loc20_3.1 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CCallF.Main() #0 !dbg !28 { +// CHECK:STDOUT: define i32 @_CCallF.Main() #0 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !31 -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !33 -// 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.loc20_3, i64 0, i1 false), !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !33 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !33 -// CHECK:STDOUT: %.loc22_14 = load i32, ptr %n.var, align 4, !dbg !36 -// CHECK:STDOUT: %C.F.call = call i32 @_CF.C.Main.2fad9574e050607e(ptr %c.var, i32 %.loc22_14), !dbg !35 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !31 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !26 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !28 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !26 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc20_3.1, i64 0, i1 false), !dbg !26 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !28 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !28 +// CHECK:STDOUT: %.loc22_14 = load i32, ptr %n.var, align 4, !dbg !31 +// CHECK:STDOUT: %C.F.call = call i32 @_CF.C.Main.2fad9574e050607e(ptr %c.var, i32 %.loc22_14), !dbg !30 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %c.var), !dbg !26 // CHECK:STDOUT: ret i32 %C.F.call, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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.cb8adced19392b99: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.08d9e38b928ba575: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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: @@ -69,9 +51,19 @@ 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.2fad9574e050607e(ptr %self, i32 %x) #0 !dbg !52 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.C.Main.2fad9574e050607e(ptr %self, i32 %x) #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !60 +// CHECK:STDOUT: ret i32 %x, !dbg !48 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !50 { +// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !57 { +// CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -85,39 +77,36 @@ fn CallF() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "call_method.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !26 = !{null, !25} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !18, line: 19, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 20, column: 3, scope: !28) -// CHECK:STDOUT: !33 = !DILocation(line: 21, column: 3, scope: !28) -// CHECK:STDOUT: !35 = !DILocation(line: 22, column: 10, scope: !28) -// CHECK:STDOUT: !36 = !DILocation(line: 22, column: 14, scope: !28) -// CHECK:STDOUT: !37 = !{!20, !25, !20} +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !18, line: 19, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !26 = !DILocation(line: 20, column: 3, scope: !23) +// CHECK:STDOUT: !28 = !DILocation(line: 21, column: 3, scope: !23) +// CHECK:STDOUT: !30 = !DILocation(line: 22, column: 10, scope: !23) +// CHECK:STDOUT: !31 = !DILocation(line: 22, column: 14, scope: !23) +// CHECK:STDOUT: !32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !33 = !{!20, !32, !20} +// CHECK:STDOUT: !34 = !DISubroutineType(types: !33) +// CHECK:STDOUT: !35 = !{null, !20} +// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) +// CHECK:STDOUT: !37 = !{null, !32} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !DILocation(line: 22, column: 3, scope: !28) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 21, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !25) -// CHECK:STDOUT: !46 = !DILocation(line: 20, column: 3, scope: !44) -// CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575: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: "F", linkageName: "_CF.C.Main.2fad9574e050607e", scope: null, file: !18, line: 14, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !61) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !25) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 2, scope: !52, type: !20) -// CHECK:STDOUT: !60 = !DILocation(line: 15, column: 5, scope: !52) -// CHECK:STDOUT: !61 = !{!53, !54} +// CHECK:STDOUT: !39 = !DILocation(line: 22, column: 3, scope: !23) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.2fad9574e050607e", scope: null, file: !18, line: 14, type: !34, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !32) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 2, scope: !40, type: !20) +// CHECK:STDOUT: !48 = !DILocation(line: 15, column: 5, scope: !40) +// CHECK:STDOUT: !49 = !{!41, !42} +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !36, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !20) +// CHECK:STDOUT: !55 = !DILocation(line: 32, column: 1, scope: !50) +// CHECK:STDOUT: !56 = !{!51} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !10, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !32) +// CHECK:STDOUT: !62 = !DILocation(line: 32, column: 1, scope: !57) +// CHECK:STDOUT: !63 = !{!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 bd85ac5f691b..a081fd94d385 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_basic.carbon @@ -47,86 +47,50 @@ fn M() { // CHECK:STDOUT: @C.val.loc15_43 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_COp.C.Main:Copy.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !16 { +// CHECK:STDOUT: define void @"_COp.C.Main:Copy.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !12 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.loc15_43, i64 0, i1 false), !dbg !21 -// CHECK:STDOUT: ret void, !dbg !21 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.loc15_43, i64 0, i1 false), !dbg !17 +// CHECK:STDOUT: ret void, !dbg !17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !23 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !19 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !24 -// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !26 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !28 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !32 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !48 -// CHECK:STDOUT: %.loc40_9.3.temp = alloca {}, align 1, !dbg !51 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !24 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !24 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !26 -// CHECK:STDOUT: store double 1.000000e+00, ptr %m.var, align 8, !dbg !26 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !28 -// CHECK:STDOUT: store ptr %n.var, ptr %ptr_i32.var, align 8, !dbg !28 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !32 -// CHECK:STDOUT: store ptr %m.var, ptr %ptr_f64.var, align 8, !dbg !32 -// CHECK:STDOUT: %.loc34_5 = load i32, ptr %n.var, align 4, !dbg !36 -// CHECK:STDOUT: %F.call.loc34 = call i32 @_CF.Main.2fad9574e050607e(i32 %.loc34_5, i32 0), !dbg !37 -// CHECK:STDOUT: %.loc35_5 = load double, ptr %m.var, align 8, !dbg !40 -// CHECK:STDOUT: %F.call.loc35 = call double @_CF.Main.21aefb7dfdebb8e4(double %.loc35_5, i32 0), !dbg !41 -// CHECK:STDOUT: %.loc36_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !44 -// CHECK:STDOUT: %F.call.loc36 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc36_5, i32 0), !dbg !45 -// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !46 -// CHECK:STDOUT: %F.call.loc37 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc37_5, i32 0), !dbg !47 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !48 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc15_43, i64 0, i1 false), !dbg !48 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc40_9.3.temp), !dbg !51 -// CHECK:STDOUT: call void @_CF.Main.42513763e01cba2c(ptr %.loc40_9.3.temp, ptr %c.var, i32 0), !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc40_9.3.temp), !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !32 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !28 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %m.var), !dbg !26 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !24 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !20 +// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !22 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !24 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !28 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !44 +// CHECK:STDOUT: %.loc40_9.3.temp = alloca {}, align 1, !dbg !47 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !20 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !20 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !22 +// CHECK:STDOUT: store double 1.000000e+00, ptr %m.var, align 8, !dbg !22 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !24 +// CHECK:STDOUT: store ptr %n.var, ptr %ptr_i32.var, align 8, !dbg !24 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !28 +// CHECK:STDOUT: store ptr %m.var, ptr %ptr_f64.var, align 8, !dbg !28 +// CHECK:STDOUT: %.loc34_5 = load i32, ptr %n.var, align 4, !dbg !32 +// CHECK:STDOUT: %F.call.loc34 = call i32 @_CF.Main.2fad9574e050607e(i32 %.loc34_5, i32 0), !dbg !33 +// CHECK:STDOUT: %.loc35_5 = load double, ptr %m.var, align 8, !dbg !36 +// CHECK:STDOUT: %F.call.loc35 = call double @_CF.Main.21aefb7dfdebb8e4(double %.loc35_5, i32 0), !dbg !37 +// CHECK:STDOUT: %.loc36_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !40 +// CHECK:STDOUT: %F.call.loc36 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc36_5, i32 0), !dbg !41 +// CHECK:STDOUT: %.loc37_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !42 +// CHECK:STDOUT: %F.call.loc37 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc37_5, i32 0), !dbg !43 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !44 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc15_43, i64 0, i1 false), !dbg !44 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc40_9.3.temp), !dbg !47 +// CHECK:STDOUT: call void @_CF.Main.42513763e01cba2c(ptr %.loc40_9.3.temp, ptr %c.var, i32 0), !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %.loc40_9.3.temp), !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %c.var), !dbg !44 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b18855c76072615b(ptr %ptr_f64.var), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %ptr_i32.var), !dbg !24 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %m.var), !dbg !22 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !20 // CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99: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.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.6fa1811d66e6eb5d: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.a17e1ddde5b22223: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.7619ac942aa9029a: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.72395be3dbbe8946: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: 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: @@ -134,71 +98,96 @@ 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.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !77 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !84 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !85 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !60 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !61 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %x, !dbg !87 +// CHECK:STDOUT: ret i32 %x, !dbg !63 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !89 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !90 -// CHECK:STDOUT: ret i32 %F.call, !dbg !91 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !65 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !66 +// CHECK:STDOUT: ret i32 %F.call, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !93 { +// CHECK:STDOUT: define linkonce_odr double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !100 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !101 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !76 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !77 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret double %x, !dbg !103 +// CHECK:STDOUT: ret double %x, !dbg !79 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !105 -// CHECK:STDOUT: %F.call = call double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !106 -// CHECK:STDOUT: ret double %F.call, !dbg !107 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !81 +// CHECK:STDOUT: %F.call = call double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !82 +// CHECK:STDOUT: ret double %F.call, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !109 { +// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !85 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !116 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !117 +// 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 ptr %x, !dbg !119 +// CHECK:STDOUT: ret ptr %x, !dbg !95 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !121 -// CHECK:STDOUT: %F.call = call ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !122 -// CHECK:STDOUT: ret ptr %F.call, !dbg !123 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !97 +// CHECK:STDOUT: %F.call = call ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !98 +// CHECK:STDOUT: ret ptr %F.call, !dbg !99 // 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 !141 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.42513763e01cba2c(ptr sret({}) %return, ptr %x, i32 %count) #0 !dbg !117 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 0, !dbg !148 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !149 +// 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: call void @"_COp.C.Main:Copy.Core"(ptr %return, ptr %x), !dbg !150 -// CHECK:STDOUT: ret void, !dbg !151 +// CHECK:STDOUT: call void @"_COp.C.Main:Copy.Core"(ptr %return, ptr %x), !dbg !126 +// CHECK:STDOUT: ret void, !dbg !127 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !153 -// CHECK:STDOUT: call void @_CF.Main.42513763e01cba2c(ptr %return, ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !154 -// CHECK:STDOUT: ret void, !dbg !155 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !129 +// CHECK:STDOUT: call void @_CF.Main.42513763e01cba2c(ptr %return, ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !130 +// CHECK:STDOUT: ret void, !dbg !131 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !134 { +// CHECK:STDOUT: ret void, !dbg !139 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b18855c76072615b(ptr %t) #0 !dbg !141 { +// CHECK:STDOUT: ret void, !dbg !146 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !148 { +// CHECK:STDOUT: ret void, !dbg !153 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !155 { +// CHECK:STDOUT: ret void, !dbg !160 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !162 { +// CHECK:STDOUT: ret void, !dbg !167 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 5, 4, 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @_CF.Main.417c9c4a651ab31b, { 1, 2, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.356af3b6aef18564, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -216,97 +205,94 @@ fn M() { // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) // CHECK:STDOUT: !10 = !{null} // CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{null, !7} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = !{null, !6} -// CHECK:STDOUT: !15 = !DISubroutineType(types: !14) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "Op", linkageName: "_COp.C.Main:Copy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !22) -// CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !16, type: !7) -// CHECK:STDOUT: !21 = !DILocation(line: 15, column: 34, scope: !16) -// CHECK:STDOUT: !22 = !{!17} -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 28, type: !11, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !24 = !DILocation(line: 29, column: 3, scope: !23) -// CHECK:STDOUT: !26 = !DILocation(line: 30, column: 3, scope: !23) -// CHECK:STDOUT: !28 = !DILocation(line: 31, column: 3, scope: !23) -// CHECK:STDOUT: !32 = !DILocation(line: 32, column: 3, scope: !23) -// CHECK:STDOUT: !36 = !DILocation(line: 34, column: 5, scope: !23) -// CHECK:STDOUT: !37 = !DILocation(line: 34, column: 3, scope: !23) -// CHECK:STDOUT: !38 = !{!6, !6, !6} +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Op", linkageName: "_COp.C.Main:Copy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !18) +// CHECK:STDOUT: !13 = !DILocalVariable(arg: 1, scope: !12, type: !7) +// CHECK:STDOUT: !17 = !DILocation(line: 15, column: 34, scope: !12) +// CHECK:STDOUT: !18 = !{!13} +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 28, type: !11, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !20 = !DILocation(line: 29, column: 3, scope: !19) +// CHECK:STDOUT: !22 = !DILocation(line: 30, column: 3, scope: !19) +// CHECK:STDOUT: !24 = !DILocation(line: 31, column: 3, scope: !19) +// CHECK:STDOUT: !28 = !DILocation(line: 32, column: 3, scope: !19) +// CHECK:STDOUT: !32 = !DILocation(line: 34, column: 5, scope: !19) +// CHECK:STDOUT: !33 = !DILocation(line: 34, column: 3, scope: !19) +// CHECK:STDOUT: !34 = !{!6, !6, !6} +// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) +// CHECK:STDOUT: !36 = !DILocation(line: 35, column: 5, scope: !19) +// CHECK:STDOUT: !37 = !DILocation(line: 35, column: 3, scope: !19) +// CHECK:STDOUT: !38 = !{!7, !7, !6} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !DILocation(line: 35, column: 5, scope: !23) -// CHECK:STDOUT: !41 = !DILocation(line: 35, column: 3, scope: !23) -// CHECK:STDOUT: !42 = !{!7, !7, !6} -// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = !DILocation(line: 36, column: 5, scope: !23) -// CHECK:STDOUT: !45 = !DILocation(line: 36, column: 3, scope: !23) -// CHECK:STDOUT: !46 = !DILocation(line: 37, column: 5, scope: !23) -// CHECK:STDOUT: !47 = !DILocation(line: 37, column: 3, scope: !23) -// CHECK:STDOUT: !48 = !DILocation(line: 39, column: 3, scope: !23) -// CHECK:STDOUT: !51 = !DILocation(line: 40, column: 3, scope: !23) -// CHECK:STDOUT: !52 = !DILocation(line: 28, column: 1, scope: !23) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !4, line: 40, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !56) -// 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: "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.6fa1811d66e6eb5d: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: 32, column: 3, scope: !61) -// CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223: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: 31, column: 3, scope: !65) -// CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !4, line: 30, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !72) +// CHECK:STDOUT: !40 = !DILocation(line: 36, column: 5, scope: !19) +// CHECK:STDOUT: !41 = !DILocation(line: 36, column: 3, scope: !19) +// CHECK:STDOUT: !42 = !DILocation(line: 37, column: 5, scope: !19) +// CHECK:STDOUT: !43 = !DILocation(line: 37, column: 3, scope: !19) +// CHECK:STDOUT: !44 = !DILocation(line: 39, column: 3, scope: !19) +// CHECK:STDOUT: !47 = !DILocation(line: 40, column: 3, scope: !19) +// CHECK:STDOUT: !48 = !{null, !7} +// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) +// CHECK:STDOUT: !50 = !{null, !6} +// CHECK:STDOUT: !51 = !DISubroutineType(types: !50) +// CHECK:STDOUT: !52 = !DILocation(line: 28, column: 1, scope: !19) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2fad9574e050607e", scope: null, file: !4, line: 21, type: !35, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !6) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 2, scope: !53, type: !6) +// CHECK:STDOUT: !60 = !DILocation(line: 22, column: 7, scope: !53) +// CHECK:STDOUT: !61 = !DILocation(line: 22, column: 6, scope: !53) +// CHECK:STDOUT: !63 = !DILocation(line: 23, column: 5, scope: !53) +// CHECK:STDOUT: !65 = !DILocation(line: 25, column: 15, scope: !53) +// CHECK:STDOUT: !66 = !DILocation(line: 25, column: 10, scope: !53) +// CHECK:STDOUT: !67 = !DILocation(line: 25, column: 3, scope: !53) +// CHECK:STDOUT: !68 = !{!54, !55} +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !7) -// CHECK:STDOUT: !71 = !DILocation(line: 30, column: 3, scope: !69) -// CHECK:STDOUT: !72 = !{!70} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 29, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !6) -// CHECK:STDOUT: !75 = !DILocation(line: 29, column: 3, scope: !73) -// CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2fad9574e050607e", scope: null, file: !4, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !6) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 2, scope: !77, type: !6) -// CHECK:STDOUT: !84 = !DILocation(line: 22, column: 7, scope: !77) -// CHECK:STDOUT: !85 = !DILocation(line: 22, column: 6, scope: !77) -// CHECK:STDOUT: !87 = !DILocation(line: 23, column: 5, scope: !77) -// CHECK:STDOUT: !89 = !DILocation(line: 25, column: 15, scope: !77) -// CHECK:STDOUT: !90 = !DILocation(line: 25, column: 10, scope: !77) -// CHECK:STDOUT: !91 = !DILocation(line: 25, column: 3, scope: !77) -// CHECK:STDOUT: !92 = !{!78, !79} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 21, type: !43, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !108) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !7) -// CHECK:STDOUT: !95 = !DILocalVariable(arg: 2, scope: !93, type: !6) -// CHECK:STDOUT: !100 = !DILocation(line: 22, column: 7, scope: !93) -// CHECK:STDOUT: !101 = !DILocation(line: 22, column: 6, scope: !93) -// CHECK:STDOUT: !103 = !DILocation(line: 23, column: 5, scope: !93) -// CHECK:STDOUT: !105 = !DILocation(line: 25, column: 15, scope: !93) -// CHECK:STDOUT: !106 = !DILocation(line: 25, column: 10, scope: !93) -// CHECK:STDOUT: !107 = !DILocation(line: 25, column: 3, scope: !93) -// CHECK:STDOUT: !108 = !{!94, !95} -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.417c9c4a651ab31b", scope: null, file: !4, line: 21, type: !43, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !124) -// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !7) -// CHECK:STDOUT: !111 = !DILocalVariable(arg: 2, scope: !109, type: !6) -// CHECK:STDOUT: !116 = !DILocation(line: 22, column: 7, scope: !109) -// CHECK:STDOUT: !117 = !DILocation(line: 22, column: 6, scope: !109) -// CHECK:STDOUT: !119 = !DILocation(line: 23, column: 5, scope: !109) -// CHECK:STDOUT: !121 = !DILocation(line: 25, column: 15, scope: !109) -// CHECK:STDOUT: !122 = !DILocation(line: 25, column: 10, scope: !109) -// CHECK:STDOUT: !123 = !DILocation(line: 25, column: 3, scope: !109) -// CHECK:STDOUT: !124 = !{!110, !111} -// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.42513763e01cba2c", scope: null, file: !4, line: 21, type: !43, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !156) +// CHECK:STDOUT: !71 = !DILocalVariable(arg: 2, scope: !69, type: !6) +// CHECK:STDOUT: !76 = !DILocation(line: 22, column: 7, scope: !69) +// CHECK:STDOUT: !77 = !DILocation(line: 22, column: 6, scope: !69) +// CHECK:STDOUT: !79 = !DILocation(line: 23, column: 5, scope: !69) +// CHECK:STDOUT: !81 = !DILocation(line: 25, column: 15, scope: !69) +// CHECK:STDOUT: !82 = !DILocation(line: 25, column: 10, scope: !69) +// CHECK:STDOUT: !83 = !DILocation(line: 25, column: 3, scope: !69) +// CHECK:STDOUT: !84 = !{!70, !71} +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.417c9c4a651ab31b", scope: null, file: !4, line: 21, type: !39, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !100) +// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !7) +// 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: !117 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.42513763e01cba2c", scope: null, file: !4, line: 21, type: !39, 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: !126 = !DILocation(line: 23, column: 12, 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: !133 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !133, line: 36, type: !49, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !140) +// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !7) +// CHECK:STDOUT: !139 = !DILocation(line: 36, column: 1, scope: !134) +// CHECK:STDOUT: !140 = !{!135} +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b18855c76072615b", scope: null, file: !133, line: 36, type: !49, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !147) // CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !7) -// CHECK:STDOUT: !143 = !DILocalVariable(arg: 2, scope: !141, type: !6) -// CHECK:STDOUT: !148 = !DILocation(line: 22, column: 7, scope: !141) -// CHECK:STDOUT: !149 = !DILocation(line: 22, column: 6, scope: !141) -// CHECK:STDOUT: !150 = !DILocation(line: 23, column: 12, scope: !141) -// CHECK:STDOUT: !151 = !DILocation(line: 23, column: 5, scope: !141) -// CHECK:STDOUT: !153 = !DILocation(line: 25, column: 15, scope: !141) -// CHECK:STDOUT: !154 = !DILocation(line: 25, column: 10, scope: !141) -// CHECK:STDOUT: !155 = !DILocation(line: 25, column: 3, scope: !141) -// CHECK:STDOUT: !156 = !{!142, !143} +// CHECK:STDOUT: !146 = !DILocation(line: 36, column: 1, scope: !141) +// CHECK:STDOUT: !147 = !{!142} +// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !133, line: 36, type: !49, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !154) +// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !7) +// CHECK:STDOUT: !153 = !DILocation(line: 36, column: 1, scope: !148) +// CHECK:STDOUT: !154 = !{!149} +// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !133, line: 36, type: !49, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !161) +// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !7) +// CHECK:STDOUT: !160 = !DILocation(line: 36, column: 1, scope: !155) +// CHECK:STDOUT: !161 = !{!156} +// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !133, line: 36, type: !51, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !168) +// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !6) +// CHECK:STDOUT: !167 = !DILocation(line: 36, column: 1, scope: !162) +// CHECK:STDOUT: !168 = !{!163} // 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 662570218581..1d9b4871e183 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_diamond.carbon @@ -64,203 +64,199 @@ fn M() { // CHECK:STDOUT: @printf.int.format = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !14 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !9 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !15 -// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !17 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !19 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !23 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !15 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !15 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !17 -// CHECK:STDOUT: store double 1.000000e+00, ptr %m.var, align 8, !dbg !17 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !19 -// CHECK:STDOUT: store ptr %n.var, ptr %ptr_i32.var, align 8, !dbg !19 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !23 -// CHECK:STDOUT: store ptr %m.var, ptr %ptr_f64.var, align 8, !dbg !23 -// CHECK:STDOUT: %.loc54_5 = load i32, ptr %n.var, align 4, !dbg !27 -// CHECK:STDOUT: %A.call.loc54 = call i32 @_CA.Main.2fad9574e050607e(i32 %.loc54_5, i32 0), !dbg !28 -// CHECK:STDOUT: %.loc55_5 = load double, ptr %m.var, align 8, !dbg !31 -// CHECK:STDOUT: %A.call.loc55 = call double @_CA.Main.21aefb7dfdebb8e4(double %.loc55_5, i32 0), !dbg !32 -// CHECK:STDOUT: %.loc56_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !35 -// CHECK:STDOUT: %A.call.loc56 = call ptr @_CA.Main.417c9c4a651ab31b(ptr %.loc56_5, i32 0), !dbg !36 -// CHECK:STDOUT: %.loc57_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !37 -// CHECK:STDOUT: %A.call.loc57 = call ptr @_CA.Main.417c9c4a651ab31b(ptr %.loc57_5, i32 0), !dbg !38 -// CHECK:STDOUT: call void @"_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !23 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !19 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %m.var), !dbg !17 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !15 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !10 +// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !12 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !14 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !18 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !10 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !10 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !12 +// CHECK:STDOUT: store double 1.000000e+00, ptr %m.var, align 8, !dbg !12 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !14 +// CHECK:STDOUT: store ptr %n.var, ptr %ptr_i32.var, align 8, !dbg !14 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !18 +// CHECK:STDOUT: store ptr %m.var, ptr %ptr_f64.var, align 8, !dbg !18 +// CHECK:STDOUT: %.loc54_5 = load i32, ptr %n.var, align 4, !dbg !22 +// CHECK:STDOUT: %A.call.loc54 = call i32 @_CA.Main.2fad9574e050607e(i32 %.loc54_5, i32 0), !dbg !23 +// CHECK:STDOUT: %.loc55_5 = load double, ptr %m.var, align 8, !dbg !26 +// CHECK:STDOUT: %A.call.loc55 = call double @_CA.Main.21aefb7dfdebb8e4(double %.loc55_5, i32 0), !dbg !27 +// CHECK:STDOUT: %.loc56_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !31 +// CHECK:STDOUT: %A.call.loc56 = call ptr @_CA.Main.417c9c4a651ab31b(ptr %.loc56_5, i32 0), !dbg !32 +// CHECK:STDOUT: %.loc57_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !33 +// CHECK:STDOUT: %A.call.loc57 = call ptr @_CA.Main.417c9c4a651ab31b(ptr %.loc57_5, i32 0), !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b18855c76072615b(ptr %ptr_f64.var), !dbg !18 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %ptr_i32.var), !dbg !14 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %m.var), !dbg !12 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !10 // CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6fa1811d66e6eb5d: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.a17e1ddde5b22223: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.7619ac942aa9029a: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.72395be3dbbe8946: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: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CA.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !56 { +// CHECK:STDOUT: define linkonce_odr i32 @_CA.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !63 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !64 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !47 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !48 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc23: ; preds = %entry -// CHECK:STDOUT: ret i32 %x, !dbg !66 +// CHECK:STDOUT: ret i32 %x, !dbg !50 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc23: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !67 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !67 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !68 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !51 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !51 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !52 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %B.call = call i32 @_CB.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !71 -// CHECK:STDOUT: ret i32 %B.call, !dbg !72 +// CHECK:STDOUT: %B.call = call i32 @_CB.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !55 +// CHECK:STDOUT: ret i32 %B.call, !dbg !56 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %C.call = call i32 @_CC.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !75 -// CHECK:STDOUT: ret i32 %C.call, !dbg !76 +// CHECK:STDOUT: %C.call = call i32 @_CC.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !59 +// CHECK:STDOUT: ret i32 %C.call, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CA.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !78 { +// CHECK:STDOUT: define linkonce_odr double @_CA.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !85 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !86 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !69 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !70 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc23: ; preds = %entry -// CHECK:STDOUT: ret double %x, !dbg !88 +// CHECK:STDOUT: ret double %x, !dbg !72 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc23: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !89 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !89 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !90 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !73 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !73 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !74 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %B.call = call double @_CB.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !93 -// CHECK:STDOUT: ret double %B.call, !dbg !94 +// CHECK:STDOUT: %B.call = call double @_CB.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !77 +// CHECK:STDOUT: ret double %B.call, !dbg !78 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %C.call = call double @_CC.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !97 -// CHECK:STDOUT: ret double %C.call, !dbg !98 +// CHECK:STDOUT: %C.call = call double @_CC.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !81 +// CHECK:STDOUT: ret double %C.call, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CA.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !100 { +// CHECK:STDOUT: define linkonce_odr ptr @_CA.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !84 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !107 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !108 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !91 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc23, label %if.else.loc23, !dbg !92 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc23: ; preds = %entry -// CHECK:STDOUT: ret ptr %x, !dbg !110 +// CHECK:STDOUT: ret ptr %x, !dbg !94 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc23: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !111 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !111 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !112 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !95 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !95 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc26, label %if.else.loc26, !dbg !96 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %B.call = call ptr @_CB.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !115 -// CHECK:STDOUT: ret ptr %B.call, !dbg !116 +// CHECK:STDOUT: %B.call = call ptr @_CB.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !99 +// CHECK:STDOUT: ret ptr %B.call, !dbg !100 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc26: ; preds = %if.else.loc23 -// CHECK:STDOUT: %C.call = call ptr @_CC.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !119 -// CHECK:STDOUT: ret ptr %C.call, !dbg !120 +// CHECK:STDOUT: %C.call = call ptr @_CC.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !103 +// CHECK:STDOUT: ret ptr %C.call, !dbg !104 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CB.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !144 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !151 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !154 -// CHECK:STDOUT: ret i32 %D.call, !dbg !155 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b18855c76072615b(ptr %t) #0 !dbg !129 { +// CHECK:STDOUT: ret void, !dbg !134 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CC.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !157 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !136 { +// CHECK:STDOUT: ret void, !dbg !141 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !143 { +// CHECK:STDOUT: ret void, !dbg !148 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !150 { +// CHECK:STDOUT: ret void, !dbg !155 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i32 @_CB.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !157 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !164 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !164 // CHECK:STDOUT: %D.call = call i32 @_CD.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !167 // CHECK:STDOUT: ret i32 %D.call, !dbg !168 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CB.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !170 { +// CHECK:STDOUT: define linkonce_odr i32 @_CC.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !170 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !177 -// CHECK:STDOUT: %D.call = call double @_CD.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !180 -// CHECK:STDOUT: ret double %D.call, !dbg !181 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !177 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !180 +// CHECK:STDOUT: ret i32 %D.call, !dbg !181 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CC.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !183 { +// CHECK:STDOUT: define linkonce_odr double @_CB.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !183 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !190 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !190 // CHECK:STDOUT: %D.call = call double @_CD.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !193 // CHECK:STDOUT: ret double %D.call, !dbg !194 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CB.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !196 { +// CHECK:STDOUT: define linkonce_odr double @_CC.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !196 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !203 -// CHECK:STDOUT: %D.call = call ptr @_CD.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !206 -// CHECK:STDOUT: ret ptr %D.call, !dbg !207 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !203 +// CHECK:STDOUT: %D.call = call double @_CD.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !206 +// CHECK:STDOUT: ret double %D.call, !dbg !207 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CC.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !209 { +// CHECK:STDOUT: define linkonce_odr ptr @_CB.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !209 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !216 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !216 // CHECK:STDOUT: %D.call = call ptr @_CD.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !219 // CHECK:STDOUT: ret ptr %D.call, !dbg !220 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @_CC.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !222 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 2), !dbg !229 +// CHECK:STDOUT: %D.call = call ptr @_CD.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !232 +// CHECK:STDOUT: ret ptr %D.call, !dbg !233 +// 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.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !248 { +// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !261 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !256 -// CHECK:STDOUT: %A.call = call i32 @_CA.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !257 -// CHECK:STDOUT: ret i32 %A.call, !dbg !258 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !269 +// CHECK:STDOUT: %A.call = call i32 @_CA.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !270 +// CHECK:STDOUT: ret i32 %A.call, !dbg !271 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CD.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !260 { +// CHECK:STDOUT: define linkonce_odr double @_CD.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !273 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !268 -// CHECK:STDOUT: %A.call = call double @_CA.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !269 -// CHECK:STDOUT: ret double %A.call, !dbg !270 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !281 +// CHECK:STDOUT: %A.call = call double @_CA.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !282 +// CHECK:STDOUT: ret double %A.call, !dbg !283 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CD.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !272 { +// CHECK:STDOUT: define linkonce_odr ptr @_CD.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !285 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !280 -// CHECK:STDOUT: %A.call = call ptr @_CA.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !281 -// CHECK:STDOUT: ret ptr %A.call, !dbg !282 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !293 +// CHECK:STDOUT: %A.call = call ptr @_CA.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !294 +// CHECK:STDOUT: ret ptr %A.call, !dbg !295 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -284,145 +280,146 @@ fn M() { // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !{null} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !10 = !{null, !9} -// CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{null, !6} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 48, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !15 = !DILocation(line: 49, column: 3, scope: !14) -// CHECK:STDOUT: !17 = !DILocation(line: 50, column: 3, scope: !14) -// CHECK:STDOUT: !19 = !DILocation(line: 51, column: 3, scope: !14) -// CHECK:STDOUT: !23 = !DILocation(line: 52, column: 3, scope: !14) -// CHECK:STDOUT: !27 = !DILocation(line: 54, column: 5, scope: !14) -// CHECK:STDOUT: !28 = !DILocation(line: 54, column: 3, scope: !14) -// CHECK:STDOUT: !29 = !{!6, !6, !6} +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 48, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !10 = !DILocation(line: 49, column: 3, scope: !9) +// CHECK:STDOUT: !12 = !DILocation(line: 50, column: 3, scope: !9) +// CHECK:STDOUT: !14 = !DILocation(line: 51, column: 3, scope: !9) +// CHECK:STDOUT: !18 = !DILocation(line: 52, column: 3, scope: !9) +// CHECK:STDOUT: !22 = !DILocation(line: 54, column: 5, scope: !9) +// CHECK:STDOUT: !23 = !DILocation(line: 54, column: 3, scope: !9) +// CHECK:STDOUT: !24 = !{!6, !6, !6} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = !DILocation(line: 55, column: 5, scope: !9) +// CHECK:STDOUT: !27 = !DILocation(line: 55, column: 3, scope: !9) +// CHECK:STDOUT: !28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !29 = !{!28, !28, !6} // CHECK:STDOUT: !30 = !DISubroutineType(types: !29) -// CHECK:STDOUT: !31 = !DILocation(line: 55, column: 5, scope: !14) -// CHECK:STDOUT: !32 = !DILocation(line: 55, column: 3, scope: !14) -// CHECK:STDOUT: !33 = !{!9, !9, !6} -// CHECK:STDOUT: !34 = !DISubroutineType(types: !33) -// CHECK:STDOUT: !35 = !DILocation(line: 56, column: 5, scope: !14) -// CHECK:STDOUT: !36 = !DILocation(line: 56, column: 3, scope: !14) -// CHECK:STDOUT: !37 = !DILocation(line: 57, column: 5, scope: !14) -// CHECK:STDOUT: !38 = !DILocation(line: 57, column: 3, scope: !14) -// CHECK:STDOUT: !39 = !DILocation(line: 48, column: 1, scope: !14) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core", scope: null, file: !4, line: 52, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !43) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !9) -// CHECK:STDOUT: !42 = !DILocation(line: 52, column: 3, scope: !40) -// CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !4, line: 51, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !9) -// CHECK:STDOUT: !46 = !DILocation(line: 51, column: 3, scope: !44) -// CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !4, line: 50, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 49, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !6) -// CHECK:STDOUT: !54 = !DILocation(line: 49, column: 3, scope: !52) -// CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.2fad9574e050607e", scope: null, file: !4, line: 22, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !77) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !6) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 2, scope: !56, type: !6) -// CHECK:STDOUT: !63 = !DILocation(line: 23, column: 7, scope: !56) -// CHECK:STDOUT: !64 = !DILocation(line: 23, column: 6, scope: !56) -// CHECK:STDOUT: !66 = !DILocation(line: 24, column: 5, scope: !56) -// CHECK:STDOUT: !67 = !DILocation(line: 26, column: 7, scope: !56) -// CHECK:STDOUT: !68 = !DILocation(line: 26, column: 6, scope: !56) -// CHECK:STDOUT: !71 = !DILocation(line: 27, column: 12, scope: !56) -// CHECK:STDOUT: !72 = !DILocation(line: 27, column: 5, scope: !56) -// CHECK:STDOUT: !75 = !DILocation(line: 29, column: 12, scope: !56) -// CHECK:STDOUT: !76 = !DILocation(line: 29, column: 5, scope: !56) -// CHECK:STDOUT: !77 = !{!57, !58} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !99) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !9) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 2, scope: !78, type: !6) -// CHECK:STDOUT: !85 = !DILocation(line: 23, column: 7, scope: !78) -// CHECK:STDOUT: !86 = !DILocation(line: 23, column: 6, scope: !78) -// CHECK:STDOUT: !88 = !DILocation(line: 24, column: 5, scope: !78) -// CHECK:STDOUT: !89 = !DILocation(line: 26, column: 7, scope: !78) -// CHECK:STDOUT: !90 = !DILocation(line: 26, column: 6, scope: !78) -// CHECK:STDOUT: !93 = !DILocation(line: 27, column: 12, scope: !78) -// CHECK:STDOUT: !94 = !DILocation(line: 27, column: 5, scope: !78) -// CHECK:STDOUT: !97 = !DILocation(line: 29, column: 12, scope: !78) -// CHECK:STDOUT: !98 = !DILocation(line: 29, column: 5, scope: !78) -// CHECK:STDOUT: !99 = !{!79, !80} -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.417c9c4a651ab31b", scope: null, file: !4, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !121) -// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !9) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 2, scope: !100, type: !6) -// CHECK:STDOUT: !107 = !DILocation(line: 23, column: 7, scope: !100) -// CHECK:STDOUT: !108 = !DILocation(line: 23, column: 6, scope: !100) -// CHECK:STDOUT: !110 = !DILocation(line: 24, column: 5, scope: !100) -// CHECK:STDOUT: !111 = !DILocation(line: 26, column: 7, scope: !100) -// CHECK:STDOUT: !112 = !DILocation(line: 26, column: 6, scope: !100) -// CHECK:STDOUT: !115 = !DILocation(line: 27, column: 12, scope: !100) -// CHECK:STDOUT: !116 = !DILocation(line: 27, column: 5, scope: !100) -// CHECK:STDOUT: !119 = !DILocation(line: 29, column: 12, scope: !100) -// CHECK:STDOUT: !120 = !DILocation(line: 29, column: 5, scope: !100) -// CHECK:STDOUT: !121 = !{!101, !102} -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.2fad9574e050607e", scope: null, file: !4, line: 34, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !156) -// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !6) -// CHECK:STDOUT: !146 = !DILocalVariable(arg: 2, scope: !144, type: !6) -// CHECK:STDOUT: !151 = !DILocation(line: 35, column: 3, scope: !144) -// CHECK:STDOUT: !154 = !DILocation(line: 36, column: 10, scope: !144) -// CHECK:STDOUT: !155 = !DILocation(line: 36, column: 3, scope: !144) -// CHECK:STDOUT: !156 = !{!145, !146} -// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.2fad9574e050607e", scope: null, file: !4, line: 39, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !169) +// CHECK:STDOUT: !31 = !DILocation(line: 56, column: 5, scope: !9) +// CHECK:STDOUT: !32 = !DILocation(line: 56, column: 3, scope: !9) +// CHECK:STDOUT: !33 = !DILocation(line: 57, column: 5, scope: !9) +// CHECK:STDOUT: !34 = !DILocation(line: 57, column: 3, scope: !9) +// CHECK:STDOUT: !35 = !{null, !28} +// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) +// CHECK:STDOUT: !37 = !{null, !6} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DILocation(line: 48, column: 1, scope: !9) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.2fad9574e050607e", scope: null, file: !4, line: 22, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !61) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !6) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 2, scope: !40, type: !6) +// CHECK:STDOUT: !47 = !DILocation(line: 23, column: 7, scope: !40) +// CHECK:STDOUT: !48 = !DILocation(line: 23, column: 6, scope: !40) +// CHECK:STDOUT: !50 = !DILocation(line: 24, column: 5, scope: !40) +// CHECK:STDOUT: !51 = !DILocation(line: 26, column: 7, scope: !40) +// CHECK:STDOUT: !52 = !DILocation(line: 26, column: 6, scope: !40) +// CHECK:STDOUT: !55 = !DILocation(line: 27, column: 12, scope: !40) +// CHECK:STDOUT: !56 = !DILocation(line: 27, column: 5, scope: !40) +// CHECK:STDOUT: !59 = !DILocation(line: 29, column: 12, scope: !40) +// CHECK:STDOUT: !60 = !DILocation(line: 29, column: 5, scope: !40) +// CHECK:STDOUT: !61 = !{!41, !42} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 22, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !83) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !28) +// CHECK:STDOUT: !64 = !DILocalVariable(arg: 2, scope: !62, type: !6) +// CHECK:STDOUT: !69 = !DILocation(line: 23, column: 7, scope: !62) +// CHECK:STDOUT: !70 = !DILocation(line: 23, column: 6, scope: !62) +// CHECK:STDOUT: !72 = !DILocation(line: 24, column: 5, scope: !62) +// CHECK:STDOUT: !73 = !DILocation(line: 26, column: 7, scope: !62) +// CHECK:STDOUT: !74 = !DILocation(line: 26, column: 6, scope: !62) +// CHECK:STDOUT: !77 = !DILocation(line: 27, column: 12, scope: !62) +// CHECK:STDOUT: !78 = !DILocation(line: 27, column: 5, scope: !62) +// CHECK:STDOUT: !81 = !DILocation(line: 29, column: 12, scope: !62) +// CHECK:STDOUT: !82 = !DILocation(line: 29, column: 5, scope: !62) +// CHECK:STDOUT: !83 = !{!63, !64} +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.417c9c4a651ab31b", scope: null, file: !4, line: 22, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !105) +// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !28) +// CHECK:STDOUT: !86 = !DILocalVariable(arg: 2, scope: !84, type: !6) +// CHECK:STDOUT: !91 = !DILocation(line: 23, column: 7, scope: !84) +// CHECK:STDOUT: !92 = !DILocation(line: 23, column: 6, scope: !84) +// CHECK:STDOUT: !94 = !DILocation(line: 24, column: 5, scope: !84) +// CHECK:STDOUT: !95 = !DILocation(line: 26, column: 7, scope: !84) +// CHECK:STDOUT: !96 = !DILocation(line: 26, column: 6, scope: !84) +// CHECK:STDOUT: !99 = !DILocation(line: 27, column: 12, scope: !84) +// CHECK:STDOUT: !100 = !DILocation(line: 27, column: 5, scope: !84) +// CHECK:STDOUT: !103 = !DILocation(line: 29, column: 12, scope: !84) +// CHECK:STDOUT: !104 = !DILocation(line: 29, column: 5, scope: !84) +// CHECK:STDOUT: !105 = !{!85, !86} +// CHECK:STDOUT: !128 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b18855c76072615b", scope: null, file: !128, line: 36, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135) +// CHECK:STDOUT: !130 = !DILocalVariable(arg: 1, scope: !129, type: !28) +// CHECK:STDOUT: !134 = !DILocation(line: 36, column: 1, scope: !129) +// CHECK:STDOUT: !135 = !{!130} +// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !128, line: 36, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !142) +// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !28) +// CHECK:STDOUT: !141 = !DILocation(line: 36, column: 1, scope: !136) +// CHECK:STDOUT: !142 = !{!137} +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !128, line: 36, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !149) +// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !28) +// CHECK:STDOUT: !148 = !DILocation(line: 36, column: 1, scope: !143) +// CHECK:STDOUT: !149 = !{!144} +// CHECK:STDOUT: !150 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !128, line: 36, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !156) +// CHECK:STDOUT: !151 = !DILocalVariable(arg: 1, scope: !150, type: !6) +// CHECK:STDOUT: !155 = !DILocation(line: 36, column: 1, scope: !150) +// CHECK:STDOUT: !156 = !{!151} +// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.2fad9574e050607e", scope: null, file: !4, line: 34, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !169) // CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !6) // CHECK:STDOUT: !159 = !DILocalVariable(arg: 2, scope: !157, type: !6) -// CHECK:STDOUT: !164 = !DILocation(line: 40, column: 3, scope: !157) -// CHECK:STDOUT: !167 = !DILocation(line: 41, column: 10, scope: !157) -// CHECK:STDOUT: !168 = !DILocation(line: 41, column: 3, scope: !157) +// CHECK:STDOUT: !164 = !DILocation(line: 35, column: 3, scope: !157) +// CHECK:STDOUT: !167 = !DILocation(line: 36, column: 10, scope: !157) +// CHECK:STDOUT: !168 = !DILocation(line: 36, column: 3, scope: !157) // CHECK:STDOUT: !169 = !{!158, !159} -// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 34, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !182) -// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !9) +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.2fad9574e050607e", scope: null, file: !4, line: 39, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !182) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !6) // CHECK:STDOUT: !172 = !DILocalVariable(arg: 2, scope: !170, type: !6) -// CHECK:STDOUT: !177 = !DILocation(line: 35, column: 3, scope: !170) -// CHECK:STDOUT: !180 = !DILocation(line: 36, column: 10, scope: !170) -// CHECK:STDOUT: !181 = !DILocation(line: 36, column: 3, scope: !170) +// CHECK:STDOUT: !177 = !DILocation(line: 40, column: 3, scope: !170) +// CHECK:STDOUT: !180 = !DILocation(line: 41, column: 10, scope: !170) +// CHECK:STDOUT: !181 = !DILocation(line: 41, column: 3, scope: !170) // CHECK:STDOUT: !182 = !{!171, !172} -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 39, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !195) -// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !9) +// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 34, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !195) +// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !28) // CHECK:STDOUT: !185 = !DILocalVariable(arg: 2, scope: !183, type: !6) -// CHECK:STDOUT: !190 = !DILocation(line: 40, column: 3, scope: !183) -// CHECK:STDOUT: !193 = !DILocation(line: 41, column: 10, scope: !183) -// CHECK:STDOUT: !194 = !DILocation(line: 41, column: 3, scope: !183) +// CHECK:STDOUT: !190 = !DILocation(line: 35, column: 3, scope: !183) +// CHECK:STDOUT: !193 = !DILocation(line: 36, column: 10, scope: !183) +// CHECK:STDOUT: !194 = !DILocation(line: 36, column: 3, scope: !183) // CHECK:STDOUT: !195 = !{!184, !185} -// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.417c9c4a651ab31b", scope: null, file: !4, line: 34, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !208) -// CHECK:STDOUT: !197 = !DILocalVariable(arg: 1, scope: !196, type: !9) +// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 39, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !208) +// CHECK:STDOUT: !197 = !DILocalVariable(arg: 1, scope: !196, type: !28) // CHECK:STDOUT: !198 = !DILocalVariable(arg: 2, scope: !196, type: !6) -// CHECK:STDOUT: !203 = !DILocation(line: 35, column: 3, scope: !196) -// CHECK:STDOUT: !206 = !DILocation(line: 36, column: 10, scope: !196) -// CHECK:STDOUT: !207 = !DILocation(line: 36, column: 3, scope: !196) +// CHECK:STDOUT: !203 = !DILocation(line: 40, column: 3, scope: !196) +// CHECK:STDOUT: !206 = !DILocation(line: 41, column: 10, scope: !196) +// CHECK:STDOUT: !207 = !DILocation(line: 41, column: 3, scope: !196) // CHECK:STDOUT: !208 = !{!197, !198} -// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.417c9c4a651ab31b", scope: null, file: !4, line: 39, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !221) -// CHECK:STDOUT: !210 = !DILocalVariable(arg: 1, scope: !209, type: !9) +// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.417c9c4a651ab31b", scope: null, file: !4, line: 34, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !221) +// CHECK:STDOUT: !210 = !DILocalVariable(arg: 1, scope: !209, type: !28) // CHECK:STDOUT: !211 = !DILocalVariable(arg: 2, scope: !209, type: !6) -// CHECK:STDOUT: !216 = !DILocation(line: 40, column: 3, scope: !209) -// CHECK:STDOUT: !219 = !DILocation(line: 41, column: 10, scope: !209) -// CHECK:STDOUT: !220 = !DILocation(line: 41, column: 3, scope: !209) +// CHECK:STDOUT: !216 = !DILocation(line: 35, column: 3, scope: !209) +// CHECK:STDOUT: !219 = !DILocation(line: 36, column: 10, scope: !209) +// CHECK:STDOUT: !220 = !DILocation(line: 36, column: 3, scope: !209) // CHECK:STDOUT: !221 = !{!210, !211} -// CHECK:STDOUT: !248 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2fad9574e050607e", scope: null, file: !4, line: 44, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !259) -// CHECK:STDOUT: !249 = !DILocalVariable(arg: 1, scope: !248, type: !6) -// CHECK:STDOUT: !250 = !DILocalVariable(arg: 2, scope: !248, type: !6) -// CHECK:STDOUT: !256 = !DILocation(line: 45, column: 15, scope: !248) -// CHECK:STDOUT: !257 = !DILocation(line: 45, column: 10, scope: !248) -// CHECK:STDOUT: !258 = !DILocation(line: 45, column: 3, scope: !248) -// CHECK:STDOUT: !259 = !{!249, !250} -// CHECK:STDOUT: !260 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 44, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !271) -// CHECK:STDOUT: !261 = !DILocalVariable(arg: 1, scope: !260, type: !9) -// CHECK:STDOUT: !262 = !DILocalVariable(arg: 2, scope: !260, type: !6) -// CHECK:STDOUT: !268 = !DILocation(line: 45, column: 15, scope: !260) -// CHECK:STDOUT: !269 = !DILocation(line: 45, column: 10, scope: !260) -// CHECK:STDOUT: !270 = !DILocation(line: 45, column: 3, scope: !260) -// CHECK:STDOUT: !271 = !{!261, !262} -// CHECK:STDOUT: !272 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.417c9c4a651ab31b", scope: null, file: !4, line: 44, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !283) -// CHECK:STDOUT: !273 = !DILocalVariable(arg: 1, scope: !272, type: !9) -// CHECK:STDOUT: !274 = !DILocalVariable(arg: 2, scope: !272, type: !6) -// CHECK:STDOUT: !280 = !DILocation(line: 45, column: 15, scope: !272) -// CHECK:STDOUT: !281 = !DILocation(line: 45, column: 10, scope: !272) -// CHECK:STDOUT: !282 = !DILocation(line: 45, column: 3, scope: !272) -// CHECK:STDOUT: !283 = !{!273, !274} +// CHECK:STDOUT: !222 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.417c9c4a651ab31b", scope: null, file: !4, line: 39, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !234) +// CHECK:STDOUT: !223 = !DILocalVariable(arg: 1, scope: !222, type: !28) +// CHECK:STDOUT: !224 = !DILocalVariable(arg: 2, scope: !222, type: !6) +// CHECK:STDOUT: !229 = !DILocation(line: 40, column: 3, scope: !222) +// CHECK:STDOUT: !232 = !DILocation(line: 41, column: 10, scope: !222) +// CHECK:STDOUT: !233 = !DILocation(line: 41, column: 3, scope: !222) +// CHECK:STDOUT: !234 = !{!223, !224} +// CHECK:STDOUT: !261 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2fad9574e050607e", scope: null, file: !4, line: 44, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !272) +// CHECK:STDOUT: !262 = !DILocalVariable(arg: 1, scope: !261, type: !6) +// CHECK:STDOUT: !263 = !DILocalVariable(arg: 2, scope: !261, type: !6) +// CHECK:STDOUT: !269 = !DILocation(line: 45, column: 15, scope: !261) +// CHECK:STDOUT: !270 = !DILocation(line: 45, column: 10, scope: !261) +// CHECK:STDOUT: !271 = !DILocation(line: 45, column: 3, scope: !261) +// CHECK:STDOUT: !272 = !{!262, !263} +// CHECK:STDOUT: !273 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 44, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !284) +// CHECK:STDOUT: !274 = !DILocalVariable(arg: 1, scope: !273, type: !28) +// CHECK:STDOUT: !275 = !DILocalVariable(arg: 2, scope: !273, type: !6) +// CHECK:STDOUT: !281 = !DILocation(line: 45, column: 15, scope: !273) +// CHECK:STDOUT: !282 = !DILocation(line: 45, column: 10, scope: !273) +// CHECK:STDOUT: !283 = !DILocation(line: 45, column: 3, scope: !273) +// CHECK:STDOUT: !284 = !{!274, !275} +// CHECK:STDOUT: !285 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.417c9c4a651ab31b", scope: null, file: !4, line: 44, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !296) +// CHECK:STDOUT: !286 = !DILocalVariable(arg: 1, scope: !285, type: !28) +// CHECK:STDOUT: !287 = !DILocalVariable(arg: 2, scope: !285, type: !6) +// CHECK:STDOUT: !293 = !DILocation(line: 45, column: 15, scope: !285) +// CHECK:STDOUT: !294 = !DILocation(line: 45, column: 10, scope: !285) +// CHECK:STDOUT: !295 = !DILocation(line: 45, column: 3, scope: !285) +// CHECK:STDOUT: !296 = !{!286, !287} // 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 bc3d44b52b26..abc6a63f77b1 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_mutual.carbon @@ -46,150 +46,146 @@ fn M() { // CHECK:STDOUT: source_filename = "call_recursive_mutual.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !14 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !9 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !15 -// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !17 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !19 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !23 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !15 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !15 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !17 -// CHECK:STDOUT: store double 1.000000e+00, ptr %m.var, align 8, !dbg !17 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !19 -// CHECK:STDOUT: store ptr %n.var, ptr %ptr_i32.var, align 8, !dbg !19 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !23 -// CHECK:STDOUT: store ptr %m.var, ptr %ptr_f64.var, align 8, !dbg !23 -// CHECK:STDOUT: %.loc38_5 = load i32, ptr %n.var, align 4, !dbg !27 -// CHECK:STDOUT: %F.call.loc38 = call i32 @_CF.Main.2fad9574e050607e(i32 %.loc38_5, i32 0), !dbg !28 -// CHECK:STDOUT: %.loc39_5 = load double, ptr %m.var, align 8, !dbg !31 -// CHECK:STDOUT: %F.call.loc39 = call double @_CF.Main.21aefb7dfdebb8e4(double %.loc39_5, i32 0), !dbg !32 -// CHECK:STDOUT: %.loc40_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !35 -// CHECK:STDOUT: %F.call.loc40 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc40_5, i32 0), !dbg !36 -// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !37 -// CHECK:STDOUT: %F.call.loc41 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc41_5, i32 0), !dbg !38 -// CHECK:STDOUT: call void @"_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !23 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !19 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %m.var), !dbg !17 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !15 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !10 +// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !12 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !14 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !18 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !10 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !10 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !12 +// CHECK:STDOUT: store double 1.000000e+00, ptr %m.var, align 8, !dbg !12 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !14 +// CHECK:STDOUT: store ptr %n.var, ptr %ptr_i32.var, align 8, !dbg !14 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !18 +// CHECK:STDOUT: store ptr %m.var, ptr %ptr_f64.var, align 8, !dbg !18 +// CHECK:STDOUT: %.loc38_5 = load i32, ptr %n.var, align 4, !dbg !22 +// CHECK:STDOUT: %F.call.loc38 = call i32 @_CF.Main.2fad9574e050607e(i32 %.loc38_5, i32 0), !dbg !23 +// CHECK:STDOUT: %.loc39_5 = load double, ptr %m.var, align 8, !dbg !26 +// CHECK:STDOUT: %F.call.loc39 = call double @_CF.Main.21aefb7dfdebb8e4(double %.loc39_5, i32 0), !dbg !27 +// CHECK:STDOUT: %.loc40_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !31 +// CHECK:STDOUT: %F.call.loc40 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc40_5, i32 0), !dbg !32 +// CHECK:STDOUT: %.loc41_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !33 +// CHECK:STDOUT: %F.call.loc41 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc41_5, i32 0), !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b18855c76072615b(ptr %ptr_f64.var), !dbg !18 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %ptr_i32.var), !dbg !14 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %m.var), !dbg !12 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !10 // CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6fa1811d66e6eb5d: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.a17e1ddde5b22223: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.7619ac942aa9029a: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.72395be3dbbe8946: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: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !56 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !40 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 3, !dbg !47 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !48 +// CHECK:STDOUT: +// CHECK:STDOUT: if.then: ; preds = %entry +// CHECK:STDOUT: ret i32 %x, !dbg !50 +// CHECK:STDOUT: +// CHECK:STDOUT: if.else: ; preds = %entry +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !52 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !53 +// CHECK:STDOUT: ret i32 %G.call, !dbg !54 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !56 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 3, !dbg !63 // CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !64 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %x, !dbg !66 +// CHECK:STDOUT: ret double %x, !dbg !66 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry // CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !68 -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !69 -// CHECK:STDOUT: ret i32 %G.call, !dbg !70 +// CHECK:STDOUT: %G.call = call double @_CG.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !69 +// CHECK:STDOUT: ret double %G.call, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !72 { +// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !72 { // 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: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret double %x, !dbg !82 +// CHECK:STDOUT: ret ptr %x, !dbg !82 // 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 double @_CG.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !85 -// CHECK:STDOUT: ret double %G.call, !dbg !86 +// CHECK:STDOUT: %G.call = call ptr @_CG.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !85 +// CHECK:STDOUT: ret ptr %G.call, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !88 { -// 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: -// CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret ptr %x, !dbg !98 -// 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 ptr @_CG.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !101 -// CHECK:STDOUT: ret ptr %G.call, !dbg !102 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b18855c76072615b(ptr %t) #0 !dbg !105 { +// CHECK:STDOUT: ret void, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !120 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !127 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !128 -// CHECK:STDOUT: -// CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %x, !dbg !130 -// CHECK:STDOUT: -// CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !132 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !133 -// CHECK:STDOUT: ret i32 %F.call, !dbg !134 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !112 { +// CHECK:STDOUT: ret void, !dbg !117 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CG.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !136 { -// 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: -// CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret double %x, !dbg !146 -// 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 double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !149 -// CHECK:STDOUT: ret double %F.call, !dbg !150 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !119 { +// CHECK:STDOUT: ret void, !dbg !124 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !152 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !126 { +// CHECK:STDOUT: ret void, !dbg !131 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !133 { // 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 !140 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !141 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret ptr %x, !dbg !162 +// CHECK:STDOUT: ret i32 %x, !dbg !143 // 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 ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !165 -// CHECK:STDOUT: ret ptr %F.call, !dbg !166 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !145 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !146 +// CHECK:STDOUT: ret i32 %F.call, !dbg !147 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr double @_CG.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !149 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !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: ret double %x, !dbg !159 +// CHECK:STDOUT: +// CHECK:STDOUT: if.else: ; preds = %entry +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !161 +// CHECK:STDOUT: %F.call = call double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !162 +// CHECK:STDOUT: ret double %F.call, !dbg !163 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !165 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !172 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !173 +// CHECK:STDOUT: +// CHECK:STDOUT: if.then: ; preds = %entry +// CHECK:STDOUT: ret ptr %x, !dbg !175 +// CHECK:STDOUT: +// CHECK:STDOUT: if.else: ; preds = %entry +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !177 +// CHECK:STDOUT: %F.call = call ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !178 +// CHECK:STDOUT: ret ptr %F.call, !dbg !179 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -209,47 +205,41 @@ fn M() { // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !{null} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !10 = !{null, !9} -// CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{null, !6} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 32, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !15 = !DILocation(line: 33, column: 3, scope: !14) -// CHECK:STDOUT: !17 = !DILocation(line: 34, column: 3, scope: !14) -// CHECK:STDOUT: !19 = !DILocation(line: 35, column: 3, scope: !14) -// CHECK:STDOUT: !23 = !DILocation(line: 36, column: 3, scope: !14) -// CHECK:STDOUT: !27 = !DILocation(line: 38, column: 5, scope: !14) -// CHECK:STDOUT: !28 = !DILocation(line: 38, column: 3, scope: !14) -// CHECK:STDOUT: !29 = !{!6, !6, !6} +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 32, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !10 = !DILocation(line: 33, column: 3, scope: !9) +// CHECK:STDOUT: !12 = !DILocation(line: 34, column: 3, scope: !9) +// CHECK:STDOUT: !14 = !DILocation(line: 35, column: 3, scope: !9) +// CHECK:STDOUT: !18 = !DILocation(line: 36, column: 3, scope: !9) +// CHECK:STDOUT: !22 = !DILocation(line: 38, column: 5, scope: !9) +// CHECK:STDOUT: !23 = !DILocation(line: 38, column: 3, scope: !9) +// CHECK:STDOUT: !24 = !{!6, !6, !6} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = !DILocation(line: 39, column: 5, scope: !9) +// CHECK:STDOUT: !27 = !DILocation(line: 39, column: 3, scope: !9) +// CHECK:STDOUT: !28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !29 = !{!28, !28, !6} // CHECK:STDOUT: !30 = !DISubroutineType(types: !29) -// CHECK:STDOUT: !31 = !DILocation(line: 39, column: 5, scope: !14) -// CHECK:STDOUT: !32 = !DILocation(line: 39, column: 3, scope: !14) -// CHECK:STDOUT: !33 = !{!9, !9, !6} -// CHECK:STDOUT: !34 = !DISubroutineType(types: !33) -// CHECK:STDOUT: !35 = !DILocation(line: 40, column: 5, scope: !14) -// CHECK:STDOUT: !36 = !DILocation(line: 40, column: 3, scope: !14) -// CHECK:STDOUT: !37 = !DILocation(line: 41, column: 5, scope: !14) -// CHECK:STDOUT: !38 = !DILocation(line: 41, column: 3, scope: !14) -// CHECK:STDOUT: !39 = !DILocation(line: 32, column: 1, scope: !14) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core", scope: null, file: !4, line: 36, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !43) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !9) -// CHECK:STDOUT: !42 = !DILocation(line: 36, column: 3, scope: !40) -// CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !4, line: 35, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !9) -// CHECK:STDOUT: !46 = !DILocation(line: 35, column: 3, scope: !44) -// CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !4, line: 34, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 33, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !6) -// CHECK:STDOUT: !54 = !DILocation(line: 33, column: 3, scope: !52) -// CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2fad9574e050607e", scope: null, file: !4, line: 18, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !6) +// CHECK:STDOUT: !31 = !DILocation(line: 40, column: 5, scope: !9) +// CHECK:STDOUT: !32 = !DILocation(line: 40, column: 3, scope: !9) +// CHECK:STDOUT: !33 = !DILocation(line: 41, column: 5, scope: !9) +// CHECK:STDOUT: !34 = !DILocation(line: 41, column: 3, scope: !9) +// CHECK:STDOUT: !35 = !{null, !28} +// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) +// CHECK:STDOUT: !37 = !{null, !6} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DILocation(line: 32, column: 1, scope: !9) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2fad9574e050607e", scope: null, file: !4, line: 18, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !6) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 2, scope: !40, type: !6) +// CHECK:STDOUT: !47 = !DILocation(line: 19, column: 7, scope: !40) +// CHECK:STDOUT: !48 = !DILocation(line: 19, column: 6, scope: !40) +// CHECK:STDOUT: !50 = !DILocation(line: 20, column: 5, scope: !40) +// CHECK:STDOUT: !52 = !DILocation(line: 22, column: 15, scope: !40) +// CHECK:STDOUT: !53 = !DILocation(line: 22, column: 10, scope: !40) +// CHECK:STDOUT: !54 = !DILocation(line: 22, column: 3, scope: !40) +// CHECK:STDOUT: !55 = !{!41, !42} +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 18, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !28) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 2, scope: !56, type: !6) // CHECK:STDOUT: !63 = !DILocation(line: 19, column: 7, scope: !56) // CHECK:STDOUT: !64 = !DILocation(line: 19, column: 6, scope: !56) @@ -258,8 +248,8 @@ fn M() { // CHECK:STDOUT: !69 = !DILocation(line: 22, column: 10, scope: !56) // CHECK:STDOUT: !70 = !DILocation(line: 22, column: 3, scope: !56) // CHECK:STDOUT: !71 = !{!57, !58} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 18, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !87) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !9) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.417c9c4a651ab31b", scope: null, file: !4, line: 18, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !87) +// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !28) // 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) @@ -268,44 +258,51 @@ fn M() { // 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.417c9c4a651ab31b", 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: !120 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2fad9574e050607e", scope: null, file: !4, line: 25, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !6) -// CHECK:STDOUT: !122 = !DILocalVariable(arg: 2, scope: !120, type: !6) -// CHECK:STDOUT: !127 = !DILocation(line: 26, column: 7, scope: !120) -// CHECK:STDOUT: !128 = !DILocation(line: 26, column: 6, scope: !120) -// CHECK:STDOUT: !130 = !DILocation(line: 27, column: 5, scope: !120) -// CHECK:STDOUT: !132 = !DILocation(line: 29, column: 15, scope: !120) -// CHECK:STDOUT: !133 = !DILocation(line: 29, column: 10, scope: !120) -// CHECK:STDOUT: !134 = !DILocation(line: 29, column: 3, scope: !120) -// CHECK:STDOUT: !135 = !{!121, !122} -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 25, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !151) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !9) -// 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.417c9c4a651ab31b", 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: !104 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b18855c76072615b", scope: null, file: !104, line: 36, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !111) +// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !28) +// CHECK:STDOUT: !110 = !DILocation(line: 36, column: 1, scope: !105) +// CHECK:STDOUT: !111 = !{!106} +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !104, line: 36, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !118) +// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !28) +// CHECK:STDOUT: !117 = !DILocation(line: 36, column: 1, scope: !112) +// CHECK:STDOUT: !118 = !{!113} +// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !104, line: 36, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !125) +// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !28) +// CHECK:STDOUT: !124 = !DILocation(line: 36, column: 1, scope: !119) +// CHECK:STDOUT: !125 = !{!120} +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !104, line: 36, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !132) +// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !6) +// CHECK:STDOUT: !131 = !DILocation(line: 36, column: 1, scope: !126) +// CHECK:STDOUT: !132 = !{!127} +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2fad9574e050607e", scope: null, file: !4, line: 25, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !148) +// CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !6) +// CHECK:STDOUT: !135 = !DILocalVariable(arg: 2, scope: !133, type: !6) +// CHECK:STDOUT: !140 = !DILocation(line: 26, column: 7, scope: !133) +// CHECK:STDOUT: !141 = !DILocation(line: 26, column: 6, scope: !133) +// CHECK:STDOUT: !143 = !DILocation(line: 27, column: 5, scope: !133) +// CHECK:STDOUT: !145 = !DILocation(line: 29, column: 15, scope: !133) +// CHECK:STDOUT: !146 = !DILocation(line: 29, column: 10, scope: !133) +// CHECK:STDOUT: !147 = !DILocation(line: 29, column: 3, scope: !133) +// CHECK:STDOUT: !148 = !{!134, !135} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 25, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !164) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !28) +// CHECK:STDOUT: !151 = !DILocalVariable(arg: 2, scope: !149, type: !6) +// CHECK:STDOUT: !156 = !DILocation(line: 26, column: 7, scope: !149) +// CHECK:STDOUT: !157 = !DILocation(line: 26, column: 6, scope: !149) +// CHECK:STDOUT: !159 = !DILocation(line: 27, column: 5, scope: !149) +// CHECK:STDOUT: !161 = !DILocation(line: 29, column: 15, scope: !149) +// CHECK:STDOUT: !162 = !DILocation(line: 29, column: 10, scope: !149) +// CHECK:STDOUT: !163 = !DILocation(line: 29, column: 3, scope: !149) +// CHECK:STDOUT: !164 = !{!150, !151} +// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.417c9c4a651ab31b", scope: null, file: !4, line: 25, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !180) +// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !28) +// CHECK:STDOUT: !167 = !DILocalVariable(arg: 2, scope: !165, type: !6) +// CHECK:STDOUT: !172 = !DILocation(line: 26, column: 7, scope: !165) +// CHECK:STDOUT: !173 = !DILocation(line: 26, column: 6, scope: !165) +// CHECK:STDOUT: !175 = !DILocation(line: 27, column: 5, scope: !165) +// CHECK:STDOUT: !177 = !DILocation(line: 29, column: 15, scope: !165) +// CHECK:STDOUT: !178 = !DILocation(line: 29, column: 10, scope: !165) +// CHECK:STDOUT: !179 = !DILocation(line: 29, column: 3, scope: !165) +// CHECK:STDOUT: !180 = !{!166, !167} // 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 319932dc29f5..4c2c4ad717fb 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_reorder.carbon @@ -36,93 +36,87 @@ fn M() { // CHECK:STDOUT: source_filename = "call_recursive_reorder.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !14 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !9 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !15 -// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !17 -// CHECK:STDOUT: %b.var = alloca i1, align 1, !dbg !19 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !21 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !25 -// CHECK:STDOUT: %ptr_bool.var = alloca ptr, align 8, !dbg !29 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !15 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !15 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !17 -// CHECK:STDOUT: store double 1.000000e+00, ptr %m.var, align 8, !dbg !17 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !19 -// CHECK:STDOUT: store i8 0, ptr %b.var, align 1, !dbg !19 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !21 -// CHECK:STDOUT: store ptr %n.var, ptr %ptr_i32.var, align 8, !dbg !21 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !25 -// CHECK:STDOUT: store ptr %m.var, ptr %ptr_f64.var, align 8, !dbg !25 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_bool.var), !dbg !29 -// CHECK:STDOUT: store ptr %b.var, ptr %ptr_bool.var, align 8, !dbg !29 -// CHECK:STDOUT: %.loc30_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !33 -// CHECK:STDOUT: %.loc30_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !34 -// CHECK:STDOUT: %F.call.loc30 = call i32 @_CF.Main.97e933e3a3e841e9(ptr %.loc30_5, ptr %.loc30_14, i32 0), !dbg !35 -// CHECK:STDOUT: %.loc31_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !38 -// CHECK:STDOUT: %.loc31_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !39 -// CHECK:STDOUT: %F.call.loc31 = call i32 @_CF.Main.97e933e3a3e841e9(ptr %.loc31_5, ptr %.loc31_14, i32 0), !dbg !40 -// CHECK:STDOUT: call void @"_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core"(ptr %ptr_bool.var), !dbg !29 -// CHECK:STDOUT: call void @"_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !25 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !21 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %b.var), !dbg !19 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %m.var), !dbg !17 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !15 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !10 +// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !12 +// CHECK:STDOUT: %b.var = alloca i1, align 1, !dbg !14 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !16 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !20 +// CHECK:STDOUT: %ptr_bool.var = alloca ptr, align 8, !dbg !24 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !10 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !10 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !12 +// CHECK:STDOUT: store double 1.000000e+00, ptr %m.var, align 8, !dbg !12 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !14 +// CHECK:STDOUT: store i8 0, ptr %b.var, align 1, !dbg !14 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !16 +// CHECK:STDOUT: store ptr %n.var, ptr %ptr_i32.var, align 8, !dbg !16 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !20 +// CHECK:STDOUT: store ptr %m.var, ptr %ptr_f64.var, align 8, !dbg !20 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_bool.var), !dbg !24 +// CHECK:STDOUT: store ptr %b.var, ptr %ptr_bool.var, align 8, !dbg !24 +// CHECK:STDOUT: %.loc30_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !28 +// CHECK:STDOUT: %.loc30_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !29 +// CHECK:STDOUT: %F.call.loc30 = call i32 @_CF.Main.97e933e3a3e841e9(ptr %.loc30_5, ptr %.loc30_14, i32 0), !dbg !30 +// CHECK:STDOUT: %.loc31_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !34 +// CHECK:STDOUT: %.loc31_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !35 +// CHECK:STDOUT: %F.call.loc31 = call i32 @_CF.Main.97e933e3a3e841e9(ptr %.loc31_5, ptr %.loc31_14, i32 0), !dbg !36 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.393ac80c0c8a44df(ptr %ptr_bool.var), !dbg !24 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b18855c76072615b(ptr %ptr_f64.var), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %ptr_i32.var), !dbg !16 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %b.var), !dbg !14 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %m.var), !dbg !12 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !10 // CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb2383e5e4785e19: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.6fa1811d66e6eb5d: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.a17e1ddde5b22223: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.48e0adf639fe7af4: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.7619ac942aa9029a: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.72395be3dbbe8946: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: 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.97e933e3a3e841e9(ptr %x, ptr %y, i32 %count) #0 !dbg !66 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.97e933e3a3e841e9(ptr %x, ptr %y, i32 %count) #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !75 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !76 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !51 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !52 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !78 +// CHECK:STDOUT: ret i32 %count, !dbg !54 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !81 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.97e933e3a3e841e9(ptr %y, ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !82 -// CHECK:STDOUT: ret i32 %F.call, !dbg !83 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !57 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.97e933e3a3e841e9(ptr %y, ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !58 +// CHECK:STDOUT: ret i32 %F.call, !dbg !59 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.393ac80c0c8a44df(ptr %t) #0 !dbg !81 { +// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b18855c76072615b(ptr %t) #0 !dbg !88 { +// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !95 { +// CHECK:STDOUT: ret void, !dbg !100 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %t) #0 !dbg !102 { +// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !109 { +// CHECK:STDOUT: ret void, !dbg !114 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !116 { +// CHECK:STDOUT: ret void, !dbg !121 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -142,60 +136,61 @@ fn M() { // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !{null} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !10 = !{null, !9} -// CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{null, !6} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !15 = !DILocation(line: 23, column: 3, scope: !14) -// CHECK:STDOUT: !17 = !DILocation(line: 24, column: 3, scope: !14) -// CHECK:STDOUT: !19 = !DILocation(line: 25, column: 3, scope: !14) -// CHECK:STDOUT: !21 = !DILocation(line: 26, column: 3, scope: !14) -// CHECK:STDOUT: !25 = !DILocation(line: 27, column: 3, scope: !14) -// CHECK:STDOUT: !29 = !DILocation(line: 28, column: 3, scope: !14) -// CHECK:STDOUT: !33 = !DILocation(line: 30, column: 5, scope: !14) -// CHECK:STDOUT: !34 = !DILocation(line: 30, column: 14, scope: !14) -// CHECK:STDOUT: !35 = !DILocation(line: 30, column: 3, scope: !14) -// CHECK:STDOUT: !36 = !{!6, !9, !9, !6} -// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !38 = !DILocation(line: 31, column: 5, scope: !14) -// CHECK:STDOUT: !39 = !DILocation(line: 31, column: 14, scope: !14) -// CHECK:STDOUT: !40 = !DILocation(line: 31, column: 3, scope: !14) -// CHECK:STDOUT: !41 = !DILocation(line: 22, column: 1, scope: !14) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core", scope: null, file: !4, line: 28, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !45) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !9) -// CHECK:STDOUT: !44 = !DILocation(line: 28, column: 3, scope: !42) -// CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core", scope: null, file: !4, line: 27, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !49) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !9) -// CHECK:STDOUT: !48 = !DILocation(line: 27, column: 3, scope: !46) -// CHECK:STDOUT: !49 = !{!47} -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !4, line: 26, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !9) -// CHECK:STDOUT: !52 = !DILocation(line: 26, column: 3, scope: !50) -// CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 25, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !9) -// CHECK:STDOUT: !56 = !DILocation(line: 25, column: 3, scope: !54) -// CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !4, line: 24, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !61) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 23, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !65) -// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !6) -// CHECK:STDOUT: !64 = !DILocation(line: 23, column: 3, scope: !62) -// CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.97e933e3a3e841e9", scope: null, file: !4, line: 15, type: !37, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !9) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 2, scope: !66, type: !9) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 3, scope: !66, type: !6) -// CHECK:STDOUT: !75 = !DILocation(line: 16, column: 7, scope: !66) -// CHECK:STDOUT: !76 = !DILocation(line: 16, column: 6, scope: !66) -// CHECK:STDOUT: !78 = !DILocation(line: 17, column: 5, scope: !66) -// CHECK:STDOUT: !81 = !DILocation(line: 19, column: 18, scope: !66) -// CHECK:STDOUT: !82 = !DILocation(line: 19, column: 10, scope: !66) -// CHECK:STDOUT: !83 = !DILocation(line: 19, column: 3, scope: !66) -// CHECK:STDOUT: !84 = !{!67, !68, !69} +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !10 = !DILocation(line: 23, column: 3, scope: !9) +// CHECK:STDOUT: !12 = !DILocation(line: 24, column: 3, scope: !9) +// CHECK:STDOUT: !14 = !DILocation(line: 25, column: 3, scope: !9) +// CHECK:STDOUT: !16 = !DILocation(line: 26, column: 3, scope: !9) +// CHECK:STDOUT: !20 = !DILocation(line: 27, column: 3, scope: !9) +// CHECK:STDOUT: !24 = !DILocation(line: 28, column: 3, scope: !9) +// CHECK:STDOUT: !28 = !DILocation(line: 30, column: 5, scope: !9) +// CHECK:STDOUT: !29 = !DILocation(line: 30, column: 14, scope: !9) +// CHECK:STDOUT: !30 = !DILocation(line: 30, column: 3, scope: !9) +// CHECK:STDOUT: !31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !32 = !{!6, !31, !31, !6} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 31, column: 5, scope: !9) +// CHECK:STDOUT: !35 = !DILocation(line: 31, column: 14, scope: !9) +// CHECK:STDOUT: !36 = !DILocation(line: 31, column: 3, scope: !9) +// CHECK:STDOUT: !37 = !{null, !31} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !{null, !6} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !DILocation(line: 22, column: 1, scope: !9) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.97e933e3a3e841e9", scope: null, file: !4, line: 15, type: !33, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !60) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !31) +// CHECK:STDOUT: !44 = !DILocalVariable(arg: 2, scope: !42, type: !31) +// CHECK:STDOUT: !45 = !DILocalVariable(arg: 3, scope: !42, type: !6) +// CHECK:STDOUT: !51 = !DILocation(line: 16, column: 7, scope: !42) +// CHECK:STDOUT: !52 = !DILocation(line: 16, column: 6, scope: !42) +// CHECK:STDOUT: !54 = !DILocation(line: 17, column: 5, scope: !42) +// CHECK:STDOUT: !57 = !DILocation(line: 19, column: 18, scope: !42) +// CHECK:STDOUT: !58 = !DILocation(line: 19, column: 10, scope: !42) +// CHECK:STDOUT: !59 = !DILocation(line: 19, column: 3, scope: !42) +// CHECK:STDOUT: !60 = !{!43, !44, !45} +// CHECK:STDOUT: !80 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.393ac80c0c8a44df", scope: null, file: !80, line: 36, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !87) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !31) +// CHECK:STDOUT: !86 = !DILocation(line: 36, column: 1, scope: !81) +// CHECK:STDOUT: !87 = !{!82} +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b18855c76072615b", scope: null, file: !80, line: 36, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !94) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !31) +// CHECK:STDOUT: !93 = !DILocation(line: 36, column: 1, scope: !88) +// CHECK:STDOUT: !94 = !{!89} +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !80, line: 36, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !101) +// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !31) +// CHECK:STDOUT: !100 = !DILocation(line: 36, column: 1, scope: !95) +// CHECK:STDOUT: !101 = !{!96} +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.29e6aa423646b61a", scope: null, file: !80, line: 36, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !108) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !31) +// CHECK:STDOUT: !107 = !DILocation(line: 36, column: 1, scope: !102) +// CHECK:STDOUT: !108 = !{!103} +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !80, line: 36, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !115) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !31) +// CHECK:STDOUT: !114 = !DILocation(line: 36, column: 1, scope: !109) +// CHECK:STDOUT: !115 = !{!110} +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !80, line: 36, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !122) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !6) +// CHECK:STDOUT: !121 = !DILocation(line: 36, column: 1, scope: !116) +// CHECK:STDOUT: !122 = !{!117} // 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 f9a579defb26..09742fd12e70 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_reorder_more.carbon @@ -57,257 +57,248 @@ fn M() { // CHECK:STDOUT: source_filename = "call_recursive_reorder_more.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !20 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !11 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %val_i16.var = alloca i16, align 2, !dbg !21 -// CHECK:STDOUT: %val_i32.var = alloca i32, align 4, !dbg !23 -// CHECK:STDOUT: %val_i64.var = alloca i64, align 8, !dbg !25 -// CHECK:STDOUT: %val_f64.var = alloca double, align 8, !dbg !27 -// CHECK:STDOUT: %val_bool.var = alloca i1, align 1, !dbg !29 -// CHECK:STDOUT: %ptr_i16.var = alloca ptr, align 8, !dbg !31 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !35 -// CHECK:STDOUT: %ptr_i64.var = alloca ptr, align 8, !dbg !39 -// CHECK:STDOUT: %ptr_bool.var = alloca ptr, align 8, !dbg !43 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %val_i16.var), !dbg !21 -// CHECK:STDOUT: store i16 poison, ptr %val_i16.var, align 2, !dbg !21 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %val_i32.var), !dbg !23 -// CHECK:STDOUT: store i32 poison, ptr %val_i32.var, align 4, !dbg !23 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %val_i64.var), !dbg !25 -// CHECK:STDOUT: store i64 poison, ptr %val_i64.var, align 8, !dbg !25 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %val_f64.var), !dbg !27 -// CHECK:STDOUT: store double poison, ptr %val_f64.var, align 8, !dbg !27 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %val_bool.var), !dbg !29 -// CHECK:STDOUT: store i8 poison, ptr %val_bool.var, align 1, !dbg !29 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i16.var), !dbg !31 -// CHECK:STDOUT: store ptr %val_i16.var, ptr %ptr_i16.var, align 8, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !35 -// CHECK:STDOUT: store ptr %val_i32.var, ptr %ptr_i32.var, align 8, !dbg !35 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i64.var), !dbg !39 -// CHECK:STDOUT: store ptr %val_i64.var, ptr %ptr_i64.var, align 8, !dbg !39 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_bool.var), !dbg !43 -// CHECK:STDOUT: store ptr %val_bool.var, ptr %ptr_bool.var, align 8, !dbg !43 -// CHECK:STDOUT: %.loc38_5 = load i16, ptr %val_i16.var, align 2, !dbg !47 -// CHECK:STDOUT: %.loc38_14 = load ptr, ptr %ptr_i32.var, align 8, !dbg !48 -// CHECK:STDOUT: %.loc38_23 = load ptr, ptr %ptr_bool.var, align 8, !dbg !49 -// CHECK:STDOUT: %F.call.loc38 = call i32 @_CF.Main.5b94c215f01213ad(i16 %.loc38_5, ptr %.loc38_14, ptr %.loc38_23, i32 0), !dbg !50 -// CHECK:STDOUT: %.loc39_5 = load i32, ptr %val_i32.var, align 4, !dbg !53 -// CHECK:STDOUT: %.loc39_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !54 -// CHECK:STDOUT: %.loc39_24 = load ptr, ptr %ptr_i64.var, align 8, !dbg !55 -// CHECK:STDOUT: %F.call.loc39 = call i32 @_CF.Main.54596334ff7c3bae(i32 %.loc39_5, ptr %.loc39_14, ptr %.loc39_24, i32 0), !dbg !56 -// CHECK:STDOUT: %.loc40_5 = load i8, ptr %val_bool.var, align 1, !dbg !59 -// CHECK:STDOUT: %.loc40_51 = trunc i8 %.loc40_5 to i1, !dbg !59 -// CHECK:STDOUT: %.loc40_15 = load ptr, ptr %ptr_bool.var, align 8, !dbg !60 -// CHECK:STDOUT: %.loc40_25 = load ptr, ptr %ptr_i16.var, align 8, !dbg !61 -// CHECK:STDOUT: %F.call.loc40 = call i32 @_CF.Main.17ab41db4fbdd09e(i1 %.loc40_51, ptr %.loc40_15, ptr %.loc40_25, i32 0), !dbg !62 -// CHECK:STDOUT: %.loc41_5 = load i64, ptr %val_i64.var, align 8, !dbg !65 -// CHECK:STDOUT: %.loc41_14 = load i8, ptr %val_bool.var, align 1, !dbg !66 -// CHECK:STDOUT: %.loc41_142 = trunc i8 %.loc41_14 to i1, !dbg !66 -// CHECK:STDOUT: %.loc41_24 = load ptr, ptr %ptr_bool.var, align 8, !dbg !67 -// CHECK:STDOUT: %F.call.loc41 = call i32 @_CF.Main.4870fabf59aefef9(i64 %.loc41_5, i1 %.loc41_142, ptr %.loc41_24, i32 0), !dbg !68 -// CHECK:STDOUT: %.loc42_5 = load double, ptr %val_f64.var, align 8, !dbg !71 -// CHECK:STDOUT: %.loc42_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !72 -// CHECK:STDOUT: %.loc42_24 = load ptr, ptr %ptr_bool.var, align 8, !dbg !73 -// CHECK:STDOUT: %F.call.loc42 = call i32 @_CF.Main.e20e13691da7edc2(double %.loc42_5, ptr %.loc42_14, ptr %.loc42_24, i32 0), !dbg !74 -// CHECK:STDOUT: %.loc46_5 = load ptr, ptr %ptr_bool.var, align 8, !dbg !75 -// CHECK:STDOUT: %.loc46_15 = load ptr, ptr %ptr_i16.var, align 8, !dbg !76 -// CHECK:STDOUT: %.loc46_24 = load ptr, ptr %ptr_i32.var, align 8, !dbg !77 -// CHECK:STDOUT: %F.call.loc46 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc46_5, ptr %.loc46_15, ptr %.loc46_24, i32 0), !dbg !78 -// CHECK:STDOUT: %.loc47_5 = load ptr, ptr %ptr_bool.var, align 8, !dbg !79 -// CHECK:STDOUT: %.loc47_15 = load ptr, ptr %ptr_i16.var, align 8, !dbg !80 -// CHECK:STDOUT: %.loc47_24 = load ptr, ptr %ptr_i64.var, align 8, !dbg !81 -// CHECK:STDOUT: %F.call.loc47 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc47_5, ptr %.loc47_15, ptr %.loc47_24, i32 0), !dbg !82 -// CHECK:STDOUT: %.loc48_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !83 -// CHECK:STDOUT: %.loc48_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !84 -// CHECK:STDOUT: %.loc48_24 = load ptr, ptr %ptr_i16.var, align 8, !dbg !85 -// CHECK:STDOUT: %F.call.loc48 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc48_5, ptr %.loc48_14, ptr %.loc48_24, i32 0), !dbg !86 -// CHECK:STDOUT: %.loc49_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !87 -// CHECK:STDOUT: %.loc49_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !88 -// CHECK:STDOUT: %.loc49_24 = load ptr, ptr %ptr_i64.var, align 8, !dbg !89 -// CHECK:STDOUT: %F.call.loc49 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc49_5, ptr %.loc49_14, ptr %.loc49_24, i32 0), !dbg !90 -// CHECK:STDOUT: %.loc50_5 = load ptr, ptr %ptr_i16.var, align 8, !dbg !91 -// CHECK:STDOUT: %.loc50_14 = load ptr, ptr %ptr_i32.var, align 8, !dbg !92 -// CHECK:STDOUT: %.loc50_23 = load ptr, ptr %ptr_i64.var, align 8, !dbg !93 -// CHECK:STDOUT: %F.call.loc50 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc50_5, ptr %.loc50_14, ptr %.loc50_23, i32 0), !dbg !94 -// CHECK:STDOUT: %.loc51_5 = load ptr, ptr %ptr_i64.var, align 8, !dbg !95 -// CHECK:STDOUT: %.loc51_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !96 -// CHECK:STDOUT: %.loc51_24 = load ptr, ptr %ptr_i16.var, align 8, !dbg !97 -// CHECK:STDOUT: %F.call.loc51 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc51_5, ptr %.loc51_14, ptr %.loc51_24, i32 0), !dbg !98 -// CHECK:STDOUT: %.loc52_5 = load ptr, ptr %ptr_bool.var, align 8, !dbg !99 -// CHECK:STDOUT: %.loc52_15 = load ptr, ptr %ptr_bool.var, align 8, !dbg !100 -// CHECK:STDOUT: %.loc52_25 = load ptr, ptr %ptr_bool.var, align 8, !dbg !101 -// CHECK:STDOUT: %F.call.loc52 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc52_5, ptr %.loc52_15, ptr %.loc52_25, i32 0), !dbg !102 -// CHECK:STDOUT: call void @"_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core"(ptr %ptr_bool.var), !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.e022ee50d605e0f1:core.Destroy.Core"(ptr %ptr_i64.var), !dbg !39 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !35 -// CHECK:STDOUT: call void @"_CSelfDestruct.e141c7bd9b2a8a95:core.Destroy.Core"(ptr %ptr_i16.var), !dbg !31 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %val_bool.var), !dbg !29 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %val_f64.var), !dbg !27 -// CHECK:STDOUT: call void @"_CSelfDestruct.1528c87a0c8e3d39:core.Destroy.Core"(ptr %val_i64.var), !dbg !25 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %val_i32.var), !dbg !23 -// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %val_i16.var), !dbg !21 +// CHECK:STDOUT: %val_i16.var = alloca i16, align 2, !dbg !12 +// CHECK:STDOUT: %val_i32.var = alloca i32, align 4, !dbg !14 +// CHECK:STDOUT: %val_i64.var = alloca i64, align 8, !dbg !16 +// CHECK:STDOUT: %val_f64.var = alloca double, align 8, !dbg !18 +// CHECK:STDOUT: %val_bool.var = alloca i1, align 1, !dbg !20 +// CHECK:STDOUT: %ptr_i16.var = alloca ptr, align 8, !dbg !22 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !26 +// CHECK:STDOUT: %ptr_i64.var = alloca ptr, align 8, !dbg !30 +// CHECK:STDOUT: %ptr_bool.var = alloca ptr, align 8, !dbg !34 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %val_i16.var), !dbg !12 +// CHECK:STDOUT: store i16 poison, ptr %val_i16.var, align 2, !dbg !12 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %val_i32.var), !dbg !14 +// CHECK:STDOUT: store i32 poison, ptr %val_i32.var, align 4, !dbg !14 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %val_i64.var), !dbg !16 +// CHECK:STDOUT: store i64 poison, ptr %val_i64.var, align 8, !dbg !16 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %val_f64.var), !dbg !18 +// CHECK:STDOUT: store double poison, ptr %val_f64.var, align 8, !dbg !18 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %val_bool.var), !dbg !20 +// CHECK:STDOUT: store i8 poison, ptr %val_bool.var, align 1, !dbg !20 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i16.var), !dbg !22 +// CHECK:STDOUT: store ptr %val_i16.var, ptr %ptr_i16.var, align 8, !dbg !22 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !26 +// CHECK:STDOUT: store ptr %val_i32.var, ptr %ptr_i32.var, align 8, !dbg !26 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i64.var), !dbg !30 +// CHECK:STDOUT: store ptr %val_i64.var, ptr %ptr_i64.var, align 8, !dbg !30 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_bool.var), !dbg !34 +// CHECK:STDOUT: store ptr %val_bool.var, ptr %ptr_bool.var, align 8, !dbg !34 +// CHECK:STDOUT: %.loc38_5 = load i16, ptr %val_i16.var, align 2, !dbg !38 +// CHECK:STDOUT: %.loc38_14 = load ptr, ptr %ptr_i32.var, align 8, !dbg !39 +// CHECK:STDOUT: %.loc38_23 = load ptr, ptr %ptr_bool.var, align 8, !dbg !40 +// CHECK:STDOUT: %F.call.loc38 = call i32 @_CF.Main.5b94c215f01213ad(i16 %.loc38_5, ptr %.loc38_14, ptr %.loc38_23, i32 0), !dbg !41 +// CHECK:STDOUT: %.loc39_5 = load i32, ptr %val_i32.var, align 4, !dbg !45 +// CHECK:STDOUT: %.loc39_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !46 +// CHECK:STDOUT: %.loc39_24 = load ptr, ptr %ptr_i64.var, align 8, !dbg !47 +// CHECK:STDOUT: %F.call.loc39 = call i32 @_CF.Main.54596334ff7c3bae(i32 %.loc39_5, ptr %.loc39_14, ptr %.loc39_24, i32 0), !dbg !48 +// CHECK:STDOUT: %.loc40_5 = load i8, ptr %val_bool.var, align 1, !dbg !51 +// CHECK:STDOUT: %.loc40_51 = trunc i8 %.loc40_5 to i1, !dbg !51 +// CHECK:STDOUT: %.loc40_15 = load ptr, ptr %ptr_bool.var, align 8, !dbg !52 +// CHECK:STDOUT: %.loc40_25 = load ptr, ptr %ptr_i16.var, align 8, !dbg !53 +// CHECK:STDOUT: %F.call.loc40 = call i32 @_CF.Main.17ab41db4fbdd09e(i1 %.loc40_51, ptr %.loc40_15, ptr %.loc40_25, i32 0), !dbg !54 +// CHECK:STDOUT: %.loc41_5 = load i64, ptr %val_i64.var, align 8, !dbg !57 +// CHECK:STDOUT: %.loc41_14 = load i8, ptr %val_bool.var, align 1, !dbg !58 +// CHECK:STDOUT: %.loc41_142 = trunc i8 %.loc41_14 to i1, !dbg !58 +// CHECK:STDOUT: %.loc41_24 = load ptr, ptr %ptr_bool.var, align 8, !dbg !59 +// CHECK:STDOUT: %F.call.loc41 = call i32 @_CF.Main.4870fabf59aefef9(i64 %.loc41_5, i1 %.loc41_142, ptr %.loc41_24, i32 0), !dbg !60 +// CHECK:STDOUT: %.loc42_5 = load double, ptr %val_f64.var, align 8, !dbg !63 +// CHECK:STDOUT: %.loc42_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !64 +// CHECK:STDOUT: %.loc42_24 = load ptr, ptr %ptr_bool.var, align 8, !dbg !65 +// CHECK:STDOUT: %F.call.loc42 = call i32 @_CF.Main.e20e13691da7edc2(double %.loc42_5, ptr %.loc42_14, ptr %.loc42_24, i32 0), !dbg !66 +// CHECK:STDOUT: %.loc46_5 = load ptr, ptr %ptr_bool.var, align 8, !dbg !67 +// CHECK:STDOUT: %.loc46_15 = load ptr, ptr %ptr_i16.var, align 8, !dbg !68 +// CHECK:STDOUT: %.loc46_24 = load ptr, ptr %ptr_i32.var, align 8, !dbg !69 +// CHECK:STDOUT: %F.call.loc46 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc46_5, ptr %.loc46_15, ptr %.loc46_24, i32 0), !dbg !70 +// CHECK:STDOUT: %.loc47_5 = load ptr, ptr %ptr_bool.var, align 8, !dbg !71 +// CHECK:STDOUT: %.loc47_15 = load ptr, ptr %ptr_i16.var, align 8, !dbg !72 +// CHECK:STDOUT: %.loc47_24 = load ptr, ptr %ptr_i64.var, align 8, !dbg !73 +// CHECK:STDOUT: %F.call.loc47 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc47_5, ptr %.loc47_15, ptr %.loc47_24, i32 0), !dbg !74 +// CHECK:STDOUT: %.loc48_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !75 +// CHECK:STDOUT: %.loc48_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !76 +// CHECK:STDOUT: %.loc48_24 = load ptr, ptr %ptr_i16.var, align 8, !dbg !77 +// CHECK:STDOUT: %F.call.loc48 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc48_5, ptr %.loc48_14, ptr %.loc48_24, i32 0), !dbg !78 +// CHECK:STDOUT: %.loc49_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !79 +// CHECK:STDOUT: %.loc49_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !80 +// CHECK:STDOUT: %.loc49_24 = load ptr, ptr %ptr_i64.var, align 8, !dbg !81 +// CHECK:STDOUT: %F.call.loc49 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc49_5, ptr %.loc49_14, ptr %.loc49_24, i32 0), !dbg !82 +// CHECK:STDOUT: %.loc50_5 = load ptr, ptr %ptr_i16.var, align 8, !dbg !83 +// CHECK:STDOUT: %.loc50_14 = load ptr, ptr %ptr_i32.var, align 8, !dbg !84 +// CHECK:STDOUT: %.loc50_23 = load ptr, ptr %ptr_i64.var, align 8, !dbg !85 +// CHECK:STDOUT: %F.call.loc50 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc50_5, ptr %.loc50_14, ptr %.loc50_23, i32 0), !dbg !86 +// CHECK:STDOUT: %.loc51_5 = load ptr, ptr %ptr_i64.var, align 8, !dbg !87 +// CHECK:STDOUT: %.loc51_14 = load ptr, ptr %ptr_bool.var, align 8, !dbg !88 +// CHECK:STDOUT: %.loc51_24 = load ptr, ptr %ptr_i16.var, align 8, !dbg !89 +// CHECK:STDOUT: %F.call.loc51 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc51_5, ptr %.loc51_14, ptr %.loc51_24, i32 0), !dbg !90 +// CHECK:STDOUT: %.loc52_5 = load ptr, ptr %ptr_bool.var, align 8, !dbg !91 +// CHECK:STDOUT: %.loc52_15 = load ptr, ptr %ptr_bool.var, align 8, !dbg !92 +// CHECK:STDOUT: %.loc52_25 = load ptr, ptr %ptr_bool.var, align 8, !dbg !93 +// CHECK:STDOUT: %F.call.loc52 = call i32 @_CF.Main.1a6874a49ac98b64(ptr %.loc52_5, ptr %.loc52_15, ptr %.loc52_25, i32 0), !dbg !94 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.393ac80c0c8a44df(ptr %ptr_bool.var), !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ca462fb0865f0b4d(ptr %ptr_i64.var), !dbg !30 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %ptr_i32.var), !dbg !26 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a2001b647b825e99(ptr %ptr_i16.var), !dbg !22 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %val_bool.var), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %val_f64.var), !dbg !18 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e9df21fc3951ad1(ptr %val_i64.var), !dbg !16 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %val_i32.var), !dbg !14 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e43967308dd20a9f(ptr %val_i16.var), !dbg !12 // CHECK:STDOUT: ret void, !dbg !103 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core"(ptr %self) #0 !dbg !104 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !106 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e022ee50d605e0f1: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 @"_CSelfDestruct.a17e1ddde5b22223: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.e141c7bd9b2a8a95:core.Destroy.Core"(ptr %self) #0 !dbg !116 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !118 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !120 { -// 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.7619ac942aa9029a:core.Destroy.Core"(ptr %self) #0 !dbg !124 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !126 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1528c87a0c8e3d39: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.72395be3dbbe8946: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.2282b3883c44dd3d: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: 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.5b94c215f01213ad(i16 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !140 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.5b94c215f01213ad(i16 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !104 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !151 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !152 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !115 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !116 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !154 +// CHECK:STDOUT: ret i32 %count, !dbg !118 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !158 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.5b94c215f01213ad(i16 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !159 -// CHECK:STDOUT: ret i32 %F.call, !dbg !160 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !122 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.5b94c215f01213ad(i16 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !123 +// CHECK:STDOUT: ret i32 %F.call, !dbg !124 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.54596334ff7c3bae(i32 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !162 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.54596334ff7c3bae(i32 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !126 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !173 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !174 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !137 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !138 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !176 +// CHECK:STDOUT: ret i32 %count, !dbg !140 // 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 i32 @_CF.Main.54596334ff7c3bae(i32 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !181 -// CHECK:STDOUT: ret i32 %F.call, !dbg !182 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !144 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.54596334ff7c3bae(i32 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !145 +// CHECK:STDOUT: ret i32 %F.call, !dbg !146 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.17ab41db4fbdd09e(i1 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !184 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.17ab41db4fbdd09e(i1 %x, ptr %y, ptr %z, i32 %count) #0 !dbg !148 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !195 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !196 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !159 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !160 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !198 +// CHECK:STDOUT: ret i32 %count, !dbg !162 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !202 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.17ab41db4fbdd09e(i1 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !203 -// CHECK:STDOUT: ret i32 %F.call, !dbg !204 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !166 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.17ab41db4fbdd09e(i1 %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !167 +// CHECK:STDOUT: ret i32 %F.call, !dbg !168 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4870fabf59aefef9(i64 %x, i1 %y, ptr %z, i32 %count) #0 !dbg !206 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.4870fabf59aefef9(i64 %x, i1 %y, ptr %z, i32 %count) #0 !dbg !170 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !217 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !218 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !181 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !182 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !220 +// CHECK:STDOUT: ret i32 %count, !dbg !184 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !224 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.9687df6c12a8eb01(i64 %x, ptr %z, i1 %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !225 -// CHECK:STDOUT: ret i32 %F.call, !dbg !226 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !188 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.9687df6c12a8eb01(i64 %x, ptr %z, i1 %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !189 +// CHECK:STDOUT: ret i32 %F.call, !dbg !190 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.e20e13691da7edc2(double %x, ptr %y, ptr %z, i32 %count) #0 !dbg !228 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.e20e13691da7edc2(double %x, ptr %y, ptr %z, i32 %count) #0 !dbg !192 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !239 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !240 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !203 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !204 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !242 +// CHECK:STDOUT: ret i32 %count, !dbg !206 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !246 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.e20e13691da7edc2(double %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !247 -// CHECK:STDOUT: ret i32 %F.call, !dbg !248 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !210 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.e20e13691da7edc2(double %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !211 +// CHECK:STDOUT: ret i32 %F.call, !dbg !212 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.1a6874a49ac98b64(ptr %x, ptr %y, ptr %z, i32 %count) #0 !dbg !250 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.1a6874a49ac98b64(ptr %x, ptr %y, ptr %z, i32 %count) #0 !dbg !214 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !261 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !262 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !225 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !226 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !264 +// CHECK:STDOUT: ret i32 %count, !dbg !228 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !268 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.1a6874a49ac98b64(ptr %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !269 -// CHECK:STDOUT: ret i32 %F.call, !dbg !270 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !232 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.1a6874a49ac98b64(ptr %x, ptr %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !233 +// CHECK:STDOUT: ret i32 %F.call, !dbg !234 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.9687df6c12a8eb01(i64 %x, ptr %y, i1 %z, i32 %count) #0 !dbg !470 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.393ac80c0c8a44df(ptr %t) #0 !dbg !369 { +// CHECK:STDOUT: ret void, !dbg !374 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ca462fb0865f0b4d(ptr %t) #0 !dbg !376 { +// CHECK:STDOUT: ret void, !dbg !381 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !383 { +// CHECK:STDOUT: ret void, !dbg !388 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.a2001b647b825e99(ptr %t) #0 !dbg !390 { +// CHECK:STDOUT: ret void, !dbg !395 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %t) #0 !dbg !397 { +// CHECK:STDOUT: ret void, !dbg !402 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !404 { +// CHECK:STDOUT: ret void, !dbg !409 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.7e9df21fc3951ad1(ptr %t) #0 !dbg !411 { +// CHECK:STDOUT: ret void, !dbg !416 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !418 { +// CHECK:STDOUT: ret void, !dbg !423 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.e43967308dd20a9f(ptr %t) #0 !dbg !425 { +// CHECK:STDOUT: ret void, !dbg !430 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.9687df6c12a8eb01(i64 %x, ptr %y, i1 %z, i32 %count) #0 !dbg !498 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !481 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !482 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 2, !dbg !509 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then, label %if.else, !dbg !510 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: ret i32 %count, !dbg !484 +// CHECK:STDOUT: ret i32 %count, !dbg !512 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !488 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.4870fabf59aefef9(i64 %x, i1 %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !489 -// CHECK:STDOUT: ret i32 %F.call, !dbg !490 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !516 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.4870fabf59aefef9(i64 %x, i1 %z, ptr %y, i32 %Int.as.AddWith.impl.Op.call), !dbg !517 +// CHECK:STDOUT: ret i32 %F.call, !dbg !518 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -329,200 +320,201 @@ fn M() { // CHECK:STDOUT: !8 = !DIBasicType(name: "int", size: 64, encoding: DW_ATE_signed) // CHECK:STDOUT: !9 = !{null} // CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !12 = !{null, !11} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = !{null, !8} -// CHECK:STDOUT: !15 = !DISubroutineType(types: !14) -// CHECK:STDOUT: !16 = !{null, !6} -// CHECK:STDOUT: !17 = !DISubroutineType(types: !16) -// CHECK:STDOUT: !18 = !{null, !7} -// CHECK:STDOUT: !19 = !DISubroutineType(types: !18) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 22, type: !10, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !21 = !DILocation(line: 23, column: 3, scope: !20) -// CHECK:STDOUT: !23 = !DILocation(line: 24, column: 3, scope: !20) -// CHECK:STDOUT: !25 = !DILocation(line: 25, column: 3, scope: !20) -// CHECK:STDOUT: !27 = !DILocation(line: 26, column: 3, scope: !20) -// CHECK:STDOUT: !29 = !DILocation(line: 27, column: 3, scope: !20) -// CHECK:STDOUT: !31 = !DILocation(line: 29, column: 3, scope: !20) -// CHECK:STDOUT: !35 = !DILocation(line: 30, column: 3, scope: !20) -// CHECK:STDOUT: !39 = !DILocation(line: 31, column: 3, scope: !20) -// CHECK:STDOUT: !43 = !DILocation(line: 32, column: 3, scope: !20) -// CHECK:STDOUT: !47 = !DILocation(line: 38, column: 5, scope: !20) -// CHECK:STDOUT: !48 = !DILocation(line: 38, column: 14, scope: !20) -// CHECK:STDOUT: !49 = !DILocation(line: 38, column: 23, scope: !20) -// CHECK:STDOUT: !50 = !DILocation(line: 38, column: 3, scope: !20) -// CHECK:STDOUT: !51 = !{!6, !7, !11, !11, !6} -// CHECK:STDOUT: !52 = !DISubroutineType(types: !51) -// CHECK:STDOUT: !53 = !DILocation(line: 39, column: 5, scope: !20) -// CHECK:STDOUT: !54 = !DILocation(line: 39, column: 14, scope: !20) -// CHECK:STDOUT: !55 = !DILocation(line: 39, column: 24, scope: !20) -// CHECK:STDOUT: !56 = !DILocation(line: 39, column: 3, scope: !20) -// CHECK:STDOUT: !57 = !{!6, !6, !11, !11, !6} -// CHECK:STDOUT: !58 = !DISubroutineType(types: !57) -// CHECK:STDOUT: !59 = !DILocation(line: 40, column: 5, scope: !20) -// CHECK:STDOUT: !60 = !DILocation(line: 40, column: 15, scope: !20) -// CHECK:STDOUT: !61 = !DILocation(line: 40, column: 25, scope: !20) -// CHECK:STDOUT: !62 = !DILocation(line: 40, column: 3, scope: !20) -// CHECK:STDOUT: !63 = !{!6, !11, !11, !11, !6} -// CHECK:STDOUT: !64 = !DISubroutineType(types: !63) -// CHECK:STDOUT: !65 = !DILocation(line: 41, column: 5, scope: !20) -// CHECK:STDOUT: !66 = !DILocation(line: 41, column: 14, scope: !20) -// CHECK:STDOUT: !67 = !DILocation(line: 41, column: 24, scope: !20) -// CHECK:STDOUT: !68 = !DILocation(line: 41, column: 3, scope: !20) -// CHECK:STDOUT: !69 = !{!6, !8, !11, !11, !6} -// CHECK:STDOUT: !70 = !DISubroutineType(types: !69) -// CHECK:STDOUT: !71 = !DILocation(line: 42, column: 5, scope: !20) -// CHECK:STDOUT: !72 = !DILocation(line: 42, column: 14, scope: !20) -// CHECK:STDOUT: !73 = !DILocation(line: 42, column: 24, scope: !20) -// CHECK:STDOUT: !74 = !DILocation(line: 42, column: 3, scope: !20) -// CHECK:STDOUT: !75 = !DILocation(line: 46, column: 5, scope: !20) -// CHECK:STDOUT: !76 = !DILocation(line: 46, column: 15, scope: !20) -// CHECK:STDOUT: !77 = !DILocation(line: 46, column: 24, scope: !20) -// CHECK:STDOUT: !78 = !DILocation(line: 46, column: 3, scope: !20) -// CHECK:STDOUT: !79 = !DILocation(line: 47, column: 5, scope: !20) -// CHECK:STDOUT: !80 = !DILocation(line: 47, column: 15, scope: !20) -// CHECK:STDOUT: !81 = !DILocation(line: 47, column: 24, scope: !20) -// CHECK:STDOUT: !82 = !DILocation(line: 47, column: 3, scope: !20) -// CHECK:STDOUT: !83 = !DILocation(line: 48, column: 5, scope: !20) -// CHECK:STDOUT: !84 = !DILocation(line: 48, column: 14, scope: !20) -// CHECK:STDOUT: !85 = !DILocation(line: 48, column: 24, scope: !20) -// CHECK:STDOUT: !86 = !DILocation(line: 48, column: 3, scope: !20) -// CHECK:STDOUT: !87 = !DILocation(line: 49, column: 5, scope: !20) -// CHECK:STDOUT: !88 = !DILocation(line: 49, column: 14, scope: !20) -// CHECK:STDOUT: !89 = !DILocation(line: 49, column: 24, scope: !20) -// CHECK:STDOUT: !90 = !DILocation(line: 49, column: 3, scope: !20) -// CHECK:STDOUT: !91 = !DILocation(line: 50, column: 5, scope: !20) -// CHECK:STDOUT: !92 = !DILocation(line: 50, column: 14, scope: !20) -// CHECK:STDOUT: !93 = !DILocation(line: 50, column: 23, scope: !20) -// CHECK:STDOUT: !94 = !DILocation(line: 50, column: 3, scope: !20) -// CHECK:STDOUT: !95 = !DILocation(line: 51, column: 5, scope: !20) -// CHECK:STDOUT: !96 = !DILocation(line: 51, column: 14, scope: !20) -// CHECK:STDOUT: !97 = !DILocation(line: 51, column: 24, scope: !20) -// CHECK:STDOUT: !98 = !DILocation(line: 51, column: 3, scope: !20) -// CHECK:STDOUT: !99 = !DILocation(line: 52, column: 5, scope: !20) -// CHECK:STDOUT: !100 = !DILocation(line: 52, column: 15, scope: !20) -// CHECK:STDOUT: !101 = !DILocation(line: 52, column: 25, scope: !20) -// CHECK:STDOUT: !102 = !DILocation(line: 52, column: 3, scope: !20) -// CHECK:STDOUT: !103 = !DILocation(line: 22, column: 1, scope: !20) -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core", scope: null, file: !4, line: 32, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !107) -// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !11) -// CHECK:STDOUT: !106 = !DILocation(line: 32, column: 3, scope: !104) -// CHECK:STDOUT: !107 = !{!105} -// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e022ee50d605e0f1:core.Destroy.Core", scope: null, file: !4, line: 31, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !111) -// CHECK:STDOUT: !109 = !DILocalVariable(arg: 1, scope: !108, type: !11) -// CHECK:STDOUT: !110 = !DILocation(line: 31, column: 3, scope: !108) -// CHECK:STDOUT: !111 = !{!109} -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !4, line: 30, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !115) -// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !11) -// CHECK:STDOUT: !114 = !DILocation(line: 30, column: 3, scope: !112) -// CHECK:STDOUT: !115 = !{!113} -// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e141c7bd9b2a8a95:core.Destroy.Core", scope: null, file: !4, line: 29, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !119) -// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !11) -// CHECK:STDOUT: !118 = !DILocation(line: 29, column: 3, scope: !116) -// CHECK:STDOUT: !119 = !{!117} -// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 27, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !123) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !11) -// CHECK:STDOUT: !122 = !DILocation(line: 27, column: 3, scope: !120) -// CHECK:STDOUT: !123 = !{!121} -// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !4, line: 26, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !127) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.1528c87a0c8e3d39:core.Destroy.Core", scope: null, file: !4, line: 25, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !131) -// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !8) -// CHECK:STDOUT: !130 = !DILocation(line: 25, column: 3, scope: !128) -// CHECK:STDOUT: !131 = !{!129} -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 24, type: !17, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135) -// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !6) -// CHECK:STDOUT: !134 = !DILocation(line: 24, column: 3, scope: !132) -// CHECK:STDOUT: !135 = !{!133} -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core", scope: null, file: !4, line: 23, type: !19, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !7) -// CHECK:STDOUT: !138 = !DILocation(line: 23, column: 3, scope: !136) -// CHECK:STDOUT: !139 = !{!137} -// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5b94c215f01213ad", scope: null, file: !4, line: 15, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !161) -// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !7) -// CHECK:STDOUT: !142 = !DILocalVariable(arg: 2, scope: !140, type: !11) -// CHECK:STDOUT: !143 = !DILocalVariable(arg: 3, scope: !140, type: !11) -// CHECK:STDOUT: !144 = !DILocalVariable(arg: 4, scope: !140, type: !6) -// CHECK:STDOUT: !151 = !DILocation(line: 16, column: 7, scope: !140) -// CHECK:STDOUT: !152 = !DILocation(line: 16, column: 6, scope: !140) -// CHECK:STDOUT: !154 = !DILocation(line: 17, column: 5, scope: !140) -// CHECK:STDOUT: !158 = !DILocation(line: 19, column: 21, scope: !140) -// CHECK:STDOUT: !159 = !DILocation(line: 19, column: 10, scope: !140) -// CHECK:STDOUT: !160 = !DILocation(line: 19, column: 3, scope: !140) -// CHECK:STDOUT: !161 = !{!141, !142, !143, !144} -// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.54596334ff7c3bae", scope: null, file: !4, line: 15, type: !58, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !183) -// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !6) -// CHECK:STDOUT: !164 = !DILocalVariable(arg: 2, scope: !162, type: !11) -// CHECK:STDOUT: !165 = !DILocalVariable(arg: 3, scope: !162, type: !11) -// CHECK:STDOUT: !166 = !DILocalVariable(arg: 4, scope: !162, type: !6) -// CHECK:STDOUT: !173 = !DILocation(line: 16, column: 7, scope: !162) -// CHECK:STDOUT: !174 = !DILocation(line: 16, column: 6, scope: !162) -// CHECK:STDOUT: !176 = !DILocation(line: 17, column: 5, scope: !162) -// CHECK:STDOUT: !180 = !DILocation(line: 19, column: 21, scope: !162) -// CHECK:STDOUT: !181 = !DILocation(line: 19, column: 10, scope: !162) -// CHECK:STDOUT: !182 = !DILocation(line: 19, column: 3, scope: !162) -// CHECK:STDOUT: !183 = !{!163, !164, !165, !166} -// CHECK:STDOUT: !184 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.17ab41db4fbdd09e", scope: null, file: !4, line: 15, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !205) -// CHECK:STDOUT: !185 = !DILocalVariable(arg: 1, scope: !184, type: !11) -// CHECK:STDOUT: !186 = !DILocalVariable(arg: 2, scope: !184, type: !11) -// CHECK:STDOUT: !187 = !DILocalVariable(arg: 3, scope: !184, type: !11) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 4, scope: !184, type: !6) -// CHECK:STDOUT: !195 = !DILocation(line: 16, column: 7, scope: !184) -// CHECK:STDOUT: !196 = !DILocation(line: 16, column: 6, scope: !184) -// CHECK:STDOUT: !198 = !DILocation(line: 17, column: 5, scope: !184) -// CHECK:STDOUT: !202 = !DILocation(line: 19, column: 21, scope: !184) -// CHECK:STDOUT: !203 = !DILocation(line: 19, column: 10, scope: !184) -// CHECK:STDOUT: !204 = !DILocation(line: 19, column: 3, scope: !184) -// CHECK:STDOUT: !205 = !{!185, !186, !187, !188} -// CHECK:STDOUT: !206 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4870fabf59aefef9", scope: null, file: !4, line: 15, type: !70, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !227) -// CHECK:STDOUT: !207 = !DILocalVariable(arg: 1, scope: !206, type: !8) -// CHECK:STDOUT: !208 = !DILocalVariable(arg: 2, scope: !206, type: !11) -// CHECK:STDOUT: !209 = !DILocalVariable(arg: 3, scope: !206, type: !11) -// CHECK:STDOUT: !210 = !DILocalVariable(arg: 4, scope: !206, type: !6) -// CHECK:STDOUT: !217 = !DILocation(line: 16, column: 7, scope: !206) -// CHECK:STDOUT: !218 = !DILocation(line: 16, column: 6, scope: !206) -// CHECK:STDOUT: !220 = !DILocation(line: 17, column: 5, scope: !206) -// CHECK:STDOUT: !224 = !DILocation(line: 19, column: 21, scope: !206) -// CHECK:STDOUT: !225 = !DILocation(line: 19, column: 10, scope: !206) -// CHECK:STDOUT: !226 = !DILocation(line: 19, column: 3, scope: !206) -// CHECK:STDOUT: !227 = !{!207, !208, !209, !210} -// CHECK:STDOUT: !228 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.e20e13691da7edc2", scope: null, file: !4, line: 15, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !249) -// CHECK:STDOUT: !229 = !DILocalVariable(arg: 1, scope: !228, type: !11) -// CHECK:STDOUT: !230 = !DILocalVariable(arg: 2, scope: !228, type: !11) -// CHECK:STDOUT: !231 = !DILocalVariable(arg: 3, scope: !228, type: !11) -// CHECK:STDOUT: !232 = !DILocalVariable(arg: 4, scope: !228, type: !6) -// CHECK:STDOUT: !239 = !DILocation(line: 16, column: 7, scope: !228) -// CHECK:STDOUT: !240 = !DILocation(line: 16, column: 6, scope: !228) -// CHECK:STDOUT: !242 = !DILocation(line: 17, column: 5, scope: !228) -// CHECK:STDOUT: !246 = !DILocation(line: 19, column: 21, scope: !228) -// CHECK:STDOUT: !247 = !DILocation(line: 19, column: 10, scope: !228) -// CHECK:STDOUT: !248 = !DILocation(line: 19, column: 3, scope: !228) -// CHECK:STDOUT: !249 = !{!229, !230, !231, !232} -// CHECK:STDOUT: !250 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.1a6874a49ac98b64", scope: null, file: !4, line: 15, type: !64, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !271) -// CHECK:STDOUT: !251 = !DILocalVariable(arg: 1, scope: !250, type: !11) -// CHECK:STDOUT: !252 = !DILocalVariable(arg: 2, scope: !250, type: !11) -// CHECK:STDOUT: !253 = !DILocalVariable(arg: 3, scope: !250, type: !11) -// CHECK:STDOUT: !254 = !DILocalVariable(arg: 4, scope: !250, type: !6) -// CHECK:STDOUT: !261 = !DILocation(line: 16, column: 7, scope: !250) -// CHECK:STDOUT: !262 = !DILocation(line: 16, column: 6, scope: !250) -// CHECK:STDOUT: !264 = !DILocation(line: 17, column: 5, scope: !250) -// CHECK:STDOUT: !268 = !DILocation(line: 19, column: 21, scope: !250) -// CHECK:STDOUT: !269 = !DILocation(line: 19, column: 10, scope: !250) -// CHECK:STDOUT: !270 = !DILocation(line: 19, column: 3, scope: !250) -// CHECK:STDOUT: !271 = !{!251, !252, !253, !254} -// CHECK:STDOUT: !470 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9687df6c12a8eb01", scope: null, file: !4, line: 15, type: !70, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !491) -// CHECK:STDOUT: !471 = !DILocalVariable(arg: 1, scope: !470, type: !8) -// CHECK:STDOUT: !472 = !DILocalVariable(arg: 2, scope: !470, type: !11) -// CHECK:STDOUT: !473 = !DILocalVariable(arg: 3, scope: !470, type: !11) -// CHECK:STDOUT: !474 = !DILocalVariable(arg: 4, scope: !470, type: !6) -// CHECK:STDOUT: !481 = !DILocation(line: 16, column: 7, scope: !470) -// CHECK:STDOUT: !482 = !DILocation(line: 16, column: 6, scope: !470) -// CHECK:STDOUT: !484 = !DILocation(line: 17, column: 5, scope: !470) -// CHECK:STDOUT: !488 = !DILocation(line: 19, column: 21, scope: !470) -// CHECK:STDOUT: !489 = !DILocation(line: 19, column: 10, scope: !470) -// CHECK:STDOUT: !490 = !DILocation(line: 19, column: 3, scope: !470) -// CHECK:STDOUT: !491 = !{!471, !472, !473, !474} +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 22, type: !10, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !12 = !DILocation(line: 23, column: 3, scope: !11) +// CHECK:STDOUT: !14 = !DILocation(line: 24, column: 3, scope: !11) +// CHECK:STDOUT: !16 = !DILocation(line: 25, column: 3, scope: !11) +// CHECK:STDOUT: !18 = !DILocation(line: 26, column: 3, scope: !11) +// CHECK:STDOUT: !20 = !DILocation(line: 27, column: 3, scope: !11) +// CHECK:STDOUT: !22 = !DILocation(line: 29, column: 3, scope: !11) +// CHECK:STDOUT: !26 = !DILocation(line: 30, column: 3, scope: !11) +// CHECK:STDOUT: !30 = !DILocation(line: 31, column: 3, scope: !11) +// CHECK:STDOUT: !34 = !DILocation(line: 32, column: 3, scope: !11) +// CHECK:STDOUT: !38 = !DILocation(line: 38, column: 5, scope: !11) +// CHECK:STDOUT: !39 = !DILocation(line: 38, column: 14, scope: !11) +// CHECK:STDOUT: !40 = !DILocation(line: 38, column: 23, scope: !11) +// CHECK:STDOUT: !41 = !DILocation(line: 38, column: 3, scope: !11) +// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !43 = !{!6, !7, !42, !42, !6} +// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) +// CHECK:STDOUT: !45 = !DILocation(line: 39, column: 5, scope: !11) +// CHECK:STDOUT: !46 = !DILocation(line: 39, column: 14, scope: !11) +// CHECK:STDOUT: !47 = !DILocation(line: 39, column: 24, scope: !11) +// CHECK:STDOUT: !48 = !DILocation(line: 39, column: 3, scope: !11) +// CHECK:STDOUT: !49 = !{!6, !6, !42, !42, !6} +// CHECK:STDOUT: !50 = !DISubroutineType(types: !49) +// CHECK:STDOUT: !51 = !DILocation(line: 40, column: 5, scope: !11) +// CHECK:STDOUT: !52 = !DILocation(line: 40, column: 15, scope: !11) +// CHECK:STDOUT: !53 = !DILocation(line: 40, column: 25, scope: !11) +// CHECK:STDOUT: !54 = !DILocation(line: 40, column: 3, scope: !11) +// CHECK:STDOUT: !55 = !{!6, !42, !42, !42, !6} +// CHECK:STDOUT: !56 = !DISubroutineType(types: !55) +// CHECK:STDOUT: !57 = !DILocation(line: 41, column: 5, scope: !11) +// CHECK:STDOUT: !58 = !DILocation(line: 41, column: 14, scope: !11) +// CHECK:STDOUT: !59 = !DILocation(line: 41, column: 24, scope: !11) +// CHECK:STDOUT: !60 = !DILocation(line: 41, column: 3, scope: !11) +// CHECK:STDOUT: !61 = !{!6, !8, !42, !42, !6} +// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) +// CHECK:STDOUT: !63 = !DILocation(line: 42, column: 5, scope: !11) +// CHECK:STDOUT: !64 = !DILocation(line: 42, column: 14, scope: !11) +// CHECK:STDOUT: !65 = !DILocation(line: 42, column: 24, scope: !11) +// CHECK:STDOUT: !66 = !DILocation(line: 42, column: 3, scope: !11) +// CHECK:STDOUT: !67 = !DILocation(line: 46, column: 5, scope: !11) +// CHECK:STDOUT: !68 = !DILocation(line: 46, column: 15, scope: !11) +// CHECK:STDOUT: !69 = !DILocation(line: 46, column: 24, scope: !11) +// CHECK:STDOUT: !70 = !DILocation(line: 46, column: 3, scope: !11) +// CHECK:STDOUT: !71 = !DILocation(line: 47, column: 5, scope: !11) +// CHECK:STDOUT: !72 = !DILocation(line: 47, column: 15, scope: !11) +// CHECK:STDOUT: !73 = !DILocation(line: 47, column: 24, scope: !11) +// CHECK:STDOUT: !74 = !DILocation(line: 47, column: 3, scope: !11) +// CHECK:STDOUT: !75 = !DILocation(line: 48, column: 5, scope: !11) +// CHECK:STDOUT: !76 = !DILocation(line: 48, column: 14, scope: !11) +// CHECK:STDOUT: !77 = !DILocation(line: 48, column: 24, scope: !11) +// CHECK:STDOUT: !78 = !DILocation(line: 48, column: 3, scope: !11) +// CHECK:STDOUT: !79 = !DILocation(line: 49, column: 5, scope: !11) +// CHECK:STDOUT: !80 = !DILocation(line: 49, column: 14, scope: !11) +// CHECK:STDOUT: !81 = !DILocation(line: 49, column: 24, scope: !11) +// CHECK:STDOUT: !82 = !DILocation(line: 49, column: 3, scope: !11) +// CHECK:STDOUT: !83 = !DILocation(line: 50, column: 5, scope: !11) +// CHECK:STDOUT: !84 = !DILocation(line: 50, column: 14, scope: !11) +// CHECK:STDOUT: !85 = !DILocation(line: 50, column: 23, scope: !11) +// CHECK:STDOUT: !86 = !DILocation(line: 50, column: 3, scope: !11) +// CHECK:STDOUT: !87 = !DILocation(line: 51, column: 5, scope: !11) +// CHECK:STDOUT: !88 = !DILocation(line: 51, column: 14, scope: !11) +// CHECK:STDOUT: !89 = !DILocation(line: 51, column: 24, scope: !11) +// CHECK:STDOUT: !90 = !DILocation(line: 51, column: 3, scope: !11) +// CHECK:STDOUT: !91 = !DILocation(line: 52, column: 5, scope: !11) +// CHECK:STDOUT: !92 = !DILocation(line: 52, column: 15, scope: !11) +// CHECK:STDOUT: !93 = !DILocation(line: 52, column: 25, scope: !11) +// CHECK:STDOUT: !94 = !DILocation(line: 52, column: 3, scope: !11) +// CHECK:STDOUT: !95 = !{null, !42} +// CHECK:STDOUT: !96 = !DISubroutineType(types: !95) +// CHECK:STDOUT: !97 = !{null, !8} +// CHECK:STDOUT: !98 = !DISubroutineType(types: !97) +// CHECK:STDOUT: !99 = !{null, !6} +// CHECK:STDOUT: !100 = !DISubroutineType(types: !99) +// CHECK:STDOUT: !101 = !{null, !7} +// CHECK:STDOUT: !102 = !DISubroutineType(types: !101) +// CHECK:STDOUT: !103 = !DILocation(line: 22, column: 1, scope: !11) +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5b94c215f01213ad", scope: null, file: !4, line: 15, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !125) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !7) +// CHECK:STDOUT: !106 = !DILocalVariable(arg: 2, scope: !104, type: !42) +// CHECK:STDOUT: !107 = !DILocalVariable(arg: 3, scope: !104, type: !42) +// CHECK:STDOUT: !108 = !DILocalVariable(arg: 4, scope: !104, type: !6) +// CHECK:STDOUT: !115 = !DILocation(line: 16, column: 7, scope: !104) +// CHECK:STDOUT: !116 = !DILocation(line: 16, column: 6, scope: !104) +// CHECK:STDOUT: !118 = !DILocation(line: 17, column: 5, scope: !104) +// CHECK:STDOUT: !122 = !DILocation(line: 19, column: 21, scope: !104) +// CHECK:STDOUT: !123 = !DILocation(line: 19, column: 10, scope: !104) +// CHECK:STDOUT: !124 = !DILocation(line: 19, column: 3, scope: !104) +// CHECK:STDOUT: !125 = !{!105, !106, !107, !108} +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.54596334ff7c3bae", scope: null, file: !4, line: 15, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !147) +// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !6) +// CHECK:STDOUT: !128 = !DILocalVariable(arg: 2, scope: !126, type: !42) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 3, scope: !126, type: !42) +// CHECK:STDOUT: !130 = !DILocalVariable(arg: 4, scope: !126, type: !6) +// CHECK:STDOUT: !137 = !DILocation(line: 16, column: 7, scope: !126) +// CHECK:STDOUT: !138 = !DILocation(line: 16, column: 6, scope: !126) +// CHECK:STDOUT: !140 = !DILocation(line: 17, column: 5, scope: !126) +// CHECK:STDOUT: !144 = !DILocation(line: 19, column: 21, scope: !126) +// CHECK:STDOUT: !145 = !DILocation(line: 19, column: 10, scope: !126) +// CHECK:STDOUT: !146 = !DILocation(line: 19, column: 3, scope: !126) +// CHECK:STDOUT: !147 = !{!127, !128, !129, !130} +// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.17ab41db4fbdd09e", scope: null, file: !4, line: 15, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !169) +// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !42) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 2, scope: !148, type: !42) +// CHECK:STDOUT: !151 = !DILocalVariable(arg: 3, scope: !148, type: !42) +// CHECK:STDOUT: !152 = !DILocalVariable(arg: 4, scope: !148, type: !6) +// CHECK:STDOUT: !159 = !DILocation(line: 16, column: 7, scope: !148) +// CHECK:STDOUT: !160 = !DILocation(line: 16, column: 6, scope: !148) +// CHECK:STDOUT: !162 = !DILocation(line: 17, column: 5, scope: !148) +// CHECK:STDOUT: !166 = !DILocation(line: 19, column: 21, scope: !148) +// CHECK:STDOUT: !167 = !DILocation(line: 19, column: 10, scope: !148) +// CHECK:STDOUT: !168 = !DILocation(line: 19, column: 3, scope: !148) +// CHECK:STDOUT: !169 = !{!149, !150, !151, !152} +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.4870fabf59aefef9", scope: null, file: !4, line: 15, type: !62, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !191) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !8) +// CHECK:STDOUT: !172 = !DILocalVariable(arg: 2, scope: !170, type: !42) +// CHECK:STDOUT: !173 = !DILocalVariable(arg: 3, scope: !170, type: !42) +// CHECK:STDOUT: !174 = !DILocalVariable(arg: 4, scope: !170, type: !6) +// CHECK:STDOUT: !181 = !DILocation(line: 16, column: 7, scope: !170) +// CHECK:STDOUT: !182 = !DILocation(line: 16, column: 6, scope: !170) +// CHECK:STDOUT: !184 = !DILocation(line: 17, column: 5, scope: !170) +// CHECK:STDOUT: !188 = !DILocation(line: 19, column: 21, scope: !170) +// CHECK:STDOUT: !189 = !DILocation(line: 19, column: 10, scope: !170) +// CHECK:STDOUT: !190 = !DILocation(line: 19, column: 3, scope: !170) +// CHECK:STDOUT: !191 = !{!171, !172, !173, !174} +// CHECK:STDOUT: !192 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.e20e13691da7edc2", scope: null, file: !4, line: 15, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !213) +// CHECK:STDOUT: !193 = !DILocalVariable(arg: 1, scope: !192, type: !42) +// CHECK:STDOUT: !194 = !DILocalVariable(arg: 2, scope: !192, type: !42) +// CHECK:STDOUT: !195 = !DILocalVariable(arg: 3, scope: !192, type: !42) +// CHECK:STDOUT: !196 = !DILocalVariable(arg: 4, scope: !192, type: !6) +// CHECK:STDOUT: !203 = !DILocation(line: 16, column: 7, scope: !192) +// CHECK:STDOUT: !204 = !DILocation(line: 16, column: 6, scope: !192) +// CHECK:STDOUT: !206 = !DILocation(line: 17, column: 5, scope: !192) +// CHECK:STDOUT: !210 = !DILocation(line: 19, column: 21, scope: !192) +// CHECK:STDOUT: !211 = !DILocation(line: 19, column: 10, scope: !192) +// CHECK:STDOUT: !212 = !DILocation(line: 19, column: 3, scope: !192) +// CHECK:STDOUT: !213 = !{!193, !194, !195, !196} +// CHECK:STDOUT: !214 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.1a6874a49ac98b64", scope: null, file: !4, line: 15, type: !56, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !235) +// CHECK:STDOUT: !215 = !DILocalVariable(arg: 1, scope: !214, type: !42) +// CHECK:STDOUT: !216 = !DILocalVariable(arg: 2, scope: !214, type: !42) +// CHECK:STDOUT: !217 = !DILocalVariable(arg: 3, scope: !214, type: !42) +// CHECK:STDOUT: !218 = !DILocalVariable(arg: 4, scope: !214, type: !6) +// CHECK:STDOUT: !225 = !DILocation(line: 16, column: 7, scope: !214) +// CHECK:STDOUT: !226 = !DILocation(line: 16, column: 6, scope: !214) +// CHECK:STDOUT: !228 = !DILocation(line: 17, column: 5, scope: !214) +// CHECK:STDOUT: !232 = !DILocation(line: 19, column: 21, scope: !214) +// CHECK:STDOUT: !233 = !DILocation(line: 19, column: 10, scope: !214) +// CHECK:STDOUT: !234 = !DILocation(line: 19, column: 3, scope: !214) +// CHECK:STDOUT: !235 = !{!215, !216, !217, !218} +// CHECK:STDOUT: !368 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !369 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.393ac80c0c8a44df", scope: null, file: !368, line: 36, type: !96, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !375) +// CHECK:STDOUT: !370 = !DILocalVariable(arg: 1, scope: !369, type: !42) +// CHECK:STDOUT: !374 = !DILocation(line: 36, column: 1, scope: !369) +// CHECK:STDOUT: !375 = !{!370} +// CHECK:STDOUT: !376 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ca462fb0865f0b4d", scope: null, file: !368, line: 36, type: !96, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !382) +// CHECK:STDOUT: !377 = !DILocalVariable(arg: 1, scope: !376, type: !42) +// CHECK:STDOUT: !381 = !DILocation(line: 36, column: 1, scope: !376) +// CHECK:STDOUT: !382 = !{!377} +// CHECK:STDOUT: !383 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !368, line: 36, type: !96, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !389) +// CHECK:STDOUT: !384 = !DILocalVariable(arg: 1, scope: !383, type: !42) +// CHECK:STDOUT: !388 = !DILocation(line: 36, column: 1, scope: !383) +// CHECK:STDOUT: !389 = !{!384} +// CHECK:STDOUT: !390 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.a2001b647b825e99", scope: null, file: !368, line: 36, type: !96, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !396) +// CHECK:STDOUT: !391 = !DILocalVariable(arg: 1, scope: !390, type: !42) +// CHECK:STDOUT: !395 = !DILocation(line: 36, column: 1, scope: !390) +// CHECK:STDOUT: !396 = !{!391} +// CHECK:STDOUT: !397 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.29e6aa423646b61a", scope: null, file: !368, line: 36, type: !96, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !403) +// CHECK:STDOUT: !398 = !DILocalVariable(arg: 1, scope: !397, type: !42) +// CHECK:STDOUT: !402 = !DILocation(line: 36, column: 1, scope: !397) +// CHECK:STDOUT: !403 = !{!398} +// CHECK:STDOUT: !404 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !368, line: 36, type: !96, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !410) +// CHECK:STDOUT: !405 = !DILocalVariable(arg: 1, scope: !404, type: !42) +// CHECK:STDOUT: !409 = !DILocation(line: 36, column: 1, scope: !404) +// CHECK:STDOUT: !410 = !{!405} +// CHECK:STDOUT: !411 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.7e9df21fc3951ad1", scope: null, file: !368, line: 36, type: !98, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !417) +// CHECK:STDOUT: !412 = !DILocalVariable(arg: 1, scope: !411, type: !8) +// CHECK:STDOUT: !416 = !DILocation(line: 36, column: 1, scope: !411) +// CHECK:STDOUT: !417 = !{!412} +// CHECK:STDOUT: !418 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !368, line: 36, type: !100, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !424) +// CHECK:STDOUT: !419 = !DILocalVariable(arg: 1, scope: !418, type: !6) +// CHECK:STDOUT: !423 = !DILocation(line: 36, column: 1, scope: !418) +// CHECK:STDOUT: !424 = !{!419} +// CHECK:STDOUT: !425 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e43967308dd20a9f", scope: null, file: !368, line: 36, type: !102, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !431) +// CHECK:STDOUT: !426 = !DILocalVariable(arg: 1, scope: !425, type: !7) +// CHECK:STDOUT: !430 = !DILocation(line: 36, column: 1, scope: !425) +// CHECK:STDOUT: !431 = !{!426} +// CHECK:STDOUT: !498 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9687df6c12a8eb01", scope: null, file: !4, line: 15, type: !62, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !519) +// CHECK:STDOUT: !499 = !DILocalVariable(arg: 1, scope: !498, type: !8) +// CHECK:STDOUT: !500 = !DILocalVariable(arg: 2, scope: !498, type: !42) +// CHECK:STDOUT: !501 = !DILocalVariable(arg: 3, scope: !498, type: !42) +// CHECK:STDOUT: !502 = !DILocalVariable(arg: 4, scope: !498, type: !6) +// CHECK:STDOUT: !509 = !DILocation(line: 16, column: 7, scope: !498) +// CHECK:STDOUT: !510 = !DILocation(line: 16, column: 6, scope: !498) +// CHECK:STDOUT: !512 = !DILocation(line: 17, column: 5, scope: !498) +// CHECK:STDOUT: !516 = !DILocation(line: 19, column: 21, scope: !498) +// CHECK:STDOUT: !517 = !DILocation(line: 19, column: 10, scope: !498) +// CHECK:STDOUT: !518 = !DILocation(line: 19, column: 3, scope: !498) +// CHECK:STDOUT: !519 = !{!499, !500, !501, !502} // 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 6a0dc5769962..60119ec29e7f 100644 --- a/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon +++ b/toolchain/lower/testdata/function/generic/call_recursive_sccs_deep.carbon @@ -90,290 +90,286 @@ fn M() { // CHECK:STDOUT: @printf.int.format = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !14 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !9 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !15 -// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !17 -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !19 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !23 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !15 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !15 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !17 -// CHECK:STDOUT: store double 1.000000e+00, ptr %m.var, align 8, !dbg !17 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !19 -// CHECK:STDOUT: store ptr %n.var, ptr %ptr_i32.var, align 8, !dbg !19 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !23 -// CHECK:STDOUT: store ptr %m.var, ptr %ptr_f64.var, align 8, !dbg !23 -// CHECK:STDOUT: %.loc80_5 = load i32, ptr %n.var, align 4, !dbg !27 -// CHECK:STDOUT: %A.call.loc80 = call i32 @_CA.Main.2fad9574e050607e(i32 %.loc80_5, i32 0), !dbg !28 -// CHECK:STDOUT: %.loc81_5 = load double, ptr %m.var, align 8, !dbg !31 -// CHECK:STDOUT: %A.call.loc81 = call double @_CA.Main.21aefb7dfdebb8e4(double %.loc81_5, i32 0), !dbg !32 -// CHECK:STDOUT: %.loc82_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !35 -// CHECK:STDOUT: %A.call.loc82 = call ptr @_CA.Main.417c9c4a651ab31b(ptr %.loc82_5, i32 0), !dbg !36 -// CHECK:STDOUT: %.loc83_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !37 -// CHECK:STDOUT: %A.call.loc83 = call ptr @_CA.Main.417c9c4a651ab31b(ptr %.loc83_5, i32 0), !dbg !38 -// CHECK:STDOUT: call void @"_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !23 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !19 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %m.var), !dbg !17 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !15 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !10 +// CHECK:STDOUT: %m.var = alloca double, align 8, !dbg !12 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !14 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !18 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !10 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !10 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %m.var), !dbg !12 +// CHECK:STDOUT: store double 1.000000e+00, ptr %m.var, align 8, !dbg !12 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !14 +// CHECK:STDOUT: store ptr %n.var, ptr %ptr_i32.var, align 8, !dbg !14 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !18 +// CHECK:STDOUT: store ptr %m.var, ptr %ptr_f64.var, align 8, !dbg !18 +// CHECK:STDOUT: %.loc80_5 = load i32, ptr %n.var, align 4, !dbg !22 +// CHECK:STDOUT: %A.call.loc80 = call i32 @_CA.Main.2fad9574e050607e(i32 %.loc80_5, i32 0), !dbg !23 +// CHECK:STDOUT: %.loc81_5 = load double, ptr %m.var, align 8, !dbg !26 +// CHECK:STDOUT: %A.call.loc81 = call double @_CA.Main.21aefb7dfdebb8e4(double %.loc81_5, i32 0), !dbg !27 +// CHECK:STDOUT: %.loc82_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !31 +// CHECK:STDOUT: %A.call.loc82 = call ptr @_CA.Main.417c9c4a651ab31b(ptr %.loc82_5, i32 0), !dbg !32 +// CHECK:STDOUT: %.loc83_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !33 +// CHECK:STDOUT: %A.call.loc83 = call ptr @_CA.Main.417c9c4a651ab31b(ptr %.loc83_5, i32 0), !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b18855c76072615b(ptr %ptr_f64.var), !dbg !18 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %ptr_i32.var), !dbg !14 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %m.var), !dbg !12 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !10 // CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6fa1811d66e6eb5d: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.a17e1ddde5b22223: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.7619ac942aa9029a: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.72395be3dbbe8946: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: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CA.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !56 { +// CHECK:STDOUT: define linkonce_odr i32 @_CA.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CB.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !65 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !70 -// CHECK:STDOUT: ret i32 %D.call, !dbg !71 +// CHECK:STDOUT: call void @_CB.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !49 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !54 +// CHECK:STDOUT: ret i32 %D.call, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CA.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !73 { +// CHECK:STDOUT: define linkonce_odr double @_CA.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CB.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !82 -// CHECK:STDOUT: %D.call = call double @_CD.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !87 -// CHECK:STDOUT: ret double %D.call, !dbg !88 +// CHECK:STDOUT: call void @_CB.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !66 +// CHECK:STDOUT: %D.call = call double @_CD.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !71 +// CHECK:STDOUT: ret double %D.call, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CA.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !90 { +// CHECK:STDOUT: define linkonce_odr ptr @_CA.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !74 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CB.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !99 -// CHECK:STDOUT: %D.call = call ptr @_CD.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !102 -// CHECK:STDOUT: ret ptr %D.call, !dbg !103 +// CHECK:STDOUT: call void @_CB.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !83 +// CHECK:STDOUT: %D.call = call ptr @_CD.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !86 +// CHECK:STDOUT: ret ptr %D.call, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !120 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CC.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !127 -// CHECK:STDOUT: ret void, !dbg !128 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b18855c76072615b(ptr %t) #0 !dbg !105 { +// CHECK:STDOUT: ret void, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !130 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !112 { +// CHECK:STDOUT: ret void, !dbg !117 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !119 { +// CHECK:STDOUT: ret void, !dbg !124 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !126 { +// CHECK:STDOUT: ret void, !dbg !131 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !133 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !137 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !138 +// CHECK:STDOUT: call void @_CC.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !140 +// CHECK:STDOUT: ret void, !dbg !141 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i32 @_CD.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !143 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !150 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !151 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc49: ; preds = %entry -// CHECK:STDOUT: ret i32 %x, !dbg !140 +// CHECK:STDOUT: ret i32 %x, !dbg !153 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc49: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !141 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !141 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !142 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !154 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !154 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !155 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %E.call = call i32 @_CE.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !145 -// CHECK:STDOUT: ret i32 %E.call, !dbg !146 +// CHECK:STDOUT: %E.call = call i32 @_CE.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !158 +// CHECK:STDOUT: ret i32 %E.call, !dbg !159 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !149 -// CHECK:STDOUT: ret i32 %F.call, !dbg !150 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !162 +// CHECK:STDOUT: ret i32 %F.call, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !152 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !165 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CC.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !159 -// CHECK:STDOUT: ret void, !dbg !160 +// CHECK:STDOUT: call void @_CC.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !172 +// CHECK:STDOUT: ret void, !dbg !173 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CD.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !162 { +// CHECK:STDOUT: define linkonce_odr double @_CD.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !175 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !169 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !170 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !182 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !183 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc49: ; preds = %entry -// CHECK:STDOUT: ret double %x, !dbg !172 +// CHECK:STDOUT: ret double %x, !dbg !185 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc49: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !173 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !173 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !174 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !186 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !186 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !187 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %E.call = call double @_CE.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !177 -// CHECK:STDOUT: ret double %E.call, !dbg !178 +// CHECK:STDOUT: %E.call = call double @_CE.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !190 +// CHECK:STDOUT: ret double %E.call, !dbg !191 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %F.call = call double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !181 -// CHECK:STDOUT: ret double %F.call, !dbg !182 +// CHECK:STDOUT: %F.call = call double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !194 +// CHECK:STDOUT: ret double %F.call, !dbg !195 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CB.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !184 { +// CHECK:STDOUT: define linkonce_odr void @_CB.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !197 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CC.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !191 -// CHECK:STDOUT: ret void, !dbg !192 +// CHECK:STDOUT: call void @_CC.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !204 +// CHECK:STDOUT: ret void, !dbg !205 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CD.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !194 { +// CHECK:STDOUT: define linkonce_odr ptr @_CD.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !207 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !201 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !202 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.Greater.call = icmp sgt i32 %count, 4, !dbg !214 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.Greater.call, label %if.then.loc49, label %if.else.loc49, !dbg !215 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc49: ; preds = %entry -// CHECK:STDOUT: ret ptr %x, !dbg !204 +// CHECK:STDOUT: ret ptr %x, !dbg !217 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc49: ; preds = %entry -// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !205 -// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !205 -// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !206 +// CHECK:STDOUT: %Int.as.ModWith.impl.Op.call = srem i32 %count, 2, !dbg !218 +// CHECK:STDOUT: %Int.as.EqWith.impl.Equal.call = icmp eq i32 %Int.as.ModWith.impl.Op.call, 0, !dbg !218 +// CHECK:STDOUT: br i1 %Int.as.EqWith.impl.Equal.call, label %if.then.loc52, label %if.else.loc52, !dbg !219 // CHECK:STDOUT: // CHECK:STDOUT: if.then.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %E.call = call ptr @_CE.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !209 -// CHECK:STDOUT: ret ptr %E.call, !dbg !210 +// CHECK:STDOUT: %E.call = call ptr @_CE.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !222 +// CHECK:STDOUT: ret ptr %E.call, !dbg !223 // CHECK:STDOUT: // CHECK:STDOUT: if.else.loc52: ; preds = %if.else.loc49 -// CHECK:STDOUT: %F.call = call ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !213 -// CHECK:STDOUT: ret ptr %F.call, !dbg !214 +// CHECK:STDOUT: %F.call = call ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !226 +// CHECK:STDOUT: ret ptr %F.call, !dbg !227 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CC.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !248 { +// CHECK:STDOUT: define linkonce_odr void @_CC.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !261 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !253 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !254 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !266 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !267 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !256 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !258 -// CHECK:STDOUT: call void @_CB.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !259 -// CHECK:STDOUT: br label %if.else, !dbg !260 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !269 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !271 +// CHECK:STDOUT: call void @_CB.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !272 +// CHECK:STDOUT: br label %if.else, !dbg !273 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %if.then, %entry -// CHECK:STDOUT: ret void, !dbg !261 +// CHECK:STDOUT: ret void, !dbg !274 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CE.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !263 { +// CHECK:STDOUT: define linkonce_odr i32 @_CE.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !276 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !272 -// CHECK:STDOUT: ret i32 %G.call, !dbg !273 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !285 +// CHECK:STDOUT: ret i32 %G.call, !dbg !286 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !275 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !288 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !284 -// CHECK:STDOUT: ret i32 %G.call, !dbg !285 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.2fad9574e050607e(i32 %x, i32 %count), !dbg !297 +// CHECK:STDOUT: ret i32 %G.call, !dbg !298 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CC.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !287 { +// CHECK:STDOUT: define linkonce_odr void @_CC.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !300 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !292 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !293 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !305 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !306 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !295 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !297 -// CHECK:STDOUT: call void @_CB.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !298 -// CHECK:STDOUT: br label %if.else, !dbg !299 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !308 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !310 +// CHECK:STDOUT: call void @_CB.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !311 +// CHECK:STDOUT: br label %if.else, !dbg !312 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %if.then, %entry -// CHECK:STDOUT: ret void, !dbg !300 +// CHECK:STDOUT: ret void, !dbg !313 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CE.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !302 { +// CHECK:STDOUT: define linkonce_odr double @_CE.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !315 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call double @_CG.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !311 -// CHECK:STDOUT: ret double %G.call, !dbg !312 +// CHECK:STDOUT: %G.call = call double @_CG.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !324 +// CHECK:STDOUT: ret double %G.call, !dbg !325 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !314 { +// CHECK:STDOUT: define linkonce_odr double @_CF.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !327 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call double @_CG.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !323 -// CHECK:STDOUT: ret double %G.call, !dbg !324 +// CHECK:STDOUT: %G.call = call double @_CG.Main.21aefb7dfdebb8e4(double %x, i32 %count), !dbg !336 +// CHECK:STDOUT: ret double %G.call, !dbg !337 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CC.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !326 { +// CHECK:STDOUT: define linkonce_odr void @_CC.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !339 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !331 -// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !332 +// CHECK:STDOUT: %Int.as.OrderedWith.impl.LessOrEquivalent.call = icmp sle i32 %count, 2, !dbg !344 +// CHECK:STDOUT: br i1 %Int.as.OrderedWith.impl.LessOrEquivalent.call, label %if.then, label %if.else, !dbg !345 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !334 -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !336 -// CHECK:STDOUT: call void @_CB.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !337 -// CHECK:STDOUT: br label %if.else, !dbg !338 +// CHECK:STDOUT: %Print.call = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 %count), !dbg !347 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !349 +// CHECK:STDOUT: call void @_CB.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !350 +// CHECK:STDOUT: br label %if.else, !dbg !351 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %if.then, %entry -// CHECK:STDOUT: ret void, !dbg !339 +// CHECK:STDOUT: ret void, !dbg !352 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CE.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !341 { +// CHECK:STDOUT: define linkonce_odr ptr @_CE.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !354 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call ptr @_CG.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !350 -// CHECK:STDOUT: ret ptr %G.call, !dbg !351 +// CHECK:STDOUT: %G.call = call ptr @_CG.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !363 +// CHECK:STDOUT: ret ptr %G.call, !dbg !364 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !353 { +// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !366 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call ptr @_CG.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !362 -// CHECK:STDOUT: ret ptr %G.call, !dbg !363 +// CHECK:STDOUT: %G.call = call ptr @_CG.Main.417c9c4a651ab31b(ptr %x, i32 %count), !dbg !375 +// CHECK:STDOUT: ret ptr %G.call, !dbg !376 // 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.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !404 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.2fad9574e050607e(i32 %x, i32 %count) #0 !dbg !417 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !412 -// CHECK:STDOUT: %D.call = call i32 @_CD.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !413 -// CHECK:STDOUT: ret i32 %D.call, !dbg !414 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !425 +// CHECK:STDOUT: %D.call = call i32 @_CD.Main.2fad9574e050607e(i32 %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !426 +// CHECK:STDOUT: ret i32 %D.call, !dbg !427 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CG.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !416 { +// CHECK:STDOUT: define linkonce_odr double @_CG.Main.21aefb7dfdebb8e4(double %x, i32 %count) #0 !dbg !429 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !424 -// CHECK:STDOUT: %D.call = call double @_CD.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !425 -// CHECK:STDOUT: ret double %D.call, !dbg !426 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !437 +// CHECK:STDOUT: %D.call = call double @_CD.Main.21aefb7dfdebb8e4(double %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !438 +// CHECK:STDOUT: ret double %D.call, !dbg !439 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !428 { +// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.417c9c4a651ab31b(ptr %x, i32 %count) #0 !dbg !441 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !436 -// CHECK:STDOUT: %D.call = call ptr @_CD.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !437 -// CHECK:STDOUT: ret ptr %D.call, !dbg !438 +// CHECK:STDOUT: %Int.as.AddWith.impl.Op.call = add i32 %count, 1, !dbg !449 +// CHECK:STDOUT: %D.call = call ptr @_CD.Main.417c9c4a651ab31b(ptr %x, i32 %Int.as.AddWith.impl.Op.call), !dbg !450 +// CHECK:STDOUT: ret ptr %D.call, !dbg !451 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -397,215 +393,216 @@ fn M() { // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !{null} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !10 = !{null, !9} -// CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{null, !6} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 74, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !15 = !DILocation(line: 75, column: 3, scope: !14) -// CHECK:STDOUT: !17 = !DILocation(line: 76, column: 3, scope: !14) -// CHECK:STDOUT: !19 = !DILocation(line: 77, column: 3, scope: !14) -// CHECK:STDOUT: !23 = !DILocation(line: 78, column: 3, scope: !14) -// CHECK:STDOUT: !27 = !DILocation(line: 80, column: 5, scope: !14) -// CHECK:STDOUT: !28 = !DILocation(line: 80, column: 3, scope: !14) -// CHECK:STDOUT: !29 = !{!6, !6, !6} +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !4, line: 74, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !10 = !DILocation(line: 75, column: 3, scope: !9) +// CHECK:STDOUT: !12 = !DILocation(line: 76, column: 3, scope: !9) +// CHECK:STDOUT: !14 = !DILocation(line: 77, column: 3, scope: !9) +// CHECK:STDOUT: !18 = !DILocation(line: 78, column: 3, scope: !9) +// CHECK:STDOUT: !22 = !DILocation(line: 80, column: 5, scope: !9) +// CHECK:STDOUT: !23 = !DILocation(line: 80, column: 3, scope: !9) +// CHECK:STDOUT: !24 = !{!6, !6, !6} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = !DILocation(line: 81, column: 5, scope: !9) +// CHECK:STDOUT: !27 = !DILocation(line: 81, column: 3, scope: !9) +// CHECK:STDOUT: !28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !29 = !{!28, !28, !6} // CHECK:STDOUT: !30 = !DISubroutineType(types: !29) -// CHECK:STDOUT: !31 = !DILocation(line: 81, column: 5, scope: !14) -// CHECK:STDOUT: !32 = !DILocation(line: 81, column: 3, scope: !14) -// CHECK:STDOUT: !33 = !{!9, !9, !6} -// CHECK:STDOUT: !34 = !DISubroutineType(types: !33) -// CHECK:STDOUT: !35 = !DILocation(line: 82, column: 5, scope: !14) -// CHECK:STDOUT: !36 = !DILocation(line: 82, column: 3, scope: !14) -// CHECK:STDOUT: !37 = !DILocation(line: 83, column: 5, scope: !14) -// CHECK:STDOUT: !38 = !DILocation(line: 83, column: 3, scope: !14) -// CHECK:STDOUT: !39 = !DILocation(line: 74, column: 1, scope: !14) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core", scope: null, file: !4, line: 78, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !43) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !9) -// CHECK:STDOUT: !42 = !DILocation(line: 78, column: 3, scope: !40) -// CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !4, line: 77, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !9) -// CHECK:STDOUT: !46 = !DILocation(line: 77, column: 3, scope: !44) -// CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !4, line: 76, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 75, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !6) -// CHECK:STDOUT: !54 = !DILocation(line: 75, column: 3, scope: !52) -// CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.2fad9574e050607e", scope: null, file: !4, line: 32, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !72) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !6) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 2, scope: !56, type: !6) -// CHECK:STDOUT: !65 = !DILocation(line: 33, column: 3, scope: !56) -// CHECK:STDOUT: !66 = !{null, !6, !6} -// CHECK:STDOUT: !67 = !DISubroutineType(types: !66) -// CHECK:STDOUT: !70 = !DILocation(line: 34, column: 10, scope: !56) -// CHECK:STDOUT: !71 = !DILocation(line: 34, column: 3, scope: !56) -// CHECK:STDOUT: !72 = !{!57, !58} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 32, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !89) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !9) -// CHECK:STDOUT: !75 = !DILocalVariable(arg: 2, scope: !73, type: !6) -// CHECK:STDOUT: !82 = !DILocation(line: 33, column: 3, scope: !73) -// CHECK:STDOUT: !83 = !{null, !9, !6} -// CHECK:STDOUT: !84 = !DISubroutineType(types: !83) -// CHECK:STDOUT: !87 = !DILocation(line: 34, column: 10, scope: !73) -// CHECK:STDOUT: !88 = !DILocation(line: 34, column: 3, scope: !73) -// CHECK:STDOUT: !89 = !{!74, !75} -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.417c9c4a651ab31b", scope: null, file: !4, line: 32, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !104) -// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !9) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 2, scope: !90, type: !6) -// CHECK:STDOUT: !99 = !DILocation(line: 33, column: 3, scope: !90) -// CHECK:STDOUT: !102 = !DILocation(line: 34, column: 10, scope: !90) -// CHECK:STDOUT: !103 = !DILocation(line: 34, column: 3, scope: !90) -// CHECK:STDOUT: !104 = !{!91, !92} -// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.2fad9574e050607e", scope: null, file: !4, line: 37, type: !67, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !129) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !6) -// CHECK:STDOUT: !122 = !DILocalVariable(arg: 2, scope: !120, type: !6) -// CHECK:STDOUT: !127 = !DILocation(line: 38, column: 3, scope: !120) -// CHECK:STDOUT: !128 = !DILocation(line: 37, column: 1, scope: !120) -// CHECK:STDOUT: !129 = !{!121, !122} -// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2fad9574e050607e", scope: null, file: !4, line: 48, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !151) -// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !6) -// CHECK:STDOUT: !132 = !DILocalVariable(arg: 2, scope: !130, type: !6) -// CHECK:STDOUT: !137 = !DILocation(line: 49, column: 7, scope: !130) -// CHECK:STDOUT: !138 = !DILocation(line: 49, column: 6, scope: !130) -// CHECK:STDOUT: !140 = !DILocation(line: 50, column: 5, scope: !130) -// CHECK:STDOUT: !141 = !DILocation(line: 52, column: 7, scope: !130) -// CHECK:STDOUT: !142 = !DILocation(line: 52, column: 6, scope: !130) -// CHECK:STDOUT: !145 = !DILocation(line: 53, column: 12, scope: !130) -// CHECK:STDOUT: !146 = !DILocation(line: 53, column: 5, scope: !130) -// CHECK:STDOUT: !149 = !DILocation(line: 55, column: 12, scope: !130) -// CHECK:STDOUT: !150 = !DILocation(line: 55, column: 5, scope: !130) -// CHECK:STDOUT: !151 = !{!131, !132} -// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 37, type: !84, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !161) -// 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: 38, column: 3, scope: !152) -// CHECK:STDOUT: !160 = !DILocation(line: 37, column: 1, scope: !152) -// CHECK:STDOUT: !161 = !{!153, !154} -// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 48, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !183) -// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !9) -// CHECK:STDOUT: !164 = !DILocalVariable(arg: 2, scope: !162, type: !6) -// CHECK:STDOUT: !169 = !DILocation(line: 49, column: 7, scope: !162) -// CHECK:STDOUT: !170 = !DILocation(line: 49, column: 6, scope: !162) -// CHECK:STDOUT: !172 = !DILocation(line: 50, column: 5, scope: !162) -// CHECK:STDOUT: !173 = !DILocation(line: 52, column: 7, scope: !162) -// CHECK:STDOUT: !174 = !DILocation(line: 52, column: 6, scope: !162) -// CHECK:STDOUT: !177 = !DILocation(line: 53, column: 12, scope: !162) -// CHECK:STDOUT: !178 = !DILocation(line: 53, column: 5, scope: !162) -// CHECK:STDOUT: !181 = !DILocation(line: 55, column: 12, scope: !162) -// CHECK:STDOUT: !182 = !DILocation(line: 55, column: 5, scope: !162) -// CHECK:STDOUT: !183 = !{!163, !164} -// CHECK:STDOUT: !184 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.417c9c4a651ab31b", scope: null, file: !4, line: 37, type: !84, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !193) -// CHECK:STDOUT: !185 = !DILocalVariable(arg: 1, scope: !184, type: !9) -// CHECK:STDOUT: !186 = !DILocalVariable(arg: 2, scope: !184, type: !6) -// CHECK:STDOUT: !191 = !DILocation(line: 38, column: 3, scope: !184) -// CHECK:STDOUT: !192 = !DILocation(line: 37, column: 1, scope: !184) -// CHECK:STDOUT: !193 = !{!185, !186} -// CHECK:STDOUT: !194 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.417c9c4a651ab31b", scope: null, file: !4, line: 48, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !215) -// CHECK:STDOUT: !195 = !DILocalVariable(arg: 1, scope: !194, type: !9) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 2, scope: !194, type: !6) -// CHECK:STDOUT: !201 = !DILocation(line: 49, column: 7, scope: !194) -// CHECK:STDOUT: !202 = !DILocation(line: 49, column: 6, scope: !194) -// CHECK:STDOUT: !204 = !DILocation(line: 50, column: 5, scope: !194) -// CHECK:STDOUT: !205 = !DILocation(line: 52, column: 7, scope: !194) -// CHECK:STDOUT: !206 = !DILocation(line: 52, column: 6, scope: !194) -// CHECK:STDOUT: !209 = !DILocation(line: 53, column: 12, scope: !194) -// CHECK:STDOUT: !210 = !DILocation(line: 53, column: 5, scope: !194) -// CHECK:STDOUT: !213 = !DILocation(line: 55, column: 12, scope: !194) -// CHECK:STDOUT: !214 = !DILocation(line: 55, column: 5, scope: !194) -// CHECK:STDOUT: !215 = !{!195, !196} -// CHECK:STDOUT: !248 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.2fad9574e050607e", scope: null, file: !4, line: 41, type: !67, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !262) -// CHECK:STDOUT: !249 = !DILocalVariable(arg: 1, scope: !248, type: !6) -// CHECK:STDOUT: !250 = !DILocalVariable(arg: 2, scope: !248, type: !6) -// CHECK:STDOUT: !253 = !DILocation(line: 42, column: 7, scope: !248) -// CHECK:STDOUT: !254 = !DILocation(line: 42, column: 6, scope: !248) -// CHECK:STDOUT: !256 = !DILocation(line: 43, column: 5, scope: !248) -// CHECK:STDOUT: !258 = !DILocation(line: 44, column: 10, scope: !248) -// CHECK:STDOUT: !259 = !DILocation(line: 44, column: 5, scope: !248) -// CHECK:STDOUT: !260 = !DILocation(line: 42, column: 3, scope: !248) -// CHECK:STDOUT: !261 = !DILocation(line: 41, column: 1, scope: !248) -// CHECK:STDOUT: !262 = !{!249, !250} -// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.2fad9574e050607e", scope: null, file: !4, line: 61, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !274) -// CHECK:STDOUT: !264 = !DILocalVariable(arg: 1, scope: !263, type: !6) -// CHECK:STDOUT: !265 = !DILocalVariable(arg: 2, scope: !263, type: !6) -// CHECK:STDOUT: !272 = !DILocation(line: 62, column: 10, scope: !263) -// CHECK:STDOUT: !273 = !DILocation(line: 62, column: 3, scope: !263) -// CHECK:STDOUT: !274 = !{!264, !265} -// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2fad9574e050607e", scope: null, file: !4, line: 65, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !286) -// CHECK:STDOUT: !276 = !DILocalVariable(arg: 1, scope: !275, type: !6) -// CHECK:STDOUT: !277 = !DILocalVariable(arg: 2, scope: !275, type: !6) -// CHECK:STDOUT: !284 = !DILocation(line: 66, column: 10, scope: !275) -// CHECK:STDOUT: !285 = !DILocation(line: 66, column: 3, scope: !275) -// CHECK:STDOUT: !286 = !{!276, !277} -// CHECK:STDOUT: !287 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 41, type: !84, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !301) -// CHECK:STDOUT: !288 = !DILocalVariable(arg: 1, scope: !287, type: !9) -// CHECK:STDOUT: !289 = !DILocalVariable(arg: 2, scope: !287, type: !6) -// CHECK:STDOUT: !292 = !DILocation(line: 42, column: 7, scope: !287) -// CHECK:STDOUT: !293 = !DILocation(line: 42, column: 6, scope: !287) -// CHECK:STDOUT: !295 = !DILocation(line: 43, column: 5, scope: !287) -// CHECK:STDOUT: !297 = !DILocation(line: 44, column: 10, scope: !287) -// CHECK:STDOUT: !298 = !DILocation(line: 44, column: 5, scope: !287) -// CHECK:STDOUT: !299 = !DILocation(line: 42, column: 3, scope: !287) -// CHECK:STDOUT: !300 = !DILocation(line: 41, column: 1, scope: !287) -// CHECK:STDOUT: !301 = !{!288, !289} -// CHECK:STDOUT: !302 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 61, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !313) -// CHECK:STDOUT: !303 = !DILocalVariable(arg: 1, scope: !302, type: !9) -// CHECK:STDOUT: !304 = !DILocalVariable(arg: 2, scope: !302, type: !6) -// CHECK:STDOUT: !311 = !DILocation(line: 62, column: 10, scope: !302) -// CHECK:STDOUT: !312 = !DILocation(line: 62, column: 3, scope: !302) -// CHECK:STDOUT: !313 = !{!303, !304} -// CHECK:STDOUT: !314 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 65, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !325) -// CHECK:STDOUT: !315 = !DILocalVariable(arg: 1, scope: !314, type: !9) -// CHECK:STDOUT: !316 = !DILocalVariable(arg: 2, scope: !314, type: !6) -// CHECK:STDOUT: !323 = !DILocation(line: 66, column: 10, scope: !314) -// CHECK:STDOUT: !324 = !DILocation(line: 66, column: 3, scope: !314) -// CHECK:STDOUT: !325 = !{!315, !316} -// CHECK:STDOUT: !326 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.417c9c4a651ab31b", scope: null, file: !4, line: 41, type: !84, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !340) -// CHECK:STDOUT: !327 = !DILocalVariable(arg: 1, scope: !326, type: !9) -// CHECK:STDOUT: !328 = !DILocalVariable(arg: 2, scope: !326, type: !6) -// CHECK:STDOUT: !331 = !DILocation(line: 42, column: 7, scope: !326) -// CHECK:STDOUT: !332 = !DILocation(line: 42, column: 6, scope: !326) -// CHECK:STDOUT: !334 = !DILocation(line: 43, column: 5, scope: !326) -// CHECK:STDOUT: !336 = !DILocation(line: 44, column: 10, scope: !326) -// CHECK:STDOUT: !337 = !DILocation(line: 44, column: 5, scope: !326) -// CHECK:STDOUT: !338 = !DILocation(line: 42, column: 3, scope: !326) -// CHECK:STDOUT: !339 = !DILocation(line: 41, column: 1, scope: !326) -// CHECK:STDOUT: !340 = !{!327, !328} -// CHECK:STDOUT: !341 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.417c9c4a651ab31b", scope: null, file: !4, line: 61, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !352) -// CHECK:STDOUT: !342 = !DILocalVariable(arg: 1, scope: !341, type: !9) -// CHECK:STDOUT: !343 = !DILocalVariable(arg: 2, scope: !341, type: !6) -// CHECK:STDOUT: !350 = !DILocation(line: 62, column: 10, scope: !341) -// CHECK:STDOUT: !351 = !DILocation(line: 62, column: 3, scope: !341) -// CHECK:STDOUT: !352 = !{!342, !343} -// CHECK:STDOUT: !353 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.417c9c4a651ab31b", scope: null, file: !4, line: 65, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !364) -// CHECK:STDOUT: !354 = !DILocalVariable(arg: 1, scope: !353, type: !9) -// CHECK:STDOUT: !355 = !DILocalVariable(arg: 2, scope: !353, type: !6) -// CHECK:STDOUT: !362 = !DILocation(line: 66, column: 10, scope: !353) -// CHECK:STDOUT: !363 = !DILocation(line: 66, column: 3, scope: !353) -// CHECK:STDOUT: !364 = !{!354, !355} -// CHECK:STDOUT: !404 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2fad9574e050607e", scope: null, file: !4, line: 69, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !415) -// CHECK:STDOUT: !405 = !DILocalVariable(arg: 1, scope: !404, type: !6) -// CHECK:STDOUT: !406 = !DILocalVariable(arg: 2, scope: !404, type: !6) -// CHECK:STDOUT: !412 = !DILocation(line: 70, column: 15, scope: !404) -// CHECK:STDOUT: !413 = !DILocation(line: 70, column: 10, scope: !404) -// CHECK:STDOUT: !414 = !DILocation(line: 70, column: 3, scope: !404) -// CHECK:STDOUT: !415 = !{!405, !406} -// CHECK:STDOUT: !416 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 69, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !427) -// CHECK:STDOUT: !417 = !DILocalVariable(arg: 1, scope: !416, type: !9) -// CHECK:STDOUT: !418 = !DILocalVariable(arg: 2, scope: !416, type: !6) -// CHECK:STDOUT: !424 = !DILocation(line: 70, column: 15, scope: !416) -// CHECK:STDOUT: !425 = !DILocation(line: 70, column: 10, scope: !416) -// CHECK:STDOUT: !426 = !DILocation(line: 70, column: 3, scope: !416) -// CHECK:STDOUT: !427 = !{!417, !418} -// CHECK:STDOUT: !428 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.417c9c4a651ab31b", scope: null, file: !4, line: 69, type: !34, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !439) -// CHECK:STDOUT: !429 = !DILocalVariable(arg: 1, scope: !428, type: !9) -// CHECK:STDOUT: !430 = !DILocalVariable(arg: 2, scope: !428, type: !6) -// CHECK:STDOUT: !436 = !DILocation(line: 70, column: 15, scope: !428) -// CHECK:STDOUT: !437 = !DILocation(line: 70, column: 10, scope: !428) -// CHECK:STDOUT: !438 = !DILocation(line: 70, column: 3, scope: !428) -// CHECK:STDOUT: !439 = !{!429, !430} +// CHECK:STDOUT: !31 = !DILocation(line: 82, column: 5, scope: !9) +// CHECK:STDOUT: !32 = !DILocation(line: 82, column: 3, scope: !9) +// CHECK:STDOUT: !33 = !DILocation(line: 83, column: 5, scope: !9) +// CHECK:STDOUT: !34 = !DILocation(line: 83, column: 3, scope: !9) +// CHECK:STDOUT: !35 = !{null, !28} +// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) +// CHECK:STDOUT: !37 = !{null, !6} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DILocation(line: 74, column: 1, scope: !9) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.2fad9574e050607e", scope: null, file: !4, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !56) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !6) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 2, scope: !40, type: !6) +// CHECK:STDOUT: !49 = !DILocation(line: 33, column: 3, scope: !40) +// CHECK:STDOUT: !50 = !{null, !6, !6} +// CHECK:STDOUT: !51 = !DISubroutineType(types: !50) +// CHECK:STDOUT: !54 = !DILocation(line: 34, column: 10, scope: !40) +// CHECK:STDOUT: !55 = !DILocation(line: 34, column: 3, scope: !40) +// CHECK:STDOUT: !56 = !{!41, !42} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 32, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !73) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !28) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 2, scope: !57, type: !6) +// CHECK:STDOUT: !66 = !DILocation(line: 33, column: 3, scope: !57) +// CHECK:STDOUT: !67 = !{null, !28, !6} +// CHECK:STDOUT: !68 = !DISubroutineType(types: !67) +// CHECK:STDOUT: !71 = !DILocation(line: 34, column: 10, scope: !57) +// CHECK:STDOUT: !72 = !DILocation(line: 34, column: 3, scope: !57) +// CHECK:STDOUT: !73 = !{!58, !59} +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.417c9c4a651ab31b", scope: null, file: !4, line: 32, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !88) +// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !28) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 2, scope: !74, type: !6) +// CHECK:STDOUT: !83 = !DILocation(line: 33, column: 3, scope: !74) +// CHECK:STDOUT: !86 = !DILocation(line: 34, column: 10, scope: !74) +// CHECK:STDOUT: !87 = !DILocation(line: 34, column: 3, scope: !74) +// CHECK:STDOUT: !88 = !{!75, !76} +// CHECK:STDOUT: !104 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b18855c76072615b", scope: null, file: !104, line: 36, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !111) +// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !28) +// CHECK:STDOUT: !110 = !DILocation(line: 36, column: 1, scope: !105) +// CHECK:STDOUT: !111 = !{!106} +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !104, line: 36, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !118) +// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !28) +// CHECK:STDOUT: !117 = !DILocation(line: 36, column: 1, scope: !112) +// CHECK:STDOUT: !118 = !{!113} +// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !104, line: 36, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !125) +// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !28) +// CHECK:STDOUT: !124 = !DILocation(line: 36, column: 1, scope: !119) +// CHECK:STDOUT: !125 = !{!120} +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !104, line: 36, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !132) +// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !6) +// CHECK:STDOUT: !131 = !DILocation(line: 36, column: 1, scope: !126) +// CHECK:STDOUT: !132 = !{!127} +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.2fad9574e050607e", scope: null, file: !4, line: 37, type: !51, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !142) +// CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !6) +// CHECK:STDOUT: !135 = !DILocalVariable(arg: 2, scope: !133, type: !6) +// CHECK:STDOUT: !140 = !DILocation(line: 38, column: 3, scope: !133) +// CHECK:STDOUT: !141 = !DILocation(line: 37, column: 1, scope: !133) +// CHECK:STDOUT: !142 = !{!134, !135} +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.2fad9574e050607e", scope: null, file: !4, line: 48, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !164) +// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !6) +// CHECK:STDOUT: !145 = !DILocalVariable(arg: 2, scope: !143, type: !6) +// CHECK:STDOUT: !150 = !DILocation(line: 49, column: 7, scope: !143) +// CHECK:STDOUT: !151 = !DILocation(line: 49, column: 6, scope: !143) +// CHECK:STDOUT: !153 = !DILocation(line: 50, column: 5, scope: !143) +// CHECK:STDOUT: !154 = !DILocation(line: 52, column: 7, scope: !143) +// CHECK:STDOUT: !155 = !DILocation(line: 52, column: 6, scope: !143) +// CHECK:STDOUT: !158 = !DILocation(line: 53, column: 12, scope: !143) +// CHECK:STDOUT: !159 = !DILocation(line: 53, column: 5, scope: !143) +// CHECK:STDOUT: !162 = !DILocation(line: 55, column: 12, scope: !143) +// CHECK:STDOUT: !163 = !DILocation(line: 55, column: 5, scope: !143) +// CHECK:STDOUT: !164 = !{!144, !145} +// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 37, type: !68, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !174) +// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !28) +// CHECK:STDOUT: !167 = !DILocalVariable(arg: 2, scope: !165, type: !6) +// CHECK:STDOUT: !172 = !DILocation(line: 38, column: 3, scope: !165) +// CHECK:STDOUT: !173 = !DILocation(line: 37, column: 1, scope: !165) +// CHECK:STDOUT: !174 = !{!166, !167} +// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 48, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !196) +// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !28) +// CHECK:STDOUT: !177 = !DILocalVariable(arg: 2, scope: !175, type: !6) +// CHECK:STDOUT: !182 = !DILocation(line: 49, column: 7, scope: !175) +// CHECK:STDOUT: !183 = !DILocation(line: 49, column: 6, scope: !175) +// CHECK:STDOUT: !185 = !DILocation(line: 50, column: 5, scope: !175) +// CHECK:STDOUT: !186 = !DILocation(line: 52, column: 7, scope: !175) +// CHECK:STDOUT: !187 = !DILocation(line: 52, column: 6, scope: !175) +// CHECK:STDOUT: !190 = !DILocation(line: 53, column: 12, scope: !175) +// CHECK:STDOUT: !191 = !DILocation(line: 53, column: 5, scope: !175) +// CHECK:STDOUT: !194 = !DILocation(line: 55, column: 12, scope: !175) +// CHECK:STDOUT: !195 = !DILocation(line: 55, column: 5, scope: !175) +// CHECK:STDOUT: !196 = !{!176, !177} +// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.417c9c4a651ab31b", scope: null, file: !4, line: 37, type: !68, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !206) +// CHECK:STDOUT: !198 = !DILocalVariable(arg: 1, scope: !197, type: !28) +// CHECK:STDOUT: !199 = !DILocalVariable(arg: 2, scope: !197, type: !6) +// CHECK:STDOUT: !204 = !DILocation(line: 38, column: 3, scope: !197) +// CHECK:STDOUT: !205 = !DILocation(line: 37, column: 1, scope: !197) +// CHECK:STDOUT: !206 = !{!198, !199} +// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "D", linkageName: "_CD.Main.417c9c4a651ab31b", scope: null, file: !4, line: 48, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !228) +// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !28) +// CHECK:STDOUT: !209 = !DILocalVariable(arg: 2, scope: !207, type: !6) +// CHECK:STDOUT: !214 = !DILocation(line: 49, column: 7, scope: !207) +// CHECK:STDOUT: !215 = !DILocation(line: 49, column: 6, scope: !207) +// CHECK:STDOUT: !217 = !DILocation(line: 50, column: 5, scope: !207) +// CHECK:STDOUT: !218 = !DILocation(line: 52, column: 7, scope: !207) +// CHECK:STDOUT: !219 = !DILocation(line: 52, column: 6, scope: !207) +// CHECK:STDOUT: !222 = !DILocation(line: 53, column: 12, scope: !207) +// CHECK:STDOUT: !223 = !DILocation(line: 53, column: 5, scope: !207) +// CHECK:STDOUT: !226 = !DILocation(line: 55, column: 12, scope: !207) +// CHECK:STDOUT: !227 = !DILocation(line: 55, column: 5, scope: !207) +// CHECK:STDOUT: !228 = !{!208, !209} +// CHECK:STDOUT: !261 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.2fad9574e050607e", scope: null, file: !4, line: 41, type: !51, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !275) +// CHECK:STDOUT: !262 = !DILocalVariable(arg: 1, scope: !261, type: !6) +// CHECK:STDOUT: !263 = !DILocalVariable(arg: 2, scope: !261, type: !6) +// CHECK:STDOUT: !266 = !DILocation(line: 42, column: 7, scope: !261) +// CHECK:STDOUT: !267 = !DILocation(line: 42, column: 6, scope: !261) +// CHECK:STDOUT: !269 = !DILocation(line: 43, column: 5, scope: !261) +// CHECK:STDOUT: !271 = !DILocation(line: 44, column: 10, scope: !261) +// CHECK:STDOUT: !272 = !DILocation(line: 44, column: 5, scope: !261) +// CHECK:STDOUT: !273 = !DILocation(line: 42, column: 3, scope: !261) +// CHECK:STDOUT: !274 = !DILocation(line: 41, column: 1, scope: !261) +// CHECK:STDOUT: !275 = !{!262, !263} +// CHECK:STDOUT: !276 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.2fad9574e050607e", scope: null, file: !4, line: 61, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !287) +// CHECK:STDOUT: !277 = !DILocalVariable(arg: 1, scope: !276, type: !6) +// CHECK:STDOUT: !278 = !DILocalVariable(arg: 2, scope: !276, type: !6) +// CHECK:STDOUT: !285 = !DILocation(line: 62, column: 10, scope: !276) +// CHECK:STDOUT: !286 = !DILocation(line: 62, column: 3, scope: !276) +// CHECK:STDOUT: !287 = !{!277, !278} +// CHECK:STDOUT: !288 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2fad9574e050607e", scope: null, file: !4, line: 65, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !299) +// CHECK:STDOUT: !289 = !DILocalVariable(arg: 1, scope: !288, type: !6) +// CHECK:STDOUT: !290 = !DILocalVariable(arg: 2, scope: !288, type: !6) +// CHECK:STDOUT: !297 = !DILocation(line: 66, column: 10, scope: !288) +// CHECK:STDOUT: !298 = !DILocation(line: 66, column: 3, scope: !288) +// CHECK:STDOUT: !299 = !{!289, !290} +// CHECK:STDOUT: !300 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 41, type: !68, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !314) +// CHECK:STDOUT: !301 = !DILocalVariable(arg: 1, scope: !300, type: !28) +// CHECK:STDOUT: !302 = !DILocalVariable(arg: 2, scope: !300, type: !6) +// CHECK:STDOUT: !305 = !DILocation(line: 42, column: 7, scope: !300) +// CHECK:STDOUT: !306 = !DILocation(line: 42, column: 6, scope: !300) +// CHECK:STDOUT: !308 = !DILocation(line: 43, column: 5, scope: !300) +// CHECK:STDOUT: !310 = !DILocation(line: 44, column: 10, scope: !300) +// CHECK:STDOUT: !311 = !DILocation(line: 44, column: 5, scope: !300) +// CHECK:STDOUT: !312 = !DILocation(line: 42, column: 3, scope: !300) +// CHECK:STDOUT: !313 = !DILocation(line: 41, column: 1, scope: !300) +// CHECK:STDOUT: !314 = !{!301, !302} +// CHECK:STDOUT: !315 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 61, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !326) +// CHECK:STDOUT: !316 = !DILocalVariable(arg: 1, scope: !315, type: !28) +// CHECK:STDOUT: !317 = !DILocalVariable(arg: 2, scope: !315, type: !6) +// CHECK:STDOUT: !324 = !DILocation(line: 62, column: 10, scope: !315) +// CHECK:STDOUT: !325 = !DILocation(line: 62, column: 3, scope: !315) +// CHECK:STDOUT: !326 = !{!316, !317} +// CHECK:STDOUT: !327 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 65, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !338) +// CHECK:STDOUT: !328 = !DILocalVariable(arg: 1, scope: !327, type: !28) +// CHECK:STDOUT: !329 = !DILocalVariable(arg: 2, scope: !327, type: !6) +// CHECK:STDOUT: !336 = !DILocation(line: 66, column: 10, scope: !327) +// CHECK:STDOUT: !337 = !DILocation(line: 66, column: 3, scope: !327) +// CHECK:STDOUT: !338 = !{!328, !329} +// CHECK:STDOUT: !339 = distinct !DISubprogram(name: "C", linkageName: "_CC.Main.417c9c4a651ab31b", scope: null, file: !4, line: 41, type: !68, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !353) +// CHECK:STDOUT: !340 = !DILocalVariable(arg: 1, scope: !339, type: !28) +// CHECK:STDOUT: !341 = !DILocalVariable(arg: 2, scope: !339, type: !6) +// CHECK:STDOUT: !344 = !DILocation(line: 42, column: 7, scope: !339) +// CHECK:STDOUT: !345 = !DILocation(line: 42, column: 6, scope: !339) +// CHECK:STDOUT: !347 = !DILocation(line: 43, column: 5, scope: !339) +// CHECK:STDOUT: !349 = !DILocation(line: 44, column: 10, scope: !339) +// CHECK:STDOUT: !350 = !DILocation(line: 44, column: 5, scope: !339) +// CHECK:STDOUT: !351 = !DILocation(line: 42, column: 3, scope: !339) +// CHECK:STDOUT: !352 = !DILocation(line: 41, column: 1, scope: !339) +// CHECK:STDOUT: !353 = !{!340, !341} +// CHECK:STDOUT: !354 = distinct !DISubprogram(name: "E", linkageName: "_CE.Main.417c9c4a651ab31b", scope: null, file: !4, line: 61, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !365) +// CHECK:STDOUT: !355 = !DILocalVariable(arg: 1, scope: !354, type: !28) +// CHECK:STDOUT: !356 = !DILocalVariable(arg: 2, scope: !354, type: !6) +// CHECK:STDOUT: !363 = !DILocation(line: 62, column: 10, scope: !354) +// CHECK:STDOUT: !364 = !DILocation(line: 62, column: 3, scope: !354) +// CHECK:STDOUT: !365 = !{!355, !356} +// CHECK:STDOUT: !366 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.417c9c4a651ab31b", scope: null, file: !4, line: 65, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !377) +// CHECK:STDOUT: !367 = !DILocalVariable(arg: 1, scope: !366, type: !28) +// CHECK:STDOUT: !368 = !DILocalVariable(arg: 2, scope: !366, type: !6) +// CHECK:STDOUT: !375 = !DILocation(line: 66, column: 10, scope: !366) +// CHECK:STDOUT: !376 = !DILocation(line: 66, column: 3, scope: !366) +// CHECK:STDOUT: !377 = !{!367, !368} +// CHECK:STDOUT: !417 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2fad9574e050607e", scope: null, file: !4, line: 69, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !428) +// CHECK:STDOUT: !418 = !DILocalVariable(arg: 1, scope: !417, type: !6) +// CHECK:STDOUT: !419 = !DILocalVariable(arg: 2, scope: !417, type: !6) +// CHECK:STDOUT: !425 = !DILocation(line: 70, column: 15, scope: !417) +// CHECK:STDOUT: !426 = !DILocation(line: 70, column: 10, scope: !417) +// CHECK:STDOUT: !427 = !DILocation(line: 70, column: 3, scope: !417) +// CHECK:STDOUT: !428 = !{!418, !419} +// CHECK:STDOUT: !429 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.21aefb7dfdebb8e4", scope: null, file: !4, line: 69, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !440) +// CHECK:STDOUT: !430 = !DILocalVariable(arg: 1, scope: !429, type: !28) +// CHECK:STDOUT: !431 = !DILocalVariable(arg: 2, scope: !429, type: !6) +// CHECK:STDOUT: !437 = !DILocation(line: 70, column: 15, scope: !429) +// CHECK:STDOUT: !438 = !DILocation(line: 70, column: 10, scope: !429) +// CHECK:STDOUT: !439 = !DILocation(line: 70, column: 3, scope: !429) +// CHECK:STDOUT: !440 = !{!430, !431} +// CHECK:STDOUT: !441 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.417c9c4a651ab31b", scope: null, file: !4, line: 69, type: !30, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !452) +// CHECK:STDOUT: !442 = !DILocalVariable(arg: 1, scope: !441, type: !28) +// CHECK:STDOUT: !443 = !DILocalVariable(arg: 2, scope: !441, type: !6) +// CHECK:STDOUT: !449 = !DILocation(line: 70, column: 15, scope: !441) +// CHECK:STDOUT: !450 = !DILocation(line: 70, column: 10, scope: !441) +// CHECK:STDOUT: !451 = !DILocation(line: 70, column: 3, scope: !441) +// CHECK:STDOUT: !452 = !{!442, !443} // 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 bc86b8578b65..266b137634b7 100644 --- a/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon +++ b/toolchain/lower/testdata/function/generic/call_specific_in_class.carbon @@ -51,180 +51,168 @@ fn M() { // CHECK:STDOUT: %type.28 = type {} // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define void @_CM.Main() #0 !dbg !39 { // 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.08d9e38b928ba575: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 void @_CM.Main() #0 !dbg !52 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !53 -// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !59 -// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !63 -// CHECK:STDOUT: %var_i32.var = alloca i32, align 4, !dbg !67 -// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !73 -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !77 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !53 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !53 -// CHECK:STDOUT: %.loc34_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !55 -// CHECK:STDOUT: %F.call.loc34 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc34_5), !dbg !56 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !59 -// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !59 -// CHECK:STDOUT: %.loc36_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !61 -// CHECK:STDOUT: %F.call.loc36 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc36_5), !dbg !62 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !63 -// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !63 -// CHECK:STDOUT: %.loc38_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !65 -// CHECK:STDOUT: %F.call.loc38 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc38_5), !dbg !66 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_i32.var), !dbg !67 -// CHECK:STDOUT: store i32 0, ptr %var_i32.var, align 4, !dbg !67 -// CHECK:STDOUT: %.loc40_5 = load i32, ptr %var_i32.var, align 4, !dbg !69 -// CHECK:STDOUT: %F.call.loc40 = call i32 @_CF.Main.2fad9574e050607e(i32 %.loc40_5), !dbg !70 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !73 -// CHECK:STDOUT: store double 0.000000e+00, ptr %var_f64.var, align 8, !dbg !73 -// CHECK:STDOUT: %.loc42_5 = load double, ptr %var_f64.var, align 8, !dbg !75 -// CHECK:STDOUT: %F.call.loc42 = call double @_CF.Main.21aefb7dfdebb8e4(double %.loc42_5), !dbg !76 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !77 -// CHECK:STDOUT: %F.call.loc44 = call %type.28 @_CF.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !79 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %_.var), !dbg !77 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %var_f64.var), !dbg !73 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %var_i32.var), !dbg !67 -// CHECK:STDOUT: call void @"_CSelfDestruct.036a5d5004ea8020:core.Destroy.Core"(ptr %ptr_i8.var), !dbg !63 -// CHECK:STDOUT: call void @"_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core"(ptr %ptr_f64.var), !dbg !59 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %ptr_i32.var), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !80 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7619ac942aa9029a: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 @"_CSelfDestruct.72395be3dbbe8946: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.036a5d5004ea8020: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.6fa1811d66e6eb5d: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 @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %self) #0 !dbg !97 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: %ptr_i32.var = alloca ptr, align 8, !dbg !40 +// CHECK:STDOUT: %ptr_f64.var = alloca ptr, align 8, !dbg !47 +// CHECK:STDOUT: %ptr_i8.var = alloca ptr, align 8, !dbg !51 +// CHECK:STDOUT: %var_i32.var = alloca i32, align 4, !dbg !55 +// CHECK:STDOUT: %var_f64.var = alloca double, align 8, !dbg !61 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !65 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !40 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i32.var, align 8, !dbg !40 +// CHECK:STDOUT: %.loc34_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !42 +// CHECK:STDOUT: %F.call.loc34 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc34_5), !dbg !43 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !47 +// CHECK:STDOUT: store ptr poison, ptr %ptr_f64.var, align 8, !dbg !47 +// CHECK:STDOUT: %.loc36_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !49 +// CHECK:STDOUT: %F.call.loc36 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc36_5), !dbg !50 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i8.var), !dbg !51 +// CHECK:STDOUT: store ptr poison, ptr %ptr_i8.var, align 8, !dbg !51 +// CHECK:STDOUT: %.loc38_5 = load ptr, ptr %ptr_i8.var, align 8, !dbg !53 +// CHECK:STDOUT: %F.call.loc38 = call ptr @_CF.Main.417c9c4a651ab31b(ptr %.loc38_5), !dbg !54 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_i32.var), !dbg !55 +// CHECK:STDOUT: store i32 0, ptr %var_i32.var, align 4, !dbg !55 +// CHECK:STDOUT: %.loc40_5 = load i32, ptr %var_i32.var, align 4, !dbg !57 +// CHECK:STDOUT: %F.call.loc40 = call i32 @_CF.Main.2fad9574e050607e(i32 %.loc40_5), !dbg !58 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !61 +// CHECK:STDOUT: store double 0.000000e+00, ptr %var_f64.var, align 8, !dbg !61 +// CHECK:STDOUT: %.loc42_5 = load double, ptr %var_f64.var, align 8, !dbg !63 +// CHECK:STDOUT: %F.call.loc42 = call double @_CF.Main.21aefb7dfdebb8e4(double %.loc42_5), !dbg !64 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !65 +// CHECK:STDOUT: %F.call.loc44 = call %type.28 @_CF.Main.c3359c2c217ad593(%type.28 zeroinitializer), !dbg !67 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %_.var), !dbg !65 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %var_f64.var), !dbg !61 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %var_i32.var), !dbg !55 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.eadf459918fc387c(ptr %ptr_i8.var), !dbg !51 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b18855c76072615b(ptr %ptr_f64.var), !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %ptr_i32.var), !dbg !40 +// CHECK:STDOUT: ret void, !dbg !72 // 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.417c9c4a651ab31b(ptr %x) #0 !dbg !101 { +// CHECK:STDOUT: define linkonce_odr ptr @_CF.Main.417c9c4a651ab31b(ptr %x) #0 !dbg !73 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call ptr @_CG.Main.417c9c4a651ab31b(ptr %x), !dbg !107 -// CHECK:STDOUT: ret ptr %G.call, !dbg !108 +// CHECK:STDOUT: %G.call = call ptr @_CG.Main.417c9c4a651ab31b(ptr %x), !dbg !79 +// CHECK:STDOUT: ret ptr %G.call, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.2fad9574e050607e(i32 %x) #0 !dbg !128 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.2fad9574e050607e(i32 %x) #0 !dbg !100 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call i32 @_CG.Main.2fad9574e050607e(i32 %x), !dbg !134 -// CHECK:STDOUT: ret i32 %G.call, !dbg !135 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main.2fad9574e050607e(i32 %x), !dbg !106 +// CHECK:STDOUT: ret i32 %G.call, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CF.Main.21aefb7dfdebb8e4(double %x) #0 !dbg !137 { +// CHECK:STDOUT: define linkonce_odr double @_CF.Main.21aefb7dfdebb8e4(double %x) #0 !dbg !109 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call double @_CG.Main.21aefb7dfdebb8e4(double %x), !dbg !143 -// CHECK:STDOUT: ret double %G.call, !dbg !144 +// CHECK:STDOUT: %G.call = call double @_CG.Main.21aefb7dfdebb8e4(double %x), !dbg !115 +// CHECK:STDOUT: ret double %G.call, !dbg !116 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.28 @_CF.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !146 { +// CHECK:STDOUT: define linkonce_odr %type.28 @_CF.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !118 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %G.call = call %type.28 @_CG.Main.c3359c2c217ad593(%type.28 %x), !dbg !152 -// CHECK:STDOUT: ret %type.28 %G.call, !dbg !153 +// CHECK:STDOUT: %G.call = call %type.28 @_CG.Main.c3359c2c217ad593(%type.28 %x), !dbg !124 +// CHECK:STDOUT: ret %type.28 %G.call, !dbg !125 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.417c9c4a651ab31b(ptr %x) #0 !dbg !155 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !160 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !160 -// CHECK:STDOUT: %C.Cfn.call = call ptr @_CCfn.C.Main.417c9c4a651ab31b(ptr %c.var, ptr %x), !dbg !162 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !160 -// CHECK:STDOUT: ret ptr %C.Cfn.call, !dbg !166 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !127 { +// CHECK:STDOUT: ret void, !dbg !132 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.2fad9574e050607e(i32 %x) #0 !dbg !190 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !195 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !195 -// CHECK:STDOUT: %C.Cfn.call = call i32 @_CCfn.C.Main.2fad9574e050607e(ptr %c.var, i32 %x), !dbg !197 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !195 -// CHECK:STDOUT: ret i32 %C.Cfn.call, !dbg !201 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !134 { +// CHECK:STDOUT: ret void, !dbg !139 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CG.Main.21aefb7dfdebb8e4(double %x) #0 !dbg !203 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !208 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !208 -// CHECK:STDOUT: %C.Cfn.call = call double @_CCfn.C.Main.21aefb7dfdebb8e4(ptr %c.var, double %x), !dbg !210 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !208 -// CHECK:STDOUT: ret double %C.Cfn.call, !dbg !212 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !141 { +// CHECK:STDOUT: ret void, !dbg !146 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.28 @_CG.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !214 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !219 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !219 -// CHECK:STDOUT: %C.Cfn.call = call %type.28 @_CCfn.C.Main.c3359c2c217ad593(ptr %c.var, %type.28 %x), !dbg !221 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !219 -// CHECK:STDOUT: ret %type.28 %C.Cfn.call, !dbg !223 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.eadf459918fc387c(ptr %t) #0 !dbg !148 { +// CHECK:STDOUT: ret void, !dbg !153 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CCfn.C.Main.417c9c4a651ab31b(ptr %self, ptr %x) #0 !dbg !225 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %x, !dbg !233 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b18855c76072615b(ptr %t) #0 !dbg !155 { +// CHECK:STDOUT: ret void, !dbg !160 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CCfn.C.Main.2fad9574e050607e(ptr %self, i32 %x) #0 !dbg !255 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !263 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !162 { +// CHECK:STDOUT: ret void, !dbg !167 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr double @_CCfn.C.Main.21aefb7dfdebb8e4(ptr %self, double %x) #0 !dbg !265 { +// CHECK:STDOUT: define linkonce_odr ptr @_CG.Main.417c9c4a651ab31b(ptr %x) #0 !dbg !169 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret double %x, !dbg !273 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !174 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !174 +// CHECK:STDOUT: %C.Cfn.call = call ptr @_CCfn.C.Main.417c9c4a651ab31b(ptr %c.var, ptr %x), !dbg !176 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %c.var), !dbg !174 +// CHECK:STDOUT: ret ptr %C.Cfn.call, !dbg !180 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr %type.28 @_CCfn.C.Main.c3359c2c217ad593(ptr %self, %type.28 %x) #0 !dbg !275 { +// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.2fad9574e050607e(i32 %x) #0 !dbg !204 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret %type.28 %x, !dbg !283 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !209 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !209 +// CHECK:STDOUT: %C.Cfn.call = call i32 @_CCfn.C.Main.2fad9574e050607e(ptr %c.var, i32 %x), !dbg !211 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %c.var), !dbg !209 +// CHECK:STDOUT: ret i32 %C.Cfn.call, !dbg !215 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr double @_CG.Main.21aefb7dfdebb8e4(double %x) #0 !dbg !217 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !222 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !222 +// CHECK:STDOUT: %C.Cfn.call = call double @_CCfn.C.Main.21aefb7dfdebb8e4(ptr %c.var, double %x), !dbg !224 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %c.var), !dbg !222 +// CHECK:STDOUT: ret double %C.Cfn.call, !dbg !226 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr %type.28 @_CG.Main.c3359c2c217ad593(%type.28 %x) #0 !dbg !228 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !233 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !233 +// CHECK:STDOUT: %C.Cfn.call = call %type.28 @_CCfn.C.Main.c3359c2c217ad593(ptr %c.var, %type.28 %x), !dbg !235 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %c.var), !dbg !233 +// CHECK:STDOUT: ret %type.28 %C.Cfn.call, !dbg !237 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @_CCfn.C.Main.417c9c4a651ab31b(ptr %self, ptr %x) #0 !dbg !239 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret ptr %x, !dbg !247 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i32 @_CCfn.C.Main.2fad9574e050607e(ptr %self, i32 %x) #0 !dbg !269 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret i32 %x, !dbg !277 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr double @_CCfn.C.Main.21aefb7dfdebb8e4(ptr %self, double %x) #0 !dbg !279 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret double %x, !dbg !287 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr %type.28 @_CCfn.C.Main.c3359c2c217ad593(ptr %self, %type.28 %x) #0 !dbg !289 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret %type.28 %x, !dbg !297 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -239,133 +227,130 @@ fn M() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "call_specific_in_class.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !37 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{null, !37} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !{null, !36} -// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !34, line: 24, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !37) -// CHECK:STDOUT: !46 = !DILocation(line: 24, column: 3, scope: !44) -// CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !34, line: 24, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !51) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !37) -// CHECK:STDOUT: !50 = !DILocation(line: 24, column: 3, scope: !48) -// CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !53 = !DILocation(line: 33, column: 3, scope: !52) -// CHECK:STDOUT: !55 = !DILocation(line: 34, column: 5, scope: !52) -// CHECK:STDOUT: !56 = !DILocation(line: 34, column: 3, scope: !52) -// CHECK:STDOUT: !57 = !{!37, !37} -// CHECK:STDOUT: !58 = !DISubroutineType(types: !57) -// CHECK:STDOUT: !59 = !DILocation(line: 35, column: 3, scope: !52) -// CHECK:STDOUT: !61 = !DILocation(line: 36, column: 5, scope: !52) -// CHECK:STDOUT: !62 = !DILocation(line: 36, column: 3, scope: !52) -// CHECK:STDOUT: !63 = !DILocation(line: 37, column: 3, scope: !52) -// CHECK:STDOUT: !65 = !DILocation(line: 38, column: 5, scope: !52) -// CHECK:STDOUT: !66 = !DILocation(line: 38, column: 3, scope: !52) -// CHECK:STDOUT: !67 = !DILocation(line: 39, column: 3, scope: !52) -// CHECK:STDOUT: !69 = !DILocation(line: 40, column: 5, scope: !52) -// CHECK:STDOUT: !70 = !DILocation(line: 40, column: 3, scope: !52) -// CHECK:STDOUT: !71 = !{!36, !36} -// CHECK:STDOUT: !72 = !DISubroutineType(types: !71) -// CHECK:STDOUT: !73 = !DILocation(line: 41, column: 3, scope: !52) -// CHECK:STDOUT: !75 = !DILocation(line: 42, column: 5, scope: !52) -// CHECK:STDOUT: !76 = !DILocation(line: 42, column: 3, scope: !52) -// CHECK:STDOUT: !77 = !DILocation(line: 43, column: 3, scope: !52) -// CHECK:STDOUT: !79 = !DILocation(line: 44, column: 3, scope: !52) -// CHECK:STDOUT: !80 = !DILocation(line: 32, column: 1, scope: !52) -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !34, line: 41, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !84) -// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !37) -// CHECK:STDOUT: !83 = !DILocation(line: 41, column: 3, scope: !81) -// CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !34, line: 39, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !88) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !36) -// CHECK:STDOUT: !87 = !DILocation(line: 39, column: 3, scope: !85) -// CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.036a5d5004ea8020:core.Destroy.Core", scope: null, file: !34, line: 37, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !92) -// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !37) -// CHECK:STDOUT: !91 = !DILocation(line: 37, column: 3, scope: !89) -// CHECK:STDOUT: !92 = !{!90} -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6fa1811d66e6eb5d:core.Destroy.Core", scope: null, file: !34, line: 35, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !96) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !37) -// CHECK:STDOUT: !95 = !DILocation(line: 35, column: 3, scope: !93) -// CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !34, line: 33, type: !39, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !100) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !37) -// CHECK:STDOUT: !99 = !DILocation(line: 33, column: 3, scope: !97) -// CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.417c9c4a651ab31b", scope: null, file: !34, line: 28, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !109) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !37) -// CHECK:STDOUT: !107 = !DILocation(line: 29, column: 10, scope: !101) -// CHECK:STDOUT: !108 = !DILocation(line: 29, column: 3, scope: !101) -// CHECK:STDOUT: !109 = !{!102} -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2fad9574e050607e", scope: null, file: !34, line: 28, type: !72, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !136) -// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !36) -// CHECK:STDOUT: !134 = !DILocation(line: 29, column: 10, scope: !128) -// CHECK:STDOUT: !135 = !DILocation(line: 29, column: 3, scope: !128) -// CHECK:STDOUT: !136 = !{!129} -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.21aefb7dfdebb8e4", scope: null, file: !34, line: 28, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !145) -// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !37) -// CHECK:STDOUT: !143 = !DILocation(line: 29, column: 10, scope: !137) -// CHECK:STDOUT: !144 = !DILocation(line: 29, column: 3, scope: !137) -// CHECK:STDOUT: !145 = !{!138} -// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c3359c2c217ad593", scope: null, file: !34, line: 28, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !154) -// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !37) -// 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: "G", linkageName: "_CG.Main.417c9c4a651ab31b", scope: null, file: !34, line: 23, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !167) -// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !37) -// CHECK:STDOUT: !160 = !DILocation(line: 24, column: 3, scope: !155) -// CHECK:STDOUT: !162 = !DILocation(line: 25, column: 10, scope: !155) -// CHECK:STDOUT: !164 = !{!37, !37, !37} -// CHECK:STDOUT: !165 = !DISubroutineType(types: !164) -// CHECK:STDOUT: !166 = !DILocation(line: 25, column: 3, scope: !155) -// CHECK:STDOUT: !167 = !{!156} -// CHECK:STDOUT: !190 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2fad9574e050607e", scope: null, file: !34, line: 23, type: !72, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !202) -// CHECK:STDOUT: !191 = !DILocalVariable(arg: 1, scope: !190, type: !36) -// CHECK:STDOUT: !195 = !DILocation(line: 24, column: 3, scope: !190) -// CHECK:STDOUT: !197 = !DILocation(line: 25, column: 10, scope: !190) -// CHECK:STDOUT: !199 = !{!36, !37, !36} -// CHECK:STDOUT: !200 = !DISubroutineType(types: !199) -// CHECK:STDOUT: !201 = !DILocation(line: 25, column: 3, scope: !190) -// CHECK:STDOUT: !202 = !{!191} -// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.21aefb7dfdebb8e4", scope: null, file: !34, line: 23, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !213) -// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !37) -// CHECK:STDOUT: !208 = !DILocation(line: 24, column: 3, scope: !203) -// CHECK:STDOUT: !210 = !DILocation(line: 25, column: 10, scope: !203) -// CHECK:STDOUT: !212 = !DILocation(line: 25, column: 3, scope: !203) -// CHECK:STDOUT: !213 = !{!204} -// CHECK:STDOUT: !214 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c3359c2c217ad593", scope: null, file: !34, line: 23, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !224) -// CHECK:STDOUT: !215 = !DILocalVariable(arg: 1, scope: !214, type: !37) -// CHECK:STDOUT: !219 = !DILocation(line: 24, column: 3, scope: !214) -// CHECK:STDOUT: !221 = !DILocation(line: 25, column: 10, scope: !214) -// CHECK:STDOUT: !223 = !DILocation(line: 25, column: 3, scope: !214) -// CHECK:STDOUT: !224 = !{!215} -// CHECK:STDOUT: !225 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.417c9c4a651ab31b", scope: null, file: !34, line: 18, type: !165, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !234) -// CHECK:STDOUT: !226 = !DILocalVariable(arg: 1, scope: !225, type: !37) -// CHECK:STDOUT: !227 = !DILocalVariable(arg: 2, scope: !225, type: !37) -// CHECK:STDOUT: !233 = !DILocation(line: 19, column: 5, scope: !225) -// CHECK:STDOUT: !234 = !{!226, !227} -// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.2fad9574e050607e", scope: null, file: !34, line: 18, type: !200, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !264) -// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !37) -// CHECK:STDOUT: !257 = !DILocalVariable(arg: 2, scope: !255, type: !36) -// CHECK:STDOUT: !263 = !DILocation(line: 19, column: 5, scope: !255) -// CHECK:STDOUT: !264 = !{!256, !257} -// CHECK:STDOUT: !265 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.21aefb7dfdebb8e4", scope: null, file: !34, line: 18, type: !165, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !274) -// CHECK:STDOUT: !266 = !DILocalVariable(arg: 1, scope: !265, type: !37) -// CHECK:STDOUT: !267 = !DILocalVariable(arg: 2, scope: !265, type: !37) -// CHECK:STDOUT: !273 = !DILocation(line: 19, column: 5, scope: !265) -// CHECK:STDOUT: !274 = !{!266, !267} -// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c3359c2c217ad593", scope: null, file: !34, line: 18, type: !165, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !284) -// CHECK:STDOUT: !276 = !DILocalVariable(arg: 1, scope: !275, type: !37) -// CHECK:STDOUT: !277 = !DILocalVariable(arg: 2, scope: !275, type: !37) -// CHECK:STDOUT: !283 = !DILocation(line: 19, column: 5, scope: !275) -// CHECK:STDOUT: !284 = !{!276, !277} +// CHECK:STDOUT: !37 = !{null} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "M", linkageName: "_CM.Main", scope: null, file: !34, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !40 = !DILocation(line: 33, column: 3, scope: !39) +// CHECK:STDOUT: !42 = !DILocation(line: 34, column: 5, scope: !39) +// CHECK:STDOUT: !43 = !DILocation(line: 34, column: 3, scope: !39) +// CHECK:STDOUT: !44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !45 = !{!44, !44} +// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) +// CHECK:STDOUT: !47 = !DILocation(line: 35, column: 3, scope: !39) +// CHECK:STDOUT: !49 = !DILocation(line: 36, column: 5, scope: !39) +// CHECK:STDOUT: !50 = !DILocation(line: 36, column: 3, scope: !39) +// CHECK:STDOUT: !51 = !DILocation(line: 37, column: 3, scope: !39) +// CHECK:STDOUT: !53 = !DILocation(line: 38, column: 5, scope: !39) +// CHECK:STDOUT: !54 = !DILocation(line: 38, column: 3, scope: !39) +// CHECK:STDOUT: !55 = !DILocation(line: 39, column: 3, scope: !39) +// CHECK:STDOUT: !57 = !DILocation(line: 40, column: 5, scope: !39) +// CHECK:STDOUT: !58 = !DILocation(line: 40, column: 3, scope: !39) +// CHECK:STDOUT: !59 = !{!36, !36} +// CHECK:STDOUT: !60 = !DISubroutineType(types: !59) +// CHECK:STDOUT: !61 = !DILocation(line: 41, column: 3, scope: !39) +// CHECK:STDOUT: !63 = !DILocation(line: 42, column: 5, scope: !39) +// CHECK:STDOUT: !64 = !DILocation(line: 42, column: 3, scope: !39) +// CHECK:STDOUT: !65 = !DILocation(line: 43, column: 3, scope: !39) +// CHECK:STDOUT: !67 = !DILocation(line: 44, column: 3, scope: !39) +// CHECK:STDOUT: !68 = !{null, !44} +// CHECK:STDOUT: !69 = !DISubroutineType(types: !68) +// CHECK:STDOUT: !70 = !{null, !36} +// CHECK:STDOUT: !71 = !DISubroutineType(types: !70) +// CHECK:STDOUT: !72 = !DILocation(line: 32, column: 1, scope: !39) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.417c9c4a651ab31b", scope: null, file: !34, line: 28, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !81) +// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !44) +// CHECK:STDOUT: !79 = !DILocation(line: 29, column: 10, scope: !73) +// CHECK:STDOUT: !80 = !DILocation(line: 29, column: 3, scope: !73) +// CHECK:STDOUT: !81 = !{!74} +// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2fad9574e050607e", scope: null, file: !34, line: 28, type: !60, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !108) +// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !36) +// CHECK:STDOUT: !106 = !DILocation(line: 29, column: 10, scope: !100) +// CHECK:STDOUT: !107 = !DILocation(line: 29, column: 3, scope: !100) +// CHECK:STDOUT: !108 = !{!101} +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.21aefb7dfdebb8e4", scope: null, file: !34, line: 28, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !117) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !44) +// CHECK:STDOUT: !115 = !DILocation(line: 29, column: 10, scope: !109) +// CHECK:STDOUT: !116 = !DILocation(line: 29, column: 3, scope: !109) +// CHECK:STDOUT: !117 = !{!110} +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c3359c2c217ad593", scope: null, file: !34, line: 28, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !126) +// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !44) +// CHECK:STDOUT: !124 = !DILocation(line: 29, column: 10, scope: !118) +// CHECK:STDOUT: !125 = !DILocation(line: 29, column: 3, scope: !118) +// CHECK:STDOUT: !126 = !{!119} +// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !26, line: 32, type: !69, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !133) +// CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !127, type: !44) +// CHECK:STDOUT: !132 = !DILocation(line: 32, column: 1, scope: !127) +// CHECK:STDOUT: !133 = !{!128} +// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !26, line: 32, type: !69, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !140) +// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !44) +// CHECK:STDOUT: !139 = !DILocation(line: 32, column: 1, scope: !134) +// CHECK:STDOUT: !140 = !{!135} +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 32, type: !71, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !147) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !36) +// CHECK:STDOUT: !146 = !DILocation(line: 32, column: 1, scope: !141) +// CHECK:STDOUT: !147 = !{!142} +// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.eadf459918fc387c", scope: null, file: !26, line: 32, type: !69, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !154) +// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !44) +// CHECK:STDOUT: !153 = !DILocation(line: 32, column: 1, scope: !148) +// CHECK:STDOUT: !154 = !{!149} +// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b18855c76072615b", scope: null, file: !26, line: 32, type: !69, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !161) +// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !44) +// CHECK:STDOUT: !160 = !DILocation(line: 32, column: 1, scope: !155) +// CHECK:STDOUT: !161 = !{!156} +// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !26, line: 32, type: !69, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !168) +// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !44) +// CHECK:STDOUT: !167 = !DILocation(line: 32, column: 1, scope: !162) +// CHECK:STDOUT: !168 = !{!163} +// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.417c9c4a651ab31b", scope: null, file: !34, line: 23, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !181) +// CHECK:STDOUT: !170 = !DILocalVariable(arg: 1, scope: !169, type: !44) +// CHECK:STDOUT: !174 = !DILocation(line: 24, column: 3, scope: !169) +// CHECK:STDOUT: !176 = !DILocation(line: 25, column: 10, scope: !169) +// CHECK:STDOUT: !178 = !{!44, !44, !44} +// CHECK:STDOUT: !179 = !DISubroutineType(types: !178) +// CHECK:STDOUT: !180 = !DILocation(line: 25, column: 3, scope: !169) +// CHECK:STDOUT: !181 = !{!170} +// CHECK:STDOUT: !204 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.2fad9574e050607e", scope: null, file: !34, line: 23, type: !60, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !216) +// CHECK:STDOUT: !205 = !DILocalVariable(arg: 1, scope: !204, type: !36) +// CHECK:STDOUT: !209 = !DILocation(line: 24, column: 3, scope: !204) +// CHECK:STDOUT: !211 = !DILocation(line: 25, column: 10, scope: !204) +// CHECK:STDOUT: !213 = !{!36, !44, !36} +// CHECK:STDOUT: !214 = !DISubroutineType(types: !213) +// CHECK:STDOUT: !215 = !DILocation(line: 25, column: 3, scope: !204) +// CHECK:STDOUT: !216 = !{!205} +// CHECK:STDOUT: !217 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.21aefb7dfdebb8e4", scope: null, file: !34, line: 23, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !227) +// CHECK:STDOUT: !218 = !DILocalVariable(arg: 1, scope: !217, type: !44) +// CHECK:STDOUT: !222 = !DILocation(line: 24, column: 3, scope: !217) +// CHECK:STDOUT: !224 = !DILocation(line: 25, column: 10, scope: !217) +// CHECK:STDOUT: !226 = !DILocation(line: 25, column: 3, scope: !217) +// CHECK:STDOUT: !227 = !{!218} +// CHECK:STDOUT: !228 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.c3359c2c217ad593", scope: null, file: !34, line: 23, type: !46, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !238) +// CHECK:STDOUT: !229 = !DILocalVariable(arg: 1, scope: !228, type: !44) +// CHECK:STDOUT: !233 = !DILocation(line: 24, column: 3, scope: !228) +// CHECK:STDOUT: !235 = !DILocation(line: 25, column: 10, scope: !228) +// CHECK:STDOUT: !237 = !DILocation(line: 25, column: 3, scope: !228) +// CHECK:STDOUT: !238 = !{!229} +// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.417c9c4a651ab31b", scope: null, file: !34, line: 18, type: !179, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !248) +// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !44) +// CHECK:STDOUT: !241 = !DILocalVariable(arg: 2, scope: !239, type: !44) +// CHECK:STDOUT: !247 = !DILocation(line: 19, column: 5, scope: !239) +// CHECK:STDOUT: !248 = !{!240, !241} +// CHECK:STDOUT: !269 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.2fad9574e050607e", scope: null, file: !34, line: 18, type: !214, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !278) +// CHECK:STDOUT: !270 = !DILocalVariable(arg: 1, scope: !269, type: !44) +// CHECK:STDOUT: !271 = !DILocalVariable(arg: 2, scope: !269, type: !36) +// CHECK:STDOUT: !277 = !DILocation(line: 19, column: 5, scope: !269) +// CHECK:STDOUT: !278 = !{!270, !271} +// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.21aefb7dfdebb8e4", scope: null, file: !34, line: 18, type: !179, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !288) +// CHECK:STDOUT: !280 = !DILocalVariable(arg: 1, scope: !279, type: !44) +// CHECK:STDOUT: !281 = !DILocalVariable(arg: 2, scope: !279, type: !44) +// CHECK:STDOUT: !287 = !DILocation(line: 19, column: 5, scope: !279) +// CHECK:STDOUT: !288 = !{!280, !281} +// CHECK:STDOUT: !289 = distinct !DISubprogram(name: "Cfn", linkageName: "_CCfn.C.Main.c3359c2c217ad593", scope: null, file: !34, line: 18, type: !179, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !298) +// CHECK:STDOUT: !290 = !DILocalVariable(arg: 1, scope: !289, type: !44) +// CHECK:STDOUT: !291 = !DILocalVariable(arg: 2, scope: !289, type: !44) +// CHECK:STDOUT: !297 = !DILocation(line: 19, column: 5, scope: !289) +// CHECK:STDOUT: !298 = !{!290, !291} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/deduced_return.carbon b/toolchain/lower/testdata/function/generic/deduced_return.carbon index eeea0724342b..93b75c5b42fc 100644 --- a/toolchain/lower/testdata/function/generic/deduced_return.carbon +++ b/toolchain/lower/testdata/function/generic/deduced_return.carbon @@ -60,84 +60,83 @@ fn Use(ref n: i32) -> i32 { // CHECK:STDOUT: source_filename = "generic.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CUse.Main(i32 %n) #0 !dbg !14 { +// CHECK:STDOUT: define i32 @_CUse.Main(i32 %n) #0 !dbg !12 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8_36.3.temp = alloca { i32, i32 }, align 4, !dbg !20 -// CHECK:STDOUT: %tuple = alloca { i32, i32 }, align 4, !dbg !20 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_36.3.temp), !dbg !20 -// CHECK:STDOUT: call void @_CPair.Main.2fad9574e050607e(ptr %.loc8_36.3.temp, i32 %n), !dbg !20 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc8_36.3.temp, i32 0, i32 0, !dbg !20 -// CHECK:STDOUT: %.loc8_36.5 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !20 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc8_36.3.temp, i32 0, i32 1, !dbg !20 -// CHECK:STDOUT: %.loc8_36.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !20 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple), !dbg !20 -// CHECK:STDOUT: %tuple1 = getelementptr inbounds nuw { i32, i32 }, ptr %tuple, i32 0, i32 0, !dbg !20 -// CHECK:STDOUT: store i32 %.loc8_36.5, ptr %tuple1, align 4, !dbg !20 -// CHECK:STDOUT: %tuple2 = getelementptr inbounds nuw { i32, i32 }, ptr %tuple, i32 0, i32 1, !dbg !20 -// CHECK:STDOUT: store i32 %.loc8_36.6, ptr %tuple2, align 4, !dbg !20 -// CHECK:STDOUT: %IdFromGeneric.call = call i1 @_CIdFromGeneric.Main.1ac5a6b0e5910c46(i1 true), !dbg !25 -// CHECK:STDOUT: %Id.call = call i32 @_CId.Main.2fad9574e050607e(i32 %n), !dbg !31 -// CHECK:STDOUT: call void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %.loc8_36.3.temp), !dbg !20 -// CHECK:STDOUT: ret i32 %Id.call, !dbg !32 +// CHECK:STDOUT: %.loc8_36.3.temp = alloca { i32, i32 }, align 4, !dbg !18 +// CHECK:STDOUT: %tuple = alloca { i32, i32 }, align 4, !dbg !18 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_36.3.temp), !dbg !18 +// CHECK:STDOUT: call void @_CPair.Main.2fad9574e050607e(ptr %.loc8_36.3.temp, i32 %n), !dbg !18 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc8_36.3.temp, i32 0, i32 0, !dbg !18 +// CHECK:STDOUT: %.loc8_36.5 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !18 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc8_36.3.temp, i32 0, i32 1, !dbg !18 +// CHECK:STDOUT: %.loc8_36.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !18 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple), !dbg !18 +// CHECK:STDOUT: %tuple1 = getelementptr inbounds nuw { i32, i32 }, ptr %tuple, i32 0, i32 0, !dbg !18 +// CHECK:STDOUT: store i32 %.loc8_36.5, ptr %tuple1, align 4, !dbg !18 +// CHECK:STDOUT: %tuple2 = getelementptr inbounds nuw { i32, i32 }, ptr %tuple, i32 0, i32 1, !dbg !18 +// CHECK:STDOUT: store i32 %.loc8_36.6, ptr %tuple2, align 4, !dbg !18 +// CHECK:STDOUT: %IdFromGeneric.call = call i1 @_CIdFromGeneric.Main.1ac5a6b0e5910c46(i1 true), !dbg !23 +// CHECK:STDOUT: %Id.call = call i32 @_CId.Main.2fad9574e050607e(i32 %n), !dbg !29 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %.loc8_36.3.temp), !dbg !18 +// CHECK:STDOUT: ret i32 %Id.call, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !34 { +// CHECK:STDOUT: define weak_odr void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !32 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !36 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !38 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !40 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !40 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !40 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !40 -// CHECK:STDOUT: ret void, !dbg !40 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !42 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self), !dbg !44 -// CHECK:STDOUT: ret void, !dbg !44 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !34 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !34 +// CHECK:STDOUT: ret void, !dbg !34 // 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 @_CPair.Main.2fad9574e050607e(ptr sret({ i32, i32 }) %return, i32 %x) #0 !dbg !46 { +// CHECK:STDOUT: define linkonce_odr void @_CPair.Main.2fad9574e050607e(ptr sret({ i32, i32 }) %return, i32 %x) #0 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !49 -// CHECK:STDOUT: store i32 %x, ptr %tuple.elem0.tuple.elem, align 4, !dbg !49 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !49 -// CHECK:STDOUT: store i32 %x, ptr %tuple.elem1.tuple.elem, align 4, !dbg !49 -// CHECK:STDOUT: ret void, !dbg !52 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !41 +// CHECK:STDOUT: store i32 %x, ptr %tuple.elem0.tuple.elem, align 4, !dbg !41 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !41 +// CHECK:STDOUT: store i32 %x, ptr %tuple.elem1.tuple.elem, align 4, !dbg !41 +// CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CIdFromGeneric.Main.1ac5a6b0e5910c46(i1 %x) #0 !dbg !54 { +// CHECK:STDOUT: define linkonce_odr i1 @_CIdFromGeneric.Main.1ac5a6b0e5910c46(i1 %x) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Id.call = call i1 @_CId.Main.1ac5a6b0e5910c46(i1 %x), !dbg !60 -// CHECK:STDOUT: ret i1 %Id.call, !dbg !61 +// CHECK:STDOUT: %Id.call = call i1 @_CId.Main.1ac5a6b0e5910c46(i1 %x), !dbg !52 +// CHECK:STDOUT: ret i1 %Id.call, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CId.Main.2fad9574e050607e(i32 %x) #0 !dbg !63 { +// CHECK:STDOUT: define linkonce_odr i32 @_CId.Main.2fad9574e050607e(i32 %x) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !67 +// CHECK:STDOUT: ret i32 %x, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CId.Main.1ac5a6b0e5910c46(i1 %x) #0 !dbg !69 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %t) #0 !dbg !62 { +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %t), !dbg !66 +// CHECK:STDOUT: ret void, !dbg !67 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !69 { +// CHECK:STDOUT: ret void, !dbg !74 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i1 @_CId.Main.1ac5a6b0e5910c46(i1 %x) #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i1 %x, !dbg !73 +// CHECK:STDOUT: ret i1 %x, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -152,74 +151,76 @@ fn Use(ref n: i32) -> i32 { // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !{!6, !6} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !9 = !{null, !6} -// CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !12 = !{null, !11} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !4, line: 7, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) -// CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !14, type: !6) -// CHECK:STDOUT: !20 = !DILocation(line: 8, column: 30, scope: !14) -// CHECK:STDOUT: !21 = !{!11, !6} -// CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !25 = !DILocation(line: 9, column: 24, scope: !14) -// CHECK:STDOUT: !26 = !{!11, !11} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !31 = !DILocation(line: 10, column: 10, scope: !14) -// CHECK:STDOUT: !32 = !DILocation(line: 10, column: 3, scope: !14) -// CHECK:STDOUT: !33 = !{!15} -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 8, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !37) -// CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !34, type: !6) -// CHECK:STDOUT: !36 = !DILocation(line: 8, column: 30, scope: !34) -// CHECK:STDOUT: !37 = !{!35} -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !4, line: 8, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) -// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !11) -// CHECK:STDOUT: !40 = !DILocation(line: 8, column: 30, scope: !38) -// CHECK:STDOUT: !41 = !{!39} -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !4, line: 8, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !45) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !11) -// CHECK:STDOUT: !44 = !DILocation(line: 8, column: 30, scope: !42) -// CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Pair", linkageName: "_CPair.Main.2fad9574e050607e", scope: null, file: !4, line: 4, type: !22, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !6) -// CHECK:STDOUT: !49 = !DILocation(line: 4, column: 46, scope: !46) -// CHECK:STDOUT: !52 = !DILocation(line: 4, column: 39, scope: !46) -// CHECK:STDOUT: !53 = !{!47} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "IdFromGeneric", linkageName: "_CIdFromGeneric.Main.1ac5a6b0e5910c46", scope: null, file: !4, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !62) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !11) -// CHECK:STDOUT: !60 = !DILocation(line: 5, column: 52, scope: !54) -// CHECK:STDOUT: !61 = !DILocation(line: 5, column: 45, scope: !54) -// CHECK:STDOUT: !62 = !{!55} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "Id", linkageName: "_CId.Main.2fad9574e050607e", scope: null, file: !4, line: 3, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !6) -// CHECK:STDOUT: !67 = !DILocation(line: 3, column: 37, scope: !63) -// CHECK:STDOUT: !68 = !{!64} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "Id", linkageName: "_CId.Main.1ac5a6b0e5910c46", scope: null, file: !4, line: 3, type: !27, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !11) -// CHECK:STDOUT: !73 = !DILocation(line: 3, column: 37, scope: !69) -// CHECK:STDOUT: !74 = !{!70} +// CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !10 = !{null, !9} +// CHECK:STDOUT: !11 = !DISubroutineType(types: !10) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !4, line: 7, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) +// CHECK:STDOUT: !13 = !DILocalVariable(arg: 1, scope: !12, type: !6) +// CHECK:STDOUT: !18 = !DILocation(line: 8, column: 30, scope: !12) +// CHECK:STDOUT: !19 = !{!9, !6} +// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) +// CHECK:STDOUT: !23 = !DILocation(line: 9, column: 24, scope: !12) +// CHECK:STDOUT: !24 = !{!9, !9} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !29 = !DILocation(line: 10, column: 10, scope: !12) +// CHECK:STDOUT: !30 = !DILocation(line: 10, column: 3, scope: !12) +// CHECK:STDOUT: !31 = !{!13} +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.35f6012581c5aabb:core.SubobjectDestroy.Core", scope: null, file: !4, line: 8, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !37) +// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !9) +// CHECK:STDOUT: !34 = !DILocation(line: 8, column: 30, scope: !32) +// CHECK:STDOUT: !35 = !{null, !6} +// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) +// CHECK:STDOUT: !37 = !{!33} +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Pair", linkageName: "_CPair.Main.2fad9574e050607e", scope: null, file: !4, line: 4, type: !20, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !45) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !6) +// CHECK:STDOUT: !41 = !DILocation(line: 4, column: 46, scope: !38) +// CHECK:STDOUT: !44 = !DILocation(line: 4, column: 39, scope: !38) +// CHECK:STDOUT: !45 = !{!39} +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "IdFromGeneric", linkageName: "_CIdFromGeneric.Main.1ac5a6b0e5910c46", scope: null, file: !4, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !9) +// CHECK:STDOUT: !52 = !DILocation(line: 5, column: 52, scope: !46) +// CHECK:STDOUT: !53 = !DILocation(line: 5, column: 45, scope: !46) +// CHECK:STDOUT: !54 = !{!47} +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Id", linkageName: "_CId.Main.2fad9574e050607e", scope: null, file: !4, line: 3, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !60) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !6) +// CHECK:STDOUT: !59 = !DILocation(line: 3, column: 37, scope: !55) +// CHECK:STDOUT: !60 = !{!56} +// CHECK:STDOUT: !61 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ffbc82e0019b7bf2", scope: null, file: !61, line: 36, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !9) +// CHECK:STDOUT: !66 = !DILocation(line: 38, column: 5, scope: !62) +// CHECK:STDOUT: !67 = !DILocation(line: 36, column: 1, scope: !62) +// CHECK:STDOUT: !68 = !{!63} +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !61, line: 36, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !75) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !6) +// CHECK:STDOUT: !74 = !DILocation(line: 36, column: 1, scope: !69) +// CHECK:STDOUT: !75 = !{!70} +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "Id", linkageName: "_CId.Main.1ac5a6b0e5910c46", scope: null, file: !4, line: 3, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !81) +// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !9) +// CHECK:STDOUT: !80 = !DILocation(line: 3, column: 37, scope: !76) +// CHECK:STDOUT: !81 = !{!77} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'template.carbon' // CHECK:STDOUT: source_filename = "template.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CCallNegate.Main(i32 %a) #0 !dbg !77 { +// CHECK:STDOUT: define i32 @_CCallNegate.Main(i32 %a) #0 !dbg !84 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Negate.call = call i32 @_CNegate.Main.55456748a8a2eb70(i32 %a), !dbg !83 -// CHECK:STDOUT: ret i32 %Negate.call, !dbg !84 +// CHECK:STDOUT: %Negate.call = call i32 @_CNegate.Main.55456748a8a2eb70(i32 %a), !dbg !90 +// CHECK:STDOUT: ret i32 %Negate.call, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CNegate.Main.55456748a8a2eb70(i32 %a) #0 !dbg !86 { +// CHECK:STDOUT: define linkonce_odr i32 @_CNegate.Main.55456748a8a2eb70(i32 %a) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Int.as.Negate.impl.Op.call = sub i32 0, %a, !dbg !89 -// CHECK:STDOUT: ret i32 %Int.as.Negate.impl.Op.call, !dbg !91 +// CHECK:STDOUT: %Int.as.Negate.impl.Op.call = sub i32 0, %a, !dbg !96 +// CHECK:STDOUT: ret i32 %Int.as.Negate.impl.Op.call, !dbg !98 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!76} +// CHECK:STDOUT: !llvm.dbg.cu = !{!83} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -227,107 +228,107 @@ fn Use(ref n: i32) -> i32 { // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !{!6, !6} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !75 = !DIFile(filename: "template.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: "CallNegate", linkageName: "_CCallNegate.Main", scope: null, file: !75, line: 5, type: !8, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !85) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !6) -// CHECK:STDOUT: !83 = !DILocation(line: 5, column: 39, scope: !77) -// CHECK:STDOUT: !84 = !DILocation(line: 5, column: 32, scope: !77) -// CHECK:STDOUT: !85 = !{!78} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "Negate", linkageName: "_CNegate.Main.55456748a8a2eb70", scope: null, file: !75, line: 3, type: !8, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !92) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !6) -// CHECK:STDOUT: !89 = !DILocation(line: 3, column: 52, scope: !86) -// CHECK:STDOUT: !91 = !DILocation(line: 3, column: 45, scope: !86) -// CHECK:STDOUT: !92 = !{!87} +// CHECK:STDOUT: !82 = !DIFile(filename: "template.carbon", directory: "") +// CHECK:STDOUT: !83 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !82, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "CallNegate", linkageName: "_CCallNegate.Main", scope: null, file: !82, line: 5, type: !8, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !92) +// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !6) +// CHECK:STDOUT: !90 = !DILocation(line: 5, column: 39, scope: !84) +// CHECK:STDOUT: !91 = !DILocation(line: 5, column: 32, scope: !84) +// CHECK:STDOUT: !92 = !{!85} +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "Negate", linkageName: "_CNegate.Main.55456748a8a2eb70", scope: null, file: !82, line: 3, type: !8, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !99) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !6) +// CHECK:STDOUT: !96 = !DILocation(line: 3, column: 52, scope: !93) +// CHECK:STDOUT: !98 = !DILocation(line: 3, column: 45, scope: !93) +// CHECK:STDOUT: !99 = !{!94} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'lib.carbon' // CHECK:STDOUT: source_filename = "lib.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!94} +// CHECK:STDOUT: !llvm.dbg.cu = !{!101} // 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: !93 = !DIFile(filename: "lib.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: !100 = !DIFile(filename: "lib.carbon", directory: "") +// CHECK:STDOUT: !101 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !100, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_lib.carbon' // CHECK:STDOUT: source_filename = "use_lib.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CUse.Main(ptr sret({ i32, i32 }) %return, i32 %n) #0 !dbg !97 { +// CHECK:STDOUT: define void @_CUse.Main(ptr sret({ i32, i32 }) %return, i32 %n) #0 !dbg !104 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CPair.Main.2fad9574e050607e(ptr %return, i32 %n), !dbg !103 -// CHECK:STDOUT: ret void, !dbg !104 +// CHECK:STDOUT: call void @_CPair.Main.2fad9574e050607e(ptr %return, i32 %n), !dbg !110 +// CHECK:STDOUT: ret void, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CPair.Main.2fad9574e050607e(ptr sret({ i32, i32 }) %return, i32 %x) #0 !dbg !106 { -// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !109 -// CHECK:STDOUT: store i32 %x, ptr %tuple.elem, align 4, !dbg !109 -// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !109 -// CHECK:STDOUT: store i32 %x, ptr %tuple.elem1, align 4, !dbg !109 -// CHECK:STDOUT: ret void, !dbg !112 +// CHECK:STDOUT: define linkonce_odr void @_CPair.Main.2fad9574e050607e(ptr sret({ i32, i32 }) %return, i32 %x) #0 !dbg !113 { +// CHECK:STDOUT: %tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !116 +// CHECK:STDOUT: store i32 %x, ptr %tuple.elem, align 4, !dbg !116 +// CHECK:STDOUT: %tuple.elem1 = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !116 +// CHECK:STDOUT: store i32 %x, ptr %tuple.elem1, align 4, !dbg !116 +// CHECK:STDOUT: ret void, !dbg !119 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!96} +// CHECK:STDOUT: !llvm.dbg.cu = !{!103} // 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: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !21 = !{!11, !6} -// CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !93 = !DIFile(filename: "lib.carbon", directory: "") -// CHECK:STDOUT: !95 = !DIFile(filename: "use_lib.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: "Use", linkageName: "_CUse.Main", scope: null, file: !95, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !96, retainedNodes: !105) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !6) -// CHECK:STDOUT: !103 = !DILocation(line: 5, column: 39, scope: !97) -// CHECK:STDOUT: !104 = !DILocation(line: 5, column: 32, scope: !97) -// CHECK:STDOUT: !105 = !{!98} -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Pair", linkageName: "_CPair.Main.2fad9574e050607e", scope: null, file: !93, line: 3, type: !22, spFlags: DISPFlagDefinition, unit: !96, retainedNodes: !113) -// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !6) -// CHECK:STDOUT: !109 = !DILocation(line: 3, column: 46, scope: !106) -// CHECK:STDOUT: !112 = !DILocation(line: 3, column: 39, scope: !106) -// CHECK:STDOUT: !113 = !{!107} +// CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !19 = !{!9, !6} +// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) +// CHECK:STDOUT: !100 = !DIFile(filename: "lib.carbon", directory: "") +// CHECK:STDOUT: !102 = !DIFile(filename: "use_lib.carbon", directory: "") +// CHECK:STDOUT: !103 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !102, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !102, line: 5, type: !20, spFlags: DISPFlagDefinition, unit: !103, retainedNodes: !112) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !6) +// CHECK:STDOUT: !110 = !DILocation(line: 5, column: 39, scope: !104) +// CHECK:STDOUT: !111 = !DILocation(line: 5, column: 32, scope: !104) +// CHECK:STDOUT: !112 = !{!105} +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "Pair", linkageName: "_CPair.Main.2fad9574e050607e", scope: null, file: !100, line: 3, type: !20, spFlags: DISPFlagDefinition, unit: !103, retainedNodes: !120) +// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !6) +// CHECK:STDOUT: !116 = !DILocation(line: 3, column: 46, scope: !113) +// CHECK:STDOUT: !119 = !DILocation(line: 3, column: 39, scope: !113) +// CHECK:STDOUT: !120 = !{!114} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'form.carbon' // CHECK:STDOUT: source_filename = "form.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CUse.Main(ptr %n) #0 !dbg !116 { +// CHECK:STDOUT: define i32 @_CUse.Main(ptr %n) #0 !dbg !123 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %RefIdFromGeneric.call = call ptr @_CRefIdFromGeneric.Main.55456748a8a2eb70(ptr %n), !dbg !123 -// CHECK:STDOUT: %RefId.call = call ptr @_CRefId.Main.55456748a8a2eb70(ptr %n), !dbg !129 -// CHECK:STDOUT: %.loc10 = load i32, ptr %n, align 4, !dbg !133 -// CHECK:STDOUT: %ValId.call = call i32 @_CValId.Main.55456748a8a2eb70(i32 %.loc10), !dbg !134 -// CHECK:STDOUT: ret i32 %ValId.call, !dbg !135 +// CHECK:STDOUT: %RefIdFromGeneric.call = call ptr @_CRefIdFromGeneric.Main.55456748a8a2eb70(ptr %n), !dbg !130 +// CHECK:STDOUT: %RefId.call = call ptr @_CRefId.Main.55456748a8a2eb70(ptr %n), !dbg !136 +// CHECK:STDOUT: %.loc10 = load i32, ptr %n, align 4, !dbg !140 +// CHECK:STDOUT: %ValId.call = call i32 @_CValId.Main.55456748a8a2eb70(i32 %.loc10), !dbg !141 +// CHECK:STDOUT: ret i32 %ValId.call, !dbg !142 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CRefIdFromGeneric.Main.55456748a8a2eb70(ptr %x) #0 !dbg !137 { +// CHECK:STDOUT: define linkonce_odr ptr @_CRefIdFromGeneric.Main.55456748a8a2eb70(ptr %x) #0 !dbg !144 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %RefId.call = call ptr @_CRefId.Main.55456748a8a2eb70(ptr %x), !dbg !144 -// CHECK:STDOUT: ret ptr %RefId.call, !dbg !145 +// CHECK:STDOUT: %RefId.call = call ptr @_CRefId.Main.55456748a8a2eb70(ptr %x), !dbg !151 +// CHECK:STDOUT: ret ptr %RefId.call, !dbg !152 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CRefId.Main.55456748a8a2eb70(ptr %x) #0 !dbg !147 { +// CHECK:STDOUT: define linkonce_odr ptr @_CRefId.Main.55456748a8a2eb70(ptr %x) #0 !dbg !154 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %x, !dbg !151 +// CHECK:STDOUT: ret ptr %x, !dbg !158 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CValId.Main.55456748a8a2eb70(i32 %x) #0 !dbg !153 { +// CHECK:STDOUT: define linkonce_odr i32 @_CValId.Main.55456748a8a2eb70(i32 %x) #0 !dbg !160 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !157 +// CHECK:STDOUT: ret i32 %x, !dbg !164 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -335,7 +336,7 @@ fn Use(ref n: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!115} +// CHECK:STDOUT: !llvm.dbg.cu = !{!122} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -343,30 +344,30 @@ fn Use(ref n: i32) -> i32 { // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !{!6, !6} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !21 = !{!11, !6} -// CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !114 = !DIFile(filename: "form.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: !116 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !114, line: 7, type: !8, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !136) -// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !6) -// CHECK:STDOUT: !123 = !DILocation(line: 8, column: 25, scope: !116) -// CHECK:STDOUT: !129 = !DILocation(line: 9, column: 25, scope: !116) -// CHECK:STDOUT: !133 = !DILocation(line: 10, column: 16, scope: !116) -// CHECK:STDOUT: !134 = !DILocation(line: 10, column: 10, scope: !116) -// CHECK:STDOUT: !135 = !DILocation(line: 10, column: 3, scope: !116) -// CHECK:STDOUT: !136 = !{!117} -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "RefIdFromGeneric", linkageName: "_CRefIdFromGeneric.Main.55456748a8a2eb70", scope: null, file: !114, line: 5, type: !22, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !146) -// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !6) -// CHECK:STDOUT: !144 = !DILocation(line: 5, column: 58, scope: !137) -// CHECK:STDOUT: !145 = !DILocation(line: 5, column: 51, scope: !137) -// CHECK:STDOUT: !146 = !{!138} -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "RefId", linkageName: "_CRefId.Main.55456748a8a2eb70", scope: null, file: !114, line: 3, type: !22, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !152) -// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !6) -// CHECK:STDOUT: !151 = !DILocation(line: 3, column: 43, scope: !147) -// CHECK:STDOUT: !152 = !{!148} -// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "ValId", linkageName: "_CValId.Main.55456748a8a2eb70", scope: null, file: !114, line: 4, type: !8, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !158) -// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !6) -// CHECK:STDOUT: !157 = !DILocation(line: 4, column: 39, scope: !153) -// CHECK:STDOUT: !158 = !{!154} +// CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !19 = !{!9, !6} +// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) +// CHECK:STDOUT: !121 = !DIFile(filename: "form.carbon", directory: "") +// CHECK:STDOUT: !122 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !121, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "Use", linkageName: "_CUse.Main", scope: null, file: !121, line: 7, type: !8, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !143) +// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !6) +// CHECK:STDOUT: !130 = !DILocation(line: 8, column: 25, scope: !123) +// CHECK:STDOUT: !136 = !DILocation(line: 9, column: 25, scope: !123) +// CHECK:STDOUT: !140 = !DILocation(line: 10, column: 16, scope: !123) +// CHECK:STDOUT: !141 = !DILocation(line: 10, column: 10, scope: !123) +// CHECK:STDOUT: !142 = !DILocation(line: 10, column: 3, scope: !123) +// CHECK:STDOUT: !143 = !{!124} +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "RefIdFromGeneric", linkageName: "_CRefIdFromGeneric.Main.55456748a8a2eb70", scope: null, file: !121, line: 5, type: !20, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !153) +// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !6) +// CHECK:STDOUT: !151 = !DILocation(line: 5, column: 58, scope: !144) +// CHECK:STDOUT: !152 = !DILocation(line: 5, column: 51, scope: !144) +// CHECK:STDOUT: !153 = !{!145} +// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "RefId", linkageName: "_CRefId.Main.55456748a8a2eb70", scope: null, file: !121, line: 3, type: !20, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !159) +// CHECK:STDOUT: !155 = !DILocalVariable(arg: 1, scope: !154, type: !6) +// CHECK:STDOUT: !158 = !DILocation(line: 3, column: 43, scope: !154) +// CHECK:STDOUT: !159 = !{!155} +// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "ValId", linkageName: "_CValId.Main.55456748a8a2eb70", scope: null, file: !121, line: 4, type: !8, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !165) +// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !6) +// CHECK:STDOUT: !164 = !DILocation(line: 4, column: 39, scope: !160) +// CHECK:STDOUT: !165 = !{!161} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/import.carbon b/toolchain/lower/testdata/function/generic/import.carbon index 81d8bb5dbd66..abc358aa175c 100644 --- a/toolchain/lower/testdata/function/generic/import.carbon +++ b/toolchain/lower/testdata/function/generic/import.carbon @@ -138,43 +138,41 @@ fn Run() { // CHECK:STDOUT: source_filename = "use.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CCall.Main() #0 !dbg !38 { +// CHECK:STDOUT: define i32 @_CCall.Main() #0 !dbg !33 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !41 -// CHECK:STDOUT: %p.var = alloca ptr, align 8, !dbg !43 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !41 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !41 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %p.var), !dbg !43 -// CHECK:STDOUT: %DirectGeneric.call = call ptr @_CDirectGeneric.Main.55456748a8a2eb70(ptr %n.var), !dbg !46 -// CHECK:STDOUT: store ptr %DirectGeneric.call, ptr %p.var, align 8, !dbg !43 -// CHECK:STDOUT: %.loc9_11 = load ptr, ptr %p.var, align 8, !dbg !50 -// CHECK:STDOUT: %.loc9_10.2 = load i32, ptr %.loc9_11, align 4, !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %p.var), !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !41 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !36 +// CHECK:STDOUT: %p.var = alloca ptr, align 8, !dbg !38 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !36 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !36 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %p.var), !dbg !38 +// CHECK:STDOUT: %DirectGeneric.call = call ptr @_CDirectGeneric.Main.55456748a8a2eb70(ptr %n.var), !dbg !41 +// CHECK:STDOUT: store ptr %DirectGeneric.call, ptr %p.var, align 8, !dbg !38 +// CHECK:STDOUT: %.loc9_11 = load ptr, ptr %p.var, align 8, !dbg !46 +// CHECK:STDOUT: %.loc9_10.2 = load i32, ptr %.loc9_11, align 4, !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %p.var), !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !36 // CHECK:STDOUT: ret i32 %.loc9_10.2, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a17e1ddde5b22223: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.72395be3dbbe8946: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: 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.55456748a8a2eb70(ptr %y) #0 !dbg !61 { -// CHECK:STDOUT: call void @_CDirectDeclared.Main(), !dbg !66 -// CHECK:STDOUT: call void @_CDirectDefined.Main(), !dbg !67 -// CHECK:STDOUT: %1 = call ptr @_CIndirectGeneric.Main.55456748a8a2eb70(ptr %y), !dbg !69 -// CHECK:STDOUT: ret ptr %1, !dbg !70 +// CHECK:STDOUT: define linkonce_odr ptr @_CDirectGeneric.Main.55456748a8a2eb70(ptr %y) #0 !dbg !53 { +// CHECK:STDOUT: call void @_CDirectDeclared.Main(), !dbg !58 +// CHECK:STDOUT: call void @_CDirectDefined.Main(), !dbg !59 +// CHECK:STDOUT: %1 = call ptr @_CIndirectGeneric.Main.55456748a8a2eb70(ptr %y), !dbg !61 +// CHECK:STDOUT: ret ptr %1, !dbg !62 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !64 { +// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !71 { +// CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CDirectDeclared.Main() @@ -182,10 +180,10 @@ fn Run() { // CHECK:STDOUT: declare void @_CDirectDefined.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CIndirectGeneric.Main.55456748a8a2eb70(ptr %x) #0 !dbg !72 { -// CHECK:STDOUT: call void @_CIndirectDeclared.Main(), !dbg !77 -// CHECK:STDOUT: call void @_CIndirectDefined.Main(), !dbg !78 -// CHECK:STDOUT: ret ptr %x, !dbg !80 +// CHECK:STDOUT: define linkonce_odr ptr @_CIndirectGeneric.Main.55456748a8a2eb70(ptr %x) #0 !dbg !78 { +// CHECK:STDOUT: call void @_CIndirectDeclared.Main(), !dbg !83 +// CHECK:STDOUT: call void @_CIndirectDefined.Main(), !dbg !84 +// CHECK:STDOUT: ret ptr %x, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CIndirectDeclared.Main() @@ -203,6 +201,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "indirectly_imported.carbon", directory: "") // CHECK:STDOUT: !24 = !DIFile(filename: "directly_imported.carbon", directory: "") // CHECK:STDOUT: !28 = !DIFile(filename: "use.carbon", directory: "") @@ -210,175 +209,167 @@ fn Run() { // CHECK:STDOUT: !30 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !31 = !{!30} // CHECK:STDOUT: !32 = !DISubroutineType(types: !31) -// CHECK:STDOUT: !33 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !34 = !{null, !33} -// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) -// CHECK:STDOUT: !36 = !{null, !30} -// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !28, line: 6, type: !32, spFlags: DISPFlagDefinition, unit: !29) -// CHECK:STDOUT: !41 = !DILocation(line: 7, column: 3, scope: !38) -// CHECK:STDOUT: !43 = !DILocation(line: 8, column: 3, scope: !38) -// CHECK:STDOUT: !46 = !DILocation(line: 8, column: 17, scope: !38) -// CHECK:STDOUT: !47 = !{!33, !33} -// CHECK:STDOUT: !48 = !DISubroutineType(types: !47) -// CHECK:STDOUT: !50 = !DILocation(line: 9, column: 11, scope: !38) -// CHECK:STDOUT: !51 = !DILocation(line: 9, column: 10, scope: !38) -// CHECK:STDOUT: !52 = !DILocation(line: 9, column: 3, scope: !38) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !28, line: 8, type: !35, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !56) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !33) -// CHECK:STDOUT: !55 = !DILocation(line: 8, column: 3, scope: !53) -// CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !28, line: 7, type: !37, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !60) -// 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: "DirectGeneric", linkageName: "_CDirectGeneric.Main.55456748a8a2eb70", scope: null, file: !24, line: 10, type: !48, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !71) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !33) -// CHECK:STDOUT: !66 = !DILocation(line: 11, column: 3, scope: !61) -// CHECK:STDOUT: !67 = !DILocation(line: 12, column: 3, scope: !61) -// CHECK:STDOUT: !69 = !DILocation(line: 13, column: 10, scope: !61) -// CHECK:STDOUT: !70 = !DILocation(line: 13, column: 3, scope: !61) -// CHECK:STDOUT: !71 = !{!62} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "IndirectGeneric", linkageName: "_CIndirectGeneric.Main.55456748a8a2eb70", scope: null, file: !18, line: 8, type: !48, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !81) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !33) -// CHECK:STDOUT: !77 = !DILocation(line: 9, column: 3, scope: !72) -// CHECK:STDOUT: !78 = !DILocation(line: 10, column: 3, scope: !72) -// CHECK:STDOUT: !80 = !DILocation(line: 11, column: 3, scope: !72) -// CHECK:STDOUT: !81 = !{!73} +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !28, line: 6, type: !32, spFlags: DISPFlagDefinition, unit: !29) +// CHECK:STDOUT: !36 = !DILocation(line: 7, column: 3, scope: !33) +// CHECK:STDOUT: !38 = !DILocation(line: 8, column: 3, scope: !33) +// CHECK:STDOUT: !41 = !DILocation(line: 8, column: 17, scope: !33) +// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !43 = !{!42, !42} +// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) +// CHECK:STDOUT: !46 = !DILocation(line: 9, column: 11, scope: !33) +// CHECK:STDOUT: !47 = !DILocation(line: 9, column: 10, scope: !33) +// CHECK:STDOUT: !48 = !{null, !42} +// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) +// CHECK:STDOUT: !50 = !{null, !30} +// CHECK:STDOUT: !51 = !DISubroutineType(types: !50) +// CHECK:STDOUT: !52 = !DILocation(line: 9, column: 3, scope: !33) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "DirectGeneric", linkageName: "_CDirectGeneric.Main.55456748a8a2eb70", scope: null, file: !24, line: 10, type: !44, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !63) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !42) +// CHECK:STDOUT: !58 = !DILocation(line: 11, column: 3, scope: !53) +// CHECK:STDOUT: !59 = !DILocation(line: 12, column: 3, scope: !53) +// CHECK:STDOUT: !61 = !DILocation(line: 13, column: 10, scope: !53) +// CHECK:STDOUT: !62 = !DILocation(line: 13, column: 3, scope: !53) +// CHECK:STDOUT: !63 = !{!54} +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !10, line: 32, type: !49, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !70) +// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !42) +// CHECK:STDOUT: !69 = !DILocation(line: 32, column: 1, scope: !64) +// CHECK:STDOUT: !70 = !{!65} +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !51, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !77) +// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !30) +// CHECK:STDOUT: !76 = !DILocation(line: 32, column: 1, scope: !71) +// CHECK:STDOUT: !77 = !{!72} +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "IndirectGeneric", linkageName: "_CIndirectGeneric.Main.55456748a8a2eb70", scope: null, file: !18, line: 8, type: !44, spFlags: DISPFlagDefinition, unit: !29, retainedNodes: !87) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !42) +// CHECK:STDOUT: !83 = !DILocation(line: 9, column: 3, scope: !78) +// CHECK:STDOUT: !84 = !DILocation(line: 10, column: 3, scope: !78) +// CHECK:STDOUT: !86 = !DILocation(line: 11, column: 3, scope: !78) +// CHECK:STDOUT: !87 = !{!79} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'return_var.carbon' // CHECK:STDOUT: source_filename = "return_var.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!83} +// CHECK:STDOUT: !llvm.dbg.cu = !{!89} // 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: !82 = !DIFile(filename: "return_var.carbon", directory: "") -// CHECK:STDOUT: !83 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !82, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !88 = !DIFile(filename: "return_var.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: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_return_var.carbon' // CHECK:STDOUT: source_filename = "use_return_var.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !86 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !92 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_10.2.temp = alloca { i32, ptr }, align 8, !dbg !87 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_10.2.temp), !dbg !87 -// CHECK:STDOUT: call void @_CMake.Main.e43630e9a6c38c3f(ptr %.loc7_10.2.temp), !dbg !87 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %.loc7_10.2.temp), !dbg !87 -// CHECK:STDOUT: ret i32 0, !dbg !90 +// CHECK:STDOUT: %.loc7_10.2.temp = alloca { i32, ptr }, align 8, !dbg !93 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_10.2.temp), !dbg !93 +// CHECK:STDOUT: call void @_CMake.Main.e43630e9a6c38c3f(ptr %.loc7_10.2.temp), !dbg !93 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %.loc7_10.2.temp), !dbg !93 +// CHECK:STDOUT: ret i32 0, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_COp.edcc2ca63b38395b:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !97 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: %.loc7_10.1.next = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !99 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bc2719126434d85a(ptr %.loc7_10.1.next), !dbg !99 +// CHECK:STDOUT: %.loc7_10.4.data = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !99 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_10.4.data), !dbg !99 +// CHECK:STDOUT: ret void, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !101 { // 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.edcc2ca63b38395b:core.Destroy.Core"(ptr %self) #0 !dbg !99 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_10.1.next = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !101 -// CHECK:STDOUT: call void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %.loc7_10.1.next), !dbg !101 -// CHECK:STDOUT: %.loc7_10.2.data = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !101 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7_10.2.data), !dbg !101 -// CHECK:STDOUT: ret void, !dbg !101 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.edcc2ca63b38395b:core.Destroy.Core"(ptr %self) #0 !dbg !103 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.edcc2ca63b38395b: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.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !107 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_10.1.next = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !109 -// CHECK:STDOUT: call void @"_CSelfDestruct.6b633cf020343e69:core.Destroy.Core"(ptr %.loc7_10.1.next), !dbg !109 -// CHECK:STDOUT: %.loc7_10.2.data = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !109 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7_10.2.data), !dbg !109 -// CHECK:STDOUT: ret void, !dbg !109 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !111 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !113 -// CHECK:STDOUT: ret void, !dbg !113 +// CHECK:STDOUT: %.loc7_10.1.next = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 1, !dbg !103 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bc2719126434d85a(ptr %.loc7_10.1.next), !dbg !103 +// CHECK:STDOUT: %.loc7_10.4.data = getelementptr inbounds nuw { i32, ptr }, ptr %self, i32 0, i32 0, !dbg !103 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_10.4.data), !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: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CMake.Main.e43630e9a6c38c3f(ptr sret({ i32, ptr }) %return) #0 !dbg !115 { -// CHECK:STDOUT: %data = getelementptr inbounds nuw { i32, ptr }, ptr %return, i32 0, i32 0, !dbg !124 -// CHECK:STDOUT: %next = getelementptr inbounds nuw { i32, ptr }, ptr %return, i32 0, i32 1, !dbg !124 -// CHECK:STDOUT: store ptr %return, ptr %next, align 8, !dbg !124 -// CHECK:STDOUT: store i32 42, ptr %data, align 4, !dbg !124 -// CHECK:STDOUT: ret void, !dbg !125 +// CHECK:STDOUT: define linkonce_odr void @_CMake.Main.e43630e9a6c38c3f(ptr sret({ i32, ptr }) %return) #0 !dbg !105 { +// CHECK:STDOUT: %data = getelementptr inbounds nuw { i32, ptr }, ptr %return, i32 0, i32 0, !dbg !114 +// CHECK:STDOUT: %next = getelementptr inbounds nuw { i32, ptr }, ptr %return, i32 0, i32 1, !dbg !114 +// CHECK:STDOUT: store ptr %return, ptr %next, align 8, !dbg !114 +// CHECK:STDOUT: store i32 42, ptr %data, align 4, !dbg !114 +// CHECK:STDOUT: ret void, !dbg !115 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !116 { +// CHECK:STDOUT: call void @"_COp.08d9e38b928ba575:core.SubobjectDestroy.Core"(ptr %t), !dbg !120 +// CHECK:STDOUT: ret void, !dbg !121 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.bc2719126434d85a(ptr %t) #0 !dbg !123 { +// CHECK:STDOUT: ret void, !dbg !128 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !130 { +// CHECK:STDOUT: ret void, !dbg !135 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.bc2719126434d85a, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// 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 = !{!85} +// CHECK:STDOUT: !llvm.dbg.cu = !{!91} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !30 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !31 = !{!30} // CHECK:STDOUT: !32 = !DISubroutineType(types: !31) -// CHECK:STDOUT: !33 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !34 = !{null, !33} -// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) -// CHECK:STDOUT: !36 = !{null, !30} -// CHECK:STDOUT: !37 = !DISubroutineType(types: !36) -// CHECK:STDOUT: !82 = !DIFile(filename: "return_var.carbon", directory: "") -// CHECK:STDOUT: !84 = !DIFile(filename: "use_return_var.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: 6, type: !32, spFlags: DISPFlagDefinition, unit: !85) -// CHECK:STDOUT: !87 = !DILocation(line: 7, column: 3, scope: !86) -// CHECK:STDOUT: !88 = !{!33} -// CHECK:STDOUT: !89 = !DISubroutineType(types: !88) -// CHECK:STDOUT: !90 = !DILocation(line: 6, column: 1, scope: !86) -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !84, line: 7, type: !37, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !94) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !30) -// CHECK:STDOUT: !93 = !DILocation(line: 7, column: 3, scope: !91) -// CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6b633cf020343e69:core.Destroy.Core", scope: null, file: !84, line: 7, type: !35, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !98) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !33) -// CHECK:STDOUT: !97 = !DILocation(line: 7, column: 3, scope: !95) -// CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.edcc2ca63b38395b:core.Destroy.Core", scope: null, file: !84, line: 7, type: !35, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !102) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !33) -// CHECK:STDOUT: !101 = !DILocation(line: 7, column: 3, scope: !99) -// CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.edcc2ca63b38395b:core.Destroy.Core", scope: null, file: !84, line: 7, type: !35, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !106) -// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !33) -// CHECK:STDOUT: !105 = !DILocation(line: 7, column: 3, scope: !103) -// CHECK:STDOUT: !106 = !{!104} -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !84, line: 7, type: !35, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !110) -// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !33) -// CHECK:STDOUT: !109 = !DILocation(line: 7, column: 3, scope: !107) -// CHECK:STDOUT: !110 = !{!108} -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !84, line: 7, type: !35, spFlags: DISPFlagDefinition, unit: !85, retainedNodes: !114) -// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !33) -// CHECK:STDOUT: !113 = !DILocation(line: 7, column: 3, scope: !111) -// CHECK:STDOUT: !114 = !{!112} -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.e43630e9a6c38c3f", scope: null, file: !82, line: 9, type: !89, spFlags: DISPFlagDefinition, unit: !85) -// CHECK:STDOUT: !124 = !DILocation(line: 11, column: 7, scope: !115) -// CHECK:STDOUT: !125 = !DILocation(line: 12, column: 3, scope: !115) +// CHECK:STDOUT: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !48 = !{null, !42} +// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) +// CHECK:STDOUT: !50 = !{null, !30} +// CHECK:STDOUT: !51 = !DISubroutineType(types: !50) +// CHECK:STDOUT: !88 = !DIFile(filename: "return_var.carbon", directory: "") +// CHECK:STDOUT: !90 = !DIFile(filename: "use_return_var.carbon", directory: "") +// CHECK:STDOUT: !91 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !90, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !90, line: 6, type: !32, spFlags: DISPFlagDefinition, unit: !91) +// CHECK:STDOUT: !93 = !DILocation(line: 7, column: 3, scope: !92) +// CHECK:STDOUT: !94 = !{!42} +// CHECK:STDOUT: !95 = !DISubroutineType(types: !94) +// CHECK:STDOUT: !96 = !DILocation(line: 6, column: 1, scope: !92) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "Op", linkageName: "_COp.edcc2ca63b38395b:core.SubobjectDestroy.Core", scope: null, file: !90, line: 7, type: !49, spFlags: DISPFlagDefinition, unit: !91, retainedNodes: !100) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !42) +// CHECK:STDOUT: !99 = !DILocation(line: 7, column: 3, scope: !97) +// CHECK:STDOUT: !100 = !{!98} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "Op", linkageName: "_COp.08d9e38b928ba575:core.SubobjectDestroy.Core", scope: null, file: !90, line: 7, type: !49, spFlags: DISPFlagDefinition, unit: !91, retainedNodes: !104) +// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !42) +// CHECK:STDOUT: !103 = !DILocation(line: 7, column: 3, scope: !101) +// CHECK:STDOUT: !104 = !{!102} +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Main.e43630e9a6c38c3f", scope: null, file: !88, line: 9, type: !95, spFlags: DISPFlagDefinition, unit: !91) +// CHECK:STDOUT: !114 = !DILocation(line: 11, column: 7, scope: !105) +// CHECK:STDOUT: !115 = !DILocation(line: 12, column: 3, scope: !105) +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !10, line: 32, type: !49, spFlags: DISPFlagDefinition, unit: !91, retainedNodes: !122) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !42) +// CHECK:STDOUT: !120 = !DILocation(line: 34, column: 5, scope: !116) +// CHECK:STDOUT: !121 = !DILocation(line: 32, column: 1, scope: !116) +// CHECK:STDOUT: !122 = !{!117} +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.bc2719126434d85a", scope: null, file: !10, line: 32, type: !49, spFlags: DISPFlagDefinition, unit: !91, retainedNodes: !129) +// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !42) +// CHECK:STDOUT: !128 = !DILocation(line: 32, column: 1, scope: !123) +// CHECK:STDOUT: !129 = !{!124} +// CHECK:STDOUT: !130 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !51, spFlags: DISPFlagDefinition, unit: !91, retainedNodes: !136) +// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !30) +// CHECK:STDOUT: !135 = !DILocation(line: 32, column: 1, scope: !130) +// CHECK:STDOUT: !136 = !{!131} // 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 fbb1e2ed56c9..3e505013a0ec 100644 --- a/toolchain/lower/testdata/function/generic/import_core_witness.carbon +++ b/toolchain/lower/testdata/function/generic/import_core_witness.carbon @@ -32,14 +32,6 @@ fn Run() { // CHECK:STDOUT: ; ModuleID = 'lib.carbon' // CHECK:STDOUT: source_filename = "lib.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !9 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !11 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: attributes #0 = { nounwind } -// CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!5} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: @@ -47,59 +39,62 @@ fn Run() { // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !4 = !DIFile(filename: "lib.carbon", directory: "") // CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !4, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !7 = !{null, !6} -// CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 7, type: !8, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !12) -// 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: // 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 !17 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !11 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.9de8c8f78d58a600(), !dbg !18 -// CHECK:STDOUT: ret i32 0, !dbg !21 +// CHECK:STDOUT: call void @_CF.Main.9de8c8f78d58a600(), !dbg !12 +// CHECK:STDOUT: ret i32 0, !dbg !15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9de8c8f78d58a600() #0 !dbg !22 { -// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !23 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !23 -// CHECK:STDOUT: store i32 0, ptr %1, align 4, !dbg !23 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %1), !dbg !23 -// CHECK:STDOUT: ret void, !dbg !25 +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9de8c8f78d58a600() #0 !dbg !16 { +// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !17 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !17 +// CHECK:STDOUT: store i32 0, ptr %1, align 4, !dbg !17 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %1), !dbg !17 +// CHECK:STDOUT: ret void, !dbg !21 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr) -// 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !23 { +// CHECK:STDOUT: ret void, !dbg !28 +// 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 = !{!14} +// CHECK:STDOUT: !llvm.dbg.cu = !{!8} // 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: !13 = !DIFile(filename: "main.carbon", directory: "") -// CHECK:STDOUT: !14 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !13, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !15 = !{!6} -// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !13, line: 4, type: !16, spFlags: DISPFlagDefinition, unit: !14) -// CHECK:STDOUT: !18 = !DILocation(line: 5, column: 3, scope: !17) -// CHECK:STDOUT: !19 = !{null} +// CHECK:STDOUT: !7 = !DIFile(filename: "main.carbon", directory: "") +// CHECK:STDOUT: !8 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !7, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !9 = !{!6} +// CHECK:STDOUT: !10 = !DISubroutineType(types: !9) +// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !7, line: 4, type: !10, spFlags: DISPFlagDefinition, unit: !8) +// CHECK:STDOUT: !12 = !DILocation(line: 5, column: 3, scope: !11) +// CHECK:STDOUT: !13 = !{null} +// CHECK:STDOUT: !14 = !DISubroutineType(types: !13) +// CHECK:STDOUT: !15 = !DILocation(line: 4, column: 1, scope: !11) +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9de8c8f78d58a600", scope: null, file: !4, line: 4, type: !14, spFlags: DISPFlagDefinition, unit: !8) +// CHECK:STDOUT: !17 = !DILocation(line: 7, column: 3, scope: !16) +// CHECK:STDOUT: !19 = !{null, !6} // CHECK:STDOUT: !20 = !DISubroutineType(types: !19) -// CHECK:STDOUT: !21 = !DILocation(line: 4, column: 1, scope: !17) -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9de8c8f78d58a600", scope: null, file: !4, line: 4, type: !20, spFlags: DISPFlagDefinition, unit: !14) -// CHECK:STDOUT: !23 = !DILocation(line: 7, column: 3, scope: !22) -// CHECK:STDOUT: !25 = !DILocation(line: 4, column: 1, scope: !22) +// CHECK:STDOUT: !21 = !DILocation(line: 4, column: 1, scope: !16) +// CHECK:STDOUT: !22 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !22, line: 36, type: !20, spFlags: DISPFlagDefinition, unit: !8, retainedNodes: !29) +// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !23, type: !6) +// CHECK:STDOUT: !28 = !DILocation(line: 36, column: 1, scope: !23) +// CHECK:STDOUT: !29 = !{!24} // 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 14e27662557e..6e2c09ad9d04 100644 --- a/toolchain/lower/testdata/function/generic/import_unused_def.carbon +++ b/toolchain/lower/testdata/function/generic/import_unused_def.carbon @@ -45,21 +45,9 @@ fn Main() { // CHECK:STDOUT: source_filename = "a.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_COp.Foo.Main:Copy.Core"(i32 %self) #0 !dbg !25 { +// CHECK:STDOUT: define i32 @"_COp.Foo.Main:Copy.Core"(i32 %self) #0 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %self, !dbg !32 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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.ed1ef26650163b11:core.Destroy.Core"(ptr %self) #0 !dbg !38 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: ret i32 %self, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } @@ -74,81 +62,79 @@ fn Main() { // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20, !20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Foo.Main:Copy.Core", scope: null, file: !18, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !33) -// CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !20) -// CHECK:STDOUT: !32 = !DILocation(line: 13, column: 5, scope: !25) -// CHECK:STDOUT: !33 = !{!26} -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 18, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !37) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.ed1ef26650163b11: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: !23 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Foo.Main:Copy.Core", scope: null, file: !18, line: 12, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !31) +// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !23, type: !20) +// CHECK:STDOUT: !30 = !DILocation(line: 13, column: 5, scope: !23) +// CHECK:STDOUT: !31 = !{!24} // 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 !46 { +// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !36 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %GenericF.call = call i32 @_CGenericF.Main.084a2801e0f5d754({} zeroinitializer), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: %GenericF.call = call i32 @_CGenericF.Main.084a2801e0f5d754({} zeroinitializer), !dbg !37 +// CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGenericF.Main.084a2801e0f5d754({} %x) #0 !dbg !52 { -// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !57 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !57 -// CHECK:STDOUT: %2 = call i32 @"_COp.Foo.Main:Copy.Core"(i32 0), !dbg !58 -// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !57 -// CHECK:STDOUT: %3 = load i32, ptr %1, align 4, !dbg !60 -// CHECK:STDOUT: %4 = call i32 @"_COp.Foo.Main:Copy.Core"(i32 %3), !dbg !60 -// CHECK:STDOUT: call void @"_CSelfDestruct.ed1ef26650163b11:core.Destroy.Core"(ptr %1), !dbg !57 -// CHECK:STDOUT: ret i32 %4, !dbg !61 +// CHECK:STDOUT: define linkonce_odr i32 @_CGenericF.Main.084a2801e0f5d754({} %x) #0 !dbg !42 { +// CHECK:STDOUT: %1 = alloca i32, align 4, !dbg !47 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !47 +// CHECK:STDOUT: %2 = call i32 @"_COp.Foo.Main:Copy.Core"(i32 0), !dbg !48 +// CHECK:STDOUT: store i32 %2, ptr %1, align 4, !dbg !47 +// CHECK:STDOUT: %3 = load i32, ptr %1, align 4, !dbg !50 +// CHECK:STDOUT: %4 = call i32 @"_COp.Foo.Main:Copy.Core"(i32 %3), !dbg !50 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6339be073e904d6a(ptr %1), !dbg !47 +// CHECK:STDOUT: ret i32 %4, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare i32 @"_COp.Foo.Main:Copy.Core"(i32) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSelfDestruct.72395be3dbbe8946: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) // 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 @_CSelfDestruct.Core.6339be073e904d6a(ptr %t) #0 !dbg !55 { +// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @"_COp.Foo.Main:Copy.Core", { 1, 0 } // 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 = !{!43} +// CHECK:STDOUT: !llvm.dbg.cu = !{!33} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "a.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !42 = !DIFile(filename: "b.carbon", directory: "") -// CHECK:STDOUT: !43 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !42, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !44 = !{null} -// CHECK:STDOUT: !45 = !DISubroutineType(types: !44) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !42, line: 4, type: !45, spFlags: DISPFlagDefinition, unit: !43) -// CHECK:STDOUT: !47 = !DILocation(line: 5, column: 3, scope: !46) -// CHECK:STDOUT: !48 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !49 = !{!20, !48} -// CHECK:STDOUT: !50 = !DISubroutineType(types: !49) -// CHECK:STDOUT: !51 = !DILocation(line: 4, column: 1, scope: !46) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "GenericF", linkageName: "_CGenericF.Main.084a2801e0f5d754", scope: null, file: !18, line: 17, type: !50, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !62) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !48) -// CHECK:STDOUT: !57 = !DILocation(line: 18, column: 3, scope: !52) -// CHECK:STDOUT: !58 = !DILocation(line: 18, column: 16, scope: !52) -// CHECK:STDOUT: !60 = !DILocation(line: 19, column: 10, scope: !52) -// CHECK:STDOUT: !61 = !DILocation(line: 19, column: 3, scope: !52) -// CHECK:STDOUT: !62 = !{!53} +// CHECK:STDOUT: !32 = !DIFile(filename: "b.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 = !{null} +// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !32, line: 4, type: !35, spFlags: DISPFlagDefinition, unit: !33) +// CHECK:STDOUT: !37 = !DILocation(line: 5, column: 3, scope: !36) +// CHECK:STDOUT: !38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !39 = !{!20, !38} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !DILocation(line: 4, column: 1, scope: !36) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "GenericF", linkageName: "_CGenericF.Main.084a2801e0f5d754", scope: null, file: !18, line: 17, type: !40, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !54) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !38) +// CHECK:STDOUT: !47 = !DILocation(line: 18, column: 3, scope: !42) +// CHECK:STDOUT: !48 = !DILocation(line: 18, column: 16, scope: !42) +// CHECK:STDOUT: !50 = !DILocation(line: 19, column: 10, scope: !42) +// CHECK:STDOUT: !51 = !{null, !20} +// CHECK:STDOUT: !52 = !DISubroutineType(types: !51) +// CHECK:STDOUT: !53 = !DILocation(line: 19, column: 3, scope: !42) +// CHECK:STDOUT: !54 = !{!43} +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6339be073e904d6a", scope: null, file: !10, line: 32, type: !52, spFlags: DISPFlagDefinition, unit: !33, retainedNodes: !61) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !20) +// CHECK:STDOUT: !60 = !DILocation(line: 32, column: 1, scope: !55) +// CHECK:STDOUT: !61 = !{!56} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/reverse_canonical.carbon b/toolchain/lower/testdata/function/generic/reverse_canonical.carbon index 8a5a6f2ea601..028d21c4d3f1 100644 --- a/toolchain/lower/testdata/function/generic/reverse_canonical.carbon +++ b/toolchain/lower/testdata/function/generic/reverse_canonical.carbon @@ -3,6 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/bool.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/default.carbon // // AUTOUPDATE // TIP: To test this file alone, run: @@ -10,6 +11,16 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/function/generic/reverse_canonical.carbon +// --- core.carbon + +package Core library "[[@TEST_NAME]]"; + +export import library "prelude/parts/default"; + +// --- reverse_canonical.carbon + +import Core library "core"; + class C1 {} fn first[T: type, U: type, V: type](arg1: T, arg2: U, arg3: V); @@ -47,66 +58,64 @@ fn Main() { first(x, x, y); } +// CHECK:STDOUT: ; --- +// CHECK:STDOUT: ; ModuleID = 'core.carbon' +// CHECK:STDOUT: source_filename = "core.carbon" +// CHECK:STDOUT: +// CHECK:STDOUT: !llvm.dbg.cu = !{!17} +// 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: !16 = !DIFile(filename: "core.carbon", directory: "") +// CHECK:STDOUT: !17 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !16, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'reverse_canonical.carbon' // CHECK:STDOUT: source_filename = "reverse_canonical.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cc2eb235f3a2109b:core.Destroy.Core"(ptr %self) #0 !dbg !23 { +// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !22 { // 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.146e3bb0985f5a0c:core.Destroy.Core"(ptr %self) #0 !dbg !27 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !29 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMain.Main() #0 !dbg !31 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca i1, align 1, !dbg !32 -// CHECK:STDOUT: %y.var = alloca ptr, align 8, !dbg !34 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !32 -// CHECK:STDOUT: store i8 poison, ptr %x.var, align 1, !dbg !32 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !34 -// CHECK:STDOUT: store ptr poison, ptr %y.var, align 8, !dbg !34 -// CHECK:STDOUT: %.loc47_9 = load i8, ptr %x.var, align 1, !dbg !36 -// CHECK:STDOUT: %.loc47_91 = trunc i8 %.loc47_9 to i1, !dbg !36 -// CHECK:STDOUT: %.loc47_12 = load i8, ptr %x.var, align 1, !dbg !37 -// CHECK:STDOUT: %.loc47_122 = trunc i8 %.loc47_12 to i1, !dbg !37 -// CHECK:STDOUT: %.loc47_15 = load ptr, ptr %y.var, align 8, !dbg !38 -// CHECK:STDOUT: call void @_Cfirst.Main.36f5e0b0ce09cb9a(i1 %.loc47_91, i1 %.loc47_122, ptr %.loc47_15), !dbg !39 -// CHECK:STDOUT: call void @"_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core"(ptr %y.var), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %x.var), !dbg !32 -// CHECK:STDOUT: ret void, !dbg !42 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb2383e5e4785e19: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.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !47 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: %x.var = alloca i1, align 1, !dbg !23 +// CHECK:STDOUT: %y.var = alloca ptr, align 8, !dbg !25 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !23 +// CHECK:STDOUT: store i8 poison, ptr %x.var, align 1, !dbg !23 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !25 +// CHECK:STDOUT: store ptr poison, ptr %y.var, align 8, !dbg !25 +// CHECK:STDOUT: %.loc38_9 = load i8, ptr %x.var, align 1, !dbg !27 +// CHECK:STDOUT: %.loc38_91 = trunc i8 %.loc38_9 to i1, !dbg !27 +// CHECK:STDOUT: %.loc38_12 = load i8, ptr %x.var, align 1, !dbg !28 +// CHECK:STDOUT: %.loc38_122 = trunc i8 %.loc38_12 to i1, !dbg !28 +// CHECK:STDOUT: %.loc38_15 = load ptr, ptr %y.var, align 8, !dbg !29 +// CHECK:STDOUT: call void @_Cfirst.Main.36f5e0b0ce09cb9a(i1 %.loc38_91, i1 %.loc38_122, ptr %.loc38_15), !dbg !30 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.393ac80c0c8a44df(ptr %y.var), !dbg !25 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %x.var), !dbg !23 +// 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: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_Cfirst.Main.36f5e0b0ce09cb9a(i1 %arg1, i1 %arg2, ptr %arg3) #0 !dbg !51 { +// CHECK:STDOUT: define linkonce_odr void @_Cfirst.Main.36f5e0b0ce09cb9a(i1 %arg1, i1 %arg2, ptr %arg3) #0 !dbg !37 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !58 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !58 -// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !58 -// CHECK:STDOUT: %.loc23 = load ptr, ptr %local_name.var, align 8, !dbg !62 -// CHECK:STDOUT: call void @_Csecond.Main.0f29a29bf45af723(i1 %arg2, i1 %arg2, ptr %.loc23), !dbg !63 -// CHECK:STDOUT: call void @"_CSelfDestruct.cc2eb235f3a2109b:core.Destroy.Core"(ptr %local_name.var), !dbg !58 +// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !44 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !44 +// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !44 +// CHECK:STDOUT: %.loc14 = load ptr, ptr %local_name.var, align 8, !dbg !48 +// CHECK:STDOUT: call void @_Csecond.Main.0f29a29bf45af723(i1 %arg2, i1 %arg2, ptr %.loc14), !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a297d85f341e5034(ptr %local_name.var), !dbg !44 +// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.393ac80c0c8a44df(ptr %t) #0 !dbg !52 { +// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %t) #0 !dbg !59 { // CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -117,214 +126,226 @@ fn Main() { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !73 // CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !73 // CHECK:STDOUT: call void @_Cfirst.Main.81f1c9de445b895c(ptr %arg3, ptr %arg3, i1 %arg1), !dbg !78 -// CHECK:STDOUT: %.loc30 = load ptr, ptr %local_name.var, align 8, !dbg !81 -// CHECK:STDOUT: call void @_Cthird.Main.0f29a29bf45af723(i1 %arg2, i1 %arg2, ptr %.loc30), !dbg !82 -// CHECK:STDOUT: call void @"_CSelfDestruct.cc2eb235f3a2109b:core.Destroy.Core"(ptr %local_name.var), !dbg !73 +// CHECK:STDOUT: %.loc21 = load ptr, ptr %local_name.var, align 8, !dbg !81 +// CHECK:STDOUT: call void @_Cthird.Main.0f29a29bf45af723(i1 %arg2, i1 %arg2, ptr %.loc21), !dbg !82 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a297d85f341e5034(ptr %local_name.var), !dbg !73 // CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_Cfirst.Main.81f1c9de445b895c(ptr %arg1, ptr %arg2, i1 %arg3) #0 !dbg !85 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !92 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !92 -// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !92 -// CHECK:STDOUT: %.loc23 = load ptr, ptr %local_name.var, align 8, !dbg !96 -// CHECK:STDOUT: call void @_Csecond.Main.e1ce67f3c23ab61f(ptr %arg2, ptr %arg2, ptr %.loc23), !dbg !97 -// CHECK:STDOUT: call void @"_CSelfDestruct.cc2eb235f3a2109b:core.Destroy.Core"(ptr %local_name.var), !dbg !92 -// CHECK:STDOUT: ret void, !dbg !98 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.a297d85f341e5034(ptr %t) #0 !dbg !85 { +// CHECK:STDOUT: ret void, !dbg !90 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_Cthird.Main.0f29a29bf45af723(i1 %arg1, i1 %arg2, ptr %arg3) #0 !dbg !100 { +// CHECK:STDOUT: define linkonce_odr void @_Cfirst.Main.81f1c9de445b895c(ptr %arg1, ptr %arg2, i1 %arg3) #0 !dbg !92 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !107 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !107 -// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !107 -// CHECK:STDOUT: %.loc36_10 = load ptr, ptr %local_name.var, align 8, !dbg !109 -// CHECK:STDOUT: %.loc36_22 = load ptr, ptr %local_name.var, align 8, !dbg !110 -// CHECK:STDOUT: call void @_Cfourth.Main.c6787c0e2572c86c(ptr %.loc36_10, ptr %.loc36_22, i1 %arg1), !dbg !112 -// CHECK:STDOUT: call void @_Cfourth.Main.c6787c0e2572c86c(ptr %arg3, ptr %arg3, i1 %arg2), !dbg !116 -// CHECK:STDOUT: call void @"_CSelfDestruct.146e3bb0985f5a0c:core.Destroy.Core"(ptr %local_name.var), !dbg !107 -// CHECK:STDOUT: ret void, !dbg !117 +// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !99 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !99 +// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !99 +// CHECK:STDOUT: %.loc14 = load ptr, ptr %local_name.var, align 8, !dbg !103 +// CHECK:STDOUT: call void @_Csecond.Main.e1ce67f3c23ab61f(ptr %arg2, ptr %arg2, ptr %.loc14), !dbg !104 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a297d85f341e5034(ptr %local_name.var), !dbg !99 +// CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_Csecond.Main.e1ce67f3c23ab61f(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !119 { +// CHECK:STDOUT: define linkonce_odr void @_Cthird.Main.0f29a29bf45af723(i1 %arg1, i1 %arg2, ptr %arg3) #0 !dbg !107 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !126 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !126 -// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !126 -// CHECK:STDOUT: call void @_Cfirst.Main.e1ce67f3c23ab61f(ptr %arg3, ptr %arg3, ptr %arg1), !dbg !131 -// CHECK:STDOUT: %.loc30 = load ptr, ptr %local_name.var, align 8, !dbg !134 -// CHECK:STDOUT: call void @_Cthird.Main.e1ce67f3c23ab61f(ptr %arg2, ptr %arg2, ptr %.loc30), !dbg !135 -// CHECK:STDOUT: call void @"_CSelfDestruct.cc2eb235f3a2109b:core.Destroy.Core"(ptr %local_name.var), !dbg !126 -// CHECK:STDOUT: ret void, !dbg !136 +// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !114 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !114 +// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !114 +// CHECK:STDOUT: %.loc27_10 = load ptr, ptr %local_name.var, align 8, !dbg !116 +// CHECK:STDOUT: %.loc27_22 = load ptr, ptr %local_name.var, align 8, !dbg !117 +// CHECK:STDOUT: call void @_Cfourth.Main.c6787c0e2572c86c(ptr %.loc27_10, ptr %.loc27_22, i1 %arg1), !dbg !119 +// CHECK:STDOUT: call void @_Cfourth.Main.c6787c0e2572c86c(ptr %arg3, ptr %arg3, i1 %arg2), !dbg !123 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.3490326134093774(ptr %local_name.var), !dbg !114 +// CHECK:STDOUT: ret void, !dbg !124 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_Cfourth.Main.c6787c0e2572c86c(ptr %arg1, ptr %arg2, i1 %arg3) #0 !dbg !138 { +// CHECK:STDOUT: define linkonce_odr void @_Csecond.Main.e1ce67f3c23ab61f(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !126 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !145 +// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !133 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !133 +// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !133 +// CHECK:STDOUT: call void @_Cfirst.Main.e1ce67f3c23ab61f(ptr %arg3, ptr %arg3, ptr %arg1), !dbg !138 +// CHECK:STDOUT: %.loc21 = load ptr, ptr %local_name.var, align 8, !dbg !141 +// CHECK:STDOUT: call void @_Cthird.Main.e1ce67f3c23ab61f(ptr %arg2, ptr %arg2, ptr %.loc21), !dbg !142 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a297d85f341e5034(ptr %local_name.var), !dbg !133 +// CHECK:STDOUT: ret void, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_Cfirst.Main.e1ce67f3c23ab61f(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !156 { +// CHECK:STDOUT: define linkonce_odr void @_Cfourth.Main.c6787c0e2572c86c(ptr %arg1, ptr %arg2, i1 %arg3) #0 !dbg !145 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !163 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !163 -// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !163 -// CHECK:STDOUT: %.loc23 = load ptr, ptr %local_name.var, align 8, !dbg !167 -// CHECK:STDOUT: call void @_Csecond.Main.e1ce67f3c23ab61f(ptr %arg2, ptr %arg2, ptr %.loc23), !dbg !168 -// CHECK:STDOUT: call void @"_CSelfDestruct.cc2eb235f3a2109b:core.Destroy.Core"(ptr %local_name.var), !dbg !163 -// CHECK:STDOUT: ret void, !dbg !169 +// CHECK:STDOUT: ret void, !dbg !152 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_Cthird.Main.e1ce67f3c23ab61f(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !171 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !178 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !178 -// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !178 -// CHECK:STDOUT: %.loc36_10 = load ptr, ptr %local_name.var, align 8, !dbg !180 -// CHECK:STDOUT: %.loc36_22 = load ptr, ptr %local_name.var, align 8, !dbg !181 -// CHECK:STDOUT: call void @_Cfourth.Main.901b24db5c2cfe42(ptr %.loc36_10, ptr %.loc36_22, ptr %arg1), !dbg !183 -// CHECK:STDOUT: call void @_Cfourth.Main.901b24db5c2cfe42(ptr %arg3, ptr %arg3, ptr %arg2), !dbg !187 -// CHECK:STDOUT: call void @"_CSelfDestruct.146e3bb0985f5a0c:core.Destroy.Core"(ptr %local_name.var), !dbg !178 -// CHECK:STDOUT: ret void, !dbg !188 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.3490326134093774(ptr %t) #0 !dbg !163 { +// CHECK:STDOUT: ret void, !dbg !168 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_Cfourth.Main.901b24db5c2cfe42(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !190 { +// CHECK:STDOUT: define linkonce_odr void @_Cfirst.Main.e1ce67f3c23ab61f(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !170 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !197 +// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !177 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !177 +// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !177 +// CHECK:STDOUT: %.loc14 = load ptr, ptr %local_name.var, align 8, !dbg !181 +// CHECK:STDOUT: call void @_Csecond.Main.e1ce67f3c23ab61f(ptr %arg2, ptr %arg2, ptr %.loc14), !dbg !182 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a297d85f341e5034(ptr %local_name.var), !dbg !177 +// CHECK:STDOUT: ret void, !dbg !183 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_Cthird.Main.e1ce67f3c23ab61f(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !185 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %local_name.var = alloca ptr, align 8, !dbg !192 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local_name.var), !dbg !192 +// CHECK:STDOUT: store ptr poison, ptr %local_name.var, align 8, !dbg !192 +// CHECK:STDOUT: %.loc27_10 = load ptr, ptr %local_name.var, align 8, !dbg !194 +// CHECK:STDOUT: %.loc27_22 = load ptr, ptr %local_name.var, align 8, !dbg !195 +// CHECK:STDOUT: call void @_Cfourth.Main.901b24db5c2cfe42(ptr %.loc27_10, ptr %.loc27_22, ptr %arg1), !dbg !197 +// CHECK:STDOUT: call void @_Cfourth.Main.901b24db5c2cfe42(ptr %arg3, ptr %arg3, ptr %arg2), !dbg !201 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.3490326134093774(ptr %local_name.var), !dbg !192 +// CHECK:STDOUT: ret void, !dbg !202 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_Cfourth.Main.901b24db5c2cfe42(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !204 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !211 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 1, 2, 3, 4, 5, 6, 8, 7 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.a297d85f341e5034, { 0, 1, 2, 4, 3 } // CHECK:STDOUT: uselistorder ptr @_Cfourth.Main.c6787c0e2572c86c, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @_Cfourth.Main.901b24db5c2cfe42, { 1, 0 } // 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 = !{!17} +// CHECK:STDOUT: !llvm.dbg.cu = !{!19} // 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: !16 = !DIFile(filename: "reverse_canonical.carbon", directory: "") -// CHECK:STDOUT: !17 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !16, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !19 = !{null, !18} -// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) -// CHECK:STDOUT: !21 = !{null} -// CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cc2eb235f3a2109b:core.Destroy.Core", scope: null, file: !16, line: 21, type: !20, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !26) -// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !23, type: !18) -// CHECK:STDOUT: !25 = !DILocation(line: 21, column: 3, scope: !23) -// CHECK:STDOUT: !26 = !{!24} -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.146e3bb0985f5a0c:core.Destroy.Core", scope: null, file: !16, line: 34, type: !20, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !30) -// CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !27, type: !18) -// CHECK:STDOUT: !29 = !DILocation(line: 34, column: 3, scope: !27) -// CHECK:STDOUT: !30 = !{!28} -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !16, line: 43, type: !22, spFlags: DISPFlagDefinition, unit: !17) -// CHECK:STDOUT: !32 = !DILocation(line: 44, column: 3, scope: !31) -// CHECK:STDOUT: !34 = !DILocation(line: 45, column: 3, scope: !31) -// CHECK:STDOUT: !36 = !DILocation(line: 47, column: 9, scope: !31) -// CHECK:STDOUT: !37 = !DILocation(line: 47, column: 12, scope: !31) -// CHECK:STDOUT: !38 = !DILocation(line: 47, column: 15, scope: !31) -// CHECK:STDOUT: !39 = !DILocation(line: 47, column: 3, scope: !31) -// CHECK:STDOUT: !40 = !{null, !18, !18, !18} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !DILocation(line: 43, column: 1, scope: !31) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb2383e5e4785e19:core.Destroy.Core", scope: null, file: !16, line: 45, type: !20, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !46) -// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !18) -// CHECK:STDOUT: !45 = !DILocation(line: 45, column: 3, scope: !43) -// CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !16, line: 44, type: !20, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !18) -// CHECK:STDOUT: !49 = !DILocation(line: 44, column: 3, scope: !47) -// CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.36f5e0b0ce09cb9a", scope: null, file: !16, line: 20, type: !41, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !65) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !18) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 2, scope: !51, type: !18) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 3, scope: !51, type: !18) -// CHECK:STDOUT: !58 = !DILocation(line: 21, column: 3, scope: !51) -// CHECK:STDOUT: !62 = !DILocation(line: 23, column: 22, scope: !51) -// CHECK:STDOUT: !63 = !DILocation(line: 23, column: 3, scope: !51) -// CHECK:STDOUT: !64 = !DILocation(line: 20, column: 1, scope: !51) -// CHECK:STDOUT: !65 = !{!52, !53, !54} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "second", linkageName: "_Csecond.Main.0f29a29bf45af723", scope: null, file: !16, line: 26, type: !41, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !84) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !18) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 2, scope: !66, type: !18) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 3, scope: !66, type: !18) -// CHECK:STDOUT: !73 = !DILocation(line: 27, column: 3, scope: !66) -// CHECK:STDOUT: !78 = !DILocation(line: 29, column: 3, scope: !66) -// CHECK:STDOUT: !81 = !DILocation(line: 30, column: 21, scope: !66) -// CHECK:STDOUT: !82 = !DILocation(line: 30, column: 3, scope: !66) -// CHECK:STDOUT: !83 = !DILocation(line: 26, column: 1, scope: !66) +// CHECK:STDOUT: !8 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") +// CHECK:STDOUT: !18 = !DIFile(filename: "reverse_canonical.carbon", directory: "") +// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !20 = !{null} +// CHECK:STDOUT: !21 = !DISubroutineType(types: !20) +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !18, line: 34, type: !21, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !23 = !DILocation(line: 35, column: 3, scope: !22) +// CHECK:STDOUT: !25 = !DILocation(line: 36, column: 3, scope: !22) +// CHECK:STDOUT: !27 = !DILocation(line: 38, column: 9, scope: !22) +// CHECK:STDOUT: !28 = !DILocation(line: 38, column: 12, scope: !22) +// CHECK:STDOUT: !29 = !DILocation(line: 38, column: 15, scope: !22) +// CHECK:STDOUT: !30 = !DILocation(line: 38, column: 3, scope: !22) +// CHECK:STDOUT: !31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !32 = !{null, !31, !31, !31} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !34 = !{null, !31} +// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) +// CHECK:STDOUT: !36 = !DILocation(line: 34, column: 1, scope: !22) +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.36f5e0b0ce09cb9a", scope: null, file: !18, line: 11, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) +// CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !31) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 2, scope: !37, type: !31) +// CHECK:STDOUT: !40 = !DILocalVariable(arg: 3, scope: !37, type: !31) +// CHECK:STDOUT: !44 = !DILocation(line: 12, column: 3, scope: !37) +// CHECK:STDOUT: !48 = !DILocation(line: 14, column: 22, scope: !37) +// CHECK:STDOUT: !49 = !DILocation(line: 14, column: 3, scope: !37) +// CHECK:STDOUT: !50 = !DILocation(line: 11, column: 1, scope: !37) +// CHECK:STDOUT: !51 = !{!38, !39, !40} +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.393ac80c0c8a44df", scope: null, file: !8, line: 32, type: !35, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !31) +// CHECK:STDOUT: !57 = !DILocation(line: 32, column: 1, scope: !52) +// CHECK:STDOUT: !58 = !{!53} +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.29e6aa423646b61a", scope: null, file: !8, line: 32, type: !35, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !31) +// CHECK:STDOUT: !64 = !DILocation(line: 32, column: 1, scope: !59) +// CHECK:STDOUT: !65 = !{!60} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "second", linkageName: "_Csecond.Main.0f29a29bf45af723", scope: null, file: !18, line: 17, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !84) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !31) +// CHECK:STDOUT: !68 = !DILocalVariable(arg: 2, scope: !66, type: !31) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 3, scope: !66, type: !31) +// CHECK:STDOUT: !73 = !DILocation(line: 18, column: 3, scope: !66) +// CHECK:STDOUT: !78 = !DILocation(line: 20, column: 3, scope: !66) +// CHECK:STDOUT: !81 = !DILocation(line: 21, column: 21, scope: !66) +// CHECK:STDOUT: !82 = !DILocation(line: 21, column: 3, scope: !66) +// CHECK:STDOUT: !83 = !DILocation(line: 17, column: 1, scope: !66) // CHECK:STDOUT: !84 = !{!67, !68, !69} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.81f1c9de445b895c", scope: null, file: !16, line: 20, type: !41, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !99) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !18) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 2, scope: !85, type: !18) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 3, scope: !85, type: !18) -// CHECK:STDOUT: !92 = !DILocation(line: 21, column: 3, scope: !85) -// CHECK:STDOUT: !96 = !DILocation(line: 23, column: 22, scope: !85) -// CHECK:STDOUT: !97 = !DILocation(line: 23, column: 3, scope: !85) -// CHECK:STDOUT: !98 = !DILocation(line: 20, column: 1, scope: !85) -// CHECK:STDOUT: !99 = !{!86, !87, !88} -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "third", linkageName: "_Cthird.Main.0f29a29bf45af723", scope: null, file: !16, line: 33, type: !41, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !118) -// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !18) -// CHECK:STDOUT: !102 = !DILocalVariable(arg: 2, scope: !100, type: !18) -// CHECK:STDOUT: !103 = !DILocalVariable(arg: 3, scope: !100, type: !18) -// CHECK:STDOUT: !107 = !DILocation(line: 34, column: 3, scope: !100) -// CHECK:STDOUT: !109 = !DILocation(line: 36, column: 10, scope: !100) -// CHECK:STDOUT: !110 = !DILocation(line: 36, column: 22, scope: !100) -// CHECK:STDOUT: !112 = !DILocation(line: 36, column: 3, scope: !100) -// CHECK:STDOUT: !116 = !DILocation(line: 37, column: 3, scope: !100) -// CHECK:STDOUT: !117 = !DILocation(line: 33, column: 1, scope: !100) -// CHECK:STDOUT: !118 = !{!101, !102, !103} -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "second", linkageName: "_Csecond.Main.e1ce67f3c23ab61f", scope: null, file: !16, line: 26, type: !41, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !137) -// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !18) -// CHECK:STDOUT: !121 = !DILocalVariable(arg: 2, scope: !119, type: !18) -// CHECK:STDOUT: !122 = !DILocalVariable(arg: 3, scope: !119, type: !18) -// CHECK:STDOUT: !126 = !DILocation(line: 27, column: 3, scope: !119) -// CHECK:STDOUT: !131 = !DILocation(line: 29, column: 3, scope: !119) -// CHECK:STDOUT: !134 = !DILocation(line: 30, column: 21, scope: !119) -// CHECK:STDOUT: !135 = !DILocation(line: 30, column: 3, scope: !119) -// CHECK:STDOUT: !136 = !DILocation(line: 26, column: 1, scope: !119) -// CHECK:STDOUT: !137 = !{!120, !121, !122} -// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "fourth", linkageName: "_Cfourth.Main.c6787c0e2572c86c", scope: null, file: !16, line: 40, type: !41, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !146) -// CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !138, type: !18) -// CHECK:STDOUT: !140 = !DILocalVariable(arg: 2, scope: !138, type: !18) -// CHECK:STDOUT: !141 = !DILocalVariable(arg: 3, scope: !138, type: !18) -// CHECK:STDOUT: !145 = !DILocation(line: 40, column: 1, scope: !138) -// CHECK:STDOUT: !146 = !{!139, !140, !141} -// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.e1ce67f3c23ab61f", scope: null, file: !16, line: 20, type: !41, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !170) -// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !18) -// CHECK:STDOUT: !158 = !DILocalVariable(arg: 2, scope: !156, type: !18) -// CHECK:STDOUT: !159 = !DILocalVariable(arg: 3, scope: !156, type: !18) -// CHECK:STDOUT: !163 = !DILocation(line: 21, column: 3, scope: !156) -// CHECK:STDOUT: !167 = !DILocation(line: 23, column: 22, scope: !156) -// CHECK:STDOUT: !168 = !DILocation(line: 23, column: 3, scope: !156) -// CHECK:STDOUT: !169 = !DILocation(line: 20, column: 1, scope: !156) -// CHECK:STDOUT: !170 = !{!157, !158, !159} -// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "third", linkageName: "_Cthird.Main.e1ce67f3c23ab61f", scope: null, file: !16, line: 33, type: !41, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !189) -// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !18) -// CHECK:STDOUT: !173 = !DILocalVariable(arg: 2, scope: !171, type: !18) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 3, scope: !171, type: !18) -// CHECK:STDOUT: !178 = !DILocation(line: 34, column: 3, scope: !171) -// CHECK:STDOUT: !180 = !DILocation(line: 36, column: 10, scope: !171) -// CHECK:STDOUT: !181 = !DILocation(line: 36, column: 22, scope: !171) -// CHECK:STDOUT: !183 = !DILocation(line: 36, column: 3, scope: !171) -// CHECK:STDOUT: !187 = !DILocation(line: 37, column: 3, scope: !171) -// CHECK:STDOUT: !188 = !DILocation(line: 33, column: 1, scope: !171) -// CHECK:STDOUT: !189 = !{!172, !173, !174} -// CHECK:STDOUT: !190 = distinct !DISubprogram(name: "fourth", linkageName: "_Cfourth.Main.901b24db5c2cfe42", scope: null, file: !16, line: 40, type: !41, spFlags: DISPFlagDefinition, unit: !17, retainedNodes: !198) -// CHECK:STDOUT: !191 = !DILocalVariable(arg: 1, scope: !190, type: !18) -// CHECK:STDOUT: !192 = !DILocalVariable(arg: 2, scope: !190, type: !18) -// CHECK:STDOUT: !193 = !DILocalVariable(arg: 3, scope: !190, type: !18) -// CHECK:STDOUT: !197 = !DILocation(line: 40, column: 1, scope: !190) -// CHECK:STDOUT: !198 = !{!191, !192, !193} +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.a297d85f341e5034", scope: null, file: !8, line: 32, type: !35, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !91) +// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !31) +// CHECK:STDOUT: !90 = !DILocation(line: 32, column: 1, scope: !85) +// CHECK:STDOUT: !91 = !{!86} +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.81f1c9de445b895c", scope: null, file: !18, line: 11, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !106) +// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !31) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 2, scope: !92, type: !31) +// CHECK:STDOUT: !95 = !DILocalVariable(arg: 3, scope: !92, type: !31) +// CHECK:STDOUT: !99 = !DILocation(line: 12, column: 3, scope: !92) +// CHECK:STDOUT: !103 = !DILocation(line: 14, column: 22, scope: !92) +// CHECK:STDOUT: !104 = !DILocation(line: 14, column: 3, scope: !92) +// CHECK:STDOUT: !105 = !DILocation(line: 11, column: 1, scope: !92) +// CHECK:STDOUT: !106 = !{!93, !94, !95} +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "third", linkageName: "_Cthird.Main.0f29a29bf45af723", scope: null, file: !18, line: 24, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !125) +// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !31) +// CHECK:STDOUT: !109 = !DILocalVariable(arg: 2, scope: !107, type: !31) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 3, scope: !107, type: !31) +// CHECK:STDOUT: !114 = !DILocation(line: 25, column: 3, scope: !107) +// CHECK:STDOUT: !116 = !DILocation(line: 27, column: 10, scope: !107) +// CHECK:STDOUT: !117 = !DILocation(line: 27, column: 22, scope: !107) +// CHECK:STDOUT: !119 = !DILocation(line: 27, column: 3, scope: !107) +// CHECK:STDOUT: !123 = !DILocation(line: 28, column: 3, scope: !107) +// CHECK:STDOUT: !124 = !DILocation(line: 24, column: 1, scope: !107) +// CHECK:STDOUT: !125 = !{!108, !109, !110} +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "second", linkageName: "_Csecond.Main.e1ce67f3c23ab61f", scope: null, file: !18, line: 17, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !144) +// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !31) +// CHECK:STDOUT: !128 = !DILocalVariable(arg: 2, scope: !126, type: !31) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 3, scope: !126, type: !31) +// CHECK:STDOUT: !133 = !DILocation(line: 18, column: 3, scope: !126) +// CHECK:STDOUT: !138 = !DILocation(line: 20, column: 3, scope: !126) +// CHECK:STDOUT: !141 = !DILocation(line: 21, column: 21, scope: !126) +// CHECK:STDOUT: !142 = !DILocation(line: 21, column: 3, scope: !126) +// CHECK:STDOUT: !143 = !DILocation(line: 17, column: 1, scope: !126) +// CHECK:STDOUT: !144 = !{!127, !128, !129} +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "fourth", linkageName: "_Cfourth.Main.c6787c0e2572c86c", scope: null, file: !18, line: 31, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !153) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !31) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 2, scope: !145, type: !31) +// CHECK:STDOUT: !148 = !DILocalVariable(arg: 3, scope: !145, type: !31) +// CHECK:STDOUT: !152 = !DILocation(line: 31, column: 1, scope: !145) +// CHECK:STDOUT: !153 = !{!146, !147, !148} +// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.3490326134093774", scope: null, file: !8, line: 32, type: !35, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !169) +// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !31) +// CHECK:STDOUT: !168 = !DILocation(line: 32, column: 1, scope: !163) +// CHECK:STDOUT: !169 = !{!164} +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "first", linkageName: "_Cfirst.Main.e1ce67f3c23ab61f", scope: null, file: !18, line: 11, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !184) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !31) +// CHECK:STDOUT: !172 = !DILocalVariable(arg: 2, scope: !170, type: !31) +// CHECK:STDOUT: !173 = !DILocalVariable(arg: 3, scope: !170, type: !31) +// CHECK:STDOUT: !177 = !DILocation(line: 12, column: 3, scope: !170) +// CHECK:STDOUT: !181 = !DILocation(line: 14, column: 22, scope: !170) +// CHECK:STDOUT: !182 = !DILocation(line: 14, column: 3, scope: !170) +// CHECK:STDOUT: !183 = !DILocation(line: 11, column: 1, scope: !170) +// CHECK:STDOUT: !184 = !{!171, !172, !173} +// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "third", linkageName: "_Cthird.Main.e1ce67f3c23ab61f", scope: null, file: !18, line: 24, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !203) +// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !31) +// CHECK:STDOUT: !187 = !DILocalVariable(arg: 2, scope: !185, type: !31) +// CHECK:STDOUT: !188 = !DILocalVariable(arg: 3, scope: !185, type: !31) +// CHECK:STDOUT: !192 = !DILocation(line: 25, column: 3, scope: !185) +// CHECK:STDOUT: !194 = !DILocation(line: 27, column: 10, scope: !185) +// CHECK:STDOUT: !195 = !DILocation(line: 27, column: 22, scope: !185) +// CHECK:STDOUT: !197 = !DILocation(line: 27, column: 3, scope: !185) +// CHECK:STDOUT: !201 = !DILocation(line: 28, column: 3, scope: !185) +// CHECK:STDOUT: !202 = !DILocation(line: 24, column: 1, scope: !185) +// CHECK:STDOUT: !203 = !{!186, !187, !188} +// CHECK:STDOUT: !204 = distinct !DISubprogram(name: "fourth", linkageName: "_Cfourth.Main.901b24db5c2cfe42", scope: null, file: !18, line: 31, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !212) +// CHECK:STDOUT: !205 = !DILocalVariable(arg: 1, scope: !204, type: !31) +// CHECK:STDOUT: !206 = !DILocalVariable(arg: 2, scope: !204, type: !31) +// CHECK:STDOUT: !207 = !DILocalVariable(arg: 3, scope: !204, type: !31) +// CHECK:STDOUT: !211 = !DILocation(line: 31, column: 1, scope: !204) +// CHECK:STDOUT: !212 = !{!205, !206, !207} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/self_canonical.carbon b/toolchain/lower/testdata/function/generic/self_canonical.carbon index 1418faa60e6a..90e803dfdbaa 100644 --- a/toolchain/lower/testdata/function/generic/self_canonical.carbon +++ b/toolchain/lower/testdata/function/generic/self_canonical.carbon @@ -87,130 +87,124 @@ fn Main_method_no_template () { // CHECK:STDOUT: source_filename = "self_canonical.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.73ffa1ae01557cf1:core.Destroy.Core"(ptr %self) #0 !dbg !21 { +// CHECK:STDOUT: define void @_CMain_method_no_template.Main() #0 !dbg !18 { // 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.28258e58291017cc: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.a247f3a5f241fa11: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.22bdc7946a052e71: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.680a5c6f7a3d0796: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 void @_CMain_method_no_template.Main() #0 !dbg !41 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %local1.var = alloca ptr, align 8, !dbg !42 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local1.var), !dbg !42 -// CHECK:STDOUT: store ptr poison, ptr %local1.var, align 8, !dbg !42 -// CHECK:STDOUT: %.loc82 = load ptr, ptr %local1.var, align 8, !dbg !44 -// CHECK:STDOUT: call void @_Cfirst_function.Main.ee57965601b4d646(ptr %.loc82), !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.a79cf9479d679a84:core.Destroy.Core"(ptr %local1.var), !dbg !42 -// CHECK:STDOUT: ret void, !dbg !46 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a79cf9479d679a84:core.Destroy.Core"(ptr %self) #0 !dbg !47 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: %local1.var = alloca ptr, align 8, !dbg !19 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local1.var), !dbg !19 +// CHECK:STDOUT: store ptr poison, ptr %local1.var, align 8, !dbg !19 +// CHECK:STDOUT: %.loc82 = load ptr, ptr %local1.var, align 8, !dbg !21 +// CHECK:STDOUT: call void @_Cfirst_function.Main.ee57965601b4d646(ptr %.loc82), !dbg !22 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7b2216d4f1f76a3b(ptr %local1.var), !dbg !19 +// CHECK:STDOUT: ret void, !dbg !26 // 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 @_Cfourth_function.Main.4da09b2222fc2513(ptr %arg) #0 !dbg !192 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %local1.var = alloca ptr, align 8, !dbg !195 -// CHECK:STDOUT: %local2.var = alloca ptr, align 8, !dbg !197 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local1.var), !dbg !195 -// CHECK:STDOUT: store ptr poison, ptr %local1.var, align 8, !dbg !195 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local2.var), !dbg !197 -// CHECK:STDOUT: store ptr poison, ptr %local2.var, align 8, !dbg !197 -// CHECK:STDOUT: %.loc53 = load ptr, ptr %local1.var, align 8, !dbg !199 -// CHECK:STDOUT: call void @_Cfirst_function.Main.ee57965601b4d646(ptr %.loc53), !dbg !200 -// CHECK:STDOUT: %.loc54 = load ptr, ptr %local2.var, align 8, !dbg !201 -// CHECK:STDOUT: call void @_Cfirst_function.Main.ee57965601b4d646(ptr %.loc54), !dbg !202 -// CHECK:STDOUT: call void @"_CSelfDestruct.28258e58291017cc:core.Destroy.Core"(ptr %local2.var), !dbg !197 -// CHECK:STDOUT: call void @"_CSelfDestruct.a247f3a5f241fa11:core.Destroy.Core"(ptr %local1.var), !dbg !195 -// CHECK:STDOUT: ret void, !dbg !203 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.7b2216d4f1f76a3b(ptr %t) #0 !dbg !42 { +// CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_Cfirst_function.Main.ee57965601b4d646(ptr %arg) #0 !dbg !243 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %local1.var = alloca ptr, align 8, !dbg !246 -// CHECK:STDOUT: %local2.var = alloca ptr, align 8, !dbg !248 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local1.var), !dbg !246 -// CHECK:STDOUT: store ptr poison, ptr %local1.var, align 8, !dbg !246 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local2.var), !dbg !248 -// CHECK:STDOUT: store ptr poison, ptr %local2.var, align 8, !dbg !248 -// CHECK:STDOUT: %.loc61_19 = load ptr, ptr %local2.var, align 8, !dbg !250 -// CHECK:STDOUT: %.loc61_27 = load ptr, ptr %local1.var, align 8, !dbg !251 -// CHECK:STDOUT: call void @_Csecond_function.Main.efd9fcdf727c9de5(ptr %.loc61_19, ptr %.loc61_27, ptr %arg), !dbg !253 -// CHECK:STDOUT: call void @"_CSelfDestruct.22bdc7946a052e71:core.Destroy.Core"(ptr %local2.var), !dbg !248 -// CHECK:STDOUT: call void @"_CSelfDestruct.680a5c6f7a3d0796:core.Destroy.Core"(ptr %local1.var), !dbg !246 -// CHECK:STDOUT: ret void, !dbg !254 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.10464ace51a7759b(ptr %t) #0 !dbg !72 { +// CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_Csecond_function.Main.efd9fcdf727c9de5(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !269 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %local1.var = alloca ptr, align 8, !dbg !276 -// CHECK:STDOUT: %local2.var = alloca ptr, align 8, !dbg !278 -// CHECK:STDOUT: %local3.var = alloca ptr, align 8, !dbg !280 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local1.var), !dbg !276 -// CHECK:STDOUT: store ptr poison, ptr %local1.var, align 8, !dbg !276 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local2.var), !dbg !278 -// CHECK:STDOUT: store ptr poison, ptr %local2.var, align 8, !dbg !278 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local3.var), !dbg !280 -// CHECK:STDOUT: store ptr poison, ptr %local3.var, align 8, !dbg !280 -// CHECK:STDOUT: %.loc75_25 = load ptr, ptr %local3.var, align 8, !dbg !283 -// CHECK:STDOUT: %.loc75_33 = load ptr, ptr %local2.var, align 8, !dbg !284 -// CHECK:STDOUT: call void @_Csecond_function.Main.efd9fcdf727c9de5(ptr %arg3, ptr %.loc75_25, ptr %.loc75_33), !dbg !285 -// CHECK:STDOUT: %.loc76 = load ptr, ptr %local1.var, align 8, !dbg !286 -// CHECK:STDOUT: call void @_Cthird_function.Main.1c39a3b349bf66b6(ptr %.loc76, ptr %arg3, ptr %arg1), !dbg !289 -// CHECK:STDOUT: call void @"_CSelfDestruct.73ffa1ae01557cf1:core.Destroy.Core"(ptr %local3.var), !dbg !280 -// CHECK:STDOUT: call void @"_CSelfDestruct.680a5c6f7a3d0796:core.Destroy.Core"(ptr %local2.var), !dbg !278 -// CHECK:STDOUT: call void @"_CSelfDestruct.22bdc7946a052e71:core.Destroy.Core"(ptr %local1.var), !dbg !276 -// CHECK:STDOUT: ret void, !dbg !290 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4190739a553c9c95(ptr %t) #0 !dbg !79 { +// CHECK:STDOUT: ret void, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_Cthird_function.Main.1c39a3b349bf66b6(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !338 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.95c75c16d627cdea(ptr %t) #0 !dbg !128 { +// CHECK:STDOUT: ret void, !dbg !133 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_Cfourth_function.Main.4da09b2222fc2513(ptr %arg) #0 !dbg !196 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %local1.var = alloca ptr, align 8, !dbg !345 -// CHECK:STDOUT: %local2.var = alloca ptr, align 8, !dbg !347 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local1.var), !dbg !345 -// CHECK:STDOUT: store ptr poison, ptr %local1.var, align 8, !dbg !345 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local2.var), !dbg !347 -// CHECK:STDOUT: store ptr poison, ptr %local2.var, align 8, !dbg !347 -// CHECK:STDOUT: %.loc39 = load ptr, ptr %local2.var, align 8, !dbg !351 -// CHECK:STDOUT: call void @_Cthird_function.Main.1c39a3b349bf66b6(ptr %arg1, ptr %arg2, ptr %.loc39), !dbg !352 -// CHECK:STDOUT: %.loc40 = load ptr, ptr %local1.var, align 8, !dbg !353 -// CHECK:STDOUT: call void @_Cfourth_function.Main.4da09b2222fc2513(ptr %.loc40), !dbg !354 -// CHECK:STDOUT: call void @"_CSelfDestruct.73ffa1ae01557cf1:core.Destroy.Core"(ptr %local2.var), !dbg !347 -// CHECK:STDOUT: call void @"_CSelfDestruct.73ffa1ae01557cf1:core.Destroy.Core"(ptr %local1.var), !dbg !345 -// CHECK:STDOUT: ret void, !dbg !355 +// CHECK:STDOUT: %local1.var = alloca ptr, align 8, !dbg !199 +// CHECK:STDOUT: %local2.var = alloca ptr, align 8, !dbg !201 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local1.var), !dbg !199 +// CHECK:STDOUT: store ptr poison, ptr %local1.var, align 8, !dbg !199 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local2.var), !dbg !201 +// CHECK:STDOUT: store ptr poison, ptr %local2.var, align 8, !dbg !201 +// CHECK:STDOUT: %.loc53 = load ptr, ptr %local1.var, align 8, !dbg !203 +// CHECK:STDOUT: call void @_Cfirst_function.Main.ee57965601b4d646(ptr %.loc53), !dbg !204 +// CHECK:STDOUT: %.loc54 = load ptr, ptr %local2.var, align 8, !dbg !205 +// CHECK:STDOUT: call void @_Cfirst_function.Main.ee57965601b4d646(ptr %.loc54), !dbg !206 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.1fce18cf3d70dc46(ptr %local2.var), !dbg !201 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a113e72770ff09ec(ptr %local1.var), !dbg !199 +// CHECK:STDOUT: ret void, !dbg !207 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_Cfirst_function.Main.ee57965601b4d646(ptr %arg) #0 !dbg !247 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %local1.var = alloca ptr, align 8, !dbg !250 +// CHECK:STDOUT: %local2.var = alloca ptr, align 8, !dbg !252 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local1.var), !dbg !250 +// CHECK:STDOUT: store ptr poison, ptr %local1.var, align 8, !dbg !250 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local2.var), !dbg !252 +// CHECK:STDOUT: store ptr poison, ptr %local2.var, align 8, !dbg !252 +// CHECK:STDOUT: %.loc61_19 = load ptr, ptr %local2.var, align 8, !dbg !254 +// CHECK:STDOUT: %.loc61_27 = load ptr, ptr %local1.var, align 8, !dbg !255 +// CHECK:STDOUT: call void @_Csecond_function.Main.efd9fcdf727c9de5(ptr %.loc61_19, ptr %.loc61_27, ptr %arg), !dbg !257 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.10464ace51a7759b(ptr %local2.var), !dbg !252 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4190739a553c9c95(ptr %local1.var), !dbg !250 +// CHECK:STDOUT: ret void, !dbg !258 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.1fce18cf3d70dc46(ptr %t) #0 !dbg !273 { +// CHECK:STDOUT: ret void, !dbg !278 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.a113e72770ff09ec(ptr %t) #0 !dbg !280 { +// CHECK:STDOUT: ret void, !dbg !285 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_Csecond_function.Main.efd9fcdf727c9de5(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !287 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %local1.var = alloca ptr, align 8, !dbg !294 +// CHECK:STDOUT: %local2.var = alloca ptr, align 8, !dbg !296 +// CHECK:STDOUT: %local3.var = alloca ptr, align 8, !dbg !298 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local1.var), !dbg !294 +// CHECK:STDOUT: store ptr poison, ptr %local1.var, align 8, !dbg !294 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local2.var), !dbg !296 +// CHECK:STDOUT: store ptr poison, ptr %local2.var, align 8, !dbg !296 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local3.var), !dbg !298 +// CHECK:STDOUT: store ptr poison, ptr %local3.var, align 8, !dbg !298 +// CHECK:STDOUT: %.loc75_25 = load ptr, ptr %local3.var, align 8, !dbg !301 +// CHECK:STDOUT: %.loc75_33 = load ptr, ptr %local2.var, align 8, !dbg !302 +// CHECK:STDOUT: call void @_Csecond_function.Main.efd9fcdf727c9de5(ptr %arg3, ptr %.loc75_25, ptr %.loc75_33), !dbg !303 +// CHECK:STDOUT: %.loc76 = load ptr, ptr %local1.var, align 8, !dbg !304 +// CHECK:STDOUT: call void @_Cthird_function.Main.1c39a3b349bf66b6(ptr %.loc76, ptr %arg3, ptr %arg1), !dbg !307 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.95c75c16d627cdea(ptr %local3.var), !dbg !298 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4190739a553c9c95(ptr %local2.var), !dbg !296 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.10464ace51a7759b(ptr %local1.var), !dbg !294 +// CHECK:STDOUT: ret void, !dbg !308 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_Cthird_function.Main.1c39a3b349bf66b6(ptr %arg1, ptr %arg2, ptr %arg3) #0 !dbg !356 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %local1.var = alloca ptr, align 8, !dbg !363 +// CHECK:STDOUT: %local2.var = alloca ptr, align 8, !dbg !365 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local1.var), !dbg !363 +// CHECK:STDOUT: store ptr poison, ptr %local1.var, align 8, !dbg !363 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %local2.var), !dbg !365 +// CHECK:STDOUT: store ptr poison, ptr %local2.var, align 8, !dbg !365 +// CHECK:STDOUT: %.loc39 = load ptr, ptr %local2.var, align 8, !dbg !369 +// CHECK:STDOUT: call void @_Cthird_function.Main.1c39a3b349bf66b6(ptr %arg1, ptr %arg2, ptr %.loc39), !dbg !370 +// CHECK:STDOUT: %.loc40 = load ptr, ptr %local1.var, align 8, !dbg !371 +// CHECK:STDOUT: call void @_Cfourth_function.Main.4da09b2222fc2513(ptr %.loc40), !dbg !372 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.95c75c16d627cdea(ptr %local2.var), !dbg !365 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.95c75c16d627cdea(ptr %local1.var), !dbg !363 +// CHECK:STDOUT: ret void, !dbg !373 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -224,87 +218,88 @@ fn Main_method_no_template () { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !14 = !DIFile(filename: "self_canonical.carbon", directory: "") // CHECK:STDOUT: !15 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !14, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !17 = !{null, !16} -// CHECK:STDOUT: !18 = !DISubroutineType(types: !17) -// CHECK:STDOUT: !19 = !{null} -// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.73ffa1ae01557cf1:core.Destroy.Core", scope: null, file: !14, line: 37, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !24) -// CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !16) -// CHECK:STDOUT: !23 = !DILocation(line: 37, column: 3, scope: !21) -// CHECK:STDOUT: !24 = !{!22} -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.28258e58291017cc:core.Destroy.Core", scope: null, file: !14, line: 44, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !28) -// CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !16) -// CHECK:STDOUT: !27 = !DILocation(line: 44, column: 3, scope: !25) -// CHECK:STDOUT: !28 = !{!26} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a247f3a5f241fa11:core.Destroy.Core", scope: null, file: !14, line: 50, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !32) -// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !16) -// CHECK:STDOUT: !31 = !DILocation(line: 50, column: 3, scope: !29) -// CHECK:STDOUT: !32 = !{!30} -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.22bdc7946a052e71:core.Destroy.Core", scope: null, file: !14, line: 59, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !36) -// CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !33, type: !16) -// CHECK:STDOUT: !35 = !DILocation(line: 59, column: 3, scope: !33) -// CHECK:STDOUT: !36 = !{!34} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.680a5c6f7a3d0796:core.Destroy.Core", scope: null, file: !14, line: 58, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !40) -// CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !16) -// CHECK:STDOUT: !39 = !DILocation(line: 58, column: 3, scope: !37) -// CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Main_method_no_template", linkageName: "_CMain_method_no_template.Main", scope: null, file: !14, line: 79, type: !20, spFlags: DISPFlagDefinition, unit: !15) -// CHECK:STDOUT: !42 = !DILocation(line: 80, column: 3, scope: !41) -// CHECK:STDOUT: !44 = !DILocation(line: 82, column: 18, scope: !41) -// CHECK:STDOUT: !45 = !DILocation(line: 82, column: 3, scope: !41) -// CHECK:STDOUT: !46 = !DILocation(line: 79, column: 1, scope: !41) -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a79cf9479d679a84:core.Destroy.Core", scope: null, file: !14, line: 80, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !16) -// CHECK:STDOUT: !49 = !DILocation(line: 80, column: 3, scope: !47) -// CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !62 = !{null, !16, !16, !16} -// CHECK:STDOUT: !63 = !DISubroutineType(types: !62) -// CHECK:STDOUT: !192 = distinct !DISubprogram(name: "fourth_function", linkageName: "_Cfourth_function.Main.4da09b2222fc2513", scope: null, file: !14, line: 49, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !204) -// CHECK:STDOUT: !193 = !DILocalVariable(arg: 1, scope: !192, type: !16) -// CHECK:STDOUT: !195 = !DILocation(line: 50, column: 3, scope: !192) -// CHECK:STDOUT: !197 = !DILocation(line: 51, column: 3, scope: !192) -// CHECK:STDOUT: !199 = !DILocation(line: 53, column: 18, scope: !192) -// CHECK:STDOUT: !200 = !DILocation(line: 53, column: 3, scope: !192) -// CHECK:STDOUT: !201 = !DILocation(line: 54, column: 18, scope: !192) -// CHECK:STDOUT: !202 = !DILocation(line: 54, column: 3, scope: !192) -// CHECK:STDOUT: !203 = !DILocation(line: 49, column: 1, scope: !192) -// CHECK:STDOUT: !204 = !{!193} -// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "first_function", linkageName: "_Cfirst_function.Main.ee57965601b4d646", scope: null, file: !14, line: 57, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !255) -// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !16) -// CHECK:STDOUT: !246 = !DILocation(line: 58, column: 3, scope: !243) -// CHECK:STDOUT: !248 = !DILocation(line: 59, column: 3, scope: !243) -// CHECK:STDOUT: !250 = !DILocation(line: 61, column: 19, scope: !243) -// CHECK:STDOUT: !251 = !DILocation(line: 61, column: 27, scope: !243) -// CHECK:STDOUT: !253 = !DILocation(line: 61, column: 3, scope: !243) -// CHECK:STDOUT: !254 = !DILocation(line: 57, column: 1, scope: !243) -// CHECK:STDOUT: !255 = !{!244} -// CHECK:STDOUT: !269 = distinct !DISubprogram(name: "second_function", linkageName: "_Csecond_function.Main.efd9fcdf727c9de5", scope: null, file: !14, line: 70, type: !63, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !291) -// CHECK:STDOUT: !270 = !DILocalVariable(arg: 1, scope: !269, type: !16) -// CHECK:STDOUT: !271 = !DILocalVariable(arg: 2, scope: !269, type: !16) -// CHECK:STDOUT: !272 = !DILocalVariable(arg: 3, scope: !269, type: !16) -// CHECK:STDOUT: !276 = !DILocation(line: 71, column: 3, scope: !269) -// CHECK:STDOUT: !278 = !DILocation(line: 72, column: 3, scope: !269) -// CHECK:STDOUT: !280 = !DILocation(line: 73, column: 3, scope: !269) -// CHECK:STDOUT: !283 = !DILocation(line: 75, column: 25, scope: !269) -// CHECK:STDOUT: !284 = !DILocation(line: 75, column: 33, scope: !269) -// CHECK:STDOUT: !285 = !DILocation(line: 75, column: 3, scope: !269) -// CHECK:STDOUT: !286 = !DILocation(line: 76, column: 18, scope: !269) -// CHECK:STDOUT: !289 = !DILocation(line: 76, column: 3, scope: !269) -// CHECK:STDOUT: !290 = !DILocation(line: 70, column: 1, scope: !269) -// CHECK:STDOUT: !291 = !{!270, !271, !272} -// CHECK:STDOUT: !338 = distinct !DISubprogram(name: "third_function", linkageName: "_Cthird_function.Main.1c39a3b349bf66b6", scope: null, file: !14, line: 35, type: !63, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !356) -// CHECK:STDOUT: !339 = !DILocalVariable(arg: 1, scope: !338, type: !16) -// CHECK:STDOUT: !340 = !DILocalVariable(arg: 2, scope: !338, type: !16) -// CHECK:STDOUT: !341 = !DILocalVariable(arg: 3, scope: !338, type: !16) -// CHECK:STDOUT: !345 = !DILocation(line: 36, column: 3, scope: !338) -// CHECK:STDOUT: !347 = !DILocation(line: 37, column: 3, scope: !338) -// CHECK:STDOUT: !351 = !DILocation(line: 39, column: 30, scope: !338) -// CHECK:STDOUT: !352 = !DILocation(line: 39, column: 3, scope: !338) -// CHECK:STDOUT: !353 = !DILocation(line: 40, column: 19, scope: !338) -// CHECK:STDOUT: !354 = !DILocation(line: 40, column: 3, scope: !338) -// CHECK:STDOUT: !355 = !DILocation(line: 35, column: 1, scope: !338) -// CHECK:STDOUT: !356 = !{!339, !340, !341} +// CHECK:STDOUT: !16 = !{null} +// CHECK:STDOUT: !17 = !DISubroutineType(types: !16) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Main_method_no_template", linkageName: "_CMain_method_no_template.Main", scope: null, file: !14, line: 79, type: !17, spFlags: DISPFlagDefinition, unit: !15) +// CHECK:STDOUT: !19 = !DILocation(line: 80, column: 3, scope: !18) +// CHECK:STDOUT: !21 = !DILocation(line: 82, column: 18, scope: !18) +// CHECK:STDOUT: !22 = !DILocation(line: 82, column: 3, scope: !18) +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{null, !23} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = !DILocation(line: 79, column: 1, scope: !18) +// CHECK:STDOUT: !38 = !{null, !23, !23, !23} +// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.7b2216d4f1f76a3b", scope: null, file: !6, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !48) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !23) +// CHECK:STDOUT: !47 = !DILocation(line: 32, column: 1, scope: !42) +// CHECK:STDOUT: !48 = !{!43} +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.10464ace51a7759b", scope: null, file: !6, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !78) +// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !23) +// CHECK:STDOUT: !77 = !DILocation(line: 32, column: 1, scope: !72) +// CHECK:STDOUT: !78 = !{!73} +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4190739a553c9c95", scope: null, file: !6, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !85) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !23) +// CHECK:STDOUT: !84 = !DILocation(line: 32, column: 1, scope: !79) +// CHECK:STDOUT: !85 = !{!80} +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.95c75c16d627cdea", scope: null, file: !6, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !134) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !23) +// CHECK:STDOUT: !133 = !DILocation(line: 32, column: 1, scope: !128) +// CHECK:STDOUT: !134 = !{!129} +// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "fourth_function", linkageName: "_Cfourth_function.Main.4da09b2222fc2513", scope: null, file: !14, line: 49, type: !25, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !208) +// CHECK:STDOUT: !197 = !DILocalVariable(arg: 1, scope: !196, type: !23) +// CHECK:STDOUT: !199 = !DILocation(line: 50, column: 3, scope: !196) +// CHECK:STDOUT: !201 = !DILocation(line: 51, column: 3, scope: !196) +// CHECK:STDOUT: !203 = !DILocation(line: 53, column: 18, scope: !196) +// CHECK:STDOUT: !204 = !DILocation(line: 53, column: 3, scope: !196) +// CHECK:STDOUT: !205 = !DILocation(line: 54, column: 18, scope: !196) +// CHECK:STDOUT: !206 = !DILocation(line: 54, column: 3, scope: !196) +// CHECK:STDOUT: !207 = !DILocation(line: 49, column: 1, scope: !196) +// CHECK:STDOUT: !208 = !{!197} +// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "first_function", linkageName: "_Cfirst_function.Main.ee57965601b4d646", scope: null, file: !14, line: 57, type: !25, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !259) +// CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !23) +// CHECK:STDOUT: !250 = !DILocation(line: 58, column: 3, scope: !247) +// CHECK:STDOUT: !252 = !DILocation(line: 59, column: 3, scope: !247) +// CHECK:STDOUT: !254 = !DILocation(line: 61, column: 19, scope: !247) +// CHECK:STDOUT: !255 = !DILocation(line: 61, column: 27, scope: !247) +// CHECK:STDOUT: !257 = !DILocation(line: 61, column: 3, scope: !247) +// CHECK:STDOUT: !258 = !DILocation(line: 57, column: 1, scope: !247) +// CHECK:STDOUT: !259 = !{!248} +// CHECK:STDOUT: !273 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.1fce18cf3d70dc46", scope: null, file: !6, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !279) +// CHECK:STDOUT: !274 = !DILocalVariable(arg: 1, scope: !273, type: !23) +// CHECK:STDOUT: !278 = !DILocation(line: 32, column: 1, scope: !273) +// CHECK:STDOUT: !279 = !{!274} +// CHECK:STDOUT: !280 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.a113e72770ff09ec", scope: null, file: !6, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !286) +// CHECK:STDOUT: !281 = !DILocalVariable(arg: 1, scope: !280, type: !23) +// CHECK:STDOUT: !285 = !DILocation(line: 32, column: 1, scope: !280) +// CHECK:STDOUT: !286 = !{!281} +// CHECK:STDOUT: !287 = distinct !DISubprogram(name: "second_function", linkageName: "_Csecond_function.Main.efd9fcdf727c9de5", scope: null, file: !14, line: 70, type: !39, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !309) +// CHECK:STDOUT: !288 = !DILocalVariable(arg: 1, scope: !287, type: !23) +// CHECK:STDOUT: !289 = !DILocalVariable(arg: 2, scope: !287, type: !23) +// CHECK:STDOUT: !290 = !DILocalVariable(arg: 3, scope: !287, type: !23) +// CHECK:STDOUT: !294 = !DILocation(line: 71, column: 3, scope: !287) +// CHECK:STDOUT: !296 = !DILocation(line: 72, column: 3, scope: !287) +// CHECK:STDOUT: !298 = !DILocation(line: 73, column: 3, scope: !287) +// CHECK:STDOUT: !301 = !DILocation(line: 75, column: 25, scope: !287) +// CHECK:STDOUT: !302 = !DILocation(line: 75, column: 33, scope: !287) +// CHECK:STDOUT: !303 = !DILocation(line: 75, column: 3, scope: !287) +// CHECK:STDOUT: !304 = !DILocation(line: 76, column: 18, scope: !287) +// CHECK:STDOUT: !307 = !DILocation(line: 76, column: 3, scope: !287) +// CHECK:STDOUT: !308 = !DILocation(line: 70, column: 1, scope: !287) +// CHECK:STDOUT: !309 = !{!288, !289, !290} +// CHECK:STDOUT: !356 = distinct !DISubprogram(name: "third_function", linkageName: "_Cthird_function.Main.1c39a3b349bf66b6", scope: null, file: !14, line: 35, type: !39, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !374) +// CHECK:STDOUT: !357 = !DILocalVariable(arg: 1, scope: !356, type: !23) +// CHECK:STDOUT: !358 = !DILocalVariable(arg: 2, scope: !356, type: !23) +// CHECK:STDOUT: !359 = !DILocalVariable(arg: 3, scope: !356, type: !23) +// CHECK:STDOUT: !363 = !DILocation(line: 36, column: 3, scope: !356) +// CHECK:STDOUT: !365 = !DILocation(line: 37, column: 3, scope: !356) +// CHECK:STDOUT: !369 = !DILocation(line: 39, column: 30, scope: !356) +// CHECK:STDOUT: !370 = !DILocation(line: 39, column: 3, scope: !356) +// CHECK:STDOUT: !371 = !DILocation(line: 40, column: 19, scope: !356) +// CHECK:STDOUT: !372 = !DILocation(line: 40, column: 3, scope: !356) +// CHECK:STDOUT: !373 = !DILocation(line: 35, column: 1, scope: !356) +// CHECK:STDOUT: !374 = !{!357, !358, !359} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/type_representation.carbon b/toolchain/lower/testdata/function/generic/type_representation.carbon index 9f2391a3bad6..66a5419b6678 100644 --- a/toolchain/lower/testdata/function/generic/type_representation.carbon +++ b/toolchain/lower/testdata/function/generic/type_representation.carbon @@ -79,234 +79,225 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: source_filename = "type_representation.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %self) #0 !dbg !32 { +// CHECK:STDOUT: define i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %self) #0 !dbg !30 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %self, !dbg !38 +// CHECK:STDOUT: ret i32 %self, !dbg !36 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF_i32.Main(i32 %a) #0 !dbg !40 { +// CHECK:STDOUT: define i32 @_CF_i32.Main(i32 %a) #0 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %F.call = call i32 @_CF.Main.119cfe4a022a5052(i32 %a), !dbg !46 -// CHECK:STDOUT: ret i32 %F.call, !dbg !47 +// CHECK:STDOUT: %F.call = call i32 @_CF.Main.82606fae8d66d37c(i32 %a), !dbg !44 +// CHECK:STDOUT: ret i32 %F.call, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define void @"_COp.X.Main:Copy.Main"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: %.loc38_24.1.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !52 +// CHECK:STDOUT: %.loc38_24.2 = load i32, ptr %.loc38_24.1.a, align 4, !dbg !52 +// CHECK:STDOUT: %.loc38_37.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !53 +// CHECK:STDOUT: %.loc38_37.2 = load i32, ptr %.loc38_37.1.b, align 4, !dbg !53 +// CHECK:STDOUT: %.loc38_39.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !54 +// CHECK:STDOUT: store i32 %.loc38_24.2, ptr %.loc38_39.2.a, align 4, !dbg !54 +// CHECK:STDOUT: %.loc38_39.4.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !54 +// CHECK:STDOUT: store i32 %.loc38_37.2, ptr %.loc38_39.4.b, align 4, !dbg !54 +// CHECK:STDOUT: ret void, !dbg !55 // 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 !53 { +// CHECK:STDOUT: define void @_CF_X.Main(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc38_24.1.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !58 -// CHECK:STDOUT: %.loc38_24.2 = load i32, ptr %.loc38_24.1.a, align 4, !dbg !58 -// CHECK:STDOUT: %.loc38_37.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !59 -// CHECK:STDOUT: %.loc38_37.2 = load i32, ptr %.loc38_37.1.b, align 4, !dbg !59 -// CHECK:STDOUT: %.loc38_39.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !60 -// CHECK:STDOUT: store i32 %.loc38_24.2, ptr %.loc38_39.2.a, align 4, !dbg !60 -// CHECK:STDOUT: %.loc38_39.4.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !60 -// CHECK:STDOUT: store i32 %.loc38_37.2, ptr %.loc38_39.4.b, align 4, !dbg !60 -// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: call void @_CF.Main.821738257746b808(ptr %return, ptr %a), !dbg !63 +// CHECK:STDOUT: ret void, !dbg !64 // 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 !63 { +// CHECK:STDOUT: define weak_odr void @"_COp.2508ed710019eba8:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.9d368fc2e01d20c2(ptr %return, ptr %a), !dbg !69 -// CHECK:STDOUT: ret void, !dbg !70 +// CHECK:STDOUT: %.loc44_13.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !68 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc44_13.1.b), !dbg !68 +// CHECK:STDOUT: %.loc44_13.4.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !68 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc44_13.4.a), !dbg !68 +// CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !72 { +// CHECK:STDOUT: define weak_odr void @"_COp.8b0bf151036f045a:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !72 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc44_13.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !74 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc44_13.1.b), !dbg !74 -// CHECK:STDOUT: %.loc44_13.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !74 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc44_13.2.a), !dbg !74 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc44_13.1.b), !dbg !74 +// CHECK:STDOUT: %.loc44_13.4.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !74 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc44_13.4.a), !dbg !74 // CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !76 { +// CHECK:STDOUT: define void @"_COp.61ea2aba74ab3bf1:Copy.Main"() #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core"(ptr %self), !dbg !78 -// CHECK:STDOUT: ret void, !dbg !78 +// CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !80 { +// CHECK:STDOUT: define void @_CF_empty_tuple.Main() #0 !dbg !81 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc44_13.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !82 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc44_13.1.b), !dbg !82 -// CHECK:STDOUT: %.loc44_13.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !82 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc44_13.2.a), !dbg !82 -// CHECK:STDOUT: ret void, !dbg !82 +// CHECK:STDOUT: call void @_CF.Main.45674e9c4b6d1871(), !dbg !86 +// CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !84 { +// CHECK:STDOUT: define void @"_COp.35f6012581c5aabb:Copy.Main"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !88 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8b0bf151036f045a:core.Destroy.Core"(ptr %self), !dbg !86 -// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: %tuple.elem0.loc59_12.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !93 +// CHECK:STDOUT: %tuple.elem0.loc59_12.1.tuple.elem.load = load i32, ptr %tuple.elem0.loc59_12.1.tuple.elem, align 4, !dbg !93 +// CHECK:STDOUT: %tuple.elem0.loc59_12.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !93 +// CHECK:STDOUT: store i32 %tuple.elem0.loc59_12.1.tuple.elem.load, ptr %tuple.elem0.loc59_12.2.tuple.elem, align 4, !dbg !93 +// CHECK:STDOUT: %tuple.elem1.loc59_12.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !93 +// CHECK:STDOUT: %tuple.elem1.loc59_12.1.tuple.elem.load = load i32, ptr %tuple.elem1.loc59_12.1.tuple.elem, align 4, !dbg !93 +// CHECK:STDOUT: %tuple.elem1.loc59_12.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !93 +// CHECK:STDOUT: store i32 %tuple.elem1.loc59_12.1.tuple.elem.load, ptr %tuple.elem1.loc59_12.2.tuple.elem, align 4, !dbg !93 +// CHECK:STDOUT: ret void, !dbg !94 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_COp.61ea2aba74ab3bf1:Copy.Main"() #0 !dbg !88 { +// CHECK:STDOUT: define void @_CF_two_tuple.Main(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !96 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !92 +// CHECK:STDOUT: call void @_CF.Main.10c8e74cd85d15bb(ptr %return, ptr %a), !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 !93 { +// CHECK:STDOUT: define weak_odr void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !105 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.a5d0440dfa027ffe(), !dbg !98 -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !107 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !107 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !107 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !107 +// CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %self) #0 !dbg !100 { +// CHECK:STDOUT: define void @"_COp.3fdbec21075a186f:Copy.Main"(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %self) #0 !dbg !109 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !102 +// CHECK:STDOUT: %tuple.elem0.loc69_17.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %self, i32 0, i32 0, !dbg !114 +// CHECK:STDOUT: %tuple.elem0.loc69_17.tuple.elem.load = load ptr, ptr %tuple.elem0.loc69_17.tuple.elem, align 8, !dbg !114 +// CHECK:STDOUT: %tuple.elem0.loc69_51.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 0, !dbg !115 +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:Copy.Main"(ptr %tuple.elem0.loc69_51.tuple.elem, ptr %tuple.elem0.loc69_17.tuple.elem.load), !dbg !114 +// CHECK:STDOUT: %tuple.elem1.loc69_37.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %self, i32 0, i32 1, !dbg !116 +// CHECK:STDOUT: %tuple.elem1.loc69_37.tuple.elem.load = load ptr, ptr %tuple.elem1.loc69_37.tuple.elem, align 8, !dbg !116 +// CHECK:STDOUT: %tuple.elem1.loc69_51.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 1, !dbg !115 +// 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 !116 +// CHECK:STDOUT: ret void, !dbg !117 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_COp.35f6012581c5aabb:Copy.Main"(ptr sret({ i32, i32 }) %return, ptr %self) #0 !dbg !104 { +// CHECK:STDOUT: define void @_CF_nested_tuple.Main(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %a) #0 !dbg !119 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.loc59_12.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !109 -// CHECK:STDOUT: %tuple.elem0.loc59_12.1.tuple.elem.load = load i32, ptr %tuple.elem0.loc59_12.1.tuple.elem, align 4, !dbg !109 -// CHECK:STDOUT: %tuple.elem0.loc59_12.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !109 -// CHECK:STDOUT: store i32 %tuple.elem0.loc59_12.1.tuple.elem.load, ptr %tuple.elem0.loc59_12.2.tuple.elem, align 4, !dbg !109 -// CHECK:STDOUT: %tuple.elem1.loc59_12.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !109 -// CHECK:STDOUT: %tuple.elem1.loc59_12.1.tuple.elem.load = load i32, ptr %tuple.elem1.loc59_12.1.tuple.elem, align 4, !dbg !109 -// CHECK:STDOUT: %tuple.elem1.loc59_12.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !109 -// CHECK:STDOUT: store i32 %tuple.elem1.loc59_12.1.tuple.elem.load, ptr %tuple.elem1.loc59_12.2.tuple.elem, align 4, !dbg !109 -// CHECK:STDOUT: ret void, !dbg !110 +// CHECK:STDOUT: call void @_CF.Main.2ed3f5f1d0ae313e(ptr %return, ptr %a), !dbg !125 +// CHECK:STDOUT: ret void, !dbg !126 // 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 !112 { +// CHECK:STDOUT: define weak_odr void @"_COp.3fdbec21075a186f:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !128 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.7fb386c5c8090edd(ptr %return, ptr %a), !dbg !118 -// CHECK:STDOUT: ret void, !dbg !119 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !130 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %tuple.elem1.tuple.elem), !dbg !130 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !130 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %tuple.elem0.tuple.elem), !dbg !130 +// CHECK:STDOUT: ret void, !dbg !130 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !121 { +// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.82606fae8d66d37c(i32 %a) #0 !dbg !132 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !123 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !123 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !123 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !123 -// CHECK:STDOUT: ret void, !dbg !123 +// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !137 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !137 +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc18 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !138 +// CHECK:STDOUT: store i32 %Copy.WithSelf.Op.call.loc18, ptr %_.var, align 4, !dbg !137 +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc19 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !140 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var), !dbg !137 +// CHECK:STDOUT: ret i32 %Copy.WithSelf.Op.call.loc19, !dbg !141 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !125 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.821738257746b808(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !143 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self), !dbg !127 -// CHECK:STDOUT: ret void, !dbg !127 +// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !148 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !148 +// CHECK:STDOUT: call void @"_COp.X.Main:Copy.Main"(ptr %_.var, ptr %a), !dbg !149 +// CHECK:STDOUT: call void @"_COp.X.Main:Copy.Main"(ptr %return, ptr %a), !dbg !151 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %_.var), !dbg !148 +// CHECK:STDOUT: ret void, !dbg !152 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_COp.3fdbec21075a186f:Copy.Main"(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %self) #0 !dbg !129 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.loc69_17.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %self, i32 0, i32 0, !dbg !134 -// CHECK:STDOUT: %tuple.elem0.loc69_17.tuple.elem.load = load ptr, ptr %tuple.elem0.loc69_17.tuple.elem, align 8, !dbg !134 -// CHECK:STDOUT: %tuple.elem0.loc69_51.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 0, !dbg !135 -// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:Copy.Main"(ptr %tuple.elem0.loc69_51.tuple.elem, ptr %tuple.elem0.loc69_17.tuple.elem.load), !dbg !134 -// CHECK:STDOUT: %tuple.elem1.loc69_37.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %self, i32 0, i32 1, !dbg !136 -// CHECK:STDOUT: %tuple.elem1.loc69_37.tuple.elem.load = load ptr, ptr %tuple.elem1.loc69_37.tuple.elem, align 8, !dbg !136 -// CHECK:STDOUT: %tuple.elem1.loc69_51.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %return, i32 0, i32 1, !dbg !135 -// 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 !136 -// CHECK:STDOUT: ret void, !dbg !137 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !154 { +// CHECK:STDOUT: ret void, !dbg !159 // 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 !139 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.45674e9c4b6d1871() #0 !dbg !161 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.0f7e0e31294cfcc7(ptr %return, ptr %a), !dbg !145 -// CHECK:STDOUT: ret void, !dbg !146 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !165 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !165 +// CHECK:STDOUT: call void @"_COp.61ea2aba74ab3bf1:Copy.Main"(), !dbg !166 +// CHECK:STDOUT: call void @"_COp.61ea2aba74ab3bf1:Copy.Main"(), !dbg !168 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %_.var), !dbg !165 +// CHECK:STDOUT: ret void, !dbg !169 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.3fdbec21075a186f:core.Destroy.Core"(ptr %self) #0 !dbg !148 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.10c8e74cd85d15bb(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !170 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !150 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !150 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { i32, i32 }, { i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !150 -// CHECK:STDOUT: call void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !150 -// CHECK:STDOUT: ret void, !dbg !150 +// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !175 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !175 +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:Copy.Main"(ptr %_.var, ptr %a), !dbg !176 +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:Copy.Main"(ptr %return, ptr %a), !dbg !178 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %_.var), !dbg !175 +// CHECK:STDOUT: ret void, !dbg !179 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3fdbec21075a186f:core.Destroy.Core"(ptr %self) #0 !dbg !152 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.2ed3f5f1d0ae313e(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %a) #0 !dbg !181 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.3fdbec21075a186f:core.Destroy.Core"(ptr %self), !dbg !154 -// CHECK:STDOUT: ret void, !dbg !154 +// CHECK:STDOUT: %_.var = alloca { { i32, i32 }, { i32, i32 } }, align 4, !dbg !186 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !186 +// CHECK:STDOUT: call void @"_COp.3fdbec21075a186f:Copy.Main"(ptr %_.var, ptr %a), !dbg !187 +// CHECK:STDOUT: call void @"_COp.3fdbec21075a186f:Copy.Main"(ptr %return, ptr %a), !dbg !189 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.1856a248bc68ad79(ptr %_.var), !dbg !186 +// CHECK:STDOUT: ret void, !dbg !190 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CF.Main.119cfe4a022a5052(i32 %a) #0 !dbg !156 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !161 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !161 -// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc18 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !162 -// CHECK:STDOUT: store i32 %Copy.WithSelf.Op.call.loc18, ptr %_.var, align 4, !dbg !161 -// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc19 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !164 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var), !dbg !161 -// CHECK:STDOUT: ret i32 %Copy.WithSelf.Op.call.loc19, !dbg !165 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %t) #0 !dbg !192 { +// CHECK:STDOUT: call void @"_COp.8b0bf151036f045a:core.SubobjectDestroy.Core"(ptr %t), !dbg !196 +// CHECK:STDOUT: ret void, !dbg !197 // 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 !167 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !172 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !172 -// CHECK:STDOUT: call void @"_COp.X.Main:Copy.Main"(ptr %_.var, ptr %a), !dbg !173 -// CHECK:STDOUT: call void @"_COp.X.Main:Copy.Main"(ptr %return, ptr %a), !dbg !175 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %_.var), !dbg !172 -// CHECK:STDOUT: ret void, !dbg !176 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.a5d0440dfa027ffe() #0 !dbg !178 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !182 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !182 -// CHECK:STDOUT: call void @"_COp.61ea2aba74ab3bf1:Copy.Main"(), !dbg !183 -// CHECK:STDOUT: call void @"_COp.61ea2aba74ab3bf1:Copy.Main"(), !dbg !185 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %_.var), !dbg !182 -// CHECK:STDOUT: ret void, !dbg !186 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.7fb386c5c8090edd(ptr sret({ i32, i32 }) %return, ptr %a) #0 !dbg !187 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !192 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !192 -// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:Copy.Main"(ptr %_.var, ptr %a), !dbg !193 -// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:Copy.Main"(ptr %return, ptr %a), !dbg !195 -// CHECK:STDOUT: call void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %_.var), !dbg !192 -// CHECK:STDOUT: ret void, !dbg !196 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.0f7e0e31294cfcc7(ptr sret({ { i32, i32 }, { i32, i32 } }) %return, ptr %a) #0 !dbg !198 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { { i32, i32 }, { i32, i32 } }, align 4, !dbg !203 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !203 -// CHECK:STDOUT: call void @"_COp.3fdbec21075a186f:Copy.Main"(ptr %_.var, ptr %a), !dbg !204 -// CHECK:STDOUT: call void @"_COp.3fdbec21075a186f:Copy.Main"(ptr %return, ptr %a), !dbg !206 -// CHECK:STDOUT: call void @"_CSelfDestruct.3fdbec21075a186f:core.Destroy.Core"(ptr %_.var), !dbg !203 -// CHECK:STDOUT: ret void, !dbg !207 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %t) #0 !dbg !199 { +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %t), !dbg !203 +// CHECK:STDOUT: ret void, !dbg !204 // 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 @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %t) #0 !dbg !206 { +// CHECK:STDOUT: ret void, !dbg !211 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.1856a248bc68ad79(ptr %t) #0 !dbg !213 { +// CHECK:STDOUT: call void @"_COp.3fdbec21075a186f:core.SubobjectDestroy.Core"(ptr %t), !dbg !217 +// CHECK:STDOUT: ret void, !dbg !218 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.2abb6e2621dcf00d, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.ffbc82e0019b7bf2, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 4, 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } @@ -317,139 +308,139 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "type_representation.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20, !20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !26 = !{!25, !25} +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{!23, !23} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = !{null, !23} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !25} +// CHECK:STDOUT: !28 = !{null} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = !{null} -// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.be1e879c1ad406d8.Core:Copy.Main", scope: null, file: !18, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) -// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !20) -// CHECK:STDOUT: !38 = !DILocation(line: 24, column: 5, scope: !32) -// CHECK:STDOUT: !39 = !{!33} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "F_i32", linkageName: "_CF_i32.Main", scope: null, file: !18, line: 28, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !20) -// CHECK:STDOUT: !46 = !DILocation(line: 29, column: 10, scope: !40) -// CHECK:STDOUT: !47 = !DILocation(line: 29, column: 3, scope: !40) -// CHECK:STDOUT: !48 = !{!41} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 29, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) -// 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: "Op", linkageName: "_COp.X.Main:Copy.Main", scope: null, file: !18, line: 37, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !62) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !25) -// CHECK:STDOUT: !58 = !DILocation(line: 38, column: 20, scope: !53) -// CHECK:STDOUT: !59 = !DILocation(line: 38, column: 33, scope: !53) -// CHECK:STDOUT: !60 = !DILocation(line: 38, column: 14, scope: !53) -// CHECK:STDOUT: !61 = !DILocation(line: 38, column: 7, scope: !53) -// CHECK:STDOUT: !62 = !{!54} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "F_X", linkageName: "_CF_X.Main", scope: null, file: !18, line: 43, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !25) -// CHECK:STDOUT: !69 = !DILocation(line: 44, column: 10, scope: !63) -// CHECK:STDOUT: !70 = !DILocation(line: 44, column: 3, scope: !63) -// CHECK:STDOUT: !71 = !{!64} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core", scope: null, file: !18, line: 44, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !75) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !25) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.be1e879c1ad406d8.Core:Copy.Main", scope: null, file: !18, line: 23, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !37) +// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !20) +// CHECK:STDOUT: !36 = !DILocation(line: 24, column: 5, scope: !30) +// CHECK:STDOUT: !37 = !{!31} +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "F_i32", linkageName: "_CF_i32.Main", scope: null, file: !18, line: 28, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !46) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !20) +// CHECK:STDOUT: !44 = !DILocation(line: 29, column: 10, scope: !38) +// CHECK:STDOUT: !45 = !DILocation(line: 29, column: 3, scope: !38) +// CHECK:STDOUT: !46 = !{!39} +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.X.Main:Copy.Main", scope: null, file: !18, line: 37, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !23) +// CHECK:STDOUT: !52 = !DILocation(line: 38, column: 20, scope: !47) +// CHECK:STDOUT: !53 = !DILocation(line: 38, column: 33, scope: !47) +// CHECK:STDOUT: !54 = !DILocation(line: 38, column: 14, scope: !47) +// CHECK:STDOUT: !55 = !DILocation(line: 38, column: 7, scope: !47) +// CHECK:STDOUT: !56 = !{!48} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "F_X", linkageName: "_CF_X.Main", scope: null, file: !18, line: 43, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !23) +// CHECK:STDOUT: !63 = !DILocation(line: 44, column: 10, scope: !57) +// CHECK:STDOUT: !64 = !DILocation(line: 44, column: 3, scope: !57) +// CHECK:STDOUT: !65 = !{!58} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2508ed710019eba8:core.SubobjectDestroy.Core", scope: null, file: !18, line: 44, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !23) +// CHECK:STDOUT: !68 = !DILocation(line: 44, column: 10, scope: !66) +// CHECK:STDOUT: !69 = !{null, !20} +// CHECK:STDOUT: !70 = !DISubroutineType(types: !69) +// CHECK:STDOUT: !71 = !{!67} +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8b0bf151036f045a:core.SubobjectDestroy.Core", scope: null, file: !18, line: 44, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !75) +// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !23) // CHECK:STDOUT: !74 = !DILocation(line: 44, column: 10, scope: !72) // CHECK:STDOUT: !75 = !{!73} -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2508ed710019eba8: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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8b0bf151036f045a: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.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: "Op", linkageName: "_COp.61ea2aba74ab3bf1:Copy.Main", scope: null, file: !18, line: 48, type: !31, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !92 = !DILocation(line: 49, column: 5, scope: !88) -// CHECK:STDOUT: !93 = 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: !98 = !DILocation(line: 54, column: 10, scope: !93) -// CHECK:STDOUT: !99 = !DILocation(line: 54, column: 3, scope: !93) -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !18, line: 54, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !103) -// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !25) -// CHECK:STDOUT: !102 = !DILocation(line: 54, column: 10, scope: !100) -// CHECK:STDOUT: !103 = !{!101} -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Op", linkageName: "_COp.35f6012581c5aabb:Copy.Main", scope: null, file: !18, line: 58, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !111) -// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !25) -// CHECK:STDOUT: !109 = !DILocation(line: 59, column: 12, scope: !104) -// CHECK:STDOUT: !110 = !DILocation(line: 59, column: 5, scope: !104) -// CHECK:STDOUT: !111 = !{!105} -// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "F_two_tuple", linkageName: "_CF_two_tuple.Main", scope: null, file: !18, line: 63, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !120) -// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !25) -// CHECK:STDOUT: !118 = !DILocation(line: 64, column: 10, scope: !112) -// CHECK:STDOUT: !119 = !DILocation(line: 64, column: 3, scope: !112) -// CHECK:STDOUT: !120 = !{!113} -// CHECK:STDOUT: !121 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !18, line: 64, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !124) -// CHECK:STDOUT: !122 = !DILocalVariable(arg: 1, scope: !121, type: !25) -// CHECK:STDOUT: !123 = !DILocation(line: 64, column: 10, scope: !121) -// CHECK:STDOUT: !124 = !{!122} -// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35f6012581c5aabb: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: "Op", linkageName: "_COp.3fdbec21075a186f:Copy.Main", scope: null, file: !18, line: 68, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !138) -// CHECK:STDOUT: !130 = !DILocalVariable(arg: 1, scope: !129, type: !25) -// CHECK:STDOUT: !134 = !DILocation(line: 69, column: 13, scope: !129) -// CHECK:STDOUT: !135 = !DILocation(line: 69, column: 12, scope: !129) -// CHECK:STDOUT: !136 = !DILocation(line: 69, column: 33, scope: !129) -// CHECK:STDOUT: !137 = !DILocation(line: 69, column: 5, scope: !129) -// CHECK:STDOUT: !138 = !{!130} -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "F_nested_tuple", linkageName: "_CF_nested_tuple.Main", scope: null, file: !18, line: 73, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !147) -// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !25) -// CHECK:STDOUT: !145 = !DILocation(line: 74, column: 10, scope: !139) -// CHECK:STDOUT: !146 = !DILocation(line: 74, column: 3, scope: !139) -// CHECK:STDOUT: !147 = !{!140} -// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3fdbec21075a186f:core.Destroy.Core", scope: null, file: !18, line: 74, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !151) -// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !25) -// CHECK:STDOUT: !150 = !DILocation(line: 74, column: 10, scope: !148) -// CHECK:STDOUT: !151 = !{!149} -// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3fdbec21075a186f: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: "F", linkageName: "_CF.Main.119cfe4a022a5052", scope: null, file: !18, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !166) -// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !20) -// CHECK:STDOUT: !161 = !DILocation(line: 18, column: 3, scope: !156) -// CHECK:STDOUT: !162 = !DILocation(line: 18, column: 14, scope: !156) -// CHECK:STDOUT: !164 = !DILocation(line: 19, column: 10, scope: !156) -// CHECK:STDOUT: !165 = !DILocation(line: 19, column: 3, scope: !156) -// CHECK:STDOUT: !166 = !{!157} -// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9d368fc2e01d20c2", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !177) -// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !25) -// CHECK:STDOUT: !172 = !DILocation(line: 18, column: 3, scope: !167) -// CHECK:STDOUT: !173 = !DILocation(line: 18, column: 14, scope: !167) -// CHECK:STDOUT: !175 = !DILocation(line: 19, column: 10, scope: !167) -// CHECK:STDOUT: !176 = !DILocation(line: 19, column: 3, scope: !167) -// CHECK:STDOUT: !177 = !{!168} -// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.a5d0440dfa027ffe", scope: null, file: !18, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !182 = !DILocation(line: 18, column: 3, scope: !178) -// CHECK:STDOUT: !183 = !DILocation(line: 18, column: 14, scope: !178) -// CHECK:STDOUT: !185 = !DILocation(line: 19, column: 10, scope: !178) -// CHECK:STDOUT: !186 = !DILocation(line: 19, column: 3, scope: !178) -// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.7fb386c5c8090edd", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !197) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !25) -// CHECK:STDOUT: !192 = !DILocation(line: 18, column: 3, scope: !187) -// CHECK:STDOUT: !193 = !DILocation(line: 18, column: 14, scope: !187) -// CHECK:STDOUT: !195 = !DILocation(line: 19, column: 10, scope: !187) -// CHECK:STDOUT: !196 = !DILocation(line: 19, column: 3, scope: !187) -// CHECK:STDOUT: !197 = !{!188} -// CHECK:STDOUT: !198 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.0f7e0e31294cfcc7", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !208) -// CHECK:STDOUT: !199 = !DILocalVariable(arg: 1, scope: !198, type: !25) -// CHECK:STDOUT: !203 = !DILocation(line: 18, column: 3, scope: !198) -// CHECK:STDOUT: !204 = !DILocation(line: 18, column: 14, scope: !198) -// CHECK:STDOUT: !206 = !DILocation(line: 19, column: 10, scope: !198) -// CHECK:STDOUT: !207 = !DILocation(line: 19, column: 3, scope: !198) -// CHECK:STDOUT: !208 = !{!199} +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "Op", linkageName: "_COp.61ea2aba74ab3bf1:Copy.Main", scope: null, file: !18, line: 48, type: !29, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !80 = !DILocation(line: 49, column: 5, scope: !76) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "F_empty_tuple", linkageName: "_CF_empty_tuple.Main", scope: null, file: !18, line: 53, type: !29, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !86 = !DILocation(line: 54, column: 10, scope: !81) +// CHECK:STDOUT: !87 = !DILocation(line: 54, column: 3, scope: !81) +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "Op", linkageName: "_COp.35f6012581c5aabb:Copy.Main", scope: null, file: !18, line: 58, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !95) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !23) +// CHECK:STDOUT: !93 = !DILocation(line: 59, column: 12, scope: !88) +// CHECK:STDOUT: !94 = !DILocation(line: 59, column: 5, scope: !88) +// CHECK:STDOUT: !95 = !{!89} +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "F_two_tuple", linkageName: "_CF_two_tuple.Main", scope: null, file: !18, line: 63, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !104) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !23) +// CHECK:STDOUT: !102 = !DILocation(line: 64, column: 10, scope: !96) +// CHECK:STDOUT: !103 = !DILocation(line: 64, column: 3, scope: !96) +// CHECK:STDOUT: !104 = !{!97} +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "Op", linkageName: "_COp.35f6012581c5aabb:core.SubobjectDestroy.Core", scope: null, file: !18, line: 64, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !108) +// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !23) +// CHECK:STDOUT: !107 = !DILocation(line: 64, column: 10, scope: !105) +// CHECK:STDOUT: !108 = !{!106} +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3fdbec21075a186f:Copy.Main", scope: null, file: !18, line: 68, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !118) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !23) +// CHECK:STDOUT: !114 = !DILocation(line: 69, column: 13, scope: !109) +// CHECK:STDOUT: !115 = !DILocation(line: 69, column: 12, scope: !109) +// CHECK:STDOUT: !116 = !DILocation(line: 69, column: 33, scope: !109) +// CHECK:STDOUT: !117 = !DILocation(line: 69, column: 5, scope: !109) +// CHECK:STDOUT: !118 = !{!110} +// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "F_nested_tuple", linkageName: "_CF_nested_tuple.Main", scope: null, file: !18, line: 73, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !127) +// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !23) +// CHECK:STDOUT: !125 = !DILocation(line: 74, column: 10, scope: !119) +// CHECK:STDOUT: !126 = !DILocation(line: 74, column: 3, scope: !119) +// CHECK:STDOUT: !127 = !{!120} +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3fdbec21075a186f:core.SubobjectDestroy.Core", scope: null, file: !18, line: 74, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !131) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !23) +// CHECK:STDOUT: !130 = !DILocation(line: 74, column: 10, scope: !128) +// CHECK:STDOUT: !131 = !{!129} +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.82606fae8d66d37c", scope: null, file: !18, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !142) +// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !20) +// CHECK:STDOUT: !137 = !DILocation(line: 18, column: 3, scope: !132) +// CHECK:STDOUT: !138 = !DILocation(line: 18, column: 14, scope: !132) +// CHECK:STDOUT: !140 = !DILocation(line: 19, column: 10, scope: !132) +// CHECK:STDOUT: !141 = !DILocation(line: 19, column: 3, scope: !132) +// CHECK:STDOUT: !142 = !{!133} +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.821738257746b808", scope: null, file: !18, line: 17, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !153) +// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !23) +// CHECK:STDOUT: !148 = !DILocation(line: 18, column: 3, scope: !143) +// CHECK:STDOUT: !149 = !DILocation(line: 18, column: 14, scope: !143) +// CHECK:STDOUT: !151 = !DILocation(line: 19, column: 10, scope: !143) +// CHECK:STDOUT: !152 = !DILocation(line: 19, column: 3, scope: !143) +// CHECK:STDOUT: !153 = !{!144} +// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !70, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !160) +// CHECK:STDOUT: !155 = !DILocalVariable(arg: 1, scope: !154, type: !20) +// CHECK:STDOUT: !159 = !DILocation(line: 32, column: 1, scope: !154) +// CHECK:STDOUT: !160 = !{!155} +// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.45674e9c4b6d1871", scope: null, file: !18, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !165 = !DILocation(line: 18, column: 3, scope: !161) +// CHECK:STDOUT: !166 = !DILocation(line: 18, column: 14, scope: !161) +// CHECK:STDOUT: !168 = !DILocation(line: 19, column: 10, scope: !161) +// CHECK:STDOUT: !169 = !DILocation(line: 19, column: 3, scope: !161) +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.10c8e74cd85d15bb", scope: null, file: !18, line: 17, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !180) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !23) +// CHECK:STDOUT: !175 = !DILocation(line: 18, column: 3, scope: !170) +// CHECK:STDOUT: !176 = !DILocation(line: 18, column: 14, scope: !170) +// CHECK:STDOUT: !178 = !DILocation(line: 19, column: 10, scope: !170) +// CHECK:STDOUT: !179 = !DILocation(line: 19, column: 3, scope: !170) +// CHECK:STDOUT: !180 = !{!171} +// CHECK:STDOUT: !181 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.2ed3f5f1d0ae313e", scope: null, file: !18, line: 17, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !191) +// CHECK:STDOUT: !182 = !DILocalVariable(arg: 1, scope: !181, type: !23) +// CHECK:STDOUT: !186 = !DILocation(line: 18, column: 3, scope: !181) +// CHECK:STDOUT: !187 = !DILocation(line: 18, column: 14, scope: !181) +// CHECK:STDOUT: !189 = !DILocation(line: 19, column: 10, scope: !181) +// CHECK:STDOUT: !190 = !DILocation(line: 19, column: 3, scope: !181) +// CHECK:STDOUT: !191 = !{!182} +// CHECK:STDOUT: !192 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2abb6e2621dcf00d", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !198) +// CHECK:STDOUT: !193 = !DILocalVariable(arg: 1, scope: !192, type: !23) +// CHECK:STDOUT: !196 = !DILocation(line: 34, column: 5, scope: !192) +// CHECK:STDOUT: !197 = !DILocation(line: 32, column: 1, scope: !192) +// CHECK:STDOUT: !198 = !{!193} +// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ffbc82e0019b7bf2", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !205) +// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !23) +// CHECK:STDOUT: !203 = !DILocation(line: 34, column: 5, scope: !199) +// CHECK:STDOUT: !204 = !DILocation(line: 32, column: 1, scope: !199) +// CHECK:STDOUT: !205 = !{!200} +// CHECK:STDOUT: !206 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9045abb8230cbcdf", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !212) +// CHECK:STDOUT: !207 = !DILocalVariable(arg: 1, scope: !206, type: !23) +// CHECK:STDOUT: !211 = !DILocation(line: 32, column: 1, scope: !206) +// CHECK:STDOUT: !212 = !{!207} +// CHECK:STDOUT: !213 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.1856a248bc68ad79", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !219) +// CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !213, type: !23) +// CHECK:STDOUT: !217 = !DILocation(line: 34, column: 5, scope: !213) +// CHECK:STDOUT: !218 = !DILocation(line: 32, column: 1, scope: !213) +// CHECK:STDOUT: !219 = !{!214} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/impl/impl.carbon b/toolchain/lower/testdata/impl/impl.carbon index da76ab2f7ab4..741da9723b99 100644 --- a/toolchain/lower/testdata/impl/impl.carbon +++ b/toolchain/lower/testdata/impl/impl.carbon @@ -134,57 +134,49 @@ impl C(B) as I { // CHECK:STDOUT: @B.val.loc17_40 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.C.Main:I.bd4fb75a414fe858.Main"(ptr sret({}) %return, ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define void @"_CF.C.Main:I.bd4fb75a414fe858.Main"(ptr sret({}) %return, ptr %self) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @A.val.loc13_40, i64 0, i1 false), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @A.val.loc13_40, i64 0, i1 false), !dbg !51 +// CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.C.Main:I.a6a60dfee2d7d273.Main"(ptr sret({}) %return, ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define void @"_CF.C.Main:I.a6a60dfee2d7d273.Main"(ptr sret({}) %return, ptr %self) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @B.val.loc17_40, i64 0, i1 false), !dbg !60 -// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @B.val.loc17_40, i64 0, i1 false), !dbg !58 +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF1.Main(ptr %x, ptr %y) #0 !dbg !62 { +// CHECK:STDOUT: define void @_CF1.Main(ptr %x, ptr %y) #0 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !67 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !70 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !67 -// CHECK:STDOUT: call void @"_CF.C.Main:I.bd4fb75a414fe858.Main"(ptr %a.var, ptr %x), !dbg !68 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !70 -// CHECK:STDOUT: call void @"_CF.C.Main:I.a6a60dfee2d7d273.Main"(ptr %b.var, ptr %y), !dbg !71 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %b.var), !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %a.var), !dbg !67 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !65 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !68 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !65 +// CHECK:STDOUT: call void @"_CF.C.Main:I.bd4fb75a414fe858.Main"(ptr %a.var, ptr %x), !dbg !66 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !68 +// CHECK:STDOUT: call void @"_CF.C.Main:I.a6a60dfee2d7d273.Main"(ptr %b.var, ptr %y), !dbg !69 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %b.var), !dbg !68 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %a.var), !dbg !65 // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99: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.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.5a23cc09585c55d2: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.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // 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 @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %t) #0 !dbg !75 { +// CHECK:STDOUT: ret void, !dbg !80 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %t) #0 !dbg !82 { +// CHECK:STDOUT: ret void, !dbg !87 +// 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, { 1, 0 } @@ -197,6 +189,7 @@ impl C(B) as I { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !40 = !DIFile(filename: "generic_impls.carbon", directory: "") // CHECK:STDOUT: !41 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !40, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) @@ -204,67 +197,63 @@ impl C(B) as I { // CHECK:STDOUT: !43 = !DISubroutineType(types: !42) // CHECK:STDOUT: !44 = !{null, !21, !21} // CHECK:STDOUT: !45 = !DISubroutineType(types: !44) -// CHECK:STDOUT: !46 = !{null, !21} -// CHECK:STDOUT: !47 = !DISubroutineType(types: !46) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.bd4fb75a414fe858.Main", scope: null, file: !40, line: 13, type: !43, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !54) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !21) -// CHECK:STDOUT: !53 = !DILocation(line: 13, column: 31, scope: !48) -// CHECK:STDOUT: !54 = !{!49} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.a6a60dfee2d7d273.Main", scope: null, file: !40, line: 17, type: !43, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !61) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !21) -// CHECK:STDOUT: !60 = !DILocation(line: 17, column: 31, scope: !55) -// CHECK:STDOUT: !61 = !{!56} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "F1", linkageName: "_CF1.Main", scope: null, file: !40, line: 20, type: !45, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !74) -// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !21) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 2, scope: !62, type: !21) -// CHECK:STDOUT: !67 = !DILocation(line: 21, column: 3, scope: !62) -// CHECK:STDOUT: !68 = !DILocation(line: 21, column: 21, scope: !62) -// CHECK:STDOUT: !70 = !DILocation(line: 22, column: 3, scope: !62) -// CHECK:STDOUT: !71 = !DILocation(line: 22, column: 21, scope: !62) -// CHECK:STDOUT: !73 = !DILocation(line: 20, column: 1, scope: !62) -// CHECK:STDOUT: !74 = !{!63, !64} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !40, line: 22, type: !47, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !78) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.bd4fb75a414fe858.Main", scope: null, file: !40, line: 13, type: !43, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !52) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !21) +// CHECK:STDOUT: !51 = !DILocation(line: 13, column: 31, scope: !46) +// CHECK:STDOUT: !52 = !{!47} +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:I.a6a60dfee2d7d273.Main", scope: null, file: !40, line: 17, type: !43, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !59) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !21) +// CHECK:STDOUT: !58 = !DILocation(line: 17, column: 31, scope: !53) +// CHECK:STDOUT: !59 = !{!54} +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "F1", linkageName: "_CF1.Main", scope: null, file: !40, line: 20, type: !45, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !74) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !21) +// CHECK:STDOUT: !62 = !DILocalVariable(arg: 2, scope: !60, type: !21) +// CHECK:STDOUT: !65 = !DILocation(line: 21, column: 3, scope: !60) +// CHECK:STDOUT: !66 = !DILocation(line: 21, column: 21, scope: !60) +// CHECK:STDOUT: !68 = !DILocation(line: 22, column: 3, scope: !60) +// CHECK:STDOUT: !69 = !DILocation(line: 22, column: 21, scope: !60) +// CHECK:STDOUT: !71 = !{null, !21} +// CHECK:STDOUT: !72 = !DISubroutineType(types: !71) +// CHECK:STDOUT: !73 = !DILocation(line: 20, column: 1, scope: !60) +// CHECK:STDOUT: !74 = !{!61, !62} +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6579a5013ba3dcd2", scope: null, file: !10, line: 32, type: !72, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !81) // 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: "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.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: 21, column: 3, scope: !83) -// CHECK:STDOUT: !86 = !{!84} +// CHECK:STDOUT: !80 = !DILocation(line: 32, column: 1, scope: !75) +// CHECK:STDOUT: !81 = !{!76} +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6b8b385dcf82cc70", scope: null, file: !10, line: 32, type: !72, spFlags: DISPFlagDefinition, unit: !41, retainedNodes: !88) +// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !21) +// CHECK:STDOUT: !87 = !DILocation(line: 32, column: 1, scope: !82) +// CHECK:STDOUT: !88 = !{!83} // 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 !91 { -// CHECK:STDOUT: entry: -// 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 !93 { +// CHECK:STDOUT: define void @"_CF.C.bd4fb75a414fe858.Main:I.Main"() #0 !dbg !93 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !94 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define void @"_CF.C.a6a60dfee2d7d273.Main:I.Main"() #0 !dbg !95 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret void, !dbg !96 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!88} +// 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: !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: !89 = !DIFile(filename: "generic_class_impls.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 = !{null} +// CHECK:STDOUT: !92 = !DISubroutineType(types: !91) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.bd4fb75a414fe858.Main:I.Main", scope: null, file: !89, line: 14, type: !92, spFlags: DISPFlagDefinition, unit: !90) +// CHECK:STDOUT: !94 = !DILocation(line: 14, column: 3, scope: !93) +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.a6a60dfee2d7d273.Main:I.Main", scope: null, file: !89, line: 18, type: !92, spFlags: DISPFlagDefinition, unit: !90) +// CHECK:STDOUT: !96 = !DILocation(line: 18, column: 3, scope: !95) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/impl/import_facet.carbon b/toolchain/lower/testdata/impl/import_facet.carbon index f112c524acbb..34113435ea37 100644 --- a/toolchain/lower/testdata/impl/import_facet.carbon +++ b/toolchain/lower/testdata/impl/import_facet.carbon @@ -92,59 +92,51 @@ fn F(d: D(i32)) -> i32* { // CHECK:STDOUT: ; ModuleID = 'd.carbon' // CHECK:STDOUT: source_filename = "d.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @C.val.b6f.anon = internal constant {} zeroinitializer +// CHECK:STDOUT: @C.val.1e1.anon = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CF.Main(ptr %d) #0 !dbg !17 { +// CHECK:STDOUT: define ptr @_CF.Main(ptr %d) #0 !dbg !15 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc5_21.1.temp = alloca {}, align 1, !dbg !22 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc5_21.1.temp), !dbg !22 -// CHECK:STDOUT: call void @"_CGetI.D.eb057aa32837c84e.Main:I.Main.55456748a8a2eb70"(ptr %.loc5_21.1.temp, ptr %d), !dbg !22 -// CHECK:STDOUT: %C.GetC.call = call ptr @_CGetC.C.Main.3910d7cb16e96622(ptr %.loc5_21.1.temp), !dbg !22 -// CHECK:STDOUT: call void @"_CSelfDestruct.8984d901e2a3a099:core.Destroy.Core"(ptr %.loc5_21.1.temp), !dbg !22 +// CHECK:STDOUT: %.loc5_21.1.temp = alloca {}, align 1, !dbg !20 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc5_21.1.temp), !dbg !20 +// CHECK:STDOUT: call void @"_CGetI.D.eb057aa32837c84e.Main:I.Main.55456748a8a2eb70"(ptr %.loc5_21.1.temp, ptr %d), !dbg !20 +// CHECK:STDOUT: %C.GetC.call = call ptr @_CGetC.C.Main.ba9e1b1212a208fc(ptr %.loc5_21.1.temp), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.15aa9db226b6d202(ptr %.loc5_21.1.temp), !dbg !20 // CHECK:STDOUT: ret ptr %C.GetC.call, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a17e1ddde5b22223: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.cb8adced19392b99: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.8984d901e2a3a099: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: 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.55456748a8a2eb70"(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.b6f.anon, i64 0, i1 false), !dbg !42 -// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: define linkonce_odr void @"_CGetI.D.eb057aa32837c84e.Main:I.Main.55456748a8a2eb70"(ptr sret({}) %return, ptr %self) #0 !dbg !25 { +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @C.val.1e1.anon, i64 0, i1 false), !dbg !30 +// CHECK:STDOUT: ret void, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CGetC.C.Main.3910d7cb16e96622(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.a17e1ddde5b22223:core.Destroy.Core"(ptr %1), !dbg !49 -// CHECK:STDOUT: ret ptr %2, !dbg !52 +// CHECK:STDOUT: define linkonce_odr ptr @_CGetC.C.Main.ba9e1b1212a208fc(ptr %self) #0 !dbg !32 { +// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !37 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !37 +// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !37 +// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !39 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5da679f5f4cb5255(ptr %1), !dbg !37 +// CHECK:STDOUT: ret ptr %2, !dbg !40 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.15aa9db226b6d202(ptr %t) #0 !dbg !43 { +// 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.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 @_CSelfDestruct.Core.5da679f5f4cb5255(ptr %t) #0 !dbg !50 { +// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -160,33 +152,30 @@ fn F(d: D(i32)) -> i32* { // CHECK:STDOUT: !12 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !13 = !{!12, !12} // CHECK:STDOUT: !14 = !DISubroutineType(types: !13) -// CHECK:STDOUT: !15 = !{null, !12} -// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !10, line: 4, type: !14, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !24) -// CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !17, type: !12) -// CHECK:STDOUT: !22 = !DILocation(line: 5, column: 10, scope: !17) -// CHECK:STDOUT: !23 = !DILocation(line: 5, column: 3, scope: !17) -// CHECK:STDOUT: !24 = !{!18} -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !8, line: 5, type: !16, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !28) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !10, line: 4, type: !14, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !24) +// CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !15, type: !12) +// CHECK:STDOUT: !20 = !DILocation(line: 5, column: 10, scope: !15) +// CHECK:STDOUT: !21 = !{null, !12} +// CHECK:STDOUT: !22 = !DISubroutineType(types: !21) +// CHECK:STDOUT: !23 = !DILocation(line: 5, column: 3, scope: !15) +// CHECK:STDOUT: !24 = !{!16} +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "GetI", linkageName: "_CGetI.D.eb057aa32837c84e.Main:I.Main.55456748a8a2eb70", scope: null, file: !8, line: 6, type: !14, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !31) // CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !12) -// CHECK:STDOUT: !27 = !DILocation(line: 5, column: 24, scope: !25) -// CHECK:STDOUT: !28 = !{!26} -// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !10, line: 5, type: !16, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !32) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.8984d901e2a3a099: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: "GetI", linkageName: "_CGetI.D.eb057aa32837c84e.Main:I.Main.55456748a8a2eb70", 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: !42 = !DILocation(line: 7, column: 7, scope: !37) -// CHECK:STDOUT: !43 = !{!38} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "GetC", linkageName: "_CGetC.C.Main.3910d7cb16e96622", 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: !30 = !DILocation(line: 7, column: 7, scope: !25) +// CHECK:STDOUT: !31 = !{!26} +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "GetC", linkageName: "_CGetC.C.Main.ba9e1b1212a208fc", scope: null, file: !4, line: 4, type: !14, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !41) +// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !12) +// CHECK:STDOUT: !37 = !DILocation(line: 5, column: 5, scope: !32) +// CHECK:STDOUT: !39 = !DILocation(line: 6, column: 12, scope: !32) +// CHECK:STDOUT: !40 = !DILocation(line: 6, column: 5, scope: !32) +// CHECK:STDOUT: !41 = !{!33} +// CHECK:STDOUT: !42 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.15aa9db226b6d202", scope: null, file: !42, line: 36, type: !22, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !49) +// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !12) +// CHECK:STDOUT: !48 = !DILocation(line: 36, column: 1, scope: !43) +// CHECK:STDOUT: !49 = !{!44} +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5da679f5f4cb5255", scope: null, file: !42, line: 36, type: !22, spFlags: DISPFlagDefinition, unit: !11, retainedNodes: !56) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !12) +// CHECK:STDOUT: !55 = !DILocation(line: 36, column: 1, scope: !50) +// CHECK:STDOUT: !56 = !{!51} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/impl/import_thunk.carbon b/toolchain/lower/testdata/impl/import_thunk.carbon index 77cac07bdc99..476b26e4b547 100644 --- a/toolchain/lower/testdata/impl/import_thunk.carbon +++ b/toolchain/lower/testdata/impl/import_thunk.carbon @@ -71,92 +71,84 @@ fn Test(a: A) -> C { // CHECK:STDOUT: source_filename = "thunk.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr sret({ i32 }) %return, ptr %self) #0 !dbg !28 { +// CHECK:STDOUT: define void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr sret({ i32 }) %return, ptr %self) #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_47.1.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !33 -// CHECK:STDOUT: %.loc9_47.2 = load i32, ptr %.loc9_47.1.a, align 4, !dbg !33 -// CHECK:STDOUT: %.loc9_49.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !34 -// CHECK:STDOUT: store i32 %.loc9_47.2, ptr %.loc9_49.2.b, align 4, !dbg !34 -// CHECK:STDOUT: ret void, !dbg !35 +// CHECK:STDOUT: %.loc9_47.1.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !31 +// CHECK:STDOUT: %.loc9_47.2 = load i32, ptr %.loc9_47.1.a, align 4, !dbg !31 +// CHECK:STDOUT: %.loc9_49.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !32 +// CHECK:STDOUT: store i32 %.loc9_47.2, ptr %.loc9_49.2.b, align 4, !dbg !32 +// CHECK:STDOUT: ret void, !dbg !33 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr sret({ i32 }) %return, ptr %self) #0 !dbg !37 { +// CHECK:STDOUT: define void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr sret({ i32 }) %return, ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12_47.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !42 -// CHECK:STDOUT: %.loc12_47.2 = load i32, ptr %.loc12_47.1.b, align 4, !dbg !42 -// CHECK:STDOUT: %.loc12_49.2.c = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !43 -// CHECK:STDOUT: store i32 %.loc12_47.2, ptr %.loc12_49.2.c, align 4, !dbg !43 -// CHECK:STDOUT: ret void, !dbg !44 +// CHECK:STDOUT: %.loc12_47.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !40 +// CHECK:STDOUT: %.loc12_47.2 = load i32, ptr %.loc12_47.1.b, align 4, !dbg !40 +// CHECK:STDOUT: %.loc12_49.2.c = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !41 +// CHECK:STDOUT: store i32 %.loc12_47.2, ptr %.loc12_49.2.c, align 4, !dbg !41 +// CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %b) #0 !dbg !46 { +// CHECK:STDOUT: define void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %b) #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20_35.1.b = getelementptr inbounds nuw { i32 }, ptr %b, i32 0, i32 0, !dbg !51 -// CHECK:STDOUT: %.loc20_35.2 = load i32, ptr %.loc20_35.1.b, align 4, !dbg !51 -// CHECK:STDOUT: %.loc20_37.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !52 -// CHECK:STDOUT: store i32 %.loc20_35.2, ptr %.loc20_37.2.b, align 4, !dbg !52 -// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: %.loc20_35.1.b = getelementptr inbounds nuw { i32 }, ptr %b, i32 0, i32 0, !dbg !49 +// CHECK:STDOUT: %.loc20_35.2 = load i32, ptr %.loc20_35.1.b, align 4, !dbg !49 +// CHECK:STDOUT: %.loc20_37.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !50 +// CHECK:STDOUT: store i32 %.loc20_35.2, ptr %.loc20_37.2.b, align 4, !dbg !50 +// CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CF:thunk:I.6a2feaaa6331eb92.Main:61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CF:thunk:I.6a2feaaa6331eb92.Main:61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20_19.1.temp = alloca { i32 }, align 4, !dbg !58 -// CHECK:STDOUT: %.loc20_19.2.temp = alloca { i32 }, align 4, !dbg !58 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_19.1.temp), !dbg !58 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_19.2.temp), !dbg !58 -// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc20_19.2.temp, ptr %a), !dbg !58 -// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc20_19.1.temp, ptr %.loc20_19.2.temp), !dbg !58 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc20_19.1.temp), !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc20_19.1.temp), !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc20_19.2.temp), !dbg !58 -// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: %.loc20_19.1.temp = alloca { i32 }, align 4, !dbg !56 +// CHECK:STDOUT: %.loc20_19.2.temp = alloca { i32 }, align 4, !dbg !56 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_19.1.temp), !dbg !56 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_19.2.temp), !dbg !56 +// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc20_19.2.temp, ptr %a), !dbg !56 +// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc20_19.1.temp, ptr %.loc20_19.2.temp), !dbg !56 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc20_19.1.temp), !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc20_19.1.temp), !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc20_19.2.temp), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_COp.5bf3a215c2b17be3:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: %.loc20_19.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !60 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc20_19.1.b), !dbg !60 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self) #0 !dbg !64 { +// CHECK:STDOUT: define weak_odr void @"_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !66 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc20.b), !dbg !66 +// CHECK:STDOUT: %.loc20_19.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !66 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc20_19.1.b), !dbg !66 // CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self) #0 !dbg !68 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5bf3a215c2b17be3: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.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !72 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !74 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc20.b), !dbg !74 -// CHECK:STDOUT: ret void, !dbg !74 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !76 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !78 -// CHECK:STDOUT: ret void, !dbg !78 -// 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 void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %t) #0 !dbg !68 { +// CHECK:STDOUT: call void @"_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core"(ptr %t), !dbg !72 +// CHECK:STDOUT: ret void, !dbg !73 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !75 { +// CHECK:STDOUT: ret void, !dbg !80 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6579a5013ba3dcd2, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { alwaysinline nounwind } @@ -167,78 +159,76 @@ fn Test(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "thunk.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!21, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{null, !20} +// CHECK:STDOUT: !24 = !{null, !21} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !21} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !36) -// CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !21) -// CHECK:STDOUT: !33 = !DILocation(line: 9, column: 43, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 9, column: 37, scope: !28) -// CHECK:STDOUT: !35 = !DILocation(line: 9, column: 30, scope: !28) -// CHECK:STDOUT: !36 = !{!29} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core", scope: null, file: !18, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) -// CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !21) -// CHECK:STDOUT: !42 = !DILocation(line: 12, column: 43, scope: !37) -// CHECK:STDOUT: !43 = !DILocation(line: 12, column: 37, scope: !37) -// CHECK:STDOUT: !44 = !DILocation(line: 12, column: 30, scope: !37) -// CHECK:STDOUT: !45 = !{!38} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.61ea2aba74ab3bf1:I.Main", scope: null, file: !18, line: 20, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !21) -// CHECK:STDOUT: !51 = !DILocation(line: 20, column: 34, scope: !46) -// CHECK:STDOUT: !52 = !DILocation(line: 20, column: 28, scope: !46) -// CHECK:STDOUT: !53 = !DILocation(line: 20, column: 21, scope: !46) -// CHECK:STDOUT: !54 = !{!47} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.6a2feaaa6331eb92.Main:61ea2aba74ab3bf1:I.Main", scope: null, file: !18, line: 20, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !21) -// CHECK:STDOUT: !58 = !DILocation(line: 20, column: 3, scope: !55) -// CHECK:STDOUT: !59 = !{!56} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) -// 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.5bf3a215c2b17be3:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !34) +// CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !21) +// CHECK:STDOUT: !31 = !DILocation(line: 9, column: 43, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 9, column: 37, scope: !26) +// CHECK:STDOUT: !33 = !DILocation(line: 9, column: 30, scope: !26) +// CHECK:STDOUT: !34 = !{!27} +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core", scope: null, file: !18, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !21) +// CHECK:STDOUT: !40 = !DILocation(line: 12, column: 43, scope: !35) +// CHECK:STDOUT: !41 = !DILocation(line: 12, column: 37, scope: !35) +// CHECK:STDOUT: !42 = !DILocation(line: 12, column: 30, scope: !35) +// CHECK:STDOUT: !43 = !{!36} +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "F", linkageName: "_CF.61ea2aba74ab3bf1:I.Main", scope: null, file: !18, line: 20, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) +// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !21) +// CHECK:STDOUT: !49 = !DILocation(line: 20, column: 34, scope: !44) +// CHECK:STDOUT: !50 = !DILocation(line: 20, column: 28, scope: !44) +// CHECK:STDOUT: !51 = !DILocation(line: 20, column: 21, scope: !44) +// CHECK:STDOUT: !52 = !{!45} +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.6a2feaaa6331eb92.Main:61ea2aba74ab3bf1:I.Main", scope: null, file: !18, line: 20, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !21) +// CHECK:STDOUT: !56 = !DILocation(line: 20, column: 3, scope: !53) +// CHECK:STDOUT: !57 = !{!54} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5bf3a215c2b17be3:core.SubobjectDestroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !21) +// CHECK:STDOUT: !60 = !DILocation(line: 20, column: 3, scope: !58) +// CHECK:STDOUT: !61 = !{null, !20} +// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) +// CHECK:STDOUT: !63 = !{!59} +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !21) // CHECK:STDOUT: !66 = !DILocation(line: 20, column: 3, scope: !64) // CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5bf3a215c2b17be3:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6579a5013ba3dcd2", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !74) // 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.8c4b83ecd900f1ea: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.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: !72 = !DILocation(line: 34, column: 5, scope: !68) +// CHECK:STDOUT: !73 = !DILocation(line: 32, column: 1, scope: !68) +// CHECK:STDOUT: !74 = !{!69} +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !62, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !81) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !20) +// CHECK:STDOUT: !80 = !DILocation(line: 32, column: 1, scope: !75) +// CHECK:STDOUT: !81 = !{!76} // 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 !82 { +// CHECK:STDOUT: define void @_CTest.Main(ptr sret({ i32 }) %return, ptr %a) #0 !dbg !84 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_20.1.temp = alloca { i32 }, align 4, !dbg !88 -// CHECK:STDOUT: %.loc7_20.2.temp = alloca { i32 }, align 4, !dbg !88 -// CHECK:STDOUT: %.loc7_19.1.temp = alloca { i32 }, align 4, !dbg !87 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.1.temp), !dbg !88 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.2.temp), !dbg !88 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_19.1.temp), !dbg !87 -// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc7_19.1.temp, ptr %a), !dbg !87 -// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc7_20.2.temp, ptr %.loc7_19.1.temp), !dbg !88 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc7_20.2.temp), !dbg !89 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc7_20.2.temp), !dbg !88 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc7_19.1.temp), !dbg !87 -// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: %.loc7_20.1.temp = alloca { i32 }, align 4, !dbg !90 +// CHECK:STDOUT: %.loc7_20.2.temp = alloca { i32 }, align 4, !dbg !90 +// CHECK:STDOUT: %.loc7_19.1.temp = alloca { i32 }, align 4, !dbg !89 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.1.temp), !dbg !90 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.2.temp), !dbg !90 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_19.1.temp), !dbg !89 +// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc7_19.1.temp, ptr %a), !dbg !89 +// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc7_20.2.temp, ptr %.loc7_19.1.temp), !dbg !90 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc7_20.2.temp), !dbg !91 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc7_20.2.temp), !dbg !90 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc7_19.1.temp), !dbg !89 +// CHECK:STDOUT: ret void, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CF:thunk:I.f5faeaa774ca256e.Main:61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }), ptr) @@ -250,120 +240,110 @@ 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_COp.5bf3a215c2b17be3:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: %.loc7_20.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !95 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_20.1.b), !dbg !95 +// CHECK:STDOUT: ret void, !dbg !95 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self) #0 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !97 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !97 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.b), !dbg !97 -// CHECK:STDOUT: ret void, !dbg !97 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self) #0 !dbg !99 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5bf3a215c2b17be3: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.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !103 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !105 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.b), !dbg !105 -// CHECK:STDOUT: ret void, !dbg !105 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !107 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !109 -// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: %.loc7_20.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !99 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_20.1.b), !dbg !99 +// CHECK:STDOUT: ret void, !dbg !99 // 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 @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %t) #0 !dbg !101 { +// CHECK:STDOUT: call void @"_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core"(ptr %t), !dbg !105 +// CHECK:STDOUT: ret void, !dbg !106 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !108 { +// CHECK:STDOUT: ret void, !dbg !113 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6579a5013ba3dcd2, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // 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 = !{!81} +// CHECK:STDOUT: !llvm.dbg.cu = !{!83} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!21, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{null, !20} +// CHECK:STDOUT: !24 = !{null, !21} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !21} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !80 = !DIFile(filename: "call_thunk.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: "Test", linkageName: "_CTest.Main", scope: null, file: !80, line: 6, type: !23, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !90) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !21) -// CHECK:STDOUT: !87 = !DILocation(line: 7, column: 19, scope: !82) -// CHECK:STDOUT: !88 = !DILocation(line: 7, column: 10, scope: !82) -// CHECK:STDOUT: !89 = !DILocation(line: 7, column: 3, scope: !82) -// CHECK:STDOUT: !90 = !{!83} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !80, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !94) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !20) -// CHECK:STDOUT: !93 = !DILocation(line: 7, column: 10, scope: !91) -// CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5bf3a215c2b17be3:core.Destroy.Core", scope: null, file: !80, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !98) -// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !21) -// CHECK:STDOUT: !97 = !DILocation(line: 7, column: 10, scope: !95) -// CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5bf3a215c2b17be3:core.Destroy.Core", scope: null, file: !80, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !102) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !21) -// CHECK:STDOUT: !101 = !DILocation(line: 7, column: 10, scope: !99) -// CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !80, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !81, 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.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !80, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !81, 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: !61 = !{null, !20} +// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) +// CHECK:STDOUT: !82 = !DIFile(filename: "call_thunk.carbon", directory: "") +// CHECK:STDOUT: !83 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !82, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !82, line: 6, type: !23, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !92) +// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !21) +// CHECK:STDOUT: !89 = !DILocation(line: 7, column: 19, scope: !84) +// CHECK:STDOUT: !90 = !DILocation(line: 7, column: 10, scope: !84) +// CHECK:STDOUT: !91 = !DILocation(line: 7, column: 3, scope: !84) +// CHECK:STDOUT: !92 = !{!85} +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5bf3a215c2b17be3:core.SubobjectDestroy.Core", scope: null, file: !82, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !96) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !21) +// CHECK:STDOUT: !95 = !DILocation(line: 7, column: 10, scope: !93) +// CHECK:STDOUT: !96 = !{!94} +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core", scope: null, file: !82, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !100) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !21) +// CHECK:STDOUT: !99 = !DILocation(line: 7, column: 10, scope: !97) +// CHECK:STDOUT: !100 = !{!98} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6579a5013ba3dcd2", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !107) +// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !21) +// CHECK:STDOUT: !105 = !DILocation(line: 34, column: 5, scope: !101) +// CHECK:STDOUT: !106 = !DILocation(line: 32, column: 1, scope: !101) +// CHECK:STDOUT: !107 = !{!102} +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !62, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !114) +// CHECK:STDOUT: !109 = !DILocalVariable(arg: 1, scope: !108, type: !20) +// CHECK:STDOUT: !113 = !DILocation(line: 32, column: 1, scope: !108) +// CHECK:STDOUT: !114 = !{!109} // 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 !113 { +// CHECK:STDOUT: define void @"_CF.X.Main:I.Main"(ptr sret({ i32 }) %return, ptr %b) #0 !dbg !117 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_35.1.b = getelementptr inbounds nuw { i32 }, ptr %b, i32 0, i32 0, !dbg !118 -// CHECK:STDOUT: %.loc9_35.2 = load i32, ptr %.loc9_35.1.b, align 4, !dbg !118 -// CHECK:STDOUT: %.loc9_37.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !119 -// CHECK:STDOUT: store i32 %.loc9_35.2, ptr %.loc9_37.2.b, align 4, !dbg !119 -// CHECK:STDOUT: ret void, !dbg !120 +// CHECK:STDOUT: %.loc9_35.1.b = getelementptr inbounds nuw { i32 }, ptr %b, i32 0, i32 0, !dbg !122 +// CHECK:STDOUT: %.loc9_35.2 = load i32, ptr %.loc9_35.1.b, align 4, !dbg !122 +// CHECK:STDOUT: %.loc9_37.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !123 +// CHECK:STDOUT: store i32 %.loc9_35.2, ptr %.loc9_37.2.b, align 4, !dbg !123 +// CHECK:STDOUT: ret void, !dbg !124 // 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 !122 { +// CHECK:STDOUT: define weak_odr void @"_CF:thunk:I.d0cc85b6c89517e3.Main:X.Main:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !126 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_19.1.temp = alloca { i32 }, align 4, !dbg !125 -// CHECK:STDOUT: %.loc9_19.2.temp = alloca { i32 }, align 4, !dbg !125 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_19.1.temp), !dbg !125 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_19.2.temp), !dbg !125 -// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc9_19.2.temp, ptr %a), !dbg !125 -// CHECK:STDOUT: call void @"_CF.X.Main:I.Main"(ptr %.loc9_19.1.temp, ptr %.loc9_19.2.temp), !dbg !125 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc9_19.1.temp), !dbg !125 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc9_19.1.temp), !dbg !125 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc9_19.2.temp), !dbg !125 -// CHECK:STDOUT: ret void, !dbg !125 +// CHECK:STDOUT: %.loc9_19.1.temp = alloca { i32 }, align 4, !dbg !129 +// CHECK:STDOUT: %.loc9_19.2.temp = alloca { i32 }, align 4, !dbg !129 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_19.1.temp), !dbg !129 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_19.2.temp), !dbg !129 +// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc9_19.2.temp, ptr %a), !dbg !129 +// CHECK:STDOUT: call void @"_CF.X.Main:I.Main"(ptr %.loc9_19.1.temp, ptr %.loc9_19.2.temp), !dbg !129 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc9_19.1.temp), !dbg !129 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc9_19.1.temp), !dbg !129 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc9_19.2.temp), !dbg !129 +// CHECK:STDOUT: ret void, !dbg !129 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr sret({ i32 }), ptr) @@ -371,117 +351,107 @@ 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !127 { +// CHECK:STDOUT: define weak_odr void @"_COp.5bf3a215c2b17be3:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !131 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !129 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self) #0 !dbg !131 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !133 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc9.b), !dbg !133 +// CHECK:STDOUT: %.loc9_19.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !133 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc9_19.1.b), !dbg !133 // CHECK:STDOUT: ret void, !dbg !133 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self) #0 !dbg !135 { +// CHECK:STDOUT: define weak_odr void @"_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !135 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self), !dbg !137 +// CHECK:STDOUT: %.loc9_19.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !137 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc9_19.1.b), !dbg !137 // CHECK:STDOUT: ret void, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !139 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !141 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc9.b), !dbg !141 -// CHECK:STDOUT: ret void, !dbg !141 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !143 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !145 -// CHECK:STDOUT: ret void, !dbg !145 -// 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 void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %t) #0 !dbg !139 { +// CHECK:STDOUT: call void @"_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core"(ptr %t), !dbg !143 +// CHECK:STDOUT: ret void, !dbg !144 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !146 { +// CHECK:STDOUT: ret void, !dbg !151 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6579a5013ba3dcd2, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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 = !{!112} +// CHECK:STDOUT: !llvm.dbg.cu = !{!116} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!21, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{null, !20} +// CHECK:STDOUT: !24 = !{null, !21} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !21} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !111 = !DIFile(filename: "thunk_for_imported_interface.carbon", directory: "") -// CHECK:STDOUT: !112 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !111, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !111, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !121) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !21) -// CHECK:STDOUT: !118 = !DILocation(line: 9, column: 34, scope: !113) -// CHECK:STDOUT: !119 = !DILocation(line: 9, column: 28, scope: !113) -// CHECK:STDOUT: !120 = !DILocation(line: 9, column: 21, scope: !113) -// CHECK:STDOUT: !121 = !{!114} -// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.d0cc85b6c89517e3.Main:X.Main:I.Main", scope: null, file: !111, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !126) -// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !21) -// CHECK:STDOUT: !125 = !DILocation(line: 9, column: 3, scope: !122) -// CHECK:STDOUT: !126 = !{!123} -// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !111, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !130) -// CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !127, type: !20) -// CHECK:STDOUT: !129 = !DILocation(line: 9, column: 3, scope: !127) -// CHECK:STDOUT: !130 = !{!128} -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5bf3a215c2b17be3:core.Destroy.Core", scope: null, file: !111, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !134) +// CHECK:STDOUT: !61 = !{null, !20} +// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) +// CHECK:STDOUT: !115 = !DIFile(filename: "thunk_for_imported_interface.carbon", directory: "") +// CHECK:STDOUT: !116 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !115, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "F", linkageName: "_CF.X.Main:I.Main", scope: null, file: !115, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !125) +// CHECK:STDOUT: !118 = !DILocalVariable(arg: 1, scope: !117, type: !21) +// CHECK:STDOUT: !122 = !DILocation(line: 9, column: 34, scope: !117) +// CHECK:STDOUT: !123 = !DILocation(line: 9, column: 28, scope: !117) +// CHECK:STDOUT: !124 = !DILocation(line: 9, column: 21, scope: !117) +// CHECK:STDOUT: !125 = !{!118} +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.d0cc85b6c89517e3.Main:X.Main:I.Main", scope: null, file: !115, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !130) +// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !21) +// CHECK:STDOUT: !129 = !DILocation(line: 9, column: 3, scope: !126) +// CHECK:STDOUT: !130 = !{!127} +// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5bf3a215c2b17be3:core.SubobjectDestroy.Core", scope: null, file: !115, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !134) // CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !21) // CHECK:STDOUT: !133 = !DILocation(line: 9, column: 3, scope: !131) // CHECK:STDOUT: !134 = !{!132} -// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5bf3a215c2b17be3:core.Destroy.Core", scope: null, file: !111, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !138) +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core", scope: null, file: !115, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !138) // CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !21) // CHECK:STDOUT: !137 = !DILocation(line: 9, column: 3, scope: !135) // CHECK:STDOUT: !138 = !{!136} -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !111, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !142) +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6579a5013ba3dcd2", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !145) // CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !21) -// CHECK:STDOUT: !141 = !DILocation(line: 9, column: 3, scope: !139) -// CHECK:STDOUT: !142 = !{!140} -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !111, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !112, 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: !143 = !DILocation(line: 34, column: 5, scope: !139) +// CHECK:STDOUT: !144 = !DILocation(line: 32, column: 1, scope: !139) +// CHECK:STDOUT: !145 = !{!140} +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !62, spFlags: DISPFlagDefinition, unit: !116, retainedNodes: !152) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !20) +// CHECK:STDOUT: !151 = !DILocation(line: 32, column: 1, scope: !146) +// CHECK:STDOUT: !152 = !{!147} // 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 !149 { +// CHECK:STDOUT: define void @_CTest.Main(ptr sret({ i32 }) %return, ptr %a) #0 !dbg !155 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8_19.1.temp = alloca { i32 }, align 4, !dbg !155 -// CHECK:STDOUT: %.loc8_19.2.temp = alloca { i32 }, align 4, !dbg !155 -// CHECK:STDOUT: %.loc8_18.1.temp = alloca { i32 }, align 4, !dbg !154 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_19.1.temp), !dbg !155 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_19.2.temp), !dbg !155 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_18.1.temp), !dbg !154 -// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc8_18.1.temp, ptr %a), !dbg !154 -// CHECK:STDOUT: call void @"_CF.X.Main:I.Main"(ptr %.loc8_19.2.temp, ptr %.loc8_18.1.temp), !dbg !155 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc8_19.2.temp), !dbg !156 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc8_19.2.temp), !dbg !155 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc8_18.1.temp), !dbg !154 -// CHECK:STDOUT: ret void, !dbg !156 +// CHECK:STDOUT: %.loc8_19.1.temp = alloca { i32 }, align 4, !dbg !161 +// CHECK:STDOUT: %.loc8_19.2.temp = alloca { i32 }, align 4, !dbg !161 +// CHECK:STDOUT: %.loc8_18.1.temp = alloca { i32 }, align 4, !dbg !160 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_19.1.temp), !dbg !161 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_19.2.temp), !dbg !161 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_18.1.temp), !dbg !160 +// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc8_18.1.temp, ptr %a), !dbg !160 +// CHECK:STDOUT: call void @"_CF.X.Main:I.Main"(ptr %.loc8_19.2.temp, ptr %.loc8_18.1.temp), !dbg !161 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc8_19.2.temp), !dbg !162 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc8_19.2.temp), !dbg !161 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc8_18.1.temp), !dbg !160 +// CHECK:STDOUT: ret void, !dbg !162 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_CF:thunk:I.4980a17f6b368c72.Main:X.Main:I.Main"(ptr sret({ i32 }), ptr) @@ -493,90 +463,80 @@ 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !158 { +// CHECK:STDOUT: define weak_odr void @"_COp.5bf3a215c2b17be3:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !164 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !160 +// CHECK:STDOUT: %.loc8_19.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !166 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc8_19.1.b), !dbg !166 +// CHECK:STDOUT: ret void, !dbg !166 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self) #0 !dbg !162 { +// CHECK:STDOUT: define weak_odr void @"_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !168 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !164 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc8.b), !dbg !164 -// CHECK:STDOUT: ret void, !dbg !164 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self) #0 !dbg !166 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self), !dbg !168 -// CHECK:STDOUT: ret void, !dbg !168 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !170 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !172 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc8.b), !dbg !172 -// CHECK:STDOUT: ret void, !dbg !172 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !174 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !176 -// CHECK:STDOUT: ret void, !dbg !176 +// CHECK:STDOUT: %.loc8_19.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !170 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc8_19.1.b), !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 void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %t) #0 !dbg !172 { +// CHECK:STDOUT: call void @"_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core"(ptr %t), !dbg !176 +// CHECK:STDOUT: ret void, !dbg !177 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !179 { +// CHECK:STDOUT: ret void, !dbg !184 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6579a5013ba3dcd2, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // 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 = !{!148} +// CHECK:STDOUT: !llvm.dbg.cu = !{!154} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!21, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{null, !20} +// CHECK:STDOUT: !24 = !{null, !21} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !21} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !147 = !DIFile(filename: "call_thunk_for_imported_interface.carbon", directory: "") -// CHECK:STDOUT: !148 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !147, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !147, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !148, retainedNodes: !157) -// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !21) -// CHECK:STDOUT: !154 = !DILocation(line: 8, column: 18, scope: !149) -// CHECK:STDOUT: !155 = !DILocation(line: 8, column: 10, scope: !149) -// CHECK:STDOUT: !156 = !DILocation(line: 8, column: 3, scope: !149) -// CHECK:STDOUT: !157 = !{!150} -// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !147, line: 8, type: !25, spFlags: DISPFlagDefinition, unit: !148, retainedNodes: !161) -// CHECK:STDOUT: !159 = !DILocalVariable(arg: 1, scope: !158, type: !20) -// CHECK:STDOUT: !160 = !DILocation(line: 8, column: 10, scope: !158) -// CHECK:STDOUT: !161 = !{!159} -// CHECK:STDOUT: !162 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5bf3a215c2b17be3:core.Destroy.Core", scope: null, file: !147, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !148, retainedNodes: !165) -// CHECK:STDOUT: !163 = !DILocalVariable(arg: 1, scope: !162, type: !21) -// CHECK:STDOUT: !164 = !DILocation(line: 8, column: 10, scope: !162) -// CHECK:STDOUT: !165 = !{!163} -// CHECK:STDOUT: !166 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5bf3a215c2b17be3:core.Destroy.Core", scope: null, file: !147, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !148, retainedNodes: !169) -// CHECK:STDOUT: !167 = !DILocalVariable(arg: 1, scope: !166, type: !21) -// CHECK:STDOUT: !168 = !DILocation(line: 8, column: 10, scope: !166) -// CHECK:STDOUT: !169 = !{!167} -// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !147, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !148, retainedNodes: !173) -// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !21) -// CHECK:STDOUT: !172 = !DILocation(line: 8, column: 10, scope: !170) -// CHECK:STDOUT: !173 = !{!171} -// CHECK:STDOUT: !174 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !147, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !148, retainedNodes: !177) -// CHECK:STDOUT: !175 = !DILocalVariable(arg: 1, scope: !174, type: !21) -// CHECK:STDOUT: !176 = !DILocation(line: 8, column: 10, scope: !174) -// CHECK:STDOUT: !177 = !{!175} +// CHECK:STDOUT: !61 = !{null, !20} +// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) +// CHECK:STDOUT: !153 = !DIFile(filename: "call_thunk_for_imported_interface.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 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !153, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !163) +// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !21) +// CHECK:STDOUT: !160 = !DILocation(line: 8, column: 18, scope: !155) +// CHECK:STDOUT: !161 = !DILocation(line: 8, column: 10, scope: !155) +// CHECK:STDOUT: !162 = !DILocation(line: 8, column: 3, scope: !155) +// CHECK:STDOUT: !163 = !{!156} +// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5bf3a215c2b17be3:core.SubobjectDestroy.Core", scope: null, file: !153, line: 8, type: !25, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !167) +// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !21) +// CHECK:STDOUT: !166 = !DILocation(line: 8, column: 10, scope: !164) +// CHECK:STDOUT: !167 = !{!165} +// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core", scope: null, file: !153, line: 8, type: !25, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !171) +// CHECK:STDOUT: !169 = !DILocalVariable(arg: 1, scope: !168, type: !21) +// CHECK:STDOUT: !170 = !DILocation(line: 8, column: 10, scope: !168) +// CHECK:STDOUT: !171 = !{!169} +// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6579a5013ba3dcd2", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !178) +// CHECK:STDOUT: !173 = !DILocalVariable(arg: 1, scope: !172, type: !21) +// CHECK:STDOUT: !176 = !DILocation(line: 34, column: 5, scope: !172) +// CHECK:STDOUT: !177 = !DILocation(line: 32, column: 1, scope: !172) +// CHECK:STDOUT: !178 = !{!173} +// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !62, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !185) +// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !20) +// CHECK:STDOUT: !184 = !DILocation(line: 32, column: 1, scope: !179) +// CHECK:STDOUT: !185 = !{!180} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/impl/thunk.carbon b/toolchain/lower/testdata/impl/thunk.carbon index c41573e8b12e..e9d08d12ba7d 100644 --- a/toolchain/lower/testdata/impl/thunk.carbon +++ b/toolchain/lower/testdata/impl/thunk.carbon @@ -75,109 +75,101 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: source_filename = "thunk.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr sret({ i32 }) %return, ptr %self) #0 !dbg !28 { +// CHECK:STDOUT: define void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr sret({ i32 }) %return, ptr %self) #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_47.1.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !33 -// CHECK:STDOUT: %.loc9_47.2 = load i32, ptr %.loc9_47.1.a, align 4, !dbg !33 -// CHECK:STDOUT: %.loc9_49.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !34 -// CHECK:STDOUT: store i32 %.loc9_47.2, ptr %.loc9_49.2.b, align 4, !dbg !34 -// CHECK:STDOUT: ret void, !dbg !35 +// CHECK:STDOUT: %.loc9_47.1.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !31 +// CHECK:STDOUT: %.loc9_47.2 = load i32, ptr %.loc9_47.1.a, align 4, !dbg !31 +// CHECK:STDOUT: %.loc9_49.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !32 +// CHECK:STDOUT: store i32 %.loc9_47.2, ptr %.loc9_49.2.b, align 4, !dbg !32 +// CHECK:STDOUT: ret void, !dbg !33 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr sret({ i32 }) %return, ptr %self) #0 !dbg !37 { +// CHECK:STDOUT: define void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr sret({ i32 }) %return, ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12_47.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !42 -// CHECK:STDOUT: %.loc12_47.2 = load i32, ptr %.loc12_47.1.b, align 4, !dbg !42 -// CHECK:STDOUT: %.loc12_49.2.c = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !43 -// CHECK:STDOUT: store i32 %.loc12_47.2, ptr %.loc12_49.2.c, align 4, !dbg !43 -// CHECK:STDOUT: ret void, !dbg !44 +// CHECK:STDOUT: %.loc12_47.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !40 +// CHECK:STDOUT: %.loc12_47.2 = load i32, ptr %.loc12_47.1.b, align 4, !dbg !40 +// CHECK:STDOUT: %.loc12_49.2.c = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !41 +// CHECK:STDOUT: store i32 %.loc12_47.2, ptr %.loc12_49.2.c, align 4, !dbg !41 +// CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %b) #0 !dbg !46 { +// CHECK:STDOUT: define void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %b) #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20_35.1.b = getelementptr inbounds nuw { i32 }, ptr %b, i32 0, i32 0, !dbg !51 -// CHECK:STDOUT: %.loc20_35.2 = load i32, ptr %.loc20_35.1.b, align 4, !dbg !51 -// CHECK:STDOUT: %.loc20_37.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !52 -// CHECK:STDOUT: store i32 %.loc20_35.2, ptr %.loc20_37.2.b, align 4, !dbg !52 -// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: %.loc20_35.1.b = getelementptr inbounds nuw { i32 }, ptr %b, i32 0, i32 0, !dbg !49 +// CHECK:STDOUT: %.loc20_35.2 = load i32, ptr %.loc20_35.1.b, align 4, !dbg !49 +// CHECK:STDOUT: %.loc20_37.2.b = getelementptr inbounds nuw { i32 }, ptr %return, i32 0, i32 0, !dbg !50 +// CHECK:STDOUT: store i32 %.loc20_35.2, ptr %.loc20_37.2.b, align 4, !dbg !50 +// CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CF:thunk:I.6a2feaaa6331eb92.Main:61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_CF:thunk:I.6a2feaaa6331eb92.Main:61ea2aba74ab3bf1:I.Main"(ptr sret({ i32 }) %return, ptr %a) #1 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20_19.1.temp = alloca { i32 }, align 4, !dbg !58 -// CHECK:STDOUT: %.loc20_19.2.temp = alloca { i32 }, align 4, !dbg !58 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_19.1.temp), !dbg !58 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_19.2.temp), !dbg !58 -// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc20_19.2.temp, ptr %a), !dbg !58 -// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc20_19.1.temp, ptr %.loc20_19.2.temp), !dbg !58 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc20_19.1.temp), !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc20_19.1.temp), !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc20_19.2.temp), !dbg !58 -// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: %.loc20_19.1.temp = alloca { i32 }, align 4, !dbg !56 +// CHECK:STDOUT: %.loc20_19.2.temp = alloca { i32 }, align 4, !dbg !56 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_19.1.temp), !dbg !56 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_19.2.temp), !dbg !56 +// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc20_19.2.temp, ptr %a), !dbg !56 +// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc20_19.1.temp, ptr %.loc20_19.2.temp), !dbg !56 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc20_19.1.temp), !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc20_19.1.temp), !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc20_19.2.temp), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_COp.5bf3a215c2b17be3:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: %.loc20_19.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !60 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc20_19.1.b), !dbg !60 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self) #0 !dbg !64 { +// CHECK:STDOUT: define weak_odr void @"_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !66 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc20.b), !dbg !66 +// CHECK:STDOUT: %.loc20_19.1.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !66 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc20_19.1.b), !dbg !66 // CHECK:STDOUT: ret void, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5bf3a215c2b17be3:core.Destroy.Core"(ptr %self) #0 !dbg !68 { +// CHECK:STDOUT: define void @_CTest.Main(ptr sret({ i32 }) %return, ptr %a) #0 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5bf3a215c2b17be3: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.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !72 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20.b = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !74 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc20.b), !dbg !74 -// CHECK:STDOUT: ret void, !dbg !74 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !76 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8c4b83ecd900f1ea: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 void @_CTest.Main(ptr sret({ i32 }) %return, ptr %a) #0 !dbg !80 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc24_20.1.temp = alloca { i32 }, align 4, !dbg !86 -// CHECK:STDOUT: %.loc24_20.2.temp = alloca { i32 }, align 4, !dbg !86 -// CHECK:STDOUT: %.loc24_19.1.temp = alloca { i32 }, align 4, !dbg !85 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_20.1.temp), !dbg !86 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_20.2.temp), !dbg !86 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_19.1.temp), !dbg !85 -// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc24_19.1.temp, ptr %a), !dbg !85 -// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc24_20.2.temp, ptr %.loc24_19.1.temp), !dbg !86 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc24_20.2.temp), !dbg !87 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc24_20.2.temp), !dbg !86 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc24_19.1.temp), !dbg !85 -// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: %.loc24_20.1.temp = alloca { i32 }, align 4, !dbg !74 +// CHECK:STDOUT: %.loc24_20.2.temp = alloca { i32 }, align 4, !dbg !74 +// CHECK:STDOUT: %.loc24_19.1.temp = alloca { i32 }, align 4, !dbg !73 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_20.1.temp), !dbg !74 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_20.2.temp), !dbg !74 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_19.1.temp), !dbg !73 +// CHECK:STDOUT: call void @"_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.loc24_19.1.temp, ptr %a), !dbg !73 +// CHECK:STDOUT: call void @"_CF.61ea2aba74ab3bf1:I.Main"(ptr %.loc24_20.2.temp, ptr %.loc24_19.1.temp), !dbg !74 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core"(ptr %return, ptr %.loc24_20.2.temp), !dbg !75 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc24_20.2.temp), !dbg !74 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc24_19.1.temp), !dbg !73 +// 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)) #2 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %t) #0 !dbg !77 { +// CHECK:STDOUT: call void @"_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core"(ptr %t), !dbg !81 +// CHECK:STDOUT: ret void, !dbg !82 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !84 { +// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", { 0, 1, 3, 2 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6579a5013ba3dcd2, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { alwaysinline nounwind } @@ -188,64 +180,62 @@ fn CallCallGeneric(c: C(()), b: B) -> A { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "thunk.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!21, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{null, !20} +// CHECK:STDOUT: !24 = !{null, !21} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !21} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !36) -// CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !21) -// CHECK:STDOUT: !33 = !DILocation(line: 9, column: 43, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 9, column: 37, scope: !28) -// CHECK:STDOUT: !35 = !DILocation(line: 9, column: 30, scope: !28) -// CHECK:STDOUT: !36 = !{!29} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core", scope: null, file: !18, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) -// CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !21) -// CHECK:STDOUT: !42 = !DILocation(line: 12, column: 43, scope: !37) -// CHECK:STDOUT: !43 = !DILocation(line: 12, column: 37, scope: !37) -// CHECK:STDOUT: !44 = !DILocation(line: 12, column: 30, scope: !37) -// CHECK:STDOUT: !45 = !{!38} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.61ea2aba74ab3bf1:I.Main", scope: null, file: !18, line: 20, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) -// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !21) -// CHECK:STDOUT: !51 = !DILocation(line: 20, column: 34, scope: !46) -// CHECK:STDOUT: !52 = !DILocation(line: 20, column: 28, scope: !46) -// CHECK:STDOUT: !53 = !DILocation(line: 20, column: 21, scope: !46) -// CHECK:STDOUT: !54 = !{!47} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.6a2feaaa6331eb92.Main:61ea2aba74ab3bf1:I.Main", scope: null, file: !18, line: 20, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !59) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !21) -// CHECK:STDOUT: !58 = !DILocation(line: 20, column: 3, scope: !55) -// CHECK:STDOUT: !59 = !{!56} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) -// 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.5bf3a215c2b17be3:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.A.Main:ImplicitAs.a6a60dfee2d7d273.Core", scope: null, file: !18, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !34) +// CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !21) +// CHECK:STDOUT: !31 = !DILocation(line: 9, column: 43, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 9, column: 37, scope: !26) +// CHECK:STDOUT: !33 = !DILocation(line: 9, column: 30, scope: !26) +// CHECK:STDOUT: !34 = !{!27} +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.9522ff908e97e267.Core", scope: null, file: !18, line: 12, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !21) +// CHECK:STDOUT: !40 = !DILocation(line: 12, column: 43, scope: !35) +// CHECK:STDOUT: !41 = !DILocation(line: 12, column: 37, scope: !35) +// CHECK:STDOUT: !42 = !DILocation(line: 12, column: 30, scope: !35) +// CHECK:STDOUT: !43 = !{!36} +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "F", linkageName: "_CF.61ea2aba74ab3bf1:I.Main", scope: null, file: !18, line: 20, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) +// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !21) +// CHECK:STDOUT: !49 = !DILocation(line: 20, column: 34, scope: !44) +// CHECK:STDOUT: !50 = !DILocation(line: 20, column: 28, scope: !44) +// CHECK:STDOUT: !51 = !DILocation(line: 20, column: 21, scope: !44) +// CHECK:STDOUT: !52 = !{!45} +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.6a2feaaa6331eb92.Main:61ea2aba74ab3bf1:I.Main", scope: null, file: !18, line: 20, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !21) +// CHECK:STDOUT: !56 = !DILocation(line: 20, column: 3, scope: !53) +// CHECK:STDOUT: !57 = !{!54} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5bf3a215c2b17be3:core.SubobjectDestroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !63) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !21) +// CHECK:STDOUT: !60 = !DILocation(line: 20, column: 3, scope: !58) +// CHECK:STDOUT: !61 = !{null, !20} +// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) +// CHECK:STDOUT: !63 = !{!59} +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8c4b83ecd900f1ea:core.SubobjectDestroy.Core", scope: null, file: !18, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !67) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !21) // CHECK:STDOUT: !66 = !DILocation(line: 20, column: 3, scope: !64) // CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5bf3a215c2b17be3:core.Destroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !18, line: 23, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !76) // 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.8c4b83ecd900f1ea: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.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: "Test", linkageName: "_CTest.Main", scope: null, file: !18, line: 23, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !88) -// CHECK:STDOUT: !81 = !DILocalVariable(arg: 1, scope: !80, type: !21) -// CHECK:STDOUT: !85 = !DILocation(line: 24, column: 19, scope: !80) -// CHECK:STDOUT: !86 = !DILocation(line: 24, column: 10, scope: !80) -// CHECK:STDOUT: !87 = !DILocation(line: 24, column: 3, scope: !80) -// CHECK:STDOUT: !88 = !{!81} +// CHECK:STDOUT: !73 = !DILocation(line: 24, column: 19, scope: !68) +// CHECK:STDOUT: !74 = !DILocation(line: 24, column: 10, scope: !68) +// CHECK:STDOUT: !75 = !DILocation(line: 24, column: 3, scope: !68) +// CHECK:STDOUT: !76 = !{!69} +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6579a5013ba3dcd2", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !83) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !21) +// CHECK:STDOUT: !81 = !DILocation(line: 34, column: 5, scope: !77) +// CHECK:STDOUT: !82 = !DILocation(line: 32, column: 1, scope: !77) +// CHECK:STDOUT: !83 = !{!78} +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !62, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !90) +// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !20) +// CHECK:STDOUT: !89 = !DILocation(line: 32, column: 1, scope: !84) +// CHECK:STDOUT: !90 = !{!85} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_thunk.carbon' @@ -255,52 +245,34 @@ 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 !93 { +// CHECK:STDOUT: define void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !95 { // 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 !98 -// CHECK:STDOUT: ret void, !dbg !98 +// 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 !100 +// CHECK:STDOUT: ret void, !dbg !100 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !100 { +// CHECK:STDOUT: define void @_CCall.Main(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !102 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !102 +// CHECK:STDOUT: %.loc22_23.1.temp = alloca {}, align 1, !dbg !109 +// CHECK:STDOUT: %.loc22_23.3.temp = alloca {}, align 1, !dbg !109 +// CHECK:STDOUT: %.loc22_22.1.temp = alloca {}, align 1, !dbg !110 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_23.1.temp), !dbg !109 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_23.3.temp), !dbg !109 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_22.1.temp), !dbg !110 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.loc22_22.1.temp, ptr %b), !dbg !110 +// 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 !109 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %return, ptr %.loc22_23.3.temp), !dbg !111 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc22_23.3.temp), !dbg !109 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %.loc22_22.1.temp), !dbg !110 +// CHECK:STDOUT: ret void, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !104 { +// CHECK:STDOUT: define void @_CCallCallGeneric.Main(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !113 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !106 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2: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 void @_CCall.Main(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !112 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22_23.1.temp = alloca {}, align 1, !dbg !119 -// CHECK:STDOUT: %.loc22_23.3.temp = alloca {}, align 1, !dbg !119 -// CHECK:STDOUT: %.loc22_22.1.temp = alloca {}, align 1, !dbg !120 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_23.1.temp), !dbg !119 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_23.3.temp), !dbg !119 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_22.1.temp), !dbg !120 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.loc22_22.1.temp, ptr %b), !dbg !120 -// 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 !119 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %return, ptr %.loc22_23.3.temp), !dbg !121 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc22_23.3.temp), !dbg !119 -// CHECK:STDOUT: call void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %.loc22_22.1.temp), !dbg !120 -// CHECK:STDOUT: ret void, !dbg !121 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallCallGeneric.Main(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !123 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CCallGeneric.Main.e6730b2ec192c142(ptr %return, ptr %c, ptr %b), !dbg !132 -// CHECK:STDOUT: ret void, !dbg !133 +// CHECK:STDOUT: call void @_CCallGeneric.Main.e6730b2ec192c142(ptr %return, ptr %c, ptr %b), !dbg !122 +// CHECK:STDOUT: ret void, !dbg !123 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -310,32 +282,42 @@ 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 !135 { +// CHECK:STDOUT: define linkonce_odr void @"_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr sret({}) %return, ptr %self, ptr %_) #0 !dbg !125 { // 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 !142 -// CHECK:STDOUT: ret void, !dbg !142 +// 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 !132 +// CHECK:STDOUT: ret void, !dbg !132 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallGeneric.Main.e6730b2ec192c142(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !144 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %t) #0 !dbg !134 { +// CHECK:STDOUT: ret void, !dbg !139 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %t) #0 !dbg !141 { +// CHECK:STDOUT: ret void, !dbg !146 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CCallGeneric.Main.e6730b2ec192c142(ptr sret({}) %return, ptr %c, ptr %b) #0 !dbg !148 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CF:thunk:I.e2e8ace3e0ca3527.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr %return, ptr %c, ptr %b), !dbg !151 -// CHECK:STDOUT: ret void, !dbg !153 +// CHECK:STDOUT: call void @"_CF:thunk:I.e2e8ace3e0ca3527.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.e2e8ace3e0ca3527.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr sret({}) %return, ptr %self, ptr %x) #2 !dbg !155 { +// CHECK:STDOUT: define linkonce_odr void @"_CF:thunk:I.e2e8ace3e0ca3527.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 !159 -// CHECK:STDOUT: %.loc18_32.3.temp = alloca {}, align 1, !dbg !159 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_32.2.temp), !dbg !159 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_32.3.temp), !dbg !159 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.loc18_32.3.temp, ptr %x), !dbg !159 -// CHECK:STDOUT: call void @"_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr %.loc18_32.2.temp, ptr %self, ptr %.loc18_32.3.temp), !dbg !159 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %return, ptr %.loc18_32.2.temp), !dbg !159 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc18_32.2.temp), !dbg !159 -// CHECK:STDOUT: call void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %.loc18_32.3.temp), !dbg !159 -// CHECK:STDOUT: ret void, !dbg !159 +// CHECK:STDOUT: %.loc18_32.2.temp = alloca {}, align 1, !dbg !163 +// CHECK:STDOUT: %.loc18_32.3.temp = alloca {}, align 1, !dbg !163 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_32.2.temp), !dbg !163 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_32.3.temp), !dbg !163 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.loc18_32.3.temp, ptr %x), !dbg !163 +// CHECK:STDOUT: call void @"_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f"(ptr %.loc18_32.2.temp, ptr %self, ptr %.loc18_32.3.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.Core.6579a5013ba3dcd2(ptr %.loc18_32.2.temp), !dbg !163 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %.loc18_32.3.temp), !dbg !163 +// CHECK:STDOUT: ret void, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -345,63 +327,60 @@ 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 = !{!90} +// CHECK:STDOUT: !llvm.dbg.cu = !{!92} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!21, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !26 = !{null, !21} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !89 = !DIFile(filename: "generic_thunk.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 = !{!21, !21, !21} -// CHECK:STDOUT: !92 = !DISubroutineType(types: !91) -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core", scope: null, file: !89, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !90, retainedNodes: !99) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !21) -// CHECK:STDOUT: !98 = !DILocation(line: 7, column: 36, scope: !93) -// CHECK:STDOUT: !99 = !{!94} -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !89, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !90, retainedNodes: !103) -// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !21) -// CHECK:STDOUT: !102 = !DILocation(line: 18, column: 3, scope: !100) -// CHECK:STDOUT: !103 = !{!101} -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !89, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !90, 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.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !89, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !90, 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: "Call", linkageName: "_CCall.Main", scope: null, file: !89, line: 21, type: !92, spFlags: DISPFlagDefinition, unit: !90, retainedNodes: !122) -// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !21) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 2, scope: !112, type: !21) -// CHECK:STDOUT: !119 = !DILocation(line: 22, column: 10, scope: !112) -// CHECK:STDOUT: !120 = !DILocation(line: 22, column: 22, scope: !112) -// CHECK:STDOUT: !121 = !DILocation(line: 22, column: 3, scope: !112) -// CHECK:STDOUT: !122 = !{!113, !114} -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "CallCallGeneric", linkageName: "_CCallCallGeneric.Main", scope: null, file: !89, line: 29, type: !92, spFlags: DISPFlagDefinition, unit: !90, retainedNodes: !134) -// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !21) -// CHECK:STDOUT: !125 = !DILocalVariable(arg: 2, scope: !123, type: !21) -// CHECK:STDOUT: !132 = !DILocation(line: 30, column: 10, scope: !123) -// CHECK:STDOUT: !133 = !DILocation(line: 30, column: 3, scope: !123) -// CHECK:STDOUT: !134 = !{!124, !125} -// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !89, line: 18, type: !92, spFlags: DISPFlagDefinition, unit: !90, retainedNodes: !143) -// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !21) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 2, scope: !135, type: !21) -// CHECK:STDOUT: !142 = !DILocation(line: 18, column: 34, scope: !135) -// CHECK:STDOUT: !143 = !{!136, !137} -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.Main.e6730b2ec192c142", scope: null, file: !89, line: 25, type: !92, spFlags: DISPFlagDefinition, unit: !90, retainedNodes: !154) -// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !21) -// CHECK:STDOUT: !146 = !DILocalVariable(arg: 2, scope: !144, type: !21) -// CHECK:STDOUT: !151 = !DILocation(line: 26, column: 10, scope: !144) -// CHECK:STDOUT: !153 = !DILocation(line: 26, column: 3, scope: !144) -// CHECK:STDOUT: !154 = !{!145, !146} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:I.e2e8ace3e0ca3527.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !89, line: 18, type: !92, spFlags: DISPFlagDefinition, unit: !90, retainedNodes: !160) -// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !21) -// CHECK:STDOUT: !157 = !DILocalVariable(arg: 2, scope: !155, type: !21) -// CHECK:STDOUT: !159 = !DILocation(line: 18, column: 3, scope: !155) -// CHECK:STDOUT: !160 = !{!156, !157} +// CHECK:STDOUT: !24 = !{null, !21} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !91 = !DIFile(filename: "generic_thunk.carbon", directory: "") +// CHECK:STDOUT: !92 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !91, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !93 = !{!21, !21, !21} +// CHECK:STDOUT: !94 = !DISubroutineType(types: !93) +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core", scope: null, file: !91, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !92, retainedNodes: !101) +// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !21) +// CHECK:STDOUT: !100 = !DILocation(line: 7, column: 36, scope: !95) +// CHECK:STDOUT: !101 = !{!96} +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !91, line: 21, type: !94, spFlags: DISPFlagDefinition, unit: !92, retainedNodes: !112) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !21) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 2, scope: !102, type: !21) +// CHECK:STDOUT: !109 = !DILocation(line: 22, column: 10, scope: !102) +// CHECK:STDOUT: !110 = !DILocation(line: 22, column: 22, scope: !102) +// CHECK:STDOUT: !111 = !DILocation(line: 22, column: 3, scope: !102) +// CHECK:STDOUT: !112 = !{!103, !104} +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "CallCallGeneric", linkageName: "_CCallCallGeneric.Main", scope: null, file: !91, line: 29, type: !94, spFlags: DISPFlagDefinition, unit: !92, retainedNodes: !124) +// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !21) +// CHECK:STDOUT: !115 = !DILocalVariable(arg: 2, scope: !113, type: !21) +// CHECK:STDOUT: !122 = !DILocation(line: 30, column: 10, scope: !113) +// CHECK:STDOUT: !123 = !DILocation(line: 30, column: 3, scope: !113) +// CHECK:STDOUT: !124 = !{!114, !115} +// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !91, line: 18, type: !94, spFlags: DISPFlagDefinition, unit: !92, retainedNodes: !133) +// CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !21) +// CHECK:STDOUT: !127 = !DILocalVariable(arg: 2, scope: !125, type: !21) +// CHECK:STDOUT: !132 = !DILocation(line: 18, column: 34, scope: !125) +// CHECK:STDOUT: !133 = !{!126, !127} +// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6579a5013ba3dcd2", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !92, retainedNodes: !140) +// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !21) +// CHECK:STDOUT: !139 = !DILocation(line: 32, column: 1, scope: !134) +// CHECK:STDOUT: !140 = !{!135} +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6b8b385dcf82cc70", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !92, retainedNodes: !147) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !21) +// CHECK:STDOUT: !146 = !DILocation(line: 32, column: 1, scope: !141) +// CHECK:STDOUT: !147 = !{!142} +// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.Main.e6730b2ec192c142", scope: null, file: !91, line: 25, type: !94, spFlags: DISPFlagDefinition, unit: !92, 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.e2e8ace3e0ca3527.Main:C.eb057aa32837c84e.Main:I.eb057aa32837c84e.Main.e43630e9a6c38c3f", scope: null, file: !91, line: 18, type: !94, spFlags: DISPFlagDefinition, unit: !92, retainedNodes: !164) +// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !21) +// CHECK:STDOUT: !161 = !DILocalVariable(arg: 2, scope: !159, type: !21) +// 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 dd73c3ebc6f1..6f4951cec984 100644 --- a/toolchain/lower/testdata/index/array_element_access.carbon +++ b/toolchain/lower/testdata/index/array_element_access.carbon @@ -28,116 +28,113 @@ fn Run() { // CHECK:STDOUT: @array.loc14_40 = internal constant [2 x i32] [i32 1, i32 2] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CA.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !32 { +// CHECK:STDOUT: define void @_CA.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !30 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !35 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !35 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.380.loc12_37, i64 8, i1 false), !dbg !36 -// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !33 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.380.loc12_37, i64 8, i1 false), !dbg !34 +// CHECK:STDOUT: ret void, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CB.Main(ptr sret([2 x i32]) %return) #0 !dbg !37 { +// CHECK:STDOUT: define void @_CB.Main(ptr sret([2 x i32]) %return) #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14_39.3.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 0, !dbg !40 -// CHECK:STDOUT: %.loc14_39.6.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 1, !dbg !40 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @array.loc14_40, i64 8, i1 false), !dbg !41 -// CHECK:STDOUT: ret void, !dbg !41 +// CHECK:STDOUT: %.loc14_39.3.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 0, !dbg !38 +// CHECK:STDOUT: %.loc14_39.6.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i64 1, !dbg !38 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @array.loc14_40, i64 8, i1 false), !dbg !39 +// CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !42 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca [2 x i32], align 4, !dbg !43 -// CHECK:STDOUT: %.loc17_28.1.temp = alloca { i32, i32 }, align 4, !dbg !44 -// CHECK:STDOUT: %b.var = alloca i32, align 4, !dbg !46 -// CHECK:STDOUT: %_.var.loc19 = alloca i32, align 4, !dbg !48 -// CHECK:STDOUT: %_.var.loc20 = alloca i32, align 4, !dbg !52 -// CHECK:STDOUT: %.loc20_18.1.temp = alloca [2 x i32], align 4, !dbg !53 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !43 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_28.1.temp), !dbg !44 -// CHECK:STDOUT: call void @_CA.Main(ptr %.loc17_28.1.temp), !dbg !44 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc17_28.1.temp, i32 0, i32 0, !dbg !44 -// CHECK:STDOUT: %.loc17_28.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !44 -// CHECK:STDOUT: %.loc17_28.4.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 0, !dbg !44 -// CHECK:STDOUT: store i32 %.loc17_28.3, ptr %.loc17_28.4.array.index, align 4, !dbg !44 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc17_28.1.temp, i32 0, i32 1, !dbg !44 -// CHECK:STDOUT: %.loc17_28.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !44 -// CHECK:STDOUT: %.loc17_28.7.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 1, !dbg !44 -// CHECK:STDOUT: store i32 %.loc17_28.6, ptr %.loc17_28.7.array.index, align 4, !dbg !44 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !46 -// CHECK:STDOUT: store i32 1, ptr %b.var, align 4, !dbg !46 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc19), !dbg !48 -// CHECK:STDOUT: %.loc19_18 = load i32, ptr %b.var, align 4, !dbg !50 -// CHECK:STDOUT: %.loc19_19.1.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i32 %.loc19_18, !dbg !49 -// CHECK:STDOUT: %.loc19_19.2 = load i32, ptr %.loc19_19.1.array.index, align 4, !dbg !49 -// CHECK:STDOUT: store i32 %.loc19_19.2, ptr %_.var.loc19, align 4, !dbg !48 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc20), !dbg !52 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_18.1.temp), !dbg !53 -// CHECK:STDOUT: call void @_CB.Main(ptr %.loc20_18.1.temp), !dbg !53 -// CHECK:STDOUT: %.loc20_21.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc20_18.1.temp, i32 0, i32 1, !dbg !53 -// CHECK:STDOUT: %.loc20_21.2 = load i32, ptr %.loc20_21.1.array.index, align 4, !dbg !53 -// CHECK:STDOUT: store i32 %.loc20_21.2, ptr %_.var.loc20, align 4, !dbg !52 -// CHECK:STDOUT: call void @"_CSelfDestruct.641010f66e2ea46f:core.Destroy.Core"(ptr %.loc20_18.1.temp), !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var.loc20), !dbg !52 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var.loc19), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %b.var), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %.loc17_28.1.temp), !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.641010f66e2ea46f:core.Destroy.Core"(ptr %a.var), !dbg !43 +// CHECK:STDOUT: %a.var = alloca [2 x i32], align 4, !dbg !41 +// CHECK:STDOUT: %.loc17_28.1.temp = alloca { i32, i32 }, align 4, !dbg !42 +// CHECK:STDOUT: %b.var = alloca i32, align 4, !dbg !44 +// CHECK:STDOUT: %_.var.loc19 = alloca i32, align 4, !dbg !46 +// CHECK:STDOUT: %_.var.loc20 = alloca i32, align 4, !dbg !50 +// CHECK:STDOUT: %.loc20_18.1.temp = alloca [2 x i32], align 4, !dbg !51 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !41 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_28.1.temp), !dbg !42 +// CHECK:STDOUT: call void @_CA.Main(ptr %.loc17_28.1.temp), !dbg !42 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc17_28.1.temp, i32 0, i32 0, !dbg !42 +// CHECK:STDOUT: %.loc17_28.3 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !42 +// CHECK:STDOUT: %.loc17_28.4.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 0, !dbg !42 +// CHECK:STDOUT: store i32 %.loc17_28.3, ptr %.loc17_28.4.array.index, align 4, !dbg !42 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc17_28.1.temp, i32 0, i32 1, !dbg !42 +// CHECK:STDOUT: %.loc17_28.6 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !42 +// CHECK:STDOUT: %.loc17_28.7.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i64 1, !dbg !42 +// CHECK:STDOUT: store i32 %.loc17_28.6, ptr %.loc17_28.7.array.index, align 4, !dbg !42 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !44 +// CHECK:STDOUT: store i32 1, ptr %b.var, align 4, !dbg !44 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc19), !dbg !46 +// CHECK:STDOUT: %.loc19_18 = load i32, ptr %b.var, align 4, !dbg !48 +// CHECK:STDOUT: %.loc19_19.1.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, i32 %.loc19_18, !dbg !47 +// CHECK:STDOUT: %.loc19_19.2 = load i32, ptr %.loc19_19.1.array.index, align 4, !dbg !47 +// CHECK:STDOUT: store i32 %.loc19_19.2, ptr %_.var.loc19, align 4, !dbg !46 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc20), !dbg !50 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_18.1.temp), !dbg !51 +// CHECK:STDOUT: call void @_CB.Main(ptr %.loc20_18.1.temp), !dbg !51 +// CHECK:STDOUT: %.loc20_21.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc20_18.1.temp, i32 0, i32 1, !dbg !51 +// CHECK:STDOUT: %.loc20_21.2 = load i32, ptr %.loc20_21.1.array.index, align 4, !dbg !51 +// CHECK:STDOUT: store i32 %.loc20_21.2, ptr %_.var.loc20, align 4, !dbg !50 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f2cee5f6b4c30a4(ptr %.loc20_18.1.temp), !dbg !51 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var.loc20), !dbg !50 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var.loc19), !dbg !46 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %b.var), !dbg !44 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %.loc17_28.1.temp), !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f2cee5f6b4c30a4(ptr %a.var), !dbg !41 // CHECK:STDOUT: ret i32 0, !dbg !55 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_COp.641010f66e2ea46f:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc20_18.1.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 1, !dbg !58 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc20_18.1.array.index), !dbg !58 +// CHECK:STDOUT: %.loc20_18.4.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 0, !dbg !58 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc20_18.4.array.index), !dbg !58 // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.641010f66e2ea46f:core.Destroy.Core"(ptr %self) #0 !dbg !60 { +// CHECK:STDOUT: define weak_odr void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20_18.1.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 1, !dbg !62 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc20_18.1.array.index), !dbg !62 -// CHECK:STDOUT: %.loc20_18.2.array.index = getelementptr inbounds [2 x i32], ptr %self, i32 0, i64 0, !dbg !62 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc20_18.2.array.index), !dbg !62 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !62 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !62 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !62 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !62 // CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.641010f66e2ea46f:core.Destroy.Core"(ptr %self) #0 !dbg !64 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.641010f66e2ea46f: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 @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !68 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !70 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !70 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !72 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self), !dbg !74 -// CHECK:STDOUT: ret void, !dbg !74 -// 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: 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 @_CSelfDestruct.Core.4f2cee5f6b4c30a4(ptr %t) #0 !dbg !64 { +// CHECK:STDOUT: call void @"_COp.641010f66e2ea46f:core.SubobjectDestroy.Core"(ptr %t), !dbg !68 +// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !71 { +// CHECK:STDOUT: ret void, !dbg !76 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %t) #0 !dbg !78 { +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %t), !dbg !82 +// CHECK:STDOUT: ret void, !dbg !83 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", { 0, 1, 2, 3, 6, 5, 4 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.641010f66e2ea46f:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.4f2cee5f6b4c30a4, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 6, 5, 4, 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -147,6 +144,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !14 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIFile(filename: "array_element_access.carbon", directory: "") // CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !22 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -155,44 +153,46 @@ fn Run() { // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) // CHECK:STDOUT: !26 = !{!22} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !22} +// CHECK:STDOUT: !28 = !{null, !23} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = !{null, !23} -// CHECK:STDOUT: !31 = !DISubroutineType(types: !30) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main", scope: null, file: !20, line: 12, type: !25, spFlags: DISPFlagDefinition, unit: !21) -// CHECK:STDOUT: !35 = !DILocation(line: 12, column: 31, scope: !32) -// CHECK:STDOUT: !36 = !DILocation(line: 12, column: 24, scope: !32) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main", scope: null, file: !20, line: 14, type: !25, spFlags: DISPFlagDefinition, unit: !21) -// CHECK:STDOUT: !40 = !DILocation(line: 14, column: 34, scope: !37) -// CHECK:STDOUT: !41 = !DILocation(line: 14, column: 27, scope: !37) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !20, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !21) -// CHECK:STDOUT: !43 = !DILocation(line: 17, column: 3, scope: !42) -// CHECK:STDOUT: !44 = !DILocation(line: 17, column: 26, scope: !42) -// CHECK:STDOUT: !46 = !DILocation(line: 18, column: 3, scope: !42) -// CHECK:STDOUT: !48 = !DILocation(line: 19, column: 3, scope: !42) -// CHECK:STDOUT: !49 = !DILocation(line: 19, column: 16, scope: !42) -// CHECK:STDOUT: !50 = !DILocation(line: 19, column: 18, scope: !42) -// CHECK:STDOUT: !52 = !DILocation(line: 20, column: 3, scope: !42) -// CHECK:STDOUT: !53 = !DILocation(line: 20, column: 16, scope: !42) -// CHECK:STDOUT: !55 = !DILocation(line: 16, column: 1, scope: !42) -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !20, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !59) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !22) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main", scope: null, file: !20, line: 12, type: !25, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !33 = !DILocation(line: 12, column: 31, scope: !30) +// CHECK:STDOUT: !34 = !DILocation(line: 12, column: 24, scope: !30) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main", scope: null, file: !20, line: 14, type: !25, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !38 = !DILocation(line: 14, column: 34, scope: !35) +// CHECK:STDOUT: !39 = !DILocation(line: 14, column: 27, scope: !35) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !20, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !21) +// CHECK:STDOUT: !41 = !DILocation(line: 17, column: 3, scope: !40) +// CHECK:STDOUT: !42 = !DILocation(line: 17, column: 26, scope: !40) +// CHECK:STDOUT: !44 = !DILocation(line: 18, column: 3, scope: !40) +// CHECK:STDOUT: !46 = !DILocation(line: 19, column: 3, scope: !40) +// CHECK:STDOUT: !47 = !DILocation(line: 19, column: 16, scope: !40) +// CHECK:STDOUT: !48 = !DILocation(line: 19, column: 18, scope: !40) +// CHECK:STDOUT: !50 = !DILocation(line: 20, column: 3, scope: !40) +// CHECK:STDOUT: !51 = !DILocation(line: 20, column: 16, scope: !40) +// CHECK:STDOUT: !53 = !{null, !22} +// CHECK:STDOUT: !54 = !DISubroutineType(types: !53) +// CHECK:STDOUT: !55 = !DILocation(line: 16, column: 1, scope: !40) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "Op", linkageName: "_COp.641010f66e2ea46f:core.SubobjectDestroy.Core", scope: null, file: !20, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !59) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !23) // CHECK:STDOUT: !58 = !DILocation(line: 20, column: 16, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.641010f66e2ea46f:core.Destroy.Core", scope: null, file: !20, line: 20, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "Op", linkageName: "_COp.35f6012581c5aabb:core.SubobjectDestroy.Core", scope: null, file: !20, line: 17, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !63) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !23) -// CHECK:STDOUT: !62 = !DILocation(line: 20, column: 16, scope: !60) +// CHECK:STDOUT: !62 = !DILocation(line: 17, column: 26, scope: !60) // CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.641010f66e2ea46f:core.Destroy.Core", scope: null, file: !20, line: 20, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !67) +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f2cee5f6b4c30a4", scope: null, file: !14, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !70) // CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !23) -// CHECK:STDOUT: !66 = !DILocation(line: 20, column: 16, scope: !64) -// CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !20, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !71) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !23) -// CHECK:STDOUT: !70 = !DILocation(line: 17, column: 26, scope: !68) -// CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !20, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !75) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !23) -// CHECK:STDOUT: !74 = !DILocation(line: 17, column: 26, scope: !72) -// CHECK:STDOUT: !75 = !{!73} +// CHECK:STDOUT: !68 = !DILocation(line: 34, column: 5, scope: !64) +// CHECK:STDOUT: !69 = !DILocation(line: 32, column: 1, scope: !64) +// CHECK:STDOUT: !70 = !{!65} +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !14, line: 32, type: !54, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !77) +// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !22) +// CHECK:STDOUT: !76 = !DILocation(line: 32, column: 1, scope: !71) +// CHECK:STDOUT: !77 = !{!72} +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ffbc82e0019b7bf2", scope: null, file: !14, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !84) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !23) +// CHECK:STDOUT: !82 = !DILocation(line: 34, column: 5, scope: !78) +// CHECK:STDOUT: !83 = !DILocation(line: 32, column: 1, scope: !78) +// CHECK:STDOUT: !84 = !{!79} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interface/modifiers.carbon b/toolchain/lower/testdata/interface/modifiers.carbon index e6a79970165e..798761b250e0 100644 --- a/toolchain/lower/testdata/interface/modifiers.carbon +++ b/toolchain/lower/testdata/interface/modifiers.carbon @@ -234,47 +234,40 @@ 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 !38 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc10_15.2.temp = alloca {}, align 1, !dbg !39 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc10_15.2.temp), !dbg !39 -// CHECK:STDOUT: call void @_CCallMethod.Main.805a971dc5455081(ptr @C.val.loc10_15.6), !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr @C.val), !dbg !39 +// CHECK:STDOUT: %.loc10_15.2.temp = alloca {}, align 1, !dbg !36 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc10_15.2.temp), !dbg !36 +// CHECK:STDOUT: call void @_CCallMethod.Main.805a971dc5455081(ptr @C.val.loc10_15.6), !dbg !40 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr @C.val), !dbg !36 // CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99: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.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: 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 !53 { -// CHECK:STDOUT: call void @_CM.DefaultMethod.Main.805a971dc5455081(ptr %t), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: define linkonce_odr void @_CCallMethod.Main.805a971dc5455081(ptr %t) #0 !dbg !45 { +// CHECK:STDOUT: call void @_CM.DefaultMethod.Main.805a971dc5455081(ptr %t), !dbg !48 +// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !51 { +// CHECK:STDOUT: ret void, !dbg !56 // 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 !59 { -// CHECK:STDOUT: call void @_CWorld.Main.9522ff908e97e267(ptr %self), !dbg !63 -// CHECK:STDOUT: ret void, !dbg !64 +// CHECK:STDOUT: define linkonce_odr void @_CM.DefaultMethod.Main.805a971dc5455081(ptr %self) #0 !dbg !58 { +// CHECK:STDOUT: call void @_CWorld.Main.9522ff908e97e267(ptr %self), !dbg !62 +// CHECK:STDOUT: ret void, !dbg !63 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CWorld.Main.9522ff908e97e267(ptr %t) #0 !dbg !66 { -// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: define linkonce_odr void @_CWorld.Main.9522ff908e97e267(ptr %t) #0 !dbg !65 { +// CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } @@ -285,40 +278,37 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !14 = !DIFile(filename: "default_interfaces.carbon", directory: "") // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DISubroutineType(types: !16) // CHECK:STDOUT: !33 = !DIFile(filename: "default_method.carbon", directory: "") // CHECK:STDOUT: !34 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !33, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// 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: !38 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !33, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !34) -// CHECK:STDOUT: !39 = !DILocation(line: 10, column: 14, scope: !38) -// CHECK:STDOUT: !43 = !DILocation(line: 11, column: 3, scope: !38) -// CHECK:STDOUT: !44 = !DILocation(line: 9, column: 1, scope: !38) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !33, line: 10, type: !37, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !48) -// 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: "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: "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: !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: !35 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !33, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !34) +// CHECK:STDOUT: !36 = !DILocation(line: 10, column: 14, scope: !35) +// CHECK:STDOUT: !40 = !DILocation(line: 11, column: 3, scope: !35) +// CHECK:STDOUT: !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !42 = !{null, !41} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = !DILocation(line: 9, column: 1, scope: !35) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "CallMethod", linkageName: "_CCallMethod.Main.805a971dc5455081", scope: null, file: !14, line: 20, type: !43, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !50) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !41) +// CHECK:STDOUT: !48 = !DILocation(line: 21, column: 3, scope: !45) +// CHECK:STDOUT: !49 = !DILocation(line: 20, column: 1, scope: !45) +// CHECK:STDOUT: !50 = !{!46} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !6, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !57) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !41) +// CHECK:STDOUT: !56 = !DILocation(line: 32, column: 1, scope: !51) +// CHECK:STDOUT: !57 = !{!52} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "M", linkageName: "_CM.DefaultMethod.Main.805a971dc5455081", scope: null, file: !14, line: 13, type: !43, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !64) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !41) +// CHECK:STDOUT: !62 = !DILocation(line: 13, column: 24, scope: !58) +// CHECK:STDOUT: !63 = !DILocation(line: 13, column: 3, scope: !58) +// CHECK:STDOUT: !64 = !{!59} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "World", linkageName: "_CWorld.Main.9522ff908e97e267", scope: null, file: !14, line: 10, type: !43, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !69) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !41) +// CHECK:STDOUT: !68 = !DILocation(line: 10, column: 1, scope: !65) +// CHECK:STDOUT: !69 = !{!66} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'default_function_overridden.carbon' @@ -328,47 +318,40 @@ 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 !73 { +// CHECK:STDOUT: define void @_CClone.C.Main(ptr %other) #0 !dbg !72 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !76 +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CF.C.Main:DefaultFn.Main"() #0 !dbg !78 { +// CHECK:STDOUT: define void @"_CF.C.Main:DefaultFn.Main"() #0 !dbg !77 { // CHECK:STDOUT: entry: -// 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: %.loc9_23.2.temp = alloca {}, align 1, !dbg !78 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_23.2.temp), !dbg !78 +// CHECK:STDOUT: call void @_CClone.C.Main(ptr @C.val.loc9_23.6), !dbg !79 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr @C.val), !dbg !78 +// 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) #0 !dbg !82 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !81 { // 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 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: call void @_CCallFn.Main.794e85173e977a8b(), !dbg !82 +// 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.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 !93 { -// CHECK:STDOUT: call void @"_CF.C.Main:DefaultFn.Main"(), !dbg !94 -// CHECK:STDOUT: ret void, !dbg !95 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !84 { +// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CCallFn.Main.794e85173e977a8b() #0 !dbg !91 { +// CHECK:STDOUT: call void @"_CF.C.Main:DefaultFn.Main"(), !dbg !92 +// CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CHello.Main() @@ -376,41 +359,38 @@ 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 = !{!72} +// CHECK:STDOUT: !llvm.dbg.cu = !{!71} // 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: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !14 = !DIFile(filename: "default_interfaces.carbon", directory: "") // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DISubroutineType(types: !16) -// 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: !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: "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: !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !42 = !{null, !41} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !70 = !DIFile(filename: "default_function_overridden.carbon", directory: "") +// CHECK:STDOUT: !71 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !70, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "Clone", linkageName: "_CClone.C.Main", scope: null, file: !70, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !71, retainedNodes: !76) +// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !41) +// CHECK:STDOUT: !75 = !DILocation(line: 6, column: 3, scope: !72) +// CHECK:STDOUT: !76 = !{!73} +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main:DefaultFn.Main", scope: null, file: !70, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !71) +// CHECK:STDOUT: !78 = !DILocation(line: 9, column: 22, scope: !77) +// CHECK:STDOUT: !79 = !DILocation(line: 9, column: 14, scope: !77) +// CHECK:STDOUT: !80 = !DILocation(line: 9, column: 5, scope: !77) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !70, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !71) +// CHECK:STDOUT: !82 = !DILocation(line: 14, column: 3, scope: !81) +// CHECK:STDOUT: !83 = !DILocation(line: 13, column: 1, scope: !81) +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !6, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !71, retainedNodes: !90) +// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !41) +// CHECK:STDOUT: !89 = !DILocation(line: 32, column: 1, scope: !84) +// CHECK:STDOUT: !90 = !{!85} +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "CallFn", linkageName: "_CCallFn.Main.794e85173e977a8b", scope: null, file: !14, line: 16, type: !17, spFlags: DISPFlagDefinition, unit: !71) +// CHECK:STDOUT: !92 = !DILocation(line: 17, column: 3, scope: !91) +// CHECK:STDOUT: !93 = !DILocation(line: 16, column: 1, scope: !91) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'default_method_overridden.carbon' @@ -420,47 +400,40 @@ 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 !98 { +// CHECK:STDOUT: define void @_CCopy.C.Main(ptr %self) #0 !dbg !96 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !101 +// CHECK:STDOUT: ret void, !dbg !99 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CM.C.Main:DefaultMethod.Main"(ptr %self) #0 !dbg !103 { +// CHECK:STDOUT: define void @"_CM.C.Main:DefaultMethod.Main"(ptr %self) #0 !dbg !101 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CCopy.C.Main(ptr %self), !dbg !106 -// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: call void @_CCopy.C.Main(ptr %self), !dbg !104 +// CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !109 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !107 { // 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 weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !116 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !118 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !120 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !122 +// CHECK:STDOUT: %.loc14_15.2.temp = alloca {}, align 1, !dbg !108 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc14_15.2.temp), !dbg !108 +// CHECK:STDOUT: call void @_CCallMethod.Main.805a971dc5455081(ptr @C.val.loc14_15.6), !dbg !112 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr @C.val), !dbg !108 +// CHECK:STDOUT: ret void, !dbg !113 // 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 !124 { -// CHECK:STDOUT: call void @"_CM.C.Main:DefaultMethod.Main"(ptr %t), !dbg !127 -// CHECK:STDOUT: ret void, !dbg !128 +// CHECK:STDOUT: define linkonce_odr void @_CCallMethod.Main.805a971dc5455081(ptr %t) #0 !dbg !114 { +// CHECK:STDOUT: call void @"_CM.C.Main:DefaultMethod.Main"(ptr %t), !dbg !117 +// CHECK:STDOUT: ret void, !dbg !118 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !120 { +// CHECK:STDOUT: ret void, !dbg !125 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CHello.Main() @@ -468,71 +441,68 @@ 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 = !{!97} +// CHECK:STDOUT: !llvm.dbg.cu = !{!95} // 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: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !14 = !DIFile(filename: "default_interfaces.carbon", directory: "") // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DISubroutineType(types: !16) -// 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: !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: !127 = !DILocation(line: 21, column: 3, scope: !124) -// CHECK:STDOUT: !128 = !DILocation(line: 20, column: 1, scope: !124) -// CHECK:STDOUT: !129 = !{!125} +// CHECK:STDOUT: !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !42 = !{null, !41} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !94 = !DIFile(filename: "default_method_overridden.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: "Copy", linkageName: "_CCopy.C.Main", scope: null, file: !94, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !100) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !41) +// CHECK:STDOUT: !99 = !DILocation(line: 6, column: 3, scope: !96) +// CHECK:STDOUT: !100 = !{!97} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "M", linkageName: "_CM.C.Main:DefaultMethod.Main", scope: null, file: !94, line: 9, type: !43, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !106) +// CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !41) +// CHECK:STDOUT: !104 = !DILocation(line: 9, column: 18, scope: !101) +// CHECK:STDOUT: !105 = !DILocation(line: 9, column: 5, scope: !101) +// CHECK:STDOUT: !106 = !{!102} +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !94, line: 13, type: !17, spFlags: DISPFlagDefinition, unit: !95) +// CHECK:STDOUT: !108 = !DILocation(line: 14, column: 14, scope: !107) +// CHECK:STDOUT: !112 = !DILocation(line: 15, column: 3, scope: !107) +// CHECK:STDOUT: !113 = !DILocation(line: 13, column: 1, scope: !107) +// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "CallMethod", linkageName: "_CCallMethod.Main.805a971dc5455081", scope: null, file: !14, line: 20, type: !43, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !119) +// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !41) +// CHECK:STDOUT: !117 = !DILocation(line: 21, column: 3, scope: !114) +// CHECK:STDOUT: !118 = !DILocation(line: 20, column: 1, scope: !114) +// CHECK:STDOUT: !119 = !{!115} +// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !6, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !95, retainedNodes: !126) +// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !41) +// CHECK:STDOUT: !125 = !DILocation(line: 32, column: 1, scope: !120) +// CHECK:STDOUT: !126 = !{!121} // 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 !132 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !129 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CCallFn.Main.e342d6e8ff5d87ae(), !dbg !133 +// CHECK:STDOUT: call void @_CCallFn.Main.e342d6e8ff5d87ae(), !dbg !130 +// CHECK:STDOUT: ret void, !dbg !131 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CCallFn.Main.e342d6e8ff5d87ae() #0 !dbg !132 { +// CHECK:STDOUT: call void @_CF.FinalFn.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 !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 !138 { -// CHECK:STDOUT: ret void, !dbg !139 +// CHECK:STDOUT: define linkonce_odr void @_CF.FinalFn.Main.e342d6e8ff5d87ae() #0 !dbg !135 { +// CHECK:STDOUT: ret void, !dbg !136 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!131} +// CHECK:STDOUT: !llvm.dbg.cu = !{!128} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -540,16 +510,16 @@ fn F() { // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DISubroutineType(types: !16) // CHECK:STDOUT: !20 = !DIFile(filename: "final_interfaces.carbon", directory: "") -// 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: !127 = !DIFile(filename: "final_function.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.Main", scope: null, file: !127, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !128) +// CHECK:STDOUT: !130 = !DILocation(line: 10, column: 3, scope: !129) +// CHECK:STDOUT: !131 = !DILocation(line: 9, column: 1, scope: !129) +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "CallFn", linkageName: "_CCallFn.Main.e342d6e8ff5d87ae", scope: null, file: !20, line: 12, type: !17, spFlags: DISPFlagDefinition, unit: !128) +// CHECK:STDOUT: !133 = !DILocation(line: 13, column: 3, scope: !132) +// CHECK:STDOUT: !134 = !DILocation(line: 12, column: 1, scope: !132) +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "F", linkageName: "_CF.FinalFn.Main.e342d6e8ff5d87ae", scope: null, file: !20, line: 5, type: !17, spFlags: DISPFlagDefinition, unit: !128) +// CHECK:STDOUT: !136 = !DILocation(line: 5, column: 3, scope: !135) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'final_method.carbon' @@ -559,76 +529,66 @@ 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 !142 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !139 { // CHECK:STDOUT: entry: -// 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 !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.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !153 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !155 +// CHECK:STDOUT: %.loc10_15.2.temp = alloca {}, align 1, !dbg !140 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc10_15.2.temp), !dbg !140 +// CHECK:STDOUT: call void @_CCallMethod.Main.96e0ef8a617a6362(ptr @C.val.loc10_15.6), !dbg !144 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr @C.val), !dbg !140 +// CHECK:STDOUT: ret void, !dbg !145 // 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 !157 { -// CHECK:STDOUT: call void @_CM.FinalMethod.Main.96e0ef8a617a6362(ptr %t), !dbg !160 -// CHECK:STDOUT: ret void, !dbg !161 +// CHECK:STDOUT: define linkonce_odr void @_CCallMethod.Main.96e0ef8a617a6362(ptr %t) #0 !dbg !146 { +// CHECK:STDOUT: call void @_CM.FinalMethod.Main.96e0ef8a617a6362(ptr %t), !dbg !149 +// CHECK:STDOUT: ret void, !dbg !150 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CM.FinalMethod.Main.96e0ef8a617a6362(ptr %self) #0 !dbg !163 { -// CHECK:STDOUT: ret void, !dbg !166 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !152 { +// CHECK:STDOUT: ret void, !dbg !157 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CM.FinalMethod.Main.96e0ef8a617a6362(ptr %self) #0 !dbg !159 { +// CHECK:STDOUT: ret void, !dbg !162 // 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 = !{!141} +// CHECK:STDOUT: !llvm.dbg.cu = !{!138} // 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: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !16 = !{null} // CHECK:STDOUT: !17 = !DISubroutineType(types: !16) // CHECK:STDOUT: !20 = !DIFile(filename: "final_interfaces.carbon", directory: "") -// 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: !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: !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !42 = !{null, !41} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !137 = !DIFile(filename: "final_method.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: "F", linkageName: "_CF.Main", scope: null, file: !137, line: 9, type: !17, spFlags: DISPFlagDefinition, unit: !138) +// CHECK:STDOUT: !140 = !DILocation(line: 10, column: 14, scope: !139) +// CHECK:STDOUT: !144 = !DILocation(line: 11, column: 3, scope: !139) +// CHECK:STDOUT: !145 = !DILocation(line: 9, column: 1, scope: !139) +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "CallMethod", linkageName: "_CCallMethod.Main.96e0ef8a617a6362", scope: null, file: !20, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !138, retainedNodes: !151) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !41) +// CHECK:STDOUT: !149 = !DILocation(line: 17, column: 3, scope: !146) +// CHECK:STDOUT: !150 = !DILocation(line: 16, column: 1, scope: !146) +// CHECK:STDOUT: !151 = !{!147} +// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !6, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !138, retainedNodes: !158) +// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !41) +// CHECK:STDOUT: !157 = !DILocation(line: 32, column: 1, scope: !152) +// CHECK:STDOUT: !158 = !{!153} +// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "M", linkageName: "_CM.FinalMethod.Main.96e0ef8a617a6362", scope: null, file: !20, line: 9, type: !43, spFlags: DISPFlagDefinition, unit: !138, retainedNodes: !163) +// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !41) +// CHECK:STDOUT: !162 = !DILocation(line: 9, column: 3, scope: !159) +// CHECK:STDOUT: !163 = !{!160} // 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 6f9f0021d615..d79e02e5cf21 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 @_ZN6Carbon4MainL11CallLayoutAEPNS0_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 !136 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !139 // 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 @_ZN6Carbon4Main7LayoutAD2Ev(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 !136 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !139 // 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 @_ZN6Carbon4MainL11CallLayoutBEPNS0_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 !138 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !141 // 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 @_ZN6Carbon4Main7LayoutBD2Ev(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 !138 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !141 // 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::Main::LayoutB", ptr %this1, i32 0, i32 0 @@ -251,7 +251,7 @@ fn G() { // CHECK:STDOUT: define internal void @_ZN6Carbon4MainL11CallLayoutCEPNS0_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 !140 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !143 // 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 @_ZN6Carbon4Main7LayoutCD2Ev(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 !140 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !143 // 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 @_ZN6Carbon4Main7LayoutAD2Ev(ptr noundef nonnull align 8 dead_on_return(12) dereferenceable(12) %this1) #5 @@ -274,166 +274,143 @@ fn G() { // CHECK:STDOUT: declare void @_CCallLayoutC.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.LayoutA.Main"(ptr %self) #4 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.LayoutA.Main"(ptr %self) #4 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.5a318796badc8ab7:core.Destroy.Core"(ptr %self), !dbg !57 -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ec5c5666af23bee2(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.a17e1ddde5b22223:core.Destroy.Core"(ptr %self) #5 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_COp.7811fb2f9dc58511:core.SubobjectDestroy.Core"(ptr %self) #5 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: %.loc6_20.1.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !59 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_20.1.y), !dbg !59 +// CHECK:STDOUT: %.loc6_20.4.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !59 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %.loc6_20.4.x), !dbg !59 +// CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #5 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_COp.5a318796badc8ab7:core.SubobjectDestroy.Core"(ptr %self) #5 !dbg !63 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc6_20.1.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !65 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_20.1.y), !dbg !65 +// CHECK:STDOUT: %.loc6_20.4.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !65 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %.loc6_20.4.x), !dbg !65 // CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.7811fb2f9dc58511:core.Destroy.Core"(ptr %self) #5 !dbg !67 { +// CHECK:STDOUT: define void @_CCallLayoutA__carbon_thunk.Main(ptr %_) #5 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6_20.1.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc6_20.1.y), !dbg !69 -// CHECK:STDOUT: %.loc6_20.2.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %.loc6_20.2.x), !dbg !69 +// CHECK:STDOUT: %.loc21 = load ptr, ptr %_, align 8, !dbg !69 +// CHECK:STDOUT: call void @_CCallLayoutA.Main(ptr %.loc21), !dbg !69 // CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7811fb2f9dc58511:core.Destroy.Core"(ptr %self) #5 !dbg !71 { +// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.LayoutB.Main"(ptr %self) #4 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.7811fb2f9dc58511:core.Destroy.Core"(ptr %self), !dbg !73 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd2d442e060c7dd0(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.5a318796badc8ab7:core.Destroy.Core"(ptr %self) #5 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_COp.9ec3885d851a710b:core.SubobjectDestroy.Core"(ptr %self) #5 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6_20.1.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !77 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc6_20.1.y), !dbg !77 -// CHECK:STDOUT: %.loc6_20.2.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !77 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %.loc6_20.2.x), !dbg !77 +// CHECK:STDOUT: %.loc11_15.1.b = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 1, !dbg !77 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc11_15.1.b), !dbg !77 +// CHECK:STDOUT: %.loc11_15.4.a = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 0, !dbg !77 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ec5c5666af23bee2(ptr %.loc11_15.4.a), !dbg !77 // CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a318796badc8ab7:core.Destroy.Core"(ptr %self) #5 !dbg !79 { +// CHECK:STDOUT: define weak_odr void @"_COp.98b9397038fd95a2:core.SubobjectDestroy.Core"(ptr %self) #5 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a318796badc8ab7:core.Destroy.Core"(ptr %self), !dbg !81 +// CHECK:STDOUT: %.loc11_15.1.b = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 1, !dbg !81 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc11_15.1.b), !dbg !81 +// CHECK:STDOUT: %.loc11_15.4.a = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 0, !dbg !81 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ec5c5666af23bee2(ptr %.loc11_15.4.a), !dbg !81 // CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallLayoutA__carbon_thunk.Main(ptr %_) #5 !dbg !83 { +// CHECK:STDOUT: define void @_CCallLayoutB__carbon_thunk.Main(ptr %_) #5 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc21 = load ptr, ptr %_, align 8, !dbg !85 -// CHECK:STDOUT: call void @_CCallLayoutA.Main(ptr %.loc21), !dbg !85 +// CHECK:STDOUT: %.loc22 = load ptr, ptr %_, align 8, !dbg !85 +// CHECK:STDOUT: call void @_CCallLayoutB.Main(ptr %.loc22), !dbg !85 // CHECK:STDOUT: ret void, !dbg !85 // 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 !87 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.LayoutC.Main"(ptr %self) #4 !dbg !87 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.98b9397038fd95a2:core.Destroy.Core"(ptr %self), !dbg !89 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d869c4fcbd4e85a2(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 @"_CSubobjectDestroy.9ec3885d851a710b:core.Destroy.Core"(ptr %self) #5 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_COp.fdd48c8f5e73335b:core.SubobjectDestroy.Core"(ptr %self) #5 !dbg !91 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc11_15.1.b = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 1, !dbg !93 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc11_15.1.b), !dbg !93 -// CHECK:STDOUT: %.loc11_15.2.a = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 0, !dbg !93 -// CHECK:STDOUT: call void @"_CSelfDestruct.5a318796badc8ab7:core.Destroy.Core"(ptr %.loc11_15.2.a), !dbg !93 +// CHECK:STDOUT: %.loc16_15.1.c = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 1, !dbg !93 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_15.1.c), !dbg !93 +// CHECK:STDOUT: %.loc16_15.4.base = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 0, !dbg !93 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ec5c5666af23bee2(ptr %.loc16_15.4.base), !dbg !93 // CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9ec3885d851a710b:core.Destroy.Core"(ptr %self) #5 !dbg !95 { +// CHECK:STDOUT: define weak_odr void @"_COp.bb6bd82e06513595:core.SubobjectDestroy.Core"(ptr %self) #5 !dbg !95 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.9ec3885d851a710b:core.Destroy.Core"(ptr %self), !dbg !97 +// CHECK:STDOUT: %.loc16_15.1.c = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 1, !dbg !97 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_15.1.c), !dbg !97 +// CHECK:STDOUT: %.loc16_15.4.base = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 0, !dbg !97 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ec5c5666af23bee2(ptr %.loc16_15.4.base), !dbg !97 // CHECK:STDOUT: ret void, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.98b9397038fd95a2:core.Destroy.Core"(ptr %self) #5 !dbg !99 { +// CHECK:STDOUT: define void @_CCallLayoutC__carbon_thunk.Main(ptr %_) #5 !dbg !99 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc11_15.1.b = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 1, !dbg !101 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc11_15.1.b), !dbg !101 -// CHECK:STDOUT: %.loc11_15.2.a = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 0, !dbg !101 -// CHECK:STDOUT: call void @"_CSelfDestruct.5a318796badc8ab7:core.Destroy.Core"(ptr %.loc11_15.2.a), !dbg !101 +// CHECK:STDOUT: %.loc23 = load ptr, ptr %_, align 8, !dbg !101 +// CHECK:STDOUT: call void @_CCallLayoutC.Main(ptr %.loc23), !dbg !101 // CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.98b9397038fd95a2:core.Destroy.Core"(ptr %self) #5 !dbg !103 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.98b9397038fd95a2:core.Destroy.Core"(ptr %self), !dbg !105 -// CHECK:STDOUT: ret void, !dbg !105 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ec5c5666af23bee2(ptr %t) #5 !dbg !103 { +// CHECK:STDOUT: call void @"_COp.5a318796badc8ab7:core.SubobjectDestroy.Core"(ptr %t), !dbg !107 +// CHECK:STDOUT: ret void, !dbg !108 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallLayoutB__carbon_thunk.Main(ptr %_) #5 !dbg !107 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22 = load ptr, ptr %_, align 8, !dbg !109 -// CHECK:STDOUT: call void @_CCallLayoutB.Main(ptr %.loc22), !dbg !109 -// 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.LayoutC.Main"(ptr %self) #4 !dbg !111 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.bb6bd82e06513595:core.Destroy.Core"(ptr %self), !dbg !113 -// CHECK:STDOUT: ret void, !dbg !113 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #5 !dbg !110 { +// CHECK:STDOUT: ret void, !dbg !115 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.fdd48c8f5e73335b:core.Destroy.Core"(ptr %self) #5 !dbg !115 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_15.1.c = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 1, !dbg !117 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_15.1.c), !dbg !117 -// CHECK:STDOUT: %.loc16_15.2.base = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 0, !dbg !117 -// CHECK:STDOUT: call void @"_CSelfDestruct.5a318796badc8ab7:core.Destroy.Core"(ptr %.loc16_15.2.base), !dbg !117 -// CHECK:STDOUT: ret void, !dbg !117 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #5 !dbg !117 { +// CHECK:STDOUT: ret void, !dbg !122 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fdd48c8f5e73335b:core.Destroy.Core"(ptr %self) #5 !dbg !119 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.fdd48c8f5e73335b: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.bb6bd82e06513595:core.Destroy.Core"(ptr %self) #5 !dbg !123 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_15.1.c = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 1, !dbg !125 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_15.1.c), !dbg !125 -// CHECK:STDOUT: %.loc16_15.2.base = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 0, !dbg !125 -// CHECK:STDOUT: call void @"_CSelfDestruct.5a318796badc8ab7:core.Destroy.Core"(ptr %.loc16_15.2.base), !dbg !125 -// CHECK:STDOUT: ret void, !dbg !125 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb6bd82e06513595:core.Destroy.Core"(ptr %self) #5 !dbg !127 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.bb6bd82e06513595:core.Destroy.Core"(ptr %self), !dbg !129 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.dd2d442e060c7dd0(ptr %t) #5 !dbg !124 { +// CHECK:STDOUT: call void @"_COp.98b9397038fd95a2:core.SubobjectDestroy.Core"(ptr %t), !dbg !128 // CHECK:STDOUT: ret void, !dbg !129 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallLayoutC__carbon_thunk.Main(ptr %_) #5 !dbg !131 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc23 = load ptr, ptr %_, align 8, !dbg !133 -// CHECK:STDOUT: call void @_CCallLayoutC.Main(ptr %.loc23), !dbg !133 -// CHECK:STDOUT: ret void, !dbg !133 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.d869c4fcbd4e85a2(ptr %t) #5 !dbg !131 { +// CHECK:STDOUT: call void @"_COp.bb6bd82e06513595:core.SubobjectDestroy.Core"(ptr %t), !dbg !135 +// CHECK:STDOUT: ret void, !dbg !136 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_ZN6Carbon4Main7LayoutAD2Ev, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.ec5c5666af23bee2, { 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.4f29d15a20894e9b, { 1, 0 } // 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) } @@ -452,6 +429,7 @@ fn G() { // CHECK:STDOUT: !5 = !{!"int", !1, i64 0} // CHECK:STDOUT: !19 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !20 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !27 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !43 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !44 = !{i32 7, !"PIE Level", i32 2} @@ -463,94 +441,85 @@ fn G() { // CHECK:STDOUT: !50 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !51 = !{null, !50} // CHECK:STDOUT: !52 = !DISubroutineType(types: !51) -// CHECK:STDOUT: !53 = !{null, !37} -// CHECK:STDOUT: !54 = !DISubroutineType(types: !53) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.LayoutA.Main", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !50) -// CHECK:STDOUT: !57 = !DILocation(line: 6, column: 1, scope: !55) -// CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !62) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !50) -// CHECK:STDOUT: !61 = !DILocation(line: 6, column: 1, scope: !59) -// CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !48, line: 6, type: !54, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !37) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.LayoutA.Main", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !56) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !50) +// CHECK:STDOUT: !55 = !DILocation(line: 6, column: 1, scope: !53) +// CHECK:STDOUT: !56 = !{!54} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7811fb2f9dc58511:core.SubobjectDestroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !62) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !50) +// CHECK:STDOUT: !59 = !DILocation(line: 6, column: 1, scope: !57) +// CHECK:STDOUT: !60 = !{null, !37} +// CHECK:STDOUT: !61 = !DISubroutineType(types: !60) +// CHECK:STDOUT: !62 = !{!58} +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5a318796badc8ab7:core.SubobjectDestroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !66) +// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !50) // CHECK:STDOUT: !65 = !DILocation(line: 6, column: 1, scope: !63) // CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.7811fb2f9dc58511:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !70) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "CallLayoutA__carbon_thunk", linkageName: "_CCallLayoutA__carbon_thunk.Main", scope: null, file: !48, line: 21, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !70) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !50) -// CHECK:STDOUT: !69 = !DILocation(line: 6, column: 1, scope: !67) +// CHECK:STDOUT: !69 = !DILocation(line: 21, column: 1, scope: !67) // CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7811fb2f9dc58511:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !74) +// CHECK:STDOUT: !71 = 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: !74) // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !50) -// CHECK:STDOUT: !73 = !DILocation(line: 6, column: 1, scope: !71) +// CHECK:STDOUT: !73 = !DILocation(line: 11, column: 1, scope: !71) // CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5a318796badc8ab7:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !78) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "Op", linkageName: "_COp.9ec3885d851a710b:core.SubobjectDestroy.Core", scope: null, file: !48, line: 11, 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: !77 = !DILocation(line: 11, column: 1, scope: !75) // CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a318796badc8ab7:core.Destroy.Core", scope: null, file: !48, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !82) +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "Op", linkageName: "_COp.98b9397038fd95a2:core.SubobjectDestroy.Core", scope: null, file: !48, line: 11, 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: !81 = !DILocation(line: 11, column: 1, scope: !79) // CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "CallLayoutA__carbon_thunk", linkageName: "_CCallLayoutA__carbon_thunk.Main", scope: null, file: !48, line: 21, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !86) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "CallLayoutB__carbon_thunk", linkageName: "_CCallLayoutB__carbon_thunk.Main", scope: null, file: !48, line: 22, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !86) // CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !50) -// CHECK:STDOUT: !85 = !DILocation(line: 21, column: 1, scope: !83) +// CHECK:STDOUT: !85 = !DILocation(line: 22, column: 1, scope: !83) // CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = 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: !90) +// CHECK:STDOUT: !87 = 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: !90) // CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !50) -// CHECK:STDOUT: !89 = !DILocation(line: 11, column: 1, scope: !87) +// CHECK:STDOUT: !89 = !DILocation(line: 16, column: 1, scope: !87) // CHECK:STDOUT: !90 = !{!88} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9ec3885d851a710b:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !94) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "Op", linkageName: "_COp.fdd48c8f5e73335b:core.SubobjectDestroy.Core", scope: null, file: !48, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !94) // CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !50) -// CHECK:STDOUT: !93 = !DILocation(line: 11, column: 1, scope: !91) +// CHECK:STDOUT: !93 = !DILocation(line: 16, column: 1, scope: !91) // CHECK:STDOUT: !94 = !{!92} -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9ec3885d851a710b:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !98) +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "Op", linkageName: "_COp.bb6bd82e06513595:core.SubobjectDestroy.Core", scope: null, file: !48, line: 16, 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: !97 = !DILocation(line: 16, column: 1, scope: !95) // CHECK:STDOUT: !98 = !{!96} -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.98b9397038fd95a2:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !102) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "CallLayoutC__carbon_thunk", linkageName: "_CCallLayoutC__carbon_thunk.Main", scope: null, file: !48, line: 23, 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: !101 = !DILocation(line: 23, column: 1, scope: !99) // CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.98b9397038fd95a2:core.Destroy.Core", scope: null, file: !48, line: 11, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !106) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ec5c5666af23bee2", scope: null, file: !27, line: 32, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !109) // 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: "CallLayoutB__carbon_thunk", linkageName: "_CCallLayoutB__carbon_thunk.Main", scope: null, file: !48, line: 22, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !110) -// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !50) -// CHECK:STDOUT: !109 = !DILocation(line: 22, column: 1, scope: !107) -// CHECK:STDOUT: !110 = !{!108} -// CHECK:STDOUT: !111 = 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: !114) -// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !50) -// CHECK:STDOUT: !113 = !DILocation(line: 16, column: 1, scope: !111) -// CHECK:STDOUT: !114 = !{!112} -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.fdd48c8f5e73335b:core.Destroy.Core", 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: 16, column: 1, scope: !115) -// CHECK:STDOUT: !118 = !{!116} -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.fdd48c8f5e73335b: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.bb6bd82e06513595: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.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: "CallLayoutC__carbon_thunk", linkageName: "_CCallLayoutC__carbon_thunk.Main", scope: null, file: !48, line: 23, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !134) +// CHECK:STDOUT: !107 = !DILocation(line: 34, column: 5, scope: !103) +// CHECK:STDOUT: !108 = !DILocation(line: 32, column: 1, scope: !103) +// CHECK:STDOUT: !109 = !{!104} +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !27, line: 32, type: !61, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !116) +// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !37) +// CHECK:STDOUT: !115 = !DILocation(line: 32, column: 1, scope: !110) +// CHECK:STDOUT: !116 = !{!111} +// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !27, line: 32, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !123) +// CHECK:STDOUT: !118 = !DILocalVariable(arg: 1, scope: !117, type: !50) +// CHECK:STDOUT: !122 = !DILocation(line: 32, column: 1, scope: !117) +// CHECK:STDOUT: !123 = !{!118} +// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.dd2d442e060c7dd0", scope: null, file: !27, line: 32, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !130) +// CHECK:STDOUT: !125 = !DILocalVariable(arg: 1, scope: !124, type: !50) +// CHECK:STDOUT: !128 = !DILocation(line: 34, column: 5, scope: !124) +// CHECK:STDOUT: !129 = !DILocation(line: 32, column: 1, scope: !124) +// CHECK:STDOUT: !130 = !{!125} +// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.d869c4fcbd4e85a2", scope: null, file: !27, line: 32, type: !52, spFlags: DISPFlagDefinition, unit: !49, retainedNodes: !137) // CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !50) -// CHECK:STDOUT: !133 = !DILocation(line: 23, column: 1, scope: !131) -// CHECK:STDOUT: !134 = !{!132} -// CHECK:STDOUT: !135 = !{!"p1 _ZTSN6Carbon4Main7LayoutAE", !2, i64 0} -// CHECK:STDOUT: !136 = !{!135, !135, i64 0} -// CHECK:STDOUT: !137 = !{!"p1 _ZTSN6Carbon4Main7LayoutBE", !2, i64 0} -// CHECK:STDOUT: !138 = !{!137, !137, i64 0} -// CHECK:STDOUT: !139 = !{!"p1 _ZTSN6Carbon4Main7LayoutCE", !2, i64 0} -// CHECK:STDOUT: !140 = !{!139, !139, i64 0} +// CHECK:STDOUT: !135 = !DILocation(line: 34, column: 5, scope: !131) +// CHECK:STDOUT: !136 = !DILocation(line: 32, column: 1, scope: !131) +// CHECK:STDOUT: !137 = !{!132} +// CHECK:STDOUT: !138 = !{!"p1 _ZTSN6Carbon4Main7LayoutAE", !2, i64 0} +// CHECK:STDOUT: !139 = !{!138, !138, i64 0} +// CHECK:STDOUT: !140 = !{!"p1 _ZTSN6Carbon4Main7LayoutBE", !2, i64 0} +// CHECK:STDOUT: !141 = !{!140, !140, i64 0} +// CHECK:STDOUT: !142 = !{!"p1 _ZTSN6Carbon4Main7LayoutCE", !2, i64 0} +// CHECK:STDOUT: !143 = !{!142, !142, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'field.carbon' @@ -560,7 +529,7 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: %"class.Carbon::Main::FieldC" = type { i32, i32 } // CHECK:STDOUT: -// CHECK:STDOUT: @FieldC.val.loc19_3 = internal constant { i32, i32 } zeroinitializer +// CHECK:STDOUT: @FieldC.val.loc19_3.1 = internal constant { i32, i32 } zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable // CHECK:STDOUT: define dso_local void @_Z1FRN6Carbon4Main6FieldCE(ptr noundef nonnull align 4 dereferenceable(8) %c) #0 { @@ -577,63 +546,54 @@ 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 !143 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.FieldC.Main"(ptr %self) #1 !dbg !146 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.718874c3c75b803e:core.Destroy.Core"(ptr %self), !dbg !145 -// CHECK:STDOUT: ret void, !dbg !145 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0f9f2a833d58b7bf(ptr %self), !dbg !148 +// CHECK:STDOUT: ret void, !dbg !148 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #2 !dbg !147 { +// CHECK:STDOUT: define weak_odr void @"_COp.2508ed710019eba8:core.SubobjectDestroy.Core"(ptr %self) #2 !dbg !150 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !149 +// CHECK:STDOUT: %.loc6_14.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !152 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_14.1.b), !dbg !152 +// CHECK:STDOUT: %.loc6_14.4.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !152 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_14.4.a), !dbg !152 +// CHECK:STDOUT: ret void, !dbg !152 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core"(ptr %self) #2 !dbg !151 { +// CHECK:STDOUT: define weak_odr void @"_COp.718874c3c75b803e:core.SubobjectDestroy.Core"(ptr %self) #2 !dbg !154 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6_14.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !153 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc6_14.1.b), !dbg !153 -// CHECK:STDOUT: %.loc6_14.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !153 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc6_14.2.a), !dbg !153 -// CHECK:STDOUT: ret void, !dbg !153 +// CHECK:STDOUT: %.loc6_14.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !156 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_14.1.b), !dbg !156 +// CHECK:STDOUT: %.loc6_14.4.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !156 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_14.4.a), !dbg !156 +// CHECK:STDOUT: ret void, !dbg !156 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core"(ptr %self) #2 !dbg !155 { +// CHECK:STDOUT: define void @_CG.Main() #2 !dbg !158 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2508ed710019eba8: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 @"_CSubobjectDestroy.718874c3c75b803e:core.Destroy.Core"(ptr %self) #2 !dbg !159 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6_14.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !161 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc6_14.1.b), !dbg !161 -// CHECK:STDOUT: %.loc6_14.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !161 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc6_14.2.a), !dbg !161 -// CHECK:STDOUT: ret void, !dbg !161 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.718874c3c75b803e:core.Destroy.Core"(ptr %self) #2 !dbg !163 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.718874c3c75b803e:core.Destroy.Core"(ptr %self), !dbg !165 +// CHECK:STDOUT: %c.var = alloca { i32, i32 }, align 4, !dbg !159 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !159 +// CHECK:STDOUT: %.loc19_34.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %c.var, i32 0, i32 0, !dbg !160 +// CHECK:STDOUT: %.loc19_34.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %c.var, i32 0, i32 1, !dbg !160 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %c.var, ptr align 4 @FieldC.val.loc19_3.1, i64 8, i1 false), !dbg !159 +// CHECK:STDOUT: call void @_Z1FRN6Carbon4Main6FieldCE(ptr %c.var), !dbg !164 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0f9f2a833d58b7bf(ptr %c.var), !dbg !159 // CHECK:STDOUT: ret void, !dbg !165 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #2 !dbg !167 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca { i32, i32 }, align 4, !dbg !168 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !168 -// CHECK:STDOUT: %.loc19_34.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %c.var, i32 0, i32 0, !dbg !169 -// CHECK:STDOUT: %.loc19_34.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %c.var, i32 0, i32 1, !dbg !169 -// 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 !168 -// CHECK:STDOUT: call void @_Z1FRN6Carbon4Main6FieldCE(ptr %c.var), !dbg !173 -// CHECK:STDOUT: call void @"_CSelfDestruct.718874c3c75b803e:core.Destroy.Core"(ptr %c.var), !dbg !168 -// CHECK:STDOUT: ret void, !dbg !174 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.0f9f2a833d58b7bf(ptr %t) #2 !dbg !166 { +// CHECK:STDOUT: call void @"_COp.718874c3c75b803e:core.SubobjectDestroy.Core"(ptr %t), !dbg !170 +// CHECK:STDOUT: ret void, !dbg !171 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #2 !dbg !173 { +// CHECK:STDOUT: ret void, !dbg !178 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -642,12 +602,16 @@ fn G() { // 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) #3 // CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.0f9f2a833d58b7bf, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 3, 2, 1, 0 } +// 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 = { alwaysinline nounwind } // CHECK:STDOUT: attributes #2 = { nounwind } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!142} +// CHECK:STDOUT: !llvm.dbg.cu = !{!145} // CHECK:STDOUT: !llvm.module.flags = !{!43, !44, !45, !19, !20} // CHECK:STDOUT: !llvm.errno.tbaa = !{!47} // CHECK:STDOUT: @@ -664,6 +628,7 @@ fn G() { // CHECK:STDOUT: !16 = !{!12, !5, i64 4} // CHECK:STDOUT: !19 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !20 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !27 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !38 = !{null} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) @@ -675,37 +640,34 @@ fn G() { // CHECK:STDOUT: !50 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !51 = !{null, !50} // CHECK:STDOUT: !52 = !DISubroutineType(types: !51) -// CHECK:STDOUT: !53 = !{null, !37} -// CHECK:STDOUT: !54 = !DISubroutineType(types: !53) -// CHECK:STDOUT: !141 = !DIFile(filename: "field.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 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.FieldC.Main", scope: null, file: !141, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !146) -// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !50) -// CHECK:STDOUT: !145 = !DILocation(line: 6, column: 1, scope: !143) -// CHECK:STDOUT: !146 = !{!144} -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !141, line: 6, type: !54, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !150) -// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !37) -// CHECK:STDOUT: !149 = !DILocation(line: 6, column: 1, scope: !147) -// CHECK:STDOUT: !150 = !{!148} -// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core", scope: null, file: !141, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !154) -// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !50) -// CHECK:STDOUT: !153 = !DILocation(line: 6, column: 1, scope: !151) -// CHECK:STDOUT: !154 = !{!152} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2508ed710019eba8:core.Destroy.Core", scope: null, file: !141, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !158) -// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !50) -// CHECK:STDOUT: !157 = !DILocation(line: 6, column: 1, scope: !155) -// CHECK:STDOUT: !158 = !{!156} -// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.718874c3c75b803e:core.Destroy.Core", scope: null, file: !141, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !142, 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.718874c3c75b803e:core.Destroy.Core", scope: null, file: !141, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !142, 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: "G", linkageName: "_CG.Main", scope: null, file: !141, line: 18, type: !39, spFlags: DISPFlagDefinition, unit: !142) -// CHECK:STDOUT: !168 = !DILocation(line: 19, column: 3, scope: !167) -// CHECK:STDOUT: !169 = !DILocation(line: 19, column: 19, scope: !167) -// CHECK:STDOUT: !173 = !DILocation(line: 20, column: 3, scope: !167) -// CHECK:STDOUT: !174 = !DILocation(line: 18, column: 1, scope: !167) +// CHECK:STDOUT: !60 = !{null, !37} +// CHECK:STDOUT: !61 = !DISubroutineType(types: !60) +// CHECK:STDOUT: !144 = !DIFile(filename: "field.carbon", directory: "") +// CHECK:STDOUT: !145 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !144, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.FieldC.Main", scope: null, file: !144, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !145, retainedNodes: !149) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !50) +// CHECK:STDOUT: !148 = !DILocation(line: 6, column: 1, scope: !146) +// CHECK:STDOUT: !149 = !{!147} +// CHECK:STDOUT: !150 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2508ed710019eba8:core.SubobjectDestroy.Core", scope: null, file: !144, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !145, retainedNodes: !153) +// CHECK:STDOUT: !151 = !DILocalVariable(arg: 1, scope: !150, type: !50) +// CHECK:STDOUT: !152 = !DILocation(line: 6, column: 1, scope: !150) +// CHECK:STDOUT: !153 = !{!151} +// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "Op", linkageName: "_COp.718874c3c75b803e:core.SubobjectDestroy.Core", scope: null, file: !144, line: 6, type: !52, spFlags: DISPFlagDefinition, unit: !145, retainedNodes: !157) +// CHECK:STDOUT: !155 = !DILocalVariable(arg: 1, scope: !154, type: !50) +// CHECK:STDOUT: !156 = !DILocation(line: 6, column: 1, scope: !154) +// CHECK:STDOUT: !157 = !{!155} +// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !144, line: 18, type: !39, spFlags: DISPFlagDefinition, unit: !145) +// CHECK:STDOUT: !159 = !DILocation(line: 19, column: 3, scope: !158) +// CHECK:STDOUT: !160 = !DILocation(line: 19, column: 19, scope: !158) +// CHECK:STDOUT: !164 = !DILocation(line: 20, column: 3, scope: !158) +// CHECK:STDOUT: !165 = !DILocation(line: 18, column: 1, scope: !158) +// CHECK:STDOUT: !166 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.0f9f2a833d58b7bf", scope: null, file: !27, line: 32, type: !52, spFlags: DISPFlagDefinition, unit: !145, retainedNodes: !172) +// CHECK:STDOUT: !167 = !DILocalVariable(arg: 1, scope: !166, type: !50) +// CHECK:STDOUT: !170 = !DILocation(line: 34, column: 5, scope: !166) +// CHECK:STDOUT: !171 = !DILocation(line: 32, column: 1, scope: !166) +// CHECK:STDOUT: !172 = !{!167} +// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !27, line: 32, type: !61, spFlags: DISPFlagDefinition, unit: !145, retainedNodes: !179) +// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !37) +// CHECK:STDOUT: !178 = !DILocation(line: 32, column: 1, scope: !173) +// CHECK:STDOUT: !179 = !{!174} // 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 9428f51c6e28..f5759f0e0f5c 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 @@ -57,19 +57,12 @@ fn Run() { // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind // CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.C.Main"(ptr %self) #2 !dbg !17 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !19 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr %self), !dbg !19 // CHECK:STDOUT: ret void, !dbg !19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99: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.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !25 { -// CHECK:STDOUT: entry: +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !22 { // CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -109,14 +102,11 @@ fn Run() { // CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !17, type: !11) // CHECK:STDOUT: !19 = !DILocation(line: 4, column: 1, scope: !17) // CHECK:STDOUT: !20 = !{!18} -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !4, line: 4, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !24) -// 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: "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: !21 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !21, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !28) +// CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !22, type: !11) +// CHECK:STDOUT: !27 = !DILocation(line: 36, column: 1, scope: !22) +// CHECK:STDOUT: !28 = !{!23} // CHECK:STDOUT: !29 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !30 = !{!"omnipotent char", !29, i64 0} // CHECK:STDOUT: !31 = !{!"any pointer", !30, i64 0} diff --git a/toolchain/lower/testdata/interop/cpp/class/export/method.carbon b/toolchain/lower/testdata/interop/cpp/class/export/method.carbon index 98c3b265dda0..85313134e569 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 @_ZNK6Carbon4Main1A1FEv(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 !51 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !50 // 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 @_ZN6Carbon4Main1AD2Ev(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 !51 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !50 // 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 @@ -119,27 +119,20 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind // CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.A.Main"(ptr %self) #5 !dbg !31 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !33 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %self), !dbg !33 // 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) #4 !dbg !35 { +// CHECK:STDOUT: define void @_CF__carbon_thunk.A.Main(ptr %self) #4 !dbg !35 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_CF.A.Main(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 @"_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 void @_CF__carbon_thunk.A.Main(ptr %self) #4 !dbg !43 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.A.Main(ptr %self), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !45 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %t) #4 !dbg !39 { +// CHECK:STDOUT: ret void, !dbg !44 // 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" } @@ -150,11 +143,12 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: attributes #5 = { alwaysinline nounwind } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!21} -// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !4, !5} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!57} +// CHECK:STDOUT: !llvm.module.flags = !{!51, !52, !53, !4, !5} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!56} // CHECK:STDOUT: // CHECK:STDOUT: !4 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !5 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !12 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIFile(filename: "method.carbon", directory: "") // CHECK:STDOUT: !21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !20, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -168,29 +162,25 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !22) // CHECK:STDOUT: !33 = !DILocation(line: 5, column: 1, scope: !31) // CHECK:STDOUT: !34 = !{!32} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !20, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !38) +// CHECK:STDOUT: !35 = 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: !38) // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !22) -// CHECK:STDOUT: !37 = !DILocation(line: 5, column: 1, scope: !35) +// CHECK:STDOUT: !37 = !DILocation(line: 6, column: 3, scope: !35) // CHECK:STDOUT: !38 = !{!36} -// 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: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6b8b385dcf82cc70", scope: null, file: !12, line: 32, type: !24, spFlags: DISPFlagDefinition, unit: !21, retainedNodes: !45) // 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: "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: 6, column: 3, scope: !43) -// CHECK:STDOUT: !46 = !{!44} -// 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 _ZTSN6Carbon4Main1AE", !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: !44 = !DILocation(line: 32, column: 1, scope: !39) +// CHECK:STDOUT: !45 = !{!40} +// CHECK:STDOUT: !46 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !47 = !{!"omnipotent char", !46, i64 0} +// CHECK:STDOUT: !48 = !{!"any pointer", !47, i64 0} +// CHECK:STDOUT: !49 = !{!"p1 _ZTSN6Carbon4Main1AE", !48, i64 0} +// CHECK:STDOUT: !50 = !{!49, !49, i64 0} +// CHECK:STDOUT: !51 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !52 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !53 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !54 = !{!"int", !47, i64 0} +// CHECK:STDOUT: !55 = !{!"__libc_errno", !54, i64 0} +// CHECK:STDOUT: !56 = !{!55, !54, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'method_with_args_and_return.carbon' @@ -222,8 +212,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 !102 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !103 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !100 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !101 // 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 @@ -234,7 +224,7 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon4Main5ArgsAD2Ev(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 !102 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !100 // 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 @@ -244,44 +234,37 @@ 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 !67 { +// CHECK:STDOUT: define i32 @_CF.ArgsA.Main(ptr %self, i32 %a) #4 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %a, !dbg !76 +// CHECK:STDOUT: ret i32 %a, !dbg !75 // 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 !78 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.ArgsA.Main"(ptr %self) #5 !dbg !77 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.eefdfd667b52bf5b:core.Destroy.Core"(ptr %self), !dbg !80 -// CHECK:STDOUT: ret void, !dbg !80 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.cf5113b5b8a292cd(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.cb8adced19392b99:core.Destroy.Core"(ptr %self) #4 !dbg !82 { +// CHECK:STDOUT: define void @_CF__carbon_thunk.ArgsA.Main(ptr %self, ptr %_, ptr %_1) #4 !dbg !81 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: %.loc6_29.2 = load i32, ptr %_, align 4, !dbg !85 +// CHECK:STDOUT: %ArgsA.F.call = call i32 @_CF.ArgsA.Main(ptr %self, i32 %.loc6_29.2), !dbg !85 +// CHECK:STDOUT: store i32 %ArgsA.F.call, ptr %_1, align 4, !dbg !85 +// CHECK:STDOUT: ret void, !dbg !85 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.eefdfd667b52bf5b:core.Destroy.Core"(ptr %self) #4 !dbg !86 { +// CHECK:STDOUT: define i32 @_CCallCallF.Main() #4 !dbg !87 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !88 +// CHECK:STDOUT: %CallArgsF.call = call i32 @_Z9CallArgsFv(), !dbg !90 +// CHECK:STDOUT: ret i32 %CallArgsF.call, !dbg !91 // 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 !90 { -// CHECK:STDOUT: entry: -// 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 i32 @_CCallCallF.Main() #4 !dbg !96 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %CallArgsF.call = call i32 @_Z9CallArgsFv(), !dbg !99 -// CHECK:STDOUT: ret i32 %CallArgsF.call, !dbg !100 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.cf5113b5b8a292cd(ptr %t) #4 !dbg !92 { +// CHECK:STDOUT: ret void, !dbg !97 // 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" } @@ -291,62 +274,59 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: attributes #4 = { nounwind } // CHECK:STDOUT: attributes #5 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!59} -// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !4, !5} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!57} +// CHECK:STDOUT: !llvm.dbg.cu = !{!58} +// CHECK:STDOUT: !llvm.module.flags = !{!51, !52, !53, !4, !5} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!56} // CHECK:STDOUT: // CHECK:STDOUT: !4 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !5 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !12 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // 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: !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 = 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.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: "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 = !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 _ZTSN6Carbon4Main5ArgsAE", !49, i64 0} -// CHECK:STDOUT: !102 = !{!101, !101, i64 0} -// CHECK:STDOUT: !103 = !{!55, !55, i64 0} +// CHECK:STDOUT: !46 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !47 = !{!"omnipotent char", !46, i64 0} +// CHECK:STDOUT: !48 = !{!"any pointer", !47, i64 0} +// CHECK:STDOUT: !51 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !52 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !53 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !54 = !{!"int", !47, i64 0} +// CHECK:STDOUT: !55 = !{!"__libc_errno", !54, i64 0} +// CHECK:STDOUT: !56 = !{!55, !54, i64 0} +// CHECK:STDOUT: !57 = !DIFile(filename: "method_with_args_and_return.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 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !60 = !{!59, !22, !59} +// CHECK:STDOUT: !61 = !DISubroutineType(types: !60) +// CHECK:STDOUT: !62 = !{null, !22, !59, !59} +// CHECK:STDOUT: !63 = !DISubroutineType(types: !62) +// CHECK:STDOUT: !64 = !{!59} +// CHECK:STDOUT: !65 = !DISubroutineType(types: !64) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "F", linkageName: "_CF.ArgsA.Main", scope: null, file: !57, line: 6, type: !61, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !76) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !22) +// CHECK:STDOUT: !68 = !DILocalVariable(arg: 2, scope: !66, type: !59) +// CHECK:STDOUT: !75 = !DILocation(line: 8, column: 5, scope: !66) +// CHECK:STDOUT: !76 = !{!67, !68} +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.ArgsA.Main", scope: null, file: !57, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !80) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !22) +// CHECK:STDOUT: !79 = !DILocation(line: 5, column: 1, scope: !77) +// CHECK:STDOUT: !80 = !{!78} +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.ArgsA.Main", scope: null, file: !57, line: 6, type: !63, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !86) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !22) +// CHECK:STDOUT: !83 = !DILocalVariable(arg: 2, scope: !81, type: !59) +// CHECK:STDOUT: !84 = !DILocalVariable(arg: 3, scope: !81, type: !59) +// CHECK:STDOUT: !85 = !DILocation(line: 6, column: 3, scope: !81) +// CHECK:STDOUT: !86 = !{!82, !83, !84} +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !57, line: 18, type: !65, spFlags: DISPFlagDefinition, unit: !58) +// CHECK:STDOUT: !90 = !DILocation(line: 18, column: 32, scope: !87) +// CHECK:STDOUT: !91 = !DILocation(line: 18, column: 25, scope: !87) +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.cf5113b5b8a292cd", scope: null, file: !12, line: 32, type: !24, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !98) +// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !22) +// CHECK:STDOUT: !97 = !DILocation(line: 32, column: 1, scope: !92) +// CHECK:STDOUT: !98 = !{!93} +// CHECK:STDOUT: !99 = !{!"p1 _ZTSN6Carbon4Main5ArgsAE", !48, i64 0} +// CHECK:STDOUT: !100 = !{!99, !99, i64 0} +// CHECK:STDOUT: !101 = !{!54, !54, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'static.carbon' @@ -369,42 +349,35 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.StaticA.Main() #2 !dbg !108 { +// CHECK:STDOUT: define void @_CF.StaticA.Main() #2 !dbg !106 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: ret void, !dbg !107 // 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 !110 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.StaticA.Main"(ptr %self) #3 !dbg !108 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.1be3804f96ff0532:core.Destroy.Core"(ptr %self), !dbg !112 -// CHECK:STDOUT: ret void, !dbg !112 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6cfb2148c863a5b2(ptr %self), !dbg !110 +// CHECK:STDOUT: ret void, !dbg !110 // 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: define void @_CF__carbon_thunk.StaticA.Main() #2 !dbg !112 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_CF.StaticA.Main(), !dbg !113 +// CHECK:STDOUT: ret void, !dbg !113 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define void @_CCallCallF.Main() #2 !dbg !114 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_Z11CallStaticFv(), !dbg !115 // 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: ret void, !dbg !120 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF__carbon_thunk.StaticA.Main() #2 !dbg !122 { -// CHECK:STDOUT: entry: -// 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 void @_CCallCallF.Main() #2 !dbg !124 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z11CallStaticFv(), !dbg !125 -// CHECK:STDOUT: ret void, !dbg !126 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6cfb2148c863a5b2(ptr %t) #2 !dbg !117 { +// CHECK:STDOUT: ret void, !dbg !122 // 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" } @@ -412,44 +385,41 @@ fn CallCallF() { Cpp.CallStaticF(); } // CHECK:STDOUT: attributes #2 = { nounwind } // CHECK:STDOUT: attributes #3 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!105} -// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !4, !5} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!57} +// CHECK:STDOUT: !llvm.dbg.cu = !{!103} +// CHECK:STDOUT: !llvm.module.flags = !{!51, !52, !53, !4, !5} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!56} // CHECK:STDOUT: // CHECK:STDOUT: !4 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !5 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !12 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // 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: !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: "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: !46 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !47 = !{!"omnipotent char", !46, i64 0} +// CHECK:STDOUT: !51 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !52 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !53 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !54 = !{!"int", !47, i64 0} +// CHECK:STDOUT: !55 = !{!"__libc_errno", !54, i64 0} +// CHECK:STDOUT: !56 = !{!55, !54, i64 0} +// CHECK:STDOUT: !102 = !DIFile(filename: "static.carbon", directory: "") +// CHECK:STDOUT: !103 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !102, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !104 = !{null} +// CHECK:STDOUT: !105 = !DISubroutineType(types: !104) +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "F", linkageName: "_CF.StaticA.Main", scope: null, file: !102, line: 6, type: !105, spFlags: DISPFlagDefinition, unit: !103) +// CHECK:STDOUT: !107 = !DILocation(line: 6, column: 3, scope: !106) +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.StaticA.Main", scope: null, file: !102, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !103, retainedNodes: !111) +// CHECK:STDOUT: !109 = !DILocalVariable(arg: 1, scope: !108, type: !22) +// CHECK:STDOUT: !110 = !DILocation(line: 5, column: 1, scope: !108) +// CHECK:STDOUT: !111 = !{!109} +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.StaticA.Main", scope: null, file: !102, line: 6, type: !105, spFlags: DISPFlagDefinition, unit: !103) +// CHECK:STDOUT: !113 = !DILocation(line: 6, column: 3, scope: !112) +// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !102, line: 15, type: !105, spFlags: DISPFlagDefinition, unit: !103) +// CHECK:STDOUT: !115 = !DILocation(line: 15, column: 18, scope: !114) +// CHECK:STDOUT: !116 = !DILocation(line: 15, column: 1, scope: !114) +// CHECK:STDOUT: !117 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6cfb2148c863a5b2", scope: null, file: !12, line: 32, type: !24, spFlags: DISPFlagDefinition, unit: !103, retainedNodes: !123) +// CHECK:STDOUT: !118 = !DILocalVariable(arg: 1, scope: !117, type: !22) +// CHECK:STDOUT: !122 = !DILocation(line: 32, column: 1, scope: !117) +// CHECK:STDOUT: !123 = !{!118} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon b/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon index d3553caa9721..a6707decac87 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/alignment.carbon @@ -71,7 +71,7 @@ fn Packed(n: i32) { // CHECK:STDOUT: %.loc25.n = getelementptr inbounds nuw [4 x i8], ptr %a.var, i32 0, i32 0, !dbg !49 // CHECK:STDOUT: store i32 %n, ptr %.loc25.n, align 4, !dbg !49 // CHECK:STDOUT: call void @_Z4TakeI16NaturallyAlignedEvRT_(ptr %a.var), !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.89af5f7a0692dfe8:core.Destroy.Core"(ptr %a.var), !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c6278a5929156fb0(ptr %a.var), !dbg !47 // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -79,8 +79,8 @@ fn Packed(n: i32) { // CHECK:STDOUT: define internal void @_ZN16NaturallyAlignedC1Ev.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 !120 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !120 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !129 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !129 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,104 +94,101 @@ fn Packed(n: i32) { // CHECK:STDOUT: declare void @_Z4TakeI16NaturallyAlignedEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.89af5f7a0692dfe8:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define void @_CExtraAlignment.Main(i32 %n) #0 !dbg !59 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !61 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CExtraAlignment.Main(i32 %n) #0 !dbg !63 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca [16 x i8], align 16, !dbg !66 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !66 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645"(ptr %a.var), !dbg !66 -// CHECK:STDOUT: %.loc33.n = getelementptr inbounds nuw [16 x i8], ptr %a.var, i32 0, i32 0, !dbg !68 -// CHECK:STDOUT: store i32 %n, ptr %.loc33.n, align 4, !dbg !68 -// CHECK:STDOUT: call void @_Z4TakeI14ExtraAlignmentEvRT_(ptr %a.var), !dbg !72 -// CHECK:STDOUT: call void @"_CSelfDestruct.77c39a3d53f40ae2:core.Destroy.Core"(ptr %a.var), !dbg !66 -// CHECK:STDOUT: ret void, !dbg !73 +// CHECK:STDOUT: %a.var = alloca [16 x i8], align 16, !dbg !62 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !62 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645"(ptr %a.var), !dbg !62 +// CHECK:STDOUT: %.loc33.n = getelementptr inbounds nuw [16 x i8], ptr %a.var, i32 0, i32 0, !dbg !64 +// CHECK:STDOUT: store i32 %n, ptr %.loc33.n, align 4, !dbg !64 +// CHECK:STDOUT: call void @_Z4TakeI14ExtraAlignmentEvRT_(ptr %a.var), !dbg !68 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.22e5fe87740af61e(ptr %a.var), !dbg !62 +// CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN14ExtraAlignmentC1Ev.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 !122 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !122 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !131 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !131 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp"(ptr sret([16 x i8]) %return) #2 !dbg !75 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp"(ptr sret([16 x i8]) %return) #2 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN14ExtraAlignmentC1Ev.carbon_thunk.(ptr %return), !dbg !77 -// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: call void @_ZN14ExtraAlignmentC1Ev.carbon_thunk.(ptr %return), !dbg !73 +// CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z4TakeI14ExtraAlignmentEvRT_(ptr noundef nonnull align 16 dereferenceable(16)) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.77c39a3d53f40ae2:core.Destroy.Core"(ptr %self) #0 !dbg !78 { +// CHECK:STDOUT: define void @_CPacked.Main(i32 %n) #0 !dbg !74 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !80 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPacked.Main(i32 %n) #0 !dbg !82 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca [4 x i8], align 1, !dbg !85 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !85 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a"(ptr %a.var), !dbg !85 -// CHECK:STDOUT: %.loc42.n = getelementptr inbounds nuw [4 x i8], ptr %a.var, i32 0, i32 0, !dbg !87 -// CHECK:STDOUT: store i32 %n, ptr %.loc42.n, align 4, !dbg !87 -// CHECK:STDOUT: call void @_Z4TakeI6PackedEvRT_(ptr %a.var), !dbg !91 -// CHECK:STDOUT: call void @"_CSelfDestruct.00b787a687567d9a:core.Destroy.Core"(ptr %a.var), !dbg !85 -// CHECK:STDOUT: ret void, !dbg !92 +// CHECK:STDOUT: %a.var = alloca [4 x i8], align 1, !dbg !77 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !77 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a"(ptr %a.var), !dbg !77 +// CHECK:STDOUT: %.loc42.n = getelementptr inbounds nuw [4 x i8], ptr %a.var, i32 0, i32 0, !dbg !79 +// CHECK:STDOUT: store i32 %n, ptr %.loc42.n, align 4, !dbg !79 +// CHECK:STDOUT: call void @_Z4TakeI6PackedEvRT_(ptr %a.var), !dbg !83 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.13f1a30fe506004f(ptr %a.var), !dbg !77 +// CHECK:STDOUT: ret void, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN6PackedC1Ev.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 !124 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !124 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !133 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !133 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !94 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !86 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN6PackedC1Ev.carbon_thunk.(ptr %return), !dbg !96 -// CHECK:STDOUT: ret void, !dbg !96 +// CHECK:STDOUT: call void @_ZN6PackedC1Ev.carbon_thunk.(ptr %return), !dbg !88 +// CHECK:STDOUT: ret void, !dbg !88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z4TakeI6PackedEvRT_(ptr noundef nonnull align 1 dereferenceable(4)) #3 // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.00b787a687567d9a: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: 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.d4cda66b3640b619"(ptr sret([4 x i8]) %return) #0 !dbg !101 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.c846b89dd79c7366.Core:NaturallyAligned.Cpp"(ptr %return), !dbg !104 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.d4cda66b3640b619"(ptr sret([4 x i8]) %return) #0 !dbg !89 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.c846b89dd79c7366.Core:NaturallyAligned.Cpp"(ptr %return), !dbg !92 +// CHECK:STDOUT: ret void, !dbg !93 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.c6278a5929156fb0(ptr %t) #0 !dbg !94 { +// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645"(ptr sret([16 x i8]) %return) #0 !dbg !101 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp"(ptr %return), !dbg !104 // CHECK:STDOUT: ret void, !dbg !105 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645"(ptr sret([16 x i8]) %return) #0 !dbg !106 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp"(ptr %return), !dbg !109 -// CHECK:STDOUT: ret void, !dbg !110 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.22e5fe87740af61e(ptr %t) #0 !dbg !106 { +// CHECK:STDOUT: ret void, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a"(ptr sret([4 x i8]) %return) #0 !dbg !111 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp"(ptr %return), !dbg !114 -// CHECK:STDOUT: ret void, !dbg !115 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a"(ptr sret([4 x i8]) %return) #0 !dbg !113 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp"(ptr %return), !dbg !116 +// CHECK:STDOUT: ret void, !dbg !117 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.13f1a30fe506004f(ptr %t) #0 !dbg !118 { +// CHECK:STDOUT: ret void, !dbg !123 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -204,12 +201,13 @@ fn Packed(n: i32) { // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!35} -// CHECK:STDOUT: !llvm.module.flags = !{!125, !126, !127, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!130} +// CHECK:STDOUT: !llvm.module.flags = !{!134, !135, !136, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!139} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !28 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !22 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "alignment.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -229,58 +227,58 @@ fn Packed(n: i32) { // CHECK:STDOUT: !55 = !{!45} // CHECK:STDOUT: !56 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.c846b89dd79c7366.Core:NaturallyAligned.Cpp", scope: null, file: !34, line: 7, type: !43, spFlags: DISPFlagDefinition, unit: !35) // CHECK:STDOUT: !58 = !DILocation(line: 7, column: 8, scope: !56) -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.89af5f7a0692dfe8:core.Destroy.Core", scope: null, file: !34, line: 24, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !62) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !39) -// CHECK:STDOUT: !61 = !DILocation(line: 24, column: 3, scope: !59) -// CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "ExtraAlignment", linkageName: "_CExtraAlignment.Main", scope: null, file: !34, line: 29, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !74) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !36) -// CHECK:STDOUT: !66 = !DILocation(line: 30, column: 3, scope: !63) -// CHECK:STDOUT: !68 = !DILocation(line: 33, column: 3, scope: !63) -// CHECK:STDOUT: !72 = !DILocation(line: 34, column: 3, scope: !63) -// CHECK:STDOUT: !73 = !DILocation(line: 29, column: 1, scope: !63) -// CHECK:STDOUT: !74 = !{!64} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp", scope: null, file: !34, line: 11, type: !43, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !77 = !DILocation(line: 11, column: 20, scope: !75) -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.77c39a3d53f40ae2:core.Destroy.Core", scope: null, file: !34, line: 30, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !81) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !39) -// CHECK:STDOUT: !80 = !DILocation(line: 30, column: 3, scope: !78) -// CHECK:STDOUT: !81 = !{!79} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "Packed", linkageName: "_CPacked.Main", scope: null, file: !34, line: 37, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !93) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !36) -// CHECK:STDOUT: !85 = !DILocation(line: 38, column: 3, scope: !82) -// CHECK:STDOUT: !87 = !DILocation(line: 42, column: 3, scope: !82) -// CHECK:STDOUT: !91 = !DILocation(line: 43, column: 3, scope: !82) -// CHECK:STDOUT: !92 = !DILocation(line: 37, column: 1, scope: !82) -// CHECK:STDOUT: !93 = !{!83} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp", scope: null, file: !34, line: 15, type: !43, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !96 = !DILocation(line: 15, column: 32, scope: !94) -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.00b787a687567d9a:core.Destroy.Core", scope: null, file: !34, line: 38, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !100) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !39) -// CHECK:STDOUT: !99 = !DILocation(line: 38, column: 3, scope: !97) -// CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.d4cda66b3640b619", scope: null, file: !28, line: 9, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "ExtraAlignment", linkageName: "_CExtraAlignment.Main", scope: null, file: !34, line: 29, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !70) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !36) +// CHECK:STDOUT: !62 = !DILocation(line: 30, column: 3, scope: !59) +// CHECK:STDOUT: !64 = !DILocation(line: 33, column: 3, scope: !59) +// CHECK:STDOUT: !68 = !DILocation(line: 34, column: 3, scope: !59) +// CHECK:STDOUT: !69 = !DILocation(line: 29, column: 1, scope: !59) +// CHECK:STDOUT: !70 = !{!60} +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.52e7708693d29223.Core:ExtraAlignment.Cpp", scope: null, file: !34, line: 11, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !73 = !DILocation(line: 11, column: 20, scope: !71) +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "Packed", linkageName: "_CPacked.Main", scope: null, file: !34, line: 37, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !85) +// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !36) +// CHECK:STDOUT: !77 = !DILocation(line: 38, column: 3, scope: !74) +// CHECK:STDOUT: !79 = !DILocation(line: 42, column: 3, scope: !74) +// CHECK:STDOUT: !83 = !DILocation(line: 43, column: 3, scope: !74) +// CHECK:STDOUT: !84 = !DILocation(line: 37, column: 1, scope: !74) +// CHECK:STDOUT: !85 = !{!75} +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.ca2b917a39954a06.Core:Packed.Cpp", scope: null, file: !34, line: 15, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !88 = !DILocation(line: 15, column: 32, scope: !86) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.d4cda66b3640b619", scope: null, file: !22, line: 9, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !92 = !DILocation(line: 9, column: 28, scope: !89) +// CHECK:STDOUT: !93 = !DILocation(line: 9, column: 21, scope: !89) +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.c6278a5929156fb0", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !100) +// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !39) +// CHECK:STDOUT: !99 = !DILocation(line: 32, column: 1, scope: !94) +// CHECK:STDOUT: !100 = !{!95} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645", scope: null, file: !22, line: 9, type: !43, spFlags: DISPFlagDefinition, unit: !35) // CHECK:STDOUT: !104 = !DILocation(line: 9, column: 28, scope: !101) // CHECK:STDOUT: !105 = !DILocation(line: 9, column: 21, scope: !101) -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.34933c1c343bd645", scope: null, file: !28, line: 9, type: !43, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !109 = !DILocation(line: 9, column: 28, scope: !106) -// CHECK:STDOUT: !110 = !DILocation(line: 9, column: 21, scope: !106) -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a", scope: null, file: !28, line: 9, type: !43, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !114 = !DILocation(line: 9, column: 28, scope: !111) -// CHECK:STDOUT: !115 = !DILocation(line: 9, column: 21, scope: !111) -// CHECK:STDOUT: !116 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !117 = !{!"omnipotent char", !116, i64 0} -// CHECK:STDOUT: !118 = !{!"any pointer", !117, i64 0} -// CHECK:STDOUT: !119 = !{!"p1 _ZTS16NaturallyAligned", !118, i64 0} -// CHECK:STDOUT: !120 = !{!119, !119, i64 0} -// CHECK:STDOUT: !121 = !{!"p1 _ZTS14ExtraAlignment", !118, i64 0} -// CHECK:STDOUT: !122 = !{!121, !121, i64 0} -// CHECK:STDOUT: !123 = !{!"p1 _ZTS6Packed", !118, i64 0} -// CHECK:STDOUT: !124 = !{!123, !123, i64 0} -// CHECK:STDOUT: !125 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !126 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !127 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !128 = !{!"int", !117, i64 0} -// CHECK:STDOUT: !129 = !{!"__libc_errno", !128, i64 0} -// CHECK:STDOUT: !130 = !{!129, !128, i64 0} +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.22e5fe87740af61e", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !112) +// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !39) +// CHECK:STDOUT: !111 = !DILocation(line: 32, column: 1, scope: !106) +// CHECK:STDOUT: !112 = !{!107} +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.3e10857902c69c1a", scope: null, file: !22, line: 9, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !116 = !DILocation(line: 9, column: 28, scope: !113) +// CHECK:STDOUT: !117 = !DILocation(line: 9, column: 21, scope: !113) +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.13f1a30fe506004f", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !124) +// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !39) +// CHECK:STDOUT: !123 = !DILocation(line: 32, column: 1, scope: !118) +// CHECK:STDOUT: !124 = !{!119} +// CHECK:STDOUT: !125 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !126 = !{!"omnipotent char", !125, i64 0} +// CHECK:STDOUT: !127 = !{!"any pointer", !126, i64 0} +// CHECK:STDOUT: !128 = !{!"p1 _ZTS16NaturallyAligned", !127, i64 0} +// CHECK:STDOUT: !129 = !{!128, !128, i64 0} +// CHECK:STDOUT: !130 = !{!"p1 _ZTS14ExtraAlignment", !127, i64 0} +// CHECK:STDOUT: !131 = !{!130, !130, i64 0} +// CHECK:STDOUT: !132 = !{!"p1 _ZTS6Packed", !127, i64 0} +// CHECK:STDOUT: !133 = !{!132, !132, 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 = !{!"int", !126, i64 0} +// CHECK:STDOUT: !138 = !{!"__libc_errno", !137, i64 0} +// CHECK:STDOUT: !139 = !{!138, !137, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/constructor.carbon b/toolchain/lower/testdata/interop/cpp/class/import/constructor.carbon index 8b607c378b57..debce3d37855 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/constructor.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/constructor.carbon @@ -183,7 +183,7 @@ fn Four() { // CHECK:STDOUT: %.loc7_26.1.temp = alloca [8 x i8], align 4, !dbg !27 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_26.1.temp), !dbg !27 // CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk.(ptr %.loc7_26.1.temp), !dbg !27 -// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %.loc7_26.1.temp), !dbg !27 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %.loc7_26.1.temp), !dbg !27 // CHECK:STDOUT: ret void, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -191,34 +191,28 @@ fn Four() { // 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 !44 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !44 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !47 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !47 // CHECK:STDOUT: call void @_ZN1CC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %0) // 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 !31 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !31 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !33 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !35 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc11_19.2.temp = alloca [8 x i8], align 4, !dbg !36 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_19.2.temp), !dbg !36 -// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk_tuple.(ptr %.loc11_19.2.temp), !dbg !36 -// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %.loc11_19.2.temp), !dbg !36 -// CHECK:STDOUT: ret void, !dbg !39 +// CHECK:STDOUT: %.loc11_19.2.temp = alloca [8 x i8], align 4, !dbg !32 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_19.2.temp), !dbg !32 +// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk_tuple.(ptr %.loc11_19.2.temp), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %.loc11_19.2.temp), !dbg !32 +// CHECK:STDOUT: ret void, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_ZN1CC1Ev.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 !44 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !44 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !47 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !47 // CHECK:STDOUT: call void @_ZN1CC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -226,21 +220,27 @@ fn Four() { // 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 void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %t) #0 !dbg !36 { +// CHECK:STDOUT: ret void, !dbg !41 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN1CC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %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 !44 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !47 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: %x_ = getelementptr inbounds nuw %class.C, ptr %this1, i32 0, i32 0 -// CHECK:STDOUT: store i32 8, ptr %x_, align 4, !tbaa !47 +// CHECK:STDOUT: store i32 8, ptr %x_, align 4, !tbaa !50 // CHECK:STDOUT: %y_ = getelementptr inbounds nuw %class.C, ptr %this1, i32 0, i32 1 -// CHECK:STDOUT: store i32 9, ptr %y_, align 4, !tbaa !48 +// CHECK:STDOUT: store i32 9, ptr %y_, align 4, !tbaa !51 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.4d2f117a5a2332f0, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -248,11 +248,12 @@ fn Four() { // CHECK:STDOUT: attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!19} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!53} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!56} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "import_default.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !21 = !{null} @@ -263,27 +264,27 @@ fn Four() { // CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !19) // CHECK:STDOUT: !27 = !DILocation(line: 7, column: 18, scope: !26) // CHECK:STDOUT: !30 = !DILocation(line: 6, column: 1, scope: !26) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", scope: null, file: !18, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !34) -// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !23) -// CHECK:STDOUT: !33 = !DILocation(line: 7, column: 18, scope: !31) -// CHECK:STDOUT: !34 = !{!32} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 10, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !36 = !DILocation(line: 11, column: 18, scope: !35) -// CHECK:STDOUT: !39 = !DILocation(line: 10, column: 1, scope: !35) -// CHECK:STDOUT: !40 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !41 = !{!"omnipotent char", !40, i64 0} -// CHECK:STDOUT: !42 = !{!"any pointer", !41, i64 0} -// CHECK:STDOUT: !43 = !{!"p1 _ZTS1C", !42, i64 0} -// CHECK:STDOUT: !44 = !{!43, !43, i64 0} -// CHECK:STDOUT: !45 = !{!"int", !41, i64 0} -// CHECK:STDOUT: !46 = !{!"_ZTS1C", !45, i64 0, !45, i64 4} -// CHECK:STDOUT: !47 = !{!46, !45, i64 0} -// CHECK:STDOUT: !48 = !{!46, !45, i64 4} -// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"__libc_errno", !45, i64 0} -// CHECK:STDOUT: !53 = !{!52, !45, i64 0} +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 10, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !32 = !DILocation(line: 11, column: 18, scope: !31) +// CHECK:STDOUT: !35 = !DILocation(line: 10, column: 1, scope: !31) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4d2f117a5a2332f0", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !42) +// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !23) +// CHECK:STDOUT: !41 = !DILocation(line: 32, column: 1, scope: !36) +// CHECK:STDOUT: !42 = !{!37} +// CHECK:STDOUT: !43 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !44 = !{!"omnipotent char", !43, i64 0} +// CHECK:STDOUT: !45 = !{!"any pointer", !44, i64 0} +// CHECK:STDOUT: !46 = !{!"p1 _ZTS1C", !45, i64 0} +// CHECK:STDOUT: !47 = !{!46, !46, i64 0} +// CHECK:STDOUT: !48 = !{!"int", !44, i64 0} +// CHECK:STDOUT: !49 = !{!"_ZTS1C", !48, i64 0, !48, i64 4} +// CHECK:STDOUT: !50 = !{!49, !48, i64 0} +// CHECK:STDOUT: !51 = !{!49, !48, i64 4} +// 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 = !{!"__libc_errno", !48, i64 0} +// CHECK:STDOUT: !56 = !{!55, !48, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'implicit_default.carbon' @@ -296,35 +297,29 @@ fn Four() { // CHECK:STDOUT: $_ZN1CC2Ev = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !58 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !61 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [8 x i8], align 4, !dbg !59 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !59 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr %_.var), !dbg !59 -// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %_.var), !dbg !59 -// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: %_.var = alloca [8 x i8], align 4, !dbg !62 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !62 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr %_.var), !dbg !62 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %_.var), !dbg !62 +// CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress 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 !44 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !44 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !47 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !47 // CHECK:STDOUT: call void @_ZN1CC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %0) // 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([8 x i8]) %return) #2 !dbg !63 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk.(ptr %return), !dbg !64 -// CHECK:STDOUT: ret void, !dbg !64 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr sret([8 x i8]) %return) #2 !dbg !66 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk.(ptr %return), !dbg !67 // CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -332,21 +327,26 @@ fn Four() { // CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr sret([8 x i8]) %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([8 x i8]) %return) #0 !dbg !68 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !71 +// CHECK:STDOUT: ret void, !dbg !72 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %t) #0 !dbg !73 { +// CHECK:STDOUT: ret void, !dbg !78 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN1CC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %this) unnamed_addr #4 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 !44 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !47 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: %x_ = getelementptr inbounds nuw %class.C.18, ptr %this1, i32 0, i32 0 -// CHECK:STDOUT: store i32 8, ptr %x_, align 4, !tbaa !47 +// CHECK:STDOUT: store i32 8, ptr %x_, align 4, !tbaa !50 // CHECK:STDOUT: %y_ = getelementptr inbounds nuw %class.C.18, ptr %this1, i32 0, i32 1 -// CHECK:STDOUT: store i32 9, ptr %y_, align 4, !tbaa !48 +// CHECK:STDOUT: store i32 9, ptr %y_, align 4, !tbaa !51 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -356,49 +356,50 @@ fn Four() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!55} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!53} +// CHECK:STDOUT: !llvm.dbg.cu = !{!58} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!56} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !12 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !4 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !21 = !{null} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{null, !23} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !40 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !41 = !{!"omnipotent char", !40, i64 0} -// CHECK:STDOUT: !42 = !{!"any pointer", !41, i64 0} -// CHECK:STDOUT: !43 = !{!"p1 _ZTS1C", !42, i64 0} -// CHECK:STDOUT: !44 = !{!43, !43, i64 0} -// CHECK:STDOUT: !45 = !{!"int", !41, i64 0} -// CHECK:STDOUT: !46 = !{!"_ZTS1C", !45, i64 0, !45, i64 4} -// CHECK:STDOUT: !47 = !{!46, !45, i64 0} -// CHECK:STDOUT: !48 = !{!46, !45, i64 4} -// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"__libc_errno", !45, i64 0} -// CHECK:STDOUT: !53 = !{!52, !45, i64 0} -// CHECK:STDOUT: !54 = !DIFile(filename: "implicit_default.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 = !{!23} -// CHECK:STDOUT: !57 = !DISubroutineType(types: !56) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !54, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !55) -// CHECK:STDOUT: !59 = !DILocation(line: 7, column: 3, scope: !58) -// CHECK:STDOUT: !61 = !DILocation(line: 6, column: 1, scope: !58) -// CHECK:STDOUT: !62 = !DIFile(filename: "./default.h", directory: "") -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !62, line: 4, type: !57, spFlags: DISPFlagDefinition, unit: !55) -// CHECK:STDOUT: !64 = !DILocation(line: 4, column: 3, scope: !63) -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", scope: null, file: !54, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !55, retainedNodes: !68) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !23) -// CHECK:STDOUT: !67 = !DILocation(line: 7, column: 3, 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: !57, spFlags: DISPFlagDefinition, unit: !55) -// CHECK:STDOUT: !72 = !DILocation(line: 9, column: 28, scope: !69) -// CHECK:STDOUT: !73 = !DILocation(line: 9, column: 21, scope: !69) +// CHECK:STDOUT: !43 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !44 = !{!"omnipotent char", !43, i64 0} +// CHECK:STDOUT: !45 = !{!"any pointer", !44, i64 0} +// CHECK:STDOUT: !46 = !{!"p1 _ZTS1C", !45, i64 0} +// CHECK:STDOUT: !47 = !{!46, !46, i64 0} +// CHECK:STDOUT: !48 = !{!"int", !44, i64 0} +// CHECK:STDOUT: !49 = !{!"_ZTS1C", !48, i64 0, !48, i64 4} +// CHECK:STDOUT: !50 = !{!49, !48, i64 0} +// CHECK:STDOUT: !51 = !{!49, !48, i64 4} +// 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 = !{!"__libc_errno", !48, i64 0} +// CHECK:STDOUT: !56 = !{!55, !48, i64 0} +// CHECK:STDOUT: !57 = !DIFile(filename: "implicit_default.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 = !{!23} +// CHECK:STDOUT: !60 = !DISubroutineType(types: !59) +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !57, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !58) +// CHECK:STDOUT: !62 = !DILocation(line: 7, column: 3, scope: !61) +// CHECK:STDOUT: !64 = !DILocation(line: 6, column: 1, scope: !61) +// CHECK:STDOUT: !65 = !DIFile(filename: "./default.h", directory: "") +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !65, line: 4, type: !60, spFlags: DISPFlagDefinition, unit: !58) +// CHECK:STDOUT: !67 = !DILocation(line: 4, column: 3, scope: !66) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !4, line: 9, type: !60, spFlags: DISPFlagDefinition, unit: !58) +// CHECK:STDOUT: !71 = !DILocation(line: 9, column: 28, scope: !68) +// CHECK:STDOUT: !72 = !DILocation(line: 9, column: 21, scope: !68) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4d2f117a5a2332f0", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !79) +// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !23) +// CHECK:STDOUT: !78 = !DILocation(line: 32, column: 1, scope: !73) +// CHECK:STDOUT: !79 = !{!74} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'defaulted_default.carbon' @@ -414,96 +415,94 @@ fn Four() { // CHECK:STDOUT: $_ZN26ExplicitlyDefaultedDefaultC2Ev = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !76 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !82 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8_65.1.temp = alloca [4 x i8], align 4, !dbg !77 -// CHECK:STDOUT: %_.var.loc9 = alloca [4 x i8], align 4, !dbg !80 -// CHECK:STDOUT: %.loc12_65.1.temp = alloca [4 x i8], align 4, !dbg !82 -// CHECK:STDOUT: %_.var.loc13 = alloca [4 x i8], align 4, !dbg !85 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_65.1.temp), !dbg !77 -// CHECK:STDOUT: call void @_ZN26ImplicitlyDefaultedDefaultC1Ev.carbon_thunk.(ptr %.loc8_65.1.temp), !dbg !77 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc9), !dbg !80 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.c20bae04b665a8c9"(ptr %_.var.loc9), !dbg !80 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_65.1.temp), !dbg !82 -// CHECK:STDOUT: call void @_ZN26ExplicitlyDefaultedDefaultC1Ev.carbon_thunk.(ptr %.loc12_65.1.temp), !dbg !82 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc13), !dbg !85 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.055ae7235dade271"(ptr %_.var.loc13), !dbg !85 -// CHECK:STDOUT: call void @"_CSelfDestruct.681e36e00927c39d:core.Destroy.Core"(ptr %_.var.loc13), !dbg !85 -// CHECK:STDOUT: call void @"_CSelfDestruct.681e36e00927c39d:core.Destroy.Core"(ptr %.loc12_65.1.temp), !dbg !82 -// CHECK:STDOUT: call void @"_CSelfDestruct.20792ac67a297dbd:core.Destroy.Core"(ptr %_.var.loc9), !dbg !80 -// CHECK:STDOUT: call void @"_CSelfDestruct.20792ac67a297dbd:core.Destroy.Core"(ptr %.loc8_65.1.temp), !dbg !77 -// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: %.loc8_65.1.temp = alloca [4 x i8], align 4, !dbg !83 +// CHECK:STDOUT: %_.var.loc9 = alloca [4 x i8], align 4, !dbg !86 +// CHECK:STDOUT: %.loc12_65.1.temp = alloca [4 x i8], align 4, !dbg !88 +// CHECK:STDOUT: %_.var.loc13 = alloca [4 x i8], align 4, !dbg !91 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_65.1.temp), !dbg !83 +// CHECK:STDOUT: call void @_ZN26ImplicitlyDefaultedDefaultC1Ev.carbon_thunk.(ptr %.loc8_65.1.temp), !dbg !83 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc9), !dbg !86 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.c20bae04b665a8c9"(ptr %_.var.loc9), !dbg !86 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_65.1.temp), !dbg !88 +// CHECK:STDOUT: call void @_ZN26ExplicitlyDefaultedDefaultC1Ev.carbon_thunk.(ptr %.loc12_65.1.temp), !dbg !88 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc13), !dbg !91 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.055ae7235dade271"(ptr %_.var.loc13), !dbg !91 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d07982f4dd457e72(ptr %_.var.loc13), !dbg !91 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d07982f4dd457e72(ptr %.loc12_65.1.temp), !dbg !88 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.3d110fbad655625b(ptr %_.var.loc9), !dbg !86 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.3d110fbad655625b(ptr %.loc8_65.1.temp), !dbg !83 +// CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN26ImplicitlyDefaultedDefaultC1Ev.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 !112 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !112 +// 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: call void @_ZN26ImplicitlyDefaultedDefaultC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %0) #0 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.48fb4c4d31b7d0bf.Core:ImplicitlyDefaultedDefault.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !89 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.48fb4c4d31b7d0bf.Core:ImplicitlyDefaultedDefault.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !95 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN26ImplicitlyDefaultedDefaultC1Ev.carbon_thunk.(ptr %return), !dbg !90 -// CHECK:STDOUT: ret void, !dbg !90 +// CHECK:STDOUT: call void @_ZN26ImplicitlyDefaultedDefaultC1Ev.carbon_thunk.(ptr %return), !dbg !96 +// CHECK:STDOUT: ret void, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN26ExplicitlyDefaultedDefaultC1Ev.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 !116 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !116 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !128 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !128 // CHECK:STDOUT: call void @_ZN26ExplicitlyDefaultedDefaultC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %0) #0 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.f7ca6602362234ee.Core:ExplicitlyDefaultedDefault.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !91 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.f7ca6602362234ee.Core:ExplicitlyDefaultedDefault.Cpp"(ptr sret([4 x i8]) %return) #2 !dbg !97 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN26ExplicitlyDefaultedDefaultC1Ev.carbon_thunk.(ptr %return), !dbg !92 -// CHECK:STDOUT: ret void, !dbg !92 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.681e36e00927c39d: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 @"_CSelfDestruct.20792ac67a297dbd:core.Destroy.Core"(ptr %self) #0 !dbg !97 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: call void @_ZN26ExplicitlyDefaultedDefaultC1Ev.carbon_thunk.(ptr %return), !dbg !98 +// CHECK:STDOUT: ret void, !dbg !98 // 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 void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.c20bae04b665a8c9"(ptr sret([4 x i8]) %return) #0 !dbg !101 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.48fb4c4d31b7d0bf.Core:ImplicitlyDefaultedDefault.Cpp"(ptr %return), !dbg !104 -// CHECK:STDOUT: ret void, !dbg !105 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.c20bae04b665a8c9"(ptr sret([4 x i8]) %return) #0 !dbg !99 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.48fb4c4d31b7d0bf.Core:ImplicitlyDefaultedDefault.Cpp"(ptr %return), !dbg !102 +// CHECK:STDOUT: ret void, !dbg !103 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.055ae7235dade271"(ptr sret([4 x i8]) %return) #0 !dbg !106 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.f7ca6602362234ee.Core:ExplicitlyDefaultedDefault.Cpp"(ptr %return), !dbg !109 -// CHECK:STDOUT: ret void, !dbg !110 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.055ae7235dade271"(ptr sret([4 x i8]) %return) #0 !dbg !104 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.f7ca6602362234ee.Core:ExplicitlyDefaultedDefault.Cpp"(ptr %return), !dbg !107 +// CHECK:STDOUT: ret void, !dbg !108 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.d07982f4dd457e72(ptr %t) #0 !dbg !109 { +// CHECK:STDOUT: ret void, !dbg !114 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.3d110fbad655625b(ptr %t) #0 !dbg !116 { +// CHECK:STDOUT: ret void, !dbg !121 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN26ImplicitlyDefaultedDefaultC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %this) unnamed_addr #4 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 !112 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !124 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: %x_ = getelementptr inbounds nuw %struct.ImplicitlyDefaultedDefault, ptr %this1, i32 0, i32 0 -// CHECK:STDOUT: store i32 1, ptr %x_, align 4, !tbaa !114 +// CHECK:STDOUT: store i32 1, ptr %x_, align 4, !tbaa !126 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -511,17 +510,17 @@ fn Four() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN26ExplicitlyDefaultedDefaultC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %this) unnamed_addr #5 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 !116 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !128 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: %x_ = getelementptr inbounds nuw %struct.ExplicitlyDefaultedDefault, ptr %this1, i32 0, i32 0 -// CHECK:STDOUT: store i32 1, ptr %x_, align 4, !tbaa !118 +// CHECK:STDOUT: store i32 1, ptr %x_, align 4, !tbaa !130 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.681e36e00927c39d:core.Destroy.Core", { 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.20792ac67a297dbd:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.d07982f4dd457e72, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.3d110fbad655625b, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -530,64 +529,65 @@ fn Four() { // CHECK:STDOUT: attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!75} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!53} +// CHECK:STDOUT: !llvm.dbg.cu = !{!81} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!56} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !12 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !4 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !21 = !{null} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{null, !23} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !40 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !41 = !{!"omnipotent char", !40, i64 0} -// CHECK:STDOUT: !42 = !{!"any pointer", !41, i64 0} -// CHECK:STDOUT: !45 = !{!"int", !41, i64 0} -// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"__libc_errno", !45, i64 0} -// CHECK:STDOUT: !53 = !{!52, !45, i64 0} -// CHECK:STDOUT: !56 = !{!23} -// CHECK:STDOUT: !57 = !DISubroutineType(types: !56) -// CHECK:STDOUT: !74 = !DIFile(filename: "defaulted_default.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: "F", linkageName: "_CF.Main", scope: null, file: !74, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !75) -// CHECK:STDOUT: !77 = !DILocation(line: 8, column: 7, scope: !76) -// CHECK:STDOUT: !80 = !DILocation(line: 9, column: 3, scope: !76) -// CHECK:STDOUT: !82 = !DILocation(line: 12, column: 7, scope: !76) -// CHECK:STDOUT: !85 = !DILocation(line: 13, column: 3, scope: !76) -// CHECK:STDOUT: !87 = !DILocation(line: 6, column: 1, scope: !76) -// CHECK:STDOUT: !88 = !DIFile(filename: "./defaulted_default.h", directory: "") -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.48fb4c4d31b7d0bf.Core:ImplicitlyDefaultedDefault.Cpp", scope: null, file: !88, line: 2, type: !57, spFlags: DISPFlagDefinition, unit: !75) -// CHECK:STDOUT: !90 = !DILocation(line: 2, column: 8, scope: !89) -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.f7ca6602362234ee.Core:ExplicitlyDefaultedDefault.Cpp", scope: null, file: !88, line: 7, type: !57, spFlags: DISPFlagDefinition, unit: !75) -// CHECK:STDOUT: !92 = !DILocation(line: 7, column: 3, scope: !91) -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.681e36e00927c39d:core.Destroy.Core", scope: null, file: !74, line: 13, type: !25, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !96) -// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !23) -// CHECK:STDOUT: !95 = !DILocation(line: 13, column: 3, scope: !93) -// CHECK:STDOUT: !96 = !{!94} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.20792ac67a297dbd:core.Destroy.Core", scope: null, file: !74, line: 9, type: !25, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !100) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !23) -// CHECK:STDOUT: !99 = !DILocation(line: 9, column: 3, scope: !97) -// CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.c20bae04b665a8c9", scope: null, file: !12, line: 9, type: !57, spFlags: DISPFlagDefinition, unit: !75) -// CHECK:STDOUT: !104 = !DILocation(line: 9, column: 28, scope: !101) -// CHECK:STDOUT: !105 = !DILocation(line: 9, column: 21, scope: !101) -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.055ae7235dade271", scope: null, file: !12, line: 9, type: !57, spFlags: DISPFlagDefinition, unit: !75) -// CHECK:STDOUT: !109 = !DILocation(line: 9, column: 28, scope: !106) -// CHECK:STDOUT: !110 = !DILocation(line: 9, column: 21, scope: !106) -// CHECK:STDOUT: !111 = !{!"p1 _ZTS26ImplicitlyDefaultedDefault", !42, i64 0} -// CHECK:STDOUT: !112 = !{!111, !111, i64 0} -// CHECK:STDOUT: !113 = !{!"_ZTS26ImplicitlyDefaultedDefault", !45, i64 0} -// CHECK:STDOUT: !114 = !{!113, !45, i64 0} -// CHECK:STDOUT: !115 = !{!"p1 _ZTS26ExplicitlyDefaultedDefault", !42, i64 0} -// CHECK:STDOUT: !116 = !{!115, !115, i64 0} -// CHECK:STDOUT: !117 = !{!"_ZTS26ExplicitlyDefaultedDefault", !45, i64 0} -// CHECK:STDOUT: !118 = !{!117, !45, i64 0} +// CHECK:STDOUT: !43 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !44 = !{!"omnipotent char", !43, i64 0} +// CHECK:STDOUT: !45 = !{!"any pointer", !44, i64 0} +// CHECK:STDOUT: !48 = !{!"int", !44, 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 = !{!"__libc_errno", !48, i64 0} +// CHECK:STDOUT: !56 = !{!55, !48, i64 0} +// CHECK:STDOUT: !59 = !{!23} +// CHECK:STDOUT: !60 = !DISubroutineType(types: !59) +// CHECK:STDOUT: !80 = !DIFile(filename: "defaulted_default.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: "F", linkageName: "_CF.Main", scope: null, file: !80, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !81) +// CHECK:STDOUT: !83 = !DILocation(line: 8, column: 7, scope: !82) +// CHECK:STDOUT: !86 = !DILocation(line: 9, column: 3, scope: !82) +// CHECK:STDOUT: !88 = !DILocation(line: 12, column: 7, scope: !82) +// CHECK:STDOUT: !91 = !DILocation(line: 13, column: 3, scope: !82) +// CHECK:STDOUT: !93 = !DILocation(line: 6, column: 1, scope: !82) +// CHECK:STDOUT: !94 = !DIFile(filename: "./defaulted_default.h", directory: "") +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.48fb4c4d31b7d0bf.Core:ImplicitlyDefaultedDefault.Cpp", scope: null, file: !94, line: 2, type: !60, spFlags: DISPFlagDefinition, unit: !81) +// CHECK:STDOUT: !96 = !DILocation(line: 2, column: 8, scope: !95) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.f7ca6602362234ee.Core:ExplicitlyDefaultedDefault.Cpp", scope: null, file: !94, line: 7, type: !60, spFlags: DISPFlagDefinition, unit: !81) +// CHECK:STDOUT: !98 = !DILocation(line: 7, column: 3, scope: !97) +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.c20bae04b665a8c9", scope: null, file: !4, line: 9, type: !60, spFlags: DISPFlagDefinition, unit: !81) +// CHECK:STDOUT: !102 = !DILocation(line: 9, column: 28, scope: !99) +// CHECK:STDOUT: !103 = !DILocation(line: 9, column: 21, scope: !99) +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.055ae7235dade271", scope: null, file: !4, line: 9, type: !60, spFlags: DISPFlagDefinition, unit: !81) +// CHECK:STDOUT: !107 = !DILocation(line: 9, column: 28, scope: !104) +// CHECK:STDOUT: !108 = !DILocation(line: 9, column: 21, scope: !104) +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.d07982f4dd457e72", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !115) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !23) +// CHECK:STDOUT: !114 = !DILocation(line: 32, column: 1, scope: !109) +// CHECK:STDOUT: !115 = !{!110} +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.3d110fbad655625b", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !122) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !23) +// CHECK:STDOUT: !121 = !DILocation(line: 32, column: 1, scope: !116) +// CHECK:STDOUT: !122 = !{!117} +// CHECK:STDOUT: !123 = !{!"p1 _ZTS26ImplicitlyDefaultedDefault", !45, i64 0} +// CHECK:STDOUT: !124 = !{!123, !123, i64 0} +// CHECK:STDOUT: !125 = !{!"_ZTS26ImplicitlyDefaultedDefault", !48, i64 0} +// CHECK:STDOUT: !126 = !{!125, !48, i64 0} +// CHECK:STDOUT: !127 = !{!"p1 _ZTS26ExplicitlyDefaultedDefault", !45, i64 0} +// CHECK:STDOUT: !128 = !{!127, !127, i64 0} +// CHECK:STDOUT: !129 = !{!"_ZTS26ExplicitlyDefaultedDefault", !48, i64 0} +// CHECK:STDOUT: !130 = !{!129, !48, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call_copy.carbon' @@ -596,12 +596,12 @@ fn Four() { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCopy.Main(ptr sret([4 x i8]) %return, ptr %c) #0 !dbg !125 { +// CHECK:STDOUT: define void @_CCopy.Main(ptr sret([4 x i8]) %return, ptr %c) #0 !dbg !137 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_10.1.temp = alloca [4 x i8], align 4, !dbg !130 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_10.1.temp), !dbg !130 -// CHECK:STDOUT: call void @_ZN4CopyC1ERKS_.carbon_thunk._(ptr %c, ptr %return), !dbg !130 -// CHECK:STDOUT: ret void, !dbg !131 +// CHECK:STDOUT: %.loc7_10.1.temp = alloca [4 x i8], align 4, !dbg !142 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_10.1.temp), !dbg !142 +// CHECK:STDOUT: call void @_ZN4CopyC1ERKS_.carbon_thunk._(ptr %c, ptr %return), !dbg !142 +// CHECK:STDOUT: ret void, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -609,19 +609,19 @@ fn Four() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !139 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !139 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !139 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !139 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !151 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !151 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !151 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !151 // CHECK:STDOUT: call void @_ZN4CopyC1ERKS_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.58fe21e3ef78b0d7.Core:Copy.Cpp"(ptr sret([4 x i8]) %return, ptr %self) #2 !dbg !134 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.58fe21e3ef78b0d7.Core:Copy.Cpp"(ptr sret([4 x i8]) %return, ptr %self) #2 !dbg !146 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN4CopyC1ERKS_.carbon_thunk._(ptr %self, ptr %return), !dbg !136 -// CHECK:STDOUT: ret void, !dbg !136 +// CHECK:STDOUT: call void @_ZN4CopyC1ERKS_.carbon_thunk._(ptr %self, ptr %return), !dbg !148 +// CHECK:STDOUT: ret void, !dbg !148 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -635,38 +635,38 @@ fn Four() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!120} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!53} +// CHECK:STDOUT: !llvm.dbg.cu = !{!132} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!56} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !40 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !41 = !{!"omnipotent char", !40, i64 0} -// CHECK:STDOUT: !42 = !{!"any pointer", !41, i64 0} -// CHECK:STDOUT: !45 = !{!"int", !41, i64 0} -// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"__libc_errno", !45, i64 0} -// CHECK:STDOUT: !53 = !{!52, !45, i64 0} -// CHECK:STDOUT: !119 = !DIFile(filename: "call_copy.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 = !{!23, !23} -// CHECK:STDOUT: !122 = !DISubroutineType(types: !121) -// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.Main", scope: null, file: !119, line: 6, type: !122, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !132) -// CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !23) -// CHECK:STDOUT: !130 = !DILocation(line: 7, column: 10, scope: !125) -// CHECK:STDOUT: !131 = !DILocation(line: 7, column: 3, scope: !125) -// CHECK:STDOUT: !132 = !{!126} -// CHECK:STDOUT: !133 = !DIFile(filename: "./copy.h", directory: "") -// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.58fe21e3ef78b0d7.Core:Copy.Cpp", scope: null, file: !133, line: 5, type: !122, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !137) -// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !23) -// CHECK:STDOUT: !136 = !DILocation(line: 5, column: 3, scope: !134) -// CHECK:STDOUT: !137 = !{!135} -// CHECK:STDOUT: !138 = !{!"p1 _ZTS4Copy", !42, i64 0} -// CHECK:STDOUT: !139 = !{!138, !138, i64 0} +// CHECK:STDOUT: !43 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !44 = !{!"omnipotent char", !43, i64 0} +// CHECK:STDOUT: !45 = !{!"any pointer", !44, i64 0} +// CHECK:STDOUT: !48 = !{!"int", !44, 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 = !{!"__libc_errno", !48, i64 0} +// CHECK:STDOUT: !56 = !{!55, !48, i64 0} +// CHECK:STDOUT: !131 = !DIFile(filename: "call_copy.carbon", directory: "") +// CHECK:STDOUT: !132 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !131, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !133 = !{!23, !23} +// CHECK:STDOUT: !134 = !DISubroutineType(types: !133) +// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.Main", scope: null, file: !131, line: 6, type: !134, spFlags: DISPFlagDefinition, unit: !132, retainedNodes: !144) +// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !23) +// CHECK:STDOUT: !142 = !DILocation(line: 7, column: 10, scope: !137) +// CHECK:STDOUT: !143 = !DILocation(line: 7, column: 3, scope: !137) +// CHECK:STDOUT: !144 = !{!138} +// CHECK:STDOUT: !145 = !DIFile(filename: "./copy.h", directory: "") +// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.58fe21e3ef78b0d7.Core:Copy.Cpp", scope: null, file: !145, line: 5, type: !134, spFlags: DISPFlagDefinition, unit: !132, retainedNodes: !149) +// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !23) +// CHECK:STDOUT: !148 = !DILocation(line: 5, column: 3, scope: !146) +// CHECK:STDOUT: !149 = !{!147} +// CHECK:STDOUT: !150 = !{!"p1 _ZTS4Copy", !45, i64 0} +// CHECK:STDOUT: !151 = !{!150, !150, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call_c1_in_thunk.carbon' @@ -698,41 +698,40 @@ fn Four() { // CHECK:STDOUT: @_ZTS4Base = linkonce_odr dso_local constant [6 x i8] c"4Base\00", comdat, align 1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !143 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !155 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_44.1.temp = alloca [8 x i8], align 8, !dbg !144 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_44.1.temp), !dbg !144 -// CHECK:STDOUT: call void @_ZN7DerivedC1Ev.carbon_thunk.(ptr %.loc7_44.1.temp), !dbg !144 -// CHECK:STDOUT: call void @"_CSelfDestruct.9b95953847aa58ac:core.Destroy.Core"(ptr %.loc7_44.1.temp), !dbg !144 -// CHECK:STDOUT: ret void, !dbg !147 +// CHECK:STDOUT: %.loc7_44.1.temp = alloca [8 x i8], align 8, !dbg !156 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_44.1.temp), !dbg !156 +// CHECK:STDOUT: call void @_ZN7DerivedC1Ev.carbon_thunk.(ptr %.loc7_44.1.temp), !dbg !156 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8073a50a45cfdc9c(ptr %.loc7_44.1.temp), !dbg !156 +// CHECK:STDOUT: ret void, !dbg !159 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN7DerivedC1Ev.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 !153 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !153 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !168 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !168 // CHECK:STDOUT: call void @_ZN7DerivedC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #0 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9b95953847aa58ac: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: 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 void @_CSelfDestruct.Core.8073a50a45cfdc9c(ptr %t) #0 !dbg !160 { +// CHECK:STDOUT: ret void, !dbg !165 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN7DerivedC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %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 !153 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !168 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-24, 0) (i8, ptr @_ZTV7Derived, i64 24), ptr %this1, align 8, !tbaa !155 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-24, 0) (i8, ptr @_ZTV7Derived, i64 24), ptr %this1, align 8, !tbaa !170 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -741,39 +740,40 @@ fn Four() { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!142} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!53} +// CHECK:STDOUT: !llvm.dbg.cu = !{!154} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!56} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !21 = !{null} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{null, !23} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !40 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !41 = !{!"omnipotent char", !40, i64 0} -// CHECK:STDOUT: !42 = !{!"any pointer", !41, i64 0} -// CHECK:STDOUT: !45 = !{!"int", !41, i64 0} -// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"__libc_errno", !45, i64 0} -// CHECK:STDOUT: !53 = !{!52, !45, i64 0} -// CHECK:STDOUT: !141 = !DIFile(filename: "call_c1_in_thunk.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 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !141, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !142) -// CHECK:STDOUT: !144 = !DILocation(line: 7, column: 24, scope: !143) -// CHECK:STDOUT: !147 = !DILocation(line: 6, column: 1, scope: !143) -// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9b95953847aa58ac:core.Destroy.Core", scope: null, file: !141, line: 7, type: !25, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !151) -// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !23) -// CHECK:STDOUT: !150 = !DILocation(line: 7, column: 24, scope: !148) -// CHECK:STDOUT: !151 = !{!149} -// CHECK:STDOUT: !152 = !{!"p1 _ZTS7Derived", !42, i64 0} -// CHECK:STDOUT: !153 = !{!152, !152, i64 0} -// CHECK:STDOUT: !154 = !{!"vtable pointer", !40, i64 0} -// CHECK:STDOUT: !155 = !{!154, !154, i64 0} +// CHECK:STDOUT: !43 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !44 = !{!"omnipotent char", !43, i64 0} +// CHECK:STDOUT: !45 = !{!"any pointer", !44, i64 0} +// CHECK:STDOUT: !48 = !{!"int", !44, 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 = !{!"__libc_errno", !48, i64 0} +// CHECK:STDOUT: !56 = !{!55, !48, i64 0} +// CHECK:STDOUT: !153 = !DIFile(filename: "call_c1_in_thunk.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 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !153, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !154) +// CHECK:STDOUT: !156 = !DILocation(line: 7, column: 24, scope: !155) +// CHECK:STDOUT: !159 = !DILocation(line: 6, column: 1, scope: !155) +// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8073a50a45cfdc9c", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !154, retainedNodes: !166) +// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !23) +// CHECK:STDOUT: !165 = !DILocation(line: 32, column: 1, scope: !160) +// CHECK:STDOUT: !166 = !{!161} +// CHECK:STDOUT: !167 = !{!"p1 _ZTS7Derived", !45, i64 0} +// CHECK:STDOUT: !168 = !{!167, !167, i64 0} +// CHECK:STDOUT: !169 = !{!"vtable pointer", !43, i64 0} +// CHECK:STDOUT: !170 = !{!169, !169, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call_multi_argument.carbon' @@ -790,25 +790,25 @@ fn Four() { // CHECK:STDOUT: $_ZN9MultiArgCC2Eiiii = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CZero.Main() #0 !dbg !166 { +// CHECK:STDOUT: define void @_CZero.Main() #0 !dbg !181 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_50.1.temp = alloca [1 x i8], align 1, !dbg !167 -// CHECK:STDOUT: %.loc8_27.2.temp = alloca [1 x i8], align 1, !dbg !170 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_50.1.temp), !dbg !167 -// CHECK:STDOUT: call void @_ZN9MultiArgCC1Ev.carbon_thunk.(ptr %.loc7_50.1.temp), !dbg !167 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_27.2.temp), !dbg !170 -// CHECK:STDOUT: call void @_ZN9MultiArgCC1Ev.carbon_thunk_tuple.(ptr %.loc8_27.2.temp), !dbg !170 -// CHECK:STDOUT: call void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %.loc8_27.2.temp), !dbg !170 -// CHECK:STDOUT: call void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %.loc7_50.1.temp), !dbg !167 -// CHECK:STDOUT: ret void, !dbg !173 +// CHECK:STDOUT: %.loc7_50.1.temp = alloca [1 x i8], align 1, !dbg !182 +// CHECK:STDOUT: %.loc8_27.2.temp = alloca [1 x i8], align 1, !dbg !185 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_50.1.temp), !dbg !182 +// CHECK:STDOUT: call void @_ZN9MultiArgCC1Ev.carbon_thunk.(ptr %.loc7_50.1.temp), !dbg !182 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_27.2.temp), !dbg !185 +// CHECK:STDOUT: call void @_ZN9MultiArgCC1Ev.carbon_thunk_tuple.(ptr %.loc8_27.2.temp), !dbg !185 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %.loc8_27.2.temp), !dbg !185 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %.loc7_50.1.temp), !dbg !182 +// CHECK:STDOUT: ret void, !dbg !188 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_ZN9MultiArgCC1Ev.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 !214 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !214 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !232 // CHECK:STDOUT: call void @_ZN9MultiArgCC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -817,34 +817,28 @@ fn Four() { // CHECK:STDOUT: define internal void @_ZN9MultiArgCC1Ev.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 !214 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !214 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !232 // CHECK:STDOUT: call void @_ZN9MultiArgCC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %self) #0 !dbg !174 { +// CHECK:STDOUT: define void @_COne.Main() #0 !dbg !189 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !176 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_COne.Main() #0 !dbg !178 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12_51.1.temp = alloca [1 x i8], align 1, !dbg !179 -// CHECK:STDOUT: %.loc13_26.1.temp = alloca [1 x i8], align 1, !dbg !182 -// CHECK:STDOUT: %.loc14_29.2.temp = alloca [1 x i8], align 1, !dbg !185 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_51.1.temp), !dbg !179 -// CHECK:STDOUT: call void @_ZN9MultiArgCC1Ei.carbon_thunk._(i32 1, ptr %.loc12_51.1.temp), !dbg !179 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_26.1.temp), !dbg !182 -// CHECK:STDOUT: call void @_ZN9MultiArgCC1Ei.carbon_thunk._(i32 2, ptr %.loc13_26.1.temp), !dbg !182 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc14_29.2.temp), !dbg !185 -// CHECK:STDOUT: call void @_ZN9MultiArgCC1Ei.carbon_thunk_tuple._(i32 3, ptr %.loc14_29.2.temp), !dbg !185 -// CHECK:STDOUT: call void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %.loc14_29.2.temp), !dbg !185 -// CHECK:STDOUT: call void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %.loc13_26.1.temp), !dbg !182 -// CHECK:STDOUT: call void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %.loc12_51.1.temp), !dbg !179 -// CHECK:STDOUT: ret void, !dbg !188 +// CHECK:STDOUT: %.loc12_51.1.temp = alloca [1 x i8], align 1, !dbg !190 +// CHECK:STDOUT: %.loc13_26.1.temp = alloca [1 x i8], align 1, !dbg !193 +// CHECK:STDOUT: %.loc14_29.2.temp = alloca [1 x i8], align 1, !dbg !196 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_51.1.temp), !dbg !190 +// CHECK:STDOUT: call void @_ZN9MultiArgCC1Ei.carbon_thunk._(i32 1, ptr %.loc12_51.1.temp), !dbg !190 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_26.1.temp), !dbg !193 +// CHECK:STDOUT: call void @_ZN9MultiArgCC1Ei.carbon_thunk._(i32 2, ptr %.loc13_26.1.temp), !dbg !193 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc14_29.2.temp), !dbg !196 +// CHECK:STDOUT: call void @_ZN9MultiArgCC1Ei.carbon_thunk_tuple._(i32 3, ptr %.loc14_29.2.temp), !dbg !196 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %.loc14_29.2.temp), !dbg !196 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %.loc13_26.1.temp), !dbg !193 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %.loc12_51.1.temp), !dbg !190 +// CHECK:STDOUT: ret void, !dbg !199 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -852,10 +846,10 @@ fn Four() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca i32, align 4 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %2 = load i32, ptr %.addr, align 4, !tbaa !215 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %2 = load i32, ptr %.addr, align 4, !tbaa !233 // CHECK:STDOUT: call void @_ZN9MultiArgCC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %1, i32 noundef %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -865,26 +859,26 @@ fn Four() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca i32, align 4 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %2 = load i32, ptr %.addr, align 4, !tbaa !215 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %2 = load i32, ptr %.addr, align 4, !tbaa !233 // CHECK:STDOUT: call void @_ZN9MultiArgCC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %1, i32 noundef %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTwo.Main() #0 !dbg !189 { +// CHECK:STDOUT: define void @_CTwo.Main() #0 !dbg !200 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_54.1.temp = alloca [1 x i8], align 1, !dbg !190 -// CHECK:STDOUT: %.loc19_31.2.temp = alloca [1 x i8], align 1, !dbg !193 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_54.1.temp), !dbg !190 -// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eii.carbon_thunk.__(i32 1, i32 2, ptr %.loc18_54.1.temp), !dbg !190 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_31.2.temp), !dbg !193 -// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eii.carbon_thunk_tuple.__(i32 3, i32 4, ptr %.loc19_31.2.temp), !dbg !193 -// CHECK:STDOUT: call void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %.loc19_31.2.temp), !dbg !193 -// CHECK:STDOUT: call void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %.loc18_54.1.temp), !dbg !190 -// CHECK:STDOUT: ret void, !dbg !196 +// CHECK:STDOUT: %.loc18_54.1.temp = alloca [1 x i8], align 1, !dbg !201 +// CHECK:STDOUT: %.loc19_31.2.temp = alloca [1 x i8], align 1, !dbg !204 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_54.1.temp), !dbg !201 +// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eii.carbon_thunk.__(i32 1, i32 2, ptr %.loc18_54.1.temp), !dbg !201 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_31.2.temp), !dbg !204 +// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eii.carbon_thunk_tuple.__(i32 3, i32 4, ptr %.loc19_31.2.temp), !dbg !204 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %.loc19_31.2.temp), !dbg !204 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %.loc18_54.1.temp), !dbg !201 +// CHECK:STDOUT: ret void, !dbg !207 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -893,12 +887,12 @@ fn Four() { // CHECK:STDOUT: %.addr = alloca i32, align 4 // CHECK:STDOUT: %.addr1 = alloca i32, align 4 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !215 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %2 = load ptr, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %3 = load i32, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: %4 = load i32, ptr %.addr1, align 4, !tbaa !215 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !233 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %2 = load ptr, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %3 = load i32, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: %4 = load i32, ptr %.addr1, align 4, !tbaa !233 // CHECK:STDOUT: call void @_ZN9MultiArgCC2Eii(ptr noundef nonnull align 1 dereferenceable(1) %2, i32 noundef %3, i32 noundef %4) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -909,28 +903,28 @@ fn Four() { // CHECK:STDOUT: %.addr = alloca i32, align 4 // CHECK:STDOUT: %.addr1 = alloca i32, align 4 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !215 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %2 = load ptr, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %3 = load i32, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: %4 = load i32, ptr %.addr1, align 4, !tbaa !215 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !233 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %2 = load ptr, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %3 = load i32, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: %4 = load i32, ptr %.addr1, align 4, !tbaa !233 // CHECK:STDOUT: call void @_ZN9MultiArgCC2Eii(ptr noundef nonnull align 1 dereferenceable(1) %2, i32 noundef %3, i32 noundef %4) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CThree.Main() #0 !dbg !197 { +// CHECK:STDOUT: define void @_CThree.Main() #0 !dbg !208 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc23_57.1.temp = alloca [1 x i8], align 1, !dbg !198 -// CHECK:STDOUT: %.loc24_34.2.temp = alloca [1 x i8], align 1, !dbg !201 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_57.1.temp), !dbg !198 -// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eiiii.carbon_thunk.___(i32 1, i32 2, i32 3, ptr %.loc23_57.1.temp), !dbg !198 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_34.2.temp), !dbg !201 -// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eiiii.carbon_thunk_tuple.___(i32 4, i32 5, i32 6, ptr %.loc24_34.2.temp), !dbg !201 -// CHECK:STDOUT: call void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %.loc24_34.2.temp), !dbg !201 -// CHECK:STDOUT: call void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %.loc23_57.1.temp), !dbg !198 -// CHECK:STDOUT: ret void, !dbg !204 +// CHECK:STDOUT: %.loc23_57.1.temp = alloca [1 x i8], align 1, !dbg !209 +// CHECK:STDOUT: %.loc24_34.2.temp = alloca [1 x i8], align 1, !dbg !212 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_57.1.temp), !dbg !209 +// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eiiii.carbon_thunk.___(i32 1, i32 2, i32 3, ptr %.loc23_57.1.temp), !dbg !209 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_34.2.temp), !dbg !212 +// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eiiii.carbon_thunk_tuple.___(i32 4, i32 5, i32 6, ptr %.loc24_34.2.temp), !dbg !212 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %.loc24_34.2.temp), !dbg !212 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %.loc23_57.1.temp), !dbg !209 +// CHECK:STDOUT: ret void, !dbg !215 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -940,14 +934,14 @@ fn Four() { // CHECK:STDOUT: %.addr1 = alloca i32, align 4 // CHECK:STDOUT: %.addr2 = alloca i32, align 4 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !215 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %3 = load ptr, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %4 = load i32, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: %5 = load i32, ptr %.addr1, align 4, !tbaa !215 -// CHECK:STDOUT: %6 = load i32, ptr %.addr2, align 4, !tbaa !215 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !233 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %3 = load ptr, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %4 = load i32, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: %5 = load i32, ptr %.addr1, align 4, !tbaa !233 +// CHECK:STDOUT: %6 = load i32, ptr %.addr2, align 4, !tbaa !233 // CHECK:STDOUT: call void @_ZN9MultiArgCC2Eiiii(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef 0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -959,30 +953,30 @@ fn Four() { // CHECK:STDOUT: %.addr1 = alloca i32, align 4 // CHECK:STDOUT: %.addr2 = alloca i32, align 4 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !215 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %3 = load ptr, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %4 = load i32, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: %5 = load i32, ptr %.addr1, align 4, !tbaa !215 -// CHECK:STDOUT: %6 = load i32, ptr %.addr2, align 4, !tbaa !215 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !233 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %3 = load ptr, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %4 = load i32, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: %5 = load i32, ptr %.addr1, align 4, !tbaa !233 +// CHECK:STDOUT: %6 = load i32, ptr %.addr2, align 4, !tbaa !233 // CHECK:STDOUT: call void @_ZN9MultiArgCC2Eiiii(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef 0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CFour.Main() #0 !dbg !205 { +// CHECK:STDOUT: define void @_CFour.Main() #0 !dbg !216 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc28_60.1.temp = alloca [1 x i8], align 1, !dbg !206 -// CHECK:STDOUT: %.loc29_37.2.temp = alloca [1 x i8], align 1, !dbg !209 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc28_60.1.temp), !dbg !206 -// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eiiii.carbon_thunk.____(i32 1, i32 2, i32 3, i32 4, ptr %.loc28_60.1.temp), !dbg !206 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_37.2.temp), !dbg !209 -// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eiiii.carbon_thunk_tuple.____(i32 5, i32 6, i32 7, i32 8, ptr %.loc29_37.2.temp), !dbg !209 -// CHECK:STDOUT: call void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %.loc29_37.2.temp), !dbg !209 -// CHECK:STDOUT: call void @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core"(ptr %.loc28_60.1.temp), !dbg !206 -// CHECK:STDOUT: ret void, !dbg !212 +// CHECK:STDOUT: %.loc28_60.1.temp = alloca [1 x i8], align 1, !dbg !217 +// CHECK:STDOUT: %.loc29_37.2.temp = alloca [1 x i8], align 1, !dbg !220 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc28_60.1.temp), !dbg !217 +// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eiiii.carbon_thunk.____(i32 1, i32 2, i32 3, i32 4, ptr %.loc28_60.1.temp), !dbg !217 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_37.2.temp), !dbg !220 +// CHECK:STDOUT: call void @_ZN9MultiArgCC1Eiiii.carbon_thunk_tuple.____(i32 5, i32 6, i32 7, i32 8, ptr %.loc29_37.2.temp), !dbg !220 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %.loc29_37.2.temp), !dbg !220 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %.loc28_60.1.temp), !dbg !217 +// CHECK:STDOUT: ret void, !dbg !223 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -993,16 +987,16 @@ fn Four() { // CHECK:STDOUT: %.addr2 = alloca i32, align 4 // CHECK:STDOUT: %.addr3 = alloca i32, align 4 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %3, ptr %.addr3, align 4, !tbaa !215 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %4 = load ptr, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %5 = load i32, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: %6 = load i32, ptr %.addr1, align 4, !tbaa !215 -// CHECK:STDOUT: %7 = load i32, ptr %.addr2, align 4, !tbaa !215 -// CHECK:STDOUT: %8 = load i32, ptr %.addr3, align 4, !tbaa !215 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %3, ptr %.addr3, align 4, !tbaa !233 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %4 = load ptr, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %5 = load i32, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: %6 = load i32, ptr %.addr1, align 4, !tbaa !233 +// CHECK:STDOUT: %7 = load i32, ptr %.addr2, align 4, !tbaa !233 +// CHECK:STDOUT: %8 = load i32, ptr %.addr3, align 4, !tbaa !233 // CHECK:STDOUT: call void @_ZN9MultiArgCC2Eiiii(ptr noundef nonnull align 1 dereferenceable(1) %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -1015,16 +1009,16 @@ fn Four() { // CHECK:STDOUT: %.addr2 = alloca i32, align 4 // CHECK:STDOUT: %.addr3 = alloca i32, align 4 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %3, ptr %.addr3, align 4, !tbaa !215 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %4 = load ptr, ptr %return.addr, align 8, !tbaa !214 -// CHECK:STDOUT: %5 = load i32, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: %6 = load i32, ptr %.addr1, align 4, !tbaa !215 -// CHECK:STDOUT: %7 = load i32, ptr %.addr2, align 4, !tbaa !215 -// CHECK:STDOUT: %8 = load i32, ptr %.addr3, align 4, !tbaa !215 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %3, ptr %.addr3, align 4, !tbaa !233 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %4 = load ptr, ptr %return.addr, align 8, !tbaa !232 +// CHECK:STDOUT: %5 = load i32, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: %6 = load i32, ptr %.addr1, align 4, !tbaa !233 +// CHECK:STDOUT: %7 = load i32, ptr %.addr2, align 4, !tbaa !233 +// CHECK:STDOUT: %8 = load i32, ptr %.addr3, align 4, !tbaa !233 // CHECK:STDOUT: call void @_ZN9MultiArgCC2Eiiii(ptr noundef nonnull align 1 dereferenceable(1) %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -1032,11 +1026,16 @@ fn Four() { // 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 void @_CSelfDestruct.Core.b81987abcfec64c8(ptr %t) #0 !dbg !224 { +// CHECK:STDOUT: ret void, !dbg !229 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN9MultiArgCC2Ev(ptr noundef nonnull align 1 dereferenceable(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 !214 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !232 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -1046,8 +1045,8 @@ fn Four() { // 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 !214 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !215 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !232 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !233 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -1058,9 +1057,9 @@ fn Four() { // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %.addr = alloca i32, align 4 // CHECK:STDOUT: %.addr1 = alloca i32, align 4 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !214 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !215 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !232 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !233 // CHECK:STDOUT: %this2 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -1073,73 +1072,74 @@ fn Four() { // CHECK:STDOUT: %.addr1 = alloca i32, align 4 // CHECK:STDOUT: %.addr2 = alloca i32, align 4 // CHECK:STDOUT: %.addr3 = alloca i32, align 4 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !214 -// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !215 -// CHECK:STDOUT: store i32 %3, ptr %.addr3, align 4, !tbaa !215 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !232 +// CHECK:STDOUT: store i32 %0, ptr %.addr, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !233 +// CHECK:STDOUT: store i32 %3, ptr %.addr3, align 4, !tbaa !233 // CHECK:STDOUT: %this4 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core", { 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 9 } // CHECK:STDOUT: uselistorder ptr @_ZN9MultiArgCC1Ei.carbon_thunk._, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.b81987abcfec64c8, { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!157} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!53} +// CHECK:STDOUT: !llvm.dbg.cu = !{!172} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!56} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !21 = !{null} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{null, !23} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !40 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !41 = !{!"omnipotent char", !40, i64 0} -// CHECK:STDOUT: !42 = !{!"any pointer", !41, i64 0} -// CHECK:STDOUT: !45 = !{!"int", !41, i64 0} -// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"__libc_errno", !45, i64 0} -// CHECK:STDOUT: !53 = !{!52, !45, i64 0} -// CHECK:STDOUT: !156 = !DIFile(filename: "call_multi_argument.carbon", directory: "") -// CHECK:STDOUT: !157 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !156, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !166 = distinct !DISubprogram(name: "Zero", linkageName: "_CZero.Main", scope: null, file: !156, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !157) -// CHECK:STDOUT: !167 = !DILocation(line: 7, column: 26, scope: !166) -// CHECK:STDOUT: !170 = !DILocation(line: 8, column: 26, scope: !166) -// CHECK:STDOUT: !173 = !DILocation(line: 6, column: 1, scope: !166) -// CHECK:STDOUT: !174 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.878901d112b4b1fd:core.Destroy.Core", scope: null, file: !156, line: 8, type: !25, spFlags: DISPFlagDefinition, unit: !157, retainedNodes: !177) -// CHECK:STDOUT: !175 = !DILocalVariable(arg: 1, scope: !174, type: !23) -// CHECK:STDOUT: !176 = !DILocation(line: 8, column: 26, scope: !174) -// CHECK:STDOUT: !177 = !{!175} -// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "One", linkageName: "_COne.Main", scope: null, file: !156, line: 11, type: !22, spFlags: DISPFlagDefinition, unit: !157) -// CHECK:STDOUT: !179 = !DILocation(line: 12, column: 26, scope: !178) -// CHECK:STDOUT: !182 = !DILocation(line: 13, column: 26, scope: !178) -// CHECK:STDOUT: !185 = !DILocation(line: 14, column: 26, scope: !178) -// CHECK:STDOUT: !188 = !DILocation(line: 11, column: 1, scope: !178) -// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "Two", linkageName: "_CTwo.Main", scope: null, file: !156, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !157) -// CHECK:STDOUT: !190 = !DILocation(line: 18, column: 26, scope: !189) -// CHECK:STDOUT: !193 = !DILocation(line: 19, column: 26, scope: !189) -// CHECK:STDOUT: !196 = !DILocation(line: 17, column: 1, scope: !189) -// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "Three", linkageName: "_CThree.Main", scope: null, file: !156, line: 22, type: !22, spFlags: DISPFlagDefinition, unit: !157) -// CHECK:STDOUT: !198 = !DILocation(line: 23, column: 26, scope: !197) -// CHECK:STDOUT: !201 = !DILocation(line: 24, column: 26, scope: !197) -// CHECK:STDOUT: !204 = !DILocation(line: 22, column: 1, scope: !197) -// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "Four", linkageName: "_CFour.Main", scope: null, file: !156, line: 27, type: !22, spFlags: DISPFlagDefinition, unit: !157) -// CHECK:STDOUT: !206 = !DILocation(line: 28, column: 26, scope: !205) -// CHECK:STDOUT: !209 = !DILocation(line: 29, column: 26, scope: !205) -// CHECK:STDOUT: !212 = !DILocation(line: 27, column: 1, scope: !205) -// CHECK:STDOUT: !213 = !{!"p1 _ZTS9MultiArgC", !42, i64 0} -// CHECK:STDOUT: !214 = !{!213, !213, i64 0} -// CHECK:STDOUT: !215 = !{!45, !45, i64 0} +// CHECK:STDOUT: !43 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !44 = !{!"omnipotent char", !43, i64 0} +// CHECK:STDOUT: !45 = !{!"any pointer", !44, i64 0} +// CHECK:STDOUT: !48 = !{!"int", !44, 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 = !{!"__libc_errno", !48, i64 0} +// CHECK:STDOUT: !56 = !{!55, !48, i64 0} +// CHECK:STDOUT: !171 = !DIFile(filename: "call_multi_argument.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: !181 = distinct !DISubprogram(name: "Zero", linkageName: "_CZero.Main", scope: null, file: !171, line: 6, type: !22, spFlags: DISPFlagDefinition, unit: !172) +// CHECK:STDOUT: !182 = !DILocation(line: 7, column: 26, scope: !181) +// CHECK:STDOUT: !185 = !DILocation(line: 8, column: 26, scope: !181) +// CHECK:STDOUT: !188 = !DILocation(line: 6, column: 1, scope: !181) +// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "One", linkageName: "_COne.Main", scope: null, file: !171, line: 11, type: !22, spFlags: DISPFlagDefinition, unit: !172) +// CHECK:STDOUT: !190 = !DILocation(line: 12, column: 26, scope: !189) +// CHECK:STDOUT: !193 = !DILocation(line: 13, column: 26, scope: !189) +// CHECK:STDOUT: !196 = !DILocation(line: 14, column: 26, scope: !189) +// CHECK:STDOUT: !199 = !DILocation(line: 11, column: 1, scope: !189) +// CHECK:STDOUT: !200 = distinct !DISubprogram(name: "Two", linkageName: "_CTwo.Main", scope: null, file: !171, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !172) +// CHECK:STDOUT: !201 = !DILocation(line: 18, column: 26, scope: !200) +// CHECK:STDOUT: !204 = !DILocation(line: 19, column: 26, scope: !200) +// CHECK:STDOUT: !207 = !DILocation(line: 17, column: 1, scope: !200) +// CHECK:STDOUT: !208 = distinct !DISubprogram(name: "Three", linkageName: "_CThree.Main", scope: null, file: !171, line: 22, type: !22, spFlags: DISPFlagDefinition, unit: !172) +// CHECK:STDOUT: !209 = !DILocation(line: 23, column: 26, scope: !208) +// CHECK:STDOUT: !212 = !DILocation(line: 24, column: 26, scope: !208) +// CHECK:STDOUT: !215 = !DILocation(line: 22, column: 1, scope: !208) +// CHECK:STDOUT: !216 = distinct !DISubprogram(name: "Four", linkageName: "_CFour.Main", scope: null, file: !171, line: 27, type: !22, spFlags: DISPFlagDefinition, unit: !172) +// CHECK:STDOUT: !217 = !DILocation(line: 28, column: 26, scope: !216) +// CHECK:STDOUT: !220 = !DILocation(line: 29, column: 26, scope: !216) +// CHECK:STDOUT: !223 = !DILocation(line: 27, column: 1, scope: !216) +// CHECK:STDOUT: !224 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b81987abcfec64c8", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !172, retainedNodes: !230) +// CHECK:STDOUT: !225 = !DILocalVariable(arg: 1, scope: !224, type: !23) +// CHECK:STDOUT: !229 = !DILocation(line: 32, column: 1, scope: !224) +// CHECK:STDOUT: !230 = !{!225} +// CHECK:STDOUT: !231 = !{!"p1 _ZTS9MultiArgC", !45, i64 0} +// CHECK:STDOUT: !232 = !{!231, !231, i64 0} +// CHECK:STDOUT: !233 = !{!48, !48, i64 0} // 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 18ba6abe0863..60b4d3921c7d 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/conversion.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/conversion.carbon @@ -90,7 +90,7 @@ fn ConvertToValue(b: Cpp.IntB) { // CHECK:STDOUT: %a.var = alloca [4 x i8], align 4, !dbg !29 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !29 // CHECK:STDOUT: call void @_ZNK1Bcv1AEv.carbon_thunk._(ptr %b, ptr %a.var), !dbg !29 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %a.var), !dbg !29 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %a.var), !dbg !29 // CHECK:STDOUT: ret void, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -99,10 +99,10 @@ fn ConvertToValue(b: Cpp.IntB) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !50 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !52 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !52 -// CHECK:STDOUT: %1 = load ptr, ptr %this.addr, align 8, !tbaa !50, !nonnull !54 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !53 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !55 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !55 +// CHECK:STDOUT: %1 = load ptr, ptr %this.addr, align 8, !tbaa !53, !nonnull !57 // CHECK:STDOUT: call void @_ZNK1Bcv1AEv(ptr dead_on_unwind writable sret(%struct.A) align 4 %0, ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -111,29 +111,29 @@ fn ConvertToValue(b: Cpp.IntB) { // CHECK:STDOUT: declare void @_ZN1AD1Ev(ptr noundef nonnull align 4 dead_on_return(4) dereferenceable(4)) unnamed_addr #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %self) #0 !dbg !34 { +// CHECK:STDOUT: define void @_CConvertToValue.Main(ptr %b) #0 !dbg !34 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN1AD1Ev(ptr %self), !dbg !36 -// CHECK:STDOUT: ret void, !dbg !36 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CConvertToValue.Main(ptr %b) #0 !dbg !38 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20_25.1.temp = alloca [4 x i8], align 4, !dbg !41 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_25.1.temp), !dbg !41 -// CHECK:STDOUT: call void @_ZNK1Bcv1AEv.carbon_thunk._(ptr %b, ptr %.loc20_25.1.temp), !dbg !41 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %.loc20_25.1.temp), !dbg !41 -// CHECK:STDOUT: ret void, !dbg !44 +// CHECK:STDOUT: %.loc20_25.1.temp = alloca [4 x i8], align 4, !dbg !37 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_25.1.temp), !dbg !37 +// CHECK:STDOUT: call void @_ZNK1Bcv1AEv.carbon_thunk._(ptr %b, ptr %.loc20_25.1.temp), !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %.loc20_25.1.temp), !dbg !37 +// CHECK:STDOUT: ret void, !dbg !40 // 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 void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %t) #0 !dbg !42 { +// CHECK:STDOUT: call void @_ZN1AD1Ev(ptr %t), !dbg !46 +// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZNK1Bcv1AEv(ptr dead_on_unwind writable sret(%struct.A) align 4, ptr noundef nonnull align 1 dereferenceable(1)) #4 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.e885b4b34ded440e, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -142,11 +142,12 @@ fn ConvertToValue(b: Cpp.IntB) { // 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 = !{!19} -// CHECK:STDOUT: !llvm.module.flags = !{!57, !58, !59, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!61} +// CHECK:STDOUT: !llvm.module.flags = !{!60, !61, !62, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!64} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "class_to_class.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -157,29 +158,30 @@ fn ConvertToValue(b: Cpp.IntB) { // CHECK:STDOUT: !29 = !DILocation(line: 16, column: 3, scope: !26) // CHECK:STDOUT: !32 = !DILocation(line: 15, column: 1, scope: !26) // CHECK:STDOUT: !33 = !{!27} -// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !37) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !18, line: 19, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) // CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !34, type: !21) -// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 3, scope: !34) -// CHECK:STDOUT: !37 = !{!35} -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !18, line: 19, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) -// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !21) -// CHECK:STDOUT: !41 = !DILocation(line: 20, column: 25, scope: !38) -// CHECK:STDOUT: !44 = !DILocation(line: 19, column: 1, scope: !38) -// CHECK:STDOUT: !45 = !{!39} -// CHECK:STDOUT: !46 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !47 = !{!"omnipotent char", !46, i64 0} -// CHECK:STDOUT: !48 = !{!"any pointer", !47, i64 0} -// CHECK:STDOUT: !49 = !{!"p1 _ZTS1B", !48, i64 0} -// CHECK:STDOUT: !50 = !{!49, !49, i64 0} -// CHECK:STDOUT: !51 = !{!"p1 _ZTS1A", !48, i64 0} -// CHECK:STDOUT: !52 = !{!51, !51, i64 0} -// CHECK:STDOUT: !54 = !{} -// CHECK:STDOUT: !55 = !{!"int", !47, 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", !55, i64 0} -// CHECK:STDOUT: !61 = !{!60, !55, i64 0} +// CHECK:STDOUT: !37 = !DILocation(line: 20, column: 25, scope: !34) +// CHECK:STDOUT: !40 = !DILocation(line: 19, column: 1, scope: !34) +// CHECK:STDOUT: !41 = !{!35} +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e885b4b34ded440e", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !21) +// CHECK:STDOUT: !46 = !DILocation(line: 34, column: 5, scope: !42) +// CHECK:STDOUT: !47 = !DILocation(line: 32, column: 1, scope: !42) +// CHECK:STDOUT: !48 = !{!43} +// CHECK:STDOUT: !49 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !50 = !{!"omnipotent char", !49, i64 0} +// CHECK:STDOUT: !51 = !{!"any pointer", !50, i64 0} +// CHECK:STDOUT: !52 = !{!"p1 _ZTS1B", !51, i64 0} +// CHECK:STDOUT: !53 = !{!52, !52, i64 0} +// CHECK:STDOUT: !54 = !{!"p1 _ZTS1A", !51, i64 0} +// CHECK:STDOUT: !55 = !{!54, !54, i64 0} +// CHECK:STDOUT: !57 = !{} +// CHECK:STDOUT: !58 = !{!"int", !50, i64 0} +// CHECK:STDOUT: !60 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !61 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !62 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !63 = !{!"__libc_errno", !58, i64 0} +// CHECK:STDOUT: !64 = !{!63, !58, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'class_to_enum.carbon' @@ -188,17 +190,17 @@ fn ConvertToValue(b: Cpp.IntB) { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CConvertToVar.Main(ptr %b) #0 !dbg !67 { +// CHECK:STDOUT: define void @_CConvertToVar.Main(ptr %b) #0 !dbg !68 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %s.var = alloca i16, align 2, !dbg !70 -// CHECK:STDOUT: %i.var = alloca i16, align 2, !dbg !73 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %s.var), !dbg !70 -// CHECK:STDOUT: call void @_ZNK5EnumBcv1SEv.carbon_thunk._(ptr %b, ptr %s.var), !dbg !70 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %i.var), !dbg !73 -// CHECK:STDOUT: call void @_ZNK5EnumBcv1IEv.carbon_thunk._(ptr %b, ptr %i.var), !dbg !73 -// CHECK:STDOUT: call void @"_CSelfDestruct.93ce72f55a28222b:core.Destroy.Core"(ptr %i.var), !dbg !73 -// CHECK:STDOUT: call void @"_CSelfDestruct.7c9bfa05445fab48:core.Destroy.Core"(ptr %s.var), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !76 +// CHECK:STDOUT: %s.var = alloca i16, align 2, !dbg !71 +// CHECK:STDOUT: %i.var = alloca i16, align 2, !dbg !74 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %s.var), !dbg !71 +// CHECK:STDOUT: call void @_ZNK5EnumBcv1SEv.carbon_thunk._(ptr %b, ptr %s.var), !dbg !71 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %i.var), !dbg !74 +// CHECK:STDOUT: call void @_ZNK5EnumBcv1IEv.carbon_thunk._(ptr %b, ptr %i.var), !dbg !74 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b6485bbba53783ee(ptr %i.var), !dbg !74 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e9921dfc7dd957f8(ptr %s.var), !dbg !71 +// CHECK:STDOUT: ret void, !dbg !79 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -206,12 +208,12 @@ fn ConvertToValue(b: Cpp.IntB) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !98 -// 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: %1 = load ptr, ptr %this.addr, align 8, !tbaa !98, !nonnull !54 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !107 +// 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: %1 = load ptr, ptr %this.addr, align 8, !tbaa !107, !nonnull !57 // CHECK:STDOUT: %call = call noundef signext i16 @_ZNK5EnumBcv1SEv(ptr noundef nonnull align 1 dereferenceable(1) %1) -// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !102 +// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !111 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -220,109 +222,110 @@ fn ConvertToValue(b: Cpp.IntB) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !98 -// 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: %1 = load ptr, ptr %this.addr, align 8, !tbaa !98, !nonnull !54 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !107 +// 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: %1 = load ptr, ptr %this.addr, align 8, !tbaa !107, !nonnull !57 // CHECK:STDOUT: %call = call noundef signext i16 @_ZNK5EnumBcv1IEv(ptr noundef nonnull align 1 dereferenceable(1) %1) -// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !104 +// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !113 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.93ce72f55a28222b:core.Destroy.Core"(ptr %self) #0 !dbg !78 { +// CHECK:STDOUT: define void @_CConvertToValue.Main(ptr %b) #0 !dbg !81 { // 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.7c9bfa05445fab48: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 void @_CConvertToValue.Main(ptr %b) #0 !dbg !86 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc20_25.1.temp = alloca i16, align 2, !dbg !89 -// CHECK:STDOUT: %.loc21_25.1.temp = alloca i16, align 2, !dbg !92 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_25.1.temp), !dbg !89 -// CHECK:STDOUT: call void @_ZNK5EnumBcv1SEv.carbon_thunk._(ptr %b, ptr %.loc20_25.1.temp), !dbg !89 -// CHECK:STDOUT: %.loc20_25.5 = load i16, ptr %.loc20_25.1.temp, align 2, !dbg !89 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc21_25.1.temp), !dbg !92 -// CHECK:STDOUT: call void @_ZNK5EnumBcv1IEv.carbon_thunk._(ptr %b, ptr %.loc21_25.1.temp), !dbg !92 -// CHECK:STDOUT: %.loc21_25.5 = load i16, ptr %.loc21_25.1.temp, align 2, !dbg !92 -// CHECK:STDOUT: call void @"_CSelfDestruct.93ce72f55a28222b:core.Destroy.Core"(ptr %.loc21_25.1.temp), !dbg !92 -// CHECK:STDOUT: call void @"_CSelfDestruct.7c9bfa05445fab48:core.Destroy.Core"(ptr %.loc20_25.1.temp), !dbg !89 -// CHECK:STDOUT: ret void, !dbg !95 +// CHECK:STDOUT: %.loc20_25.1.temp = alloca i16, align 2, !dbg !84 +// CHECK:STDOUT: %.loc21_25.1.temp = alloca i16, align 2, !dbg !87 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_25.1.temp), !dbg !84 +// CHECK:STDOUT: call void @_ZNK5EnumBcv1SEv.carbon_thunk._(ptr %b, ptr %.loc20_25.1.temp), !dbg !84 +// CHECK:STDOUT: %.loc20_25.5 = load i16, ptr %.loc20_25.1.temp, align 2, !dbg !84 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc21_25.1.temp), !dbg !87 +// CHECK:STDOUT: call void @_ZNK5EnumBcv1IEv.carbon_thunk._(ptr %b, ptr %.loc21_25.1.temp), !dbg !87 +// CHECK:STDOUT: %.loc21_25.5 = load i16, ptr %.loc21_25.1.temp, align 2, !dbg !87 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b6485bbba53783ee(ptr %.loc21_25.1.temp), !dbg !87 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e9921dfc7dd957f8(ptr %.loc20_25.1.temp), !dbg !84 +// CHECK:STDOUT: ret void, !dbg !90 // 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 void @_CSelfDestruct.Core.b6485bbba53783ee(ptr %t) #0 !dbg !92 { +// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.e9921dfc7dd957f8(ptr %t) #0 !dbg !99 { +// CHECK:STDOUT: ret void, !dbg !104 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare noundef signext i16 @_ZNK5EnumBcv1SEv(ptr noundef nonnull align 1 dereferenceable(1)) #3 // CHECK:STDOUT: // CHECK:STDOUT: declare noundef signext i16 @_ZNK5EnumBcv1IEv(ptr noundef nonnull align 1 dereferenceable(1)) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.b6485bbba53783ee, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.e9921dfc7dd957f8, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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 = { 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 = !{!63} -// CHECK:STDOUT: !llvm.module.flags = !{!57, !58, !59, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!61} +// CHECK:STDOUT: !llvm.dbg.cu = !{!66} +// CHECK:STDOUT: !llvm.module.flags = !{!60, !61, !62, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!64} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{null, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !46 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !47 = !{!"omnipotent char", !46, i64 0} -// CHECK:STDOUT: !48 = !{!"any pointer", !47, i64 0} -// CHECK:STDOUT: !54 = !{} -// CHECK:STDOUT: !55 = !{!"int", !47, 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", !55, i64 0} -// CHECK:STDOUT: !61 = !{!60, !55, i64 0} -// CHECK:STDOUT: !62 = !DIFile(filename: "class_to_enum.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: 16, encoding: DW_ATE_signed) -// CHECK:STDOUT: !65 = !{null, !64} -// CHECK:STDOUT: !66 = !DISubroutineType(types: !65) -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "ConvertToVar", linkageName: "_CConvertToVar.Main", scope: null, file: !62, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !63, retainedNodes: !77) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !21) -// CHECK:STDOUT: !70 = !DILocation(line: 15, column: 3, scope: !67) -// CHECK:STDOUT: !73 = !DILocation(line: 16, column: 3, scope: !67) -// CHECK:STDOUT: !76 = !DILocation(line: 14, column: 1, scope: !67) -// CHECK:STDOUT: !77 = !{!68} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.93ce72f55a28222b:core.Destroy.Core", scope: null, file: !62, line: 16, type: !66, spFlags: DISPFlagDefinition, unit: !63, retainedNodes: !81) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !64) -// CHECK:STDOUT: !80 = !DILocation(line: 16, column: 3, scope: !78) -// CHECK:STDOUT: !81 = !{!79} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7c9bfa05445fab48:core.Destroy.Core", scope: null, file: !62, line: 15, type: !66, spFlags: DISPFlagDefinition, unit: !63, retainedNodes: !85) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !64) -// CHECK:STDOUT: !84 = !DILocation(line: 15, column: 3, scope: !82) -// CHECK:STDOUT: !85 = !{!83} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !62, line: 19, type: !23, spFlags: DISPFlagDefinition, unit: !63, retainedNodes: !96) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !21) -// CHECK:STDOUT: !89 = !DILocation(line: 20, column: 25, scope: !86) -// CHECK:STDOUT: !92 = !DILocation(line: 21, column: 25, scope: !86) -// CHECK:STDOUT: !95 = !DILocation(line: 19, column: 1, scope: !86) -// CHECK:STDOUT: !96 = !{!87} -// CHECK:STDOUT: !97 = !{!"p1 _ZTS5EnumB", !48, i64 0} -// CHECK:STDOUT: !98 = !{!97, !97, i64 0} -// CHECK:STDOUT: !99 = !{!48, !48, i64 0} -// CHECK:STDOUT: !100 = !{!"_ZTS1S", !47, i64 0} -// CHECK:STDOUT: !102 = !{!100, !100, i64 0} -// CHECK:STDOUT: !103 = !{!"_ZTS1I", !47, i64 0} -// CHECK:STDOUT: !104 = !{!103, !103, i64 0} +// CHECK:STDOUT: !49 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !50 = !{!"omnipotent char", !49, i64 0} +// CHECK:STDOUT: !51 = !{!"any pointer", !50, i64 0} +// CHECK:STDOUT: !57 = !{} +// CHECK:STDOUT: !58 = !{!"int", !50, i64 0} +// CHECK:STDOUT: !60 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !61 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !62 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !63 = !{!"__libc_errno", !58, i64 0} +// CHECK:STDOUT: !64 = !{!63, !58, i64 0} +// CHECK:STDOUT: !65 = !DIFile(filename: "class_to_enum.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: !67 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "ConvertToVar", linkageName: "_CConvertToVar.Main", scope: null, file: !65, line: 14, type: !23, spFlags: DISPFlagDefinition, unit: !66, retainedNodes: !80) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !21) +// CHECK:STDOUT: !71 = !DILocation(line: 15, column: 3, scope: !68) +// CHECK:STDOUT: !74 = !DILocation(line: 16, column: 3, scope: !68) +// CHECK:STDOUT: !77 = !{null, !67} +// CHECK:STDOUT: !78 = !DISubroutineType(types: !77) +// CHECK:STDOUT: !79 = !DILocation(line: 14, column: 1, scope: !68) +// CHECK:STDOUT: !80 = !{!69} +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !65, line: 19, type: !23, spFlags: DISPFlagDefinition, unit: !66, retainedNodes: !91) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !21) +// CHECK:STDOUT: !84 = !DILocation(line: 20, column: 25, scope: !81) +// CHECK:STDOUT: !87 = !DILocation(line: 21, column: 25, scope: !81) +// CHECK:STDOUT: !90 = !DILocation(line: 19, column: 1, scope: !81) +// CHECK:STDOUT: !91 = !{!82} +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b6485bbba53783ee", scope: null, file: !10, line: 32, type: !78, spFlags: DISPFlagDefinition, unit: !66, retainedNodes: !98) +// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !67) +// CHECK:STDOUT: !97 = !DILocation(line: 32, column: 1, scope: !92) +// CHECK:STDOUT: !98 = !{!93} +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e9921dfc7dd957f8", scope: null, file: !10, line: 32, type: !78, spFlags: DISPFlagDefinition, unit: !66, retainedNodes: !105) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !67) +// CHECK:STDOUT: !104 = !DILocation(line: 32, column: 1, scope: !99) +// CHECK:STDOUT: !105 = !{!100} +// CHECK:STDOUT: !106 = !{!"p1 _ZTS5EnumB", !51, i64 0} +// CHECK:STDOUT: !107 = !{!106, !106, i64 0} +// CHECK:STDOUT: !108 = !{!51, !51, i64 0} +// CHECK:STDOUT: !109 = !{!"_ZTS1S", !50, i64 0} +// CHECK:STDOUT: !111 = !{!109, !109, i64 0} +// CHECK:STDOUT: !112 = !{!"_ZTS1I", !50, i64 0} +// CHECK:STDOUT: !113 = !{!112, !112, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'class_to_int.carbon' @@ -331,42 +334,41 @@ fn ConvertToValue(b: Cpp.IntB) { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CConvertToVar.Main(ptr %b) #0 !dbg !111 { +// CHECK:STDOUT: define void @_CConvertToVar.Main(ptr %b) #0 !dbg !118 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !114 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !114 -// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK4IntBcviEv.carbon_thunk._(ptr %b), !dbg !114 -// CHECK:STDOUT: store i32 %__carbon_thunk.call, ptr %a.var, align 4, !dbg !114 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %a.var), !dbg !114 -// CHECK:STDOUT: ret void, !dbg !117 +// CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !121 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !121 +// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK4IntBcviEv.carbon_thunk._(ptr %b), !dbg !121 +// CHECK:STDOUT: store i32 %__carbon_thunk.call, ptr %a.var, align 4, !dbg !121 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %a.var), !dbg !121 +// CHECK:STDOUT: ret void, !dbg !126 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // 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 !132 -// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !132, !nonnull !54 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !144 +// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !144, !nonnull !57 // CHECK:STDOUT: %call = call noundef i32 @_ZNK4IntBcviEv(ptr noundef nonnull align 1 dereferenceable(1) %0) // CHECK:STDOUT: ret i32 %call // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !119 { +// CHECK:STDOUT: define void @_CConvertToValue.Main(ptr %b) #0 !dbg !128 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !121 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CConvertToValue.Main(ptr %b) #0 !dbg !123 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK4IntBcviEv.carbon_thunk._(ptr %b), !dbg !126 -// CHECK:STDOUT: ret void, !dbg !129 +// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK4IntBcviEv.carbon_thunk._(ptr %b), !dbg !131 +// CHECK:STDOUT: ret void, !dbg !134 // 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 void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !136 { +// CHECK:STDOUT: ret void, !dbg !141 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare noundef i32 @_ZNK4IntBcviEv(ptr noundef nonnull align 1 dereferenceable(1)) #3 // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } @@ -374,44 +376,45 @@ fn ConvertToValue(b: Cpp.IntB) { // 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 = !{!106} -// CHECK:STDOUT: !llvm.module.flags = !{!57, !58, !59, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!61} +// CHECK:STDOUT: !llvm.dbg.cu = !{!115} +// CHECK:STDOUT: !llvm.module.flags = !{!60, !61, !62, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!64} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{null, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !46 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !47 = !{!"omnipotent char", !46, i64 0} -// CHECK:STDOUT: !48 = !{!"any pointer", !47, i64 0} -// CHECK:STDOUT: !54 = !{} -// CHECK:STDOUT: !55 = !{!"int", !47, 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", !55, i64 0} -// CHECK:STDOUT: !61 = !{!60, !55, i64 0} -// CHECK:STDOUT: !105 = !DIFile(filename: "class_to_int.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: !109 = !{null, !20} -// CHECK:STDOUT: !110 = !DISubroutineType(types: !109) -// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "ConvertToVar", linkageName: "_CConvertToVar.Main", scope: null, file: !105, line: 11, type: !23, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !118) -// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !21) -// CHECK:STDOUT: !114 = !DILocation(line: 12, column: 3, scope: !111) -// CHECK:STDOUT: !117 = !DILocation(line: 11, column: 1, scope: !111) -// CHECK:STDOUT: !118 = !{!112} -// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !105, line: 12, type: !110, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !122) -// 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: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !105, line: 15, type: !23, spFlags: DISPFlagDefinition, unit: !106, retainedNodes: !130) -// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !21) -// CHECK:STDOUT: !126 = !DILocation(line: 16, column: 27, scope: !123) -// CHECK:STDOUT: !129 = !DILocation(line: 15, column: 1, scope: !123) -// CHECK:STDOUT: !130 = !{!124} -// CHECK:STDOUT: !131 = !{!"p1 _ZTS4IntB", !48, i64 0} -// CHECK:STDOUT: !132 = !{!131, !131, i64 0} +// CHECK:STDOUT: !49 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !50 = !{!"omnipotent char", !49, i64 0} +// CHECK:STDOUT: !51 = !{!"any pointer", !50, i64 0} +// CHECK:STDOUT: !57 = !{} +// CHECK:STDOUT: !58 = !{!"int", !50, i64 0} +// CHECK:STDOUT: !60 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !61 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !62 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !63 = !{!"__libc_errno", !58, i64 0} +// CHECK:STDOUT: !64 = !{!63, !58, i64 0} +// CHECK:STDOUT: !114 = !DIFile(filename: "class_to_int.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: "ConvertToVar", linkageName: "_CConvertToVar.Main", scope: null, file: !114, line: 11, type: !23, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !127) +// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !21) +// CHECK:STDOUT: !121 = !DILocation(line: 12, column: 3, scope: !118) +// CHECK:STDOUT: !124 = !{null, !20} +// CHECK:STDOUT: !125 = !DISubroutineType(types: !124) +// CHECK:STDOUT: !126 = !DILocation(line: 11, column: 1, scope: !118) +// CHECK:STDOUT: !127 = !{!119} +// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "ConvertToValue", linkageName: "_CConvertToValue.Main", scope: null, file: !114, line: 15, type: !23, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !135) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !21) +// CHECK:STDOUT: !131 = !DILocation(line: 16, column: 27, scope: !128) +// CHECK:STDOUT: !134 = !DILocation(line: 15, column: 1, scope: !128) +// CHECK:STDOUT: !135 = !{!129} +// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !125, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !142) +// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !20) +// CHECK:STDOUT: !141 = !DILocation(line: 32, column: 1, scope: !136) +// CHECK:STDOUT: !142 = !{!137} +// CHECK:STDOUT: !143 = !{!"p1 _ZTS4IntB", !51, i64 0} +// CHECK:STDOUT: !144 = !{!143, !143, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/copy_vs_move.carbon b/toolchain/lower/testdata/interop/cpp/class/import/copy_vs_move.carbon index ac0917831ce2..8bf3f5232e65 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/copy_vs_move.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/copy_vs_move.carbon @@ -123,17 +123,17 @@ fn PassTemporary() { // CHECK:STDOUT: define internal void @_Z13make_copyablev.carbon_thunk.(ptr noundef %return) #0 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !47 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !47 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !56 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !56 // CHECK:STDOUT: call void @_Z13make_copyablev(ptr dead_on_unwind writable sret(%struct.Copyable) align 1 %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassGlobal.Main() #1 !dbg !13 { +// CHECK:STDOUT: define void @_CPassGlobal.Main() #1 !dbg !19 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z13pass_copyable8Copyable.carbon_thunk._(ptr @_Cc.Main), !dbg !15 -// CHECK:STDOUT: ret void, !dbg !16 +// CHECK:STDOUT: call void @_Z13pass_copyable8Copyable.carbon_thunk._(ptr @_Cc.Main), !dbg !21 +// CHECK:STDOUT: ret void, !dbg !22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable @@ -141,8 +141,8 @@ fn PassTemporary() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %struct.Copyable, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !47 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !47 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !56 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !56 // CHECK:STDOUT: call void @_ZN8CopyableC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp, ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: call void @_Z13pass_copyable8Copyable(ptr nofreeobj noundef align 1 dereferenceable(1) %agg.tmp) // CHECK:STDOUT: call void @_ZN8CopyableD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp) #1 @@ -150,48 +150,47 @@ fn PassTemporary() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassTemporary.Main() #1 !dbg !17 { +// CHECK:STDOUT: define void @_CPassTemporary.Main() #1 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc21_39.1.temp = alloca [1 x i8], align 1, !dbg !18 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc21_39.1.temp), !dbg !18 -// CHECK:STDOUT: call void @_Z13make_copyablev.carbon_thunk.(ptr %.loc21_39.1.temp), !dbg !18 -// CHECK:STDOUT: call void @_Z13pass_copyable8Copyable.carbon_thunk._(ptr %.loc21_39.1.temp), !dbg !19 -// CHECK:STDOUT: call void @"_CSelfDestruct.fd98d268aadcda21:core.Destroy.Core"(ptr %.loc21_39.1.temp), !dbg !18 -// CHECK:STDOUT: ret void, !dbg !20 +// CHECK:STDOUT: %.loc21_39.1.temp = alloca [1 x i8], align 1, !dbg !24 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc21_39.1.temp), !dbg !24 +// CHECK:STDOUT: call void @_Z13make_copyablev.carbon_thunk.(ptr %.loc21_39.1.temp), !dbg !24 +// CHECK:STDOUT: call void @_Z13pass_copyable8Copyable.carbon_thunk._(ptr %.loc21_39.1.temp), !dbg !25 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e025e36f919918e8(ptr %.loc21_39.1.temp), !dbg !24 +// CHECK:STDOUT: ret void, !dbg !26 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: declare void @_ZN8CopyableD1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.fd98d268aadcda21:core.Destroy.Core"(ptr %self) #1 !dbg !21 { +// CHECK:STDOUT: define void @_CPassValue.Main(ptr %c) #1 !dbg !27 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN8CopyableD1Ev(ptr %self), !dbg !23 -// CHECK:STDOUT: ret void, !dbg !23 +// CHECK:STDOUT: call void @_Z13pass_copyable8Copyable.carbon_thunk._(ptr %c), !dbg !31 +// CHECK:STDOUT: ret void, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassValue.Main(ptr %c) #1 !dbg !25 { +// CHECK:STDOUT: define void @_CPassRef.Main(ptr %c) #1 !dbg !34 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z13pass_copyable8Copyable.carbon_thunk._(ptr %c), !dbg !29 -// CHECK:STDOUT: ret void, !dbg !30 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassRef.Main(ptr %c) #1 !dbg !32 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z13pass_copyable8Copyable.carbon_thunk._(ptr %c), !dbg !36 -// CHECK:STDOUT: ret void, !dbg !37 +// CHECK:STDOUT: call void @_Z13pass_copyable8Copyable.carbon_thunk._(ptr %c), !dbg !38 +// 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)) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define internal void @_C__global_init.Main() #1 !dbg !39 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.e025e36f919918e8(ptr %t) #1 !dbg !45 { +// CHECK:STDOUT: call void @_ZN8CopyableD1Ev(ptr %t), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define internal void @_C__global_init.Main() #1 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z13make_copyablev.carbon_thunk.(ptr @_Cc.Main), !dbg !40 -// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: call void @_Z13make_copyablev.carbon_thunk.(ptr @_Cc.Main), !dbg !42 +// CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z13make_copyablev(ptr dead_on_unwind writable sret(%struct.Copyable) align 1) #4 @@ -209,54 +208,56 @@ fn PassTemporary() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!7} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!54} +// CHECK:STDOUT: !llvm.dbg.cu = !{!13} +// CHECK:STDOUT: !llvm.module.flags = !{!58, !59, !60, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!63} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !6 = !DIFile(filename: "copyable.carbon", directory: "") -// CHECK:STDOUT: !7 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !9 = !{null, !8} -// CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !11 = !{null} -// CHECK:STDOUT: !12 = !DISubroutineType(types: !11) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "PassGlobal", linkageName: "_CPassGlobal.Main", scope: null, file: !6, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !7) -// CHECK:STDOUT: !15 = !DILocation(line: 17, column: 3, scope: !13) -// CHECK:STDOUT: !16 = !DILocation(line: 16, column: 1, scope: !13) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !6, line: 20, type: !12, spFlags: DISPFlagDefinition, unit: !7) -// CHECK:STDOUT: !18 = !DILocation(line: 21, column: 21, scope: !17) -// CHECK:STDOUT: !19 = !DILocation(line: 21, column: 3, scope: !17) -// CHECK:STDOUT: !20 = !DILocation(line: 20, column: 1, scope: !17) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.fd98d268aadcda21:core.Destroy.Core", scope: null, file: !6, line: 21, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !24) -// CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !8) -// CHECK:STDOUT: !23 = !DILocation(line: 21, column: 21, scope: !21) -// CHECK:STDOUT: !24 = !{!22} -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "PassValue", linkageName: "_CPassValue.Main", scope: null, file: !6, line: 24, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !31) -// CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !8) -// CHECK:STDOUT: !29 = !DILocation(line: 25, column: 3, scope: !25) -// CHECK:STDOUT: !30 = !DILocation(line: 24, column: 1, scope: !25) -// CHECK:STDOUT: !31 = !{!26} -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "PassRef", linkageName: "_CPassRef.Main", scope: null, file: !6, line: 28, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !38) -// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !8) -// CHECK:STDOUT: !36 = !DILocation(line: 29, column: 3, scope: !32) -// CHECK:STDOUT: !37 = !DILocation(line: 28, column: 1, scope: !32) -// CHECK:STDOUT: !38 = !{!33} -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !6, type: !12, spFlags: DISPFlagDefinition, unit: !7) -// CHECK:STDOUT: !40 = !DILocation(line: 14, column: 23, scope: !39) -// CHECK:STDOUT: !42 = !DILocation(line: 0, scope: !39) -// CHECK:STDOUT: !43 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !44 = !{!"omnipotent char", !43, i64 0} -// CHECK:STDOUT: !45 = !{!"any pointer", !44, i64 0} -// CHECK:STDOUT: !46 = !{!"p1 _ZTS8Copyable", !45, i64 0} -// CHECK:STDOUT: !47 = !{!46, !46, i64 0} -// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"int", !44, i64 0} -// CHECK:STDOUT: !53 = !{!"__libc_errno", !52, i64 0} -// CHECK:STDOUT: !54 = !{!53, !52, i64 0} +// CHECK:STDOUT: !4 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") +// CHECK:STDOUT: !12 = !DIFile(filename: "copyable.carbon", directory: "") +// CHECK:STDOUT: !13 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !12, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !15 = !{null, !14} +// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) +// CHECK:STDOUT: !17 = !{null} +// CHECK:STDOUT: !18 = !DISubroutineType(types: !17) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "PassGlobal", linkageName: "_CPassGlobal.Main", scope: null, file: !12, line: 16, type: !18, spFlags: DISPFlagDefinition, unit: !13) +// CHECK:STDOUT: !21 = !DILocation(line: 17, column: 3, scope: !19) +// CHECK:STDOUT: !22 = !DILocation(line: 16, column: 1, scope: !19) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !12, line: 20, type: !18, spFlags: DISPFlagDefinition, unit: !13) +// CHECK:STDOUT: !24 = !DILocation(line: 21, column: 21, scope: !23) +// CHECK:STDOUT: !25 = !DILocation(line: 21, column: 3, scope: !23) +// CHECK:STDOUT: !26 = !DILocation(line: 20, column: 1, scope: !23) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "PassValue", linkageName: "_CPassValue.Main", scope: null, file: !12, line: 24, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !33) +// CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !27, type: !14) +// CHECK:STDOUT: !31 = !DILocation(line: 25, column: 3, scope: !27) +// CHECK:STDOUT: !32 = !DILocation(line: 24, column: 1, scope: !27) +// CHECK:STDOUT: !33 = !{!28} +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "PassRef", linkageName: "_CPassRef.Main", scope: null, file: !12, line: 28, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !40) +// CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !34, type: !14) +// CHECK:STDOUT: !38 = !DILocation(line: 29, column: 3, scope: !34) +// CHECK:STDOUT: !39 = !DILocation(line: 28, column: 1, scope: !34) +// CHECK:STDOUT: !40 = !{!35} +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !12, type: !18, spFlags: DISPFlagDefinition, unit: !13) +// CHECK:STDOUT: !42 = !DILocation(line: 14, column: 23, scope: !41) +// CHECK:STDOUT: !44 = !DILocation(line: 0, scope: !41) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e025e36f919918e8", scope: null, file: !4, line: 32, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !51) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !14) +// CHECK:STDOUT: !49 = !DILocation(line: 34, column: 5, scope: !45) +// CHECK:STDOUT: !50 = !DILocation(line: 32, column: 1, scope: !45) +// CHECK:STDOUT: !51 = !{!46} +// CHECK:STDOUT: !52 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !53 = !{!"omnipotent char", !52, i64 0} +// CHECK:STDOUT: !54 = !{!"any pointer", !53, i64 0} +// CHECK:STDOUT: !55 = !{!"p1 _ZTS8Copyable", !54, i64 0} +// CHECK:STDOUT: !56 = !{!55, !55, i64 0} +// CHECK:STDOUT: !58 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !59 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !60 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !61 = !{!"int", !53, i64 0} +// CHECK:STDOUT: !62 = !{!"__libc_errno", !61, i64 0} +// CHECK:STDOUT: !63 = !{!62, !61, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'copy_or_move.carbon' @@ -273,17 +274,17 @@ fn PassTemporary() { // CHECK:STDOUT: define internal void @_Z17make_copy_or_movev.carbon_thunk.(ptr noundef %return) #0 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// 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: store ptr %return, ptr %return.addr, align 8, !tbaa !101 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !101 // CHECK:STDOUT: call void @_Z17make_copy_or_movev(ptr dead_on_unwind writable sret(%struct.CopyOrMove) align 1 %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassGlobal.Main() #1 !dbg !57 { +// CHECK:STDOUT: define void @_CPassGlobal.Main() #1 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z17pass_copy_or_move10CopyOrMove.carbon_thunk._(ptr @_Cc.Main), !dbg !59 -// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: call void @_Z17pass_copy_or_move10CopyOrMove.carbon_thunk._(ptr @_Cc.Main), !dbg !68 +// CHECK:STDOUT: ret void, !dbg !69 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable @@ -291,8 +292,8 @@ fn PassTemporary() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %struct.CopyOrMove, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !89 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !89 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !101 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !101 // CHECK:STDOUT: call void @_ZN10CopyOrMoveC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp, ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: call void @_Z17pass_copy_or_move10CopyOrMove(ptr nofreeobj noundef align 1 dereferenceable(1) %agg.tmp) // CHECK:STDOUT: call void @_ZN10CopyOrMoveD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp) #1 @@ -300,14 +301,14 @@ fn PassTemporary() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassTemporary.Main() #1 !dbg !61 { +// CHECK:STDOUT: define void @_CPassTemporary.Main() #1 !dbg !70 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !62 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !62 -// CHECK:STDOUT: call void @_Z17make_copy_or_movev.carbon_thunk.(ptr %_.var), !dbg !63 -// CHECK:STDOUT: call void @_Z17pass_copy_or_move10CopyOrMove.carbon_thunk.v(ptr %_.var), !dbg !64 -// CHECK:STDOUT: call void @"_CSelfDestruct.47b8ebd18f50db75:core.Destroy.Core"(ptr %_.var), !dbg !62 -// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !71 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !71 +// CHECK:STDOUT: call void @_Z17make_copy_or_movev.carbon_thunk.(ptr %_.var), !dbg !72 +// CHECK:STDOUT: call void @_Z17pass_copy_or_move10CopyOrMove.carbon_thunk.v(ptr %_.var), !dbg !73 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.220fc4c3137ec09a(ptr %_.var), !dbg !71 +// CHECK:STDOUT: ret void, !dbg !74 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable @@ -315,8 +316,8 @@ fn PassTemporary() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %struct.CopyOrMove, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !89 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !89 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !101 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !101 // CHECK:STDOUT: call void @_ZN10CopyOrMoveC1EOS_(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp, ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: call void @_Z17pass_copy_or_move10CopyOrMove(ptr nofreeobj noundef align 1 dereferenceable(1) %agg.tmp) // CHECK:STDOUT: call void @_ZN10CopyOrMoveD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp) #1 @@ -327,34 +328,33 @@ fn PassTemporary() { // CHECK:STDOUT: declare void @_ZN10CopyOrMoveD1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.47b8ebd18f50db75:core.Destroy.Core"(ptr %self) #1 !dbg !66 { +// CHECK:STDOUT: define void @_CPassValue.Main(ptr %c) #1 !dbg !75 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN10CopyOrMoveD1Ev(ptr %self), !dbg !68 -// CHECK:STDOUT: ret void, !dbg !68 +// CHECK:STDOUT: call void @_Z17pass_copy_or_move10CopyOrMove.carbon_thunk._(ptr %c), !dbg !79 +// CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassValue.Main(ptr %c) #1 !dbg !70 { +// CHECK:STDOUT: define void @_CPassRef.Main(ptr %c) #1 !dbg !82 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z17pass_copy_or_move10CopyOrMove.carbon_thunk._(ptr %c), !dbg !74 -// CHECK:STDOUT: ret void, !dbg !75 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassRef.Main(ptr %c) #1 !dbg !77 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z17pass_copy_or_move10CopyOrMove.carbon_thunk._(ptr %c), !dbg !81 -// CHECK:STDOUT: ret void, !dbg !82 +// CHECK:STDOUT: call void @_Z17pass_copy_or_move10CopyOrMove.carbon_thunk._(ptr %c), !dbg !86 +// CHECK:STDOUT: ret void, !dbg !87 // 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 internal void @_C__global_init.Main() #1 !dbg !84 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.220fc4c3137ec09a(ptr %t) #1 !dbg !93 { +// CHECK:STDOUT: call void @_ZN10CopyOrMoveD1Ev(ptr %t), !dbg !97 +// CHECK:STDOUT: ret void, !dbg !98 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define internal void @_C__global_init.Main() #1 !dbg !89 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z17make_copy_or_movev.carbon_thunk.(ptr @_Cc.Main), !dbg !85 -// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: call void @_Z17make_copy_or_movev.carbon_thunk.(ptr @_Cc.Main), !dbg !90 +// CHECK:STDOUT: ret void, !dbg !92 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z17make_copy_or_movev(ptr dead_on_unwind writable sret(%struct.CopyOrMove) align 1) #4 @@ -375,55 +375,57 @@ fn PassTemporary() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!56} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!54} +// CHECK:STDOUT: !llvm.dbg.cu = !{!65} +// CHECK:STDOUT: !llvm.module.flags = !{!58, !59, !60, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!63} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !9 = !{null, !8} -// CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !11 = !{null} -// CHECK:STDOUT: !12 = !DISubroutineType(types: !11) -// CHECK:STDOUT: !43 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !44 = !{!"omnipotent char", !43, i64 0} -// CHECK:STDOUT: !45 = !{!"any pointer", !44, i64 0} -// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"int", !44, i64 0} -// CHECK:STDOUT: !53 = !{!"__libc_errno", !52, i64 0} -// CHECK:STDOUT: !54 = !{!53, !52, i64 0} -// CHECK:STDOUT: !55 = !DIFile(filename: "copy_or_move.carbon", directory: "") -// CHECK:STDOUT: !56 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !55, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "PassGlobal", linkageName: "_CPassGlobal.Main", scope: null, file: !55, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !56) -// CHECK:STDOUT: !59 = !DILocation(line: 19, column: 3, scope: !57) -// CHECK:STDOUT: !60 = !DILocation(line: 18, column: 1, scope: !57) -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !55, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !56) -// CHECK:STDOUT: !62 = !DILocation(line: 13, column: 34, scope: !61) -// CHECK:STDOUT: !63 = !DILocation(line: 23, column: 25, scope: !61) -// CHECK:STDOUT: !64 = !DILocation(line: 23, column: 3, scope: !61) -// CHECK:STDOUT: !65 = !DILocation(line: 22, column: 1, scope: !61) -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.47b8ebd18f50db75:core.Destroy.Core", scope: null, file: !55, line: 13, type: !10, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !69) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !8) -// CHECK:STDOUT: !68 = !DILocation(line: 13, column: 34, scope: !66) -// CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "PassValue", linkageName: "_CPassValue.Main", scope: null, file: !55, line: 26, type: !10, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !76) -// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !8) -// CHECK:STDOUT: !74 = !DILocation(line: 27, column: 3, scope: !70) -// CHECK:STDOUT: !75 = !DILocation(line: 26, column: 1, scope: !70) -// CHECK:STDOUT: !76 = !{!71} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "PassRef", linkageName: "_CPassRef.Main", scope: null, file: !55, line: 30, type: !10, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !83) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !8) -// CHECK:STDOUT: !81 = !DILocation(line: 31, column: 3, scope: !77) -// CHECK:STDOUT: !82 = !DILocation(line: 30, column: 1, scope: !77) -// CHECK:STDOUT: !83 = !{!78} -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !55, type: !12, spFlags: DISPFlagDefinition, unit: !56) -// CHECK:STDOUT: !85 = !DILocation(line: 16, column: 25, scope: !84) -// CHECK:STDOUT: !87 = !DILocation(line: 0, scope: !84) -// CHECK:STDOUT: !88 = !{!"p1 _ZTS10CopyOrMove", !45, i64 0} -// CHECK:STDOUT: !89 = !{!88, !88, i64 0} +// CHECK:STDOUT: !4 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") +// CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !15 = !{null, !14} +// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) +// CHECK:STDOUT: !17 = !{null} +// CHECK:STDOUT: !18 = !DISubroutineType(types: !17) +// CHECK:STDOUT: !52 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !53 = !{!"omnipotent char", !52, i64 0} +// CHECK:STDOUT: !54 = !{!"any pointer", !53, i64 0} +// CHECK:STDOUT: !58 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !59 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !60 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !61 = !{!"int", !53, i64 0} +// CHECK:STDOUT: !62 = !{!"__libc_errno", !61, i64 0} +// CHECK:STDOUT: !63 = !{!62, !61, i64 0} +// CHECK:STDOUT: !64 = !DIFile(filename: "copy_or_move.carbon", directory: "") +// CHECK:STDOUT: !65 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !64, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "PassGlobal", linkageName: "_CPassGlobal.Main", scope: null, file: !64, line: 18, type: !18, spFlags: DISPFlagDefinition, unit: !65) +// CHECK:STDOUT: !68 = !DILocation(line: 19, column: 3, scope: !66) +// CHECK:STDOUT: !69 = !DILocation(line: 18, column: 1, scope: !66) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !64, line: 22, type: !18, spFlags: DISPFlagDefinition, unit: !65) +// CHECK:STDOUT: !71 = !DILocation(line: 13, column: 34, scope: !70) +// CHECK:STDOUT: !72 = !DILocation(line: 23, column: 25, scope: !70) +// CHECK:STDOUT: !73 = !DILocation(line: 23, column: 3, scope: !70) +// CHECK:STDOUT: !74 = !DILocation(line: 22, column: 1, scope: !70) +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "PassValue", linkageName: "_CPassValue.Main", scope: null, file: !64, line: 26, type: !16, spFlags: DISPFlagDefinition, unit: !65, retainedNodes: !81) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !14) +// CHECK:STDOUT: !79 = !DILocation(line: 27, column: 3, scope: !75) +// CHECK:STDOUT: !80 = !DILocation(line: 26, column: 1, scope: !75) +// CHECK:STDOUT: !81 = !{!76} +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "PassRef", linkageName: "_CPassRef.Main", scope: null, file: !64, line: 30, type: !16, spFlags: DISPFlagDefinition, unit: !65, retainedNodes: !88) +// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !14) +// CHECK:STDOUT: !86 = !DILocation(line: 31, column: 3, scope: !82) +// CHECK:STDOUT: !87 = !DILocation(line: 30, column: 1, scope: !82) +// CHECK:STDOUT: !88 = !{!83} +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !64, type: !18, spFlags: DISPFlagDefinition, unit: !65) +// CHECK:STDOUT: !90 = !DILocation(line: 16, column: 25, scope: !89) +// CHECK:STDOUT: !92 = !DILocation(line: 0, scope: !89) +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.220fc4c3137ec09a", scope: null, file: !4, line: 32, type: !16, spFlags: DISPFlagDefinition, unit: !65, retainedNodes: !99) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !14) +// CHECK:STDOUT: !97 = !DILocation(line: 34, column: 5, scope: !93) +// CHECK:STDOUT: !98 = !DILocation(line: 32, column: 1, scope: !93) +// CHECK:STDOUT: !99 = !{!94} +// CHECK:STDOUT: !100 = !{!"p1 _ZTS10CopyOrMove", !54, i64 0} +// CHECK:STDOUT: !101 = !{!100, !100, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'move_only.carbon' @@ -440,27 +442,27 @@ fn PassTemporary() { // CHECK:STDOUT: define internal void @_Z14make_move_onlyv.carbon_thunk.(ptr noundef %return) #0 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !109 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !109 +// 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: call void @_Z14make_move_onlyv(ptr dead_on_unwind writable sret(%struct.MoveOnly) align 1 %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassGlobalByMove.Main() #1 !dbg !93 { +// CHECK:STDOUT: define void @_CPassGlobalByMove.Main() #1 !dbg !105 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !94 +// CHECK:STDOUT: ret void, !dbg !106 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassTemporary.Main() #1 !dbg !95 { +// CHECK:STDOUT: define void @_CPassTemporary.Main() #1 !dbg !107 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !96 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !96 -// CHECK:STDOUT: call void @_Z14make_move_onlyv.carbon_thunk.(ptr %_.var), !dbg !97 -// CHECK:STDOUT: call void @_Z14pass_move_only8MoveOnly.carbon_thunk.v(ptr %_.var), !dbg !98 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e50e337b0b966c:core.Destroy.Core"(ptr %_.var), !dbg !96 -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !108 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !108 +// CHECK:STDOUT: call void @_Z14make_move_onlyv.carbon_thunk.(ptr %_.var), !dbg !109 +// CHECK:STDOUT: call void @_Z14pass_move_only8MoveOnly.carbon_thunk.v(ptr %_.var), !dbg !110 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a3949840fad44321(ptr %_.var), !dbg !108 +// CHECK:STDOUT: ret void, !dbg !111 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable @@ -468,8 +470,8 @@ fn PassTemporary() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %struct.MoveOnly, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !109 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !109 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !124 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !124 // CHECK:STDOUT: call void @_ZN8MoveOnlyC1EOS_(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp, ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: call void @_Z14pass_move_only8MoveOnly(ptr nofreeobj noundef align 1 dereferenceable(1) %agg.tmp) // CHECK:STDOUT: call void @_ZN8MoveOnlyD1Ev(ptr noundef nonnull align 1 dereferenceable(1) %agg.tmp) #1 @@ -479,21 +481,20 @@ fn PassTemporary() { // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: declare void @_ZN8MoveOnlyD1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e50e337b0b966c:core.Destroy.Core"(ptr %self) #1 !dbg !100 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN8MoveOnlyD1Ev(ptr %self), !dbg !102 -// CHECK:STDOUT: ret void, !dbg !102 -// 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 internal void @_C__global_init.Main() #1 !dbg !104 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.a3949840fad44321(ptr %t) #1 !dbg !116 { +// CHECK:STDOUT: call void @_ZN8MoveOnlyD1Ev(ptr %t), !dbg !120 +// CHECK:STDOUT: ret void, !dbg !121 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define internal void @_C__global_init.Main() #1 !dbg !112 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z14make_move_onlyv.carbon_thunk.(ptr @_Cc.Main), !dbg !105 -// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: call void @_Z14make_move_onlyv.carbon_thunk.(ptr @_Cc.Main), !dbg !113 +// CHECK:STDOUT: ret void, !dbg !115 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z14make_move_onlyv(ptr dead_on_unwind writable sret(%struct.MoveOnly) align 1) #4 @@ -511,42 +512,44 @@ fn PassTemporary() { // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!92} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!54} +// CHECK:STDOUT: !llvm.dbg.cu = !{!104} +// CHECK:STDOUT: !llvm.module.flags = !{!58, !59, !60, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!63} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !9 = !{null, !8} -// CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !11 = !{null} -// CHECK:STDOUT: !12 = !DISubroutineType(types: !11) -// CHECK:STDOUT: !43 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !44 = !{!"omnipotent char", !43, i64 0} -// CHECK:STDOUT: !45 = !{!"any pointer", !44, i64 0} -// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"int", !44, i64 0} -// CHECK:STDOUT: !53 = !{!"__libc_errno", !52, i64 0} -// CHECK:STDOUT: !54 = !{!53, !52, i64 0} -// CHECK:STDOUT: !91 = !DIFile(filename: "move_only.carbon", directory: "") -// CHECK:STDOUT: !92 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !91, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "PassGlobalByMove", linkageName: "_CPassGlobalByMove.Main", scope: null, file: !91, line: 22, type: !12, spFlags: DISPFlagDefinition, unit: !92) -// CHECK:STDOUT: !94 = !DILocation(line: 22, column: 1, scope: !93) -// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !91, line: 27, type: !12, spFlags: DISPFlagDefinition, unit: !92) -// CHECK:STDOUT: !96 = !DILocation(line: 17, column: 29, scope: !95) -// CHECK:STDOUT: !97 = !DILocation(line: 28, column: 22, scope: !95) -// CHECK:STDOUT: !98 = !DILocation(line: 28, column: 3, scope: !95) -// CHECK:STDOUT: !99 = !DILocation(line: 27, column: 1, scope: !95) -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e50e337b0b966c:core.Destroy.Core", scope: null, file: !91, line: 17, type: !10, spFlags: DISPFlagDefinition, unit: !92, retainedNodes: !103) -// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !8) -// CHECK:STDOUT: !102 = !DILocation(line: 17, column: 29, scope: !100) -// CHECK:STDOUT: !103 = !{!101} -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !91, type: !12, spFlags: DISPFlagDefinition, unit: !92) -// CHECK:STDOUT: !105 = !DILocation(line: 20, column: 23, scope: !104) -// CHECK:STDOUT: !107 = !DILocation(line: 0, scope: !104) -// CHECK:STDOUT: !108 = !{!"p1 _ZTS8MoveOnly", !45, i64 0} -// CHECK:STDOUT: !109 = !{!108, !108, i64 0} +// CHECK:STDOUT: !4 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") +// CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !15 = !{null, !14} +// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) +// CHECK:STDOUT: !17 = !{null} +// CHECK:STDOUT: !18 = !DISubroutineType(types: !17) +// CHECK:STDOUT: !52 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !53 = !{!"omnipotent char", !52, i64 0} +// CHECK:STDOUT: !54 = !{!"any pointer", !53, i64 0} +// CHECK:STDOUT: !58 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !59 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !60 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !61 = !{!"int", !53, i64 0} +// CHECK:STDOUT: !62 = !{!"__libc_errno", !61, i64 0} +// CHECK:STDOUT: !63 = !{!62, !61, i64 0} +// CHECK:STDOUT: !103 = !DIFile(filename: "move_only.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: !105 = distinct !DISubprogram(name: "PassGlobalByMove", linkageName: "_CPassGlobalByMove.Main", scope: null, file: !103, line: 22, type: !18, spFlags: DISPFlagDefinition, unit: !104) +// CHECK:STDOUT: !106 = !DILocation(line: 22, column: 1, scope: !105) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "PassTemporary", linkageName: "_CPassTemporary.Main", scope: null, file: !103, line: 27, type: !18, spFlags: DISPFlagDefinition, unit: !104) +// CHECK:STDOUT: !108 = !DILocation(line: 17, column: 29, scope: !107) +// CHECK:STDOUT: !109 = !DILocation(line: 28, column: 22, scope: !107) +// CHECK:STDOUT: !110 = !DILocation(line: 28, column: 3, scope: !107) +// CHECK:STDOUT: !111 = !DILocation(line: 27, column: 1, scope: !107) +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !103, type: !18, spFlags: DISPFlagDefinition, unit: !104) +// CHECK:STDOUT: !113 = !DILocation(line: 20, column: 23, scope: !112) +// CHECK:STDOUT: !115 = !DILocation(line: 0, scope: !112) +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.a3949840fad44321", scope: null, file: !4, line: 32, type: !16, spFlags: DISPFlagDefinition, unit: !104, retainedNodes: !122) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !14) +// CHECK:STDOUT: !120 = !DILocation(line: 34, column: 5, scope: !116) +// CHECK:STDOUT: !121 = !DILocation(line: 32, column: 1, scope: !116) +// CHECK:STDOUT: !122 = !{!117} +// CHECK:STDOUT: !123 = !{!"p1 _ZTS8MoveOnly", !54, i64 0} +// CHECK:STDOUT: !124 = !{!123, !123, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/destructor.carbon b/toolchain/lower/testdata/interop/cpp/class/import/destructor.carbon index 83aaf3ca0452..113d46fae6ae 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/destructor.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/destructor.carbon @@ -63,9 +63,9 @@ fn DestroyAIndirectly() { // CHECK:STDOUT: // CHECK:STDOUT: $_ZN9ConstexprD2Ev = comdat any // CHECK:STDOUT: -// CHECK:STDOUT: @Trivial.val.loc16_3 = internal constant {} zeroinitializer -// CHECK:STDOUT: @Nontrivial.val.loc17_3 = internal constant {} zeroinitializer -// CHECK:STDOUT: @Constexpr.val.loc18_3 = internal constant {} zeroinitializer +// CHECK:STDOUT: @Trivial.val.loc16_3.1 = internal constant {} zeroinitializer +// CHECK:STDOUT: @Nontrivial.val.loc17_3.1 = internal constant {} zeroinitializer +// CHECK:STDOUT: @Constexpr.val.loc18_3.1 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define void @_CDestroy.Main() #0 !dbg !43 { @@ -74,14 +74,14 @@ fn DestroyAIndirectly() { // CHECK:STDOUT: %_.var.loc17 = alloca {}, align 1, !dbg !46 // CHECK:STDOUT: %_.var.loc18 = alloca {}, align 1, !dbg !48 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !44 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc16, ptr align 1 @Trivial.val.loc16_3, i64 0, i1 false), !dbg !44 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc16, ptr align 1 @Trivial.val.loc16_3.1, i64 0, i1 false), !dbg !44 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc17), !dbg !46 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc17, ptr align 1 @Nontrivial.val.loc17_3, i64 0, i1 false), !dbg !46 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc17, ptr align 1 @Nontrivial.val.loc17_3.1, i64 0, i1 false), !dbg !46 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18), !dbg !48 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc18, ptr align 1 @Constexpr.val.loc18_3, i64 0, i1 false), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.dec26c21eef1f685:core.Destroy.Core"(ptr %_.var.loc18), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.c1d87436718894ba:core.Destroy.Core"(ptr %_.var.loc17), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.74d7ad7746f17264:core.Destroy.Core"(ptr %_.var.loc16), !dbg !44 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc18, ptr align 1 @Constexpr.val.loc18_3.1, i64 0, i1 false), !dbg !48 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8c85e43f6e9dad76(ptr %_.var.loc18), !dbg !48 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ed633dc4d3ef0663(ptr %_.var.loc17), !dbg !46 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.521d7551d5b081c3(ptr %_.var.loc16), !dbg !44 // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -89,102 +89,82 @@ fn DestroyAIndirectly() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN9ConstexprD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #1 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 !112 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !121 // 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.dec26c21eef1f685:core.Destroy.Core"(ptr %self) #0 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN9ConstexprD2Ev(ptr %self), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !53 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy:thunk:Destroy.74d6bfd440841f14.Core:Constexpr.Cpp"(ptr %self) #2 !dbg !55 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:SubobjectDestroy.8a0a027716a70929.Core:Constexpr.Cpp"(ptr %self) #2 !dbg !51 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN9ConstexprD2Ev(ptr %self), !dbg !58 -// CHECK:STDOUT: ret void, !dbg !58 +// CHECK:STDOUT: call void @_ZN9ConstexprD2Ev(ptr %self), !dbg !54 +// CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: declare void @_ZN10NontrivialD1Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c1d87436718894ba:core.Destroy.Core"(ptr %self) #0 !dbg !60 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN10NontrivialD1Ev(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.74d7ad7746f17264: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: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy:thunk:Destroy.470f41253d102356.Core:Trivial.Cpp"(ptr %self) #2 !dbg !68 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:SubobjectDestroy.ac48bb57359016da.Core:Trivial.Cpp"(ptr %self) #2 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !71 +// CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CMake.Trivial.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !73 { +// CHECK:STDOUT: define void @"_CMake.Trivial.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !61 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN7TrivialC1Ev.carbon_thunk.(ptr %return), !dbg !76 -// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: call void @_ZN7TrivialC1Ev.carbon_thunk.(ptr %return), !dbg !64 +// CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN7TrivialC1Ev.carbon_thunk.(ptr noundef %return) #4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !114 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !114 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !123 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !123 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CMake.Nontrivial.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !78 { +// CHECK:STDOUT: define void @"_CMake.Nontrivial.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN10NontrivialC1Ev.carbon_thunk.(ptr %return), !dbg !81 -// CHECK:STDOUT: ret void, !dbg !82 +// CHECK:STDOUT: call void @_ZN10NontrivialC1Ev.carbon_thunk.(ptr %return), !dbg !69 +// CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN10NontrivialC1Ev.carbon_thunk.(ptr noundef %return) #4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !116 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !116 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !125 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !125 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CMake.Constexpr.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !83 { +// CHECK:STDOUT: define void @"_CMake.Constexpr.Cpp:Make.Main"(ptr sret({}) %return) #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN9ConstexprC1Ev.carbon_thunk.(ptr %return), !dbg !86 -// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: call void @_ZN9ConstexprC1Ev.carbon_thunk.(ptr %return), !dbg !74 +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN9ConstexprC1Ev.carbon_thunk.(ptr noundef %return) #4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !112 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !112 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !121 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !121 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CDestroyAIndirectly.Main() #0 !dbg !88 { +// CHECK:STDOUT: define void @_CDestroyAIndirectly.Main() #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.bbfc87135555afbb(), !dbg !89 -// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.cbf5e6d817f75fdf(), !dbg !90 -// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.310c2661ae23419f(), !dbg !91 -// CHECK:STDOUT: ret void, !dbg !92 +// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.cf248c173e9f63f9(), !dbg !77 +// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.b437c55fb4b99438(), !dbg !78 +// CHECK:STDOUT: call void @_CDestroyIndirectly.Main.587d6c5d61349179(), !dbg !79 +// CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -194,37 +174,54 @@ fn DestroyAIndirectly() { // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #5 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.bbfc87135555afbb() #0 !dbg !93 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !94 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !94 -// CHECK:STDOUT: call void @"_CMake.Trivial.Cpp:Make.Main"(ptr %a.var), !dbg !95 -// CHECK:STDOUT: call void @"_CSelfDestruct.74d7ad7746f17264:core.Destroy.Core"(ptr %a.var), !dbg !94 -// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8c85e43f6e9dad76(ptr %t) #0 !dbg !81 { +// CHECK:STDOUT: call void @"_COp:thunk:SubobjectDestroy.8a0a027716a70929.Core:Constexpr.Cpp"(ptr %t), !dbg !85 +// CHECK:STDOUT: ret void, !dbg !86 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.cbf5e6d817f75fdf() #0 !dbg !98 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !99 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !99 -// CHECK:STDOUT: call void @"_CMake.Nontrivial.Cpp:Make.Main"(ptr %a.var), !dbg !100 -// CHECK:STDOUT: call void @"_CSelfDestruct.c1d87436718894ba:core.Destroy.Core"(ptr %a.var), !dbg !99 -// CHECK:STDOUT: ret void, !dbg !102 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ed633dc4d3ef0663(ptr %t) #0 !dbg !88 { +// CHECK:STDOUT: call void @_ZN10NontrivialD1Ev(ptr %t), !dbg !92 +// CHECK:STDOUT: ret void, !dbg !93 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.310c2661ae23419f() #0 !dbg !103 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.521d7551d5b081c3(ptr %t) #0 !dbg !95 { +// CHECK:STDOUT: call void @"_COp:thunk:SubobjectDestroy.ac48bb57359016da.Core:Trivial.Cpp"(ptr %t), !dbg !99 +// CHECK:STDOUT: ret void, !dbg !100 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.cf248c173e9f63f9() #0 !dbg !102 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !104 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !104 -// CHECK:STDOUT: call void @"_CMake.Constexpr.Cpp:Make.Main"(ptr %a.var), !dbg !105 -// CHECK:STDOUT: call void @"_CSelfDestruct.dec26c21eef1f685:core.Destroy.Core"(ptr %a.var), !dbg !104 -// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !103 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !103 +// CHECK:STDOUT: call void @"_CMake.Trivial.Cpp:Make.Main"(ptr %a.var), !dbg !104 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.521d7551d5b081c3(ptr %a.var), !dbg !103 +// CHECK:STDOUT: ret void, !dbg !106 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.b437c55fb4b99438() #0 !dbg !107 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !108 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !108 +// CHECK:STDOUT: call void @"_CMake.Nontrivial.Cpp:Make.Main"(ptr %a.var), !dbg !109 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ed633dc4d3ef0663(ptr %a.var), !dbg !108 +// CHECK:STDOUT: ret void, !dbg !111 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CDestroyIndirectly.Main.587d6c5d61349179() #0 !dbg !112 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !113 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !113 +// CHECK:STDOUT: call void @"_CMake.Constexpr.Cpp:Make.Main"(ptr %a.var), !dbg !114 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8c85e43f6e9dad76(ptr %a.var), !dbg !113 +// CHECK:STDOUT: ret void, !dbg !116 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @_ZN9ConstexprD2Ev, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 1, 2, 5, 4, 3 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 2, 1, 0 } // CHECK:STDOUT: @@ -236,11 +233,12 @@ fn DestroyAIndirectly() { // CHECK:STDOUT: attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!35} -// CHECK:STDOUT: !llvm.module.flags = !{!117, !118, !119, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!122} +// CHECK:STDOUT: !llvm.module.flags = !{!126, !127, !128, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!131} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "call_destructor.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !{null} @@ -255,65 +253,68 @@ fn DestroyAIndirectly() { // CHECK:STDOUT: !46 = !DILocation(line: 17, column: 3, scope: !43) // CHECK:STDOUT: !48 = !DILocation(line: 18, column: 3, scope: !43) // CHECK:STDOUT: !50 = !DILocation(line: 15, column: 1, scope: !43) -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.dec26c21eef1f685:core.Destroy.Core", scope: null, file: !34, line: 18, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !54) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:SubobjectDestroy.8a0a027716a70929.Core:Constexpr.Cpp", scope: null, file: !34, line: 11, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !55) // CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !38) -// CHECK:STDOUT: !53 = !DILocation(line: 18, column: 3, scope: !51) -// CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy:thunk:Destroy.74d6bfd440841f14.Core:Constexpr.Cpp", scope: null, file: !34, line: 11, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !59) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !38) -// CHECK:STDOUT: !58 = !DILocation(line: 11, column: 13, scope: !55) -// CHECK:STDOUT: !59 = !{!56} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c1d87436718894ba:core.Destroy.Core", scope: null, file: !34, line: 17, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !63) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !38) -// CHECK:STDOUT: !62 = !DILocation(line: 17, column: 3, scope: !60) -// CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.74d7ad7746f17264:core.Destroy.Core", scope: null, file: !34, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !67) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !38) -// CHECK:STDOUT: !66 = !DILocation(line: 16, column: 3, scope: !64) -// CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy:thunk:Destroy.470f41253d102356.Core:Trivial.Cpp", scope: null, file: !34, line: 6, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !72) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !38) -// CHECK:STDOUT: !71 = !DILocation(line: 6, column: 8, scope: !68) -// CHECK:STDOUT: !72 = !{!69} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Trivial.Cpp:Make.Main", scope: null, file: !34, line: 25, type: !42, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !76 = !DILocation(line: 25, column: 30, scope: !73) -// CHECK:STDOUT: !77 = !DILocation(line: 25, column: 23, scope: !73) -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Nontrivial.Cpp:Make.Main", scope: null, file: !34, line: 28, type: !42, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !81 = !DILocation(line: 28, column: 30, scope: !78) -// CHECK:STDOUT: !82 = !DILocation(line: 28, column: 23, scope: !78) -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Constexpr.Cpp:Make.Main", scope: null, file: !34, line: 31, type: !42, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !86 = !DILocation(line: 31, column: 30, scope: !83) -// CHECK:STDOUT: !87 = !DILocation(line: 31, column: 23, scope: !83) -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "DestroyAIndirectly", linkageName: "_CDestroyAIndirectly.Main", scope: null, file: !34, line: 38, type: !37, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !89 = !DILocation(line: 39, column: 3, scope: !88) -// CHECK:STDOUT: !90 = !DILocation(line: 40, column: 3, scope: !88) -// CHECK:STDOUT: !91 = !DILocation(line: 41, column: 3, scope: !88) -// CHECK:STDOUT: !92 = !DILocation(line: 38, column: 1, scope: !88) -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.bbfc87135555afbb", scope: null, file: !34, line: 34, type: !37, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !94 = !DILocation(line: 35, column: 3, scope: !93) -// CHECK:STDOUT: !95 = !DILocation(line: 35, column: 21, scope: !93) -// CHECK:STDOUT: !97 = !DILocation(line: 34, column: 1, scope: !93) -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.cbf5e6d817f75fdf", scope: null, file: !34, line: 34, type: !37, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !99 = !DILocation(line: 35, column: 3, scope: !98) -// CHECK:STDOUT: !100 = !DILocation(line: 35, column: 21, scope: !98) -// CHECK:STDOUT: !102 = !DILocation(line: 34, column: 1, scope: !98) -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.310c2661ae23419f", scope: null, file: !34, line: 34, type: !37, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !104 = !DILocation(line: 35, column: 3, scope: !103) -// CHECK:STDOUT: !105 = !DILocation(line: 35, column: 21, scope: !103) -// CHECK:STDOUT: !107 = !DILocation(line: 34, column: 1, scope: !103) -// CHECK:STDOUT: !108 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !109 = !{!"omnipotent char", !108, i64 0} -// CHECK:STDOUT: !110 = !{!"any pointer", !109, i64 0} -// CHECK:STDOUT: !111 = !{!"p1 _ZTS9Constexpr", !110, i64 0} -// CHECK:STDOUT: !112 = !{!111, !111, i64 0} -// CHECK:STDOUT: !113 = !{!"p1 _ZTS7Trivial", !110, i64 0} -// CHECK:STDOUT: !114 = !{!113, !113, i64 0} -// CHECK:STDOUT: !115 = !{!"p1 _ZTS10Nontrivial", !110, i64 0} -// CHECK:STDOUT: !116 = !{!115, !115, i64 0} -// CHECK:STDOUT: !117 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !118 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !119 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !120 = !{!"int", !109, i64 0} -// CHECK:STDOUT: !121 = !{!"__libc_errno", !120, i64 0} -// CHECK:STDOUT: !122 = !{!121, !120, i64 0} +// CHECK:STDOUT: !54 = !DILocation(line: 11, column: 13, scope: !51) +// CHECK:STDOUT: !55 = !{!52} +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:SubobjectDestroy.ac48bb57359016da.Core:Trivial.Cpp", scope: null, file: !34, line: 6, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !60) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !38) +// CHECK:STDOUT: !59 = !DILocation(line: 6, column: 8, scope: !56) +// CHECK:STDOUT: !60 = !{!57} +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Trivial.Cpp:Make.Main", scope: null, file: !34, line: 25, type: !42, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !64 = !DILocation(line: 25, column: 30, scope: !61) +// CHECK:STDOUT: !65 = !DILocation(line: 25, column: 23, scope: !61) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Nontrivial.Cpp:Make.Main", scope: null, file: !34, line: 28, type: !42, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !69 = !DILocation(line: 28, column: 30, scope: !66) +// CHECK:STDOUT: !70 = !DILocation(line: 28, column: 23, scope: !66) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.Constexpr.Cpp:Make.Main", scope: null, file: !34, line: 31, type: !42, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !74 = !DILocation(line: 31, column: 30, scope: !71) +// CHECK:STDOUT: !75 = !DILocation(line: 31, column: 23, scope: !71) +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "DestroyAIndirectly", linkageName: "_CDestroyAIndirectly.Main", scope: null, file: !34, line: 38, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !77 = !DILocation(line: 39, column: 3, scope: !76) +// CHECK:STDOUT: !78 = !DILocation(line: 40, column: 3, scope: !76) +// CHECK:STDOUT: !79 = !DILocation(line: 41, column: 3, scope: !76) +// CHECK:STDOUT: !80 = !DILocation(line: 38, column: 1, scope: !76) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8c85e43f6e9dad76", scope: null, file: !26, line: 32, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !87) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !38) +// CHECK:STDOUT: !85 = !DILocation(line: 34, column: 5, scope: !81) +// CHECK:STDOUT: !86 = !DILocation(line: 32, column: 1, scope: !81) +// CHECK:STDOUT: !87 = !{!82} +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ed633dc4d3ef0663", scope: null, file: !26, line: 32, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !94) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !38) +// CHECK:STDOUT: !92 = !DILocation(line: 34, column: 5, scope: !88) +// CHECK:STDOUT: !93 = !DILocation(line: 32, column: 1, scope: !88) +// CHECK:STDOUT: !94 = !{!89} +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.521d7551d5b081c3", scope: null, file: !26, line: 32, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !101) +// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !38) +// CHECK:STDOUT: !99 = !DILocation(line: 34, column: 5, scope: !95) +// CHECK:STDOUT: !100 = !DILocation(line: 32, column: 1, scope: !95) +// CHECK:STDOUT: !101 = !{!96} +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.cf248c173e9f63f9", scope: null, file: !34, line: 34, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !103 = !DILocation(line: 35, column: 3, scope: !102) +// CHECK:STDOUT: !104 = !DILocation(line: 35, column: 21, scope: !102) +// CHECK:STDOUT: !106 = !DILocation(line: 34, column: 1, scope: !102) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.b437c55fb4b99438", scope: null, file: !34, line: 34, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !108 = !DILocation(line: 35, column: 3, scope: !107) +// CHECK:STDOUT: !109 = !DILocation(line: 35, column: 21, scope: !107) +// CHECK:STDOUT: !111 = !DILocation(line: 34, column: 1, scope: !107) +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "DestroyIndirectly", linkageName: "_CDestroyIndirectly.Main.587d6c5d61349179", scope: null, file: !34, line: 34, type: !37, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !113 = !DILocation(line: 35, column: 3, scope: !112) +// CHECK:STDOUT: !114 = !DILocation(line: 35, column: 21, scope: !112) +// CHECK:STDOUT: !116 = !DILocation(line: 34, column: 1, scope: !112) +// CHECK:STDOUT: !117 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !118 = !{!"omnipotent char", !117, i64 0} +// CHECK:STDOUT: !119 = !{!"any pointer", !118, i64 0} +// CHECK:STDOUT: !120 = !{!"p1 _ZTS9Constexpr", !119, i64 0} +// CHECK:STDOUT: !121 = !{!120, !120, i64 0} +// CHECK:STDOUT: !122 = !{!"p1 _ZTS7Trivial", !119, i64 0} +// CHECK:STDOUT: !123 = !{!122, !122, i64 0} +// CHECK:STDOUT: !124 = !{!"p1 _ZTS10Nontrivial", !119, i64 0} +// CHECK:STDOUT: !125 = !{!124, !124, 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", !118, i64 0} +// CHECK:STDOUT: !130 = !{!"__libc_errno", !129, i64 0} +// CHECK:STDOUT: !131 = !{!130, !129, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon b/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon index 4186f83a0282..9c769ae0d976 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/dynamic.carbon @@ -104,77 +104,57 @@ fn DoThing() { // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind // CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.Derived.Main"(ptr %self) #3 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %self), !dbg !64 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9ede905be876779b(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.352b8f386f44a614:core.Destroy.Core"(ptr %self) #2 !dbg !66 { +// CHECK:STDOUT: define weak_odr void @"_COp.0a0b9df20a60c6f6:core.SubobjectDestroy.Core"(ptr %self) #2 !dbg !66 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc22_20.1.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !68 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5984d7e4773d5a3e(ptr %.loc22_20.1.base), !dbg !68 // CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0a0b9df20a60c6f6:core.Destroy.Core"(ptr %self) #2 !dbg !70 { +// CHECK:STDOUT: define weak_odr void @"_COp.b25525d21a9bd472:core.SubobjectDestroy.Core"(ptr %self) #2 !dbg !70 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !72 -// CHECK:STDOUT: call void @"_CSelfDestruct.352b8f386f44a614:core.Destroy.Core"(ptr %.loc22.base), !dbg !72 +// CHECK:STDOUT: %.loc22_20.1.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !72 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5984d7e4773d5a3e(ptr %.loc22_20.1.base), !dbg !72 // CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0a0b9df20a60c6f6:core.Destroy.Core"(ptr %self) #2 !dbg !74 { +// CHECK:STDOUT: define void @_Cfunc__carbon_thunk.Derived.Main(ptr %self) #2 !dbg !74 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0a0b9df20a60c6f6:core.Destroy.Core"(ptr %self), !dbg !76 +// CHECK:STDOUT: call void @_Cfunc.Derived.Main(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.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #2 !dbg !78 { +// CHECK:STDOUT: define void @_Cother_func__carbon_thunk.Derived.Main(ptr %self) #2 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !80 -// CHECK:STDOUT: call void @"_CSelfDestruct.352b8f386f44a614:core.Destroy.Core"(ptr %.loc22.base), !dbg !80 +// CHECK:STDOUT: %Derived.other_func.call.vtable = load ptr, ptr %self, align 8, !dbg !80 +// CHECK:STDOUT: %Derived.other_func.call = call ptr @llvm.load.relative.i32(ptr %Derived.other_func.call.vtable, i32 8), !dbg !80 +// CHECK:STDOUT: call void %Derived.other_func.call(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.b25525d21a9bd472:core.Destroy.Core"(ptr %self) #2 !dbg !82 { +// CHECK:STDOUT: define void @_CDoThing.Main() #2 !dbg !82 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b25525d21a9bd472: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 void @_Cfunc__carbon_thunk.Derived.Main(ptr %self) #2 !dbg !86 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Cfunc.Derived.Main(ptr %self), !dbg !88 -// CHECK:STDOUT: ret void, !dbg !88 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_Cother_func__carbon_thunk.Derived.Main(ptr %self) #2 !dbg !90 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %Derived.other_func.call.vtable = load ptr, ptr %self, align 8, !dbg !92 -// CHECK:STDOUT: %Derived.other_func.call = call ptr @llvm.load.relative.i32(ptr %Derived.other_func.call.vtable, i32 8), !dbg !92 -// CHECK:STDOUT: call void %Derived.other_func.call(ptr %self), !dbg !92 -// CHECK:STDOUT: ret void, !dbg !92 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CDoThing.Main() #2 !dbg !94 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %d.var = alloca { [16 x i8] }, align 8, !dbg !95 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !95 -// CHECK:STDOUT: %.loc31_44.1.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !96 -// CHECK:STDOUT: call void @_ZN4BaseC1Ev.carbon_thunk.(ptr %.loc31_44.1.base), !dbg !97 -// CHECK:STDOUT: %.loc31_44.7.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !96 -// CHECK:STDOUT: %.loc31_44.8.base = getelementptr inbounds nuw [16 x i8], ptr %.loc31_44.7.base, i32 0, i32 0, !dbg !96 -// CHECK:STDOUT: %.loc31_44.9.vptr = getelementptr inbounds nuw [8 x i8], ptr %.loc31_44.8.base, i32 0, i32 0, !dbg !96 -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 24) (i8, ptr @_ZTVN6Carbon4Main7DerivedE, i64 16), ptr %.loc31_44.9.vptr, align 8, !dbg !96 -// CHECK:STDOUT: %.loc32_11.2.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !100 -// CHECK:STDOUT: call void @_Z3UseR4Base(ptr %.loc32_11.2.base), !dbg !101 -// CHECK:STDOUT: call void @"_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core"(ptr %d.var), !dbg !95 -// CHECK:STDOUT: ret void, !dbg !102 +// CHECK:STDOUT: %d.var = alloca { [16 x i8] }, align 8, !dbg !83 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !83 +// CHECK:STDOUT: %.loc31_44.1.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !84 +// CHECK:STDOUT: call void @_ZN4BaseC1Ev.carbon_thunk.(ptr %.loc31_44.1.base), !dbg !85 +// CHECK:STDOUT: %.loc31_44.7.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !84 +// CHECK:STDOUT: %.loc31_44.8.base = getelementptr inbounds nuw [16 x i8], ptr %.loc31_44.7.base, i32 0, i32 0, !dbg !84 +// CHECK:STDOUT: %.loc31_44.9.vptr = getelementptr inbounds nuw [8 x i8], ptr %.loc31_44.8.base, i32 0, i32 0, !dbg !84 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 24) (i8, ptr @_ZTVN6Carbon4Main7DerivedE, i64 16), ptr %.loc31_44.9.vptr, align 8, !dbg !84 +// CHECK:STDOUT: %.loc32_11.2.base = getelementptr inbounds nuw { [16 x i8] }, ptr %d.var, i32 0, i32 0, !dbg !88 +// CHECK:STDOUT: call void @_Z3UseR4Base(ptr %.loc32_11.2.base), !dbg !89 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9ede905be876779b(ptr %d.var), !dbg !83 +// CHECK:STDOUT: ret void, !dbg !90 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable @@ -187,6 +167,17 @@ fn DoThing() { // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9ede905be876779b(ptr %t) #2 !dbg !91 { +// CHECK:STDOUT: call void @"_COp.b25525d21a9bd472:core.SubobjectDestroy.Core"(ptr %t), !dbg !95 +// CHECK:STDOUT: ret void, !dbg !96 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.5984d7e4773d5a3e(ptr %t) #2 !dbg !98 { +// CHECK:STDOUT: ret void, !dbg !103 +// 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) #5 // CHECK:STDOUT: @@ -197,7 +188,7 @@ fn DoThing() { // CHECK:STDOUT: define internal void @_ZNR6Carbon4Main7Derived4funcEv(ptr noundef nonnull align 8 dereferenceable(12) %this) unnamed_addr #4 align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !108 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !110 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_Cfunc__carbon_thunk.Derived.Main(ptr noundef nonnull align 8 dereferenceable(12) %this1) // CHECK:STDOUT: ret void @@ -207,7 +198,7 @@ fn DoThing() { // CHECK:STDOUT: define internal void @_ZNK6Carbon4Main7Derived10other_funcEv(ptr noundef nonnull align 8 dereferenceable(12) %this) unnamed_addr #4 align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !108 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !110 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_Cother_func__carbon_thunk.Derived.Main(ptr noundef nonnull align 8 dereferenceable(12) %this1) // CHECK:STDOUT: ret void @@ -220,7 +211,7 @@ fn DoThing() { // CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !4 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_ZN11FurtherBaseC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %this1) #2 -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTV4Base, i64 16), ptr %this1, align 8, !tbaa !104 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTV4Base, i64 16), ptr %this1, align 8, !tbaa !106 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -228,14 +219,16 @@ fn DoThing() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN11FurtherBaseC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %this) unnamed_addr #7 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 !106 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !108 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 8) (i8, ptr @_ZTV11FurtherBase, i64 16), ptr %this1, align 8, !tbaa !104 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 8) (i8, ptr @_ZTV11FurtherBase, i64 16), ptr %this1, align 8, !tbaa !106 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_ZN11FurtherBase17further_base_funcEv, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9ede905be876779b, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.5984d7e4773d5a3e, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { mustprogress noinline nounwind optnone 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 = { "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" } @@ -247,8 +240,8 @@ fn DoThing() { // CHECK:STDOUT: attributes #7 = { 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 = !{!40} -// CHECK:STDOUT: !llvm.module.flags = !{!113, !114, !115, !7, !8} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!117} +// CHECK:STDOUT: !llvm.module.flags = !{!115, !116, !117, !7, !8} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!119} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0} @@ -257,6 +250,7 @@ fn DoThing() { // CHECK:STDOUT: !4 = !{!3, !3, i64 0} // CHECK:STDOUT: !7 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !8 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !31 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !39 = !DIFile(filename: "dynamic_base_from_cpp.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: !42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -280,51 +274,48 @@ fn DoThing() { // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !42) // CHECK:STDOUT: !64 = !DILocation(line: 22, column: 1, scope: !62) // CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.352b8f386f44a614:core.Destroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !69) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0a0b9df20a60c6f6:core.SubobjectDestroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !69) // CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !42) // CHECK:STDOUT: !68 = !DILocation(line: 22, column: 1, scope: !66) // CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0a0b9df20a60c6f6:core.Destroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !73) +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b25525d21a9bd472:core.SubobjectDestroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !73) // CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !42) // CHECK:STDOUT: !72 = !DILocation(line: 22, column: 1, scope: !70) // CHECK:STDOUT: !73 = !{!71} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0a0b9df20a60c6f6:core.Destroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !77) +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "func__carbon_thunk", linkageName: "_Cfunc__carbon_thunk.Derived.Main", scope: null, file: !39, line: 26, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !77) // CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !42) -// CHECK:STDOUT: !76 = !DILocation(line: 22, column: 1, scope: !74) +// CHECK:STDOUT: !76 = !DILocation(line: 26, column: 3, scope: !74) // CHECK:STDOUT: !77 = !{!75} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !81) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "other_func__carbon_thunk", linkageName: "_Cother_func__carbon_thunk.Derived.Main", scope: null, file: !39, line: 24, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !81) // CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !42) -// CHECK:STDOUT: !80 = !DILocation(line: 22, column: 1, scope: !78) +// CHECK:STDOUT: !80 = !DILocation(line: 24, column: 3, scope: !78) // CHECK:STDOUT: !81 = !{!79} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b25525d21a9bd472:core.Destroy.Core", scope: null, file: !39, line: 22, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !85) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !42) -// CHECK:STDOUT: !84 = !DILocation(line: 22, column: 1, scope: !82) -// CHECK:STDOUT: !85 = !{!83} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "func__carbon_thunk", linkageName: "_Cfunc__carbon_thunk.Derived.Main", scope: null, file: !39, line: 26, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !89) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !42) -// CHECK:STDOUT: !88 = !DILocation(line: 26, column: 3, scope: !86) -// CHECK:STDOUT: !89 = !{!87} -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "other_func__carbon_thunk", linkageName: "_Cother_func__carbon_thunk.Derived.Main", scope: null, file: !39, line: 24, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !93) -// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !42) -// CHECK:STDOUT: !92 = !DILocation(line: 24, column: 3, scope: !90) -// CHECK:STDOUT: !93 = !{!91} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "DoThing", linkageName: "_CDoThing.Main", scope: null, file: !39, line: 30, type: !46, spFlags: DISPFlagDefinition, unit: !40) -// CHECK:STDOUT: !95 = !DILocation(line: 31, column: 3, scope: !94) -// CHECK:STDOUT: !96 = !DILocation(line: 31, column: 20, scope: !94) -// CHECK:STDOUT: !97 = !DILocation(line: 31, column: 29, scope: !94) -// CHECK:STDOUT: !100 = !DILocation(line: 32, column: 11, scope: !94) -// CHECK:STDOUT: !101 = !DILocation(line: 32, column: 3, scope: !94) -// CHECK:STDOUT: !102 = !DILocation(line: 30, column: 1, scope: !94) -// CHECK:STDOUT: !103 = !{!"vtable pointer", !0, i64 0} -// CHECK:STDOUT: !104 = !{!103, !103, i64 0} -// CHECK:STDOUT: !105 = !{!"p1 _ZTS11FurtherBase", !2, i64 0} +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "DoThing", linkageName: "_CDoThing.Main", scope: null, file: !39, line: 30, type: !46, spFlags: DISPFlagDefinition, unit: !40) +// CHECK:STDOUT: !83 = !DILocation(line: 31, column: 3, scope: !82) +// CHECK:STDOUT: !84 = !DILocation(line: 31, column: 20, scope: !82) +// CHECK:STDOUT: !85 = !DILocation(line: 31, column: 29, scope: !82) +// CHECK:STDOUT: !88 = !DILocation(line: 32, column: 11, scope: !82) +// CHECK:STDOUT: !89 = !DILocation(line: 32, column: 3, scope: !82) +// CHECK:STDOUT: !90 = !DILocation(line: 30, column: 1, scope: !82) +// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9ede905be876779b", scope: null, file: !31, line: 32, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !97) +// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !42) +// CHECK:STDOUT: !95 = !DILocation(line: 34, column: 5, scope: !91) +// CHECK:STDOUT: !96 = !DILocation(line: 32, column: 1, scope: !91) +// CHECK:STDOUT: !97 = !{!92} +// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5984d7e4773d5a3e", scope: null, file: !31, line: 32, type: !44, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !104) +// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !42) +// CHECK:STDOUT: !103 = !DILocation(line: 32, column: 1, scope: !98) +// CHECK:STDOUT: !104 = !{!99} +// CHECK:STDOUT: !105 = !{!"vtable pointer", !0, i64 0} // CHECK:STDOUT: !106 = !{!105, !105, i64 0} -// CHECK:STDOUT: !107 = !{!"p1 _ZTSN6Carbon4Main7DerivedE", !2, i64 0} +// CHECK:STDOUT: !107 = !{!"p1 _ZTS11FurtherBase", !2, i64 0} // CHECK:STDOUT: !108 = !{!107, !107, i64 0} -// CHECK:STDOUT: !110 = !{!"int", !1, i64 0} -// CHECK:STDOUT: !113 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !114 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !115 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !116 = !{!"__libc_errno", !110, i64 0} -// CHECK:STDOUT: !117 = !{!116, !110, i64 0} +// CHECK:STDOUT: !109 = !{!"p1 _ZTSN6Carbon4Main7DerivedE", !2, i64 0} +// CHECK:STDOUT: !110 = !{!109, !109, i64 0} +// CHECK:STDOUT: !112 = !{!"int", !1, i64 0} +// CHECK:STDOUT: !115 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !116 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !117 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !118 = !{!"__libc_errno", !112, i64 0} +// CHECK:STDOUT: !119 = !{!118, !112, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/inherit.carbon b/toolchain/lower/testdata/interop/cpp/class/import/inherit.carbon index 7a435089daaf..9ac4decc0888 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/inherit.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/inherit.carbon @@ -68,7 +68,7 @@ fn Run() -> i32 { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN4Base1fEv(ptr noundef nonnull align 8 dereferenceable(12) %this) unnamed_addr #0 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 !60 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !62 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -91,7 +91,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %.loc20_11.1.base = getelementptr inbounds nuw { [16 x i8] }, ptr %c.var, i32 0, i32 0, !dbg !34 // CHECK:STDOUT: %.loc20_11.3.field = getelementptr inbounds nuw [16 x i8], ptr %.loc20_11.1.base, i32 0, i32 8, !dbg !34 // CHECK:STDOUT: %.loc20_11.4 = load i32, ptr %.loc20_11.3.field, align 4, !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.4daed2797ffd86fa:core.Destroy.Core"(ptr %c.var), !dbg !29 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.3dc4bd5f34a0e76b(ptr %c.var), !dbg !29 // CHECK:STDOUT: ret i32 %.loc20_11.4, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -99,63 +99,55 @@ fn Run() -> i32 { // CHECK:STDOUT: define internal void @_ZN4BaseC1Ev.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 !60 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !60 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !62 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !62 // CHECK:STDOUT: call void @_ZN4BaseC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %0) #1 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.352b8f386f44a614:core.Destroy.Core"(ptr %self) #1 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_COp.0a0b9df20a60c6f6:core.SubobjectDestroy.Core"(ptr %self) #1 !dbg !36 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc16_3.1.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5984d7e4773d5a3e(ptr %.loc16_3.1.base), !dbg !38 // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0a0b9df20a60c6f6:core.Destroy.Core"(ptr %self) #1 !dbg !40 { +// CHECK:STDOUT: define weak_odr void @"_COp.4daed2797ffd86fa:core.SubobjectDestroy.Core"(ptr %self) #1 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !42 -// CHECK:STDOUT: call void @"_CSelfDestruct.352b8f386f44a614:core.Destroy.Core"(ptr %.loc16.base), !dbg !42 +// CHECK:STDOUT: %.loc16_3.1.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5984d7e4773d5a3e(ptr %.loc16_3.1.base), !dbg !42 // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0a0b9df20a60c6f6:core.Destroy.Core"(ptr %self) #1 !dbg !44 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0a0b9df20a60c6f6: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.4daed2797ffd86fa:core.Destroy.Core"(ptr %self) #1 !dbg !48 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16.base = getelementptr inbounds nuw { [16 x i8] }, ptr %self, i32 0, i32 0, !dbg !50 -// CHECK:STDOUT: call void @"_CSelfDestruct.352b8f386f44a614:core.Destroy.Core"(ptr %.loc16.base), !dbg !50 -// CHECK:STDOUT: ret void, !dbg !50 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4daed2797ffd86fa:core.Destroy.Core"(ptr %self) #1 !dbg !52 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4daed2797ffd86fa: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)) #3 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.3dc4bd5f34a0e76b(ptr %t) #1 !dbg !44 { +// CHECK:STDOUT: call void @"_COp.4daed2797ffd86fa:core.SubobjectDestroy.Core"(ptr %t), !dbg !48 +// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.5984d7e4773d5a3e(ptr %t) #1 !dbg !51 { +// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN4BaseC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %this) unnamed_addr #4 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 !60 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !62 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 8) (i8, ptr @_ZTV4Base, i64 16), ptr %this1, align 8, !tbaa !62 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 8) (i8, ptr @_ZTV4Base, i64 16), ptr %this1, align 8, !tbaa !64 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_ZN4Base1fEv, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.5984d7e4773d5a3e, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #1 = { nounwind } @@ -164,11 +156,12 @@ fn Run() -> i32 { // CHECK:STDOUT: attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!19} -// CHECK:STDOUT: !llvm.module.flags = !{!63, !64, !65, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!68} +// CHECK:STDOUT: !llvm.module.flags = !{!65, !66, !67, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!70} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "generic_class_inherit_from_cpp.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -184,37 +177,34 @@ fn Run() -> i32 { // CHECK:STDOUT: !33 = !DILocation(line: 19, column: 3, scope: !26) // CHECK:STDOUT: !34 = !DILocation(line: 20, column: 10, scope: !26) // CHECK:STDOUT: !35 = !DILocation(line: 20, column: 3, scope: !26) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.352b8f386f44a614:core.Destroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0a0b9df20a60c6f6:core.SubobjectDestroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) // CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !21) // CHECK:STDOUT: !38 = !DILocation(line: 16, column: 3, scope: !36) // CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0a0b9df20a60c6f6:core.Destroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4daed2797ffd86fa:core.SubobjectDestroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !21) // CHECK:STDOUT: !42 = !DILocation(line: 16, column: 3, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0a0b9df20a60c6f6:core.Destroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.3dc4bd5f34a0e76b", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !50) // 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.4daed2797ffd86fa: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.4daed2797ffd86fa: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: !56 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !57 = !{!"omnipotent char", !56, i64 0} -// CHECK:STDOUT: !58 = !{!"any pointer", !57, i64 0} -// CHECK:STDOUT: !59 = !{!"p1 _ZTS4Base", !58, i64 0} -// CHECK:STDOUT: !60 = !{!59, !59, i64 0} -// CHECK:STDOUT: !61 = !{!"vtable pointer", !56, i64 0} +// CHECK:STDOUT: !48 = !DILocation(line: 34, column: 5, scope: !44) +// CHECK:STDOUT: !49 = !DILocation(line: 32, column: 1, scope: !44) +// CHECK:STDOUT: !50 = !{!45} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5984d7e4773d5a3e", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !21) +// CHECK:STDOUT: !56 = !DILocation(line: 32, column: 1, scope: !51) +// CHECK:STDOUT: !57 = !{!52} +// CHECK:STDOUT: !58 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !59 = !{!"omnipotent char", !58, i64 0} +// CHECK:STDOUT: !60 = !{!"any pointer", !59, i64 0} +// CHECK:STDOUT: !61 = !{!"p1 _ZTS4Base", !60, i64 0} // CHECK:STDOUT: !62 = !{!61, !61, i64 0} -// 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 = !{!"int", !57, i64 0} -// CHECK:STDOUT: !67 = !{!"__libc_errno", !66, i64 0} -// CHECK:STDOUT: !68 = !{!67, !66, i64 0} +// CHECK:STDOUT: !63 = !{!"vtable pointer", !58, i64 0} +// CHECK:STDOUT: !64 = !{!63, !63, i64 0} +// CHECK:STDOUT: !65 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !66 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !67 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !68 = !{!"int", !59, i64 0} +// CHECK:STDOUT: !69 = !{!"__libc_errno", !68, i64 0} +// CHECK:STDOUT: !70 = !{!69, !68, 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 445df8b80525..6c656e3a1ae6 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/method.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/method.carbon @@ -328,16 +328,16 @@ fn F(ref r: Cpp.RefSelfA) { // CHECK:STDOUT: @int_1.2eb = internal constant i8 1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCall.Main(ptr %n) #0 !dbg !76 { +// CHECK:STDOUT: define void @_CCall.Main(ptr %n) #0 !dbg !74 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_14.3.temp = alloca i8, align 1, !dbg !80 +// CHECK:STDOUT: %.loc7_14.3.temp = alloca i8, align 1, !dbg !78 // CHECK:STDOUT: %.loc8_14.3.temp = alloca i8, align 1, !dbg !82 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_14.3.temp), !dbg !80 -// CHECK:STDOUT: call void @_ZNK9NeedThunk8ImplicitEa.carbon_thunk.__(ptr %n, ptr @int_1.2eb), !dbg !79 -// CHECK:STDOUT: call void @"_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core"(ptr @int_1.2eb), !dbg !80 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_14.3.temp), !dbg !78 +// CHECK:STDOUT: call void @_ZNK9NeedThunk8ImplicitEa.carbon_thunk.__(ptr %n, ptr @int_1.2eb), !dbg !77 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6fb12317fdf5c9b3(ptr @int_1.2eb), !dbg !78 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_14.3.temp), !dbg !82 // CHECK:STDOUT: call void @_ZNH9NeedThunk8ExplicitES_a.carbon_thunk.__(ptr %n, ptr @int_1.2eb), !dbg !81 -// CHECK:STDOUT: call void @"_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core"(ptr @int_1.2eb), !dbg !82 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6fb12317fdf5c9b3(ptr @int_1.2eb), !dbg !82 // CHECK:STDOUT: ret void, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -346,32 +346,26 @@ 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 !90 -// CHECK:STDOUT: store ptr %c, ptr %c.addr, align 8, !tbaa !92 -// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !90, !nonnull !42 -// CHECK:STDOUT: %1 = load ptr, ptr %c.addr, align 8, !tbaa !92 -// CHECK:STDOUT: %2 = load i8, ptr %1, align 1, !tbaa !94 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !93 +// CHECK:STDOUT: store ptr %c, ptr %c.addr, align 8, !tbaa !95 +// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !93, !nonnull !42 +// CHECK:STDOUT: %1 = load ptr, ptr %c.addr, align 8, !tbaa !95 +// CHECK:STDOUT: %2 = load i8, ptr %1, align 1, !tbaa !97 // CHECK:STDOUT: call void @_ZNK9NeedThunk8ImplicitEa(ptr noundef nonnull align 1 dereferenceable(1) %0, i8 noundef signext %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.76b35ac5407de20a: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: 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 !90 -// CHECK:STDOUT: store ptr %c, ptr %c.addr, align 8, !tbaa !92 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !90 -// CHECK:STDOUT: %2 = load ptr, ptr %c.addr, align 8, !tbaa !92 -// CHECK:STDOUT: %3 = load i8, ptr %2, align 1, !tbaa !94 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !93 +// CHECK:STDOUT: store ptr %c, ptr %c.addr, align 8, !tbaa !95 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !93 +// CHECK:STDOUT: %2 = load ptr, ptr %c.addr, align 8, !tbaa !95 +// CHECK:STDOUT: %3 = load i8, ptr %2, align 1, !tbaa !97 // CHECK:STDOUT: call void @_ZNH9NeedThunk8ExplicitES_a(i8 noundef signext %3) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -379,13 +373,18 @@ fn F(ref r: Cpp.RefSelfA) { // 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 void @_CSelfDestruct.Core.6fb12317fdf5c9b3(ptr %t) #0 !dbg !85 { +// CHECK:STDOUT: ret void, !dbg !90 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZNK9NeedThunk8ImplicitEa(ptr noundef nonnull align 1 dereferenceable(1), i8 noundef signext) #3 // CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZNH9NeedThunk8ExplicitES_a(i8 noundef signext) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6fb12317fdf5c9b3, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -398,6 +397,7 @@ fn F(ref r: Cpp.RefSelfA) { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{null, !21} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) @@ -414,25 +414,25 @@ fn F(ref r: Cpp.RefSelfA) { // CHECK:STDOUT: !69 = !DIFile(filename: "call_thunk.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 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_signed) -// CHECK:STDOUT: !74 = !{null, !71} -// CHECK:STDOUT: !75 = !DISubroutineType(types: !74) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !69, line: 6, type: !25, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !84) -// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !21) -// CHECK:STDOUT: !79 = !DILocation(line: 7, column: 3, scope: !76) -// CHECK:STDOUT: !80 = !DILocation(line: 7, column: 14, scope: !76) -// CHECK:STDOUT: !81 = !DILocation(line: 8, column: 3, scope: !76) -// CHECK:STDOUT: !82 = !DILocation(line: 8, column: 14, scope: !76) -// CHECK:STDOUT: !83 = !DILocation(line: 6, column: 1, scope: !76) -// CHECK:STDOUT: !84 = !{!77} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core", scope: null, file: !69, line: 7, type: !75, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !88) +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !69, line: 6, type: !25, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !84) +// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !21) +// CHECK:STDOUT: !77 = !DILocation(line: 7, column: 3, scope: !74) +// CHECK:STDOUT: !78 = !DILocation(line: 7, column: 14, scope: !74) +// CHECK:STDOUT: !79 = !{null, !71} +// CHECK:STDOUT: !80 = !DISubroutineType(types: !79) +// CHECK:STDOUT: !81 = !DILocation(line: 8, column: 3, scope: !74) +// CHECK:STDOUT: !82 = !DILocation(line: 8, column: 14, scope: !74) +// CHECK:STDOUT: !83 = !DILocation(line: 6, column: 1, scope: !74) +// CHECK:STDOUT: !84 = !{!75} +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6fb12317fdf5c9b3", scope: null, file: !10, line: 32, type: !80, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !91) // 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 = !{!"p1 _ZTS9NeedThunk", !36, i64 0} -// CHECK:STDOUT: !90 = !{!89, !89, i64 0} -// CHECK:STDOUT: !91 = !{!"p1 omnipotent char", !36, i64 0} -// CHECK:STDOUT: !92 = !{!91, !91, i64 0} -// CHECK:STDOUT: !94 = !{!35, !35, i64 0} +// CHECK:STDOUT: !90 = !DILocation(line: 32, column: 1, scope: !85) +// CHECK:STDOUT: !91 = !{!86} +// CHECK:STDOUT: !92 = !{!"p1 _ZTS9NeedThunk", !36, i64 0} +// CHECK:STDOUT: !93 = !{!92, !92, i64 0} +// CHECK:STDOUT: !94 = !{!"p1 omnipotent char", !36, i64 0} +// CHECK:STDOUT: !95 = !{!94, !94, i64 0} +// CHECK:STDOUT: !97 = !{!35, !35, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call_with_ref_self.carbon' @@ -441,10 +441,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 !99 { +// CHECK:STDOUT: define void @_CF.Main(ptr %r) #0 !dbg !102 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN8RefSelfA1fEii(ptr %r, i32 1, i32 2), !dbg !102 -// CHECK:STDOUT: ret void, !dbg !103 +// CHECK:STDOUT: call void @_ZN8RefSelfA1fEii(ptr %r, i32 1, i32 2), !dbg !105 +// CHECK:STDOUT: ret void, !dbg !106 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZN8RefSelfA1fEii(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, i32 noundef) #1 @@ -452,7 +452,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 = !{!96} +// CHECK:STDOUT: !llvm.dbg.cu = !{!99} // CHECK:STDOUT: !llvm.module.flags = !{!45, !46, !47, !2, !3} // CHECK:STDOUT: !llvm.errno.tbaa = !{!49} // CHECK:STDOUT: @@ -469,11 +469,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: !95 = !DIFile(filename: "call_with_ref_self.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: !99 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !95, line: 11, type: !25, spFlags: DISPFlagDefinition, unit: !96, retainedNodes: !104) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !21) -// CHECK:STDOUT: !102 = !DILocation(line: 12, column: 3, scope: !99) -// CHECK:STDOUT: !103 = !DILocation(line: 11, column: 1, scope: !99) -// CHECK:STDOUT: !104 = !{!100} +// CHECK:STDOUT: !98 = !DIFile(filename: "call_with_ref_self.carbon", directory: "") +// CHECK:STDOUT: !99 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !98, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !98, line: 11, type: !25, spFlags: DISPFlagDefinition, unit: !99, retainedNodes: !107) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !21) +// CHECK:STDOUT: !105 = !DILocation(line: 12, column: 3, scope: !102) +// CHECK:STDOUT: !106 = !DILocation(line: 11, column: 1, scope: !102) +// CHECK:STDOUT: !107 = !{!103} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/import/virtual_base.carbon b/toolchain/lower/testdata/interop/cpp/class/import/virtual_base.carbon index c8ce14fe9f8f..40321f72f8a9 100644 --- a/toolchain/lower/testdata/interop/cpp/class/import/virtual_base.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/import/virtual_base.carbon @@ -127,7 +127,7 @@ fn AccessD(d: Cpp.D) -> i32 { // CHECK:STDOUT: %_.var = alloca [40 x i8], align 8, !dbg !29 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !29 // CHECK:STDOUT: call void @_ZN1DC1Ev.carbon_thunk.(ptr %_.var), !dbg !30 -// CHECK:STDOUT: call void @"_CSelfDestruct.87042109e4175f46:core.Destroy.Core"(ptr %_.var), !dbg !29 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b0bd72ff7739b134(ptr %_.var), !dbg !29 // CHECK:STDOUT: ret void, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -135,43 +135,42 @@ fn AccessD(d: Cpp.D) -> i32 { // CHECK:STDOUT: define internal void @_ZN1DC1Ev.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 !49 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !49 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !52 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !52 // CHECK:STDOUT: call void @_ZN1DC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.87042109e4175f46:core.Destroy.Core"(ptr %self) #0 !dbg !33 { +// CHECK:STDOUT: define i32 @_CAccessD.Main(ptr %d) #0 !dbg !33 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !35 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CAccessD.Main(ptr %d) #0 !dbg !37 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_11.1.d = getelementptr inbounds nuw [40 x i8], ptr %d, i32 0, i32 28, !dbg !42 -// CHECK:STDOUT: %.loc16_11.2 = load i32, ptr %.loc16_11.1.d, align 4, !dbg !42 -// CHECK:STDOUT: ret i32 %.loc16_11.2, !dbg !43 +// CHECK:STDOUT: %.loc16_11.1.d = getelementptr inbounds nuw [40 x i8], ptr %d, i32 0, i32 28, !dbg !38 +// CHECK:STDOUT: %.loc16_11.2 = load i32, ptr %.loc16_11.1.d, align 4, !dbg !38 +// CHECK:STDOUT: ret i32 %.loc16_11.2, !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)) #2 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b0bd72ff7739b134(ptr %t) #0 !dbg !41 { +// CHECK:STDOUT: ret void, !dbg !46 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN1DC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %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 !49 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !52 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: %0 = getelementptr inbounds i8, ptr %this1, i64 32 // CHECK:STDOUT: call void @_ZN1AC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %0) // CHECK:STDOUT: call void @_ZN1BC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %this1, ptr noundef getelementptr inbounds nuw (i8, ptr @_ZTT1D, i64 8)) // CHECK:STDOUT: %1 = getelementptr inbounds i8, ptr %this1, i64 16 // CHECK:STDOUT: call void @_ZN1CC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef getelementptr inbounds nuw (i8, ptr @_ZTT1D, i64 16)) -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-24, 0) (i8, ptr @_ZTV1D, i64 24), ptr %this1, align 8, !tbaa !51 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-24, 0) (i8, ptr @_ZTV1D, i64 24), ptr %this1, align 8, !tbaa !54 // CHECK:STDOUT: %add.ptr = getelementptr inbounds i8, ptr %this1, i64 16 -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-24, 0) (i8, ptr @_ZTV1D, i64 48), ptr %add.ptr, align 8, !tbaa !51 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-24, 0) (i8, ptr @_ZTV1D, i64 48), ptr %add.ptr, align 8, !tbaa !54 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -195,11 +194,12 @@ fn AccessD(d: Cpp.D) -> i32 { // 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 = !{!19} -// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!57} +// CHECK:STDOUT: !llvm.module.flags = !{!55, !56, !57, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!60} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "use_diamond.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -214,26 +214,26 @@ fn AccessD(d: Cpp.D) -> i32 { // CHECK:STDOUT: !29 = !DILocation(line: 11, column: 3, scope: !28) // CHECK:STDOUT: !30 = !DILocation(line: 11, column: 18, scope: !28) // CHECK:STDOUT: !32 = !DILocation(line: 6, column: 1, scope: !28) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.87042109e4175f46:core.Destroy.Core", scope: null, file: !18, line: 11, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !36) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "AccessD", linkageName: "_CAccessD.Main", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) // CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !33, type: !23) -// CHECK:STDOUT: !35 = !DILocation(line: 11, column: 3, scope: !33) -// CHECK:STDOUT: !36 = !{!34} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "AccessD", linkageName: "_CAccessD.Main", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) -// CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !23) -// CHECK:STDOUT: !42 = !DILocation(line: 16, column: 10, scope: !37) -// CHECK:STDOUT: !43 = !DILocation(line: 16, column: 3, scope: !37) -// CHECK:STDOUT: !44 = !{!38} -// CHECK:STDOUT: !45 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !46 = !{!"omnipotent char", !45, i64 0} -// CHECK:STDOUT: !47 = !{!"any pointer", !46, i64 0} -// CHECK:STDOUT: !48 = !{!"p1 _ZTS1D", !47, i64 0} -// CHECK:STDOUT: !49 = !{!48, !48, i64 0} -// CHECK:STDOUT: !50 = !{!"vtable pointer", !45, 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", !46, i64 0} -// CHECK:STDOUT: !56 = !{!"__libc_errno", !55, i64 0} -// CHECK:STDOUT: !57 = !{!56, !55, i64 0} +// CHECK:STDOUT: !38 = !DILocation(line: 16, column: 10, scope: !33) +// CHECK:STDOUT: !39 = !DILocation(line: 16, column: 3, scope: !33) +// CHECK:STDOUT: !40 = !{!34} +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b0bd72ff7739b134", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !23) +// CHECK:STDOUT: !46 = !DILocation(line: 32, column: 1, scope: !41) +// CHECK:STDOUT: !47 = !{!42} +// CHECK:STDOUT: !48 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !49 = !{!"omnipotent char", !48, i64 0} +// CHECK:STDOUT: !50 = !{!"any pointer", !49, i64 0} +// CHECK:STDOUT: !51 = !{!"p1 _ZTS1D", !50, i64 0} +// CHECK:STDOUT: !52 = !{!51, !51, i64 0} +// CHECK:STDOUT: !53 = !{!"vtable pointer", !48, i64 0} +// CHECK:STDOUT: !54 = !{!53, !53, i64 0} +// CHECK:STDOUT: !55 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !56 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !57 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !58 = !{!"int", !49, i64 0} +// CHECK:STDOUT: !59 = !{!"__libc_errno", !58, i64 0} +// CHECK:STDOUT: !60 = !{!59, !58, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/virtual_fn.carbon b/toolchain/lower/testdata/interop/cpp/class/virtual_fn.carbon index bf60b566e80e..b340b53ede3b 100644 --- a/toolchain/lower/testdata/interop/cpp/class/virtual_fn.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/virtual_fn.carbon @@ -96,7 +96,7 @@ void delete_new_Base() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %p = alloca ptr, align 8 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %p) #8 -// CHECK:STDOUT: %call = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #10 +// CHECK:STDOUT: %call = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #11 // CHECK:STDOUT: call void @_ZN6Carbon4Main5FinalC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %call) #8 // CHECK:STDOUT: store ptr %call, ptr %p, align 8, !tbaa !4 // CHECK:STDOUT: %0 = load ptr, ptr %p, align 8, !tbaa !4 @@ -105,7 +105,7 @@ void delete_new_Base() { // CHECK:STDOUT: // CHECK:STDOUT: delete.notnull: ; preds = %entry // CHECK:STDOUT: call void @_ZN6Carbon4Main5FinalD2Ev(ptr noundef nonnull align 8 dead_on_return(8) dereferenceable(8) %0) #8 -// CHECK:STDOUT: call void @_ZdlPvm(ptr noundef %0, i64 noundef 8) #11 +// CHECK:STDOUT: call void @_ZdlPvm(ptr noundef %0, i64 noundef 8) #12 // CHECK:STDOUT: br label %delete.end // CHECK:STDOUT: // CHECK:STDOUT: delete.end: ; preds = %delete.notnull, %entry @@ -152,7 +152,7 @@ void delete_new_Base() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %p = alloca ptr, align 8 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %p) #8 -// CHECK:STDOUT: %call = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #10 +// CHECK:STDOUT: %call = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #11 // CHECK:STDOUT: call void @_ZN6Carbon4Main4BaseC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %call) #8 // CHECK:STDOUT: store ptr %call, ptr %p, align 8, !tbaa !6 // CHECK:STDOUT: %0 = load ptr, ptr %p, align 8, !tbaa !6 @@ -186,8 +186,8 @@ void delete_new_Base() { // CHECK:STDOUT: define internal void @_ZNK1A1FEv.carbon_thunk._(ptr noundef nonnull align 8 dereferenceable(8) %this) #5 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !87 -// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !87, !nonnull !90, !align !91 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !92 +// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !92, !nonnull !95, !align !96 // CHECK:STDOUT: %vtable = load ptr, ptr %0, align 8, !tbaa !8 // CHECK:STDOUT: %vfn = getelementptr inbounds ptr, ptr %vtable, i64 2 // CHECK:STDOUT: %1 = load ptr, ptr %vfn, align 8 @@ -207,7 +207,7 @@ void delete_new_Base() { // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind // CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.Final.Main"(ptr %self) #6 !dbg !37 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.28387b086eba9957:core.Destroy.Core"(ptr %self), !dbg !39 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.937c854cf39ce4c2(ptr %self), !dbg !39 // CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -215,93 +215,85 @@ void delete_new_Base() { // CHECK:STDOUT: declare void @_ZN1AD1Ev(ptr noundef nonnull align 8 dead_on_return(8) dereferenceable(8)) unnamed_addr #7 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %self) #8 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_COp.e9cc9e95545cc62f:core.SubobjectDestroy.Core"(ptr %self) #8 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %A.cpp_destructor.call.vtable = load ptr, ptr %self, align 8, !dbg !43 -// CHECK:STDOUT: %A.cpp_destructor.call = getelementptr ptr, ptr %A.cpp_destructor.call.vtable, i32 0, !dbg !43 -// CHECK:STDOUT: %A.cpp_destructor.call.memptr.virtualfn = load ptr, ptr %A.cpp_destructor.call, align 8, !dbg !43 -// CHECK:STDOUT: call void %A.cpp_destructor.call.memptr.virtualfn(ptr %self), !dbg !43 +// CHECK:STDOUT: %.loc12_13.1.base = getelementptr inbounds nuw { [8 x i8] }, ptr %self, i32 0, i32 0, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %.loc12_13.1.base), !dbg !43 // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.e9cc9e95545cc62f:core.Destroy.Core"(ptr %self) #8 !dbg !45 { +// CHECK:STDOUT: define weak_odr void @"_COp.28387b086eba9957:core.SubobjectDestroy.Core"(ptr %self) #8 !dbg !45 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12.base = getelementptr inbounds nuw { [8 x i8] }, ptr %self, i32 0, i32 0, !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %.loc12.base), !dbg !47 +// CHECK:STDOUT: %.loc12_13.1.base = getelementptr inbounds nuw { [8 x i8] }, ptr %self, i32 0, i32 0, !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %.loc12_13.1.base), !dbg !47 // CHECK:STDOUT: ret void, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e9cc9e95545cc62f:core.Destroy.Core"(ptr %self) #8 !dbg !49 { +// CHECK:STDOUT: define void @_CF__carbon_thunk.Final.Main(ptr %self) #8 !dbg !49 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.e9cc9e95545cc62f:core.Destroy.Core"(ptr %self), !dbg !51 +// CHECK:STDOUT: call void @_CF.Final.Main(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.28387b086eba9957:core.Destroy.Core"(ptr %self) #8 !dbg !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12.base = getelementptr inbounds nuw { [8 x i8] }, ptr %self, i32 0, i32 0, !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %.loc12.base), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !55 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.28387b086eba9957:core.Destroy.Core"(ptr %self) #8 !dbg !57 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.28387b086eba9957: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 void @_CF__carbon_thunk.Final.Main(ptr %self) #8 !dbg !61 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Final.Main(ptr %self), !dbg !63 -// CHECK:STDOUT: ret void, !dbg !63 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: declare void @_CF.Base.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CF:thunk:A.Cpp:Base.Main"(ptr %self) #6 !dbg !65 { +// CHECK:STDOUT: define weak_odr void @"_CF:thunk:A.Cpp:Base.Main"(ptr %self) #6 !dbg !53 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_CF.Base.Main(ptr %self), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.Base.Main"(ptr %self) #6 !dbg !58 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a4aefa05e08cd2e1(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 @"_COp.294df737cd074d60:core.SubobjectDestroy.Core"(ptr %self) #8 !dbg !62 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc17_17.1.base = getelementptr inbounds nuw { [8 x i8] }, ptr %self, i32 0, i32 0, !dbg !64 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %.loc17_17.1.base), !dbg !64 +// CHECK:STDOUT: ret void, !dbg !64 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define void @_CF__carbon_thunk.Base.Main(ptr %self) #8 !dbg !66 { // CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CF.Base.Main(ptr %self), !dbg !68 // CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.Base.Main"(ptr %self) #6 !dbg !70 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %self), !dbg !72 -// CHECK:STDOUT: ret void, !dbg !72 +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.937c854cf39ce4c2(ptr %t) #8 !dbg !70 { +// CHECK:STDOUT: call void @"_COp.28387b086eba9957:core.SubobjectDestroy.Core"(ptr %t), !dbg !74 +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self) #8 !dbg !74 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17.base = getelementptr inbounds nuw { [8 x i8] }, ptr %self, i32 0, i32 0, !dbg !76 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %.loc17.base), !dbg !76 -// CHECK:STDOUT: ret void, !dbg !76 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %t) #8 !dbg !77 { +// CHECK:STDOUT: %vtable = load ptr, ptr %t, align 8, !dbg !81 +// CHECK:STDOUT: %1 = call ptr @llvm.load.relative.i32(ptr %vtable, i32 0), !dbg !81 +// CHECK:STDOUT: call void %1(ptr %t), !dbg !81 +// CHECK:STDOUT: ret void, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.294df737cd074d60:core.Destroy.Core"(ptr %self) #8 !dbg !78 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core"(ptr %self), !dbg !80 -// CHECK:STDOUT: ret void, !dbg !80 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.a4aefa05e08cd2e1(ptr %t) #8 !dbg !84 { +// CHECK:STDOUT: call void @"_COp.294df737cd074d60:core.SubobjectDestroy.Core"(ptr %t), !dbg !88 +// CHECK:STDOUT: ret void, !dbg !89 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF__carbon_thunk.Base.Main(ptr %self) #8 !dbg !82 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Base.Main(ptr %self), !dbg !84 -// CHECK:STDOUT: ret void, !dbg !84 -// CHECK:STDOUT: } +// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read) +// CHECK:STDOUT: declare ptr @llvm.load.relative.i32(ptr, i32) #9 // CHECK:STDOUT: // CHECK:STDOUT: declare void @__cxa_pure_virtual() unnamed_addr // CHECK:STDOUT: -// CHECK:STDOUT: declare void @_ZNK1A1FEv(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #9 +// CHECK:STDOUT: declare void @_ZNK1A1FEv(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #10 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN6Carbon4Main5FinalD0Ev(ptr noundef nonnull align 8 dereferenceable(8) %this) unnamed_addr #3 comdat align 2 { @@ -310,7 +302,7 @@ void delete_new_Base() { // CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !4 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_ZN6Carbon4Main5FinalD2Ev(ptr noundef nonnull align 8 dead_on_return(8) dereferenceable(8) %this1) #8 -// CHECK:STDOUT: call void @_ZdlPvm(ptr noundef %this1, i64 noundef 8) #11 +// CHECK:STDOUT: call void @_ZdlPvm(ptr noundef %this1, i64 noundef 8) #12 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -343,7 +335,7 @@ void delete_new_Base() { // CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !6 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_ZN6Carbon4Main4BaseD2Ev(ptr noundef nonnull align 8 dead_on_return(8) dereferenceable(8) %this1) #8 -// CHECK:STDOUT: call void @_ZdlPvm(ptr noundef %this1, i64 noundef 8) #11 +// CHECK:STDOUT: call void @_ZdlPvm(ptr noundef %this1, i64 noundef 8) #12 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -361,7 +353,7 @@ void delete_new_Base() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN1AC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %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 !87 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !92 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 24) (i8, ptr @_ZTV1A, i64 16), ptr %this1, align 8, !tbaa !8 // CHECK:STDOUT: ret void @@ -372,6 +364,7 @@ void delete_new_Base() { // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_ZN6Carbon4Main5FinalD2Ev, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.e885b4b34ded440e, { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @__cxa_pure_virtual, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @_ZN6Carbon4Main4BaseD2Ev, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @_ZN1AC2Ev, { 1, 0 } @@ -386,13 +379,14 @@ void delete_new_Base() { // CHECK:STDOUT: attributes #6 = { alwaysinline nounwind } // CHECK:STDOUT: attributes #7 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #8 = { nounwind } -// CHECK:STDOUT: attributes #9 = { "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 #10 = { builtin allocsize(0) memory(inaccessiblemem: readwrite, errnomem: write) } -// CHECK:STDOUT: attributes #11 = { builtin nounwind } +// CHECK:STDOUT: attributes #9 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } +// CHECK:STDOUT: attributes #10 = { "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 #11 = { builtin allocsize(0) memory(inaccessiblemem: readwrite, errnomem: write) } +// CHECK:STDOUT: attributes #12 = { builtin nounwind } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!28} -// CHECK:STDOUT: !llvm.module.flags = !{!93, !94, !95, !11, !12} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!98} +// CHECK:STDOUT: !llvm.module.flags = !{!98, !99, !100, !11, !12} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!103} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0} @@ -405,6 +399,7 @@ void delete_new_Base() { // CHECK:STDOUT: !8 = !{!7, !7, i64 0} // CHECK:STDOUT: !11 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !12 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !19 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !27 = !DIFile(filename: "override_virtual_dtor.carbon", directory: "") // CHECK:STDOUT: !28 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !27, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !29 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -418,58 +413,57 @@ void delete_new_Base() { // CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !29) // CHECK:STDOUT: !39 = !DILocation(line: 12, column: 1, scope: !37) // CHECK:STDOUT: !40 = !{!38} -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core", scope: null, file: !27, line: 12, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !44) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e9cc9e95545cc62f:core.SubobjectDestroy.Core", scope: null, file: !27, line: 12, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !29) // CHECK:STDOUT: !43 = !DILocation(line: 12, column: 1, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.e9cc9e95545cc62f:core.Destroy.Core", scope: null, file: !27, line: 12, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !48) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "Op", linkageName: "_COp.28387b086eba9957:core.SubobjectDestroy.Core", scope: null, file: !27, line: 12, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !48) // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !29) // CHECK:STDOUT: !47 = !DILocation(line: 12, column: 1, scope: !45) // CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e9cc9e95545cc62f:core.Destroy.Core", scope: null, file: !27, line: 12, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !52) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Final.Main", scope: null, file: !27, line: 14, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !52) // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !29) -// CHECK:STDOUT: !51 = !DILocation(line: 12, column: 1, scope: !49) +// CHECK:STDOUT: !51 = !DILocation(line: 14, column: 3, scope: !49) // CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.28387b086eba9957:core.Destroy.Core", scope: null, file: !27, line: 12, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !56) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:A.Cpp:Base.Main", scope: null, file: !27, line: 19, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !57) // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !29) -// CHECK:STDOUT: !55 = !DILocation(line: 12, column: 1, scope: !53) -// CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.28387b086eba9957:core.Destroy.Core", scope: null, file: !27, line: 12, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !29) -// CHECK:STDOUT: !59 = !DILocation(line: 12, column: 1, scope: !57) -// CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Final.Main", scope: null, file: !27, line: 14, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !29) -// CHECK:STDOUT: !63 = !DILocation(line: 14, column: 3, scope: !61) -// CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "F", linkageName: "_CF:thunk:A.Cpp:Base.Main", scope: null, file: !27, line: 19, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !69) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !29) -// CHECK:STDOUT: !68 = !DILocation(line: 19, column: 3, scope: !65) -// CHECK:STDOUT: !69 = !{!66} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Base.Main", scope: null, file: !27, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !73) +// CHECK:STDOUT: !56 = !DILocation(line: 19, column: 3, scope: !53) +// CHECK:STDOUT: !57 = !{!54} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Base.Main", scope: null, file: !27, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !61) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !29) +// CHECK:STDOUT: !60 = !DILocation(line: 17, column: 1, scope: !58) +// CHECK:STDOUT: !61 = !{!59} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Op", linkageName: "_COp.294df737cd074d60:core.SubobjectDestroy.Core", scope: null, file: !27, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !65) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !29) +// CHECK:STDOUT: !64 = !DILocation(line: 17, column: 1, scope: !62) +// CHECK:STDOUT: !65 = !{!63} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Base.Main", scope: null, file: !27, line: 19, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !69) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !29) +// CHECK:STDOUT: !68 = !DILocation(line: 19, column: 3, scope: !66) +// CHECK:STDOUT: !69 = !{!67} +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.937c854cf39ce4c2", scope: null, file: !19, line: 32, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !76) // CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !29) -// CHECK:STDOUT: !72 = !DILocation(line: 17, column: 1, scope: !70) -// CHECK:STDOUT: !73 = !{!71} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.294df737cd074d60:core.Destroy.Core", scope: null, file: !27, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !77) -// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !29) -// CHECK:STDOUT: !76 = !DILocation(line: 17, column: 1, scope: !74) -// CHECK:STDOUT: !77 = !{!75} -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.294df737cd074d60:core.Destroy.Core", scope: null, file: !27, line: 17, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !81) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !29) -// CHECK:STDOUT: !80 = !DILocation(line: 17, column: 1, scope: !78) -// CHECK:STDOUT: !81 = !{!79} -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "F__carbon_thunk", linkageName: "_CF__carbon_thunk.Base.Main", scope: null, file: !27, line: 19, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !85) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !29) -// CHECK:STDOUT: !84 = !DILocation(line: 19, column: 3, scope: !82) -// CHECK:STDOUT: !85 = !{!83} -// CHECK:STDOUT: !86 = !{!"p1 _ZTS1A", !2, i64 0} -// CHECK:STDOUT: !87 = !{!86, !86, i64 0} -// CHECK:STDOUT: !90 = !{} -// CHECK:STDOUT: !91 = !{i64 8} -// CHECK:STDOUT: !93 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !94 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !95 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !96 = !{!"int", !1, i64 0} -// CHECK:STDOUT: !97 = !{!"__libc_errno", !96, i64 0} -// CHECK:STDOUT: !98 = !{!97, !96, i64 0} +// CHECK:STDOUT: !74 = !DILocation(line: 34, column: 5, scope: !70) +// CHECK:STDOUT: !75 = !DILocation(line: 32, column: 1, scope: !70) +// CHECK:STDOUT: !76 = !{!71} +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e885b4b34ded440e", scope: null, file: !19, line: 32, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !83) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !29) +// CHECK:STDOUT: !81 = !DILocation(line: 34, column: 5, scope: !77) +// CHECK:STDOUT: !82 = !DILocation(line: 32, column: 1, scope: !77) +// CHECK:STDOUT: !83 = !{!78} +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.a4aefa05e08cd2e1", scope: null, file: !19, line: 32, type: !31, spFlags: DISPFlagDefinition, unit: !28, retainedNodes: !90) +// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !29) +// CHECK:STDOUT: !88 = !DILocation(line: 34, column: 5, scope: !84) +// CHECK:STDOUT: !89 = !DILocation(line: 32, column: 1, scope: !84) +// CHECK:STDOUT: !90 = !{!85} +// CHECK:STDOUT: !91 = !{!"p1 _ZTS1A", !2, i64 0} +// CHECK:STDOUT: !92 = !{!91, !91, i64 0} +// CHECK:STDOUT: !95 = !{} +// CHECK:STDOUT: !96 = !{i64 8} +// CHECK:STDOUT: !98 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !99 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !100 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !101 = !{!"int", !1, i64 0} +// CHECK:STDOUT: !102 = !{!"__libc_errno", !101, i64 0} +// CHECK:STDOUT: !103 = !{!102, !101, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/class/virtual_fn_carbon_only.carbon b/toolchain/lower/testdata/interop/cpp/class/virtual_fn_carbon_only.carbon index 1b06ffb4fb76..c30acc92d969 100644 --- a/toolchain/lower/testdata/interop/cpp/class/virtual_fn_carbon_only.carbon +++ b/toolchain/lower/testdata/interop/cpp/class/virtual_fn_carbon_only.carbon @@ -59,98 +59,89 @@ fn F() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN1X1fEv(ptr noundef nonnull align 8 dereferenceable(8) %this) unnamed_addr #0 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 !61 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !69 // 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 void @_Cf.Z.Main(ptr %self) #1 !dbg !13 { +// CHECK:STDOUT: define void @_Cf.Z.Main(ptr %self) #1 !dbg !19 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !16 +// CHECK:STDOUT: ret void, !dbg !22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_Cf:thunk:X.Cpp:Z.Main"(ptr %self) #2 !dbg !18 { +// CHECK:STDOUT: define weak_odr void @"_Cf:thunk:X.Cpp:Z.Main"(ptr %self) #2 !dbg !24 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Cf.Z.Main(ptr %self), !dbg !21 -// CHECK:STDOUT: ret void, !dbg !21 +// CHECK:STDOUT: call void @_Cf.Z.Main(ptr %self), !dbg !27 +// CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.Z.Main"(ptr %self) #2 !dbg !23 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.Z.Main"(ptr %self) #2 !dbg !29 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self), !dbg !25 -// CHECK:STDOUT: ret void, !dbg !25 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ff24853a526ad6af(ptr %self), !dbg !31 +// CHECK:STDOUT: ret void, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #1 !dbg !27 { +// CHECK:STDOUT: define weak_odr void @"_COp.de73a19002e400c9:core.SubobjectDestroy.Core"(ptr %self) #1 !dbg !33 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !29 +// CHECK:STDOUT: %.loc18_9.1.base = getelementptr inbounds nuw { [8 x i8] }, ptr %self, i32 0, i32 0, !dbg !35 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr %.loc18_9.1.base), !dbg !35 +// CHECK:STDOUT: ret void, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.de73a19002e400c9:core.Destroy.Core"(ptr %self) #1 !dbg !31 { +// CHECK:STDOUT: define weak_odr void @"_COp.680f7fa3ef86df7a:core.SubobjectDestroy.Core"(ptr %self) #1 !dbg !37 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18.base = getelementptr inbounds nuw { [8 x i8] }, ptr %self, i32 0, i32 0, !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %.loc18.base), !dbg !33 -// CHECK:STDOUT: ret void, !dbg !33 +// CHECK:STDOUT: %.loc18_9.1.base = getelementptr inbounds nuw { [8 x i8] }, ptr %self, i32 0, i32 0, !dbg !39 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr %.loc18_9.1.base), !dbg !39 +// CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.de73a19002e400c9:core.Destroy.Core"(ptr %self) #1 !dbg !35 { +// CHECK:STDOUT: define void @_Cf__carbon_thunk.Z.Main(ptr %self) #1 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.de73a19002e400c9:core.Destroy.Core"(ptr %self), !dbg !37 -// CHECK:STDOUT: ret void, !dbg !37 +// CHECK:STDOUT: call void @_Cf.Z.Main(ptr %self), !dbg !43 +// CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #1 !dbg !39 { +// CHECK:STDOUT: define void @_CF.Main() #1 !dbg !45 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18.base = getelementptr inbounds nuw { [8 x i8] }, ptr %self, i32 0, i32 0, !dbg !41 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %.loc18.base), !dbg !41 -// CHECK:STDOUT: ret void, !dbg !41 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #1 !dbg !43 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.680f7fa3ef86df7a: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 void @_Cf__carbon_thunk.Z.Main(ptr %self) #1 !dbg !47 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Cf.Z.Main(ptr %self), !dbg !49 -// CHECK:STDOUT: ret void, !dbg !49 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #1 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { [8 x i8] }, align 8, !dbg !52 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !52 -// CHECK:STDOUT: %.loc24_32.1.base = getelementptr inbounds nuw { [8 x i8] }, ptr %_.var, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: call void @_ZN1XC1Ev.carbon_thunk.(ptr %.loc24_32.1.base), !dbg !54 -// CHECK:STDOUT: %.loc24_32.7.base = getelementptr inbounds nuw { [8 x i8] }, ptr %_.var, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: %.loc24_32.8.vptr = getelementptr inbounds nuw [8 x i8], ptr %.loc24_32.7.base, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 8) (i8, ptr @_ZTVN6Carbon4Main1ZE, i64 16), ptr %.loc24_32.8.vptr, align 8, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core"(ptr %_.var), !dbg !52 -// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: %_.var = alloca { [8 x i8] }, align 8, !dbg !46 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !46 +// CHECK:STDOUT: %.loc24_32.1.base = getelementptr inbounds nuw { [8 x i8] }, ptr %_.var, i32 0, i32 0, !dbg !47 +// CHECK:STDOUT: call void @_ZN1XC1Ev.carbon_thunk.(ptr %.loc24_32.1.base), !dbg !48 +// CHECK:STDOUT: %.loc24_32.7.base = getelementptr inbounds nuw { [8 x i8] }, ptr %_.var, i32 0, i32 0, !dbg !47 +// CHECK:STDOUT: %.loc24_32.8.vptr = getelementptr inbounds nuw [8 x i8], ptr %.loc24_32.7.base, i32 0, i32 0, !dbg !47 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 8) (i8, ptr @_ZTVN6Carbon4Main1ZE, i64 16), ptr %.loc24_32.8.vptr, align 8, !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ff24853a526ad6af(ptr %_.var), !dbg !46 +// CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN1XC1Ev.carbon_thunk.(ptr noundef %return) #3 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !61 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !61 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !69 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !69 // CHECK:STDOUT: call void @_ZN1XC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #1 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ff24853a526ad6af(ptr %t) #1 !dbg !51 { +// CHECK:STDOUT: call void @"_COp.680f7fa3ef86df7a:core.SubobjectDestroy.Core"(ptr %t), !dbg !55 +// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr %t) #1 !dbg !58 { +// 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)) #4 // CHECK:STDOUT: @@ -158,7 +149,7 @@ fn F() { // CHECK:STDOUT: define internal void @_ZN6Carbon4Main1Z1fEv(ptr noundef nonnull align 8 dereferenceable(8) %this) unnamed_addr #3 align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !65 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !73 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: call void @_Cf__carbon_thunk.Z.Main(ptr noundef nonnull align 8 dereferenceable(8) %this1) // CHECK:STDOUT: ret void @@ -168,12 +159,16 @@ fn F() { // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN1XC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %this) unnamed_addr #5 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 !61 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !69 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 -// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 8) (i8, ptr @_ZTV1X, i64 16), ptr %this1, align 8, !tbaa !63 +// CHECK:STDOUT: store ptr getelementptr inbounds inrange(-16, 8) (i8, ptr @_ZTV1X, i64 16), ptr %this1, align 8, !tbaa !71 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.ff24853a526ad6af, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.2d682b12c0c20e08, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #1 = { nounwind } // CHECK:STDOUT: attributes #2 = { alwaysinline nounwind } @@ -181,73 +176,71 @@ fn F() { // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #5 = { 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 = !{!7} -// CHECK:STDOUT: !llvm.module.flags = !{!68, !69, !70, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!73} +// CHECK:STDOUT: !llvm.dbg.cu = !{!13} +// CHECK:STDOUT: !llvm.module.flags = !{!76, !77, !78, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!81} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !6 = !DIFile(filename: "virtual_fn_carbon_only.carbon", directory: "") -// CHECK:STDOUT: !7 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !9 = !{null, !8} -// CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !11 = !{null} -// CHECK:STDOUT: !12 = !DISubroutineType(types: !11) -// CHECK:STDOUT: !13 = distinct !DISubprogram(name: "f", linkageName: "_Cf.Z.Main", scope: null, file: !6, line: 20, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !17) -// CHECK:STDOUT: !14 = !DILocalVariable(arg: 1, scope: !13, type: !8) -// CHECK:STDOUT: !16 = !DILocation(line: 20, column: 3, scope: !13) -// CHECK:STDOUT: !17 = !{!14} -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "f", linkageName: "_Cf:thunk:X.Cpp:Z.Main", scope: null, file: !6, line: 20, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !22) -// CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !18, type: !8) -// CHECK:STDOUT: !21 = !DILocation(line: 20, column: 3, scope: !18) -// CHECK:STDOUT: !22 = !{!19} -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Z.Main", scope: null, file: !6, line: 18, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !26) -// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !23, type: !8) -// CHECK:STDOUT: !25 = !DILocation(line: 18, column: 1, scope: !23) -// CHECK:STDOUT: !26 = !{!24} -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !6, line: 18, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !30) -// CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !27, type: !8) -// CHECK:STDOUT: !29 = !DILocation(line: 18, column: 1, scope: !27) -// CHECK:STDOUT: !30 = !{!28} -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.de73a19002e400c9:core.Destroy.Core", scope: null, file: !6, line: 18, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !34) -// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !8) -// CHECK:STDOUT: !33 = !DILocation(line: 18, column: 1, scope: !31) -// CHECK:STDOUT: !34 = !{!32} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.de73a19002e400c9:core.Destroy.Core", scope: null, file: !6, line: 18, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !38) -// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !8) -// CHECK:STDOUT: !37 = !DILocation(line: 18, column: 1, scope: !35) -// CHECK:STDOUT: !38 = !{!36} -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !6, line: 18, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !42) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !8) -// CHECK:STDOUT: !41 = !DILocation(line: 18, column: 1, scope: !39) -// CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !6, line: 18, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !46) -// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !8) -// CHECK:STDOUT: !45 = !DILocation(line: 18, column: 1, scope: !43) -// CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "f__carbon_thunk", linkageName: "_Cf__carbon_thunk.Z.Main", scope: null, file: !6, line: 20, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !8) -// CHECK:STDOUT: !49 = !DILocation(line: 20, column: 3, scope: !47) -// CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !6, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !7) -// CHECK:STDOUT: !52 = !DILocation(line: 24, column: 3, scope: !51) -// CHECK:STDOUT: !53 = !DILocation(line: 24, column: 14, scope: !51) -// CHECK:STDOUT: !54 = !DILocation(line: 24, column: 23, scope: !51) -// CHECK:STDOUT: !56 = !DILocation(line: 23, column: 1, scope: !51) -// CHECK:STDOUT: !57 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !58 = !{!"omnipotent char", !57, i64 0} -// CHECK:STDOUT: !59 = !{!"any pointer", !58, i64 0} -// CHECK:STDOUT: !60 = !{!"p1 _ZTS1X", !59, i64 0} -// CHECK:STDOUT: !61 = !{!60, !60, i64 0} -// CHECK:STDOUT: !62 = !{!"vtable pointer", !57, i64 0} -// CHECK:STDOUT: !63 = !{!62, !62, i64 0} -// CHECK:STDOUT: !64 = !{!"p1 _ZTSN6Carbon4Main1ZE", !59, i64 0} -// CHECK:STDOUT: !65 = !{!64, !64, i64 0} -// CHECK:STDOUT: !68 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !69 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !70 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !71 = !{!"int", !58, i64 0} -// CHECK:STDOUT: !72 = !{!"__libc_errno", !71, i64 0} -// CHECK:STDOUT: !73 = !{!72, !71, i64 0} +// CHECK:STDOUT: !4 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") +// CHECK:STDOUT: !12 = !DIFile(filename: "virtual_fn_carbon_only.carbon", directory: "") +// CHECK:STDOUT: !13 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !12, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !15 = !{null, !14} +// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) +// CHECK:STDOUT: !17 = !{null} +// CHECK:STDOUT: !18 = !DISubroutineType(types: !17) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "f", linkageName: "_Cf.Z.Main", scope: null, file: !12, line: 20, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !23) +// CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !19, type: !14) +// CHECK:STDOUT: !22 = !DILocation(line: 20, column: 3, scope: !19) +// CHECK:STDOUT: !23 = !{!20} +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "f", linkageName: "_Cf:thunk:X.Cpp:Z.Main", scope: null, file: !12, line: 20, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !28) +// CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !24, type: !14) +// CHECK:STDOUT: !27 = !DILocation(line: 20, column: 3, scope: !24) +// CHECK:STDOUT: !28 = !{!25} +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.Z.Main", scope: null, file: !12, line: 18, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !32) +// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !14) +// CHECK:STDOUT: !31 = !DILocation(line: 18, column: 1, scope: !29) +// CHECK:STDOUT: !32 = !{!30} +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Op", linkageName: "_COp.de73a19002e400c9:core.SubobjectDestroy.Core", scope: null, file: !12, line: 18, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !36) +// CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !33, type: !14) +// CHECK:STDOUT: !35 = !DILocation(line: 18, column: 1, scope: !33) +// CHECK:STDOUT: !36 = !{!34} +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "Op", linkageName: "_COp.680f7fa3ef86df7a:core.SubobjectDestroy.Core", scope: null, file: !12, line: 18, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !40) +// CHECK:STDOUT: !38 = !DILocalVariable(arg: 1, scope: !37, type: !14) +// CHECK:STDOUT: !39 = !DILocation(line: 18, column: 1, scope: !37) +// CHECK:STDOUT: !40 = !{!38} +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "f__carbon_thunk", linkageName: "_Cf__carbon_thunk.Z.Main", scope: null, file: !12, line: 20, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !44) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !14) +// CHECK:STDOUT: !43 = !DILocation(line: 20, column: 3, scope: !41) +// CHECK:STDOUT: !44 = !{!42} +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !12, line: 23, type: !18, spFlags: DISPFlagDefinition, unit: !13) +// CHECK:STDOUT: !46 = !DILocation(line: 24, column: 3, scope: !45) +// CHECK:STDOUT: !47 = !DILocation(line: 24, column: 14, scope: !45) +// CHECK:STDOUT: !48 = !DILocation(line: 24, column: 23, scope: !45) +// CHECK:STDOUT: !50 = !DILocation(line: 23, column: 1, scope: !45) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ff24853a526ad6af", scope: null, file: !4, line: 32, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !57) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !14) +// CHECK:STDOUT: !55 = !DILocation(line: 34, column: 5, scope: !51) +// CHECK:STDOUT: !56 = !DILocation(line: 32, column: 1, scope: !51) +// CHECK:STDOUT: !57 = !{!52} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2d682b12c0c20e08", scope: null, file: !4, line: 32, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !64) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !14) +// CHECK:STDOUT: !63 = !DILocation(line: 32, column: 1, scope: !58) +// CHECK:STDOUT: !64 = !{!59} +// CHECK:STDOUT: !65 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !66 = !{!"omnipotent char", !65, i64 0} +// CHECK:STDOUT: !67 = !{!"any pointer", !66, i64 0} +// CHECK:STDOUT: !68 = !{!"p1 _ZTS1X", !67, i64 0} +// CHECK:STDOUT: !69 = !{!68, !68, i64 0} +// CHECK:STDOUT: !70 = !{!"vtable pointer", !65, i64 0} +// CHECK:STDOUT: !71 = !{!70, !70, i64 0} +// CHECK:STDOUT: !72 = !{!"p1 _ZTSN6Carbon4Main1ZE", !67, i64 0} +// CHECK:STDOUT: !73 = !{!72, !72, i64 0} +// CHECK:STDOUT: !76 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !77 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !78 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !79 = !{!"int", !66, i64 0} +// CHECK:STDOUT: !80 = !{!"__libc_errno", !79, i64 0} +// CHECK:STDOUT: !81 = !{!80, !79, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/enum.carbon b/toolchain/lower/testdata/interop/cpp/enum.carbon index 8c25263c3d57..b844d35be92f 100644 --- a/toolchain/lower/testdata/interop/cpp/enum.carbon +++ b/toolchain/lower/testdata/interop/cpp/enum.carbon @@ -167,36 +167,36 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // CHECK:STDOUT: @int_8 = internal constant i16 8 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPass.Main() #0 !dbg !14 { +// CHECK:STDOUT: define void @_CPass.Main() #0 !dbg !12 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_16.1.temp = alloca i16, align 2, !dbg !15 +// CHECK:STDOUT: %.loc7_16.1.temp = alloca i16, align 2, !dbg !13 // CHECK:STDOUT: %.loc8_16.1.temp = alloca i16, align 2, !dbg !17 // CHECK:STDOUT: %.loc9_16.1.temp = alloca i16, align 2, !dbg !19 // CHECK:STDOUT: %.loc10_16.1.temp = alloca i16, align 2, !dbg !21 // CHECK:STDOUT: %.loc11_18.1.temp = alloca i16, align 2, !dbg !23 // CHECK:STDOUT: %.loc12_18.1.temp = alloca i16, align 2, !dbg !25 // CHECK:STDOUT: %.loc13_18.1.temp = alloca i16, align 2, !dbg !27 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_16.1.temp), !dbg !15 -// CHECK:STDOUT: call void @_ZN1C1FENS_1EE.carbon_thunk._(ptr @int_0), !dbg !16 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr @int_0), !dbg !15 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_16.1.temp), !dbg !13 +// CHECK:STDOUT: call void @_ZN1C1FENS_1EE.carbon_thunk._(ptr @int_0), !dbg !14 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr @int_0), !dbg !13 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc8_16.1.temp), !dbg !17 // CHECK:STDOUT: call void @_ZN1C1FENS_1EE.carbon_thunk._(ptr @int_0), !dbg !18 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr @int_0), !dbg !17 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr @int_0), !dbg !17 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_16.1.temp), !dbg !19 // CHECK:STDOUT: call void @_ZN1C1FENS_1EE.carbon_thunk._(ptr @int_7), !dbg !20 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr @int_7), !dbg !19 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr @int_7), !dbg !19 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc10_16.1.temp), !dbg !21 // CHECK:STDOUT: call void @_ZN1C1FENS_1EE.carbon_thunk._(ptr @int_8), !dbg !22 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr @int_8), !dbg !21 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr @int_8), !dbg !21 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_18.1.temp), !dbg !23 // CHECK:STDOUT: call void @_ZN1C1FENS_1EE.carbon_thunk._(ptr @int_0), !dbg !24 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr @int_0), !dbg !23 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr @int_0), !dbg !23 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_18.1.temp), !dbg !25 // CHECK:STDOUT: call void @_ZN1C1FENS_1EE.carbon_thunk._(ptr @int_7), !dbg !26 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr @int_7), !dbg !25 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr @int_7), !dbg !25 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_18.1.temp), !dbg !27 // CHECK:STDOUT: call void @_ZN1C1FENS_1EE.carbon_thunk._(ptr @int_8), !dbg !28 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr @int_8), !dbg !27 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr @int_8), !dbg !27 // CHECK:STDOUT: ret void, !dbg !29 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -204,28 +204,27 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // CHECK:STDOUT: define internal void @_ZN1C1FENS_1EE.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 !37 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !37 -// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !39 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !41 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !41 +// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !43 // CHECK:STDOUT: call void @_ZN1C1FENS_1EE(i16 noundef signext %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4f81cc432cb50e07: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: 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 void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr %t) #0 !dbg !31 { +// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZN1C1FENS_1EE(i16 noundef signext) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_ZN1C1FENS_1EE.carbon_thunk._, { 6, 5, 4, 3, 2, 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core", { 6, 5, 4, 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.dd9c146f84d40ff5, { 6, 5, 4, 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -233,8 +232,8 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // 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 = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!40, !41, !42, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!45} +// CHECK:STDOUT: !llvm.module.flags = !{!44, !45, !46, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!49} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -243,40 +242,41 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !{null} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !12 = !{null, !6} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Pass", linkageName: "_CPass.Main", scope: null, file: !4, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !15 = !DILocation(line: 7, column: 11, scope: !14) -// CHECK:STDOUT: !16 = !DILocation(line: 7, column: 3, scope: !14) -// CHECK:STDOUT: !17 = !DILocation(line: 8, column: 11, scope: !14) -// CHECK:STDOUT: !18 = !DILocation(line: 8, column: 3, scope: !14) -// CHECK:STDOUT: !19 = !DILocation(line: 9, column: 11, scope: !14) -// CHECK:STDOUT: !20 = !DILocation(line: 9, column: 3, scope: !14) -// CHECK:STDOUT: !21 = !DILocation(line: 10, column: 11, scope: !14) -// CHECK:STDOUT: !22 = !DILocation(line: 10, column: 3, scope: !14) -// CHECK:STDOUT: !23 = !DILocation(line: 11, column: 11, scope: !14) -// CHECK:STDOUT: !24 = !DILocation(line: 11, column: 3, scope: !14) -// CHECK:STDOUT: !25 = !DILocation(line: 12, column: 11, scope: !14) -// CHECK:STDOUT: !26 = !DILocation(line: 12, column: 3, scope: !14) -// CHECK:STDOUT: !27 = !DILocation(line: 13, column: 11, scope: !14) -// CHECK:STDOUT: !28 = !DILocation(line: 13, column: 3, scope: !14) -// CHECK:STDOUT: !29 = !DILocation(line: 6, column: 1, scope: !14) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core", scope: null, file: !4, line: 7, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) -// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !6) -// CHECK:STDOUT: !32 = !DILocation(line: 7, column: 11, scope: !30) -// CHECK:STDOUT: !33 = !{!31} -// CHECK:STDOUT: !34 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !35 = !{!"omnipotent char", !34, i64 0} -// CHECK:STDOUT: !36 = !{!"any pointer", !35, i64 0} -// CHECK:STDOUT: !37 = !{!36, !36, i64 0} -// CHECK:STDOUT: !38 = !{!"_ZTSN1C1EE", !35, i64 0} -// CHECK:STDOUT: !39 = !{!38, !38, i64 0} -// CHECK:STDOUT: !40 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !41 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !42 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !43 = !{!"int", !35, i64 0} -// CHECK:STDOUT: !44 = !{!"__libc_errno", !43, i64 0} -// CHECK:STDOUT: !45 = !{!44, !43, i64 0} +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Pass", linkageName: "_CPass.Main", scope: null, file: !4, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !13 = !DILocation(line: 7, column: 11, scope: !12) +// CHECK:STDOUT: !14 = !DILocation(line: 7, column: 3, scope: !12) +// CHECK:STDOUT: !15 = !{null, !6} +// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) +// CHECK:STDOUT: !17 = !DILocation(line: 8, column: 11, scope: !12) +// CHECK:STDOUT: !18 = !DILocation(line: 8, column: 3, scope: !12) +// CHECK:STDOUT: !19 = !DILocation(line: 9, column: 11, scope: !12) +// CHECK:STDOUT: !20 = !DILocation(line: 9, column: 3, scope: !12) +// CHECK:STDOUT: !21 = !DILocation(line: 10, column: 11, scope: !12) +// CHECK:STDOUT: !22 = !DILocation(line: 10, column: 3, scope: !12) +// CHECK:STDOUT: !23 = !DILocation(line: 11, column: 11, scope: !12) +// CHECK:STDOUT: !24 = !DILocation(line: 11, column: 3, scope: !12) +// CHECK:STDOUT: !25 = !DILocation(line: 12, column: 11, scope: !12) +// CHECK:STDOUT: !26 = !DILocation(line: 12, column: 3, scope: !12) +// CHECK:STDOUT: !27 = !DILocation(line: 13, column: 11, scope: !12) +// CHECK:STDOUT: !28 = !DILocation(line: 13, column: 3, scope: !12) +// CHECK:STDOUT: !29 = !DILocation(line: 6, column: 1, scope: !12) +// CHECK:STDOUT: !30 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.dd9c146f84d40ff5", scope: null, file: !30, line: 36, type: !16, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !37) +// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !6) +// CHECK:STDOUT: !36 = !DILocation(line: 36, column: 1, scope: !31) +// CHECK:STDOUT: !37 = !{!32} +// CHECK:STDOUT: !38 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !39 = !{!"omnipotent char", !38, i64 0} +// CHECK:STDOUT: !40 = !{!"any pointer", !39, i64 0} +// CHECK:STDOUT: !41 = !{!40, !40, i64 0} +// CHECK:STDOUT: !42 = !{!"_ZTSN1C1EE", !39, i64 0} +// CHECK:STDOUT: !43 = !{!42, !42, i64 0} +// CHECK:STDOUT: !44 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !45 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !46 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !47 = !{!"int", !39, i64 0} +// CHECK:STDOUT: !48 = !{!"__libc_errno", !47, i64 0} +// CHECK:STDOUT: !49 = !{!48, !47, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'convert.carbon' @@ -287,50 +287,49 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // CHECK:STDOUT: declare void @_CTakeI16.Main(i16) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassEnum.Main() #0 !dbg !48 { +// CHECK:STDOUT: define void @_CPassEnum.Main() #0 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CTakeI16.Main(i16 7), !dbg !49 -// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: call void @_CTakeI16.Main(i16 7), !dbg !53 +// CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CConvertEnumToI16.Main(i16 %e) #0 !dbg !51 { +// CHECK:STDOUT: define void @_CConvertEnumToI16.Main(i16 %e) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CTakeI16.Main(i16 %e), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: call void @_CTakeI16.Main(i16 %e), !dbg !59 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CConvertI16ToEnum.Main(i16 %n) #0 !dbg !58 { +// CHECK:STDOUT: define void @_CConvertI16ToEnum.Main(i16 %n) #0 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_13.3.temp = alloca i16, align 2, !dbg !61 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_13.3.temp), !dbg !61 -// CHECK:STDOUT: store i16 %n, ptr %.loc17_13.3.temp, align 2, !dbg !61 -// CHECK:STDOUT: call void @_ZN1C1FENS_1EE.carbon_thunk._(ptr %.loc17_13.3.temp), !dbg !62 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr %.loc17_13.3.temp), !dbg !61 -// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: %.loc17_13.3.temp = alloca i16, align 2, !dbg !65 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_13.3.temp), !dbg !65 +// CHECK:STDOUT: store i16 %n, ptr %.loc17_13.3.temp, align 2, !dbg !65 +// CHECK:STDOUT: call void @_ZN1C1FENS_1EE.carbon_thunk._(ptr %.loc17_13.3.temp), !dbg !66 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr %.loc17_13.3.temp), !dbg !65 +// CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_ZN1C1FENS_1EE.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 !37 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !37 -// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !39 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !41 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !41 +// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !43 // CHECK:STDOUT: call void @_ZN1C1FENS_1EE(i16 noundef signext %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4f81cc432cb50e07: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: 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 void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr %t) #0 !dbg !69 { +// CHECK:STDOUT: ret void, !dbg !74 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZN1C1FENS_1EE(i16 noundef signext) #3 // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } @@ -338,49 +337,50 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // 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 = !{!47} -// CHECK:STDOUT: !llvm.module.flags = !{!40, !41, !42, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!45} +// CHECK:STDOUT: !llvm.dbg.cu = !{!51} +// CHECK:STDOUT: !llvm.module.flags = !{!44, !45, !46, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!49} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !{null} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !12 = !{null, !6} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !34 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !35 = !{!"omnipotent char", !34, i64 0} -// CHECK:STDOUT: !36 = !{!"any pointer", !35, i64 0} -// CHECK:STDOUT: !37 = !{!36, !36, i64 0} -// CHECK:STDOUT: !38 = !{!"_ZTSN1C1EE", !35, i64 0} -// CHECK:STDOUT: !39 = !{!38, !38, i64 0} -// CHECK:STDOUT: !40 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !41 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !42 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !43 = !{!"int", !35, i64 0} -// CHECK:STDOUT: !44 = !{!"__libc_errno", !43, i64 0} -// CHECK:STDOUT: !45 = !{!44, !43, i64 0} -// CHECK:STDOUT: !46 = !DIFile(filename: "convert.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 = distinct !DISubprogram(name: "PassEnum", linkageName: "_CPassEnum.Main", scope: null, file: !46, line: 8, type: !8, spFlags: DISPFlagDefinition, unit: !47) -// CHECK:STDOUT: !49 = !DILocation(line: 9, column: 3, scope: !48) -// CHECK:STDOUT: !50 = !DILocation(line: 8, column: 1, scope: !48) -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "ConvertEnumToI16", linkageName: "_CConvertEnumToI16.Main", scope: null, file: !46, line: 12, type: !13, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !57) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !6) -// CHECK:STDOUT: !55 = !DILocation(line: 13, column: 3, scope: !51) -// CHECK:STDOUT: !56 = !DILocation(line: 12, column: 1, scope: !51) -// CHECK:STDOUT: !57 = !{!52} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "ConvertI16ToEnum", linkageName: "_CConvertI16ToEnum.Main", scope: null, file: !46, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !64) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !6) -// CHECK:STDOUT: !61 = !DILocation(line: 17, column: 11, scope: !58) -// CHECK:STDOUT: !62 = !DILocation(line: 17, column: 3, scope: !58) -// CHECK:STDOUT: !63 = !DILocation(line: 16, column: 1, scope: !58) -// CHECK:STDOUT: !64 = !{!59} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core", scope: null, file: !46, line: 17, type: !13, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !68) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !6) -// CHECK:STDOUT: !67 = !DILocation(line: 17, column: 11, scope: !65) -// CHECK:STDOUT: !68 = !{!66} +// CHECK:STDOUT: !15 = !{null, !6} +// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) +// CHECK:STDOUT: !30 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !38 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !39 = !{!"omnipotent char", !38, i64 0} +// CHECK:STDOUT: !40 = !{!"any pointer", !39, i64 0} +// CHECK:STDOUT: !41 = !{!40, !40, i64 0} +// CHECK:STDOUT: !42 = !{!"_ZTSN1C1EE", !39, i64 0} +// CHECK:STDOUT: !43 = !{!42, !42, i64 0} +// CHECK:STDOUT: !44 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !45 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !46 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !47 = !{!"int", !39, i64 0} +// CHECK:STDOUT: !48 = !{!"__libc_errno", !47, i64 0} +// CHECK:STDOUT: !49 = !{!48, !47, i64 0} +// CHECK:STDOUT: !50 = !DIFile(filename: "convert.carbon", directory: "") +// CHECK:STDOUT: !51 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !50, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "PassEnum", linkageName: "_CPassEnum.Main", scope: null, file: !50, line: 8, type: !8, spFlags: DISPFlagDefinition, unit: !51) +// CHECK:STDOUT: !53 = !DILocation(line: 9, column: 3, scope: !52) +// CHECK:STDOUT: !54 = !DILocation(line: 8, column: 1, scope: !52) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "ConvertEnumToI16", linkageName: "_CConvertEnumToI16.Main", scope: null, file: !50, line: 12, type: !16, spFlags: DISPFlagDefinition, unit: !51, retainedNodes: !61) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !6) +// CHECK:STDOUT: !59 = !DILocation(line: 13, column: 3, scope: !55) +// CHECK:STDOUT: !60 = !DILocation(line: 12, column: 1, scope: !55) +// CHECK:STDOUT: !61 = !{!56} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "ConvertI16ToEnum", linkageName: "_CConvertI16ToEnum.Main", scope: null, file: !50, line: 16, type: !16, spFlags: DISPFlagDefinition, unit: !51, retainedNodes: !68) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !6) +// CHECK:STDOUT: !65 = !DILocation(line: 17, column: 11, scope: !62) +// CHECK:STDOUT: !66 = !DILocation(line: 17, column: 3, scope: !62) +// CHECK:STDOUT: !67 = !DILocation(line: 16, column: 1, scope: !62) +// CHECK:STDOUT: !68 = !{!63} +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.dd9c146f84d40ff5", scope: null, file: !30, line: 36, type: !16, spFlags: DISPFlagDefinition, unit: !51, retainedNodes: !75) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !6) +// CHECK:STDOUT: !74 = !DILocation(line: 36, column: 1, scope: !69) +// CHECK:STDOUT: !75 = !{!70} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_bitmask.carbon' @@ -389,29 +389,29 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCompileTime.Main() #0 !dbg !76 { +// CHECK:STDOUT: define void @_CCompileTime.Main() #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z4Take4Bits(i32 0), !dbg !77 -// CHECK:STDOUT: call void @_Z4Take4Bits(i32 5), !dbg !78 -// CHECK:STDOUT: call void @_Z4Take4Bits(i32 5), !dbg !79 -// CHECK:STDOUT: call void @_Z4Take4Bits(i32 -2), !dbg !80 -// CHECK:STDOUT: ret void, !dbg !81 +// CHECK:STDOUT: call void @_Z4Take4Bits(i32 0), !dbg !84 +// CHECK:STDOUT: call void @_Z4Take4Bits(i32 5), !dbg !85 +// CHECK:STDOUT: call void @_Z4Take4Bits(i32 5), !dbg !86 +// CHECK:STDOUT: call void @_Z4Take4Bits(i32 -2), !dbg !87 +// CHECK:STDOUT: ret void, !dbg !88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z4Take4Bits(i32 noundef) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CRuntime.Main(i32 %a, i32 %b) #0 !dbg !82 { +// CHECK:STDOUT: define void @_CRuntime.Main(i32 %a, i32 %b) #0 !dbg !89 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %BitAndWith.WithSelf.Op.call = and i32 %a, %b, !dbg !87 -// CHECK:STDOUT: call void @_Z4Take4Bits(i32 %BitAndWith.WithSelf.Op.call), !dbg !89 -// CHECK:STDOUT: %BitOrWith.WithSelf.Op.call = or i32 %a, %b, !dbg !90 -// CHECK:STDOUT: call void @_Z4Take4Bits(i32 %BitOrWith.WithSelf.Op.call), !dbg !92 -// CHECK:STDOUT: %BitXorWith.WithSelf.Op.call = xor i32 %a, %b, !dbg !93 -// CHECK:STDOUT: call void @_Z4Take4Bits(i32 %BitXorWith.WithSelf.Op.call), !dbg !95 -// CHECK:STDOUT: %BitComplement.WithSelf.Op.call = xor i32 -1, %a, !dbg !97 -// CHECK:STDOUT: call void @_Z4Take4Bits(i32 %BitComplement.WithSelf.Op.call), !dbg !98 -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.call = and i32 %a, %b, !dbg !94 +// CHECK:STDOUT: call void @_Z4Take4Bits(i32 %BitAndWith.WithSelf.Op.call), !dbg !96 +// CHECK:STDOUT: %BitOrWith.WithSelf.Op.call = or i32 %a, %b, !dbg !97 +// CHECK:STDOUT: call void @_Z4Take4Bits(i32 %BitOrWith.WithSelf.Op.call), !dbg !99 +// CHECK:STDOUT: %BitXorWith.WithSelf.Op.call = xor i32 %a, %b, !dbg !100 +// CHECK:STDOUT: call void @_Z4Take4Bits(i32 %BitXorWith.WithSelf.Op.call), !dbg !102 +// CHECK:STDOUT: %BitComplement.WithSelf.Op.call = xor i32 -1, %a, !dbg !104 +// CHECK:STDOUT: call void @_Z4Take4Bits(i32 %BitComplement.WithSelf.Op.call), !dbg !105 +// CHECK:STDOUT: ret void, !dbg !106 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -420,46 +420,46 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // 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 = !{!70} -// CHECK:STDOUT: !llvm.module.flags = !{!40, !41, !42, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!45} +// CHECK:STDOUT: !llvm.dbg.cu = !{!77} +// CHECK:STDOUT: !llvm.module.flags = !{!44, !45, !46, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!49} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !{null} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !34 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !35 = !{!"omnipotent char", !34, i64 0} -// CHECK:STDOUT: !40 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !41 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !42 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !43 = !{!"int", !35, i64 0} -// CHECK:STDOUT: !44 = !{!"__libc_errno", !43, i64 0} -// CHECK:STDOUT: !45 = !{!44, !43, i64 0} -// CHECK:STDOUT: !69 = !DIFile(filename: "use_bitmask.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 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !74 = !{null, !71, !71} -// CHECK:STDOUT: !75 = !DISubroutineType(types: !74) -// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "CompileTime", linkageName: "_CCompileTime.Main", scope: null, file: !69, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !70) -// CHECK:STDOUT: !77 = !DILocation(line: 7, column: 3, scope: !76) -// CHECK:STDOUT: !78 = !DILocation(line: 8, column: 3, scope: !76) -// CHECK:STDOUT: !79 = !DILocation(line: 9, column: 3, scope: !76) -// CHECK:STDOUT: !80 = !DILocation(line: 10, column: 3, scope: !76) -// CHECK:STDOUT: !81 = !DILocation(line: 6, column: 1, scope: !76) -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "Runtime", linkageName: "_CRuntime.Main", scope: null, file: !69, line: 13, type: !75, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !100) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !71) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 2, scope: !82, type: !71) -// CHECK:STDOUT: !87 = !DILocation(line: 14, column: 12, scope: !82) -// CHECK:STDOUT: !89 = !DILocation(line: 14, column: 3, scope: !82) -// CHECK:STDOUT: !90 = !DILocation(line: 15, column: 12, scope: !82) -// CHECK:STDOUT: !92 = !DILocation(line: 15, column: 3, scope: !82) -// CHECK:STDOUT: !93 = !DILocation(line: 16, column: 12, scope: !82) -// CHECK:STDOUT: !95 = !DILocation(line: 16, column: 3, scope: !82) -// CHECK:STDOUT: !97 = !DILocation(line: 20, column: 12, scope: !82) -// CHECK:STDOUT: !98 = !DILocation(line: 20, column: 3, scope: !82) -// CHECK:STDOUT: !99 = !DILocation(line: 13, column: 1, scope: !82) -// CHECK:STDOUT: !100 = !{!83, !84} +// CHECK:STDOUT: !38 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !39 = !{!"omnipotent char", !38, i64 0} +// CHECK:STDOUT: !44 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !45 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !46 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !47 = !{!"int", !39, i64 0} +// CHECK:STDOUT: !48 = !{!"__libc_errno", !47, i64 0} +// CHECK:STDOUT: !49 = !{!48, !47, i64 0} +// CHECK:STDOUT: !76 = !DIFile(filename: "use_bitmask.carbon", directory: "") +// CHECK:STDOUT: !77 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !76, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !78 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !81 = !{null, !78, !78} +// CHECK:STDOUT: !82 = !DISubroutineType(types: !81) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "CompileTime", linkageName: "_CCompileTime.Main", scope: null, file: !76, line: 6, type: !8, spFlags: DISPFlagDefinition, unit: !77) +// CHECK:STDOUT: !84 = !DILocation(line: 7, column: 3, scope: !83) +// CHECK:STDOUT: !85 = !DILocation(line: 8, column: 3, scope: !83) +// CHECK:STDOUT: !86 = !DILocation(line: 9, column: 3, scope: !83) +// CHECK:STDOUT: !87 = !DILocation(line: 10, column: 3, scope: !83) +// CHECK:STDOUT: !88 = !DILocation(line: 6, column: 1, scope: !83) +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Runtime", linkageName: "_CRuntime.Main", scope: null, file: !76, line: 13, type: !82, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !107) +// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !78) +// CHECK:STDOUT: !91 = !DILocalVariable(arg: 2, scope: !89, type: !78) +// CHECK:STDOUT: !94 = !DILocation(line: 14, column: 12, scope: !89) +// CHECK:STDOUT: !96 = !DILocation(line: 14, column: 3, scope: !89) +// CHECK:STDOUT: !97 = !DILocation(line: 15, column: 12, scope: !89) +// CHECK:STDOUT: !99 = !DILocation(line: 15, column: 3, scope: !89) +// CHECK:STDOUT: !100 = !DILocation(line: 16, column: 12, scope: !89) +// CHECK:STDOUT: !102 = !DILocation(line: 16, column: 3, scope: !89) +// CHECK:STDOUT: !104 = !DILocation(line: 20, column: 12, scope: !89) +// CHECK:STDOUT: !105 = !DILocation(line: 20, column: 3, scope: !89) +// CHECK:STDOUT: !106 = !DILocation(line: 13, column: 1, scope: !89) +// CHECK:STDOUT: !107 = !{!90, !91} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'compare.carbon' @@ -468,66 +468,66 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CCompare.Main(i16 %a, i16 %b) #0 !dbg !105 { +// CHECK:STDOUT: define i1 @_CCompare.Main(i16 %a, i16 %b) #0 !dbg !112 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i16 %a, %b, !dbg !112 -// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !114 +// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i16 %a, %b, !dbg !119 +// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !121 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CCallCompareGeneric.Main(i16 %a, i16 %b) #0 !dbg !116 { +// CHECK:STDOUT: define i1 @_CCallCompareGeneric.Main(i16 %a, i16 %b) #0 !dbg !123 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %CompareGeneric.call = call i1 @_CCompareGeneric.Main.04aebd1c4efdc136(i16 %a, i16 %b), !dbg !125 -// CHECK:STDOUT: ret i1 %CompareGeneric.call, !dbg !126 +// CHECK:STDOUT: %CompareGeneric.call = call i1 @_CCompareGeneric.Main.04aebd1c4efdc136(i16 %a, i16 %b), !dbg !132 +// CHECK:STDOUT: ret i1 %CompareGeneric.call, !dbg !133 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CCompareGeneric.Main.04aebd1c4efdc136(i16 %x, i16 %y) #0 !dbg !128 { +// CHECK:STDOUT: define linkonce_odr i1 @_CCompareGeneric.Main.04aebd1c4efdc136(i16 %x, i16 %y) #0 !dbg !135 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %EqWith.WithSelf.Equal.call = icmp eq i16 %x, %y, !dbg !135 -// CHECK:STDOUT: ret i1 %EqWith.WithSelf.Equal.call, !dbg !137 +// CHECK:STDOUT: %EqWith.WithSelf.Equal.call = icmp eq i16 %x, %y, !dbg !142 +// CHECK:STDOUT: ret i1 %EqWith.WithSelf.Equal.call, !dbg !144 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!102} -// CHECK:STDOUT: !llvm.module.flags = !{!40, !41, !42, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!45} +// CHECK:STDOUT: !llvm.dbg.cu = !{!109} +// CHECK:STDOUT: !llvm.module.flags = !{!44, !45, !46, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!49} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) // CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !34 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !35 = !{!"omnipotent char", !34, i64 0} -// CHECK:STDOUT: !40 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !41 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !42 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !43 = !{!"int", !35, i64 0} -// CHECK:STDOUT: !44 = !{!"__libc_errno", !43, i64 0} -// CHECK:STDOUT: !45 = !{!44, !43, i64 0} -// CHECK:STDOUT: !101 = !DIFile(filename: "compare.carbon", directory: "") -// CHECK:STDOUT: !102 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !101, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !103 = !{!9, !6, !6} -// CHECK:STDOUT: !104 = !DISubroutineType(types: !103) -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "Compare", linkageName: "_CCompare.Main", scope: null, file: !101, line: 6, type: !104, spFlags: DISPFlagDefinition, unit: !102, retainedNodes: !115) -// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !6) -// CHECK:STDOUT: !107 = !DILocalVariable(arg: 2, scope: !105, type: !6) -// CHECK:STDOUT: !112 = !DILocation(line: 7, column: 10, scope: !105) -// CHECK:STDOUT: !114 = !DILocation(line: 7, column: 3, scope: !105) -// CHECK:STDOUT: !115 = !{!106, !107} -// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "CallCompareGeneric", linkageName: "_CCallCompareGeneric.Main", scope: null, file: !101, line: 14, type: !104, spFlags: DISPFlagDefinition, unit: !102, retainedNodes: !127) -// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !6) -// CHECK:STDOUT: !118 = !DILocalVariable(arg: 2, scope: !116, type: !6) -// CHECK:STDOUT: !125 = !DILocation(line: 15, column: 10, scope: !116) -// CHECK:STDOUT: !126 = !DILocation(line: 15, column: 3, scope: !116) -// CHECK:STDOUT: !127 = !{!117, !118} -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "CompareGeneric", linkageName: "_CCompareGeneric.Main.04aebd1c4efdc136", scope: null, file: !101, line: 10, type: !104, spFlags: DISPFlagDefinition, unit: !102, retainedNodes: !138) -// 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: 11, column: 10, scope: !128) -// CHECK:STDOUT: !137 = !DILocation(line: 11, column: 3, scope: !128) -// CHECK:STDOUT: !138 = !{!129, !130} +// CHECK:STDOUT: !38 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !39 = !{!"omnipotent char", !38, i64 0} +// CHECK:STDOUT: !44 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !45 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !46 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !47 = !{!"int", !39, i64 0} +// CHECK:STDOUT: !48 = !{!"__libc_errno", !47, i64 0} +// CHECK:STDOUT: !49 = !{!48, !47, i64 0} +// CHECK:STDOUT: !108 = !DIFile(filename: "compare.carbon", directory: "") +// CHECK:STDOUT: !109 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !108, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !110 = !{!9, !6, !6} +// CHECK:STDOUT: !111 = !DISubroutineType(types: !110) +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "Compare", linkageName: "_CCompare.Main", scope: null, file: !108, line: 6, type: !111, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !122) +// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !6) +// CHECK:STDOUT: !114 = !DILocalVariable(arg: 2, scope: !112, type: !6) +// CHECK:STDOUT: !119 = !DILocation(line: 7, column: 10, scope: !112) +// CHECK:STDOUT: !121 = !DILocation(line: 7, column: 3, scope: !112) +// CHECK:STDOUT: !122 = !{!113, !114} +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "CallCompareGeneric", linkageName: "_CCallCompareGeneric.Main", scope: null, file: !108, line: 14, type: !111, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !134) +// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !6) +// CHECK:STDOUT: !125 = !DILocalVariable(arg: 2, scope: !123, type: !6) +// CHECK:STDOUT: !132 = !DILocation(line: 15, column: 10, scope: !123) +// CHECK:STDOUT: !133 = !DILocation(line: 15, column: 3, scope: !123) +// CHECK:STDOUT: !134 = !{!124, !125} +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "CompareGeneric", linkageName: "_CCompareGeneric.Main.04aebd1c4efdc136", scope: null, file: !108, line: 10, type: !111, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !145) +// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !6) +// CHECK:STDOUT: !137 = !DILocalVariable(arg: 2, scope: !135, type: !6) +// CHECK:STDOUT: !142 = !DILocation(line: 11, column: 10, scope: !135) +// CHECK:STDOUT: !144 = !DILocation(line: 11, column: 3, scope: !135) +// CHECK:STDOUT: !145 = !{!136, !137} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'compare_class.carbon' @@ -536,15 +536,15 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CCompare.Main(i16 %a, ptr %b) #0 !dbg !149 { +// CHECK:STDOUT: define i1 @_CCompare.Main(i16 %a, ptr %b) #0 !dbg !156 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_15.1.temp = alloca i16, align 2, !dbg !157 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_15.1.temp), !dbg !157 -// CHECK:STDOUT: call void @_ZNK13ConvertToEnumcvN1C1EEEv.carbon_thunk._(ptr %b, ptr %.loc18_15.1.temp), !dbg !157 -// CHECK:STDOUT: %.loc18_15.5 = load i16, ptr %.loc18_15.1.temp, align 2, !dbg !157 -// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i16 %a, %.loc18_15.5, !dbg !156 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr %.loc18_15.1.temp), !dbg !157 -// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !158 +// CHECK:STDOUT: %.loc18_15.1.temp = alloca i16, align 2, !dbg !164 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_15.1.temp), !dbg !164 +// CHECK:STDOUT: call void @_ZNK13ConvertToEnumcvN1C1EEEv.carbon_thunk._(ptr %b, ptr %.loc18_15.1.temp), !dbg !164 +// CHECK:STDOUT: %.loc18_15.5 = load i16, ptr %.loc18_15.1.temp, align 2, !dbg !164 +// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i16 %a, %.loc18_15.5, !dbg !163 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr %.loc18_15.1.temp), !dbg !164 +// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !165 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -552,49 +552,43 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !286 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !37 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !37 -// CHECK:STDOUT: %1 = load ptr, ptr %this.addr, align 8, !tbaa !286, !nonnull !288 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !296 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !41 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !41 +// CHECK:STDOUT: %1 = load ptr, ptr %this.addr, align 8, !tbaa !296, !nonnull !298 // CHECK:STDOUT: %call = call noundef signext i16 @_ZNK13ConvertToEnumcvN1C1EEEv(ptr noundef nonnull align 1 dereferenceable(1) %1) -// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !39 +// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !43 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr %self) #0 !dbg !160 { +// CHECK:STDOUT: define i1 @_CCompare2.Main(i32 %a, ptr %b) #0 !dbg !167 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !162 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CCompare2.Main(i32 %a, ptr %b) #0 !dbg !164 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK13ConvertToEnumcv2E2Ev.carbon_thunk._(ptr %b), !dbg !172 -// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i32 %a, %__carbon_thunk.call, !dbg !171 -// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !173 +// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK13ConvertToEnumcv2E2Ev.carbon_thunk._(ptr %b), !dbg !175 +// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i32 %a, %__carbon_thunk.call, !dbg !174 +// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !176 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal noundef i32 @_ZNK13ConvertToEnumcv2E2Ev.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 !286 -// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !286, !nonnull !288 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !296 +// CHECK:STDOUT: %0 = load ptr, ptr %this.addr, align 8, !tbaa !296, !nonnull !298 // CHECK:STDOUT: %call = call noundef i32 @_ZNK13ConvertToEnumcv2E2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0) // CHECK:STDOUT: ret i32 %call // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CCompare3.Main(i16 %a, ptr %b) #0 !dbg !175 { +// CHECK:STDOUT: define i1 @_CCompare3.Main(i16 %a, ptr %b) #0 !dbg !178 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc26_15.1.temp = alloca i16, align 2, !dbg !183 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_15.1.temp), !dbg !183 -// CHECK:STDOUT: call void @_ZNK14ConvertToEnum2cvN1C1EEEv.carbon_thunk._(ptr %b, ptr %.loc26_15.1.temp), !dbg !183 -// CHECK:STDOUT: %.loc26_15.5 = load i16, ptr %.loc26_15.1.temp, align 2, !dbg !183 -// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i16 %a, %.loc26_15.5, !dbg !182 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr %.loc26_15.1.temp), !dbg !183 -// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !184 +// CHECK:STDOUT: %.loc26_15.1.temp = alloca i16, align 2, !dbg !186 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_15.1.temp), !dbg !186 +// CHECK:STDOUT: call void @_ZNK14ConvertToEnum2cvN1C1EEEv.carbon_thunk._(ptr %b, ptr %.loc26_15.1.temp), !dbg !186 +// CHECK:STDOUT: %.loc26_15.5 = load i16, ptr %.loc26_15.1.temp, align 2, !dbg !186 +// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i16 %a, %.loc26_15.5, !dbg !185 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr %.loc26_15.1.temp), !dbg !186 +// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !187 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -602,122 +596,127 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !290 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !37 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !37 -// CHECK:STDOUT: %1 = load ptr, ptr %this.addr, align 8, !tbaa !290, !nonnull !288 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !300 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !41 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !41 +// CHECK:STDOUT: %1 = load ptr, ptr %this.addr, align 8, !tbaa !300, !nonnull !298 // CHECK:STDOUT: %call = call noundef signext i16 @_ZNK14ConvertToEnum2cvN1C1EEEv(ptr noundef nonnull align 1 dereferenceable(1) %1) -// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !39 +// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !43 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CCallCompareGeneric.Main(i16 %a, ptr %b) #0 !dbg !186 { +// CHECK:STDOUT: define i1 @_CCallCompareGeneric.Main(i16 %a, ptr %b) #0 !dbg !189 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %CompareGeneric.call = call i1 @_CCompareGeneric.Main.9f771e4a50bafdbe(i16 %a, ptr %b), !dbg !195 -// CHECK:STDOUT: ret i1 %CompareGeneric.call, !dbg !196 +// CHECK:STDOUT: %CompareGeneric.call = call i1 @_CCompareGeneric.Main.9f771e4a50bafdbe(i16 %a, ptr %b), !dbg !198 +// CHECK:STDOUT: ret i1 %CompareGeneric.call, !dbg !199 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr i1 @"_CEqual:thunk:EqWith.289080fd154ab9ff.Core:OrderedWith.Core"(i16 %self, ptr %other) #2 !dbg !198 { +// CHECK:STDOUT: define weak_odr i1 @"_CEqual:thunk:EqWith.289080fd154ab9ff.Core:OrderedWith.Core"(i16 %self, ptr %other) #2 !dbg !201 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.4.temp = alloca i16, align 2, !dbg !201 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.4.temp), !dbg !201 -// CHECK:STDOUT: call void @_ZNK13ConvertToEnumcvN1C1EEEv.carbon_thunk._(ptr %other, ptr %.4.temp), !dbg !201 -// CHECK:STDOUT: %.8 = load i16, ptr %.4.temp, align 2, !dbg !201 -// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i16 %self, %.8, !dbg !201 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr %.4.temp), !dbg !201 -// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !201 +// CHECK:STDOUT: %.4.temp = alloca i16, align 2, !dbg !204 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.4.temp), !dbg !204 +// CHECK:STDOUT: call void @_ZNK13ConvertToEnumcvN1C1EEEv.carbon_thunk._(ptr %other, ptr %.4.temp), !dbg !204 +// CHECK:STDOUT: %.8 = load i16, ptr %.4.temp, align 2, !dbg !204 +// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i16 %self, %.8, !dbg !204 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr %.4.temp), !dbg !204 +// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !204 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr i1 @"_CNotEqual:thunk:EqWith.289080fd154ab9ff.Core:OrderedWith.Core"(i16 %self, ptr %other) #2 !dbg !203 { +// CHECK:STDOUT: define weak_odr i1 @"_CNotEqual:thunk:EqWith.289080fd154ab9ff.Core:OrderedWith.Core"(i16 %self, ptr %other) #2 !dbg !206 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.4.temp = alloca i16, align 2, !dbg !206 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.4.temp), !dbg !206 -// CHECK:STDOUT: call void @_ZNK13ConvertToEnumcvN1C1EEEv.carbon_thunk._(ptr %other, ptr %.4.temp), !dbg !206 -// CHECK:STDOUT: %.8 = load i16, ptr %.4.temp, align 2, !dbg !206 -// CHECK:STDOUT: %OrderedWith.WithSelf.NotEqual.call = icmp ne i16 %self, %.8, !dbg !206 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr %.4.temp), !dbg !206 -// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.NotEqual.call, !dbg !206 +// CHECK:STDOUT: %.4.temp = alloca i16, align 2, !dbg !209 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.4.temp), !dbg !209 +// CHECK:STDOUT: call void @_ZNK13ConvertToEnumcvN1C1EEEv.carbon_thunk._(ptr %other, ptr %.4.temp), !dbg !209 +// CHECK:STDOUT: %.8 = load i16, ptr %.4.temp, align 2, !dbg !209 +// CHECK:STDOUT: %OrderedWith.WithSelf.NotEqual.call = icmp ne i16 %self, %.8, !dbg !209 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr %.4.temp), !dbg !209 +// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.NotEqual.call, !dbg !209 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CCallCompareGeneric2.Main(i32 %a, ptr %b) #0 !dbg !208 { +// CHECK:STDOUT: define i1 @_CCallCompareGeneric2.Main(i32 %a, ptr %b) #0 !dbg !211 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %CompareGeneric.call = call i1 @_CCompareGeneric.Main.1619d5a761aa4053(i32 %a, ptr %b), !dbg !217 -// CHECK:STDOUT: ret i1 %CompareGeneric.call, !dbg !218 +// CHECK:STDOUT: %CompareGeneric.call = call i1 @_CCompareGeneric.Main.1619d5a761aa4053(i32 %a, ptr %b), !dbg !220 +// CHECK:STDOUT: ret i1 %CompareGeneric.call, !dbg !221 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr i1 @"_CEqual:thunk:EqWith.5bf19682558af6f0.Core:OrderedWith.Core"(i32 %self, ptr %other) #2 !dbg !220 { +// CHECK:STDOUT: define weak_odr i1 @"_CEqual:thunk:EqWith.5bf19682558af6f0.Core:OrderedWith.Core"(i32 %self, ptr %other) #2 !dbg !223 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK13ConvertToEnumcv2E2Ev.carbon_thunk._(ptr %other), !dbg !223 -// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i32 %self, %__carbon_thunk.call, !dbg !223 -// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !223 +// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK13ConvertToEnumcv2E2Ev.carbon_thunk._(ptr %other), !dbg !226 +// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i32 %self, %__carbon_thunk.call, !dbg !226 +// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !226 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr i1 @"_CNotEqual:thunk:EqWith.5bf19682558af6f0.Core:OrderedWith.Core"(i32 %self, ptr %other) #2 !dbg !225 { +// CHECK:STDOUT: define weak_odr i1 @"_CNotEqual:thunk:EqWith.5bf19682558af6f0.Core:OrderedWith.Core"(i32 %self, ptr %other) #2 !dbg !228 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK13ConvertToEnumcv2E2Ev.carbon_thunk._(ptr %other), !dbg !228 -// CHECK:STDOUT: %OrderedWith.WithSelf.NotEqual.call = icmp ne i32 %self, %__carbon_thunk.call, !dbg !228 -// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.NotEqual.call, !dbg !228 +// CHECK:STDOUT: %__carbon_thunk.call = call i32 @_ZNK13ConvertToEnumcv2E2Ev.carbon_thunk._(ptr %other), !dbg !231 +// CHECK:STDOUT: %OrderedWith.WithSelf.NotEqual.call = icmp ne i32 %self, %__carbon_thunk.call, !dbg !231 +// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.NotEqual.call, !dbg !231 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i1 @_CCallCompareGeneric3.Main(i16 %a, ptr %b) #0 !dbg !230 { +// CHECK:STDOUT: define i1 @_CCallCompareGeneric3.Main(i16 %a, ptr %b) #0 !dbg !233 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %CompareGeneric.call = call i1 @_CCompareGeneric.Main.f7138dbf4790e4b2(i16 %a, ptr %b), !dbg !239 -// CHECK:STDOUT: ret i1 %CompareGeneric.call, !dbg !240 +// CHECK:STDOUT: %CompareGeneric.call = call i1 @_CCompareGeneric.Main.f7138dbf4790e4b2(i16 %a, ptr %b), !dbg !242 +// CHECK:STDOUT: ret i1 %CompareGeneric.call, !dbg !243 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr i1 @"_CEqual:thunk:EqWith.c237d0a9ef4b3a29.Core:OrderedWith.Core"(i16 %self, ptr %other) #2 !dbg !242 { +// CHECK:STDOUT: define weak_odr i1 @"_CEqual:thunk:EqWith.c237d0a9ef4b3a29.Core:OrderedWith.Core"(i16 %self, ptr %other) #2 !dbg !245 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.4.temp = alloca i16, align 2, !dbg !245 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.4.temp), !dbg !245 -// CHECK:STDOUT: call void @_ZNK14ConvertToEnum2cvN1C1EEEv.carbon_thunk._(ptr %other, ptr %.4.temp), !dbg !245 -// CHECK:STDOUT: %.8 = load i16, ptr %.4.temp, align 2, !dbg !245 -// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i16 %self, %.8, !dbg !245 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr %.4.temp), !dbg !245 -// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !245 +// CHECK:STDOUT: %.4.temp = alloca i16, align 2, !dbg !248 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.4.temp), !dbg !248 +// CHECK:STDOUT: call void @_ZNK14ConvertToEnum2cvN1C1EEEv.carbon_thunk._(ptr %other, ptr %.4.temp), !dbg !248 +// CHECK:STDOUT: %.8 = load i16, ptr %.4.temp, align 2, !dbg !248 +// CHECK:STDOUT: %OrderedWith.WithSelf.Equal.call = icmp eq i16 %self, %.8, !dbg !248 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr %.4.temp), !dbg !248 +// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.Equal.call, !dbg !248 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr i1 @"_CNotEqual:thunk:EqWith.c237d0a9ef4b3a29.Core:OrderedWith.Core"(i16 %self, ptr %other) #2 !dbg !247 { +// CHECK:STDOUT: define weak_odr i1 @"_CNotEqual:thunk:EqWith.c237d0a9ef4b3a29.Core:OrderedWith.Core"(i16 %self, ptr %other) #2 !dbg !250 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.4.temp = alloca i16, align 2, !dbg !250 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.4.temp), !dbg !250 -// CHECK:STDOUT: call void @_ZNK14ConvertToEnum2cvN1C1EEEv.carbon_thunk._(ptr %other, ptr %.4.temp), !dbg !250 -// CHECK:STDOUT: %.8 = load i16, ptr %.4.temp, align 2, !dbg !250 -// CHECK:STDOUT: %OrderedWith.WithSelf.NotEqual.call = icmp ne i16 %self, %.8, !dbg !250 -// CHECK:STDOUT: call void @"_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core"(ptr %.4.temp), !dbg !250 -// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.NotEqual.call, !dbg !250 +// CHECK:STDOUT: %.4.temp = alloca i16, align 2, !dbg !253 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.4.temp), !dbg !253 +// CHECK:STDOUT: call void @_ZNK14ConvertToEnum2cvN1C1EEEv.carbon_thunk._(ptr %other, ptr %.4.temp), !dbg !253 +// CHECK:STDOUT: %.8 = load i16, ptr %.4.temp, align 2, !dbg !253 +// CHECK:STDOUT: %OrderedWith.WithSelf.NotEqual.call = icmp ne i16 %self, %.8, !dbg !253 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr %.4.temp), !dbg !253 +// CHECK:STDOUT: ret i1 %OrderedWith.WithSelf.NotEqual.call, !dbg !253 // 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 i1 @_CCompareGeneric.Main.9f771e4a50bafdbe(i16 %x, ptr %y) #0 !dbg !252 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %EqWith.WithSelf.Equal.call = call i1 @"_CEqual:thunk:EqWith.289080fd154ab9ff.Core:OrderedWith.Core"(i16 %x, ptr %y), !dbg !259 -// CHECK:STDOUT: ret i1 %EqWith.WithSelf.Equal.call, !dbg !261 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.dd9c146f84d40ff5(ptr %t) #0 !dbg !255 { +// CHECK:STDOUT: ret void, !dbg !260 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CCompareGeneric.Main.1619d5a761aa4053(i32 %x, ptr %y) #0 !dbg !263 { +// CHECK:STDOUT: define linkonce_odr i1 @_CCompareGeneric.Main.9f771e4a50bafdbe(i16 %x, ptr %y) #0 !dbg !262 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %EqWith.WithSelf.Equal.call = call i1 @"_CEqual:thunk:EqWith.5bf19682558af6f0.Core:OrderedWith.Core"(i32 %x, ptr %y), !dbg !270 -// CHECK:STDOUT: ret i1 %EqWith.WithSelf.Equal.call, !dbg !272 +// CHECK:STDOUT: %EqWith.WithSelf.Equal.call = call i1 @"_CEqual:thunk:EqWith.289080fd154ab9ff.Core:OrderedWith.Core"(i16 %x, ptr %y), !dbg !269 +// CHECK:STDOUT: ret i1 %EqWith.WithSelf.Equal.call, !dbg !271 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CCompareGeneric.Main.f7138dbf4790e4b2(i16 %x, ptr %y) #0 !dbg !274 { +// CHECK:STDOUT: define linkonce_odr i1 @_CCompareGeneric.Main.1619d5a761aa4053(i32 %x, ptr %y) #0 !dbg !273 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %EqWith.WithSelf.Equal.call = call i1 @"_CEqual:thunk:EqWith.c237d0a9ef4b3a29.Core:OrderedWith.Core"(i16 %x, ptr %y), !dbg !281 -// CHECK:STDOUT: ret i1 %EqWith.WithSelf.Equal.call, !dbg !283 +// CHECK:STDOUT: %EqWith.WithSelf.Equal.call = call i1 @"_CEqual:thunk:EqWith.5bf19682558af6f0.Core:OrderedWith.Core"(i32 %x, ptr %y), !dbg !280 +// CHECK:STDOUT: ret i1 %EqWith.WithSelf.Equal.call, !dbg !282 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i1 @_CCompareGeneric.Main.f7138dbf4790e4b2(i16 %x, ptr %y) #0 !dbg !284 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %EqWith.WithSelf.Equal.call = call i1 @"_CEqual:thunk:EqWith.c237d0a9ef4b3a29.Core:OrderedWith.Core"(i16 %x, ptr %y), !dbg !291 +// CHECK:STDOUT: ret i1 %EqWith.WithSelf.Equal.call, !dbg !293 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef signext i16 @_ZNK13ConvertToEnumcvN1C1EEEv(ptr noundef nonnull align 1 dereferenceable(1)) #4 @@ -728,6 +727,7 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.dd9c146f84d40ff5, { 5, 4, 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -735,129 +735,130 @@ fn CallCompareGeneric3(a: Cpp.C.E, b: Cpp.ConvertToEnum2) -> bool { // 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 = !{!140} -// CHECK:STDOUT: !llvm.module.flags = !{!40, !41, !42, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!45} +// CHECK:STDOUT: !llvm.dbg.cu = !{!147} +// CHECK:STDOUT: !llvm.module.flags = !{!44, !45, !46, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!49} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed) // CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !12 = !{null, !6} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !34 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !35 = !{!"omnipotent char", !34, i64 0} -// CHECK:STDOUT: !36 = !{!"any pointer", !35, i64 0} -// CHECK:STDOUT: !37 = !{!36, !36, i64 0} -// CHECK:STDOUT: !38 = !{!"_ZTSN1C1EE", !35, i64 0} -// CHECK:STDOUT: !39 = !{!38, !38, i64 0} -// CHECK:STDOUT: !40 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !41 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !42 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !43 = !{!"int", !35, i64 0} -// CHECK:STDOUT: !44 = !{!"__libc_errno", !43, i64 0} -// CHECK:STDOUT: !45 = !{!44, !43, i64 0} -// CHECK:STDOUT: !71 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) -// CHECK:STDOUT: !139 = !DIFile(filename: "compare_class.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 = !{!9, !6, !9} -// CHECK:STDOUT: !142 = !DISubroutineType(types: !141) -// CHECK:STDOUT: !145 = !{!9, !71, !9} -// CHECK:STDOUT: !146 = !DISubroutineType(types: !145) -// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "Compare", linkageName: "_CCompare.Main", scope: null, file: !139, line: 17, type: !142, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !159) -// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !6) -// CHECK:STDOUT: !151 = !DILocalVariable(arg: 2, scope: !149, type: !9) -// CHECK:STDOUT: !156 = !DILocation(line: 18, column: 10, scope: !149) -// CHECK:STDOUT: !157 = !DILocation(line: 18, column: 15, scope: !149) -// CHECK:STDOUT: !158 = !DILocation(line: 18, column: 3, scope: !149) -// CHECK:STDOUT: !159 = !{!150, !151} -// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4f81cc432cb50e07:core.Destroy.Core", scope: null, file: !139, line: 18, type: !13, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !163) -// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !6) -// CHECK:STDOUT: !162 = !DILocation(line: 18, column: 15, scope: !160) -// CHECK:STDOUT: !163 = !{!161} -// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "Compare2", linkageName: "_CCompare2.Main", scope: null, file: !139, line: 21, type: !146, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !174) -// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !71) -// CHECK:STDOUT: !166 = !DILocalVariable(arg: 2, scope: !164, type: !9) -// CHECK:STDOUT: !171 = !DILocation(line: 22, column: 10, scope: !164) -// CHECK:STDOUT: !172 = !DILocation(line: 22, column: 15, scope: !164) -// CHECK:STDOUT: !173 = !DILocation(line: 22, column: 3, scope: !164) -// CHECK:STDOUT: !174 = !{!165, !166} -// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "Compare3", linkageName: "_CCompare3.Main", scope: null, file: !139, line: 25, type: !142, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !185) -// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !6) -// CHECK:STDOUT: !177 = !DILocalVariable(arg: 2, scope: !175, type: !9) -// CHECK:STDOUT: !182 = !DILocation(line: 26, column: 10, scope: !175) -// CHECK:STDOUT: !183 = !DILocation(line: 26, column: 15, scope: !175) -// CHECK:STDOUT: !184 = !DILocation(line: 26, column: 3, scope: !175) -// CHECK:STDOUT: !185 = !{!176, !177} -// CHECK:STDOUT: !186 = distinct !DISubprogram(name: "CallCompareGeneric", linkageName: "_CCallCompareGeneric.Main", scope: null, file: !139, line: 35, type: !142, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !197) -// CHECK:STDOUT: !187 = !DILocalVariable(arg: 1, scope: !186, type: !6) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 2, scope: !186, type: !9) -// CHECK:STDOUT: !195 = !DILocation(line: 36, column: 10, scope: !186) -// CHECK:STDOUT: !196 = !DILocation(line: 36, column: 3, scope: !186) -// CHECK:STDOUT: !197 = !{!187, !188} -// CHECK:STDOUT: !198 = distinct !DISubprogram(name: "Equal", linkageName: "_CEqual:thunk:EqWith.289080fd154ab9ff.Core:OrderedWith.Core", scope: null, file: !139, type: !142, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !202) -// CHECK:STDOUT: !199 = !DILocalVariable(arg: 1, scope: !198, type: !6) -// CHECK:STDOUT: !200 = !DILocalVariable(arg: 2, scope: !198, type: !9) -// CHECK:STDOUT: !201 = !DILocation(line: 0, scope: !198) -// CHECK:STDOUT: !202 = !{!199, !200} -// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "NotEqual", linkageName: "_CNotEqual:thunk:EqWith.289080fd154ab9ff.Core:OrderedWith.Core", scope: null, file: !139, type: !142, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !207) -// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !6) -// CHECK:STDOUT: !205 = !DILocalVariable(arg: 2, scope: !203, type: !9) -// CHECK:STDOUT: !206 = !DILocation(line: 0, scope: !203) -// CHECK:STDOUT: !207 = !{!204, !205} -// CHECK:STDOUT: !208 = distinct !DISubprogram(name: "CallCompareGeneric2", linkageName: "_CCallCompareGeneric2.Main", scope: null, file: !139, line: 39, type: !146, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !219) -// CHECK:STDOUT: !209 = !DILocalVariable(arg: 1, scope: !208, type: !71) -// CHECK:STDOUT: !210 = !DILocalVariable(arg: 2, scope: !208, type: !9) -// CHECK:STDOUT: !217 = !DILocation(line: 40, column: 10, scope: !208) -// CHECK:STDOUT: !218 = !DILocation(line: 40, column: 3, scope: !208) -// CHECK:STDOUT: !219 = !{!209, !210} -// CHECK:STDOUT: !220 = distinct !DISubprogram(name: "Equal", linkageName: "_CEqual:thunk:EqWith.5bf19682558af6f0.Core:OrderedWith.Core", scope: null, file: !139, type: !146, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !224) -// CHECK:STDOUT: !221 = !DILocalVariable(arg: 1, scope: !220, type: !71) -// CHECK:STDOUT: !222 = !DILocalVariable(arg: 2, scope: !220, type: !9) -// CHECK:STDOUT: !223 = !DILocation(line: 0, scope: !220) -// CHECK:STDOUT: !224 = !{!221, !222} -// CHECK:STDOUT: !225 = distinct !DISubprogram(name: "NotEqual", linkageName: "_CNotEqual:thunk:EqWith.5bf19682558af6f0.Core:OrderedWith.Core", scope: null, file: !139, type: !146, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !229) -// CHECK:STDOUT: !226 = !DILocalVariable(arg: 1, scope: !225, type: !71) -// CHECK:STDOUT: !227 = !DILocalVariable(arg: 2, scope: !225, type: !9) -// CHECK:STDOUT: !228 = !DILocation(line: 0, scope: !225) -// CHECK:STDOUT: !229 = !{!226, !227} -// CHECK:STDOUT: !230 = distinct !DISubprogram(name: "CallCompareGeneric3", linkageName: "_CCallCompareGeneric3.Main", scope: null, file: !139, line: 43, type: !142, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !241) -// CHECK:STDOUT: !231 = !DILocalVariable(arg: 1, scope: !230, type: !6) -// CHECK:STDOUT: !232 = !DILocalVariable(arg: 2, scope: !230, type: !9) -// CHECK:STDOUT: !239 = !DILocation(line: 44, column: 10, scope: !230) -// CHECK:STDOUT: !240 = !DILocation(line: 44, column: 3, scope: !230) -// CHECK:STDOUT: !241 = !{!231, !232} -// CHECK:STDOUT: !242 = distinct !DISubprogram(name: "Equal", linkageName: "_CEqual:thunk:EqWith.c237d0a9ef4b3a29.Core:OrderedWith.Core", scope: null, file: !139, type: !142, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !246) -// CHECK:STDOUT: !243 = !DILocalVariable(arg: 1, scope: !242, type: !6) -// CHECK:STDOUT: !244 = !DILocalVariable(arg: 2, scope: !242, type: !9) -// CHECK:STDOUT: !245 = !DILocation(line: 0, scope: !242) -// CHECK:STDOUT: !246 = !{!243, !244} -// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "NotEqual", linkageName: "_CNotEqual:thunk:EqWith.c237d0a9ef4b3a29.Core:OrderedWith.Core", scope: null, file: !139, type: !142, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !251) -// CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !6) -// CHECK:STDOUT: !249 = !DILocalVariable(arg: 2, scope: !247, type: !9) -// CHECK:STDOUT: !250 = !DILocation(line: 0, scope: !247) -// CHECK:STDOUT: !251 = !{!248, !249} -// CHECK:STDOUT: !252 = distinct !DISubprogram(name: "CompareGeneric", linkageName: "_CCompareGeneric.Main.9f771e4a50bafdbe", scope: null, file: !139, line: 29, type: !142, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !262) -// CHECK:STDOUT: !253 = !DILocalVariable(arg: 1, scope: !252, type: !6) -// CHECK:STDOUT: !254 = !DILocalVariable(arg: 2, scope: !252, type: !9) -// CHECK:STDOUT: !259 = !DILocation(line: 30, column: 10, scope: !252) -// CHECK:STDOUT: !261 = !DILocation(line: 30, column: 3, scope: !252) -// CHECK:STDOUT: !262 = !{!253, !254} -// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "CompareGeneric", linkageName: "_CCompareGeneric.Main.1619d5a761aa4053", scope: null, file: !139, line: 29, type: !146, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !273) -// CHECK:STDOUT: !264 = !DILocalVariable(arg: 1, scope: !263, type: !71) -// CHECK:STDOUT: !265 = !DILocalVariable(arg: 2, scope: !263, type: !9) -// CHECK:STDOUT: !270 = !DILocation(line: 30, column: 10, scope: !263) -// CHECK:STDOUT: !272 = !DILocation(line: 30, column: 3, scope: !263) -// CHECK:STDOUT: !273 = !{!264, !265} -// CHECK:STDOUT: !274 = distinct !DISubprogram(name: "CompareGeneric", linkageName: "_CCompareGeneric.Main.f7138dbf4790e4b2", scope: null, file: !139, line: 29, type: !142, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !284) -// CHECK:STDOUT: !275 = !DILocalVariable(arg: 1, scope: !274, type: !6) -// CHECK:STDOUT: !276 = !DILocalVariable(arg: 2, scope: !274, type: !9) -// CHECK:STDOUT: !281 = !DILocation(line: 30, column: 10, scope: !274) -// CHECK:STDOUT: !283 = !DILocation(line: 30, column: 3, scope: !274) -// CHECK:STDOUT: !284 = !{!275, !276} -// CHECK:STDOUT: !285 = !{!"p1 _ZTS13ConvertToEnum", !36, i64 0} -// CHECK:STDOUT: !286 = !{!285, !285, i64 0} -// CHECK:STDOUT: !288 = !{} -// CHECK:STDOUT: !289 = !{!"p1 _ZTS14ConvertToEnum2", !36, i64 0} -// CHECK:STDOUT: !290 = !{!289, !289, i64 0} +// CHECK:STDOUT: !15 = !{null, !6} +// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) +// CHECK:STDOUT: !30 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !38 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !39 = !{!"omnipotent char", !38, i64 0} +// CHECK:STDOUT: !40 = !{!"any pointer", !39, i64 0} +// CHECK:STDOUT: !41 = !{!40, !40, i64 0} +// CHECK:STDOUT: !42 = !{!"_ZTSN1C1EE", !39, i64 0} +// CHECK:STDOUT: !43 = !{!42, !42, i64 0} +// CHECK:STDOUT: !44 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !45 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !46 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !47 = !{!"int", !39, i64 0} +// CHECK:STDOUT: !48 = !{!"__libc_errno", !47, i64 0} +// CHECK:STDOUT: !49 = !{!48, !47, i64 0} +// CHECK:STDOUT: !78 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !146 = !DIFile(filename: "compare_class.carbon", directory: "") +// CHECK:STDOUT: !147 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !146, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !148 = !{!9, !6, !9} +// CHECK:STDOUT: !149 = !DISubroutineType(types: !148) +// CHECK:STDOUT: !152 = !{!9, !78, !9} +// CHECK:STDOUT: !153 = !DISubroutineType(types: !152) +// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "Compare", linkageName: "_CCompare.Main", scope: null, file: !146, line: 17, type: !149, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !166) +// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !6) +// CHECK:STDOUT: !158 = !DILocalVariable(arg: 2, scope: !156, type: !9) +// CHECK:STDOUT: !163 = !DILocation(line: 18, column: 10, scope: !156) +// CHECK:STDOUT: !164 = !DILocation(line: 18, column: 15, scope: !156) +// CHECK:STDOUT: !165 = !DILocation(line: 18, column: 3, scope: !156) +// CHECK:STDOUT: !166 = !{!157, !158} +// CHECK:STDOUT: !167 = distinct !DISubprogram(name: "Compare2", linkageName: "_CCompare2.Main", scope: null, file: !146, line: 21, type: !153, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !177) +// CHECK:STDOUT: !168 = !DILocalVariable(arg: 1, scope: !167, type: !78) +// CHECK:STDOUT: !169 = !DILocalVariable(arg: 2, scope: !167, type: !9) +// CHECK:STDOUT: !174 = !DILocation(line: 22, column: 10, scope: !167) +// CHECK:STDOUT: !175 = !DILocation(line: 22, column: 15, scope: !167) +// CHECK:STDOUT: !176 = !DILocation(line: 22, column: 3, scope: !167) +// CHECK:STDOUT: !177 = !{!168, !169} +// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "Compare3", linkageName: "_CCompare3.Main", scope: null, file: !146, line: 25, type: !149, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !188) +// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !6) +// CHECK:STDOUT: !180 = !DILocalVariable(arg: 2, scope: !178, type: !9) +// CHECK:STDOUT: !185 = !DILocation(line: 26, column: 10, scope: !178) +// CHECK:STDOUT: !186 = !DILocation(line: 26, column: 15, scope: !178) +// CHECK:STDOUT: !187 = !DILocation(line: 26, column: 3, scope: !178) +// CHECK:STDOUT: !188 = !{!179, !180} +// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "CallCompareGeneric", linkageName: "_CCallCompareGeneric.Main", scope: null, file: !146, line: 35, type: !149, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !200) +// CHECK:STDOUT: !190 = !DILocalVariable(arg: 1, scope: !189, type: !6) +// CHECK:STDOUT: !191 = !DILocalVariable(arg: 2, scope: !189, type: !9) +// CHECK:STDOUT: !198 = !DILocation(line: 36, column: 10, scope: !189) +// CHECK:STDOUT: !199 = !DILocation(line: 36, column: 3, scope: !189) +// CHECK:STDOUT: !200 = !{!190, !191} +// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "Equal", linkageName: "_CEqual:thunk:EqWith.289080fd154ab9ff.Core:OrderedWith.Core", scope: null, file: !146, type: !149, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !205) +// CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !201, type: !6) +// CHECK:STDOUT: !203 = !DILocalVariable(arg: 2, scope: !201, type: !9) +// CHECK:STDOUT: !204 = !DILocation(line: 0, scope: !201) +// CHECK:STDOUT: !205 = !{!202, !203} +// CHECK:STDOUT: !206 = distinct !DISubprogram(name: "NotEqual", linkageName: "_CNotEqual:thunk:EqWith.289080fd154ab9ff.Core:OrderedWith.Core", scope: null, file: !146, type: !149, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !210) +// CHECK:STDOUT: !207 = !DILocalVariable(arg: 1, scope: !206, type: !6) +// CHECK:STDOUT: !208 = !DILocalVariable(arg: 2, scope: !206, type: !9) +// CHECK:STDOUT: !209 = !DILocation(line: 0, scope: !206) +// CHECK:STDOUT: !210 = !{!207, !208} +// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "CallCompareGeneric2", linkageName: "_CCallCompareGeneric2.Main", scope: null, file: !146, line: 39, type: !153, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !222) +// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !78) +// CHECK:STDOUT: !213 = !DILocalVariable(arg: 2, scope: !211, type: !9) +// CHECK:STDOUT: !220 = !DILocation(line: 40, column: 10, scope: !211) +// CHECK:STDOUT: !221 = !DILocation(line: 40, column: 3, scope: !211) +// CHECK:STDOUT: !222 = !{!212, !213} +// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "Equal", linkageName: "_CEqual:thunk:EqWith.5bf19682558af6f0.Core:OrderedWith.Core", scope: null, file: !146, type: !153, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !227) +// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !78) +// CHECK:STDOUT: !225 = !DILocalVariable(arg: 2, scope: !223, type: !9) +// CHECK:STDOUT: !226 = !DILocation(line: 0, scope: !223) +// CHECK:STDOUT: !227 = !{!224, !225} +// CHECK:STDOUT: !228 = distinct !DISubprogram(name: "NotEqual", linkageName: "_CNotEqual:thunk:EqWith.5bf19682558af6f0.Core:OrderedWith.Core", scope: null, file: !146, type: !153, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !232) +// CHECK:STDOUT: !229 = !DILocalVariable(arg: 1, scope: !228, type: !78) +// CHECK:STDOUT: !230 = !DILocalVariable(arg: 2, scope: !228, type: !9) +// CHECK:STDOUT: !231 = !DILocation(line: 0, scope: !228) +// CHECK:STDOUT: !232 = !{!229, !230} +// CHECK:STDOUT: !233 = distinct !DISubprogram(name: "CallCompareGeneric3", linkageName: "_CCallCompareGeneric3.Main", scope: null, file: !146, line: 43, type: !149, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !244) +// CHECK:STDOUT: !234 = !DILocalVariable(arg: 1, scope: !233, type: !6) +// CHECK:STDOUT: !235 = !DILocalVariable(arg: 2, scope: !233, type: !9) +// CHECK:STDOUT: !242 = !DILocation(line: 44, column: 10, scope: !233) +// CHECK:STDOUT: !243 = !DILocation(line: 44, column: 3, scope: !233) +// CHECK:STDOUT: !244 = !{!234, !235} +// CHECK:STDOUT: !245 = distinct !DISubprogram(name: "Equal", linkageName: "_CEqual:thunk:EqWith.c237d0a9ef4b3a29.Core:OrderedWith.Core", scope: null, file: !146, type: !149, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !249) +// CHECK:STDOUT: !246 = !DILocalVariable(arg: 1, scope: !245, type: !6) +// CHECK:STDOUT: !247 = !DILocalVariable(arg: 2, scope: !245, type: !9) +// CHECK:STDOUT: !248 = !DILocation(line: 0, scope: !245) +// CHECK:STDOUT: !249 = !{!246, !247} +// CHECK:STDOUT: !250 = distinct !DISubprogram(name: "NotEqual", linkageName: "_CNotEqual:thunk:EqWith.c237d0a9ef4b3a29.Core:OrderedWith.Core", scope: null, file: !146, type: !149, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !254) +// CHECK:STDOUT: !251 = !DILocalVariable(arg: 1, scope: !250, type: !6) +// CHECK:STDOUT: !252 = !DILocalVariable(arg: 2, scope: !250, type: !9) +// CHECK:STDOUT: !253 = !DILocation(line: 0, scope: !250) +// CHECK:STDOUT: !254 = !{!251, !252} +// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.dd9c146f84d40ff5", scope: null, file: !30, line: 36, type: !16, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !261) +// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !6) +// CHECK:STDOUT: !260 = !DILocation(line: 36, column: 1, scope: !255) +// CHECK:STDOUT: !261 = !{!256} +// CHECK:STDOUT: !262 = distinct !DISubprogram(name: "CompareGeneric", linkageName: "_CCompareGeneric.Main.9f771e4a50bafdbe", scope: null, file: !146, line: 29, type: !149, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !272) +// CHECK:STDOUT: !263 = !DILocalVariable(arg: 1, scope: !262, type: !6) +// CHECK:STDOUT: !264 = !DILocalVariable(arg: 2, scope: !262, type: !9) +// CHECK:STDOUT: !269 = !DILocation(line: 30, column: 10, scope: !262) +// CHECK:STDOUT: !271 = !DILocation(line: 30, column: 3, scope: !262) +// CHECK:STDOUT: !272 = !{!263, !264} +// CHECK:STDOUT: !273 = distinct !DISubprogram(name: "CompareGeneric", linkageName: "_CCompareGeneric.Main.1619d5a761aa4053", scope: null, file: !146, line: 29, type: !153, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !283) +// CHECK:STDOUT: !274 = !DILocalVariable(arg: 1, scope: !273, type: !78) +// CHECK:STDOUT: !275 = !DILocalVariable(arg: 2, scope: !273, type: !9) +// CHECK:STDOUT: !280 = !DILocation(line: 30, column: 10, scope: !273) +// CHECK:STDOUT: !282 = !DILocation(line: 30, column: 3, scope: !273) +// CHECK:STDOUT: !283 = !{!274, !275} +// CHECK:STDOUT: !284 = distinct !DISubprogram(name: "CompareGeneric", linkageName: "_CCompareGeneric.Main.f7138dbf4790e4b2", scope: null, file: !146, line: 29, type: !149, spFlags: DISPFlagDefinition, unit: !147, retainedNodes: !294) +// CHECK:STDOUT: !285 = !DILocalVariable(arg: 1, scope: !284, type: !6) +// CHECK:STDOUT: !286 = !DILocalVariable(arg: 2, scope: !284, type: !9) +// CHECK:STDOUT: !291 = !DILocation(line: 30, column: 10, scope: !284) +// CHECK:STDOUT: !293 = !DILocation(line: 30, column: 3, scope: !284) +// CHECK:STDOUT: !294 = !{!285, !286} +// CHECK:STDOUT: !295 = !{!"p1 _ZTS13ConvertToEnum", !40, i64 0} +// CHECK:STDOUT: !296 = !{!295, !295, i64 0} +// CHECK:STDOUT: !298 = !{} +// CHECK:STDOUT: !299 = !{!"p1 _ZTS14ConvertToEnum2", !40, i64 0} +// CHECK:STDOUT: !300 = !{!299, !299, i64 0} // 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 69100777b268..663101edd84c 100644 --- a/toolchain/lower/testdata/interop/cpp/function/export/constructor.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/export/constructor.carbon @@ -79,27 +79,20 @@ void f() { // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind // CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.OneArg.Main"(ptr %self) #4 !dbg !15 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.7040ef4e2429d520:core.Destroy.Core"(ptr %self), !dbg !17 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f5db22251d2a7ef4(ptr %self), !dbg !17 // CHECK:STDOUT: ret void, !dbg !17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #5 !dbg !19 { +// CHECK:STDOUT: define void @_COneArg__carbon_thunk.OneArg.Main(ptr %_, ptr %_1) #5 !dbg !19 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !21 +// CHECK:STDOUT: %.loc6_28.2 = load i32, ptr %_1, align 4, !dbg !22 +// CHECK:STDOUT: call void @_COneArg.OneArg.Main(ptr %_, i32 %.loc6_28.2), !dbg !22 +// CHECK:STDOUT: ret void, !dbg !22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// 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 void @_COneArg__carbon_thunk.OneArg.Main(ptr %_, ptr %_1) #5 !dbg !27 { -// CHECK:STDOUT: entry: -// 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: define linkonce_odr void @_CSelfDestruct.Core.f5db22251d2a7ef4(ptr %t) #5 !dbg !25 { // CHECK:STDOUT: ret void, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -128,19 +121,16 @@ void f() { // CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !15, type: !8) // CHECK:STDOUT: !17 = !DILocation(line: 5, column: 1, scope: !15) // CHECK:STDOUT: !18 = !{!16} -// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !5, line: 5, type: !12, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !22) +// CHECK:STDOUT: !19 = 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: !23) // 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: "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: "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 = !DILocalVariable(arg: 2, scope: !27, type: !7) -// CHECK:STDOUT: !30 = !DILocation(line: 6, column: 3, scope: !27) -// CHECK:STDOUT: !31 = !{!28, !29} +// CHECK:STDOUT: !21 = !DILocalVariable(arg: 2, scope: !19, type: !7) +// CHECK:STDOUT: !22 = !DILocation(line: 6, column: 3, scope: !19) +// CHECK:STDOUT: !23 = !{!20, !21} +// CHECK:STDOUT: !24 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f5db22251d2a7ef4", scope: null, file: !24, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !6, retainedNodes: !31) +// CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !8) +// CHECK:STDOUT: !30 = !DILocation(line: 36, column: 1, scope: !25) +// CHECK:STDOUT: !31 = !{!26} // CHECK:STDOUT: !32 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !33 = !{!"omnipotent char", !32, i64 0} // CHECK:STDOUT: !34 = !{!"any pointer", !33, i64 0} diff --git a/toolchain/lower/testdata/interop/cpp/function/export/generic.carbon b/toolchain/lower/testdata/interop/cpp/function/export/generic.carbon index de2b55c89925..7c0ae588321c 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 @_ZN6Carbon4Main1AD2Ev(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 !75 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !83 // 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 @_ZN6Carbon4Main1BD2Ev(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 !77 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !85 // 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 @@ -170,82 +170,74 @@ fn Run() { // CHECK:STDOUT: declare void @llvm.lifetime.end.p0(ptr captures(none)) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CDoit.A.Main:I.Main"(ptr %self) #4 !dbg !18 { +// CHECK:STDOUT: define void @"_CDoit.A.Main:I.Main"(ptr %self) #4 !dbg !24 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !21 +// CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @"_CDoit.B.Main:I.Main"(ptr %self) #4 !dbg !23 { +// CHECK:STDOUT: define void @"_CDoit.B.Main:I.Main"(ptr %self) #4 !dbg !29 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !26 +// CHECK:STDOUT: ret void, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.A.Main"(ptr %self) #5 !dbg !28 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.A.Main"(ptr %self) #5 !dbg !34 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !30 -// CHECK:STDOUT: ret void, !dbg !30 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #4 !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.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #4 !dbg !36 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %self), !dbg !36 +// CHECK:STDOUT: ret void, !dbg !36 // 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 !40 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.B.Main"(ptr %self) #5 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self), !dbg !42 -// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(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 @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #4 !dbg !44 { +// CHECK:STDOUT: define void @_CF__carbon_thunk.26f2099a79512a5d.Main(ptr %_) #4 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !46 +// CHECK:STDOUT: call void @_CF.Main.6662a1ffb773360a(ptr %_), !dbg !44 +// CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF__carbon_thunk.26f2099a79512a5d.Main(ptr %_) #4 !dbg !48 { +// CHECK:STDOUT: define void @_CF__carbon_thunk.7a3b9f04ddf4269e.Main(ptr %_) #4 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.6662a1ffb773360a(ptr %_), !dbg !50 -// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: call void @_CF.Main.d53b17eed3ce903c(ptr %_), !dbg !48 +// CHECK:STDOUT: ret void, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF__carbon_thunk.7a3b9f04ddf4269e.Main(ptr %_) #4 !dbg !52 { +// CHECK:STDOUT: define i32 @main() #4 !dbg !50 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.d53b17eed3ce903c(ptr %_), !dbg !54 -// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: call void @_Z1Gv(), !dbg !51 +// CHECK:STDOUT: ret i32 0, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #4 !dbg !56 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z1Gv(), !dbg !57 -// CHECK:STDOUT: ret i32 0, !dbg !58 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %t) #4 !dbg !53 { +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.6662a1ffb773360a(ptr %t) #4 !dbg !59 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CDoit.A.Main:I.Main"(ptr %t), !dbg !62 -// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %t) #4 !dbg !60 { +// CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.d53b17eed3ce903c(ptr %t) #4 !dbg !65 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.6662a1ffb773360a(ptr %t) #4 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CDoit.B.Main:I.Main"(ptr %t), !dbg !68 -// CHECK:STDOUT: ret void, !dbg !69 +// 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: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -261,80 +253,77 @@ fn Run() { // CHECK:STDOUT: attributes #4 = { nounwind } // CHECK:STDOUT: attributes #5 = { alwaysinline nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!9} -// CHECK:STDOUT: !llvm.module.flags = !{!78, !79, !80, !4, !5} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!83} +// CHECK:STDOUT: !llvm.dbg.cu = !{!15} +// CHECK:STDOUT: !llvm.module.flags = !{!86, !87, !88, !4, !5} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!91} // CHECK:STDOUT: // CHECK:STDOUT: !4 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !5 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !8 = !DIFile(filename: "generic_type_impls_interface.carbon", directory: "") -// CHECK:STDOUT: !9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !8, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !11 = !{null, !10} -// CHECK:STDOUT: !12 = !DISubroutineType(types: !11) -// CHECK:STDOUT: !13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !14 = !{!13} -// CHECK:STDOUT: !15 = !DISubroutineType(types: !14) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Doit", linkageName: "_CDoit.A.Main:I.Main", scope: null, file: !8, line: 10, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !22) -// CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !18, type: !10) -// CHECK:STDOUT: !21 = !DILocation(line: 10, column: 5, scope: !18) -// CHECK:STDOUT: !22 = !{!19} -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Doit", linkageName: "_CDoit.B.Main:I.Main", scope: null, file: !8, line: 15, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !27) -// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !23, type: !10) -// CHECK:STDOUT: !26 = !DILocation(line: 15, column: 5, scope: !23) -// CHECK:STDOUT: !27 = !{!24} -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !8, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !31) -// CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !10) -// CHECK:STDOUT: !30 = !DILocation(line: 8, column: 1, scope: !28) -// CHECK:STDOUT: !31 = !{!29} -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !8, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !9, retainedNodes: !35) -// 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: "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: "__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: 13, column: 1, scope: !40) -// CHECK:STDOUT: !43 = !{!41} -// 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: "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: 19, column: 1, scope: !48) -// CHECK:STDOUT: !51 = !{!49} -// 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: 19, column: 1, scope: !52) -// CHECK:STDOUT: !55 = !{!53} -// 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 _ZTSN6Carbon4Main1AE", !73, i64 0} -// CHECK:STDOUT: !75 = !{!74, !74, i64 0} -// CHECK:STDOUT: !76 = !{!"p1 _ZTSN6Carbon4Main1BE", !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: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") +// CHECK:STDOUT: !14 = !DIFile(filename: "generic_type_impls_interface.carbon", directory: "") +// CHECK:STDOUT: !15 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !14, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !17 = !{null, !16} +// CHECK:STDOUT: !18 = !DISubroutineType(types: !17) +// CHECK:STDOUT: !19 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK:STDOUT: !20 = !{!19} +// CHECK:STDOUT: !21 = !DISubroutineType(types: !20) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "Doit", linkageName: "_CDoit.A.Main:I.Main", scope: null, file: !14, line: 10, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !28) +// CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !24, type: !16) +// CHECK:STDOUT: !27 = !DILocation(line: 10, column: 5, scope: !24) +// CHECK:STDOUT: !28 = !{!25} +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "Doit", linkageName: "_CDoit.B.Main:I.Main", scope: null, file: !14, line: 15, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !33) +// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !16) +// CHECK:STDOUT: !32 = !DILocation(line: 15, column: 5, scope: !29) +// CHECK:STDOUT: !33 = !{!30} +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !14, line: 8, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !37) +// CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !34, type: !16) +// CHECK:STDOUT: !36 = !DILocation(line: 8, column: 1, scope: !34) +// CHECK:STDOUT: !37 = !{!35} +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.B.Main", scope: null, file: !14, line: 13, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !41) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !16) +// CHECK:STDOUT: !40 = !DILocation(line: 13, column: 1, scope: !38) +// CHECK:STDOUT: !41 = !{!39} +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "F__carbon_thunk.26f2099a79512a5d", linkageName: "_CF__carbon_thunk.26f2099a79512a5d.Main", scope: null, file: !14, line: 19, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !45) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !16) +// CHECK:STDOUT: !44 = !DILocation(line: 19, column: 1, scope: !42) +// CHECK:STDOUT: !45 = !{!43} +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F__carbon_thunk.7a3b9f04ddf4269e", linkageName: "_CF__carbon_thunk.7a3b9f04ddf4269e.Main", scope: null, file: !14, line: 19, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !49) +// CHECK:STDOUT: !47 = !DILocalVariable(arg: 1, scope: !46, type: !16) +// CHECK:STDOUT: !48 = !DILocation(line: 19, column: 1, scope: !46) +// CHECK:STDOUT: !49 = !{!47} +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !14, line: 32, type: !21, spFlags: DISPFlagDefinition, unit: !15) +// CHECK:STDOUT: !51 = !DILocation(line: 33, column: 3, scope: !50) +// CHECK:STDOUT: !52 = !DILocation(line: 32, column: 1, scope: !50) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6b8b385dcf82cc70", scope: null, file: !6, line: 32, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !59) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !16) +// CHECK:STDOUT: !58 = !DILocation(line: 32, column: 1, scope: !53) +// CHECK:STDOUT: !59 = !{!54} +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6579a5013ba3dcd2", scope: null, file: !6, line: 32, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !66) +// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !16) +// CHECK:STDOUT: !65 = !DILocation(line: 32, column: 1, scope: !60) +// CHECK:STDOUT: !66 = !{!61} +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6662a1ffb773360a", scope: null, file: !14, line: 19, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !72) +// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !16) +// 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: !14, line: 19, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !78) +// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !16) +// 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 _ZTSN6Carbon4Main1AE", !81, i64 0} +// CHECK:STDOUT: !83 = !{!82, !82, i64 0} +// CHECK:STDOUT: !84 = !{!"p1 _ZTSN6Carbon4Main1BE", !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: 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 9e99fced6f8e..5362716353f6 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/function_decl.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/function_decl.carbon @@ -412,7 +412,7 @@ fn MyF() -> i32 { // CHECK:STDOUT: %SimpleReturnValue.call = call i32 @_Z17SimpleReturnValueii(i32 3, i32 4), !dbg !80 // CHECK:STDOUT: store i32 %SimpleReturnValue.call, ptr %value.var, align 4, !dbg !79 // CHECK:STDOUT: %.loc14 = load i32, ptr %value.var, align 4, !dbg !81 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %value.var), !dbg !74 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %value.var), !dbg !74 // CHECK:STDOUT: ret i32 %.loc14, !dbg !82 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -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 !87 -// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !87 +// CHECK:STDOUT: store i32 %a, ptr %a.addr, align 4, !tbaa !90 +// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !90 // CHECK:STDOUT: call void @_Z13NoReturnValueii(i32 noundef %0, i32 noundef 2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -446,23 +446,22 @@ 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 !87 -// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !87 +// CHECK:STDOUT: store i32 %a, ptr %a.addr, align 4, !tbaa !90 +// CHECK:STDOUT: %0 = load i32, ptr %a.addr, align 4, !tbaa !90 // CHECK:STDOUT: %call = call noundef i32 @_Z17SimpleReturnValueii(i32 noundef %0, i32 noundef 2) // CHECK:STDOUT: ret i32 %call // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef i32 @_Z17SimpleReturnValueii(i32 noundef, i32 noundef) #2 // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !83 { +// CHECK:STDOUT: ret void, !dbg !88 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_Z13NoReturnValueii, { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @_Z17SimpleReturnValueii, { 2, 1, 0 } @@ -478,6 +477,7 @@ fn MyF() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !25 = !{i32 8, !"PIC Level", i32 2} // CHECK:STDOUT: !26 = !{i32 7, !"PIE Level", i32 2} // CHECK:STDOUT: !27 = !{i32 7, !"uwtable", i32 2} @@ -505,9 +505,9 @@ fn MyF() -> i32 { // CHECK:STDOUT: !80 = !DILocation(line: 13, column: 11, scope: !68) // CHECK:STDOUT: !81 = !DILocation(line: 14, column: 10, scope: !68) // CHECK:STDOUT: !82 = !DILocation(line: 14, column: 3, scope: !68) -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !55, line: 11, type: !61, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !86) +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !61, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !89) // 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 = !{!30, !30, i64 0} +// CHECK:STDOUT: !88 = !DILocation(line: 32, column: 1, scope: !83) +// CHECK:STDOUT: !89 = !{!84} +// CHECK:STDOUT: !90 = !{!30, !30, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/function/import/function_ptr.carbon b/toolchain/lower/testdata/interop/cpp/function/import/function_ptr.carbon index d6b336191b54..a7eb6844ccd6 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/function_ptr.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/function_ptr.carbon @@ -191,7 +191,7 @@ fn F() { // CHECK:STDOUT: %fn_ptr.var = alloca ptr, align 8, !dbg !33 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %fn_ptr.var), !dbg !33 // CHECK:STDOUT: store ptr @_CMyCallback.Main, ptr %fn_ptr.var, align 8, !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.659d177172b60c17:core.Destroy.Core"(ptr %fn_ptr.var), !dbg !33 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %fn_ptr.var), !dbg !33 // CHECK:STDOUT: ret void, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -204,15 +204,14 @@ fn F() { // CHECK:STDOUT: ret void, !dbg !40 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.659d177172b60c17: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: 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 @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %t) #0 !dbg !43 { +// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -249,10 +248,11 @@ fn F() { // CHECK:STDOUT: !39 = !DILocation(line: 8, column: 41, scope: !36) // CHECK:STDOUT: !40 = !DILocation(line: 5, column: 1, scope: !36) // CHECK:STDOUT: !41 = !{!37, !38} -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.659d177172b60c17:core.Destroy.Core", scope: null, file: !25, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !45) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !8) -// CHECK:STDOUT: !44 = !DILocation(line: 8, column: 3, scope: !42) -// CHECK:STDOUT: !45 = !{!43} +// CHECK:STDOUT: !42 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9d0db8a57c58fabc", scope: null, file: !42, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !49) +// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !8) +// CHECK:STDOUT: !48 = !DILocation(line: 36, column: 1, scope: !43) +// CHECK:STDOUT: !49 = !{!44} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'pass_fn_ptr.carbon' @@ -263,19 +263,19 @@ fn F() { // CHECK:STDOUT: declare i32 @_CMyCallback.Main(float) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !48 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z12TakeCallbackPFifE(ptr @_CMyCallback.Main), !dbg !49 -// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: call void @_Z12TakeCallbackPFifE(ptr @_CMyCallback.Main), !dbg !53 +// CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMyCallback__carbon_thunk.Main(ptr %_, ptr %_1) #0 !dbg !51 { +// CHECK:STDOUT: define void @_CMyCallback__carbon_thunk.Main(ptr %_, ptr %_1) #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc5 = load float, ptr %_, align 4, !dbg !54 -// CHECK:STDOUT: %MyCallback.call = call i32 @_CMyCallback.Main(float %.loc5), !dbg !54 -// CHECK:STDOUT: store i32 %MyCallback.call, ptr %_1, align 4, !dbg !54 -// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: %.loc5 = load float, ptr %_, align 4, !dbg !58 +// CHECK:STDOUT: %MyCallback.call = call i32 @_CMyCallback.Main(float %.loc5), !dbg !58 +// CHECK:STDOUT: store i32 %MyCallback.call, ptr %_1, align 4, !dbg !58 +// CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z12TakeCallbackPFifE(ptr noundef) #1 @@ -283,7 +283,7 @@ fn F() { // 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 = !{!47} +// CHECK:STDOUT: !llvm.dbg.cu = !{!51} // CHECK:STDOUT: !llvm.module.flags = !{!17, !18, !19, !2, !3} // CHECK:STDOUT: !llvm.errno.tbaa = !{!24} // CHECK:STDOUT: @@ -303,16 +303,16 @@ fn F() { // CHECK:STDOUT: !27 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !30 = !{null, !8, !27} // CHECK:STDOUT: !31 = !DISubroutineType(types: !30) -// CHECK:STDOUT: !46 = !DIFile(filename: "pass_fn_ptr.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 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !46, line: 7, type: !7, spFlags: DISPFlagDefinition, unit: !47) -// CHECK:STDOUT: !49 = !DILocation(line: 8, column: 3, scope: !48) -// CHECK:STDOUT: !50 = !DILocation(line: 7, column: 1, scope: !48) -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "MyCallback__carbon_thunk", linkageName: "_CMyCallback__carbon_thunk.Main", scope: null, file: !46, line: 5, type: !31, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !55) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !8) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 2, scope: !51, type: !27) -// CHECK:STDOUT: !54 = !DILocation(line: 5, column: 1, scope: !51) -// CHECK:STDOUT: !55 = !{!52, !53} +// CHECK:STDOUT: !50 = !DIFile(filename: "pass_fn_ptr.carbon", directory: "") +// CHECK:STDOUT: !51 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !50, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !50, line: 7, type: !7, spFlags: DISPFlagDefinition, unit: !51) +// CHECK:STDOUT: !53 = !DILocation(line: 8, column: 3, scope: !52) +// CHECK:STDOUT: !54 = !DILocation(line: 7, column: 1, scope: !52) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "MyCallback__carbon_thunk", linkageName: "_CMyCallback__carbon_thunk.Main", scope: null, file: !50, line: 5, type: !31, spFlags: DISPFlagDefinition, unit: !51, retainedNodes: !59) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !8) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 2, scope: !55, type: !27) +// CHECK:STDOUT: !58 = !DILocation(line: 5, column: 1, scope: !55) +// CHECK:STDOUT: !59 = !{!56, !57} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call_fn_ptr.carbon' @@ -323,18 +323,18 @@ fn F() { // CHECK:STDOUT: @float.239 = internal constant float 1.000000e+00 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !62 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !64 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !63 -// CHECK:STDOUT: %.loc6_41.3.temp = alloca float, align 4, !dbg !65 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !63 -// CHECK:STDOUT: %GetCallback.call = call ptr @_Z11GetCallbackv(), !dbg !64 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc6_41.3.temp), !dbg !65 -// CHECK:STDOUT: %__invoke__carbon_thunk.call = call i32 @.carbon_thunk.__(ptr %GetCallback.call, ptr @float.239), !dbg !64 -// CHECK:STDOUT: store i32 %__invoke__carbon_thunk.call, ptr %x.var, align 4, !dbg !63 -// CHECK:STDOUT: call void @"_CSelfDestruct.3bc6e22e744a96e5:core.Destroy.Core"(ptr @float.239), !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %x.var), !dbg !63 -// CHECK:STDOUT: ret void, !dbg !67 +// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !65 +// CHECK:STDOUT: %.loc6_41.3.temp = alloca float, align 4, !dbg !67 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !65 +// CHECK:STDOUT: %GetCallback.call = call ptr @_Z11GetCallbackv(), !dbg !66 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc6_41.3.temp), !dbg !67 +// CHECK:STDOUT: %__invoke__carbon_thunk.call = call i32 @.carbon_thunk.__(ptr %GetCallback.call, ptr @float.239), !dbg !66 +// CHECK:STDOUT: store i32 %__invoke__carbon_thunk.call, ptr %x.var, align 4, !dbg !65 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.37bc9e7c9d2f29bc(ptr @float.239), !dbg !67 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %x.var), !dbg !65 +// CHECK:STDOUT: ret void, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef ptr @_Z11GetCallbackv() #1 @@ -344,30 +344,28 @@ fn F() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !77 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !80 -// CHECK:STDOUT: %1 = load ptr, ptr %this.addr, align 8, !tbaa !77 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !80 -// CHECK:STDOUT: %3 = load float, ptr %2, align 4, !tbaa !81 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !87 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !90 +// CHECK:STDOUT: %1 = load ptr, ptr %this.addr, align 8, !tbaa !87 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !90 +// CHECK:STDOUT: %3 = load float, ptr %2, align 4, !tbaa !91 // CHECK:STDOUT: %call = call noundef i32 %1(float noundef %3) // CHECK:STDOUT: ret i32 %call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc6e22e744a96e5: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.72395be3dbbe8946: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: 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 void @_CSelfDestruct.Core.37bc9e7c9d2f29bc(ptr %t) #0 !dbg !72 { +// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !79 { +// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } // CHECK:STDOUT: @@ -376,7 +374,7 @@ fn F() { // CHECK:STDOUT: attributes #2 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!57} +// CHECK:STDOUT: !llvm.dbg.cu = !{!61} // CHECK:STDOUT: !llvm.module.flags = !{!17, !18, !19, !2, !3} // CHECK:STDOUT: !llvm.errno.tbaa = !{!24} // CHECK:STDOUT: @@ -396,29 +394,30 @@ fn F() { // CHECK:STDOUT: !23 = !{!"__libc_errno", !22, i64 0} // CHECK:STDOUT: !24 = !{!23, !22, i64 0} // CHECK:STDOUT: !27 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -// CHECK:STDOUT: !56 = !DIFile(filename: "call_fn_ptr.carbon", directory: "") -// CHECK:STDOUT: !57 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !56, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !60 = !{null, !27} -// CHECK:STDOUT: !61 = !DISubroutineType(types: !60) -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !56, line: 5, type: !7, spFlags: DISPFlagDefinition, unit: !57) -// CHECK:STDOUT: !63 = !DILocation(line: 6, column: 3, scope: !62) -// CHECK:STDOUT: !64 = !DILocation(line: 6, column: 23, scope: !62) -// CHECK:STDOUT: !65 = !DILocation(line: 6, column: 41, scope: !62) -// CHECK:STDOUT: !67 = !DILocation(line: 5, column: 1, scope: !62) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc6e22e744a96e5:core.Destroy.Core", scope: null, file: !56, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !57, retainedNodes: !71) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !8) -// CHECK:STDOUT: !70 = !DILocation(line: 6, column: 41, scope: !68) -// CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !56, line: 6, type: !61, spFlags: DISPFlagDefinition, unit: !57, retainedNodes: !75) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !27) -// CHECK:STDOUT: !74 = !DILocation(line: 6, column: 3, scope: !72) -// CHECK:STDOUT: !75 = !{!73} -// CHECK:STDOUT: !76 = !{!"any pointer", !21, i64 0} -// CHECK:STDOUT: !77 = !{!76, !76, i64 0} -// CHECK:STDOUT: !78 = !{!"float", !21, i64 0} -// CHECK:STDOUT: !79 = !{!"p1 float", !76, i64 0} -// CHECK:STDOUT: !80 = !{!79, !79, i64 0} -// CHECK:STDOUT: !81 = !{!78, !78, i64 0} +// CHECK:STDOUT: !42 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !60 = !DIFile(filename: "call_fn_ptr.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: !64 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !60, line: 5, type: !7, spFlags: DISPFlagDefinition, unit: !61) +// CHECK:STDOUT: !65 = !DILocation(line: 6, column: 3, scope: !64) +// CHECK:STDOUT: !66 = !DILocation(line: 6, column: 23, scope: !64) +// CHECK:STDOUT: !67 = !DILocation(line: 6, column: 41, scope: !64) +// CHECK:STDOUT: !69 = !{null, !27} +// CHECK:STDOUT: !70 = !DISubroutineType(types: !69) +// CHECK:STDOUT: !71 = !DILocation(line: 5, column: 1, scope: !64) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.37bc9e7c9d2f29bc", scope: null, file: !42, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !78) +// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !8) +// CHECK:STDOUT: !77 = !DILocation(line: 36, column: 1, scope: !72) +// CHECK:STDOUT: !78 = !{!73} +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !42, line: 36, type: !70, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !85) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !27) +// CHECK:STDOUT: !84 = !DILocation(line: 36, column: 1, scope: !79) +// CHECK:STDOUT: !85 = !{!80} +// CHECK:STDOUT: !86 = !{!"any pointer", !21, i64 0} +// CHECK:STDOUT: !87 = !{!86, !86, i64 0} +// CHECK:STDOUT: !88 = !{!"float", !21, i64 0} +// CHECK:STDOUT: !89 = !{!"p1 float", !86, i64 0} +// CHECK:STDOUT: !90 = !{!89, !89, i64 0} +// CHECK:STDOUT: !91 = !{!88, !88, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'relay_complex_fn_ptr.carbon' @@ -427,11 +426,11 @@ fn F() { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !84 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !94 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %GetComplexCallback.call = call ptr @_Z18GetComplexCallbackv(), !dbg !85 -// CHECK:STDOUT: call void @_Z19TakeComplexCallbackPF1CS_E(ptr %GetComplexCallback.call), !dbg !86 -// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: %GetComplexCallback.call = call ptr @_Z18GetComplexCallbackv(), !dbg !95 +// CHECK:STDOUT: call void @_Z19TakeComplexCallbackPF1CS_E(ptr %GetComplexCallback.call), !dbg !96 +// CHECK:STDOUT: ret void, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef ptr @_Z18GetComplexCallbackv() #1 @@ -441,7 +440,7 @@ fn F() { // 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 = !{!83} +// CHECK:STDOUT: !llvm.dbg.cu = !{!93} // CHECK:STDOUT: !llvm.module.flags = !{!17, !18, !19, !2, !3} // CHECK:STDOUT: !llvm.errno.tbaa = !{!24} // CHECK:STDOUT: @@ -457,12 +456,12 @@ fn F() { // CHECK:STDOUT: !22 = !{!"int", !21, i64 0} // CHECK:STDOUT: !23 = !{!"__libc_errno", !22, i64 0} // CHECK:STDOUT: !24 = !{!23, !22, i64 0} -// CHECK:STDOUT: !82 = !DIFile(filename: "relay_complex_fn_ptr.carbon", directory: "") -// CHECK:STDOUT: !83 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !82, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !82, line: 5, type: !7, spFlags: DISPFlagDefinition, unit: !83) -// CHECK:STDOUT: !85 = !DILocation(line: 6, column: 27, scope: !84) -// CHECK:STDOUT: !86 = !DILocation(line: 6, column: 3, scope: !84) -// CHECK:STDOUT: !87 = !DILocation(line: 5, column: 1, scope: !84) +// CHECK:STDOUT: !92 = !DIFile(filename: "relay_complex_fn_ptr.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: "F", linkageName: "_CF.Main", scope: null, file: !92, line: 5, type: !7, spFlags: DISPFlagDefinition, unit: !93) +// CHECK:STDOUT: !95 = !DILocation(line: 6, column: 27, scope: !94) +// CHECK:STDOUT: !96 = !DILocation(line: 6, column: 3, scope: !94) +// CHECK:STDOUT: !97 = !DILocation(line: 5, column: 1, scope: !94) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'convert_complex_fn_ptr.carbon' @@ -473,35 +472,34 @@ fn F() { // CHECK:STDOUT: declare void @_CMyCallback.Main(ptr sret([4 x i8]), ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !94 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !104 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %fn_ptr.var = alloca ptr, align 8, !dbg !95 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %fn_ptr.var), !dbg !95 -// CHECK:STDOUT: store ptr @_CMyCallback.Main, ptr %fn_ptr.var, align 8, !dbg !95 -// CHECK:STDOUT: call void @"_CSelfDestruct.659d177172b60c17:core.Destroy.Core"(ptr %fn_ptr.var), !dbg !95 -// CHECK:STDOUT: ret void, !dbg !97 +// CHECK:STDOUT: %fn_ptr.var = alloca ptr, align 8, !dbg !105 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %fn_ptr.var), !dbg !105 +// CHECK:STDOUT: store ptr @_CMyCallback.Main, ptr %fn_ptr.var, align 8, !dbg !105 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %fn_ptr.var), !dbg !105 +// CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMyCallback__carbon_thunk.Main(ptr %_, ptr %_1) #0 !dbg !98 { +// CHECK:STDOUT: define void @_CMyCallback__carbon_thunk.Main(ptr %_, ptr %_1) #0 !dbg !108 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CMyCallback.Main(ptr %_1, ptr %_), !dbg !102 -// CHECK:STDOUT: ret void, !dbg !102 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.659d177172b60c17:core.Destroy.Core"(ptr %self) #0 !dbg !104 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !106 +// CHECK:STDOUT: call void @_CMyCallback.Main(ptr %_1, ptr %_), !dbg !112 +// CHECK:STDOUT: ret void, !dbg !112 // 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 @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %t) #0 !dbg !114 { +// CHECK:STDOUT: ret void, !dbg !119 +// 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 = !{!89} +// CHECK:STDOUT: !llvm.dbg.cu = !{!99} // CHECK:STDOUT: !llvm.module.flags = !{!17, !18, !19, !2, !3} // CHECK:STDOUT: !llvm.errno.tbaa = !{!24} // CHECK:STDOUT: @@ -520,22 +518,23 @@ fn F() { // CHECK:STDOUT: !22 = !{!"int", !21, i64 0} // CHECK:STDOUT: !23 = !{!"__libc_errno", !22, i64 0} // CHECK:STDOUT: !24 = !{!23, !22, i64 0} -// CHECK:STDOUT: !88 = !DIFile(filename: "convert_complex_fn_ptr.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: !92 = !{null, !8, !8} -// CHECK:STDOUT: !93 = !DISubroutineType(types: !92) -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !88, line: 7, type: !7, spFlags: DISPFlagDefinition, unit: !89) -// CHECK:STDOUT: !95 = !DILocation(line: 8, column: 3, scope: !94) -// CHECK:STDOUT: !97 = !DILocation(line: 7, column: 1, scope: !94) -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "MyCallback__carbon_thunk", linkageName: "_CMyCallback__carbon_thunk.Main", scope: null, file: !88, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !103) -// CHECK:STDOUT: !99 = !DILocalVariable(arg: 1, scope: !98, type: !8) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 2, scope: !98, type: !8) -// CHECK:STDOUT: !102 = !DILocation(line: 5, column: 1, scope: !98) -// CHECK:STDOUT: !103 = !{!99, !100} -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.659d177172b60c17:core.Destroy.Core", scope: null, file: !88, line: 8, type: !12, spFlags: DISPFlagDefinition, unit: !89, retainedNodes: !107) -// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !8) -// CHECK:STDOUT: !106 = !DILocation(line: 8, column: 3, scope: !104) -// CHECK:STDOUT: !107 = !{!105} +// CHECK:STDOUT: !42 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !98 = !DIFile(filename: "convert_complex_fn_ptr.carbon", directory: "") +// CHECK:STDOUT: !99 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !98, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !102 = !{null, !8, !8} +// CHECK:STDOUT: !103 = !DISubroutineType(types: !102) +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !98, line: 7, type: !7, spFlags: DISPFlagDefinition, unit: !99) +// CHECK:STDOUT: !105 = !DILocation(line: 8, column: 3, scope: !104) +// CHECK:STDOUT: !107 = !DILocation(line: 7, column: 1, scope: !104) +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "MyCallback__carbon_thunk", linkageName: "_CMyCallback__carbon_thunk.Main", scope: null, file: !98, line: 8, type: !103, spFlags: DISPFlagDefinition, unit: !99, retainedNodes: !113) +// CHECK:STDOUT: !109 = !DILocalVariable(arg: 1, scope: !108, type: !8) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 2, scope: !108, type: !8) +// CHECK:STDOUT: !112 = !DILocation(line: 5, column: 1, scope: !108) +// CHECK:STDOUT: !113 = !{!109, !110} +// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9d0db8a57c58fabc", scope: null, file: !42, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !99, retainedNodes: !120) +// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !8) +// CHECK:STDOUT: !119 = !DILocation(line: 36, column: 1, scope: !114) +// CHECK:STDOUT: !120 = !{!115} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'pass_complex_fn_ptr.carbon' @@ -546,17 +545,17 @@ fn F() { // CHECK:STDOUT: declare void @_CMyCallback.Main(ptr sret([4 x i8]), ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !110 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !123 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z19TakeComplexCallbackPF1CS_E(ptr @_CMyCallback.Main), !dbg !111 -// CHECK:STDOUT: ret void, !dbg !112 +// CHECK:STDOUT: call void @_Z19TakeComplexCallbackPF1CS_E(ptr @_CMyCallback.Main), !dbg !124 +// CHECK:STDOUT: ret void, !dbg !125 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMyCallback__carbon_thunk.Main(ptr %_, ptr %_1) #0 !dbg !113 { +// CHECK:STDOUT: define void @_CMyCallback__carbon_thunk.Main(ptr %_, ptr %_1) #0 !dbg !126 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CMyCallback.Main(ptr %_1, ptr %_), !dbg !116 -// CHECK:STDOUT: ret void, !dbg !116 +// CHECK:STDOUT: call void @_CMyCallback.Main(ptr %_1, ptr %_), !dbg !129 +// CHECK:STDOUT: ret void, !dbg !129 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z19TakeComplexCallbackPF1CS_E(ptr noundef) #1 @@ -564,7 +563,7 @@ fn F() { // 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 = !{!109} +// CHECK:STDOUT: !llvm.dbg.cu = !{!122} // CHECK:STDOUT: !llvm.module.flags = !{!17, !18, !19, !2, !3} // CHECK:STDOUT: !llvm.errno.tbaa = !{!24} // CHECK:STDOUT: @@ -581,18 +580,18 @@ fn F() { // CHECK:STDOUT: !22 = !{!"int", !21, i64 0} // CHECK:STDOUT: !23 = !{!"__libc_errno", !22, i64 0} // CHECK:STDOUT: !24 = !{!23, !22, i64 0} -// CHECK:STDOUT: !92 = !{null, !8, !8} -// CHECK:STDOUT: !93 = !DISubroutineType(types: !92) -// CHECK:STDOUT: !108 = !DIFile(filename: "pass_complex_fn_ptr.carbon", directory: "") -// CHECK:STDOUT: !109 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !108, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !108, line: 7, type: !7, spFlags: DISPFlagDefinition, unit: !109) -// CHECK:STDOUT: !111 = !DILocation(line: 8, column: 3, scope: !110) -// CHECK:STDOUT: !112 = !DILocation(line: 7, column: 1, scope: !110) -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "MyCallback__carbon_thunk", linkageName: "_CMyCallback__carbon_thunk.Main", scope: null, file: !108, line: 5, type: !93, spFlags: DISPFlagDefinition, unit: !109, retainedNodes: !117) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !8) -// CHECK:STDOUT: !115 = !DILocalVariable(arg: 2, scope: !113, type: !8) -// CHECK:STDOUT: !116 = !DILocation(line: 5, column: 1, scope: !113) -// CHECK:STDOUT: !117 = !{!114, !115} +// CHECK:STDOUT: !102 = !{null, !8, !8} +// CHECK:STDOUT: !103 = !DISubroutineType(types: !102) +// CHECK:STDOUT: !121 = !DIFile(filename: "pass_complex_fn_ptr.carbon", directory: "") +// CHECK:STDOUT: !122 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !121, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !121, line: 7, type: !7, spFlags: DISPFlagDefinition, unit: !122) +// CHECK:STDOUT: !124 = !DILocation(line: 8, column: 3, scope: !123) +// CHECK:STDOUT: !125 = !DILocation(line: 7, column: 1, scope: !123) +// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "MyCallback__carbon_thunk", linkageName: "_CMyCallback__carbon_thunk.Main", scope: null, file: !121, line: 5, type: !103, spFlags: DISPFlagDefinition, unit: !122, retainedNodes: !130) +// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !8) +// CHECK:STDOUT: !128 = !DILocalVariable(arg: 2, scope: !126, type: !8) +// CHECK:STDOUT: !129 = !DILocation(line: 5, column: 1, scope: !126) +// CHECK:STDOUT: !130 = !{!127, !128} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'call_complex_fn_ptr.carbon' @@ -603,18 +602,18 @@ fn F() { // CHECK:STDOUT: %class.C = type { i32 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !122 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !135 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca [4 x i8], align 4, !dbg !123 -// CHECK:STDOUT: %.loc6_58.1.temp = alloca [4 x i8], align 4, !dbg !125 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !123 -// CHECK:STDOUT: %GetComplexCallback.call = call ptr @_Z18GetComplexCallbackv(), !dbg !124 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc6_58.1.temp), !dbg !125 -// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk.(ptr %.loc6_58.1.temp), !dbg !125 -// CHECK:STDOUT: call void @.carbon_thunk.__(ptr %GetComplexCallback.call, ptr %.loc6_58.1.temp, ptr %x.var), !dbg !124 -// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %.loc6_58.1.temp), !dbg !125 -// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %x.var), !dbg !123 -// CHECK:STDOUT: ret void, !dbg !127 +// CHECK:STDOUT: %x.var = alloca [4 x i8], align 4, !dbg !136 +// CHECK:STDOUT: %.loc6_58.1.temp = alloca [4 x i8], align 4, !dbg !138 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !136 +// CHECK:STDOUT: %GetComplexCallback.call = call ptr @_Z18GetComplexCallbackv(), !dbg !137 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc6_58.1.temp), !dbg !138 +// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk.(ptr %.loc6_58.1.temp), !dbg !138 +// CHECK:STDOUT: call void @.carbon_thunk.__(ptr %GetComplexCallback.call, ptr %.loc6_58.1.temp, ptr %x.var), !dbg !137 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %.loc6_58.1.temp), !dbg !138 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %x.var), !dbg !136 +// CHECK:STDOUT: ret void, !dbg !140 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef ptr @_Z18GetComplexCallbackv() #1 @@ -623,8 +622,8 @@ fn F() { // CHECK:STDOUT: define internal void @_ZN1CC1Ev.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 !133 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !133 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !149 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !149 // CHECK:STDOUT: call void @_ZN1CC1Ev(ptr noundef nonnull align 4 dereferenceable(4) %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -636,40 +635,39 @@ fn F() { // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %class.C, align 4 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !77 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !133 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !133 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !133 -// CHECK:STDOUT: %2 = load ptr, ptr %this.addr, align 8, !tbaa !77 -// CHECK:STDOUT: %3 = load ptr, ptr %.addr, align 8, !tbaa !133 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !87 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !149 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !149 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !149 +// CHECK:STDOUT: %2 = load ptr, ptr %this.addr, align 8, !tbaa !87 +// CHECK:STDOUT: %3 = load ptr, ptr %.addr, align 8, !tbaa !149 // CHECK:STDOUT: call void @_ZN1CC1ERKS_(ptr noundef nonnull align 4 dereferenceable(4) %agg.tmp, ptr noundef nonnull align 4 dereferenceable(4) %3) // CHECK:STDOUT: call void %2(ptr dead_on_unwind writable sret(%class.C) align 4 %1, ptr nofreeobj noundef align 4 dead_on_return dereferenceable(4) %agg.tmp) // 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 !128 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !130 -// 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 void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %t) #0 !dbg !141 { +// CHECK:STDOUT: ret void, !dbg !146 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZN1CC1Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 // CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZN1CC1ERKS_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.4d2f117a5a2332f0, { 1, 0 } // 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: attributes #2 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!119} +// CHECK:STDOUT: !llvm.dbg.cu = !{!132} // CHECK:STDOUT: !llvm.module.flags = !{!17, !18, !19, !2, !3} // CHECK:STDOUT: !llvm.errno.tbaa = !{!24} // CHECK:STDOUT: @@ -688,21 +686,22 @@ fn F() { // CHECK:STDOUT: !22 = !{!"int", !21, i64 0} // CHECK:STDOUT: !23 = !{!"__libc_errno", !22, i64 0} // CHECK:STDOUT: !24 = !{!23, !22, i64 0} -// CHECK:STDOUT: !76 = !{!"any pointer", !21, i64 0} -// CHECK:STDOUT: !77 = !{!76, !76, i64 0} -// CHECK:STDOUT: !118 = !DIFile(filename: "call_complex_fn_ptr.carbon", directory: "") -// CHECK:STDOUT: !119 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !118, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !118, line: 5, type: !7, spFlags: DISPFlagDefinition, unit: !119) -// CHECK:STDOUT: !123 = !DILocation(line: 6, column: 3, scope: !122) -// CHECK:STDOUT: !124 = !DILocation(line: 6, column: 25, scope: !122) -// CHECK:STDOUT: !125 = !DILocation(line: 6, column: 50, scope: !122) -// CHECK:STDOUT: !127 = !DILocation(line: 5, column: 1, scope: !122) -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", scope: null, file: !118, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !119, retainedNodes: !131) -// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !8) -// CHECK:STDOUT: !130 = !DILocation(line: 6, column: 50, scope: !128) -// CHECK:STDOUT: !131 = !{!129} -// CHECK:STDOUT: !132 = !{!"p1 _ZTS1C", !76, i64 0} -// CHECK:STDOUT: !133 = !{!132, !132, i64 0} +// CHECK:STDOUT: !42 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !86 = !{!"any pointer", !21, i64 0} +// CHECK:STDOUT: !87 = !{!86, !86, i64 0} +// CHECK:STDOUT: !131 = !DIFile(filename: "call_complex_fn_ptr.carbon", directory: "") +// CHECK:STDOUT: !132 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !131, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !131, line: 5, type: !7, spFlags: DISPFlagDefinition, unit: !132) +// CHECK:STDOUT: !136 = !DILocation(line: 6, column: 3, scope: !135) +// CHECK:STDOUT: !137 = !DILocation(line: 6, column: 25, scope: !135) +// CHECK:STDOUT: !138 = !DILocation(line: 6, column: 50, scope: !135) +// CHECK:STDOUT: !140 = !DILocation(line: 5, column: 1, scope: !135) +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4d2f117a5a2332f0", scope: null, file: !42, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !132, retainedNodes: !147) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !8) +// CHECK:STDOUT: !146 = !DILocation(line: 36, column: 1, scope: !141) +// CHECK:STDOUT: !147 = !{!142} +// CHECK:STDOUT: !148 = !{!"p1 _ZTS1C", !86, i64 0} +// CHECK:STDOUT: !149 = !{!148, !148, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'mention_forward_decl.carbon' @@ -711,32 +710,31 @@ fn F() { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !137 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !153 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %callback.var = alloca ptr, align 8, !dbg !138 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %callback.var), !dbg !138 -// CHECK:STDOUT: %ReturnCallback.call = call ptr @_Z14ReturnCallbackv(), !dbg !139 -// CHECK:STDOUT: store ptr %ReturnCallback.call, ptr %callback.var, align 8, !dbg !138 -// CHECK:STDOUT: call void @"_CSelfDestruct.659d177172b60c17:core.Destroy.Core"(ptr %callback.var), !dbg !138 -// CHECK:STDOUT: ret void, !dbg !141 +// CHECK:STDOUT: %callback.var = alloca ptr, align 8, !dbg !154 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %callback.var), !dbg !154 +// CHECK:STDOUT: %ReturnCallback.call = call ptr @_Z14ReturnCallbackv(), !dbg !155 +// CHECK:STDOUT: store ptr %ReturnCallback.call, ptr %callback.var, align 8, !dbg !154 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %callback.var), !dbg !154 +// CHECK:STDOUT: ret void, !dbg !157 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef ptr @_Z14ReturnCallbackv() #1 // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.659d177172b60c17: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: 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 void @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %t) #0 !dbg !158 { +// CHECK:STDOUT: ret void, !dbg !163 +// 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: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!136} +// CHECK:STDOUT: !llvm.dbg.cu = !{!152} // CHECK:STDOUT: !llvm.module.flags = !{!17, !18, !19, !2, !3} // CHECK:STDOUT: !llvm.errno.tbaa = !{!24} // CHECK:STDOUT: @@ -755,14 +753,15 @@ fn F() { // CHECK:STDOUT: !22 = !{!"int", !21, i64 0} // CHECK:STDOUT: !23 = !{!"__libc_errno", !22, i64 0} // CHECK:STDOUT: !24 = !{!23, !22, i64 0} -// CHECK:STDOUT: !135 = !DIFile(filename: "mention_forward_decl.carbon", directory: "") -// CHECK:STDOUT: !136 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !135, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !135, line: 5, type: !7, spFlags: DISPFlagDefinition, unit: !136) -// CHECK:STDOUT: !138 = !DILocation(line: 6, column: 3, scope: !137) -// CHECK:STDOUT: !139 = !DILocation(line: 6, column: 43, scope: !137) -// CHECK:STDOUT: !141 = !DILocation(line: 5, column: 1, scope: !137) -// CHECK:STDOUT: !142 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.659d177172b60c17:core.Destroy.Core", scope: null, file: !135, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !136, retainedNodes: !145) -// CHECK:STDOUT: !143 = !DILocalVariable(arg: 1, scope: !142, type: !8) -// CHECK:STDOUT: !144 = !DILocation(line: 6, column: 3, scope: !142) -// CHECK:STDOUT: !145 = !{!143} +// CHECK:STDOUT: !42 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !151 = !DIFile(filename: "mention_forward_decl.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: "F", linkageName: "_CF.Main", scope: null, file: !151, line: 5, type: !7, spFlags: DISPFlagDefinition, unit: !152) +// CHECK:STDOUT: !154 = !DILocation(line: 6, column: 3, scope: !153) +// CHECK:STDOUT: !155 = !DILocation(line: 6, column: 43, scope: !153) +// CHECK:STDOUT: !157 = !DILocation(line: 5, column: 1, scope: !153) +// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9d0db8a57c58fabc", scope: null, file: !42, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !152, retainedNodes: !164) +// CHECK:STDOUT: !159 = !DILocalVariable(arg: 1, scope: !158, type: !8) +// CHECK:STDOUT: !163 = !DILocation(line: 36, column: 1, scope: !158) +// CHECK:STDOUT: !164 = !{!159} // 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 9abda163b97d..3616671ce8bd 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/import_inline.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/import_inline.carbon @@ -41,33 +41,32 @@ fn Call() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CCall.Main() #1 !dbg !35 { +// CHECK:STDOUT: define i32 @_CCall.Main() #1 !dbg !33 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !38 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !38 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !38 -// CHECK:STDOUT: call void @_Z1FPi(ptr %n.var), !dbg !42 -// CHECK:STDOUT: %.loc24 = load i32, ptr %n.var, align 4, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !38 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !36 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !36 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !36 +// CHECK:STDOUT: call void @_Z1FPi(ptr %n.var), !dbg !40 +// CHECK:STDOUT: %.loc24 = load i32, ptr %n.var, align 4, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !36 // CHECK:STDOUT: ret i32 %.loc24, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #1 !dbg !45 { -// CHECK:STDOUT: entry: -// 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)) #2 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #1 !dbg !45 { +// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #1 = { nounwind } // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!26} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !9, !10} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!53} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !9, !10} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!56} // CHECK:STDOUT: // CHECK:STDOUT: !0 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !1 = !{!"omnipotent char", !0, i64 0} @@ -78,25 +77,26 @@ fn Call() -> i32 { // CHECK:STDOUT: !6 = !{!2, !2, i64 0} // CHECK:STDOUT: !9 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !10 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !17 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !25 = !DIFile(filename: "import_inline.carbon", directory: "") // CHECK:STDOUT: !26 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !25, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !27 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !28 = !{!27} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !33 = !{null, !27} -// CHECK:STDOUT: !34 = !DISubroutineType(types: !33) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !25, line: 21, type: !29, spFlags: DISPFlagDefinition, unit: !26) -// CHECK:STDOUT: !38 = !DILocation(line: 22, column: 3, scope: !35) -// CHECK:STDOUT: !42 = !DILocation(line: 23, column: 3, scope: !35) -// CHECK:STDOUT: !43 = !DILocation(line: 24, column: 10, scope: !35) -// CHECK:STDOUT: !44 = !DILocation(line: 24, column: 3, scope: !35) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !25, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !48) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !25, line: 21, type: !29, spFlags: DISPFlagDefinition, unit: !26) +// CHECK:STDOUT: !36 = !DILocation(line: 22, column: 3, scope: !33) +// CHECK:STDOUT: !40 = !DILocation(line: 23, column: 3, scope: !33) +// CHECK:STDOUT: !41 = !DILocation(line: 24, column: 10, scope: !33) +// CHECK:STDOUT: !42 = !{null, !27} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = !DILocation(line: 24, column: 3, scope: !33) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !17, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !51) // 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 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"__libc_errno", !2, i64 0} -// CHECK:STDOUT: !53 = !{!52, !2, i64 0} +// CHECK:STDOUT: !50 = !DILocation(line: 32, column: 1, scope: !45) +// CHECK:STDOUT: !51 = !{!46} +// 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 = !{!"__libc_errno", !2, i64 0} +// CHECK:STDOUT: !56 = !{!55, !2, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/function/import/method_ptr.carbon b/toolchain/lower/testdata/interop/cpp/function/import/method_ptr.carbon index f7a118c9ed31..230c527509ae 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/method_ptr.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/method_ptr.carbon @@ -80,8 +80,8 @@ fn F() { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc6_38.5.temp), !dbg !12 // CHECK:STDOUT: store ptr %.loc6_38.4, ptr %.loc6_38.5.temp, align 8, !dbg !12 // CHECK:STDOUT: call void @_Z13TakeMethodPtrM1CKFvvE.carbon_thunk._(ptr %.loc6_38.5.temp), !dbg !13 -// CHECK:STDOUT: call void @"_CSelfDestruct.659d177172b60c17:core.Destroy.Core"(ptr %.loc6_38.5.temp), !dbg !12 -// CHECK:STDOUT: call void @"_CSelfDestruct.659d177172b60c17:core.Destroy.Core"(ptr %.loc6_38.1.temp), !dbg !12 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %.loc6_38.5.temp), !dbg !12 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %.loc6_38.1.temp), !dbg !12 // CHECK:STDOUT: ret void, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -89,10 +89,10 @@ fn F() { // CHECK:STDOUT: define internal void @_Z12GetMethodPtrv.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 !22 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !22 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !26 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !26 // CHECK:STDOUT: %call = call { i64, i64 } @_Z12GetMethodPtrv() -// CHECK:STDOUT: store { i64, i64 } %call, ptr %0, align 8, !tbaa !23 +// CHECK:STDOUT: store { i64, i64 } %call, ptr %0, align 8, !tbaa !27 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -101,10 +101,10 @@ fn F() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %coerce = alloca { i64, i64 }, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !22 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !22 -// CHECK:STDOUT: %2 = load { i64, i64 }, ptr %1, align 8, !tbaa !23 -// CHECK:STDOUT: store { i64, i64 } %2, ptr %coerce, align 8, !tbaa !23 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !26 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !26 +// CHECK:STDOUT: %2 = load { i64, i64 }, ptr %1, align 8, !tbaa !27 +// CHECK:STDOUT: store { i64, i64 } %2, ptr %coerce, align 8, !tbaa !27 // CHECK:STDOUT: %3 = getelementptr inbounds nuw { i64, i64 }, ptr %coerce, i32 0, i32 0 // CHECK:STDOUT: %4 = load i64, ptr %3, align 8 // CHECK:STDOUT: %5 = getelementptr inbounds nuw { i64, i64 }, ptr %coerce, i32 0, i32 1 @@ -113,22 +113,21 @@ fn F() { // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.659d177172b60c17:core.Destroy.Core"(ptr %self) #0 !dbg !15 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !17 -// 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 void @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %t) #0 !dbg !16 { +// CHECK:STDOUT: ret void, !dbg !21 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare { i64, i64 } @_Z12GetMethodPtrv() #3 // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z13TakeMethodPtrM1CKFvvE(i64, i64) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.659d177172b60c17:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9d0db8a57c58fabc, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -136,8 +135,8 @@ fn F() { // 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 = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!24, !25, !26, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!29} +// CHECK:STDOUT: !llvm.module.flags = !{!28, !29, !30, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!33} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -152,21 +151,22 @@ fn F() { // CHECK:STDOUT: !12 = !DILocation(line: 6, column: 21, scope: !11) // CHECK:STDOUT: !13 = !DILocation(line: 6, column: 3, scope: !11) // CHECK:STDOUT: !14 = !DILocation(line: 5, column: 1, scope: !11) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.659d177172b60c17:core.Destroy.Core", scope: null, file: !4, line: 6, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !18) -// CHECK:STDOUT: !16 = !DILocalVariable(arg: 1, scope: !15, type: !8) -// CHECK:STDOUT: !17 = !DILocation(line: 6, column: 21, scope: !15) -// CHECK:STDOUT: !18 = !{!16} -// CHECK:STDOUT: !19 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !20 = !{!"omnipotent char", !19, i64 0} -// CHECK:STDOUT: !21 = !{!"any pointer", !20, i64 0} -// CHECK:STDOUT: !22 = !{!21, !21, i64 0} -// CHECK:STDOUT: !23 = !{!20, !20, i64 0} -// CHECK:STDOUT: !24 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !25 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !26 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !27 = !{!"int", !20, i64 0} -// CHECK:STDOUT: !28 = !{!"__libc_errno", !27, i64 0} -// CHECK:STDOUT: !29 = !{!28, !27, i64 0} +// CHECK:STDOUT: !15 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9d0db8a57c58fabc", scope: null, file: !15, line: 36, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !22) +// CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !16, type: !8) +// CHECK:STDOUT: !21 = !DILocation(line: 36, column: 1, scope: !16) +// CHECK:STDOUT: !22 = !{!17} +// CHECK:STDOUT: !23 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !24 = !{!"omnipotent char", !23, i64 0} +// CHECK:STDOUT: !25 = !{!"any pointer", !24, i64 0} +// CHECK:STDOUT: !26 = !{!25, !25, i64 0} +// CHECK:STDOUT: !27 = !{!24, !24, i64 0} +// CHECK:STDOUT: !28 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !29 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !30 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !31 = !{!"int", !24, i64 0} +// CHECK:STDOUT: !32 = !{!"__libc_errno", !31, i64 0} +// CHECK:STDOUT: !33 = !{!32, !31, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'convert_method_ptr.carbon' @@ -177,57 +177,49 @@ fn F() { // CHECK:STDOUT: declare void @_CMethod.C.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !32 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !36 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ptr.var = alloca ptr, align 8, !dbg !33 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr.var), !dbg !33 -// CHECK:STDOUT: store ptr @_CMethod.C.Main, ptr %ptr.var, align 8, !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.659d177172b60c17:core.Destroy.Core"(ptr %ptr.var), !dbg !33 -// CHECK:STDOUT: ret void, !dbg !35 +// CHECK:STDOUT: %ptr.var = alloca ptr, align 8, !dbg !37 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr.var), !dbg !37 +// CHECK:STDOUT: store ptr @_CMethod.C.Main, ptr %ptr.var, align 8, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %ptr.var), !dbg !37 +// CHECK:STDOUT: ret void, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.C.Main"(ptr %self) #1 !dbg !36 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575: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 @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.C.Main"(ptr %self) #1 !dbg !40 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(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.08d9e38b928ba575:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define void @_CMethod__carbon_thunk.C.Main(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 void @_CMethod__carbon_thunk.C.Main(ptr %self) #0 !dbg !48 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CMethod.C.Main(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.659d177172b60c17:core.Destroy.Core"(ptr %self) #0 !dbg !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: call void @_CMethod.C.Main(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)) #2 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %t) #0 !dbg !49 { +// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !56 { +// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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 = !{!31} -// CHECK:STDOUT: !llvm.module.flags = !{!24, !25, !26, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!29} +// CHECK:STDOUT: !llvm.dbg.cu = !{!35} +// CHECK:STDOUT: !llvm.module.flags = !{!28, !29, !30, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!33} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -236,39 +228,36 @@ fn F() { // CHECK:STDOUT: !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !9 = !{null, !8} // CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !19 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !20 = !{!"omnipotent char", !19, i64 0} -// CHECK:STDOUT: !24 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !25 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !26 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !27 = !{!"int", !20, i64 0} -// CHECK:STDOUT: !28 = !{!"__libc_errno", !27, i64 0} -// CHECK:STDOUT: !29 = !{!28, !27, i64 0} -// CHECK:STDOUT: !30 = !DIFile(filename: "convert_method_ptr.carbon", directory: "") -// CHECK:STDOUT: !31 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !30, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !30, line: 13, type: !7, spFlags: DISPFlagDefinition, unit: !31) -// CHECK:STDOUT: !33 = !DILocation(line: 14, column: 3, scope: !32) -// CHECK:STDOUT: !35 = !DILocation(line: 13, column: 1, scope: !32) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !30, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !31, retainedNodes: !39) -// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !8) -// CHECK:STDOUT: !38 = !DILocation(line: 5, column: 1, scope: !36) -// CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !30, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !31, retainedNodes: !43) +// CHECK:STDOUT: !15 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !23 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !24 = !{!"omnipotent char", !23, i64 0} +// CHECK:STDOUT: !28 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !29 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !30 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !31 = !{!"int", !24, i64 0} +// CHECK:STDOUT: !32 = !{!"__libc_errno", !31, i64 0} +// CHECK:STDOUT: !33 = !{!32, !31, i64 0} +// CHECK:STDOUT: !34 = !DIFile(filename: "convert_method_ptr.carbon", directory: "") +// CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !34, line: 13, type: !7, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !37 = !DILocation(line: 14, column: 3, scope: !36) +// CHECK:STDOUT: !39 = !DILocation(line: 13, column: 1, scope: !36) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !34, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !43) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !8) // CHECK:STDOUT: !42 = !DILocation(line: 5, column: 1, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !30, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !31, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Method__carbon_thunk", linkageName: "_CMethod__carbon_thunk.C.Main", scope: null, file: !34, line: 14, type: !10, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !48) // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !8) -// CHECK:STDOUT: !46 = !DILocation(line: 5, column: 1, scope: !44) -// CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Method__carbon_thunk", linkageName: "_CMethod__carbon_thunk.C.Main", scope: null, file: !30, line: 14, type: !10, spFlags: DISPFlagDefinition, unit: !31, retainedNodes: !52) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !8) -// CHECK:STDOUT: !51 = !DILocation(line: 6, column: 3, scope: !48) -// CHECK:STDOUT: !52 = !{!49} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.659d177172b60c17:core.Destroy.Core", scope: null, file: !30, line: 14, type: !10, spFlags: DISPFlagDefinition, unit: !31, retainedNodes: !56) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !8) -// CHECK:STDOUT: !55 = !DILocation(line: 14, column: 3, scope: !53) -// CHECK:STDOUT: !56 = !{!54} +// CHECK:STDOUT: !47 = !DILocation(line: 6, column: 3, scope: !44) +// CHECK:STDOUT: !48 = !{!45} +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9d0db8a57c58fabc", scope: null, file: !15, line: 36, type: !10, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !55) +// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !8) +// CHECK:STDOUT: !54 = !DILocation(line: 36, column: 1, scope: !49) +// CHECK:STDOUT: !55 = !{!50} +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !15, line: 36, type: !10, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !62) +// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !8) +// CHECK:STDOUT: !61 = !DILocation(line: 36, column: 1, scope: !56) +// CHECK:STDOUT: !62 = !{!57} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'pass_method_ptr.carbon' @@ -281,39 +270,27 @@ fn F() { // CHECK:STDOUT: declare void @_CMethod.C.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !59 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !65 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc10_29.3.temp = alloca ptr, align 8, !dbg !60 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc10_29.3.temp), !dbg !60 -// CHECK:STDOUT: call void @_Z20TakeGenericMethodPtrIN6Carbon4Main1CEEvMT_KFvvE.carbon_thunk._(ptr @.b35), !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.659d177172b60c17:core.Destroy.Core"(ptr @.b35), !dbg !60 -// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: %.loc10_29.3.temp = alloca ptr, align 8, !dbg !66 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc10_29.3.temp), !dbg !66 +// CHECK:STDOUT: call void @_Z20TakeGenericMethodPtrIN6Carbon4Main1CEEvMT_KFvvE.carbon_thunk._(ptr @.b35), !dbg !67 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr @.b35), !dbg !66 +// CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.C.Main"(ptr %self) #1 !dbg !63 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.C.Main"(ptr %self) #1 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %self), !dbg !65 -// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(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.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define void @_CMethod__carbon_thunk.C.Main(ptr %self) #0 !dbg !73 { // 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.08d9e38b928ba575: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 void @_CMethod__carbon_thunk.C.Main(ptr %self) #0 !dbg !75 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CMethod.C.Main(ptr %self), !dbg !77 -// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: call void @_CMethod.C.Main(ptr %self), !dbg !75 +// CHECK:STDOUT: ret void, !dbg !75 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -321,10 +298,10 @@ fn F() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %ptr.addr = alloca ptr, align 8 // CHECK:STDOUT: %coerce = alloca { i64, i64 }, align 8 -// CHECK:STDOUT: store ptr %ptr, ptr %ptr.addr, align 8, !tbaa !22 -// CHECK:STDOUT: %0 = load ptr, ptr %ptr.addr, align 8, !tbaa !22 -// CHECK:STDOUT: %1 = load { i64, i64 }, ptr %0, align 8, !tbaa !23 -// CHECK:STDOUT: store { i64, i64 } %1, ptr %coerce, align 8, !tbaa !23 +// CHECK:STDOUT: store ptr %ptr, ptr %ptr.addr, align 8, !tbaa !26 +// CHECK:STDOUT: %0 = load ptr, ptr %ptr.addr, align 8, !tbaa !26 +// CHECK:STDOUT: %1 = load { i64, i64 }, ptr %0, align 8, !tbaa !27 +// CHECK:STDOUT: store { i64, i64 } %1, ptr %coerce, align 8, !tbaa !27 // CHECK:STDOUT: %2 = getelementptr inbounds nuw { i64, i64 }, ptr %coerce, i32 0, i32 0 // CHECK:STDOUT: %3 = load i64, ptr %2, align 8 // CHECK:STDOUT: %4 = getelementptr inbounds nuw { i64, i64 }, ptr %coerce, i32 0, i32 1 @@ -333,15 +310,19 @@ fn F() { // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.659d177172b60c17: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: 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 void @_CSelfDestruct.Core.9d0db8a57c58fabc(ptr %t) #0 !dbg !77 { +// CHECK:STDOUT: ret void, !dbg !82 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !84 { +// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z20TakeGenericMethodPtrIN6Carbon4Main1CEEvMT_KFvvE(i64, i64) #4 // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } @@ -350,9 +331,9 @@ fn F() { // 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 = !{!58} -// CHECK:STDOUT: !llvm.module.flags = !{!24, !25, !26, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!29} +// CHECK:STDOUT: !llvm.dbg.cu = !{!64} +// CHECK:STDOUT: !llvm.module.flags = !{!28, !29, !30, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!33} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -361,41 +342,38 @@ fn F() { // CHECK:STDOUT: !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !9 = !{null, !8} // CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !19 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !20 = !{!"omnipotent char", !19, i64 0} -// CHECK:STDOUT: !21 = !{!"any pointer", !20, i64 0} -// CHECK:STDOUT: !22 = !{!21, !21, i64 0} -// CHECK:STDOUT: !23 = !{!20, !20, i64 0} -// CHECK:STDOUT: !24 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !25 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !26 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !27 = !{!"int", !20, i64 0} -// CHECK:STDOUT: !28 = !{!"__libc_errno", !27, i64 0} -// CHECK:STDOUT: !29 = !{!28, !27, i64 0} -// CHECK:STDOUT: !57 = !DIFile(filename: "pass_method_ptr.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: 9, type: !7, spFlags: DISPFlagDefinition, unit: !58) -// CHECK:STDOUT: !60 = !DILocation(line: 10, column: 28, scope: !59) -// CHECK:STDOUT: !61 = !DILocation(line: 10, column: 3, scope: !59) -// CHECK:STDOUT: !62 = !DILocation(line: 9, column: 1, scope: !59) -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !57, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !8) -// CHECK:STDOUT: !65 = !DILocation(line: 5, column: 1, scope: !63) -// CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !57, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !70) -// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !8) -// CHECK:STDOUT: !69 = !DILocation(line: 5, column: 1, scope: !67) -// CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core", scope: null, file: !57, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !74) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !8) -// CHECK:STDOUT: !73 = !DILocation(line: 5, column: 1, scope: !71) -// CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "Method__carbon_thunk", linkageName: "_CMethod__carbon_thunk.C.Main", scope: null, file: !57, line: 6, type: !10, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !78) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !8) -// CHECK:STDOUT: !77 = !DILocation(line: 6, column: 3, scope: !75) -// CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.659d177172b60c17:core.Destroy.Core", scope: null, file: !57, line: 10, type: !10, spFlags: DISPFlagDefinition, unit: !58, retainedNodes: !82) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !8) -// CHECK:STDOUT: !81 = !DILocation(line: 10, column: 28, scope: !79) -// CHECK:STDOUT: !82 = !{!80} +// CHECK:STDOUT: !15 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !23 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !24 = !{!"omnipotent char", !23, i64 0} +// CHECK:STDOUT: !25 = !{!"any pointer", !24, i64 0} +// CHECK:STDOUT: !26 = !{!25, !25, i64 0} +// CHECK:STDOUT: !27 = !{!24, !24, i64 0} +// CHECK:STDOUT: !28 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !29 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !30 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !31 = !{!"int", !24, i64 0} +// CHECK:STDOUT: !32 = !{!"__libc_errno", !31, i64 0} +// CHECK:STDOUT: !33 = !{!32, !31, i64 0} +// CHECK:STDOUT: !63 = !DIFile(filename: "pass_method_ptr.carbon", directory: "") +// CHECK:STDOUT: !64 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !63, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !63, line: 9, type: !7, spFlags: DISPFlagDefinition, unit: !64) +// CHECK:STDOUT: !66 = !DILocation(line: 10, column: 28, scope: !65) +// CHECK:STDOUT: !67 = !DILocation(line: 10, column: 3, scope: !65) +// CHECK:STDOUT: !68 = !DILocation(line: 9, column: 1, scope: !65) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.C.Main", scope: null, file: !63, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !64, retainedNodes: !72) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !8) +// CHECK:STDOUT: !71 = !DILocation(line: 5, column: 1, scope: !69) +// CHECK:STDOUT: !72 = !{!70} +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "Method__carbon_thunk", linkageName: "_CMethod__carbon_thunk.C.Main", scope: null, file: !63, line: 6, type: !10, spFlags: DISPFlagDefinition, unit: !64, retainedNodes: !76) +// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !8) +// CHECK:STDOUT: !75 = !DILocation(line: 6, column: 3, scope: !73) +// CHECK:STDOUT: !76 = !{!74} +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9d0db8a57c58fabc", scope: null, file: !15, line: 36, type: !10, spFlags: DISPFlagDefinition, unit: !64, retainedNodes: !83) +// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !8) +// CHECK:STDOUT: !82 = !DILocation(line: 36, column: 1, scope: !77) +// CHECK:STDOUT: !83 = !{!78} +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !15, line: 36, type: !10, spFlags: DISPFlagDefinition, unit: !64, retainedNodes: !90) +// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !8) +// CHECK:STDOUT: !89 = !DILocation(line: 36, column: 1, scope: !84) +// CHECK:STDOUT: !90 = !{!85} // 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 12ea3004370a..00c7f72cdc80 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/parameters.carbon @@ -122,22 +122,22 @@ fn PassValueExpr(y: Cpp.Y) { // 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 void @_CMyF.Main() #0 !dbg !63 { +// CHECK:STDOUT: define void @_CMyF.Main() #0 !dbg !55 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_19.3.temp = alloca i8, align 1, !dbg !64 -// CHECK:STDOUT: %.loc7_22.3.temp = alloca i16, align 2, !dbg !65 -// CHECK:STDOUT: %.loc9_21.3.temp = alloca i8, align 1, !dbg !67 -// CHECK:STDOUT: %.loc9_24.3.temp = alloca i16, align 2, !dbg !68 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_19.3.temp), !dbg !64 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_22.3.temp), !dbg !65 -// CHECK:STDOUT: call void @_Z11pass_signedasil.carbon_thunk.____(ptr @int_1.2eb, ptr @int_2.fee, i32 3, i64 4), !dbg !66 -// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr @int_2.fee), !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core"(ptr @int_1.2eb), !dbg !64 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_21.3.temp), !dbg !67 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_24.3.temp), !dbg !68 -// CHECK:STDOUT: call void @_Z13pass_unsignedhtjm.carbon_thunk.____(ptr @int_1.5dc, ptr @int_2.2d4, i32 3, i64 4), !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.8a85cde440b80916:core.Destroy.Core"(ptr @int_2.2d4), !dbg !68 -// CHECK:STDOUT: call void @"_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core"(ptr @int_1.5dc), !dbg !67 +// CHECK:STDOUT: %.loc7_19.3.temp = alloca i8, align 1, !dbg !56 +// CHECK:STDOUT: %.loc7_22.3.temp = alloca i16, align 2, !dbg !57 +// CHECK:STDOUT: %.loc9_21.3.temp = alloca i8, align 1, !dbg !63 +// CHECK:STDOUT: %.loc9_24.3.temp = alloca i16, align 2, !dbg !64 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_19.3.temp), !dbg !56 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_22.3.temp), !dbg !57 +// CHECK:STDOUT: call void @_Z11pass_signedasil.carbon_thunk.____(ptr @int_1.2eb, ptr @int_2.fee, i32 3, i64 4), !dbg !58 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e43967308dd20a9f(ptr @int_2.fee), !dbg !57 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6fb12317fdf5c9b3(ptr @int_1.2eb), !dbg !56 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_21.3.temp), !dbg !63 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_24.3.temp), !dbg !64 +// CHECK:STDOUT: call void @_Z13pass_unsignedhtjm.carbon_thunk.____(ptr @int_1.5dc, ptr @int_2.2d4, i32 3, i64 4), !dbg !65 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.44e7310a0b394feb(ptr @int_2.2d4), !dbg !64 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.73549b49ca05bf4c(ptr @int_1.5dc), !dbg !63 // CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -148,32 +148,20 @@ 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 !110 -// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !113 -// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !115 -// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !117 -// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !110 -// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !118 -// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !113 -// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !119 -// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !115 -// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !117 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !122 +// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !125 +// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !127 +// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !129 +// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !122 +// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !130 +// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !125 +// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !131 +// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !127 +// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !129 // 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: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2282b3883c44dd3d: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.76b35ac5407de20a: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: 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: @@ -181,70 +169,58 @@ 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 !110 -// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !113 -// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !115 -// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !117 -// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !110 -// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !118 -// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !113 -// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !119 -// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !115 -// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !117 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !122 +// CHECK:STDOUT: store ptr %1, ptr %.addr1, align 8, !tbaa !125 +// CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !127 +// CHECK:STDOUT: store i64 %3, ptr %.addr3, align 8, !tbaa !129 +// CHECK:STDOUT: %4 = load ptr, ptr %.addr, align 8, !tbaa !122 +// CHECK:STDOUT: %5 = load i8, ptr %4, align 1, !tbaa !130 +// CHECK:STDOUT: %6 = load ptr, ptr %.addr1, align 8, !tbaa !125 +// CHECK:STDOUT: %7 = load i16, ptr %6, align 2, !tbaa !131 +// CHECK:STDOUT: %8 = load i32, ptr %.addr2, align 4, !tbaa !127 +// CHECK:STDOUT: %9 = load i64, ptr %.addr3, align 8, !tbaa !129 // 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.8a85cde440b80916: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.ecefe2c1c010dc1e:core.Destroy.Core"(ptr %self) #0 !dbg !83 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !85 -// 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 !87 { +// CHECK:STDOUT: define void @_CPassShort.Main(i16 %a, ptr %b) #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_18.1.temp = alloca i16, align 2, !dbg !92 -// CHECK:STDOUT: %.loc18_18.3.temp = alloca i16, align 2, !dbg !95 -// CHECK:STDOUT: %.loc19_18.2.temp = alloca i16, align 2, !dbg !97 -// CHECK:STDOUT: %.loc20_28.3.temp = alloca i16, align 2, !dbg !99 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_18.1.temp), !dbg !92 -// CHECK:STDOUT: store i16 %a, ptr %.loc17_18.1.temp, align 2, !dbg !92 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc17_18.1.temp), !dbg !93 -// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %.loc17_18.1.temp), !dbg !92 -// CHECK:STDOUT: %.loc18_18.2 = load i16, ptr %b, align 2, !dbg !95 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_18.3.temp), !dbg !95 -// CHECK:STDOUT: store i16 %.loc18_18.2, ptr %.loc18_18.3.temp, align 2, !dbg !95 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc18_18.3.temp), !dbg !96 -// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %.loc18_18.3.temp), !dbg !95 -// CHECK:STDOUT: %.loc19_18.1 = load i16, ptr @_Cc.Main, align 2, !dbg !97 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_18.2.temp), !dbg !97 -// CHECK:STDOUT: store i16 %.loc19_18.1, ptr %.loc19_18.2.temp, align 2, !dbg !97 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc19_18.2.temp), !dbg !98 -// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %.loc19_18.2.temp), !dbg !97 -// CHECK:STDOUT: %MakeShort.call = call i16 @_CMakeShort.Main(), !dbg !99 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_28.3.temp), !dbg !99 -// CHECK:STDOUT: store i16 %MakeShort.call, ptr %.loc20_28.3.temp, align 2, !dbg !99 -// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc20_28.3.temp), !dbg !100 -// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %.loc20_28.3.temp), !dbg !99 -// CHECK:STDOUT: ret void, !dbg !101 +// CHECK:STDOUT: %.loc17_18.1.temp = alloca i16, align 2, !dbg !76 +// CHECK:STDOUT: %.loc18_18.3.temp = alloca i16, align 2, !dbg !79 +// CHECK:STDOUT: %.loc19_18.2.temp = alloca i16, align 2, !dbg !81 +// CHECK:STDOUT: %.loc20_28.3.temp = alloca i16, align 2, !dbg !83 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_18.1.temp), !dbg !76 +// CHECK:STDOUT: store i16 %a, ptr %.loc17_18.1.temp, align 2, !dbg !76 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc17_18.1.temp), !dbg !77 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e43967308dd20a9f(ptr %.loc17_18.1.temp), !dbg !76 +// CHECK:STDOUT: %.loc18_18.2 = load i16, ptr %b, align 2, !dbg !79 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_18.3.temp), !dbg !79 +// CHECK:STDOUT: store i16 %.loc18_18.2, ptr %.loc18_18.3.temp, align 2, !dbg !79 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc18_18.3.temp), !dbg !80 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e43967308dd20a9f(ptr %.loc18_18.3.temp), !dbg !79 +// CHECK:STDOUT: %.loc19_18.1 = load i16, ptr @_Cc.Main, align 2, !dbg !81 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_18.2.temp), !dbg !81 +// CHECK:STDOUT: store i16 %.loc19_18.1, ptr %.loc19_18.2.temp, align 2, !dbg !81 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc19_18.2.temp), !dbg !82 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e43967308dd20a9f(ptr %.loc19_18.2.temp), !dbg !81 +// CHECK:STDOUT: %MakeShort.call = call i16 @_CMakeShort.Main(), !dbg !83 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_28.3.temp), !dbg !83 +// CHECK:STDOUT: store i16 %MakeShort.call, ptr %.loc20_28.3.temp, align 2, !dbg !83 +// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc20_28.3.temp), !dbg !84 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e43967308dd20a9f(ptr %.loc20_28.3.temp), !dbg !83 +// CHECK:STDOUT: ret void, !dbg !85 // 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 !113 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !113 -// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !119 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !125 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !125 +// CHECK:STDOUT: %2 = load i16, ptr %1, align 2, !tbaa !131 // CHECK:STDOUT: call void @_Z10pass_shorts(i16 noundef signext %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -253,10 +229,30 @@ 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 !103 { +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.e43967308dd20a9f(ptr %t) #0 !dbg !90 { +// CHECK:STDOUT: ret void, !dbg !95 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6fb12317fdf5c9b3(ptr %t) #0 !dbg !97 { +// CHECK:STDOUT: ret void, !dbg !102 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.44e7310a0b394feb(ptr %t) #0 !dbg !104 { +// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.73549b49ca05bf4c(ptr %t) #0 !dbg !111 { +// CHECK:STDOUT: ret void, !dbg !116 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !87 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: store i16 poison, ptr @_Cc.Main, align 2, !dbg !104 -// CHECK:STDOUT: ret void, !dbg !105 +// CHECK:STDOUT: store i16 poison, ptr @_Cc.Main, align 2, !dbg !88 +// CHECK:STDOUT: ret void, !dbg !89 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z11pass_signedasil(i8 noundef signext, i16 noundef signext, i32 noundef, i64 noundef) #3 @@ -268,6 +264,7 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_Z10pass_shorts.carbon_thunk._, { 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 7, 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.e43967308dd20a9f, { 4, 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -275,12 +272,13 @@ 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 = !{!35} -// CHECK:STDOUT: !llvm.module.flags = !{!120, !121, !122, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!124} +// CHECK:STDOUT: !llvm.module.flags = !{!132, !133, !134, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!136} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !10 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_unsigned) +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "import_ints.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !38 = !DIBasicType(name: "int", size: 8, encoding: DW_ATE_signed) @@ -289,75 +287,75 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: !42 = !{null} // CHECK:STDOUT: !43 = !DISubroutineType(types: !42) // CHECK:STDOUT: !44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !47 = !{null, !39} -// CHECK:STDOUT: !48 = !DISubroutineType(types: !47) -// CHECK:STDOUT: !49 = !{null, !38} -// CHECK:STDOUT: !50 = !DISubroutineType(types: !49) -// CHECK:STDOUT: !53 = !{null, !41} -// CHECK:STDOUT: !54 = !DISubroutineType(types: !53) -// CHECK:STDOUT: !55 = !{null, !10} -// CHECK:STDOUT: !56 = !DISubroutineType(types: !55) -// CHECK:STDOUT: !59 = !{null, !39, !44} +// CHECK:STDOUT: !51 = !{null, !39, !44} +// CHECK:STDOUT: !52 = !DISubroutineType(types: !51) +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !34, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !56 = !DILocation(line: 7, column: 19, scope: !55) +// CHECK:STDOUT: !57 = !DILocation(line: 7, column: 22, scope: !55) +// CHECK:STDOUT: !58 = !DILocation(line: 7, column: 3, scope: !55) +// CHECK:STDOUT: !59 = !{null, !39} // CHECK:STDOUT: !60 = !DISubroutineType(types: !59) -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "MyF", linkageName: "_CMyF.Main", scope: null, file: !34, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !64 = !DILocation(line: 7, column: 19, scope: !63) -// CHECK:STDOUT: !65 = !DILocation(line: 7, column: 22, scope: !63) -// CHECK:STDOUT: !66 = !DILocation(line: 7, column: 3, scope: !63) -// CHECK:STDOUT: !67 = !DILocation(line: 9, column: 21, scope: !63) -// CHECK:STDOUT: !68 = !DILocation(line: 9, column: 24, scope: !63) -// CHECK:STDOUT: !69 = !DILocation(line: 9, column: 3, scope: !63) -// CHECK:STDOUT: !70 = !DILocation(line: 6, column: 1, scope: !63) -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core", scope: null, file: !34, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !74) +// CHECK:STDOUT: !61 = !{null, !38} +// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) +// CHECK:STDOUT: !63 = !DILocation(line: 9, column: 21, scope: !55) +// CHECK:STDOUT: !64 = !DILocation(line: 9, column: 24, scope: !55) +// CHECK:STDOUT: !65 = !DILocation(line: 9, column: 3, scope: !55) +// CHECK:STDOUT: !66 = !{null, !41} +// CHECK:STDOUT: !67 = !DISubroutineType(types: !66) +// CHECK:STDOUT: !68 = !{null, !10} +// CHECK:STDOUT: !69 = !DISubroutineType(types: !68) +// CHECK:STDOUT: !70 = !DILocation(line: 6, column: 1, scope: !55) +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "PassShort", linkageName: "_CPassShort.Main", scope: null, file: !34, line: 16, type: !52, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !86) // CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !39) -// CHECK:STDOUT: !73 = !DILocation(line: 7, column: 22, scope: !71) -// CHECK:STDOUT: !74 = !{!72} -// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core", scope: null, file: !34, line: 7, type: !50, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !78) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !38) -// CHECK:STDOUT: !77 = !DILocation(line: 7, column: 19, scope: !75) -// CHECK:STDOUT: !78 = !{!76} -// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8a85cde440b80916:core.Destroy.Core", scope: null, file: !34, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !82) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !41) -// CHECK:STDOUT: !81 = !DILocation(line: 9, column: 24, scope: !79) -// CHECK:STDOUT: !82 = !{!80} -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core", scope: null, file: !34, line: 9, type: !56, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !86) -// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !10) -// CHECK:STDOUT: !85 = !DILocation(line: 9, column: 21, scope: !83) -// CHECK:STDOUT: !86 = !{!84} -// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "PassShort", linkageName: "_CPassShort.Main", scope: null, file: !34, line: 16, type: !60, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !102) -// CHECK:STDOUT: !88 = !DILocalVariable(arg: 1, scope: !87, type: !39) -// CHECK:STDOUT: !89 = !DILocalVariable(arg: 2, scope: !87, type: !44) -// CHECK:STDOUT: !92 = !DILocation(line: 17, column: 18, scope: !87) -// CHECK:STDOUT: !93 = !DILocation(line: 17, column: 3, scope: !87) -// CHECK:STDOUT: !95 = !DILocation(line: 18, column: 18, scope: !87) -// CHECK:STDOUT: !96 = !DILocation(line: 18, column: 3, scope: !87) -// CHECK:STDOUT: !97 = !DILocation(line: 19, column: 18, scope: !87) -// CHECK:STDOUT: !98 = !DILocation(line: 19, column: 3, scope: !87) -// CHECK:STDOUT: !99 = !DILocation(line: 20, column: 18, scope: !87) -// CHECK:STDOUT: !100 = !DILocation(line: 20, column: 3, scope: !87) -// CHECK:STDOUT: !101 = !DILocation(line: 16, column: 1, scope: !87) -// CHECK:STDOUT: !102 = !{!88, !89} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !34, type: !43, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !104 = !DILocation(line: 14, column: 1, scope: !103) -// CHECK:STDOUT: !105 = !DILocation(line: 0, scope: !103) -// CHECK:STDOUT: !106 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !107 = !{!"omnipotent char", !106, i64 0} -// CHECK:STDOUT: !108 = !{!"any pointer", !107, i64 0} -// CHECK:STDOUT: !109 = !{!"p1 omnipotent char", !108, i64 0} -// CHECK:STDOUT: !110 = !{!109, !109, i64 0} -// CHECK:STDOUT: !111 = !{!"short", !107, i64 0} -// CHECK:STDOUT: !112 = !{!"p1 short", !108, i64 0} -// CHECK:STDOUT: !113 = !{!112, !112, i64 0} -// CHECK:STDOUT: !114 = !{!"int", !107, i64 0} -// CHECK:STDOUT: !115 = !{!114, !114, i64 0} -// CHECK:STDOUT: !116 = !{!"long", !107, i64 0} -// CHECK:STDOUT: !117 = !{!116, !116, i64 0} -// CHECK:STDOUT: !118 = !{!107, !107, i64 0} -// CHECK:STDOUT: !119 = !{!111, !111, i64 0} -// CHECK:STDOUT: !120 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !121 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !122 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !123 = !{!"__libc_errno", !114, i64 0} -// CHECK:STDOUT: !124 = !{!123, !114, i64 0} +// CHECK:STDOUT: !73 = !DILocalVariable(arg: 2, scope: !71, type: !44) +// CHECK:STDOUT: !76 = !DILocation(line: 17, column: 18, scope: !71) +// CHECK:STDOUT: !77 = !DILocation(line: 17, column: 3, scope: !71) +// CHECK:STDOUT: !79 = !DILocation(line: 18, column: 18, scope: !71) +// CHECK:STDOUT: !80 = !DILocation(line: 18, column: 3, scope: !71) +// CHECK:STDOUT: !81 = !DILocation(line: 19, column: 18, scope: !71) +// CHECK:STDOUT: !82 = !DILocation(line: 19, column: 3, scope: !71) +// CHECK:STDOUT: !83 = !DILocation(line: 20, column: 18, scope: !71) +// CHECK:STDOUT: !84 = !DILocation(line: 20, column: 3, scope: !71) +// CHECK:STDOUT: !85 = !DILocation(line: 16, column: 1, scope: !71) +// CHECK:STDOUT: !86 = !{!72, !73} +// CHECK:STDOUT: !87 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !34, type: !43, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !88 = !DILocation(line: 14, column: 1, scope: !87) +// CHECK:STDOUT: !89 = !DILocation(line: 0, scope: !87) +// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e43967308dd20a9f", scope: null, file: !26, line: 32, type: !60, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !96) +// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !39) +// CHECK:STDOUT: !95 = !DILocation(line: 32, column: 1, scope: !90) +// CHECK:STDOUT: !96 = !{!91} +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6fb12317fdf5c9b3", scope: null, file: !26, line: 32, type: !62, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !103) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !38) +// CHECK:STDOUT: !102 = !DILocation(line: 32, column: 1, scope: !97) +// CHECK:STDOUT: !103 = !{!98} +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.44e7310a0b394feb", scope: null, file: !26, line: 32, type: !67, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !110) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !41) +// CHECK:STDOUT: !109 = !DILocation(line: 32, column: 1, scope: !104) +// CHECK:STDOUT: !110 = !{!105} +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.73549b49ca05bf4c", scope: null, file: !26, line: 32, type: !69, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !117) +// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !10) +// CHECK:STDOUT: !116 = !DILocation(line: 32, column: 1, scope: !111) +// CHECK:STDOUT: !117 = !{!112} +// CHECK:STDOUT: !118 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !119 = !{!"omnipotent char", !118, i64 0} +// CHECK:STDOUT: !120 = !{!"any pointer", !119, i64 0} +// CHECK:STDOUT: !121 = !{!"p1 omnipotent char", !120, i64 0} +// CHECK:STDOUT: !122 = !{!121, !121, i64 0} +// CHECK:STDOUT: !123 = !{!"short", !119, i64 0} +// CHECK:STDOUT: !124 = !{!"p1 short", !120, i64 0} +// CHECK:STDOUT: !125 = !{!124, !124, i64 0} +// CHECK:STDOUT: !126 = !{!"int", !119, i64 0} +// CHECK:STDOUT: !127 = !{!126, !126, i64 0} +// CHECK:STDOUT: !128 = !{!"long", !119, i64 0} +// CHECK:STDOUT: !129 = !{!128, !128, i64 0} +// CHECK:STDOUT: !130 = !{!119, !119, i64 0} +// CHECK:STDOUT: !131 = !{!123, !123, i64 0} +// CHECK:STDOUT: !132 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !133 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !134 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !135 = !{!"__libc_errno", !126, i64 0} +// CHECK:STDOUT: !136 = !{!135, !126, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'import_struct.carbon' @@ -368,36 +366,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 !129 { +// CHECK:STDOUT: define void @_CTest.Main() #0 !dbg !141 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca [12 x i8], align 4, !dbg !130 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !130 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr %x.var), !dbg !130 -// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 0, !dbg !132 -// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !132 -// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 4, !dbg !133 -// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !133 -// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 8, !dbg !134 -// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !134 -// CHECK:STDOUT: call void @_Z11pass_struct1X.carbon_thunk._(ptr %x.var), !dbg !136 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %x.var), !dbg !130 -// CHECK:STDOUT: ret void, !dbg !137 +// CHECK:STDOUT: %x.var = alloca [12 x i8], align 4, !dbg !142 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !142 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr %x.var), !dbg !142 +// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 0, !dbg !144 +// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !144 +// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 4, !dbg !145 +// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !145 +// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %x.var, i32 0, i32 8, !dbg !146 +// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !146 +// CHECK:STDOUT: call void @_Z11pass_struct1X.carbon_thunk._(ptr %x.var), !dbg !148 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr %x.var), !dbg !142 +// CHECK:STDOUT: ret void, !dbg !149 // 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 !151 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !151 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !166 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !166 // 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 !139 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr sret([12 x i8]) %return) #2 !dbg !151 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN1XC1Ev.carbon_thunk.(ptr %return), !dbg !140 -// CHECK:STDOUT: ret void, !dbg !140 +// CHECK:STDOUT: call void @_ZN1XC1Ev.carbon_thunk.(ptr %return), !dbg !152 +// CHECK:STDOUT: ret void, !dbg !152 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -406,9 +404,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 !151 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !151 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 12, i1 false), !tbaa.struct !153 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !166 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !166 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %agg.tmp, ptr align 4 %1, i64 12, i1 false), !tbaa.struct !168 // 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 @@ -418,19 +416,18 @@ fn PassValueExpr(y: Cpp.Y) { // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71: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: 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 !145 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr %return), !dbg !148 -// CHECK:STDOUT: ret void, !dbg !149 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1"(ptr sret([12 x i8]) %return) #0 !dbg !153 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp"(ptr %return), !dbg !156 +// CHECK:STDOUT: ret void, !dbg !157 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr %t) #0 !dbg !158 { +// CHECK:STDOUT: ret void, !dbg !163 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z11pass_struct1X(i64, i32) #5 @@ -448,52 +445,53 @@ 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 = !{!126} -// CHECK:STDOUT: !llvm.module.flags = !{!120, !121, !122, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!124} +// CHECK:STDOUT: !llvm.dbg.cu = !{!138} +// CHECK:STDOUT: !llvm.module.flags = !{!132, !133, !134, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!136} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !28 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !22 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !42 = !{null} // CHECK:STDOUT: !43 = !DISubroutineType(types: !42) // CHECK:STDOUT: !44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !61 = !{null, !44} -// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) -// CHECK:STDOUT: !106 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !107 = !{!"omnipotent char", !106, i64 0} -// CHECK:STDOUT: !108 = !{!"any pointer", !107, i64 0} -// CHECK:STDOUT: !114 = !{!"int", !107, i64 0} -// CHECK:STDOUT: !115 = !{!114, !114, i64 0} -// CHECK:STDOUT: !120 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !121 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !122 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !123 = !{!"__libc_errno", !114, i64 0} -// CHECK:STDOUT: !124 = !{!123, !114, i64 0} -// CHECK:STDOUT: !125 = !DIFile(filename: "import_struct.carbon", directory: "") -// CHECK:STDOUT: !126 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !125, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !127 = !{!44} -// CHECK:STDOUT: !128 = !DISubroutineType(types: !127) -// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !125, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !126) -// CHECK:STDOUT: !130 = !DILocation(line: 7, column: 3, scope: !129) -// CHECK:STDOUT: !132 = !DILocation(line: 8, column: 3, scope: !129) -// CHECK:STDOUT: !133 = !DILocation(line: 9, column: 3, scope: !129) -// CHECK:STDOUT: !134 = !DILocation(line: 10, column: 3, scope: !129) -// CHECK:STDOUT: !136 = !DILocation(line: 11, column: 3, scope: !129) -// CHECK:STDOUT: !137 = !DILocation(line: 6, column: 1, scope: !129) -// CHECK:STDOUT: !138 = !DIFile(filename: "./struct.h", directory: "") -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp", scope: null, file: !138, line: 2, type: !128, spFlags: DISPFlagDefinition, unit: !126) -// CHECK:STDOUT: !140 = !DILocation(line: 2, column: 8, scope: !139) -// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !125, line: 7, type: !62, spFlags: DISPFlagDefinition, unit: !126, retainedNodes: !144) -// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !44) -// CHECK:STDOUT: !143 = !DILocation(line: 7, column: 3, scope: !141) -// CHECK:STDOUT: !144 = !{!142} -// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1", scope: null, file: !28, line: 9, type: !128, spFlags: DISPFlagDefinition, unit: !126) -// CHECK:STDOUT: !148 = !DILocation(line: 9, column: 28, scope: !145) -// CHECK:STDOUT: !149 = !DILocation(line: 9, column: 21, scope: !145) -// CHECK:STDOUT: !150 = !{!"p1 _ZTS1X", !108, i64 0} -// CHECK:STDOUT: !151 = !{!150, !150, i64 0} -// CHECK:STDOUT: !153 = !{i64 0, i64 4, !115, i64 4, i64 4, !115, i64 8, i64 4, !115} +// CHECK:STDOUT: !53 = !{null, !44} +// CHECK:STDOUT: !54 = !DISubroutineType(types: !53) +// CHECK:STDOUT: !118 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !119 = !{!"omnipotent char", !118, i64 0} +// CHECK:STDOUT: !120 = !{!"any pointer", !119, i64 0} +// CHECK:STDOUT: !126 = !{!"int", !119, i64 0} +// CHECK:STDOUT: !127 = !{!126, !126, i64 0} +// CHECK:STDOUT: !132 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !133 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !134 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !135 = !{!"__libc_errno", !126, i64 0} +// CHECK:STDOUT: !136 = !{!135, !126, i64 0} +// CHECK:STDOUT: !137 = !DIFile(filename: "import_struct.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 = !{!44} +// CHECK:STDOUT: !140 = !DISubroutineType(types: !139) +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !137, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !138) +// CHECK:STDOUT: !142 = !DILocation(line: 7, column: 3, scope: !141) +// CHECK:STDOUT: !144 = !DILocation(line: 8, column: 3, scope: !141) +// CHECK:STDOUT: !145 = !DILocation(line: 9, column: 3, scope: !141) +// CHECK:STDOUT: !146 = !DILocation(line: 10, column: 3, scope: !141) +// CHECK:STDOUT: !148 = !DILocation(line: 11, column: 3, scope: !141) +// CHECK:STDOUT: !149 = !DILocation(line: 6, column: 1, scope: !141) +// CHECK:STDOUT: !150 = !DIFile(filename: "./struct.h", directory: "") +// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.eed9ddf3aaac414a.Core:X.Cpp", scope: null, file: !150, line: 2, type: !140, spFlags: DISPFlagDefinition, unit: !138) +// CHECK:STDOUT: !152 = !DILocation(line: 2, column: 8, scope: !151) +// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.102476b7ae87d0a1", scope: null, file: !22, line: 9, type: !140, spFlags: DISPFlagDefinition, unit: !138) +// CHECK:STDOUT: !156 = !DILocation(line: 9, column: 28, scope: !153) +// CHECK:STDOUT: !157 = !DILocation(line: 9, column: 21, scope: !153) +// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2d682b12c0c20e08", scope: null, file: !26, line: 32, type: !54, spFlags: DISPFlagDefinition, unit: !138, retainedNodes: !164) +// CHECK:STDOUT: !159 = !DILocalVariable(arg: 1, scope: !158, type: !44) +// CHECK:STDOUT: !163 = !DILocation(line: 32, column: 1, scope: !158) +// CHECK:STDOUT: !164 = !{!159} +// CHECK:STDOUT: !165 = !{!"p1 _ZTS1X", !120, i64 0} +// CHECK:STDOUT: !166 = !{!165, !165, i64 0} +// CHECK:STDOUT: !168 = !{i64 0, i64 4, !127, i64 4, i64 4, !127, i64 8, i64 4, !127} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'import_class_with_nontrivial_copy.carbon' @@ -504,19 +502,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 !156 { +// CHECK:STDOUT: define void @_CPassRefExpr.Main() #0 !dbg !171 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %y.var = alloca [12 x i8], align 4, !dbg !157 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !157 -// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 0, !dbg !159 -// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !159 -// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 4, !dbg !160 -// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !160 -// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 8, !dbg !161 -// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !161 -// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y.var), !dbg !163 -// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %y.var), !dbg !157 -// CHECK:STDOUT: ret void, !dbg !164 +// CHECK:STDOUT: %y.var = alloca [12 x i8], align 4, !dbg !172 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !172 +// CHECK:STDOUT: %.loc8_4.a = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 0, !dbg !174 +// CHECK:STDOUT: store i32 1, ptr %.loc8_4.a, align 4, !dbg !174 +// CHECK:STDOUT: %.loc9_4.b = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 4, !dbg !175 +// CHECK:STDOUT: store i32 2, ptr %.loc9_4.b, align 4, !dbg !175 +// CHECK:STDOUT: %.loc10_4.c = getelementptr inbounds nuw [12 x i8], ptr %y.var, i32 0, i32 8, !dbg !176 +// CHECK:STDOUT: store i32 3, ptr %.loc10_4.c, align 4, !dbg !176 +// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y.var), !dbg !178 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5d1f4d5634dc3faa(ptr %y.var), !dbg !172 +// CHECK:STDOUT: ret void, !dbg !179 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -524,96 +522,97 @@ 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 !181 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !181 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !199 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !199 // 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 !165 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !167 -// 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 !169 { +// CHECK:STDOUT: define void @_CPassInitExpr.Main() #0 !dbg !180 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc17_24.1.temp = alloca [12 x i8], align 4, !dbg !170 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_24.1.temp), !dbg !170 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.loc17_24.1.temp), !dbg !170 -// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %.loc17_24.1.temp), !dbg !171 -// CHECK:STDOUT: call void @"_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core"(ptr %.loc17_24.1.temp), !dbg !170 -// CHECK:STDOUT: ret void, !dbg !172 +// CHECK:STDOUT: %.loc17_24.1.temp = alloca [12 x i8], align 4, !dbg !181 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_24.1.temp), !dbg !181 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.loc17_24.1.temp), !dbg !181 +// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %.loc17_24.1.temp), !dbg !182 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5d1f4d5634dc3faa(ptr %.loc17_24.1.temp), !dbg !181 +// CHECK:STDOUT: ret void, !dbg !183 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassValueExpr.Main(ptr %y) #0 !dbg !173 { +// CHECK:STDOUT: define void @_CPassValueExpr.Main(ptr %y) #0 !dbg !184 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y), !dbg !177 -// CHECK:STDOUT: ret void, !dbg !178 +// CHECK:STDOUT: call void @_Z11pass_struct1Y.carbon_thunk._(ptr %y), !dbg !188 +// 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)) #2 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.5d1f4d5634dc3faa(ptr %t) #0 !dbg !191 { +// CHECK:STDOUT: ret void, !dbg !196 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z11pass_struct1Y(ptr nofreeobj noundef align 4 dead_on_return dereferenceable(12)) #3 // CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZN1YC1ERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #3 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.5d1f4d5634dc3faa, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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 = { 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 = !{!155} -// CHECK:STDOUT: !llvm.module.flags = !{!120, !121, !122, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!124} +// CHECK:STDOUT: !llvm.dbg.cu = !{!170} +// CHECK:STDOUT: !llvm.module.flags = !{!132, !133, !134, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!136} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !42 = !{null} // CHECK:STDOUT: !43 = !DISubroutineType(types: !42) // CHECK:STDOUT: !44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !61 = !{null, !44} -// CHECK:STDOUT: !62 = !DISubroutineType(types: !61) -// CHECK:STDOUT: !106 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !107 = !{!"omnipotent char", !106, i64 0} -// CHECK:STDOUT: !108 = !{!"any pointer", !107, i64 0} -// CHECK:STDOUT: !114 = !{!"int", !107, i64 0} -// CHECK:STDOUT: !120 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !121 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !122 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !123 = !{!"__libc_errno", !114, i64 0} -// CHECK:STDOUT: !124 = !{!123, !114, i64 0} -// CHECK:STDOUT: !154 = !DIFile(filename: "import_class_with_nontrivial_copy.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 = distinct !DISubprogram(name: "PassRefExpr", linkageName: "_CPassRefExpr.Main", scope: null, file: !154, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !155) -// CHECK:STDOUT: !157 = !DILocation(line: 7, column: 3, scope: !156) -// CHECK:STDOUT: !159 = !DILocation(line: 8, column: 3, scope: !156) -// CHECK:STDOUT: !160 = !DILocation(line: 9, column: 3, scope: !156) -// CHECK:STDOUT: !161 = !DILocation(line: 10, column: 3, scope: !156) -// CHECK:STDOUT: !163 = !DILocation(line: 11, column: 3, scope: !156) -// CHECK:STDOUT: !164 = !DILocation(line: 6, column: 1, scope: !156) -// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.988e3d50a7ba5577:core.Destroy.Core", scope: null, file: !154, line: 7, type: !62, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !168) -// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !44) -// CHECK:STDOUT: !167 = !DILocation(line: 7, column: 3, scope: !165) -// CHECK:STDOUT: !168 = !{!166} -// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "PassInitExpr", linkageName: "_CPassInitExpr.Main", scope: null, file: !154, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !155) -// CHECK:STDOUT: !170 = !DILocation(line: 17, column: 19, scope: !169) -// CHECK:STDOUT: !171 = !DILocation(line: 17, column: 3, scope: !169) -// CHECK:STDOUT: !172 = !DILocation(line: 16, column: 1, scope: !169) -// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "PassValueExpr", linkageName: "_CPassValueExpr.Main", scope: null, file: !154, line: 20, type: !62, spFlags: DISPFlagDefinition, unit: !155, retainedNodes: !179) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !44) -// CHECK:STDOUT: !177 = !DILocation(line: 21, column: 3, scope: !173) -// CHECK:STDOUT: !178 = !DILocation(line: 20, column: 1, scope: !173) -// CHECK:STDOUT: !179 = !{!174} -// CHECK:STDOUT: !180 = !{!"p1 _ZTS1Y", !108, i64 0} -// CHECK:STDOUT: !181 = !{!180, !180, i64 0} +// CHECK:STDOUT: !53 = !{null, !44} +// CHECK:STDOUT: !54 = !DISubroutineType(types: !53) +// CHECK:STDOUT: !118 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !119 = !{!"omnipotent char", !118, i64 0} +// CHECK:STDOUT: !120 = !{!"any pointer", !119, i64 0} +// CHECK:STDOUT: !126 = !{!"int", !119, i64 0} +// CHECK:STDOUT: !132 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !133 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !134 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !135 = !{!"__libc_errno", !126, i64 0} +// CHECK:STDOUT: !136 = !{!135, !126, i64 0} +// CHECK:STDOUT: !169 = !DIFile(filename: "import_class_with_nontrivial_copy.carbon", directory: "") +// CHECK:STDOUT: !170 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !169, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "PassRefExpr", linkageName: "_CPassRefExpr.Main", scope: null, file: !169, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !170) +// CHECK:STDOUT: !172 = !DILocation(line: 7, column: 3, scope: !171) +// CHECK:STDOUT: !174 = !DILocation(line: 8, column: 3, scope: !171) +// CHECK:STDOUT: !175 = !DILocation(line: 9, column: 3, scope: !171) +// CHECK:STDOUT: !176 = !DILocation(line: 10, column: 3, scope: !171) +// CHECK:STDOUT: !178 = !DILocation(line: 11, column: 3, scope: !171) +// CHECK:STDOUT: !179 = !DILocation(line: 6, column: 1, scope: !171) +// CHECK:STDOUT: !180 = distinct !DISubprogram(name: "PassInitExpr", linkageName: "_CPassInitExpr.Main", scope: null, file: !169, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !170) +// CHECK:STDOUT: !181 = !DILocation(line: 17, column: 19, scope: !180) +// CHECK:STDOUT: !182 = !DILocation(line: 17, column: 3, scope: !180) +// CHECK:STDOUT: !183 = !DILocation(line: 16, column: 1, scope: !180) +// CHECK:STDOUT: !184 = distinct !DISubprogram(name: "PassValueExpr", linkageName: "_CPassValueExpr.Main", scope: null, file: !169, line: 20, type: !54, spFlags: DISPFlagDefinition, unit: !170, retainedNodes: !190) +// CHECK:STDOUT: !185 = !DILocalVariable(arg: 1, scope: !184, type: !44) +// CHECK:STDOUT: !188 = !DILocation(line: 21, column: 3, scope: !184) +// CHECK:STDOUT: !189 = !DILocation(line: 20, column: 1, scope: !184) +// CHECK:STDOUT: !190 = !{!185} +// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5d1f4d5634dc3faa", scope: null, file: !26, line: 32, type: !54, spFlags: DISPFlagDefinition, unit: !170, retainedNodes: !197) +// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !44) +// CHECK:STDOUT: !196 = !DILocation(line: 32, column: 1, scope: !191) +// CHECK:STDOUT: !197 = !{!192} +// CHECK:STDOUT: !198 = !{!"p1 _ZTS1Y", !120, i64 0} +// CHECK:STDOUT: !199 = !{!198, !198, 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 3bcc7eed6cbe..c21e6d97d932 100644 --- a/toolchain/lower/testdata/interop/cpp/function/import/return.carbon +++ b/toolchain/lower/testdata/interop/cpp/function/import/return.carbon @@ -119,121 +119,121 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i8 @_CGetU8.Main() #0 !dbg !53 { +// CHECK:STDOUT: define i8 @_CGetU8.Main() #0 !dbg !37 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6_40.1.temp = alloca i8, align 1, !dbg !56 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc6_40.1.temp), !dbg !56 -// CHECK:STDOUT: call void @_Z8ReturnU8v.carbon_thunk.(ptr %.loc6_40.1.temp), !dbg !56 -// CHECK:STDOUT: %0 = load i8, ptr %.loc6_40.1.temp, align 1, !dbg !57 -// CHECK:STDOUT: ret i8 %0, !dbg !57 +// CHECK:STDOUT: %.loc6_40.1.temp = alloca i8, align 1, !dbg !40 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc6_40.1.temp), !dbg !40 +// CHECK:STDOUT: call void @_Z8ReturnU8v.carbon_thunk.(ptr %.loc6_40.1.temp), !dbg !40 +// CHECK:STDOUT: %0 = load i8, ptr %.loc6_40.1.temp, align 1, !dbg !41 +// CHECK:STDOUT: ret i8 %0, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // 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 !199 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !199 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !224 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !224 // CHECK:STDOUT: %call = call noundef zeroext i8 @_Z8ReturnU8v() -// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !200 +// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !225 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CGetU16.Main() #0 !dbg !58 { +// CHECK:STDOUT: define i16 @_CGetU16.Main() #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_43.1.temp = alloca i16, align 2, !dbg !61 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_43.1.temp), !dbg !61 -// CHECK:STDOUT: call void @_Z9ReturnU16v.carbon_thunk.(ptr %.loc7_43.1.temp), !dbg !61 -// CHECK:STDOUT: %0 = load i16, ptr %.loc7_43.1.temp, align 2, !dbg !62 -// CHECK:STDOUT: ret i16 %0, !dbg !62 +// CHECK:STDOUT: %.loc7_43.1.temp = alloca i16, align 2, !dbg !45 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_43.1.temp), !dbg !45 +// CHECK:STDOUT: call void @_Z9ReturnU16v.carbon_thunk.(ptr %.loc7_43.1.temp), !dbg !45 +// CHECK:STDOUT: %0 = load i16, ptr %.loc7_43.1.temp, align 2, !dbg !46 +// CHECK:STDOUT: ret i16 %0, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // 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 !203 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !203 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !228 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !228 // CHECK:STDOUT: %call = call noundef zeroext i16 @_Z9ReturnU16v() -// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !204 +// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !229 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CGetU32.Main() #0 !dbg !63 { +// CHECK:STDOUT: define i32 @_CGetU32.Main() #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnU32.call = call i32 @_Z9ReturnU32v(), !dbg !66 -// CHECK:STDOUT: ret i32 %ReturnU32.call, !dbg !67 +// CHECK:STDOUT: %ReturnU32.call = call i32 @_Z9ReturnU32v(), !dbg !50 +// CHECK:STDOUT: ret i32 %ReturnU32.call, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef i32 @_Z9ReturnU32v() #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CGetU64.Main() #0 !dbg !68 { +// CHECK:STDOUT: define i64 @_CGetU64.Main() #0 !dbg !52 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnU64.call = call i64 @_Z9ReturnU64v(), !dbg !71 -// CHECK:STDOUT: ret i64 %ReturnU64.call, !dbg !72 +// CHECK:STDOUT: %ReturnU64.call = call i64 @_Z9ReturnU64v(), !dbg !55 +// CHECK:STDOUT: ret i64 %ReturnU64.call, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef i64 @_Z9ReturnU64v() #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i8 @_CGetI8.Main() #0 !dbg !73 { +// CHECK:STDOUT: define i8 @_CGetI8.Main() #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc11_40.1.temp = alloca i8, align 1, !dbg !76 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_40.1.temp), !dbg !76 -// CHECK:STDOUT: call void @_Z8ReturnI8v.carbon_thunk.(ptr %.loc11_40.1.temp), !dbg !76 -// CHECK:STDOUT: %0 = load i8, ptr %.loc11_40.1.temp, align 1, !dbg !77 -// CHECK:STDOUT: ret i8 %0, !dbg !77 +// CHECK:STDOUT: %.loc11_40.1.temp = alloca i8, align 1, !dbg !60 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_40.1.temp), !dbg !60 +// CHECK:STDOUT: call void @_Z8ReturnI8v.carbon_thunk.(ptr %.loc11_40.1.temp), !dbg !60 +// CHECK:STDOUT: %0 = load i8, ptr %.loc11_40.1.temp, align 1, !dbg !61 +// CHECK:STDOUT: ret i8 %0, !dbg !61 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // 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 !199 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !199 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !224 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !224 // CHECK:STDOUT: %call = call noundef signext i8 @_Z8ReturnI8v() -// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !200 +// CHECK:STDOUT: store i8 %call, ptr %0, align 1, !tbaa !225 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i16 @_CGetI16.Main() #0 !dbg !78 { +// CHECK:STDOUT: define i16 @_CGetI16.Main() #0 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc12_43.1.temp = alloca i16, align 2, !dbg !81 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_43.1.temp), !dbg !81 -// CHECK:STDOUT: call void @_Z9ReturnI16v.carbon_thunk.(ptr %.loc12_43.1.temp), !dbg !81 -// CHECK:STDOUT: %0 = load i16, ptr %.loc12_43.1.temp, align 2, !dbg !82 -// CHECK:STDOUT: ret i16 %0, !dbg !82 +// CHECK:STDOUT: %.loc12_43.1.temp = alloca i16, align 2, !dbg !65 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_43.1.temp), !dbg !65 +// CHECK:STDOUT: call void @_Z9ReturnI16v.carbon_thunk.(ptr %.loc12_43.1.temp), !dbg !65 +// CHECK:STDOUT: %0 = load i16, ptr %.loc12_43.1.temp, align 2, !dbg !66 +// CHECK:STDOUT: ret i16 %0, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // 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 !203 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !203 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !228 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !228 // CHECK:STDOUT: %call = call noundef signext i16 @_Z9ReturnI16v() -// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !204 +// CHECK:STDOUT: store i16 %call, ptr %0, align 2, !tbaa !229 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CGetI32.Main() #0 !dbg !83 { +// CHECK:STDOUT: define i32 @_CGetI32.Main() #0 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnI32.call = call i32 @_Z9ReturnI32v(), !dbg !86 -// CHECK:STDOUT: ret i32 %ReturnI32.call, !dbg !87 +// CHECK:STDOUT: %ReturnI32.call = call i32 @_Z9ReturnI32v(), !dbg !70 +// CHECK:STDOUT: ret i32 %ReturnI32.call, !dbg !71 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef i32 @_Z9ReturnI32v() #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i64 @_CGetI64.Main() #0 !dbg !88 { +// CHECK:STDOUT: define i64 @_CGetI64.Main() #0 !dbg !72 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnI64.call = call i64 @_Z9ReturnI64v(), !dbg !91 -// CHECK:STDOUT: ret i64 %ReturnI64.call, !dbg !92 +// CHECK:STDOUT: %ReturnI64.call = call i64 @_Z9ReturnI64v(), !dbg !75 +// CHECK:STDOUT: ret i64 %ReturnI64.call, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef i64 @_Z9ReturnI64v() #2 @@ -241,138 +241,130 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: declare void @_CUse.Main(i8, i16, i32, i64, i8, i16, i32, i64) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CLets.Main() #0 !dbg !93 { +// CHECK:STDOUT: define void @_CLets.Main() #0 !dbg !77 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc19_32.1.temp = alloca i8, align 1, !dbg !94 -// CHECK:STDOUT: %.loc20_35.1.temp = alloca i16, align 2, !dbg !97 -// CHECK:STDOUT: %.loc24_32.1.temp = alloca i8, align 1, !dbg !106 -// CHECK:STDOUT: %.loc25_35.1.temp = alloca i16, align 2, !dbg !109 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_32.1.temp), !dbg !94 -// CHECK:STDOUT: call void @_Z8ReturnU8v.carbon_thunk.(ptr %.loc19_32.1.temp), !dbg !94 -// CHECK:STDOUT: %.loc19_32.4 = load i8, ptr %.loc19_32.1.temp, align 1, !dbg !94 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_35.1.temp), !dbg !97 -// CHECK:STDOUT: call void @_Z9ReturnU16v.carbon_thunk.(ptr %.loc20_35.1.temp), !dbg !97 -// CHECK:STDOUT: %.loc20_35.4 = load i16, ptr %.loc20_35.1.temp, align 2, !dbg !97 -// CHECK:STDOUT: %ReturnU32.call = call i32 @_Z9ReturnU32v(), !dbg !100 -// CHECK:STDOUT: %ReturnU64.call = call i64 @_Z9ReturnU64v(), !dbg !103 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_32.1.temp), !dbg !106 -// CHECK:STDOUT: call void @_Z8ReturnI8v.carbon_thunk.(ptr %.loc24_32.1.temp), !dbg !106 -// CHECK:STDOUT: %.loc24_32.4 = load i8, ptr %.loc24_32.1.temp, align 1, !dbg !106 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_35.1.temp), !dbg !109 -// CHECK:STDOUT: call void @_Z9ReturnI16v.carbon_thunk.(ptr %.loc25_35.1.temp), !dbg !109 -// CHECK:STDOUT: %.loc25_35.4 = load i16, ptr %.loc25_35.1.temp, align 2, !dbg !109 -// CHECK:STDOUT: %ReturnI32.call = call i32 @_Z9ReturnI32v(), !dbg !112 -// CHECK:STDOUT: %ReturnI64.call = call i64 @_Z9ReturnI64v(), !dbg !115 -// CHECK:STDOUT: call void @_CUse.Main(i8 %.loc19_32.4, i16 %.loc20_35.4, i32 %ReturnU32.call, i64 %ReturnU64.call, i8 %.loc24_32.4, i16 %.loc25_35.4, i32 %ReturnI32.call, i64 %ReturnI64.call), !dbg !126 -// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %.loc25_35.1.temp), !dbg !109 -// CHECK:STDOUT: call void @"_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core"(ptr %.loc24_32.1.temp), !dbg !106 -// CHECK:STDOUT: call void @"_CSelfDestruct.8a85cde440b80916:core.Destroy.Core"(ptr %.loc20_35.1.temp), !dbg !97 -// CHECK:STDOUT: call void @"_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core"(ptr %.loc19_32.1.temp), !dbg !94 -// CHECK:STDOUT: ret void, !dbg !127 +// CHECK:STDOUT: %.loc19_32.1.temp = alloca i8, align 1, !dbg !78 +// CHECK:STDOUT: %.loc20_35.1.temp = alloca i16, align 2, !dbg !81 +// CHECK:STDOUT: %.loc24_32.1.temp = alloca i8, align 1, !dbg !90 +// CHECK:STDOUT: %.loc25_35.1.temp = alloca i16, align 2, !dbg !93 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_32.1.temp), !dbg !78 +// CHECK:STDOUT: call void @_Z8ReturnU8v.carbon_thunk.(ptr %.loc19_32.1.temp), !dbg !78 +// CHECK:STDOUT: %.loc19_32.4 = load i8, ptr %.loc19_32.1.temp, align 1, !dbg !78 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_35.1.temp), !dbg !81 +// CHECK:STDOUT: call void @_Z9ReturnU16v.carbon_thunk.(ptr %.loc20_35.1.temp), !dbg !81 +// CHECK:STDOUT: %.loc20_35.4 = load i16, ptr %.loc20_35.1.temp, align 2, !dbg !81 +// CHECK:STDOUT: %ReturnU32.call = call i32 @_Z9ReturnU32v(), !dbg !84 +// CHECK:STDOUT: %ReturnU64.call = call i64 @_Z9ReturnU64v(), !dbg !87 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_32.1.temp), !dbg !90 +// CHECK:STDOUT: call void @_Z8ReturnI8v.carbon_thunk.(ptr %.loc24_32.1.temp), !dbg !90 +// CHECK:STDOUT: %.loc24_32.4 = load i8, ptr %.loc24_32.1.temp, align 1, !dbg !90 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_35.1.temp), !dbg !93 +// CHECK:STDOUT: call void @_Z9ReturnI16v.carbon_thunk.(ptr %.loc25_35.1.temp), !dbg !93 +// CHECK:STDOUT: %.loc25_35.4 = load i16, ptr %.loc25_35.1.temp, align 2, !dbg !93 +// CHECK:STDOUT: %ReturnI32.call = call i32 @_Z9ReturnI32v(), !dbg !96 +// CHECK:STDOUT: %ReturnI64.call = call i64 @_Z9ReturnI64v(), !dbg !99 +// CHECK:STDOUT: call void @_CUse.Main(i8 %.loc19_32.4, i16 %.loc20_35.4, i32 %ReturnU32.call, i64 %ReturnU64.call, i8 %.loc24_32.4, i16 %.loc25_35.4, i32 %ReturnI32.call, i64 %ReturnI64.call), !dbg !110 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e43967308dd20a9f(ptr %.loc25_35.1.temp), !dbg !93 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6fb12317fdf5c9b3(ptr %.loc24_32.1.temp), !dbg !90 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.44e7310a0b394feb(ptr %.loc20_35.1.temp), !dbg !81 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.73549b49ca05bf4c(ptr %.loc19_32.1.temp), !dbg !78 +// CHECK:STDOUT: ret void, !dbg !119 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %self) #0 !dbg !128 { +// CHECK:STDOUT: define void @_CVars.Main() #0 !dbg !120 { // 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.76b35ac5407de20a: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.8a85cde440b80916: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.ecefe2c1c010dc1e: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 void @_CVars.Main() #0 !dbg !144 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %my_u8.var = alloca i8, align 1, !dbg !145 -// CHECK:STDOUT: %my_u16.var = alloca i16, align 2, !dbg !148 -// CHECK:STDOUT: %my_u32.var = alloca i32, align 4, !dbg !151 -// CHECK:STDOUT: %my_u64.var = alloca i64, align 8, !dbg !154 -// CHECK:STDOUT: %my_i8.var = alloca i8, align 1, !dbg !157 -// CHECK:STDOUT: %my_i16.var = alloca i16, align 2, !dbg !160 -// CHECK:STDOUT: %my_i32.var = alloca i32, align 4, !dbg !163 -// CHECK:STDOUT: %my_i64.var = alloca i64, align 8, !dbg !166 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u8.var), !dbg !145 -// CHECK:STDOUT: call void @_Z8ReturnU8v.carbon_thunk.(ptr %my_u8.var), !dbg !146 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u16.var), !dbg !148 -// CHECK:STDOUT: call void @_Z9ReturnU16v.carbon_thunk.(ptr %my_u16.var), !dbg !149 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u32.var), !dbg !151 -// CHECK:STDOUT: %ReturnU32.call = call i32 @_Z9ReturnU32v(), !dbg !152 -// CHECK:STDOUT: store i32 %ReturnU32.call, ptr %my_u32.var, align 4, !dbg !151 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u64.var), !dbg !154 -// CHECK:STDOUT: %ReturnU64.call = call i64 @_Z9ReturnU64v(), !dbg !155 -// CHECK:STDOUT: store i64 %ReturnU64.call, ptr %my_u64.var, align 8, !dbg !154 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i8.var), !dbg !157 -// CHECK:STDOUT: call void @_Z8ReturnI8v.carbon_thunk.(ptr %my_i8.var), !dbg !158 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i16.var), !dbg !160 -// CHECK:STDOUT: call void @_Z9ReturnI16v.carbon_thunk.(ptr %my_i16.var), !dbg !161 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i32.var), !dbg !163 -// CHECK:STDOUT: %ReturnI32.call = call i32 @_Z9ReturnI32v(), !dbg !164 -// CHECK:STDOUT: store i32 %ReturnI32.call, ptr %my_i32.var, align 4, !dbg !163 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i64.var), !dbg !166 -// CHECK:STDOUT: %ReturnI64.call = call i64 @_Z9ReturnI64v(), !dbg !167 -// CHECK:STDOUT: store i64 %ReturnI64.call, ptr %my_i64.var, align 8, !dbg !166 -// CHECK:STDOUT: %.loc43_7 = load i8, ptr %my_u8.var, align 1, !dbg !169 -// CHECK:STDOUT: %.loc43_14 = load i16, ptr %my_u16.var, align 2, !dbg !170 -// CHECK:STDOUT: %.loc43_22 = load i32, ptr %my_u32.var, align 4, !dbg !171 -// CHECK:STDOUT: %.loc43_30 = load i64, ptr %my_u64.var, align 8, !dbg !172 -// CHECK:STDOUT: %.loc43_38 = load i8, ptr %my_i8.var, align 1, !dbg !173 -// CHECK:STDOUT: %.loc43_45 = load i16, ptr %my_i16.var, align 2, !dbg !174 -// CHECK:STDOUT: %.loc43_53 = load i32, ptr %my_i32.var, align 4, !dbg !175 -// CHECK:STDOUT: %.loc43_61 = load i64, ptr %my_i64.var, align 8, !dbg !176 -// 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 !177 -// CHECK:STDOUT: call void @"_CSelfDestruct.1528c87a0c8e3d39:core.Destroy.Core"(ptr %my_i64.var), !dbg !166 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %my_i32.var), !dbg !163 -// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %my_i16.var), !dbg !160 -// CHECK:STDOUT: call void @"_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core"(ptr %my_i8.var), !dbg !157 -// CHECK:STDOUT: call void @"_CSelfDestruct.92d33a575b583425:core.Destroy.Core"(ptr %my_u64.var), !dbg !154 -// CHECK:STDOUT: call void @"_CSelfDestruct.f9ba3945b52cc4dc:core.Destroy.Core"(ptr %my_u32.var), !dbg !151 -// CHECK:STDOUT: call void @"_CSelfDestruct.8a85cde440b80916:core.Destroy.Core"(ptr %my_u16.var), !dbg !148 -// CHECK:STDOUT: call void @"_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core"(ptr %my_u8.var), !dbg !145 -// CHECK:STDOUT: ret void, !dbg !178 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1528c87a0c8e3d39: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.72395be3dbbe8946: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.92d33a575b583425:core.Destroy.Core"(ptr %self) #0 !dbg !187 { -// 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.f9ba3945b52cc4dc:core.Destroy.Core"(ptr %self) #0 !dbg !191 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !193 +// CHECK:STDOUT: %my_u8.var = alloca i8, align 1, !dbg !121 +// CHECK:STDOUT: %my_u16.var = alloca i16, align 2, !dbg !124 +// CHECK:STDOUT: %my_u32.var = alloca i32, align 4, !dbg !127 +// CHECK:STDOUT: %my_u64.var = alloca i64, align 8, !dbg !130 +// CHECK:STDOUT: %my_i8.var = alloca i8, align 1, !dbg !133 +// CHECK:STDOUT: %my_i16.var = alloca i16, align 2, !dbg !136 +// CHECK:STDOUT: %my_i32.var = alloca i32, align 4, !dbg !139 +// CHECK:STDOUT: %my_i64.var = alloca i64, align 8, !dbg !142 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u8.var), !dbg !121 +// CHECK:STDOUT: call void @_Z8ReturnU8v.carbon_thunk.(ptr %my_u8.var), !dbg !122 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u16.var), !dbg !124 +// CHECK:STDOUT: call void @_Z9ReturnU16v.carbon_thunk.(ptr %my_u16.var), !dbg !125 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u32.var), !dbg !127 +// CHECK:STDOUT: %ReturnU32.call = call i32 @_Z9ReturnU32v(), !dbg !128 +// CHECK:STDOUT: store i32 %ReturnU32.call, ptr %my_u32.var, align 4, !dbg !127 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_u64.var), !dbg !130 +// CHECK:STDOUT: %ReturnU64.call = call i64 @_Z9ReturnU64v(), !dbg !131 +// CHECK:STDOUT: store i64 %ReturnU64.call, ptr %my_u64.var, align 8, !dbg !130 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i8.var), !dbg !133 +// CHECK:STDOUT: call void @_Z8ReturnI8v.carbon_thunk.(ptr %my_i8.var), !dbg !134 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i16.var), !dbg !136 +// CHECK:STDOUT: call void @_Z9ReturnI16v.carbon_thunk.(ptr %my_i16.var), !dbg !137 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i32.var), !dbg !139 +// CHECK:STDOUT: %ReturnI32.call = call i32 @_Z9ReturnI32v(), !dbg !140 +// CHECK:STDOUT: store i32 %ReturnI32.call, ptr %my_i32.var, align 4, !dbg !139 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %my_i64.var), !dbg !142 +// CHECK:STDOUT: %ReturnI64.call = call i64 @_Z9ReturnI64v(), !dbg !143 +// CHECK:STDOUT: store i64 %ReturnI64.call, ptr %my_i64.var, align 8, !dbg !142 +// CHECK:STDOUT: %.loc43_7 = load i8, ptr %my_u8.var, align 1, !dbg !145 +// CHECK:STDOUT: %.loc43_14 = load i16, ptr %my_u16.var, align 2, !dbg !146 +// CHECK:STDOUT: %.loc43_22 = load i32, ptr %my_u32.var, align 4, !dbg !147 +// CHECK:STDOUT: %.loc43_30 = load i64, ptr %my_u64.var, align 8, !dbg !148 +// CHECK:STDOUT: %.loc43_38 = load i8, ptr %my_i8.var, align 1, !dbg !149 +// CHECK:STDOUT: %.loc43_45 = load i16, ptr %my_i16.var, align 2, !dbg !150 +// CHECK:STDOUT: %.loc43_53 = load i32, ptr %my_i32.var, align 4, !dbg !151 +// CHECK:STDOUT: %.loc43_61 = load i64, ptr %my_i64.var, align 8, !dbg !152 +// 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 !153 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e9df21fc3951ad1(ptr %my_i64.var), !dbg !142 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %my_i32.var), !dbg !139 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e43967308dd20a9f(ptr %my_i16.var), !dbg !136 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6fb12317fdf5c9b3(ptr %my_i8.var), !dbg !133 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.3266e5c7a8b68ec1(ptr %my_u64.var), !dbg !130 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ff339b9821763c59(ptr %my_u32.var), !dbg !127 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.44e7310a0b394feb(ptr %my_u16.var), !dbg !124 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.73549b49ca05bf4c(ptr %my_u8.var), !dbg !121 +// CHECK:STDOUT: ret void, !dbg !162 // 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 void @_CSelfDestruct.Core.e43967308dd20a9f(ptr %t) #0 !dbg !164 { +// CHECK:STDOUT: ret void, !dbg !169 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6fb12317fdf5c9b3(ptr %t) #0 !dbg !171 { +// CHECK:STDOUT: ret void, !dbg !176 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.44e7310a0b394feb(ptr %t) #0 !dbg !178 { +// CHECK:STDOUT: ret void, !dbg !183 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.73549b49ca05bf4c(ptr %t) #0 !dbg !185 { +// CHECK:STDOUT: ret void, !dbg !190 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.7e9df21fc3951ad1(ptr %t) #0 !dbg !192 { +// CHECK:STDOUT: ret void, !dbg !197 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !199 { +// CHECK:STDOUT: ret void, !dbg !204 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.3266e5c7a8b68ec1(ptr %t) #0 !dbg !206 { +// CHECK:STDOUT: ret void, !dbg !211 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ff339b9821763c59(ptr %t) #0 !dbg !213 { +// CHECK:STDOUT: ret void, !dbg !218 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare noundef zeroext i8 @_Z8ReturnU8v() #2 // CHECK:STDOUT: // CHECK:STDOUT: declare noundef zeroext i16 @_Z9ReturnU16v() #2 @@ -383,6 +375,10 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.e43967308dd20a9f, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6fb12317fdf5c9b3, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.44e7310a0b394feb, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.73549b49ca05bf4c, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -390,8 +386,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 = !{!205, !206, !207, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!210} +// CHECK:STDOUT: !llvm.module.flags = !{!230, !231, !232, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!235} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -423,132 +419,133 @@ fn Call(x: Cpp.D) -> Cpp.C { // CHECK:STDOUT: !32 = !DISubroutineType(types: !31) // CHECK:STDOUT: !35 = !{null} // CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !{null, !11} -// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !{null, !10} -// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !41 = !{null, !7} -// CHECK:STDOUT: !42 = !DISubroutineType(types: !41) -// CHECK:STDOUT: !43 = !{null, !6} -// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) -// CHECK:STDOUT: !45 = !{null, !13} -// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) -// CHECK:STDOUT: !47 = !{null, !12} -// CHECK:STDOUT: !48 = !DISubroutineType(types: !47) -// CHECK:STDOUT: !49 = !{null, !9} -// CHECK:STDOUT: !50 = !DISubroutineType(types: !49) -// CHECK:STDOUT: !51 = !{null, !8} -// CHECK:STDOUT: !52 = !DISubroutineType(types: !51) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "GetU8", linkageName: "_CGetU8.Main", scope: null, file: !4, line: 6, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !56 = !DILocation(line: 6, column: 27, scope: !53) -// CHECK:STDOUT: !57 = !DILocation(line: 6, column: 20, scope: !53) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "GetU16", linkageName: "_CGetU16.Main", scope: null, file: !4, line: 7, type: !20, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !61 = !DILocation(line: 7, column: 29, scope: !58) -// CHECK:STDOUT: !62 = !DILocation(line: 7, column: 22, scope: !58) -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "GetU32", linkageName: "_CGetU32.Main", scope: null, file: !4, line: 8, type: !22, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !66 = !DILocation(line: 8, column: 29, scope: !63) -// CHECK:STDOUT: !67 = !DILocation(line: 8, column: 22, scope: !63) -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "GetU64", linkageName: "_CGetU64.Main", scope: null, file: !4, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !71 = !DILocation(line: 9, column: 29, scope: !68) -// CHECK:STDOUT: !72 = !DILocation(line: 9, column: 22, scope: !68) -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "GetI8", linkageName: "_CGetI8.Main", scope: null, file: !4, line: 11, type: !26, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !76 = !DILocation(line: 11, column: 27, scope: !73) -// CHECK:STDOUT: !77 = !DILocation(line: 11, column: 20, scope: !73) -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "GetI16", linkageName: "_CGetI16.Main", scope: null, file: !4, line: 12, type: !28, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !81 = !DILocation(line: 12, column: 29, scope: !78) -// CHECK:STDOUT: !82 = !DILocation(line: 12, column: 22, scope: !78) -// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "GetI32", linkageName: "_CGetI32.Main", scope: null, file: !4, line: 13, type: !30, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !86 = !DILocation(line: 13, column: 29, scope: !83) -// CHECK:STDOUT: !87 = !DILocation(line: 13, column: 22, scope: !83) -// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "GetI64", linkageName: "_CGetI64.Main", scope: null, file: !4, line: 14, type: !32, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !91 = !DILocation(line: 14, column: 29, scope: !88) -// CHECK:STDOUT: !92 = !DILocation(line: 14, column: 22, scope: !88) -// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "Lets", linkageName: "_CLets.Main", scope: null, file: !4, line: 18, type: !36, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !94 = !DILocation(line: 19, column: 19, scope: !93) -// CHECK:STDOUT: !97 = !DILocation(line: 20, column: 21, scope: !93) -// CHECK:STDOUT: !100 = !DILocation(line: 21, column: 21, scope: !93) -// CHECK:STDOUT: !103 = !DILocation(line: 22, column: 21, scope: !93) -// CHECK:STDOUT: !106 = !DILocation(line: 24, column: 19, scope: !93) -// CHECK:STDOUT: !109 = !DILocation(line: 25, column: 21, scope: !93) -// CHECK:STDOUT: !112 = !DILocation(line: 26, column: 21, scope: !93) -// CHECK:STDOUT: !115 = !DILocation(line: 27, column: 21, scope: !93) -// CHECK:STDOUT: !126 = !DILocation(line: 29, column: 3, scope: !93) -// CHECK:STDOUT: !127 = !DILocation(line: 18, column: 1, scope: !93) -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core", scope: null, file: !4, line: 25, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !131) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135) -// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !10) -// CHECK:STDOUT: !134 = !DILocation(line: 24, column: 19, scope: !132) -// CHECK:STDOUT: !135 = !{!133} -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8a85cde440b80916:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !7) -// CHECK:STDOUT: !138 = !DILocation(line: 20, column: 21, scope: !136) -// CHECK:STDOUT: !139 = !{!137} -// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !143) -// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !6) -// CHECK:STDOUT: !142 = !DILocation(line: 19, column: 19, scope: !140) -// CHECK:STDOUT: !143 = !{!141} -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "Vars", linkageName: "_CVars.Main", scope: null, file: !4, line: 32, type: !36, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !145 = !DILocation(line: 33, column: 3, scope: !144) -// CHECK:STDOUT: !146 = !DILocation(line: 33, column: 19, scope: !144) -// CHECK:STDOUT: !148 = !DILocation(line: 34, column: 3, scope: !144) -// CHECK:STDOUT: !149 = !DILocation(line: 34, column: 21, scope: !144) -// CHECK:STDOUT: !151 = !DILocation(line: 35, column: 3, scope: !144) -// CHECK:STDOUT: !152 = !DILocation(line: 35, column: 21, scope: !144) -// CHECK:STDOUT: !154 = !DILocation(line: 36, column: 3, scope: !144) -// CHECK:STDOUT: !155 = !DILocation(line: 36, column: 21, scope: !144) -// CHECK:STDOUT: !157 = !DILocation(line: 38, column: 3, scope: !144) -// CHECK:STDOUT: !158 = !DILocation(line: 38, column: 19, scope: !144) -// CHECK:STDOUT: !160 = !DILocation(line: 39, column: 3, scope: !144) -// CHECK:STDOUT: !161 = !DILocation(line: 39, column: 21, scope: !144) -// CHECK:STDOUT: !163 = !DILocation(line: 40, column: 3, scope: !144) -// CHECK:STDOUT: !164 = !DILocation(line: 40, column: 21, scope: !144) -// CHECK:STDOUT: !166 = !DILocation(line: 41, column: 3, scope: !144) -// CHECK:STDOUT: !167 = !DILocation(line: 41, column: 21, scope: !144) -// CHECK:STDOUT: !169 = !DILocation(line: 43, column: 7, scope: !144) -// CHECK:STDOUT: !170 = !DILocation(line: 43, column: 14, scope: !144) -// CHECK:STDOUT: !171 = !DILocation(line: 43, column: 22, scope: !144) -// CHECK:STDOUT: !172 = !DILocation(line: 43, column: 30, scope: !144) -// CHECK:STDOUT: !173 = !DILocation(line: 43, column: 38, scope: !144) -// CHECK:STDOUT: !174 = !DILocation(line: 43, column: 45, scope: !144) -// CHECK:STDOUT: !175 = !DILocation(line: 43, column: 53, scope: !144) -// CHECK:STDOUT: !176 = !DILocation(line: 43, column: 61, scope: !144) -// CHECK:STDOUT: !177 = !DILocation(line: 43, column: 3, scope: !144) -// CHECK:STDOUT: !178 = !DILocation(line: 32, column: 1, scope: !144) -// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1528c87a0c8e3d39:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !182) -// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !13) -// CHECK:STDOUT: !181 = !DILocation(line: 41, column: 3, scope: !179) -// CHECK:STDOUT: !182 = !{!180} -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !186) -// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !12) -// CHECK:STDOUT: !185 = !DILocation(line: 40, column: 3, scope: !183) -// CHECK:STDOUT: !186 = !{!184} -// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.92d33a575b583425:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !190) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !9) -// CHECK:STDOUT: !189 = !DILocation(line: 36, column: 3, scope: !187) -// CHECK:STDOUT: !190 = !{!188} -// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f9ba3945b52cc4dc:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !194) -// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !8) -// CHECK:STDOUT: !193 = !DILocation(line: 35, column: 3, scope: !191) -// CHECK:STDOUT: !194 = !{!192} -// CHECK:STDOUT: !195 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !196 = !{!"omnipotent char", !195, i64 0} -// CHECK:STDOUT: !197 = !{!"any pointer", !196, i64 0} -// CHECK:STDOUT: !198 = !{!"p1 omnipotent char", !197, i64 0} -// CHECK:STDOUT: !199 = !{!198, !198, i64 0} -// CHECK:STDOUT: !200 = !{!196, !196, i64 0} -// CHECK:STDOUT: !201 = !{!"short", !196, i64 0} -// CHECK:STDOUT: !202 = !{!"p1 short", !197, i64 0} -// CHECK:STDOUT: !203 = !{!202, !202, i64 0} -// CHECK:STDOUT: !204 = !{!201, !201, i64 0} -// CHECK:STDOUT: !205 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !206 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !207 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !208 = !{!"int", !196, i64 0} -// CHECK:STDOUT: !209 = !{!"__libc_errno", !208, i64 0} -// CHECK:STDOUT: !210 = !{!209, !208, i64 0} +// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "GetU8", linkageName: "_CGetU8.Main", scope: null, file: !4, line: 6, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !40 = !DILocation(line: 6, column: 27, scope: !37) +// CHECK:STDOUT: !41 = !DILocation(line: 6, column: 20, scope: !37) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "GetU16", linkageName: "_CGetU16.Main", scope: null, file: !4, line: 7, type: !20, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !45 = !DILocation(line: 7, column: 29, scope: !42) +// CHECK:STDOUT: !46 = !DILocation(line: 7, column: 22, scope: !42) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "GetU32", linkageName: "_CGetU32.Main", scope: null, file: !4, line: 8, type: !22, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !50 = !DILocation(line: 8, column: 29, scope: !47) +// CHECK:STDOUT: !51 = !DILocation(line: 8, column: 22, scope: !47) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "GetU64", linkageName: "_CGetU64.Main", scope: null, file: !4, line: 9, type: !24, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !55 = !DILocation(line: 9, column: 29, scope: !52) +// CHECK:STDOUT: !56 = !DILocation(line: 9, column: 22, scope: !52) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "GetI8", linkageName: "_CGetI8.Main", scope: null, file: !4, line: 11, type: !26, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !60 = !DILocation(line: 11, column: 27, scope: !57) +// CHECK:STDOUT: !61 = !DILocation(line: 11, column: 20, scope: !57) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "GetI16", linkageName: "_CGetI16.Main", scope: null, file: !4, line: 12, type: !28, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !65 = !DILocation(line: 12, column: 29, scope: !62) +// CHECK:STDOUT: !66 = !DILocation(line: 12, column: 22, scope: !62) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "GetI32", linkageName: "_CGetI32.Main", scope: null, file: !4, line: 13, type: !30, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !70 = !DILocation(line: 13, column: 29, scope: !67) +// CHECK:STDOUT: !71 = !DILocation(line: 13, column: 22, scope: !67) +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "GetI64", linkageName: "_CGetI64.Main", scope: null, file: !4, line: 14, type: !32, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !75 = !DILocation(line: 14, column: 29, scope: !72) +// CHECK:STDOUT: !76 = !DILocation(line: 14, column: 22, scope: !72) +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "Lets", linkageName: "_CLets.Main", scope: null, file: !4, line: 18, type: !36, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !78 = !DILocation(line: 19, column: 19, scope: !77) +// CHECK:STDOUT: !81 = !DILocation(line: 20, column: 21, scope: !77) +// CHECK:STDOUT: !84 = !DILocation(line: 21, column: 21, scope: !77) +// CHECK:STDOUT: !87 = !DILocation(line: 22, column: 21, scope: !77) +// CHECK:STDOUT: !90 = !DILocation(line: 24, column: 19, scope: !77) +// CHECK:STDOUT: !93 = !DILocation(line: 25, column: 21, scope: !77) +// CHECK:STDOUT: !96 = !DILocation(line: 26, column: 21, scope: !77) +// CHECK:STDOUT: !99 = !DILocation(line: 27, column: 21, scope: !77) +// CHECK:STDOUT: !110 = !DILocation(line: 29, column: 3, scope: !77) +// CHECK:STDOUT: !111 = !{null, !11} +// CHECK:STDOUT: !112 = !DISubroutineType(types: !111) +// CHECK:STDOUT: !113 = !{null, !10} +// CHECK:STDOUT: !114 = !DISubroutineType(types: !113) +// CHECK:STDOUT: !115 = !{null, !7} +// CHECK:STDOUT: !116 = !DISubroutineType(types: !115) +// CHECK:STDOUT: !117 = !{null, !6} +// CHECK:STDOUT: !118 = !DISubroutineType(types: !117) +// CHECK:STDOUT: !119 = !DILocation(line: 18, column: 1, scope: !77) +// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "Vars", linkageName: "_CVars.Main", scope: null, file: !4, line: 32, type: !36, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !121 = !DILocation(line: 33, column: 3, scope: !120) +// CHECK:STDOUT: !122 = !DILocation(line: 33, column: 19, scope: !120) +// CHECK:STDOUT: !124 = !DILocation(line: 34, column: 3, scope: !120) +// CHECK:STDOUT: !125 = !DILocation(line: 34, column: 21, scope: !120) +// CHECK:STDOUT: !127 = !DILocation(line: 35, column: 3, scope: !120) +// CHECK:STDOUT: !128 = !DILocation(line: 35, column: 21, scope: !120) +// CHECK:STDOUT: !130 = !DILocation(line: 36, column: 3, scope: !120) +// CHECK:STDOUT: !131 = !DILocation(line: 36, column: 21, scope: !120) +// CHECK:STDOUT: !133 = !DILocation(line: 38, column: 3, scope: !120) +// CHECK:STDOUT: !134 = !DILocation(line: 38, column: 19, scope: !120) +// CHECK:STDOUT: !136 = !DILocation(line: 39, column: 3, scope: !120) +// CHECK:STDOUT: !137 = !DILocation(line: 39, column: 21, scope: !120) +// CHECK:STDOUT: !139 = !DILocation(line: 40, column: 3, scope: !120) +// CHECK:STDOUT: !140 = !DILocation(line: 40, column: 21, scope: !120) +// CHECK:STDOUT: !142 = !DILocation(line: 41, column: 3, scope: !120) +// CHECK:STDOUT: !143 = !DILocation(line: 41, column: 21, scope: !120) +// CHECK:STDOUT: !145 = !DILocation(line: 43, column: 7, scope: !120) +// CHECK:STDOUT: !146 = !DILocation(line: 43, column: 14, scope: !120) +// CHECK:STDOUT: !147 = !DILocation(line: 43, column: 22, scope: !120) +// CHECK:STDOUT: !148 = !DILocation(line: 43, column: 30, scope: !120) +// CHECK:STDOUT: !149 = !DILocation(line: 43, column: 38, scope: !120) +// CHECK:STDOUT: !150 = !DILocation(line: 43, column: 45, scope: !120) +// CHECK:STDOUT: !151 = !DILocation(line: 43, column: 53, scope: !120) +// CHECK:STDOUT: !152 = !DILocation(line: 43, column: 61, scope: !120) +// CHECK:STDOUT: !153 = !DILocation(line: 43, column: 3, scope: !120) +// CHECK:STDOUT: !154 = !{null, !13} +// CHECK:STDOUT: !155 = !DISubroutineType(types: !154) +// CHECK:STDOUT: !156 = !{null, !12} +// CHECK:STDOUT: !157 = !DISubroutineType(types: !156) +// CHECK:STDOUT: !158 = !{null, !9} +// CHECK:STDOUT: !159 = !DISubroutineType(types: !158) +// CHECK:STDOUT: !160 = !{null, !8} +// CHECK:STDOUT: !161 = !DISubroutineType(types: !160) +// CHECK:STDOUT: !162 = !DILocation(line: 32, column: 1, scope: !120) +// CHECK:STDOUT: !163 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e43967308dd20a9f", scope: null, file: !163, line: 36, type: !112, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !170) +// CHECK:STDOUT: !165 = !DILocalVariable(arg: 1, scope: !164, type: !11) +// CHECK:STDOUT: !169 = !DILocation(line: 36, column: 1, scope: !164) +// CHECK:STDOUT: !170 = !{!165} +// CHECK:STDOUT: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6fb12317fdf5c9b3", scope: null, file: !163, line: 36, type: !114, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !177) +// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !10) +// CHECK:STDOUT: !176 = !DILocation(line: 36, column: 1, scope: !171) +// CHECK:STDOUT: !177 = !{!172} +// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.44e7310a0b394feb", scope: null, file: !163, line: 36, type: !116, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !184) +// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !7) +// CHECK:STDOUT: !183 = !DILocation(line: 36, column: 1, scope: !178) +// CHECK:STDOUT: !184 = !{!179} +// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.73549b49ca05bf4c", scope: null, file: !163, line: 36, type: !118, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !191) +// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !6) +// CHECK:STDOUT: !190 = !DILocation(line: 36, column: 1, scope: !185) +// CHECK:STDOUT: !191 = !{!186} +// CHECK:STDOUT: !192 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.7e9df21fc3951ad1", scope: null, file: !163, line: 36, type: !155, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !198) +// CHECK:STDOUT: !193 = !DILocalVariable(arg: 1, scope: !192, type: !13) +// CHECK:STDOUT: !197 = !DILocation(line: 36, column: 1, scope: !192) +// CHECK:STDOUT: !198 = !{!193} +// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !163, line: 36, type: !157, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !205) +// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !12) +// CHECK:STDOUT: !204 = !DILocation(line: 36, column: 1, scope: !199) +// CHECK:STDOUT: !205 = !{!200} +// CHECK:STDOUT: !206 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.3266e5c7a8b68ec1", scope: null, file: !163, line: 36, type: !159, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !212) +// CHECK:STDOUT: !207 = !DILocalVariable(arg: 1, scope: !206, type: !9) +// CHECK:STDOUT: !211 = !DILocation(line: 36, column: 1, scope: !206) +// CHECK:STDOUT: !212 = !{!207} +// CHECK:STDOUT: !213 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ff339b9821763c59", scope: null, file: !163, line: 36, type: !161, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !219) +// CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !213, type: !8) +// CHECK:STDOUT: !218 = !DILocation(line: 36, column: 1, scope: !213) +// CHECK:STDOUT: !219 = !{!214} +// CHECK:STDOUT: !220 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !221 = !{!"omnipotent char", !220, i64 0} +// CHECK:STDOUT: !222 = !{!"any pointer", !221, i64 0} +// CHECK:STDOUT: !223 = !{!"p1 omnipotent char", !222, i64 0} +// CHECK:STDOUT: !224 = !{!223, !223, i64 0} +// CHECK:STDOUT: !225 = !{!221, !221, i64 0} +// CHECK:STDOUT: !226 = !{!"short", !221, i64 0} +// CHECK:STDOUT: !227 = !{!"p1 short", !222, i64 0} +// CHECK:STDOUT: !228 = !{!227, !227, i64 0} +// CHECK:STDOUT: !229 = !{!226, !226, i64 0} +// CHECK:STDOUT: !230 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !231 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !232 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !233 = !{!"int", !221, i64 0} +// CHECK:STDOUT: !234 = !{!"__libc_errno", !233, i64 0} +// CHECK:STDOUT: !235 = !{!234, !233, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'import_class.carbon' @@ -559,59 +556,59 @@ 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 !215 { +// CHECK:STDOUT: define void @_CGetX.Main(ptr sret([16 x i8]) %return) #0 !dbg !240 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %return), !dbg !218 -// CHECK:STDOUT: ret void, !dbg !219 +// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %return), !dbg !243 +// CHECK:STDOUT: ret void, !dbg !244 // 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 !235 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !235 +// 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: 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 !220 { +// CHECK:STDOUT: define void @_CLet.Main() #0 !dbg !245 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_27.1.temp = alloca [16 x i8], align 8, !dbg !221 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_27.1.temp), !dbg !221 -// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %.loc9_27.1.temp), !dbg !221 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %.loc9_27.1.temp), !dbg !221 -// CHECK:STDOUT: ret void, !dbg !224 +// CHECK:STDOUT: %.loc9_27.1.temp = alloca [16 x i8], align 8, !dbg !246 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_27.1.temp), !dbg !246 +// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %.loc9_27.1.temp), !dbg !246 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr %.loc9_27.1.temp), !dbg !246 +// CHECK:STDOUT: ret void, !dbg !249 // 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 !225 { +// CHECK:STDOUT: define void @_CVar.Main() #0 !dbg !250 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN1XD1Ev(ptr %self), !dbg !227 -// CHECK:STDOUT: ret void, !dbg !227 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CVar.Main() #0 !dbg !229 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !230 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !230 -// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %_.var), !dbg !231 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %_.var), !dbg !230 -// CHECK:STDOUT: ret void, !dbg !233 +// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !251 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !251 +// CHECK:STDOUT: call void @_Z4Makev.carbon_thunk.(ptr %_.var), !dbg !252 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr %_.var), !dbg !251 +// CHECK:STDOUT: ret void, !dbg !254 // 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 void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr %t) #0 !dbg !255 { +// CHECK:STDOUT: call void @_ZN1XD1Ev(ptr %t), !dbg !259 +// CHECK:STDOUT: ret void, !dbg !260 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z4Makev(ptr dead_on_unwind writable sret(%struct.X) align 8) #4 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.2d682b12c0c20e08, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -619,9 +616,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 = !{!212} -// CHECK:STDOUT: !llvm.module.flags = !{!205, !206, !207, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!210} +// CHECK:STDOUT: !llvm.dbg.cu = !{!237} +// CHECK:STDOUT: !llvm.module.flags = !{!230, !231, !232, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!235} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -630,35 +627,37 @@ 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: !195 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !196 = !{!"omnipotent char", !195, i64 0} -// CHECK:STDOUT: !197 = !{!"any pointer", !196, i64 0} -// CHECK:STDOUT: !205 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !206 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !207 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !208 = !{!"int", !196, i64 0} -// CHECK:STDOUT: !209 = !{!"__libc_errno", !208, i64 0} -// CHECK:STDOUT: !210 = !{!209, !208, i64 0} -// CHECK:STDOUT: !211 = !DIFile(filename: "import_class.carbon", directory: "") -// CHECK:STDOUT: !212 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !211, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !213 = !{!16} -// CHECK:STDOUT: !214 = !DISubroutineType(types: !213) -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "GetX", linkageName: "_CGetX.Main", scope: null, file: !211, line: 6, type: !214, spFlags: DISPFlagDefinition, unit: !212) -// CHECK:STDOUT: !218 = !DILocation(line: 6, column: 29, scope: !215) -// CHECK:STDOUT: !219 = !DILocation(line: 6, column: 22, scope: !215) -// CHECK:STDOUT: !220 = distinct !DISubprogram(name: "Let", linkageName: "_CLet.Main", scope: null, file: !211, line: 8, type: !36, spFlags: DISPFlagDefinition, unit: !212) -// CHECK:STDOUT: !221 = !DILocation(line: 9, column: 18, scope: !220) -// CHECK:STDOUT: !224 = !DILocation(line: 8, column: 1, scope: !220) -// CHECK:STDOUT: !225 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !211, line: 9, type: !18, spFlags: DISPFlagDefinition, unit: !212, retainedNodes: !228) -// CHECK:STDOUT: !226 = !DILocalVariable(arg: 1, scope: !225, type: !16) -// CHECK:STDOUT: !227 = !DILocation(line: 9, column: 18, scope: !225) -// CHECK:STDOUT: !228 = !{!226} -// CHECK:STDOUT: !229 = distinct !DISubprogram(name: "Var", linkageName: "_CVar.Main", scope: null, file: !211, line: 12, type: !36, spFlags: DISPFlagDefinition, unit: !212) -// CHECK:STDOUT: !230 = !DILocation(line: 13, column: 3, scope: !229) -// CHECK:STDOUT: !231 = !DILocation(line: 13, column: 18, scope: !229) -// CHECK:STDOUT: !233 = !DILocation(line: 12, column: 1, scope: !229) -// CHECK:STDOUT: !234 = !{!"p1 _ZTS1X", !197, i64 0} -// CHECK:STDOUT: !235 = !{!234, !234, i64 0} +// CHECK:STDOUT: !163 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !220 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !221 = !{!"omnipotent char", !220, i64 0} +// CHECK:STDOUT: !222 = !{!"any pointer", !221, i64 0} +// CHECK:STDOUT: !230 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !231 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !232 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !233 = !{!"int", !221, i64 0} +// CHECK:STDOUT: !234 = !{!"__libc_errno", !233, i64 0} +// CHECK:STDOUT: !235 = !{!234, !233, i64 0} +// CHECK:STDOUT: !236 = !DIFile(filename: "import_class.carbon", directory: "") +// CHECK:STDOUT: !237 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !236, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !238 = !{!16} +// CHECK:STDOUT: !239 = !DISubroutineType(types: !238) +// CHECK:STDOUT: !240 = distinct !DISubprogram(name: "GetX", linkageName: "_CGetX.Main", scope: null, file: !236, line: 6, type: !239, spFlags: DISPFlagDefinition, unit: !237) +// CHECK:STDOUT: !243 = !DILocation(line: 6, column: 29, scope: !240) +// CHECK:STDOUT: !244 = !DILocation(line: 6, column: 22, scope: !240) +// CHECK:STDOUT: !245 = distinct !DISubprogram(name: "Let", linkageName: "_CLet.Main", scope: null, file: !236, line: 8, type: !36, spFlags: DISPFlagDefinition, unit: !237) +// CHECK:STDOUT: !246 = !DILocation(line: 9, column: 18, scope: !245) +// CHECK:STDOUT: !249 = !DILocation(line: 8, column: 1, scope: !245) +// CHECK:STDOUT: !250 = distinct !DISubprogram(name: "Var", linkageName: "_CVar.Main", scope: null, file: !236, line: 12, type: !36, spFlags: DISPFlagDefinition, unit: !237) +// CHECK:STDOUT: !251 = !DILocation(line: 13, column: 3, scope: !250) +// CHECK:STDOUT: !252 = !DILocation(line: 13, column: 18, scope: !250) +// CHECK:STDOUT: !254 = !DILocation(line: 12, column: 1, scope: !250) +// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2d682b12c0c20e08", scope: null, file: !163, line: 36, type: !18, spFlags: DISPFlagDefinition, unit: !237, retainedNodes: !261) +// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !16) +// CHECK:STDOUT: !259 = !DILocation(line: 38, column: 5, scope: !255) +// CHECK:STDOUT: !260 = !DILocation(line: 36, column: 1, scope: !255) +// CHECK:STDOUT: !261 = !{!256} +// CHECK:STDOUT: !262 = !{!"p1 _ZTS1X", !222, i64 0} +// CHECK:STDOUT: !263 = !{!262, !262, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'indirect_return_with_args.carbon' @@ -670,10 +669,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 !243 { +// CHECK:STDOUT: define void @_CCall.Main(ptr sret({}) %return, ptr %x) #0 !dbg !271 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_Z1f1D.carbon_thunk._(ptr %x, ptr %return), !dbg !249 -// CHECK:STDOUT: ret void, !dbg !250 +// CHECK:STDOUT: call void @_Z1f1D.carbon_thunk._(ptr %x, ptr %return), !dbg !277 +// CHECK:STDOUT: ret void, !dbg !278 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -683,10 +682,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 !253 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !255 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !255 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !253 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !281 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !283 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !283 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !281 // CHECK:STDOUT: call void @_Z1f1D() // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -697,33 +696,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 = !{!238} -// CHECK:STDOUT: !llvm.module.flags = !{!205, !206, !207, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!210} +// CHECK:STDOUT: !llvm.dbg.cu = !{!266} +// CHECK:STDOUT: !llvm.module.flags = !{!230, !231, !232, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!235} // 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: !195 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !196 = !{!"omnipotent char", !195, i64 0} -// CHECK:STDOUT: !197 = !{!"any pointer", !196, i64 0} -// CHECK:STDOUT: !205 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !206 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !207 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !208 = !{!"int", !196, i64 0} -// CHECK:STDOUT: !209 = !{!"__libc_errno", !208, i64 0} -// CHECK:STDOUT: !210 = !{!209, !208, i64 0} -// CHECK:STDOUT: !237 = !DIFile(filename: "indirect_return_with_args.carbon", directory: "") -// CHECK:STDOUT: !238 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !237, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !239 = !{!16, !16} -// CHECK:STDOUT: !240 = !DISubroutineType(types: !239) -// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !237, line: 10, type: !240, spFlags: DISPFlagDefinition, unit: !238, retainedNodes: !251) -// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !16) -// CHECK:STDOUT: !249 = !DILocation(line: 11, column: 10, scope: !243) -// CHECK:STDOUT: !250 = !DILocation(line: 11, column: 3, scope: !243) -// CHECK:STDOUT: !251 = !{!244} -// CHECK:STDOUT: !252 = !{!"p1 _ZTS1D", !197, i64 0} -// CHECK:STDOUT: !253 = !{!252, !252, i64 0} -// CHECK:STDOUT: !254 = !{!"p1 _ZTS1C", !197, i64 0} -// CHECK:STDOUT: !255 = !{!254, !254, i64 0} +// CHECK:STDOUT: !220 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !221 = !{!"omnipotent char", !220, i64 0} +// CHECK:STDOUT: !222 = !{!"any pointer", !221, i64 0} +// CHECK:STDOUT: !230 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !231 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !232 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !233 = !{!"int", !221, i64 0} +// CHECK:STDOUT: !234 = !{!"__libc_errno", !233, i64 0} +// CHECK:STDOUT: !235 = !{!234, !233, i64 0} +// CHECK:STDOUT: !265 = !DIFile(filename: "indirect_return_with_args.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 = !{!16, !16} +// CHECK:STDOUT: !268 = !DISubroutineType(types: !267) +// CHECK:STDOUT: !271 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !265, line: 10, type: !268, spFlags: DISPFlagDefinition, unit: !266, retainedNodes: !279) +// CHECK:STDOUT: !272 = !DILocalVariable(arg: 1, scope: !271, type: !16) +// CHECK:STDOUT: !277 = !DILocation(line: 11, column: 10, scope: !271) +// CHECK:STDOUT: !278 = !DILocation(line: 11, column: 3, scope: !271) +// CHECK:STDOUT: !279 = !{!272} +// CHECK:STDOUT: !280 = !{!"p1 _ZTS1D", !222, i64 0} +// CHECK:STDOUT: !281 = !{!280, !280, i64 0} +// CHECK:STDOUT: !282 = !{!"p1 _ZTS1C", !222, i64 0} +// CHECK:STDOUT: !283 = !{!282, !282, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/issue7142.carbon b/toolchain/lower/testdata/interop/cpp/issue7142.carbon index 877f219df8ff..f429bf1fb3ba 100644 --- a/toolchain/lower/testdata/interop/cpp/issue7142.carbon +++ b/toolchain/lower/testdata/interop/cpp/issue7142.carbon @@ -49,61 +49,52 @@ void f() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %call = call noundef ptr @_ZN6Carbon4MainL3GetEv() // CHECK:STDOUT: %price = getelementptr inbounds nuw %"class.Carbon::Main::A", ptr %call, i32 0, i32 0 -// CHECK:STDOUT: %0 = load i32, ptr %price, align 4, !tbaa !46 +// CHECK:STDOUT: %0 = load i32, ptr %price, align 4, !tbaa !49 // CHECK:STDOUT: ret i32 %0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare ptr @_CGet.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CGet__carbon_thunk.Main(ptr %_) #1 !dbg !14 { +// CHECK:STDOUT: define void @_CGet__carbon_thunk.Main(ptr %_) #1 !dbg !12 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Get.call = call ptr @_CGet.Main(), !dbg !16 -// CHECK:STDOUT: store ptr %Get.call, ptr %_, align 8, !dbg !16 -// CHECK:STDOUT: ret void, !dbg !16 +// CHECK:STDOUT: %Get.call = call ptr @_CGet.Main(), !dbg !14 +// CHECK:STDOUT: store ptr %Get.call, ptr %_, align 8, !dbg !14 +// CHECK:STDOUT: ret void, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.A.Main"(ptr %self) #2 !dbg !18 { +// CHECK:STDOUT: define weak_odr void @"_C__destroy_thunk:thunk.A.Main"(ptr %self) #2 !dbg !16 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !20 -// CHECK:STDOUT: ret void, !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %self), !dbg !18 +// CHECK:STDOUT: ret void, !dbg !18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #1 !dbg !22 { +// CHECK:STDOUT: define weak_odr void @"_COp.daf9f875be2f7080:core.SubobjectDestroy.Core"(ptr %self) #1 !dbg !20 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !24 +// CHECK:STDOUT: %.loc15_9.1.price = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !22 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc15_9.1.price), !dbg !22 +// CHECK:STDOUT: ret void, !dbg !22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.daf9f875be2f7080:core.Destroy.Core"(ptr %self) #1 !dbg !26 { +// CHECK:STDOUT: define weak_odr void @"_COp.5a23cc09585c55d2:core.SubobjectDestroy.Core"(ptr %self) #1 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15.price = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !28 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc15.price), !dbg !28 +// CHECK:STDOUT: %.loc15_9.1.price = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc15_9.1.price), !dbg !28 // CHECK:STDOUT: ret void, !dbg !28 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.daf9f875be2f7080:core.Destroy.Core"(ptr %self) #1 !dbg !30 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.daf9f875be2f7080: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.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #1 !dbg !34 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15.price = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !36 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc15.price), !dbg !36 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %t) #1 !dbg !31 { +// CHECK:STDOUT: call void @"_COp.5a23cc09585c55d2:core.SubobjectDestroy.Core"(ptr %t), !dbg !35 // CHECK:STDOUT: ret void, !dbg !36 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #1 !dbg !38 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !40 -// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #1 !dbg !38 { +// CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress nounwind uwtable @@ -115,14 +106,17 @@ void f() { // CHECK:STDOUT: ret ptr %0 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// 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" } // CHECK:STDOUT: attributes #1 = { nounwind } // CHECK:STDOUT: attributes #2 = { alwaysinline nounwind } // CHECK:STDOUT: attributes #3 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!5} -// CHECK:STDOUT: !llvm.module.flags = !{!49, !50, !51, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!53} +// CHECK:STDOUT: !llvm.module.flags = !{!52, !53, !54, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!56} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -132,44 +126,42 @@ void f() { // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !10 = !{null, !7} // CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{null, !6} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Get__carbon_thunk", linkageName: "_CGet__carbon_thunk.Main", scope: null, file: !4, line: 16, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !17) -// CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !14, type: !7) -// CHECK:STDOUT: !16 = !DILocation(line: 16, column: 1, scope: !14) -// CHECK:STDOUT: !17 = !{!15} -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !21) -// CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !18, type: !7) -// CHECK:STDOUT: !20 = !DILocation(line: 15, column: 1, scope: !18) -// CHECK:STDOUT: !21 = !{!19} -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 15, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) -// 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.daf9f875be2f7080:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "Get__carbon_thunk", linkageName: "_CGet__carbon_thunk.Main", scope: null, file: !4, line: 16, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !15) +// CHECK:STDOUT: !13 = !DILocalVariable(arg: 1, scope: !12, type: !7) +// CHECK:STDOUT: !14 = !DILocation(line: 16, column: 1, scope: !12) +// CHECK:STDOUT: !15 = !{!13} +// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "__destroy_thunk", linkageName: "_C__destroy_thunk:thunk.A.Main", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !19) +// CHECK:STDOUT: !17 = !DILocalVariable(arg: 1, scope: !16, type: !7) +// CHECK:STDOUT: !18 = !DILocation(line: 15, column: 1, scope: !16) +// CHECK:STDOUT: !19 = !{!17} +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.daf9f875be2f7080:core.SubobjectDestroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !20, type: !7) +// CHECK:STDOUT: !22 = !DILocation(line: 15, column: 1, scope: !20) +// CHECK:STDOUT: !23 = !{null, !6} +// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) +// CHECK:STDOUT: !25 = !{!21} +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5a23cc09585c55d2:core.SubobjectDestroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) // CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !7) // CHECK:STDOUT: !28 = !DILocation(line: 15, column: 1, scope: !26) // CHECK:STDOUT: !29 = !{!27} -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.daf9f875be2f7080: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.5a23cc09585c55d2: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.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 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !43 = !{!"omnipotent char", !42, i64 0} -// CHECK:STDOUT: !44 = !{!"int", !43, i64 0} -// CHECK:STDOUT: !45 = !{!"_ZTSN6Carbon4Main1AE", !44, i64 0} -// CHECK:STDOUT: !46 = !{!45, !44, i64 0} -// CHECK:STDOUT: !49 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !50 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !51 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !52 = !{!"__libc_errno", !44, i64 0} -// CHECK:STDOUT: !53 = !{!52, !44, i64 0} +// CHECK:STDOUT: !30 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6b8b385dcf82cc70", scope: null, file: !30, line: 36, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !37) +// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !7) +// CHECK:STDOUT: !35 = !DILocation(line: 38, column: 5, scope: !31) +// CHECK:STDOUT: !36 = !DILocation(line: 36, column: 1, scope: !31) +// CHECK:STDOUT: !37 = !{!32} +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !30, line: 36, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !44) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !6) +// CHECK:STDOUT: !43 = !DILocation(line: 36, column: 1, scope: !38) +// CHECK:STDOUT: !44 = !{!39} +// CHECK:STDOUT: !45 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !46 = !{!"omnipotent char", !45, i64 0} +// CHECK:STDOUT: !47 = !{!"int", !46, i64 0} +// CHECK:STDOUT: !48 = !{!"_ZTSN6Carbon4Main1AE", !47, i64 0} +// CHECK:STDOUT: !49 = !{!48, !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 = !{!"__libc_errno", !47, i64 0} +// CHECK:STDOUT: !56 = !{!55, !47, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/nullptr.carbon b/toolchain/lower/testdata/interop/cpp/nullptr.carbon index 5123699fdf47..354fba20cd89 100644 --- a/toolchain/lower/testdata/interop/cpp/nullptr.carbon +++ b/toolchain/lower/testdata/interop/cpp/nullptr.carbon @@ -65,49 +65,23 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) { // CHECK:STDOUT: store ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, ptr %.loc12_18.2.temp, align 8, !dbg !17 // CHECK:STDOUT: %.loc12_18.4 = load ptr, ptr %.loc12_18.2.temp, align 8, !dbg !17 // CHECK:STDOUT: call void @_Z7TakePtrPi(ptr %.loc12_18.4), !dbg !18 -// CHECK:STDOUT: call void @"_CSelfDestruct.785dda29544d3bcb:core.Destroy.Core"(ptr %.loc12_18.2.temp), !dbg !17 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.632d99dc34484dc8(ptr %.loc12_18.2.temp), !dbg !17 // CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr poison), !dbg !19 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc14_22.1.temp), !dbg !19 // CHECK:STDOUT: store ptr %Cpp.nullptr_t.as.Copy.impl.Op.call, ptr %.loc14_22.1.temp, align 8, !dbg !19 // CHECK:STDOUT: call void @_Z11TakeNullptrDn.carbon_thunk._(ptr %.loc14_22.1.temp), !dbg !20 -// CHECK:STDOUT: call void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %.loc14_22.1.temp), !dbg !19 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.773050755018f871(ptr %.loc14_22.1.temp), !dbg !19 // CHECK:STDOUT: ret void, !dbg !21 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSelfDestruct.00ac8ef5084ea134:core.Destroy.Core"(ptr) -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %self) #0 !dbg !23 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !25 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z7TakePtrPi(ptr noundef) #1 // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.31e4a12b1595deb3:core.Destroy.Core"(ptr %self) #0 !dbg !27 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !29 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4904c781c5ead403: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.785dda29544d3bcb: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: 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 !100 -// CHECK:STDOUT: %0 = load ptr, ptr %n.addr, align 8, !tbaa !100 +// CHECK:STDOUT: store ptr %n, ptr %n.addr, align 8, !tbaa !87 +// CHECK:STDOUT: %0 = load ptr, ptr %n.addr, align 8, !tbaa !87 // CHECK:STDOUT: call void @_Z11TakeNullptrDn(ptr null) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -115,99 +89,91 @@ 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 @"_CSelfDestruct.a7d1b77eb1279818:core.Destroy.Core"(ptr %self) #0 !dbg !39 { +// CHECK:STDOUT: define ptr @_CReturnNullptr.Main() #0 !dbg !22 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !41 +// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr poison), !dbg !25 +// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.Copy.impl.Op.call, !dbg !26 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2199970a74ea9b41:core.Destroy.Core"(ptr %self) #0 !dbg !43 { +// CHECK:STDOUT: define ptr @_CReturnNullptrCopy.Main() #0 !dbg !27 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !45 +// CHECK:STDOUT: %a.var = alloca ptr, align 8, !dbg !30 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !30 +// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call.loc22 = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr poison), !dbg !31 +// CHECK:STDOUT: store ptr %Cpp.nullptr_t.as.Copy.impl.Op.call.loc22, ptr %a.var, align 8, !dbg !30 +// CHECK:STDOUT: %.loc23 = load ptr, ptr %a.var, align 8, !dbg !33 +// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call.loc23 = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr %.loc23), !dbg !33 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.773050755018f871(ptr %a.var), !dbg !30 +// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.Copy.impl.Op.call.loc23, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %self) #0 !dbg !47 { +// CHECK:STDOUT: define ptr @_CReturnConvertedNullptrIndirectly.Main() #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !49 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReturnNullptr.Main() #0 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr poison), !dbg !54 -// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.Copy.impl.Op.call, !dbg !55 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReturnNullptrCopy.Main() #0 !dbg !56 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca ptr, align 8, !dbg !59 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !59 -// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call.loc22 = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr poison), !dbg !60 -// CHECK:STDOUT: store ptr %Cpp.nullptr_t.as.Copy.impl.Op.call.loc22, ptr %a.var, align 8, !dbg !59 -// CHECK:STDOUT: %.loc23 = load ptr, ptr %a.var, align 8, !dbg !62 -// CHECK:STDOUT: %Cpp.nullptr_t.as.Copy.impl.Op.call.loc23 = call ptr @"_COp.NullptrT.CppCompat.Core:Copy.Core"(ptr %.loc23), !dbg !62 -// CHECK:STDOUT: call void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %a.var), !dbg !59 -// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.Copy.impl.Op.call.loc23, !dbg !63 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReturnConvertedNullptrIndirectly.Main() #0 !dbg !64 { -// CHECK:STDOUT: entry: -// 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: call void @_Z13ReturnNullptrv.carbon_thunk.(ptr %a.var), !dbg !68 -// CHECK:STDOUT: %.loc28_10 = load ptr, ptr %a.var, align 8, !dbg !70 -// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.481e1aec351df623.Core.55456748a8a2eb70"(ptr %.loc28_10), !dbg !71 -// CHECK:STDOUT: call void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %a.var), !dbg !67 -// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !71 +// CHECK:STDOUT: %a.var = alloca ptr, align 8, !dbg !38 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !38 +// CHECK:STDOUT: call void @_Z13ReturnNullptrv.carbon_thunk.(ptr %a.var), !dbg !39 +// CHECK:STDOUT: %.loc28_10 = load ptr, ptr %a.var, align 8, !dbg !41 +// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.481e1aec351df623.Core.55456748a8a2eb70"(ptr %.loc28_10), !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.773050755018f871(ptr %a.var), !dbg !38 +// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !42 // 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 !100 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !100 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !87 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !87 // CHECK:STDOUT: %call = call ptr @_Z13ReturnNullptrv() -// CHECK:STDOUT: store ptr %call, ptr %0, align 8, !tbaa !101 +// CHECK:STDOUT: store ptr %call, ptr %0, align 8, !tbaa !88 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReturnConvertedNullptrDirectly.Main() #0 !dbg !72 { +// CHECK:STDOUT: define ptr @_CReturnConvertedNullptrDirectly.Main() #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc32_28.1.temp = alloca ptr, align 8, !dbg !75 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc32_28.1.temp), !dbg !75 -// CHECK:STDOUT: call void @_Z13ReturnNullptrv.carbon_thunk.(ptr %.loc32_28.1.temp), !dbg !75 -// CHECK:STDOUT: %.loc32_28.4 = load ptr, ptr %.loc32_28.1.temp, align 8, !dbg !75 -// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.481e1aec351df623.Core.55456748a8a2eb70"(ptr %.loc32_28.4), !dbg !76 -// CHECK:STDOUT: call void @"_CSelfDestruct.826ebaace97974ae:core.Destroy.Core"(ptr %.loc32_28.1.temp), !dbg !75 -// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !76 +// CHECK:STDOUT: %.loc32_28.1.temp = alloca ptr, align 8, !dbg !46 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc32_28.1.temp), !dbg !46 +// CHECK:STDOUT: call void @_Z13ReturnNullptrv.carbon_thunk.(ptr %.loc32_28.1.temp), !dbg !46 +// CHECK:STDOUT: %.loc32_28.4 = load ptr, ptr %.loc32_28.1.temp, align 8, !dbg !46 +// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.481e1aec351df623.Core.55456748a8a2eb70"(ptr %.loc32_28.4), !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.773050755018f871(ptr %.loc32_28.1.temp), !dbg !46 +// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CConvertNullptrConstant.Main() #0 !dbg !77 { +// CHECK:STDOUT: define ptr @_CConvertNullptrConstant.Main() #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.481e1aec351df623.Core.55456748a8a2eb70"(ptr poison), !dbg !80 -// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !80 +// CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.481e1aec351df623.Core.55456748a8a2eb70"(ptr poison), !dbg !51 +// CHECK:STDOUT: ret ptr %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.call, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.481e1aec351df623.Core.55456748a8a2eb70"(ptr %self) #0 !dbg !82 { -// CHECK:STDOUT: %1 = call ptr @_CNone.Optional.Core.2313f7f09b1ddaea(), !dbg !87 -// CHECK:STDOUT: ret ptr %1, !dbg !88 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.481e1aec351df623.Core.55456748a8a2eb70"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: %1 = call ptr @_CNone.Optional.Core.2313f7f09b1ddaea(), !dbg !58 +// CHECK:STDOUT: ret ptr %1, !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)) #3 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.632d99dc34484dc8(ptr %t) #0 !dbg !62 { +// CHECK:STDOUT: ret void, !dbg !67 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.773050755018f871(ptr %t) #0 !dbg !69 { +// CHECK:STDOUT: ret void, !dbg !74 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare ptr @_CMake.NullptrT.CppCompat.Core() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CNone.Optional.Core.2313f7f09b1ddaea() #0 !dbg !90 { -// CHECK:STDOUT: ret ptr null, !dbg !94 +// CHECK:STDOUT: define linkonce_odr ptr @_CNone.Optional.Core.2313f7f09b1ddaea() #0 !dbg !77 { +// CHECK:STDOUT: ret ptr null, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z11TakeNullptrDn(ptr) #1 @@ -217,6 +183,7 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) { // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @"_CConvert.NullptrT.CppCompat.Core:ImplicitAs.481e1aec351df623.Core.55456748a8a2eb70", { 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.773050755018f871, { 3, 2, 1, 0 } // 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" } @@ -224,8 +191,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 = !{!102, !103, !104, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!107} +// CHECK:STDOUT: !llvm.module.flags = !{!89, !90, !91, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!94} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -246,72 +213,53 @@ fn ConvertNullptrConstant() -> Core.Optional(i32*) { // CHECK:STDOUT: !19 = !DILocation(line: 14, column: 19, scope: !16) // CHECK:STDOUT: !20 = !DILocation(line: 14, column: 3, scope: !16) // CHECK:STDOUT: !21 = !DILocation(line: 11, column: 1, scope: !16) -// CHECK:STDOUT: !22 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !22, line: 164, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !26) -// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !23, type: !9) -// CHECK:STDOUT: !25 = !DILocation(line: 164, column: 19, scope: !23) -// CHECK:STDOUT: !26 = !{!24} -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.31e4a12b1595deb3:core.Destroy.Core", scope: null, file: !4, line: 12, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) -// CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !27, type: !9) -// CHECK:STDOUT: !29 = !DILocation(line: 12, column: 15, scope: !27) -// CHECK:STDOUT: !30 = !{!28} -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4904c781c5ead403:core.Destroy.Core", scope: null, file: !4, line: 12, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.785dda29544d3bcb: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.a7d1b77eb1279818:core.Destroy.Core", scope: null, file: !4, line: 14, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) -// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !9) -// CHECK:STDOUT: !41 = !DILocation(line: 14, column: 19, scope: !39) -// CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2199970a74ea9b41: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: 14, column: 19, scope: !43) -// CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.826ebaace97974ae: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: 14, column: 19, scope: !47) -// CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "ReturnNullptr", linkageName: "_CReturnNullptr.Main", scope: null, file: !4, line: 17, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !54 = !DILocation(line: 18, column: 10, scope: !51) -// CHECK:STDOUT: !55 = !DILocation(line: 18, column: 3, scope: !51) -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "ReturnNullptrCopy", linkageName: "_CReturnNullptrCopy.Main", scope: null, file: !4, line: 21, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !59 = !DILocation(line: 22, column: 3, scope: !56) -// CHECK:STDOUT: !60 = !DILocation(line: 22, column: 26, scope: !56) -// CHECK:STDOUT: !62 = !DILocation(line: 23, column: 10, scope: !56) -// CHECK:STDOUT: !63 = !DILocation(line: 23, column: 3, scope: !56) -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "ReturnConvertedNullptrIndirectly", linkageName: "_CReturnConvertedNullptrIndirectly.Main", scope: null, file: !4, line: 26, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !67 = !DILocation(line: 27, column: 3, scope: !64) -// CHECK:STDOUT: !68 = !DILocation(line: 27, column: 26, scope: !64) -// CHECK:STDOUT: !70 = !DILocation(line: 28, column: 10, scope: !64) -// CHECK:STDOUT: !71 = !DILocation(line: 28, column: 3, scope: !64) -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "ReturnConvertedNullptrDirectly", linkageName: "_CReturnConvertedNullptrDirectly.Main", scope: null, file: !4, line: 31, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !75 = !DILocation(line: 32, column: 10, scope: !72) -// CHECK:STDOUT: !76 = !DILocation(line: 32, column: 3, scope: !72) -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "ConvertNullptrConstant", linkageName: "_CConvertNullptrConstant.Main", scope: null, file: !4, line: 35, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !80 = !DILocation(line: 36, column: 3, scope: !77) -// CHECK:STDOUT: !81 = !DIFile(filename: "{{.*}}/prelude/types/cpp/nullptr.carbon", directory: "") -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.NullptrT.CppCompat.Core:ImplicitAs.481e1aec351df623.Core.55456748a8a2eb70", scope: null, file: !81, line: 51, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !89) -// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !9) -// CHECK:STDOUT: !87 = !DILocation(line: 52, column: 14, scope: !82) -// CHECK:STDOUT: !88 = !DILocation(line: 52, column: 7, scope: !82) -// CHECK:STDOUT: !89 = !{!83} -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.2313f7f09b1ddaea", scope: null, file: !22, line: 30, type: !15, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !94 = !DILocation(line: 31, column: 5, scope: !90) -// CHECK:STDOUT: !95 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !96 = !{!"omnipotent char", !95, i64 0} -// CHECK:STDOUT: !97 = !{!"std::nullptr_t", !96, i64 0} -// CHECK:STDOUT: !98 = !{!"any pointer", !96, i64 0} -// CHECK:STDOUT: !99 = !{!"p1 std::nullptr_t", !98, i64 0} -// CHECK:STDOUT: !100 = !{!99, !99, i64 0} -// CHECK:STDOUT: !101 = !{!97, !97, i64 0} -// CHECK:STDOUT: !102 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !103 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !104 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !105 = !{!"int", !96, i64 0} -// CHECK:STDOUT: !106 = !{!"__libc_errno", !105, i64 0} -// CHECK:STDOUT: !107 = !{!106, !105, i64 0} +// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "ReturnNullptr", linkageName: "_CReturnNullptr.Main", scope: null, file: !4, line: 17, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !25 = !DILocation(line: 18, column: 10, scope: !22) +// CHECK:STDOUT: !26 = !DILocation(line: 18, column: 3, scope: !22) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "ReturnNullptrCopy", linkageName: "_CReturnNullptrCopy.Main", scope: null, file: !4, line: 21, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !30 = !DILocation(line: 22, column: 3, scope: !27) +// CHECK:STDOUT: !31 = !DILocation(line: 22, column: 26, scope: !27) +// CHECK:STDOUT: !33 = !DILocation(line: 23, column: 10, scope: !27) +// CHECK:STDOUT: !34 = !DILocation(line: 23, column: 3, scope: !27) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "ReturnConvertedNullptrIndirectly", linkageName: "_CReturnConvertedNullptrIndirectly.Main", scope: null, file: !4, line: 26, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !38 = !DILocation(line: 27, column: 3, scope: !35) +// CHECK:STDOUT: !39 = !DILocation(line: 27, column: 26, scope: !35) +// CHECK:STDOUT: !41 = !DILocation(line: 28, column: 10, scope: !35) +// CHECK:STDOUT: !42 = !DILocation(line: 28, column: 3, scope: !35) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "ReturnConvertedNullptrDirectly", linkageName: "_CReturnConvertedNullptrDirectly.Main", scope: null, file: !4, line: 31, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !46 = !DILocation(line: 32, column: 10, scope: !43) +// CHECK:STDOUT: !47 = !DILocation(line: 32, column: 3, scope: !43) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "ConvertNullptrConstant", linkageName: "_CConvertNullptrConstant.Main", scope: null, file: !4, line: 35, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !51 = !DILocation(line: 36, column: 3, scope: !48) +// CHECK:STDOUT: !52 = !DIFile(filename: "{{.*}}/prelude/types/cpp/nullptr.carbon", directory: "") +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.NullptrT.CppCompat.Core:ImplicitAs.481e1aec351df623.Core.55456748a8a2eb70", scope: null, file: !52, line: 51, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !60) +// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !9) +// CHECK:STDOUT: !58 = !DILocation(line: 52, column: 14, scope: !53) +// CHECK:STDOUT: !59 = !DILocation(line: 52, column: 7, scope: !53) +// CHECK:STDOUT: !60 = !{!54} +// CHECK:STDOUT: !61 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.632d99dc34484dc8", scope: null, file: !61, line: 36, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !68) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !9) +// CHECK:STDOUT: !67 = !DILocation(line: 36, column: 1, scope: !62) +// CHECK:STDOUT: !68 = !{!63} +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.773050755018f871", scope: null, file: !61, line: 36, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !75) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !9) +// CHECK:STDOUT: !74 = !DILocation(line: 36, column: 1, scope: !69) +// CHECK:STDOUT: !75 = !{!70} +// CHECK:STDOUT: !76 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.2313f7f09b1ddaea", scope: null, file: !76, line: 30, type: !15, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !81 = !DILocation(line: 31, column: 5, scope: !77) +// CHECK:STDOUT: !82 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !83 = !{!"omnipotent char", !82, i64 0} +// CHECK:STDOUT: !84 = !{!"std::nullptr_t", !83, i64 0} +// CHECK:STDOUT: !85 = !{!"any pointer", !83, i64 0} +// CHECK:STDOUT: !86 = !{!"p1 std::nullptr_t", !85, i64 0} +// CHECK:STDOUT: !87 = !{!86, !86, i64 0} +// CHECK:STDOUT: !88 = !{!84, !84, i64 0} +// CHECK:STDOUT: !89 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !90 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !91 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !92 = !{!"int", !83, i64 0} +// CHECK:STDOUT: !93 = !{!"__libc_errno", !92, i64 0} +// CHECK:STDOUT: !94 = !{!93, !92, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/pointer.carbon b/toolchain/lower/testdata/interop/cpp/pointer.carbon index 348f2f71de1a..75a394401e69 100644 --- a/toolchain/lower/testdata/interop/cpp/pointer.carbon +++ b/toolchain/lower/testdata/interop/cpp/pointer.carbon @@ -215,93 +215,69 @@ fn Convert() { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.51fa064adaeb8681:core.Destroy.Core"(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define void @_CPassPtr.Main(ptr %_) #0 !dbg !48 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !51 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassPtr.Main(ptr %_) #0 !dbg !53 { +// CHECK:STDOUT: define void @_CPassNonnullPtr.Main(ptr %p) #0 !dbg !53 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !56 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassNonnullPtr.Main(ptr %p) #0 !dbg !58 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22_23.2.temp = alloca ptr, align 8, !dbg !61 -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.4e9bbab1c7c88cc2"(ptr %p), !dbg !61 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_23.2.temp), !dbg !61 -// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc22_23.2.temp, align 8, !dbg !61 -// CHECK:STDOUT: %.loc22_23.4 = load ptr, ptr %.loc22_23.2.temp, align 8, !dbg !61 -// CHECK:STDOUT: call void @_Z15TakeNullablePtrP9NullableC(ptr %.loc22_23.4), !dbg !64 -// CHECK:STDOUT: call void @"_CSelfDestruct.8ba962899dc2b649:core.Destroy.Core"(ptr %.loc22_23.2.temp), !dbg !61 -// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: %.loc22_23.2.temp = alloca ptr, align 8, !dbg !56 +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.4e9bbab1c7c88cc2"(ptr %p), !dbg !56 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_23.2.temp), !dbg !56 +// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc22_23.2.temp, align 8, !dbg !56 +// CHECK:STDOUT: %.loc22_23.4 = load ptr, ptr %.loc22_23.2.temp, align 8, !dbg !56 +// CHECK:STDOUT: call void @_Z15TakeNullablePtrP9NullableC(ptr %.loc22_23.4), !dbg !59 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bbc536feb16fa006(ptr %.loc22_23.2.temp), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z15TakeNullablePtrP9NullableC(ptr noundef) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6789a803c53632c0:core.Destroy.Core"(ptr %self) #0 !dbg !67 { +// CHECK:STDOUT: define ptr @_CReturnPtr.Main() #0 !dbg !62 { // 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.806592b02cc58529: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.8ba962899dc2b649: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 ptr @_CReturnPtr.Main() #0 !dbg !79 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnNullablePtr.call = call ptr @_Z17ReturnNullablePtrv(), !dbg !82 -// CHECK:STDOUT: ret ptr %ReturnNullablePtr.call, !dbg !83 +// CHECK:STDOUT: %ReturnNullablePtr.call = call ptr @_Z17ReturnNullablePtrv(), !dbg !65 +// CHECK:STDOUT: ret ptr %ReturnNullablePtr.call, !dbg !66 // 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 !84 { +// CHECK:STDOUT: define void @_CPassPtrWithThunk.Main(ptr %_) #0 !dbg !67 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: ret void, !dbg !70 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CPassNonnullPtrWithThunk.Main(ptr %p) #0 !dbg !89 { +// CHECK:STDOUT: define void @_CPassNonnullPtrWithThunk.Main(ptr %p) #0 !dbg !72 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc35_32.2.temp = alloca ptr, align 8, !dbg !92 -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.4e9bbab1c7c88cc2"(ptr %p), !dbg !92 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc35_32.2.temp), !dbg !92 -// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc35_32.2.temp, align 8, !dbg !92 -// CHECK:STDOUT: %.loc35_32.4 = load ptr, ptr %.loc35_32.2.temp, align 8, !dbg !92 -// CHECK:STDOUT: call void @_Z24TakeNullablePtrWithThunkP9NullableCi.carbon_thunk._(ptr %.loc35_32.4), !dbg !93 -// CHECK:STDOUT: call void @"_CSelfDestruct.8ba962899dc2b649:core.Destroy.Core"(ptr %.loc35_32.2.temp), !dbg !92 -// CHECK:STDOUT: ret void, !dbg !94 +// CHECK:STDOUT: %.loc35_32.2.temp = alloca ptr, align 8, !dbg !75 +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.4e9bbab1c7c88cc2"(ptr %p), !dbg !75 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc35_32.2.temp), !dbg !75 +// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc35_32.2.temp, align 8, !dbg !75 +// CHECK:STDOUT: %.loc35_32.4 = load ptr, ptr %.loc35_32.2.temp, align 8, !dbg !75 +// CHECK:STDOUT: call void @_Z24TakeNullablePtrWithThunkP9NullableCi.carbon_thunk._(ptr %.loc35_32.4), !dbg !76 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.bbc536feb16fa006(ptr %.loc35_32.2.temp), !dbg !75 +// CHECK:STDOUT: ret void, !dbg !77 // 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 !140 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !140 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !139 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !139 // 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 !96 { +// CHECK:STDOUT: define ptr @_CReturnPtrWithThunk.Main() #0 !dbg !79 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnNullablePtrWithThunk__carbon_thunk.call = call ptr @_Z26ReturnNullablePtrWithThunki.carbon_thunk.(), !dbg !99 -// CHECK:STDOUT: ret ptr %ReturnNullablePtrWithThunk__carbon_thunk.call, !dbg !100 +// CHECK:STDOUT: %ReturnNullablePtrWithThunk__carbon_thunk.call = call ptr @_Z26ReturnNullablePtrWithThunki.carbon_thunk.(), !dbg !82 +// CHECK:STDOUT: ret ptr %ReturnNullablePtrWithThunk__carbon_thunk.call, !dbg !83 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -312,35 +288,45 @@ fn Convert() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.4e9bbab1c7c88cc2"(ptr %self) #0 !dbg !101 { -// CHECK:STDOUT: %1 = call ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.059052cdc9a4441d"(ptr %self), !dbg !106 -// CHECK:STDOUT: ret ptr %1, !dbg !107 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.4e9bbab1c7c88cc2"(ptr %self) #0 !dbg !85 { +// CHECK:STDOUT: %1 = call ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.059052cdc9a4441d"(ptr %self), !dbg !90 +// CHECK:STDOUT: ret ptr %1, !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)) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.059052cdc9a4441d"(ptr %self) #0 !dbg !109 { -// CHECK:STDOUT: %1 = call ptr @_CSome.Optional.Core.059052cdc9a4441d(ptr %self), !dbg !115 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.bbc536feb16fa006(ptr %t) #0 !dbg !94 { +// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.059052cdc9a4441d"(ptr %self) #0 !dbg !101 { +// CHECK:STDOUT: %1 = call ptr @_CSome.Optional.Core.059052cdc9a4441d(ptr %self), !dbg !107 +// CHECK:STDOUT: ret ptr %1, !dbg !108 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.059052cdc9a4441d(ptr %value) #0 !dbg !110 { +// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d"(ptr %value), !dbg !115 // CHECK:STDOUT: ret ptr %1, !dbg !116 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.059052cdc9a4441d(ptr %value) #0 !dbg !118 { -// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d"(ptr %value), !dbg !123 -// CHECK:STDOUT: ret ptr %1, !dbg !124 +// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d"(ptr %self) #0 !dbg !118 { +// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !123 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !123 +// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !123 +// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !127 +// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !125 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9abdc217755355a3(ptr %1), !dbg !123 +// CHECK:STDOUT: ret ptr %2, !dbg !129 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d"(ptr %self) #0 !dbg !126 { -// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !131 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !131 -// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !131 -// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !135 -// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !133 -// CHECK:STDOUT: call void @"_CSelfDestruct.806592b02cc58529:core.Destroy.Core"(ptr %1), !dbg !131 -// CHECK:STDOUT: ret ptr %2, !dbg !137 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9abdc217755355a3(ptr %t) #0 !dbg !131 { +// CHECK:STDOUT: ret void, !dbg !136 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z24TakeNullablePtrWithThunkP9NullableCi(ptr noundef, i32 noundef) #1 @@ -350,6 +336,7 @@ fn Convert() { // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.4e9bbab1c7c88cc2", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 2, 1 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.bbc536feb16fa006, { 1, 0 } // 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" } @@ -378,75 +365,68 @@ fn Convert() { // CHECK:STDOUT: !45 = !{!44, !43, i64 0} // CHECK:STDOUT: !46 = !DIFile(filename: "nullable.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 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.51fa064adaeb8681:core.Destroy.Core", scope: null, file: !48, line: 164, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !52) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !6) -// CHECK:STDOUT: !51 = !DILocation(line: 164, column: 19, scope: !49) -// CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "PassPtr", linkageName: "_CPassPtr.Main", scope: null, file: !46, line: 14, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !57) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "PassPtr", linkageName: "_CPassPtr.Main", scope: null, file: !46, line: 14, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !52) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !6) +// CHECK:STDOUT: !51 = !DILocation(line: 14, column: 1, scope: !48) +// CHECK:STDOUT: !52 = !{!49} +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "PassNonnullPtr", linkageName: "_CPassNonnullPtr.Main", scope: null, file: !46, line: 19, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !61) // CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !6) -// CHECK:STDOUT: !56 = !DILocation(line: 14, column: 1, scope: !53) -// CHECK:STDOUT: !57 = !{!54} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "PassNonnullPtr", linkageName: "_CPassNonnullPtr.Main", scope: null, file: !46, line: 19, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !66) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !6) -// CHECK:STDOUT: !61 = !DILocation(line: 22, column: 23, scope: !58) -// CHECK:STDOUT: !62 = !{!6, !6} -// CHECK:STDOUT: !63 = !DISubroutineType(types: !62) -// CHECK:STDOUT: !64 = !DILocation(line: 22, column: 3, scope: !58) -// CHECK:STDOUT: !65 = !DILocation(line: 19, column: 1, scope: !58) -// CHECK:STDOUT: !66 = !{!59} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6789a803c53632c0:core.Destroy.Core", scope: null, file: !46, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !70) +// CHECK:STDOUT: !56 = !DILocation(line: 22, column: 23, scope: !53) +// CHECK:STDOUT: !57 = !{!6, !6} +// CHECK:STDOUT: !58 = !DISubroutineType(types: !57) +// CHECK:STDOUT: !59 = !DILocation(line: 22, column: 3, scope: !53) +// CHECK:STDOUT: !60 = !DILocation(line: 19, column: 1, scope: !53) +// CHECK:STDOUT: !61 = !{!54} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "ReturnPtr", linkageName: "_CReturnPtr.Main", scope: null, file: !46, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !47) +// CHECK:STDOUT: !65 = !DILocation(line: 26, column: 10, scope: !62) +// CHECK:STDOUT: !66 = !DILocation(line: 26, column: 3, scope: !62) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "PassPtrWithThunk", linkageName: "_CPassPtrWithThunk.Main", scope: null, file: !46, line: 29, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !71) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !6) -// CHECK:STDOUT: !69 = !DILocation(line: 22, column: 23, scope: !67) -// CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.806592b02cc58529:core.Destroy.Core", scope: null, file: !46, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !74) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.8ba962899dc2b649: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: "ReturnPtr", linkageName: "_CReturnPtr.Main", scope: null, file: !46, line: 25, type: !10, spFlags: DISPFlagDefinition, unit: !47) -// CHECK:STDOUT: !82 = !DILocation(line: 26, column: 10, scope: !79) -// CHECK:STDOUT: !83 = !DILocation(line: 26, column: 3, scope: !79) -// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "PassPtrWithThunk", linkageName: "_CPassPtrWithThunk.Main", scope: null, file: !46, line: 29, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !88) -// CHECK:STDOUT: !85 = !DILocalVariable(arg: 1, scope: !84, type: !6) -// CHECK:STDOUT: !87 = !DILocation(line: 29, column: 1, scope: !84) -// CHECK:STDOUT: !88 = !{!85} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "PassNonnullPtrWithThunk", linkageName: "_CPassNonnullPtrWithThunk.Main", scope: null, file: !46, line: 34, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !95) -// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !6) -// CHECK:STDOUT: !92 = !DILocation(line: 35, column: 32, scope: !89) -// CHECK:STDOUT: !93 = !DILocation(line: 35, column: 3, scope: !89) -// CHECK:STDOUT: !94 = !DILocation(line: 34, column: 1, scope: !89) -// CHECK:STDOUT: !95 = !{!90} -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "ReturnPtrWithThunk", linkageName: "_CReturnPtrWithThunk.Main", scope: null, file: !46, line: 38, type: !10, spFlags: DISPFlagDefinition, unit: !47) -// CHECK:STDOUT: !99 = !DILocation(line: 39, column: 10, scope: !96) -// CHECK:STDOUT: !100 = !DILocation(line: 39, column: 3, scope: !96) -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.4e9bbab1c7c88cc2", scope: null, file: !48, line: 105, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !108) +// CHECK:STDOUT: !70 = !DILocation(line: 29, column: 1, scope: !67) +// CHECK:STDOUT: !71 = !{!68} +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "PassNonnullPtrWithThunk", linkageName: "_CPassNonnullPtrWithThunk.Main", scope: null, file: !46, line: 34, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !78) +// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !6) +// CHECK:STDOUT: !75 = !DILocation(line: 35, column: 32, scope: !72) +// CHECK:STDOUT: !76 = !DILocation(line: 35, column: 3, scope: !72) +// CHECK:STDOUT: !77 = !DILocation(line: 34, column: 1, scope: !72) +// CHECK:STDOUT: !78 = !{!73} +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "ReturnPtrWithThunk", linkageName: "_CReturnPtrWithThunk.Main", scope: null, file: !46, line: 38, type: !10, spFlags: DISPFlagDefinition, unit: !47) +// CHECK:STDOUT: !82 = !DILocation(line: 39, column: 10, scope: !79) +// CHECK:STDOUT: !83 = !DILocation(line: 39, column: 3, scope: !79) +// CHECK:STDOUT: !84 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.4e9bbab1c7c88cc2", scope: null, file: !84, line: 105, type: !58, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !92) +// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !6) +// CHECK:STDOUT: !90 = !DILocation(line: 106, column: 12, scope: !85) +// CHECK:STDOUT: !91 = !DILocation(line: 106, column: 5, scope: !85) +// CHECK:STDOUT: !92 = !{!86} +// CHECK:STDOUT: !93 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.bbc536feb16fa006", scope: null, file: !93, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !100) +// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !6) +// CHECK:STDOUT: !99 = !DILocation(line: 36, column: 1, scope: !94) +// CHECK:STDOUT: !100 = !{!95} +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.059052cdc9a4441d", scope: null, file: !84, line: 80, type: !58, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !109) // CHECK:STDOUT: !102 = !DILocalVariable(arg: 1, scope: !101, type: !6) -// CHECK:STDOUT: !106 = !DILocation(line: 106, column: 12, scope: !101) -// CHECK:STDOUT: !107 = !DILocation(line: 106, column: 5, scope: !101) -// CHECK:STDOUT: !108 = !{!102} -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.059052cdc9a4441d", scope: null, file: !48, line: 80, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !117) -// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !6) -// CHECK:STDOUT: !115 = !DILocation(line: 81, column: 12, scope: !109) -// CHECK:STDOUT: !116 = !DILocation(line: 81, column: 5, scope: !109) -// CHECK:STDOUT: !117 = !{!110} -// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.059052cdc9a4441d", scope: null, file: !48, line: 33, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !125) +// CHECK:STDOUT: !107 = !DILocation(line: 81, column: 12, scope: !101) +// CHECK:STDOUT: !108 = !DILocation(line: 81, column: 5, scope: !101) +// CHECK:STDOUT: !109 = !{!102} +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.059052cdc9a4441d", scope: null, file: !84, line: 33, type: !58, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !117) +// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !6) +// CHECK:STDOUT: !115 = !DILocation(line: 34, column: 12, scope: !110) +// CHECK:STDOUT: !116 = !DILocation(line: 34, column: 5, scope: !110) +// CHECK:STDOUT: !117 = !{!111} +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d", scope: null, file: !84, line: 166, type: !58, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !130) // CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !6) -// CHECK:STDOUT: !123 = !DILocation(line: 34, column: 12, scope: !118) -// CHECK:STDOUT: !124 = !DILocation(line: 34, column: 5, scope: !118) -// CHECK:STDOUT: !125 = !{!119} -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.77dd513e5db6ef8d", scope: null, file: !48, line: 166, type: !63, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !138) -// CHECK:STDOUT: !127 = !DILocalVariable(arg: 1, scope: !126, type: !6) -// CHECK:STDOUT: !131 = !DILocation(line: 167, column: 14, scope: !126) -// CHECK:STDOUT: !133 = !DILocation(line: 167, column: 18, scope: !126) -// CHECK:STDOUT: !135 = !DILocation(line: 169, column: 5, scope: !126) -// CHECK:STDOUT: !137 = !DILocation(line: 170, column: 5, scope: !126) -// CHECK:STDOUT: !138 = !{!127} -// CHECK:STDOUT: !139 = !{!"p1 _ZTS9NullableC", !37, i64 0} -// CHECK:STDOUT: !140 = !{!139, !139, i64 0} +// CHECK:STDOUT: !123 = !DILocation(line: 167, column: 14, scope: !118) +// CHECK:STDOUT: !125 = !DILocation(line: 167, column: 18, scope: !118) +// CHECK:STDOUT: !127 = !DILocation(line: 169, column: 5, scope: !118) +// CHECK:STDOUT: !129 = !DILocation(line: 170, column: 5, scope: !118) +// CHECK:STDOUT: !130 = !{!119} +// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9abdc217755355a3", scope: null, file: !93, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !47, retainedNodes: !137) +// CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !6) +// CHECK:STDOUT: !136 = !DILocation(line: 36, column: 1, scope: !131) +// CHECK:STDOUT: !137 = !{!132} +// CHECK:STDOUT: !138 = !{!"p1 _ZTS9NullableC", !37, i64 0} +// CHECK:STDOUT: !139 = !{!138, !138, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'add_const.carbon' @@ -455,154 +435,131 @@ 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 !145 { +// CHECK:STDOUT: define void @_CConvert.Main() #0 !dbg !144 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc11_21.1.temp = alloca ptr, align 8, !dbg !146 -// CHECK:STDOUT: %.loc11_21.5.temp = alloca ptr, align 8, !dbg !146 -// CHECK:STDOUT: %make.call = call ptr @_Z4makev(), !dbg !146 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.1.temp), !dbg !146 -// CHECK:STDOUT: store ptr %make.call, ptr %.loc11_21.1.temp, align 8, !dbg !146 -// CHECK:STDOUT: %.loc11_21.3 = load ptr, ptr %.loc11_21.1.temp, align 8, !dbg !146 -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.5b8e7c07aa15d316"(ptr %.loc11_21.3), !dbg !146 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.5.temp), !dbg !146 -// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc11_21.5.temp, align 8, !dbg !146 -// CHECK:STDOUT: %.loc11_21.7 = load ptr, ptr %.loc11_21.5.temp, align 8, !dbg !146 -// CHECK:STDOUT: call void @_Z4takePK6ConstC(ptr %.loc11_21.7), !dbg !147 -// CHECK:STDOUT: call void @"_CSelfDestruct.81f74d78011d6c6e:core.Destroy.Core"(ptr %.loc11_21.5.temp), !dbg !146 -// CHECK:STDOUT: call void @"_CSelfDestruct.6066ca300045fa1d:core.Destroy.Core"(ptr %.loc11_21.1.temp), !dbg !146 -// CHECK:STDOUT: ret void, !dbg !148 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.23bb4d554c74e0f1:core.Destroy.Core"(ptr %self) #0 !dbg !149 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !151 +// CHECK:STDOUT: %.loc11_21.1.temp = alloca ptr, align 8, !dbg !145 +// CHECK:STDOUT: %.loc11_21.5.temp = alloca ptr, align 8, !dbg !145 +// CHECK:STDOUT: %make.call = call ptr @_Z4makev(), !dbg !145 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.1.temp), !dbg !145 +// CHECK:STDOUT: store ptr %make.call, ptr %.loc11_21.1.temp, align 8, !dbg !145 +// CHECK:STDOUT: %.loc11_21.3 = load ptr, ptr %.loc11_21.1.temp, align 8, !dbg !145 +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.470ca455cde45499"(ptr %.loc11_21.3), !dbg !145 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.5.temp), !dbg !145 +// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc11_21.5.temp, align 8, !dbg !145 +// CHECK:STDOUT: %.loc11_21.7 = load ptr, ptr %.loc11_21.5.temp, align 8, !dbg !145 +// CHECK:STDOUT: call void @_Z4takePK6ConstC(ptr %.loc11_21.7), !dbg !146 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.55cdda357d448221(ptr %.loc11_21.5.temp), !dbg !145 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.63d1d3e401037503(ptr %.loc11_21.1.temp), !dbg !145 +// CHECK:STDOUT: ret void, !dbg !147 // 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 !153 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !155 -// 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 @"_CSelfDestruct.bdb5ffe218b7af7d: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.2a86d059c88e6d20: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.81f74d78011d6c6e:core.Destroy.Core"(ptr %self) #0 !dbg !165 { -// 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.e3602e7640dfb844: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.1b03d2b72822da52:core.Destroy.Core"(ptr %self) #0 !dbg !173 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !175 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6066ca300045fa1d: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: 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.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.5b8e7c07aa15d316"(ptr %self) #0 !dbg !181 { -// CHECK:STDOUT: %1 = call ptr @"_CConvert.Optional.185524929f6df0ca.Core:OptionalAs.1dac4564233fecd1.Core.5ce74f23b5c785a8"(ptr %self), !dbg !186 -// CHECK:STDOUT: ret ptr %1, !dbg !187 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.470ca455cde45499"(ptr %self) #0 !dbg !148 { +// CHECK:STDOUT: %1 = call ptr @"_CConvert.Optional.d1728a6b8ac984c6.Core:OptionalAs.5cc57aaa5e35eede.Core.397ceadf3cc9326d"(ptr %self), !dbg !153 +// CHECK:STDOUT: ret ptr %1, !dbg !154 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.Optional.185524929f6df0ca.Core:OptionalAs.1dac4564233fecd1.Core.5ce74f23b5c785a8"(ptr %self) #0 !dbg !189 { -// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !196 -// CHECK:STDOUT: %temp1 = alloca ptr, align 8, !dbg !196 -// CHECK:STDOUT: %1 = call i1 @_CHasValue.Optional.Core.128f4c34f2ac2dc8(ptr %self), !dbg !194 -// CHECK:STDOUT: br i1 %1, label %2, label %7, !dbg !195 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.55cdda357d448221(ptr %t) #0 !dbg !156 { +// CHECK:STDOUT: ret void, !dbg !161 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.63d1d3e401037503(ptr %t) #0 !dbg !163 { +// CHECK:STDOUT: ret void, !dbg !168 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.Optional.d1728a6b8ac984c6.Core:OptionalAs.5cc57aaa5e35eede.Core.397ceadf3cc9326d"(ptr %self) #0 !dbg !170 { +// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !177 +// CHECK:STDOUT: %temp1 = alloca ptr, align 8, !dbg !177 +// CHECK:STDOUT: %1 = call i1 @_CHasValue.Optional.Core.128f4c34f2ac2dc8(ptr %self), !dbg !175 +// CHECK:STDOUT: br i1 %1, label %2, label %7, !dbg !176 // CHECK:STDOUT: // CHECK:STDOUT: 2: ; preds = %0 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !196 -// CHECK:STDOUT: %3 = call ptr @_CGet.Optional.Core.128f4c34f2ac2dc8(ptr %self), !dbg !196 -// CHECK:STDOUT: store ptr %3, ptr %temp, align 8, !dbg !196 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp1), !dbg !196 -// CHECK:STDOUT: %4 = load ptr, ptr %temp, align 8, !dbg !196 -// CHECK:STDOUT: store ptr %4, ptr %temp1, align 8, !dbg !196 -// CHECK:STDOUT: %5 = load ptr, ptr %temp1, align 8, !dbg !196 -// CHECK:STDOUT: %6 = call ptr @_CSome.Optional.Core.1c39bd137e62c6ea(ptr %5), !dbg !197 -// CHECK:STDOUT: call void @"_CSelfDestruct.131ece8d9a7a4272:core.Destroy.Core"(ptr %temp1), !dbg !196 -// CHECK:STDOUT: call void @"_CSelfDestruct.23bb4d554c74e0f1:core.Destroy.Core"(ptr %temp), !dbg !196 -// CHECK:STDOUT: ret ptr %6, !dbg !198 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !177 +// CHECK:STDOUT: %3 = call ptr @_CGet.Optional.Core.128f4c34f2ac2dc8(ptr %self), !dbg !177 +// CHECK:STDOUT: store ptr %3, ptr %temp, align 8, !dbg !177 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp1), !dbg !177 +// CHECK:STDOUT: %4 = load ptr, ptr %temp, align 8, !dbg !177 +// CHECK:STDOUT: store ptr %4, ptr %temp1, align 8, !dbg !177 +// CHECK:STDOUT: %5 = load ptr, ptr %temp1, align 8, !dbg !177 +// CHECK:STDOUT: %6 = call ptr @_CSome.Optional.Core.1c39bd137e62c6ea(ptr %5), !dbg !178 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c9c637f86feae476(ptr %temp1), !dbg !177 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.afe76cd75c1d6f19(ptr %temp), !dbg !177 +// CHECK:STDOUT: ret ptr %6, !dbg !179 // CHECK:STDOUT: // CHECK:STDOUT: 7: ; preds = %0 -// CHECK:STDOUT: %8 = call ptr @_CNone.Optional.Core.1c39bd137e62c6ea(), !dbg !199 -// CHECK:STDOUT: ret ptr %8, !dbg !200 +// CHECK:STDOUT: %8 = call ptr @_CNone.Optional.Core.1c39bd137e62c6ea(), !dbg !180 +// CHECK:STDOUT: ret ptr %8, !dbg !181 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.128f4c34f2ac2dc8(ptr %self) #0 !dbg !202 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %self), !dbg !208 -// CHECK:STDOUT: ret i1 %1, !dbg !209 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.128f4c34f2ac2dc8(ptr %self) #0 !dbg !183 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %self), !dbg !189 +// CHECK:STDOUT: ret i1 %1, !dbg !190 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CGet.Optional.Core.128f4c34f2ac2dc8(ptr %self) #0 !dbg !211 { -// CHECK:STDOUT: %1 = call ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %self), !dbg !217 -// CHECK:STDOUT: ret ptr %1, !dbg !218 +// CHECK:STDOUT: define linkonce_odr ptr @_CGet.Optional.Core.128f4c34f2ac2dc8(ptr %self) #0 !dbg !192 { +// CHECK:STDOUT: %1 = call ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(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 @_CSome.Optional.Core.1c39bd137e62c6ea(ptr %value) #0 !dbg !220 { -// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352"(ptr %value), !dbg !225 -// CHECK:STDOUT: ret ptr %1, !dbg !226 +// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.1c39bd137e62c6ea(ptr %value) #0 !dbg !201 { +// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352"(ptr %value), !dbg !206 +// CHECK:STDOUT: ret ptr %1, !dbg !207 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CNone.Optional.Core.1c39bd137e62c6ea() #0 !dbg !228 { -// CHECK:STDOUT: ret ptr null, !dbg !232 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.c9c637f86feae476(ptr %t) #0 !dbg !209 { +// CHECK:STDOUT: ret void, !dbg !214 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %value) #0 !dbg !233 { -// CHECK:STDOUT: %1 = icmp eq ptr %value, null, !dbg !239 -// CHECK:STDOUT: %2 = xor i1 %1, true, !dbg !240 -// CHECK:STDOUT: ret i1 %2, !dbg !241 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.afe76cd75c1d6f19(ptr %t) #0 !dbg !216 { +// CHECK:STDOUT: ret void, !dbg !221 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %value) #0 !dbg !243 { -// CHECK:STDOUT: ret ptr %value, !dbg !249 +// CHECK:STDOUT: define linkonce_odr ptr @_CNone.Optional.Core.1c39bd137e62c6ea() #0 !dbg !223 { +// CHECK:STDOUT: ret ptr null, !dbg !227 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352"(ptr %self) #0 !dbg !251 { -// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !256 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !256 -// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !256 -// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !260 -// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !258 -// CHECK:STDOUT: call void @"_CSelfDestruct.2a86d059c88e6d20:core.Destroy.Core"(ptr %1), !dbg !256 -// CHECK:STDOUT: ret ptr %2, !dbg !262 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %value) #0 !dbg !228 { +// CHECK:STDOUT: %1 = icmp eq ptr %value, null, !dbg !234 +// CHECK:STDOUT: %2 = xor i1 %1, true, !dbg !235 +// CHECK:STDOUT: ret i1 %2, !dbg !236 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4"(ptr %value) #0 !dbg !238 { +// CHECK:STDOUT: ret ptr %value, !dbg !244 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352"(ptr %self) #0 !dbg !246 { +// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !251 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !251 +// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !251 +// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !255 +// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !253 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4d5bd971f411a76b(ptr %1), !dbg !251 +// CHECK:STDOUT: ret ptr %2, !dbg !257 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4d5bd971f411a76b(ptr %t) #0 !dbg !259 { +// CHECK:STDOUT: ret void, !dbg !264 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -612,7 +569,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 = !{!142} +// CHECK:STDOUT: !llvm.dbg.cu = !{!141} // CHECK:STDOUT: !llvm.module.flags = !{!40, !41, !42, !2, !3} // CHECK:STDOUT: !llvm.errno.tbaa = !{!45} // CHECK:STDOUT: @@ -631,96 +588,85 @@ fn Convert() { // CHECK:STDOUT: !43 = !{!"int", !36, i64 0} // CHECK:STDOUT: !44 = !{!"__libc_errno", !43, i64 0} // CHECK:STDOUT: !45 = !{!44, !43, i64 0} -// CHECK:STDOUT: !48 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !62 = !{!6, !6} -// CHECK:STDOUT: !63 = !DISubroutineType(types: !62) -// CHECK:STDOUT: !141 = !DIFile(filename: "add_const.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 = !{null} -// CHECK:STDOUT: !144 = !DISubroutineType(types: !143) -// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !141, line: 10, type: !144, spFlags: DISPFlagDefinition, unit: !142) -// CHECK:STDOUT: !146 = !DILocation(line: 11, column: 12, scope: !145) -// CHECK:STDOUT: !147 = !DILocation(line: 11, column: 3, scope: !145) -// CHECK:STDOUT: !148 = !DILocation(line: 10, column: 1, scope: !145) -// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.23bb4d554c74e0f1:core.Destroy.Core", scope: null, file: !48, line: 164, type: !8, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !152) -// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !6) -// CHECK:STDOUT: !151 = !DILocation(line: 164, column: 19, scope: !149) -// CHECK:STDOUT: !152 = !{!150} -// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.131ece8d9a7a4272:core.Destroy.Core", scope: null, file: !48, line: 164, type: !8, spFlags: DISPFlagDefinition, unit: !142, 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.bdb5ffe218b7af7d:core.Destroy.Core", scope: null, file: !141, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !160) -// CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !6) -// CHECK:STDOUT: !159 = !DILocation(line: 11, column: 12, scope: !157) -// CHECK:STDOUT: !160 = !{!158} -// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2a86d059c88e6d20:core.Destroy.Core", scope: null, file: !141, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !164) -// CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !6) -// CHECK:STDOUT: !163 = !DILocation(line: 11, column: 12, scope: !161) -// CHECK:STDOUT: !164 = !{!162} -// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.81f74d78011d6c6e:core.Destroy.Core", scope: null, file: !141, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !168) -// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !6) -// CHECK:STDOUT: !167 = !DILocation(line: 11, column: 12, scope: !165) -// CHECK:STDOUT: !168 = !{!166} -// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e3602e7640dfb844:core.Destroy.Core", scope: null, file: !141, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !142, 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.1b03d2b72822da52:core.Destroy.Core", scope: null, file: !141, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !142, 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: "SelfDestruct", linkageName: "_CSelfDestruct.6066ca300045fa1d:core.Destroy.Core", scope: null, file: !141, line: 11, type: !8, spFlags: DISPFlagDefinition, unit: !142, 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: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.5b8e7c07aa15d316", scope: null, file: !48, line: 105, type: !63, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !188) -// CHECK:STDOUT: !182 = !DILocalVariable(arg: 1, scope: !181, type: !6) -// CHECK:STDOUT: !186 = !DILocation(line: 106, column: 12, scope: !181) -// CHECK:STDOUT: !187 = !DILocation(line: 106, column: 5, scope: !181) -// CHECK:STDOUT: !188 = !{!182} -// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Optional.185524929f6df0ca.Core:OptionalAs.1dac4564233fecd1.Core.5ce74f23b5c785a8", scope: null, file: !48, line: 95, type: !63, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !201) -// CHECK:STDOUT: !190 = !DILocalVariable(arg: 1, scope: !189, type: !6) -// CHECK:STDOUT: !194 = !DILocation(line: 96, column: 9, scope: !189) -// CHECK:STDOUT: !195 = !DILocation(line: 96, column: 8, scope: !189) -// CHECK:STDOUT: !196 = !DILocation(line: 97, column: 31, scope: !189) -// CHECK:STDOUT: !197 = !DILocation(line: 97, column: 14, scope: !189) -// CHECK:STDOUT: !198 = !DILocation(line: 97, column: 7, scope: !189) -// CHECK:STDOUT: !199 = !DILocation(line: 99, column: 12, scope: !189) -// CHECK:STDOUT: !200 = !DILocation(line: 99, column: 5, scope: !189) -// CHECK:STDOUT: !201 = !{!190} -// CHECK:STDOUT: !202 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.128f4c34f2ac2dc8", scope: null, file: !48, line: 36, type: !63, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !210) -// CHECK:STDOUT: !203 = !DILocalVariable(arg: 1, scope: !202, type: !6) -// CHECK:STDOUT: !208 = !DILocation(line: 37, column: 12, scope: !202) -// CHECK:STDOUT: !209 = !DILocation(line: 37, column: 5, scope: !202) -// CHECK:STDOUT: !210 = !{!203} -// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.128f4c34f2ac2dc8", scope: null, file: !48, line: 39, type: !63, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !219) -// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !6) -// CHECK:STDOUT: !217 = !DILocation(line: 40, column: 12, scope: !211) -// CHECK:STDOUT: !218 = !DILocation(line: 40, column: 5, scope: !211) -// CHECK:STDOUT: !219 = !{!212} -// CHECK:STDOUT: !220 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.1c39bd137e62c6ea", scope: null, file: !48, line: 33, type: !63, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !227) -// CHECK:STDOUT: !221 = !DILocalVariable(arg: 1, scope: !220, type: !6) -// CHECK:STDOUT: !225 = !DILocation(line: 34, column: 12, scope: !220) -// CHECK:STDOUT: !226 = !DILocation(line: 34, column: 5, scope: !220) -// CHECK:STDOUT: !227 = !{!221} -// CHECK:STDOUT: !228 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.1c39bd137e62c6ea", scope: null, file: !48, line: 30, type: !10, spFlags: DISPFlagDefinition, unit: !142) -// CHECK:STDOUT: !232 = !DILocation(line: 31, column: 5, scope: !228) -// CHECK:STDOUT: !233 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4", scope: null, file: !48, line: 172, type: !63, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !242) -// CHECK:STDOUT: !234 = !DILocalVariable(arg: 1, scope: !233, type: !6) -// CHECK:STDOUT: !239 = !DILocation(line: 173, column: 16, scope: !233) -// CHECK:STDOUT: !240 = !DILocation(line: 173, column: 12, scope: !233) -// CHECK:STDOUT: !241 = !DILocation(line: 173, column: 5, scope: !233) -// CHECK:STDOUT: !242 = !{!234} -// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4", scope: null, file: !48, line: 175, type: !63, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !250) -// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !6) -// CHECK:STDOUT: !249 = !DILocation(line: 176, column: 5, scope: !243) -// CHECK:STDOUT: !250 = !{!244} -// CHECK:STDOUT: !251 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352", scope: null, file: !48, line: 166, type: !63, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !263) -// CHECK:STDOUT: !252 = !DILocalVariable(arg: 1, scope: !251, type: !6) -// CHECK:STDOUT: !256 = !DILocation(line: 167, column: 14, scope: !251) -// CHECK:STDOUT: !258 = !DILocation(line: 167, column: 18, scope: !251) -// CHECK:STDOUT: !260 = !DILocation(line: 169, column: 5, scope: !251) -// CHECK:STDOUT: !262 = !DILocation(line: 170, column: 5, scope: !251) -// CHECK:STDOUT: !263 = !{!252} +// CHECK:STDOUT: !57 = !{!6, !6} +// CHECK:STDOUT: !58 = !DISubroutineType(types: !57) +// CHECK:STDOUT: !84 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !93 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !140 = !DIFile(filename: "add_const.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 = !{null} +// CHECK:STDOUT: !143 = !DISubroutineType(types: !142) +// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !140, line: 10, type: !143, spFlags: DISPFlagDefinition, unit: !141) +// CHECK:STDOUT: !145 = !DILocation(line: 11, column: 12, scope: !144) +// CHECK:STDOUT: !146 = !DILocation(line: 11, column: 3, scope: !144) +// CHECK:STDOUT: !147 = !DILocation(line: 10, column: 1, scope: !144) +// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.470ca455cde45499", scope: null, file: !84, line: 105, type: !58, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !155) +// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !6) +// CHECK:STDOUT: !153 = !DILocation(line: 106, column: 12, scope: !148) +// CHECK:STDOUT: !154 = !DILocation(line: 106, column: 5, scope: !148) +// CHECK:STDOUT: !155 = !{!149} +// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.55cdda357d448221", scope: null, file: !93, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !162) +// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !6) +// CHECK:STDOUT: !161 = !DILocation(line: 36, column: 1, scope: !156) +// CHECK:STDOUT: !162 = !{!157} +// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.63d1d3e401037503", scope: null, file: !93, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !169) +// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !6) +// CHECK:STDOUT: !168 = !DILocation(line: 36, column: 1, scope: !163) +// CHECK:STDOUT: !169 = !{!164} +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Optional.d1728a6b8ac984c6.Core:OptionalAs.5cc57aaa5e35eede.Core.397ceadf3cc9326d", scope: null, file: !84, line: 95, type: !58, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !182) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !6) +// CHECK:STDOUT: !175 = !DILocation(line: 96, column: 9, scope: !170) +// CHECK:STDOUT: !176 = !DILocation(line: 96, column: 8, scope: !170) +// CHECK:STDOUT: !177 = !DILocation(line: 97, column: 31, scope: !170) +// CHECK:STDOUT: !178 = !DILocation(line: 97, column: 14, scope: !170) +// CHECK:STDOUT: !179 = !DILocation(line: 97, column: 7, scope: !170) +// CHECK:STDOUT: !180 = !DILocation(line: 99, column: 12, scope: !170) +// CHECK:STDOUT: !181 = !DILocation(line: 99, column: 5, scope: !170) +// CHECK:STDOUT: !182 = !{!171} +// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.128f4c34f2ac2dc8", scope: null, file: !84, line: 36, type: !58, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !191) +// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !6) +// CHECK:STDOUT: !189 = !DILocation(line: 37, column: 12, scope: !183) +// CHECK:STDOUT: !190 = !DILocation(line: 37, column: 5, scope: !183) +// CHECK:STDOUT: !191 = !{!184} +// CHECK:STDOUT: !192 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.128f4c34f2ac2dc8", scope: null, file: !84, line: 39, type: !58, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !200) +// CHECK:STDOUT: !193 = !DILocalVariable(arg: 1, scope: !192, type: !6) +// CHECK:STDOUT: !198 = !DILocation(line: 40, column: 12, scope: !192) +// CHECK:STDOUT: !199 = !DILocation(line: 40, column: 5, scope: !192) +// CHECK:STDOUT: !200 = !{!193} +// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.1c39bd137e62c6ea", scope: null, file: !84, line: 33, type: !58, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !208) +// CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !201, type: !6) +// CHECK:STDOUT: !206 = !DILocation(line: 34, column: 12, scope: !201) +// CHECK:STDOUT: !207 = !DILocation(line: 34, column: 5, scope: !201) +// CHECK:STDOUT: !208 = !{!202} +// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.c9c637f86feae476", scope: null, file: !93, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !215) +// CHECK:STDOUT: !210 = !DILocalVariable(arg: 1, scope: !209, type: !6) +// CHECK:STDOUT: !214 = !DILocation(line: 36, column: 1, scope: !209) +// CHECK:STDOUT: !215 = !{!210} +// CHECK:STDOUT: !216 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.afe76cd75c1d6f19", scope: null, file: !93, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !222) +// CHECK:STDOUT: !217 = !DILocalVariable(arg: 1, scope: !216, type: !6) +// CHECK:STDOUT: !221 = !DILocation(line: 36, column: 1, scope: !216) +// CHECK:STDOUT: !222 = !{!217} +// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.1c39bd137e62c6ea", scope: null, file: !84, line: 30, type: !10, spFlags: DISPFlagDefinition, unit: !141) +// CHECK:STDOUT: !227 = !DILocation(line: 31, column: 5, scope: !223) +// CHECK:STDOUT: !228 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4", scope: null, file: !84, line: 172, type: !58, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !237) +// CHECK:STDOUT: !229 = !DILocalVariable(arg: 1, scope: !228, type: !6) +// CHECK:STDOUT: !234 = !DILocation(line: 173, column: 16, scope: !228) +// CHECK:STDOUT: !235 = !DILocation(line: 173, column: 12, scope: !228) +// CHECK:STDOUT: !236 = !DILocation(line: 173, column: 5, scope: !228) +// CHECK:STDOUT: !237 = !{!229} +// CHECK:STDOUT: !238 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.21c65d90918a10a4", scope: null, file: !84, line: 175, type: !58, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !245) +// CHECK:STDOUT: !239 = !DILocalVariable(arg: 1, scope: !238, type: !6) +// CHECK:STDOUT: !244 = !DILocation(line: 176, column: 5, scope: !238) +// CHECK:STDOUT: !245 = !{!239} +// CHECK:STDOUT: !246 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.35c29317da7de352", scope: null, file: !84, line: 166, type: !58, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !258) +// CHECK:STDOUT: !247 = !DILocalVariable(arg: 1, scope: !246, type: !6) +// CHECK:STDOUT: !251 = !DILocation(line: 167, column: 14, scope: !246) +// CHECK:STDOUT: !253 = !DILocation(line: 167, column: 18, scope: !246) +// CHECK:STDOUT: !255 = !DILocation(line: 169, column: 5, scope: !246) +// CHECK:STDOUT: !257 = !DILocation(line: 170, column: 5, scope: !246) +// CHECK:STDOUT: !258 = !{!247} +// CHECK:STDOUT: !259 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4d5bd971f411a76b", scope: null, file: !93, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !141, retainedNodes: !265) +// CHECK:STDOUT: !260 = !DILocalVariable(arg: 1, scope: !259, type: !6) +// CHECK:STDOUT: !264 = !DILocation(line: 36, column: 1, scope: !259) +// CHECK:STDOUT: !265 = !{!260} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/reference.carbon b/toolchain/lower/testdata/interop/cpp/reference.carbon index 9569ab5213d0..d05ea5c7dfef 100644 --- a/toolchain/lower/testdata/interop/cpp/reference.carbon +++ b/toolchain/lower/testdata/interop/cpp/reference.carbon @@ -150,7 +150,7 @@ fn GetRefs() { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.1), !dbg !36 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.1, ptr align 1 @C.val.loc19_20, i64 0, i1 false), !dbg !36 // CHECK:STDOUT: call void @_Z9TakeCRRefO1C.carbon_thunk.v(ptr %_.var.1), !dbg !37 -// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %_.var.1), !dbg !36 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %_.var.1), !dbg !36 // CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C.carbon_thunk._(ptr %c.var), !dbg !39 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !40 // CHECK:STDOUT: store i32 poison, ptr %n.var, align 4, !dbg !40 @@ -158,14 +158,14 @@ fn GetRefs() { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.2), !dbg !45 // CHECK:STDOUT: store i32 42, ptr %_.var.2, align 4, !dbg !45 // CHECK:STDOUT: call void @_Z11TakeIntRRefOi.carbon_thunk.v(ptr %_.var.2), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var.2), !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var.2), !dbg !45 // CHECK:STDOUT: %.loc25_23.1 = load i32, ptr %n.var, align 4, !dbg !47 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_23.2.temp), !dbg !47 // CHECK:STDOUT: store i32 %.loc25_23.1, ptr %.loc25_23.2.temp, align 4, !dbg !47 // CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi.carbon_thunk._(ptr %.loc25_23.2.temp), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc25_23.2.temp), !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !40 -// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %c.var), !dbg !31 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc25_23.2.temp), !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !40 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %c.var), !dbg !31 // CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -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 !70 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !70 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !76 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !76 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: @@ -191,24 +191,18 @@ 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 !70 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !70 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !76 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !76 // CHECK:STDOUT: call void @_Z9TakeCRRefO1C(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 !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !55 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // 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 !70 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !70 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !76 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !76 // CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C(ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -219,24 +213,18 @@ 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 !74 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !80 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !80 // CHECK:STDOUT: call void @_Z11TakeIntRRefOi(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.72395be3dbbe8946: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: 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 !74 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !80 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !80 // CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi(ptr noundef nonnull align 4 dereferenceable(4) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -245,14 +233,24 @@ 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 !61 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !64 -// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr sret({}) %return) #0 !dbg !53 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !57 // 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) #5 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %t) #0 !dbg !58 { +// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !65 { +// CHECK:STDOUT: ret void, !dbg !70 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z9TakeCRRefO1C(ptr noundef nonnull align 1 dereferenceable(1)) #3 // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z13TakeConstCRefRK1C(ptr noundef nonnull align 1 dereferenceable(1)) #3 @@ -262,9 +260,9 @@ fn GetRefs() { // CHECK:STDOUT: declare void @_Z15TakeConstIntRefRKi(ptr noundef nonnull align 4 dereferenceable(4)) #3 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", { 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.4d2f117a5a2332f0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -274,12 +272,13 @@ 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 = !{!75, !76, !77, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!79} +// CHECK:STDOUT: !llvm.module.flags = !{!81, !82, !83, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!85} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !12 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !4 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "pass_references.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -307,30 +306,30 @@ fn GetRefs() { // CHECK:STDOUT: !49 = !DILocation(line: 16, column: 1, scope: !30) // CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !18, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !19) // CHECK:STDOUT: !52 = !DILocation(line: 5, column: 7, scope: !50) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", scope: null, file: !18, line: 8, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !56) -// CHECK:STDOUT: !54 = !DILocalVariable(arg: 1, scope: !53, type: !23) -// CHECK:STDOUT: !55 = !DILocation(line: 8, column: 19, scope: !53) -// CHECK:STDOUT: !56 = !{!54} -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 12, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) -// 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: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !12, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !64 = !DILocation(line: 9, column: 28, scope: !61) -// CHECK:STDOUT: !65 = !DILocation(line: 9, column: 21, scope: !61) -// CHECK:STDOUT: !66 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !67 = !{!"omnipotent char", !66, i64 0} -// CHECK:STDOUT: !68 = !{!"any pointer", !67, i64 0} -// CHECK:STDOUT: !69 = !{!"p1 _ZTS1C", !68, i64 0} -// CHECK:STDOUT: !70 = !{!69, !69, i64 0} -// CHECK:STDOUT: !72 = !{!"int", !67, i64 0} -// CHECK:STDOUT: !73 = !{!"p1 int", !68, i64 0} -// CHECK:STDOUT: !74 = !{!73, !73, i64 0} -// CHECK:STDOUT: !75 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !76 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !77 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !78 = !{!"__libc_errno", !72, i64 0} -// CHECK:STDOUT: !79 = !{!78, !72, i64 0} +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !4, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !56 = !DILocation(line: 9, column: 28, scope: !53) +// CHECK:STDOUT: !57 = !DILocation(line: 9, column: 21, scope: !53) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4d2f117a5a2332f0", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !23) +// CHECK:STDOUT: !63 = !DILocation(line: 32, column: 1, scope: !58) +// CHECK:STDOUT: !64 = !{!59} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !71) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !20) +// CHECK:STDOUT: !70 = !DILocation(line: 32, column: 1, scope: !65) +// CHECK:STDOUT: !71 = !{!66} +// CHECK:STDOUT: !72 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !73 = !{!"omnipotent char", !72, i64 0} +// CHECK:STDOUT: !74 = !{!"any pointer", !73, i64 0} +// CHECK:STDOUT: !75 = !{!"p1 _ZTS1C", !74, i64 0} +// CHECK:STDOUT: !76 = !{!75, !75, i64 0} +// CHECK:STDOUT: !78 = !{!"int", !73, i64 0} +// CHECK:STDOUT: !79 = !{!"p1 int", !74, i64 0} +// CHECK:STDOUT: !80 = !{!79, !79, i64 0} +// CHECK:STDOUT: !81 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !82 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !83 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !84 = !{!"__libc_errno", !78, i64 0} +// CHECK:STDOUT: !85 = !{!84, !78, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'pass_references_via_thunk.carbon' @@ -344,51 +343,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 !82 { +// CHECK:STDOUT: define void @_CPassRefs.Main() #0 !dbg !88 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !83 -// CHECK:STDOUT: %.loc20_18.2.temp = alloca {}, align 1, !dbg !88 -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !92 -// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !97 -// CHECK:STDOUT: %.loc26_23.2.temp = alloca i32, align 4, !dbg !99 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !83 -// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr %c.var), !dbg !83 -// CHECK:STDOUT: call void @_Z8TakeCRefR1C10ForceThunk.carbon_thunk.r(ptr %c.var), !dbg !87 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_18.2.temp), !dbg !88 -// CHECK:STDOUT: call void @_Z9TakeCRRefRK1C10ForceThunk.carbon_thunk._(ptr @C.val.loc20_20.3), !dbg !89 -// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr @C.val), !dbg !88 -// CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C10ForceThunk.carbon_thunk._(ptr %c.var), !dbg !91 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !92 -// CHECK:STDOUT: store i32 poison, ptr %n.var, align 4, !dbg !92 -// CHECK:STDOUT: call void @_Z10TakeIntRefRi10ForceThunk.carbon_thunk.r(ptr %n.var), !dbg !96 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !97 -// CHECK:STDOUT: store i32 42, ptr %_.var, align 4, !dbg !97 -// CHECK:STDOUT: call void @_Z11TakeIntRRefOi10ForceThunk.carbon_thunk.v(ptr %_.var), !dbg !98 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var), !dbg !97 -// CHECK:STDOUT: %.loc26_23.1 = load i32, ptr %n.var, align 4, !dbg !99 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_23.2.temp), !dbg !99 -// CHECK:STDOUT: store i32 %.loc26_23.1, ptr %.loc26_23.2.temp, align 4, !dbg !99 -// CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi10ForceThunk.carbon_thunk._(ptr %.loc26_23.2.temp), !dbg !100 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc26_23.2.temp), !dbg !99 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !92 -// CHECK:STDOUT: call void @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core"(ptr %c.var), !dbg !83 -// CHECK:STDOUT: ret void, !dbg !101 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !89 +// CHECK:STDOUT: %.loc20_18.2.temp = alloca {}, align 1, !dbg !94 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !98 +// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !103 +// CHECK:STDOUT: %.loc26_23.2.temp = alloca i32, align 4, !dbg !105 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !89 +// CHECK:STDOUT: call void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr %c.var), !dbg !89 +// CHECK:STDOUT: call void @_Z8TakeCRefR1C10ForceThunk.carbon_thunk.r(ptr %c.var), !dbg !93 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_18.2.temp), !dbg !94 +// CHECK:STDOUT: call void @_Z9TakeCRRefRK1C10ForceThunk.carbon_thunk._(ptr @C.val.loc20_20.3), !dbg !95 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr @C.val), !dbg !94 +// CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C10ForceThunk.carbon_thunk._(ptr %c.var), !dbg !97 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !98 +// CHECK:STDOUT: store i32 poison, ptr %n.var, align 4, !dbg !98 +// CHECK:STDOUT: call void @_Z10TakeIntRefRi10ForceThunk.carbon_thunk.r(ptr %n.var), !dbg !102 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !103 +// CHECK:STDOUT: store i32 42, ptr %_.var, align 4, !dbg !103 +// CHECK:STDOUT: call void @_Z11TakeIntRRefOi10ForceThunk.carbon_thunk.v(ptr %_.var), !dbg !104 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var), !dbg !103 +// CHECK:STDOUT: %.loc26_23.1 = load i32, ptr %n.var, align 4, !dbg !105 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc26_23.2.temp), !dbg !105 +// CHECK:STDOUT: store i32 %.loc26_23.1, ptr %.loc26_23.2.temp, align 4, !dbg !105 +// CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi10ForceThunk.carbon_thunk._(ptr %.loc26_23.2.temp), !dbg !106 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc26_23.2.temp), !dbg !105 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !98 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %c.var), !dbg !89 +// CHECK:STDOUT: ret void, !dbg !107 // 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 !70 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !70 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !76 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !76 // 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 !102 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr sret({}) %return) #2 !dbg !108 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk.(ptr %return), !dbg !104 -// CHECK:STDOUT: ret void, !dbg !104 +// CHECK:STDOUT: call void @_ZN1CC1Ev.carbon_thunk.(ptr %return), !dbg !110 +// CHECK:STDOUT: ret void, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -396,8 +395,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 !70 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !70, !nonnull !118 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !76 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !76, !nonnull !130 // CHECK:STDOUT: call void @_Z8TakeCRefR1C10ForceThunk(ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -407,25 +406,19 @@ 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 !70 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !70 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !76 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !76 // 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 !105 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !107 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z13TakeConstCRefRK1C10ForceThunk.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 !70 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !70 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !76 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !76 // CHECK:STDOUT: call void @_Z13TakeConstCRefRK1C10ForceThunk(ptr noundef nonnull align 1 dereferenceable(1) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -435,8 +428,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 !74 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74, !nonnull !118, !align !120 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !80 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !80, !nonnull !130, !align !132 // CHECK:STDOUT: call void @_Z10TakeIntRefRi10ForceThunk(ptr noundef nonnull align 4 dereferenceable(4) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -446,25 +439,19 @@ 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 !74 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !80 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !80 // 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.72395be3dbbe8946: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: 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 !74 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !74 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !80 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !80 // CHECK:STDOUT: call void @_Z15TakeConstIntRefRKi10ForceThunk(ptr noundef nonnull align 4 dereferenceable(4) %1) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -473,9 +460,19 @@ 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 !113 { -// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !116 -// CHECK:STDOUT: ret void, !dbg !117 +// CHECK:STDOUT: define linkonce_odr void @"_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c"(ptr sret({}) %return) #0 !dbg !111 { +// CHECK:STDOUT: call void @"_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp"(ptr %return), !dbg !114 +// CHECK:STDOUT: ret void, !dbg !115 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4d2f117a5a2332f0(ptr %t) #0 !dbg !116 { +// CHECK:STDOUT: ret void, !dbg !121 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !123 { +// CHECK:STDOUT: ret void, !dbg !128 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z8TakeCRefR1C10ForceThunk(ptr noundef nonnull align 1 dereferenceable(1)) #5 @@ -491,9 +488,9 @@ fn GetRefs() { // CHECK:STDOUT: declare void @_Z15TakeConstIntRefRKi10ForceThunk(ptr noundef nonnull align 4 dereferenceable(4)) #5 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", { 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.4d2f117a5a2332f0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } @@ -502,13 +499,14 @@ 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 = !{!81} -// CHECK:STDOUT: !llvm.module.flags = !{!75, !76, !77, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!79} +// CHECK:STDOUT: !llvm.dbg.cu = !{!87} +// CHECK:STDOUT: !llvm.module.flags = !{!81, !82, !83, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!85} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !12 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !4 = !DIFile(filename: "min_prelude/parts/default.carbon", directory: "") +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{null} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) @@ -519,49 +517,49 @@ fn GetRefs() { // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) // CHECK:STDOUT: !28 = !{null, !20} // CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !66 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !67 = !{!"omnipotent char", !66, i64 0} -// CHECK:STDOUT: !68 = !{!"any pointer", !67, i64 0} -// CHECK:STDOUT: !69 = !{!"p1 _ZTS1C", !68, i64 0} -// CHECK:STDOUT: !70 = !{!69, !69, i64 0} -// CHECK:STDOUT: !72 = !{!"int", !67, i64 0} -// CHECK:STDOUT: !73 = !{!"p1 int", !68, i64 0} -// CHECK:STDOUT: !74 = !{!73, !73, i64 0} -// CHECK:STDOUT: !75 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !76 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !77 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !78 = !{!"__libc_errno", !72, i64 0} -// CHECK:STDOUT: !79 = !{!78, !72, i64 0} -// CHECK:STDOUT: !80 = !DIFile(filename: "pass_references_via_thunk.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: "PassRefs", linkageName: "_CPassRefs.Main", scope: null, file: !80, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !81) -// CHECK:STDOUT: !83 = !DILocation(line: 18, column: 3, scope: !82) -// CHECK:STDOUT: !87 = !DILocation(line: 19, column: 3, scope: !82) -// CHECK:STDOUT: !88 = !DILocation(line: 20, column: 17, scope: !82) -// CHECK:STDOUT: !89 = !DILocation(line: 20, column: 3, scope: !82) -// CHECK:STDOUT: !91 = !DILocation(line: 21, column: 3, scope: !82) -// CHECK:STDOUT: !92 = !DILocation(line: 23, column: 3, scope: !82) -// CHECK:STDOUT: !96 = !DILocation(line: 24, column: 3, scope: !82) -// CHECK:STDOUT: !97 = !DILocation(line: 13, column: 23, scope: !82) -// CHECK:STDOUT: !98 = !DILocation(line: 25, column: 3, scope: !82) -// CHECK:STDOUT: !99 = !DILocation(line: 26, column: 23, scope: !82) -// CHECK:STDOUT: !100 = !DILocation(line: 26, column: 3, scope: !82) -// CHECK:STDOUT: !101 = !DILocation(line: 17, column: 1, scope: !82) -// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !80, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !81) -// CHECK:STDOUT: !104 = !DILocation(line: 5, column: 7, scope: !102) -// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.417eccf5eb8addbd:core.Destroy.Core", scope: null, file: !80, line: 20, type: !25, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !108) -// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !23) -// CHECK:STDOUT: !107 = !DILocation(line: 20, column: 17, scope: !105) -// CHECK:STDOUT: !108 = !{!106} -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !80, line: 13, type: !29, spFlags: DISPFlagDefinition, unit: !81, retainedNodes: !112) -// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !20) -// CHECK:STDOUT: !111 = !DILocation(line: 13, column: 23, scope: !109) -// CHECK:STDOUT: !112 = !{!110} -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !12, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !81) -// CHECK:STDOUT: !116 = !DILocation(line: 9, column: 28, scope: !113) -// CHECK:STDOUT: !117 = !DILocation(line: 9, column: 21, scope: !113) -// CHECK:STDOUT: !118 = !{} -// CHECK:STDOUT: !120 = !{i64 4} +// CHECK:STDOUT: !72 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !73 = !{!"omnipotent char", !72, i64 0} +// CHECK:STDOUT: !74 = !{!"any pointer", !73, i64 0} +// CHECK:STDOUT: !75 = !{!"p1 _ZTS1C", !74, i64 0} +// CHECK:STDOUT: !76 = !{!75, !75, i64 0} +// CHECK:STDOUT: !78 = !{!"int", !73, i64 0} +// CHECK:STDOUT: !79 = !{!"p1 int", !74, i64 0} +// CHECK:STDOUT: !80 = !{!79, !79, i64 0} +// CHECK:STDOUT: !81 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !82 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !83 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !84 = !{!"__libc_errno", !78, i64 0} +// CHECK:STDOUT: !85 = !{!84, !78, i64 0} +// CHECK:STDOUT: !86 = !DIFile(filename: "pass_references_via_thunk.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: "PassRefs", linkageName: "_CPassRefs.Main", scope: null, file: !86, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !87) +// CHECK:STDOUT: !89 = !DILocation(line: 18, column: 3, scope: !88) +// CHECK:STDOUT: !93 = !DILocation(line: 19, column: 3, scope: !88) +// CHECK:STDOUT: !94 = !DILocation(line: 20, column: 17, scope: !88) +// CHECK:STDOUT: !95 = !DILocation(line: 20, column: 3, scope: !88) +// CHECK:STDOUT: !97 = !DILocation(line: 21, column: 3, scope: !88) +// CHECK:STDOUT: !98 = !DILocation(line: 23, column: 3, scope: !88) +// CHECK:STDOUT: !102 = !DILocation(line: 24, column: 3, scope: !88) +// CHECK:STDOUT: !103 = !DILocation(line: 13, column: 23, scope: !88) +// CHECK:STDOUT: !104 = !DILocation(line: 25, column: 3, scope: !88) +// CHECK:STDOUT: !105 = !DILocation(line: 26, column: 23, scope: !88) +// CHECK:STDOUT: !106 = !DILocation(line: 26, column: 3, scope: !88) +// CHECK:STDOUT: !107 = !DILocation(line: 17, column: 1, scope: !88) +// CHECK:STDOUT: !108 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Default.dc3dd9c349162a91.Core:C.Cpp", scope: null, file: !86, line: 5, type: !27, spFlags: DISPFlagDefinition, unit: !87) +// CHECK:STDOUT: !110 = !DILocation(line: 5, column: 7, scope: !108) +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "Op", linkageName: "_COp.51f3fb62cb986374:DefaultOrUnformed.Core.67b28f83c7cfd60c", scope: null, file: !4, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !87) +// CHECK:STDOUT: !114 = !DILocation(line: 9, column: 28, scope: !111) +// CHECK:STDOUT: !115 = !DILocation(line: 9, column: 21, scope: !111) +// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4d2f117a5a2332f0", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !122) +// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !23) +// CHECK:STDOUT: !121 = !DILocation(line: 32, column: 1, scope: !116) +// CHECK:STDOUT: !122 = !{!117} +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !129) +// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !20) +// CHECK:STDOUT: !128 = !DILocation(line: 32, column: 1, scope: !123) +// CHECK:STDOUT: !129 = !{!124} +// CHECK:STDOUT: !130 = !{} +// CHECK:STDOUT: !132 = !{i64 4} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'return_references.carbon' @@ -570,15 +568,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 !123 { +// CHECK:STDOUT: define void @_CGetRefs.Main() #0 !dbg !135 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnCRef.call = call ptr @_Z10ReturnCRefv(), !dbg !124 -// CHECK:STDOUT: %ReturnCRRef.call = call ptr @_Z11ReturnCRRefv(), !dbg !127 -// CHECK:STDOUT: %ReturnConstCRef.call = call ptr @_Z15ReturnConstCRefv(), !dbg !130 -// CHECK:STDOUT: %ReturnIntRef.call = call ptr @_Z12ReturnIntRefv(), !dbg !133 -// CHECK:STDOUT: %ReturnIntRRef.call = call ptr @_Z13ReturnIntRRefv(), !dbg !136 -// CHECK:STDOUT: %ReturnConstIntRef.call = call ptr @_Z17ReturnConstIntRefv(), !dbg !139 -// CHECK:STDOUT: ret void, !dbg !142 +// CHECK:STDOUT: %ReturnCRef.call = call ptr @_Z10ReturnCRefv(), !dbg !136 +// CHECK:STDOUT: %ReturnCRRef.call = call ptr @_Z11ReturnCRRefv(), !dbg !139 +// CHECK:STDOUT: %ReturnConstCRef.call = call ptr @_Z15ReturnConstCRefv(), !dbg !142 +// CHECK:STDOUT: %ReturnIntRef.call = call ptr @_Z12ReturnIntRefv(), !dbg !145 +// CHECK:STDOUT: %ReturnIntRRef.call = call ptr @_Z13ReturnIntRRefv(), !dbg !148 +// CHECK:STDOUT: %ReturnConstIntRef.call = call ptr @_Z17ReturnConstIntRefv(), !dbg !151 +// CHECK:STDOUT: ret void, !dbg !154 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare noundef nonnull align 1 dereferenceable(1) ptr @_Z10ReturnCRefv() #1 @@ -596,32 +594,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 = !{!122} -// CHECK:STDOUT: !llvm.module.flags = !{!75, !76, !77, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!79} +// CHECK:STDOUT: !llvm.dbg.cu = !{!134} +// CHECK:STDOUT: !llvm.module.flags = !{!81, !82, !83, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!85} // 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: !66 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !67 = !{!"omnipotent char", !66, i64 0} -// CHECK:STDOUT: !72 = !{!"int", !67, i64 0} -// CHECK:STDOUT: !75 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !76 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !77 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !78 = !{!"__libc_errno", !72, i64 0} -// CHECK:STDOUT: !79 = !{!78, !72, i64 0} -// CHECK:STDOUT: !121 = !DIFile(filename: "return_references.carbon", directory: "") -// CHECK:STDOUT: !122 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !121, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !121, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !122) -// CHECK:STDOUT: !124 = !DILocation(line: 17, column: 22, scope: !123) -// CHECK:STDOUT: !127 = !DILocation(line: 18, column: 22, scope: !123) -// CHECK:STDOUT: !130 = !DILocation(line: 19, column: 28, scope: !123) -// CHECK:STDOUT: !133 = !DILocation(line: 21, column: 20, scope: !123) -// CHECK:STDOUT: !136 = !DILocation(line: 22, column: 20, scope: !123) -// CHECK:STDOUT: !139 = !DILocation(line: 23, column: 26, scope: !123) -// CHECK:STDOUT: !142 = !DILocation(line: 16, column: 1, scope: !123) +// CHECK:STDOUT: !72 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !73 = !{!"omnipotent char", !72, i64 0} +// CHECK:STDOUT: !78 = !{!"int", !73, i64 0} +// CHECK:STDOUT: !81 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !82 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !83 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !84 = !{!"__libc_errno", !78, i64 0} +// CHECK:STDOUT: !85 = !{!84, !78, i64 0} +// CHECK:STDOUT: !133 = !DIFile(filename: "return_references.carbon", directory: "") +// CHECK:STDOUT: !134 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !133, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !133, line: 16, type: !22, spFlags: DISPFlagDefinition, unit: !134) +// CHECK:STDOUT: !136 = !DILocation(line: 17, column: 22, scope: !135) +// CHECK:STDOUT: !139 = !DILocation(line: 18, column: 22, scope: !135) +// CHECK:STDOUT: !142 = !DILocation(line: 19, column: 28, scope: !135) +// CHECK:STDOUT: !145 = !DILocation(line: 21, column: 20, scope: !135) +// CHECK:STDOUT: !148 = !DILocation(line: 22, column: 20, scope: !135) +// CHECK:STDOUT: !151 = !DILocation(line: 23, column: 26, scope: !135) +// CHECK:STDOUT: !154 = !DILocation(line: 16, column: 1, scope: !135) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'return_references_via_thunk.carbon' @@ -632,15 +630,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 !145 { +// CHECK:STDOUT: define void @_CGetRefs.Main() #0 !dbg !157 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %ReturnCRef__carbon_thunk.call = call ptr @_Z10ReturnCRef10ForceThunk.carbon_thunk.(), !dbg !146 -// CHECK:STDOUT: %ReturnCRRef__carbon_thunk.call = call ptr @_Z11ReturnCRRef10ForceThunk.carbon_thunk.(), !dbg !149 -// CHECK:STDOUT: %ReturnConstCRef__carbon_thunk.call = call ptr @_Z15ReturnConstCRef10ForceThunk.carbon_thunk.(), !dbg !152 -// CHECK:STDOUT: %ReturnIntRef__carbon_thunk.call = call ptr @_Z12ReturnIntRef10ForceThunk.carbon_thunk.(), !dbg !155 -// CHECK:STDOUT: %ReturnIntRRef__carbon_thunk.call = call ptr @_Z13ReturnIntRRef10ForceThunk.carbon_thunk.(), !dbg !158 -// CHECK:STDOUT: %ReturnConstIntRef__carbon_thunk.call = call ptr @_Z17ReturnConstIntRef10ForceThunk.carbon_thunk.(), !dbg !161 -// CHECK:STDOUT: ret void, !dbg !164 +// CHECK:STDOUT: %ReturnCRef__carbon_thunk.call = call ptr @_Z10ReturnCRef10ForceThunk.carbon_thunk.(), !dbg !158 +// CHECK:STDOUT: %ReturnCRRef__carbon_thunk.call = call ptr @_Z11ReturnCRRef10ForceThunk.carbon_thunk.(), !dbg !161 +// CHECK:STDOUT: %ReturnConstCRef__carbon_thunk.call = call ptr @_Z15ReturnConstCRef10ForceThunk.carbon_thunk.(), !dbg !164 +// CHECK:STDOUT: %ReturnIntRef__carbon_thunk.call = call ptr @_Z12ReturnIntRef10ForceThunk.carbon_thunk.(), !dbg !167 +// CHECK:STDOUT: %ReturnIntRRef__carbon_thunk.call = call ptr @_Z13ReturnIntRRef10ForceThunk.carbon_thunk.(), !dbg !170 +// CHECK:STDOUT: %ReturnConstIntRef__carbon_thunk.call = call ptr @_Z17ReturnConstIntRef10ForceThunk.carbon_thunk.(), !dbg !173 +// CHECK:STDOUT: ret void, !dbg !176 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -707,30 +705,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 = !{!144} -// CHECK:STDOUT: !llvm.module.flags = !{!75, !76, !77, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!79} +// CHECK:STDOUT: !llvm.dbg.cu = !{!156} +// CHECK:STDOUT: !llvm.module.flags = !{!81, !82, !83, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!85} // 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: !66 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !67 = !{!"omnipotent char", !66, i64 0} -// CHECK:STDOUT: !72 = !{!"int", !67, i64 0} -// CHECK:STDOUT: !75 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !76 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !77 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !78 = !{!"__libc_errno", !72, i64 0} -// CHECK:STDOUT: !79 = !{!78, !72, i64 0} -// CHECK:STDOUT: !143 = !DIFile(filename: "return_references_via_thunk.carbon", directory: "") -// CHECK:STDOUT: !144 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !143, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !143, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !144) -// CHECK:STDOUT: !146 = !DILocation(line: 18, column: 22, scope: !145) -// CHECK:STDOUT: !149 = !DILocation(line: 19, column: 22, scope: !145) -// CHECK:STDOUT: !152 = !DILocation(line: 20, column: 28, scope: !145) -// CHECK:STDOUT: !155 = !DILocation(line: 22, column: 20, scope: !145) -// CHECK:STDOUT: !158 = !DILocation(line: 23, column: 20, scope: !145) -// CHECK:STDOUT: !161 = !DILocation(line: 24, column: 26, scope: !145) -// CHECK:STDOUT: !164 = !DILocation(line: 17, column: 1, scope: !145) +// CHECK:STDOUT: !72 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !73 = !{!"omnipotent char", !72, i64 0} +// CHECK:STDOUT: !78 = !{!"int", !73, i64 0} +// CHECK:STDOUT: !81 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !82 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !83 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !84 = !{!"__libc_errno", !78, i64 0} +// CHECK:STDOUT: !85 = !{!84, !78, i64 0} +// CHECK:STDOUT: !155 = !DIFile(filename: "return_references_via_thunk.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 = distinct !DISubprogram(name: "GetRefs", linkageName: "_CGetRefs.Main", scope: null, file: !155, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !156) +// CHECK:STDOUT: !158 = !DILocation(line: 18, column: 22, scope: !157) +// CHECK:STDOUT: !161 = !DILocation(line: 19, column: 22, scope: !157) +// CHECK:STDOUT: !164 = !DILocation(line: 20, column: 28, scope: !157) +// CHECK:STDOUT: !167 = !DILocation(line: 22, column: 20, scope: !157) +// CHECK:STDOUT: !170 = !DILocation(line: 23, column: 20, scope: !157) +// CHECK:STDOUT: !173 = !DILocation(line: 24, column: 26, scope: !157) +// CHECK:STDOUT: !176 = !DILocation(line: 17, column: 1, scope: !157) // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/share_ast.carbon b/toolchain/lower/testdata/interop/cpp/share_ast.carbon index 46070f66077c..57c2707470a7 100644 --- a/toolchain/lower/testdata/interop/cpp/share_ast.carbon +++ b/toolchain/lower/testdata/interop/cpp/share_ast.carbon @@ -98,7 +98,7 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: call void @_Z6make_av.carbon_thunk.(ptr %a.var), !dbg !54 // CHECK:STDOUT: %.loc6_11.1.b = getelementptr inbounds nuw [8 x i8], ptr %a.var, i32 0, i32 4, !dbg !56 // CHECK:STDOUT: %.loc6_11.2 = load i32, ptr %.loc6_11.1.b, align 4, !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %a.var), !dbg !53 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %a.var), !dbg !53 // CHECK:STDOUT: ret i32 %.loc6_11.2, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -106,30 +106,29 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: define internal void @_Z6make_av.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 !64 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !64 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !67 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !67 // CHECK:STDOUT: %call = call i64 @_Z6make_av() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2cd4feee22137a3: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: 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 void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %t) #0 !dbg !58 { +// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local i64 @_Z6make_av() #3 comdat { // CHECK:STDOUT: entry: // CHECK:STDOUT: %retval = alloca %struct.A, align 4 // CHECK:STDOUT: %a = getelementptr inbounds nuw %struct.A, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !66 +// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !69 // CHECK:STDOUT: %b = getelementptr inbounds nuw %struct.A, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !67 +// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !70 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } @@ -153,6 +152,7 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: !9 = !{!8, !7, i64 0} // CHECK:STDOUT: !10 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !11 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !34 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !42 = !DIFile(filename: "use_a.carbon", directory: "") // CHECK:STDOUT: !43 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !42, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !44 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -166,16 +166,16 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: !54 = !DILocation(line: 5, column: 18, scope: !50) // CHECK:STDOUT: !56 = !DILocation(line: 6, column: 10, scope: !50) // CHECK:STDOUT: !57 = !DILocation(line: 6, column: 3, scope: !50) -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core", scope: null, file: !42, line: 5, type: !49, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !61) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e885b4b34ded440e", scope: null, file: !34, line: 32, type: !49, spFlags: DISPFlagDefinition, unit: !43, retainedNodes: !64) // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !47) -// CHECK:STDOUT: !60 = !DILocation(line: 5, column: 3, scope: !58) -// CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = !{!"any pointer", !6, i64 0} -// CHECK:STDOUT: !63 = !{!"p1 _ZTS1A", !62, i64 0} -// CHECK:STDOUT: !64 = !{!63, !63, i64 0} -// CHECK:STDOUT: !65 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !66 = !{!65, !7, i64 0} -// CHECK:STDOUT: !67 = !{!65, !7, i64 4} +// CHECK:STDOUT: !63 = !DILocation(line: 32, column: 1, scope: !58) +// CHECK:STDOUT: !64 = !{!59} +// CHECK:STDOUT: !65 = !{!"any pointer", !6, i64 0} +// CHECK:STDOUT: !66 = !{!"p1 _ZTS1A", !65, i64 0} +// CHECK:STDOUT: !67 = !{!66, !66, i64 0} +// CHECK:STDOUT: !68 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !69 = !{!68, !7, i64 0} +// CHECK:STDOUT: !70 = !{!68, !7, i64 4} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_b.carbon' @@ -188,45 +188,44 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: $_Z6make_bv = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTest.Main() #0 !dbg !70 { +// CHECK:STDOUT: define i32 @_CTest.Main() #0 !dbg !73 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %b.var = alloca [8 x i8], align 4, !dbg !73 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !73 -// CHECK:STDOUT: call void @_Z6make_bv.carbon_thunk.(ptr %b.var), !dbg !74 -// CHECK:STDOUT: %.loc6_11.1.x = getelementptr inbounds nuw [8 x i8], ptr %b.var, i32 0, i32 0, !dbg !76 -// CHECK:STDOUT: %.loc6_11.2 = load i32, ptr %.loc6_11.1.x, align 4, !dbg !76 -// CHECK:STDOUT: call void @"_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core"(ptr %b.var), !dbg !73 -// CHECK:STDOUT: ret i32 %.loc6_11.2, !dbg !77 +// CHECK:STDOUT: %b.var = alloca [8 x i8], align 4, !dbg !76 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !76 +// CHECK:STDOUT: call void @_Z6make_bv.carbon_thunk.(ptr %b.var), !dbg !77 +// CHECK:STDOUT: %.loc6_11.1.x = getelementptr inbounds nuw [8 x i8], ptr %b.var, i32 0, i32 0, !dbg !79 +// CHECK:STDOUT: %.loc6_11.2 = load i32, ptr %.loc6_11.1.x, align 4, !dbg !79 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b993e18582fc56e0(ptr %b.var), !dbg !76 +// CHECK:STDOUT: ret i32 %.loc6_11.2, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z6make_bv.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 !83 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !83 +// 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: %call = call i64 @_Z6make_bv() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d4378aa76ca99c88: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: 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 void @_CSelfDestruct.Core.b993e18582fc56e0(ptr %t) #0 !dbg !81 { +// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local i64 @_Z6make_bv() #3 comdat { // CHECK:STDOUT: entry: // CHECK:STDOUT: %retval = alloca %struct.B, align 4 // CHECK:STDOUT: %x = getelementptr inbounds nuw %struct.B, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 3, ptr %x, align 4, !tbaa !85 +// CHECK:STDOUT: store i32 3, ptr %x, align 4, !tbaa !91 // CHECK:STDOUT: %y = getelementptr inbounds nuw %struct.B, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 4, ptr %y, align 4, !tbaa !86 +// CHECK:STDOUT: store i32 4, ptr %y, align 4, !tbaa !92 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } @@ -236,7 +235,7 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!69} +// CHECK:STDOUT: !llvm.dbg.cu = !{!72} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !10, !11} // CHECK:STDOUT: !llvm.errno.tbaa = !{!9} // CHECK:STDOUT: @@ -250,29 +249,30 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: !9 = !{!8, !7, i64 0} // CHECK:STDOUT: !10 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !11 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !34 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !44 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !45 = !{!44} // CHECK:STDOUT: !46 = !DISubroutineType(types: !45) // CHECK:STDOUT: !47 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !48 = !{null, !47} // CHECK:STDOUT: !49 = !DISubroutineType(types: !48) -// CHECK:STDOUT: !62 = !{!"any pointer", !6, i64 0} -// CHECK:STDOUT: !68 = !DIFile(filename: "use_b.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 = distinct !DISubprogram(name: "Test", linkageName: "_CTest.Main", scope: null, file: !68, line: 4, type: !46, spFlags: DISPFlagDefinition, unit: !69) -// CHECK:STDOUT: !73 = !DILocation(line: 5, column: 3, scope: !70) -// CHECK:STDOUT: !74 = !DILocation(line: 5, column: 18, scope: !70) -// CHECK:STDOUT: !76 = !DILocation(line: 6, column: 10, scope: !70) -// CHECK:STDOUT: !77 = !DILocation(line: 6, column: 3, scope: !70) -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core", scope: null, file: !68, line: 5, type: !49, spFlags: DISPFlagDefinition, unit: !69, retainedNodes: !81) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !47) -// CHECK:STDOUT: !80 = !DILocation(line: 5, column: 3, scope: !78) -// CHECK:STDOUT: !81 = !{!79} -// CHECK:STDOUT: !82 = !{!"p1 _ZTS1B", !62, i64 0} -// CHECK:STDOUT: !83 = !{!82, !82, i64 0} -// CHECK:STDOUT: !84 = !{!"_ZTS1B", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !85 = !{!84, !7, i64 0} -// CHECK:STDOUT: !86 = !{!84, !7, i64 4} +// CHECK:STDOUT: !65 = !{!"any pointer", !6, i64 0} +// CHECK:STDOUT: !71 = !DIFile(filename: "use_b.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: "Test", linkageName: "_CTest.Main", scope: null, file: !71, line: 4, type: !46, spFlags: DISPFlagDefinition, unit: !72) +// CHECK:STDOUT: !76 = !DILocation(line: 5, column: 3, scope: !73) +// CHECK:STDOUT: !77 = !DILocation(line: 5, column: 18, scope: !73) +// CHECK:STDOUT: !79 = !DILocation(line: 6, column: 10, scope: !73) +// CHECK:STDOUT: !80 = !DILocation(line: 6, column: 3, scope: !73) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b993e18582fc56e0", scope: null, file: !34, line: 32, type: !49, spFlags: DISPFlagDefinition, unit: !72, retainedNodes: !87) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !47) +// CHECK:STDOUT: !86 = !DILocation(line: 32, column: 1, scope: !81) +// CHECK:STDOUT: !87 = !{!82} +// CHECK:STDOUT: !88 = !{!"p1 _ZTS1B", !65, i64 0} +// CHECK:STDOUT: !89 = !{!88, !88, i64 0} +// CHECK:STDOUT: !90 = !{!"_ZTS1B", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !91 = !{!90, !7, i64 0} +// CHECK:STDOUT: !92 = !{!90, !7, i64 4} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_both.carbon' @@ -288,74 +288,72 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: $_Z6make_bv = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestA.Main() #0 !dbg !89 { +// CHECK:STDOUT: define i32 @_CTestA.Main() #0 !dbg !95 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca [8 x i8], align 4, !dbg !92 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !92 -// CHECK:STDOUT: call void @_Z6make_av.carbon_thunk.(ptr %a.var), !dbg !93 -// CHECK:STDOUT: %.loc7_11.1.b = getelementptr inbounds nuw [8 x i8], ptr %a.var, i32 0, i32 4, !dbg !95 -// CHECK:STDOUT: %.loc7_11.2 = load i32, ptr %.loc7_11.1.b, align 4, !dbg !95 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %a.var), !dbg !92 -// CHECK:STDOUT: ret i32 %.loc7_11.2, !dbg !96 +// CHECK:STDOUT: %a.var = alloca [8 x i8], align 4, !dbg !98 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !98 +// CHECK:STDOUT: call void @_Z6make_av.carbon_thunk.(ptr %a.var), !dbg !99 +// CHECK:STDOUT: %.loc7_11.1.b = getelementptr inbounds nuw [8 x i8], ptr %a.var, i32 0, i32 4, !dbg !101 +// CHECK:STDOUT: %.loc7_11.2 = load i32, ptr %.loc7_11.1.b, align 4, !dbg !101 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %a.var), !dbg !98 +// CHECK:STDOUT: ret i32 %.loc7_11.2, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z6make_av.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 !64 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !64 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !67 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !67 // CHECK:STDOUT: %call = call i64 @_Z6make_av() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %self) #0 !dbg !97 { +// CHECK:STDOUT: define i32 @_CTestB.Main() #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !99 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CTestB.Main() #0 !dbg !101 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %b.var = alloca [8 x i8], align 4, !dbg !104 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !104 -// CHECK:STDOUT: call void @_Z6make_bv.carbon_thunk.(ptr %b.var), !dbg !105 -// CHECK:STDOUT: %.loc12_11.1.x = getelementptr inbounds nuw [8 x i8], ptr %b.var, i32 0, i32 0, !dbg !107 -// CHECK:STDOUT: %.loc12_11.2 = load i32, ptr %.loc12_11.1.x, align 4, !dbg !107 -// CHECK:STDOUT: call void @"_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core"(ptr %b.var), !dbg !104 -// CHECK:STDOUT: ret i32 %.loc12_11.2, !dbg !108 +// CHECK:STDOUT: %b.var = alloca [8 x i8], align 4, !dbg !106 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !106 +// CHECK:STDOUT: call void @_Z6make_bv.carbon_thunk.(ptr %b.var), !dbg !107 +// CHECK:STDOUT: %.loc12_11.1.x = getelementptr inbounds nuw [8 x i8], ptr %b.var, i32 0, i32 0, !dbg !109 +// CHECK:STDOUT: %.loc12_11.2 = load i32, ptr %.loc12_11.1.x, align 4, !dbg !109 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b993e18582fc56e0(ptr %b.var), !dbg !106 +// CHECK:STDOUT: ret i32 %.loc12_11.2, !dbg !110 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z6make_bv.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 !83 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !83 +// 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: %call = call i64 @_Z6make_bv() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d4378aa76ca99c88: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: 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 void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %t) #0 !dbg !111 { +// CHECK:STDOUT: ret void, !dbg !116 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b993e18582fc56e0(ptr %t) #0 !dbg !118 { +// CHECK:STDOUT: ret void, !dbg !123 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local i64 @_Z6make_av() #3 comdat { // CHECK:STDOUT: entry: // CHECK:STDOUT: %retval = alloca %struct.A.34, align 4 // CHECK:STDOUT: %a = getelementptr inbounds nuw %struct.A.34, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !66 +// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !69 // CHECK:STDOUT: %b = getelementptr inbounds nuw %struct.A.34, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !67 +// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !70 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } @@ -365,9 +363,9 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %retval = alloca %struct.B.35, align 4 // CHECK:STDOUT: %x = getelementptr inbounds nuw %struct.B.35, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 3, ptr %x, align 4, !tbaa !85 +// CHECK:STDOUT: store i32 3, ptr %x, align 4, !tbaa !91 // CHECK:STDOUT: %y = getelementptr inbounds nuw %struct.B.35, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 4, ptr %y, align 4, !tbaa !86 +// CHECK:STDOUT: store i32 4, ptr %y, align 4, !tbaa !92 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } @@ -380,7 +378,7 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!88} +// CHECK:STDOUT: !llvm.dbg.cu = !{!94} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !10, !11} // CHECK:STDOUT: !llvm.errno.tbaa = !{!9} // CHECK:STDOUT: @@ -394,43 +392,44 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: !9 = !{!8, !7, i64 0} // CHECK:STDOUT: !10 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !11 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !34 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !44 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !45 = !{!44} // CHECK:STDOUT: !46 = !DISubroutineType(types: !45) // CHECK:STDOUT: !47 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !48 = !{null, !47} // CHECK:STDOUT: !49 = !DISubroutineType(types: !48) -// CHECK:STDOUT: !62 = !{!"any pointer", !6, i64 0} -// CHECK:STDOUT: !63 = !{!"p1 _ZTS1A", !62, i64 0} -// CHECK:STDOUT: !64 = !{!63, !63, i64 0} -// CHECK:STDOUT: !65 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !66 = !{!65, !7, i64 0} -// CHECK:STDOUT: !67 = !{!65, !7, i64 4} -// CHECK:STDOUT: !82 = !{!"p1 _ZTS1B", !62, i64 0} -// CHECK:STDOUT: !83 = !{!82, !82, i64 0} -// CHECK:STDOUT: !84 = !{!"_ZTS1B", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !85 = !{!84, !7, i64 0} -// CHECK:STDOUT: !86 = !{!84, !7, i64 4} -// CHECK:STDOUT: !87 = !DIFile(filename: "use_both.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: "TestA", linkageName: "_CTestA.Main", scope: null, file: !87, line: 5, type: !46, spFlags: DISPFlagDefinition, unit: !88) -// CHECK:STDOUT: !92 = !DILocation(line: 6, column: 3, scope: !89) -// CHECK:STDOUT: !93 = !DILocation(line: 6, column: 18, scope: !89) -// CHECK:STDOUT: !95 = !DILocation(line: 7, column: 10, scope: !89) -// CHECK:STDOUT: !96 = !DILocation(line: 7, column: 3, scope: !89) -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core", scope: null, file: !87, line: 6, type: !49, spFlags: DISPFlagDefinition, unit: !88, retainedNodes: !100) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !47) -// CHECK:STDOUT: !99 = !DILocation(line: 6, column: 3, scope: !97) -// CHECK:STDOUT: !100 = !{!98} -// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "TestB", linkageName: "_CTestB.Main", scope: null, file: !87, line: 10, type: !46, spFlags: DISPFlagDefinition, unit: !88) -// CHECK:STDOUT: !104 = !DILocation(line: 11, column: 3, scope: !101) -// CHECK:STDOUT: !105 = !DILocation(line: 11, column: 18, scope: !101) -// CHECK:STDOUT: !107 = !DILocation(line: 12, column: 10, scope: !101) -// CHECK:STDOUT: !108 = !DILocation(line: 12, column: 3, scope: !101) -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d4378aa76ca99c88:core.Destroy.Core", scope: null, file: !87, line: 11, type: !49, spFlags: DISPFlagDefinition, unit: !88, retainedNodes: !112) -// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !47) -// CHECK:STDOUT: !111 = !DILocation(line: 11, column: 3, scope: !109) -// CHECK:STDOUT: !112 = !{!110} +// CHECK:STDOUT: !65 = !{!"any pointer", !6, i64 0} +// CHECK:STDOUT: !66 = !{!"p1 _ZTS1A", !65, i64 0} +// CHECK:STDOUT: !67 = !{!66, !66, i64 0} +// CHECK:STDOUT: !68 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !69 = !{!68, !7, i64 0} +// CHECK:STDOUT: !70 = !{!68, !7, i64 4} +// CHECK:STDOUT: !88 = !{!"p1 _ZTS1B", !65, i64 0} +// CHECK:STDOUT: !89 = !{!88, !88, i64 0} +// CHECK:STDOUT: !90 = !{!"_ZTS1B", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !91 = !{!90, !7, i64 0} +// CHECK:STDOUT: !92 = !{!90, !7, i64 4} +// CHECK:STDOUT: !93 = !DIFile(filename: "use_both.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 = distinct !DISubprogram(name: "TestA", linkageName: "_CTestA.Main", scope: null, file: !93, line: 5, type: !46, spFlags: DISPFlagDefinition, unit: !94) +// CHECK:STDOUT: !98 = !DILocation(line: 6, column: 3, scope: !95) +// CHECK:STDOUT: !99 = !DILocation(line: 6, column: 18, scope: !95) +// CHECK:STDOUT: !101 = !DILocation(line: 7, column: 10, scope: !95) +// CHECK:STDOUT: !102 = !DILocation(line: 7, column: 3, scope: !95) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "TestB", linkageName: "_CTestB.Main", scope: null, file: !93, line: 10, type: !46, spFlags: DISPFlagDefinition, unit: !94) +// CHECK:STDOUT: !106 = !DILocation(line: 11, column: 3, scope: !103) +// CHECK:STDOUT: !107 = !DILocation(line: 11, column: 18, scope: !103) +// CHECK:STDOUT: !109 = !DILocation(line: 12, column: 10, scope: !103) +// CHECK:STDOUT: !110 = !DILocation(line: 12, column: 3, scope: !103) +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e885b4b34ded440e", scope: null, file: !34, line: 32, type: !49, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !117) +// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !47) +// CHECK:STDOUT: !116 = !DILocation(line: 32, column: 1, scope: !111) +// CHECK:STDOUT: !117 = !{!112} +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b993e18582fc56e0", scope: null, file: !34, line: 32, type: !49, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !124) +// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !47) +// CHECK:STDOUT: !123 = !DILocation(line: 32, column: 1, scope: !118) +// CHECK:STDOUT: !124 = !{!119} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_lib.carbon' @@ -446,36 +445,29 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: define internal void @_Z6make_av.carbon_thunk.(ptr noundef %return) #0 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !64 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !64 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !67 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !67 // CHECK:STDOUT: %call = call i64 @_Z6make_av() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %self) #1 !dbg !115 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !117 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable -// CHECK:STDOUT: define linkonce_odr dso_local i64 @_Z6make_av() #2 comdat { +// CHECK:STDOUT: define linkonce_odr dso_local i64 @_Z6make_av() #1 comdat { // CHECK:STDOUT: entry: // CHECK:STDOUT: %retval = alloca %struct.A.38, align 4 // CHECK:STDOUT: %a = getelementptr inbounds nuw %struct.A.38, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !66 +// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !69 // CHECK:STDOUT: %b = getelementptr inbounds nuw %struct.A.38, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !67 +// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !70 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { 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 #1 = { nounwind } -// CHECK:STDOUT: attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +// CHECK:STDOUT: attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!114} +// CHECK:STDOUT: !llvm.dbg.cu = !{!126} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !10, !11} // CHECK:STDOUT: !llvm.errno.tbaa = !{!9} // CHECK:STDOUT: @@ -489,21 +481,14 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: !9 = !{!8, !7, i64 0} // CHECK:STDOUT: !10 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !11 = !{i32 2, !"Debug Info Version", i32 3} -// CHECK:STDOUT: !47 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !48 = !{null, !47} -// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) -// CHECK:STDOUT: !62 = !{!"any pointer", !6, i64 0} -// CHECK:STDOUT: !63 = !{!"p1 _ZTS1A", !62, i64 0} -// CHECK:STDOUT: !64 = !{!63, !63, i64 0} -// CHECK:STDOUT: !65 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !66 = !{!65, !7, i64 0} -// CHECK:STDOUT: !67 = !{!65, !7, i64 4} -// CHECK:STDOUT: !113 = !DIFile(filename: "generic_lib.carbon", directory: "") -// CHECK:STDOUT: !114 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !113, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core", scope: null, file: !113, line: 5, type: !49, spFlags: DISPFlagDefinition, unit: !114, retainedNodes: !118) -// CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !47) -// CHECK:STDOUT: !117 = !DILocation(line: 5, column: 3, scope: !115) -// CHECK:STDOUT: !118 = !{!116} +// CHECK:STDOUT: !65 = !{!"any pointer", !6, i64 0} +// CHECK:STDOUT: !66 = !{!"p1 _ZTS1A", !65, i64 0} +// CHECK:STDOUT: !67 = !{!66, !66, i64 0} +// CHECK:STDOUT: !68 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !69 = !{!68, !7, i64 0} +// CHECK:STDOUT: !70 = !{!68, !7, i64 4} +// CHECK:STDOUT: !125 = !DIFile(filename: "generic_lib.carbon", directory: "") +// CHECK:STDOUT: !126 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !125, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'no_cpp_imports.carbon' @@ -516,47 +501,50 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: $_Z6make_av = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CCallGeneric.Main() #0 !dbg !121 { +// CHECK:STDOUT: define i32 @_CCallGeneric.Main() #0 !dbg !129 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %MakeA.call = call i32 @_CMakeA.Main.084a2801e0f5d754({} zeroinitializer), !dbg !124 -// CHECK:STDOUT: ret i32 %MakeA.call, !dbg !127 +// CHECK:STDOUT: %MakeA.call = call i32 @_CMakeA.Main.084a2801e0f5d754({} zeroinitializer), !dbg !132 +// CHECK:STDOUT: ret i32 %MakeA.call, !dbg !135 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CMakeA.Main.084a2801e0f5d754({} %x) #0 !dbg !128 { -// CHECK:STDOUT: %1 = alloca [8 x i8], align 4, !dbg !133 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !133 -// CHECK:STDOUT: call void @_Z6make_av.carbon_thunk.(ptr %1), !dbg !134 -// CHECK:STDOUT: %b = getelementptr inbounds nuw [8 x i8], ptr %1, i32 0, i32 4, !dbg !136 -// CHECK:STDOUT: %2 = load i32, ptr %b, align 4, !dbg !136 -// CHECK:STDOUT: call void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr %1), !dbg !133 -// CHECK:STDOUT: ret i32 %2, !dbg !137 +// CHECK:STDOUT: define linkonce_odr i32 @_CMakeA.Main.084a2801e0f5d754({} %x) #0 !dbg !136 { +// CHECK:STDOUT: %1 = alloca [8 x i8], align 4, !dbg !141 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !141 +// CHECK:STDOUT: call void @_Z6make_av.carbon_thunk.(ptr %1), !dbg !142 +// CHECK:STDOUT: %b = getelementptr inbounds nuw [8 x i8], ptr %1, i32 0, i32 4, !dbg !144 +// CHECK:STDOUT: %2 = load i32, ptr %b, align 4, !dbg !144 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %1), !dbg !141 +// CHECK:STDOUT: ret i32 %2, !dbg !145 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable // CHECK:STDOUT: define internal void @_Z6make_av.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 !64 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !64 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !67 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !67 // CHECK:STDOUT: %call = call i64 @_Z6make_av() // CHECK:STDOUT: store i64 %call, ptr %0, align 4 // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_CSelfDestruct.f2cd4feee22137a3:core.Destroy.Core"(ptr) -// 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 void @_CSelfDestruct.Core.e885b4b34ded440e(ptr %t) #0 !dbg !147 { +// CHECK:STDOUT: ret void, !dbg !152 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: inlinehint mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local i64 @_Z6make_av() #3 comdat { // CHECK:STDOUT: entry: // CHECK:STDOUT: %retval = alloca %struct.A.41, align 4 // CHECK:STDOUT: %a = getelementptr inbounds nuw %struct.A.41, ptr %retval, i32 0, i32 0 -// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !66 +// CHECK:STDOUT: store i32 1, ptr %a, align 4, !tbaa !69 // CHECK:STDOUT: %b = getelementptr inbounds nuw %struct.A.41, ptr %retval, i32 0, i32 1 -// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !67 +// CHECK:STDOUT: store i32 2, ptr %b, align 4, !tbaa !70 // CHECK:STDOUT: %0 = load i64, ptr %retval, align 4 // CHECK:STDOUT: ret i64 %0 // CHECK:STDOUT: } @@ -566,7 +554,7 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!120} +// CHECK:STDOUT: !llvm.dbg.cu = !{!128} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3, !4, !10, !11} // CHECK:STDOUT: !llvm.errno.tbaa = !{!9} // CHECK:STDOUT: @@ -580,29 +568,36 @@ fn CallGeneric() -> i32 { // CHECK:STDOUT: !9 = !{!8, !7, i64 0} // CHECK:STDOUT: !10 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !11 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !34 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !44 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !45 = !{!44} // CHECK:STDOUT: !46 = !DISubroutineType(types: !45) // CHECK:STDOUT: !47 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !62 = !{!"any pointer", !6, i64 0} -// CHECK:STDOUT: !63 = !{!"p1 _ZTS1A", !62, i64 0} -// CHECK:STDOUT: !64 = !{!63, !63, i64 0} -// CHECK:STDOUT: !65 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} -// CHECK:STDOUT: !66 = !{!65, !7, i64 0} -// CHECK:STDOUT: !67 = !{!65, !7, i64 4} -// CHECK:STDOUT: !113 = !DIFile(filename: "generic_lib.carbon", directory: "") -// CHECK:STDOUT: !119 = !DIFile(filename: "no_cpp_imports.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: "CallGeneric", linkageName: "_CCallGeneric.Main", scope: null, file: !119, line: 4, type: !46, spFlags: DISPFlagDefinition, unit: !120) -// CHECK:STDOUT: !124 = !DILocation(line: 5, column: 10, scope: !121) -// CHECK:STDOUT: !125 = !{!44, !47} -// CHECK:STDOUT: !126 = !DISubroutineType(types: !125) -// CHECK:STDOUT: !127 = !DILocation(line: 5, column: 3, scope: !121) -// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "MakeA", linkageName: "_CMakeA.Main.084a2801e0f5d754", scope: null, file: !113, line: 4, type: !126, spFlags: DISPFlagDefinition, unit: !120, retainedNodes: !138) -// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !47) -// CHECK:STDOUT: !133 = !DILocation(line: 5, column: 3, scope: !128) -// CHECK:STDOUT: !134 = !DILocation(line: 5, column: 18, scope: !128) -// CHECK:STDOUT: !136 = !DILocation(line: 6, column: 10, scope: !128) -// CHECK:STDOUT: !137 = !DILocation(line: 6, column: 3, scope: !128) -// CHECK:STDOUT: !138 = !{!129} +// CHECK:STDOUT: !48 = !{null, !47} +// CHECK:STDOUT: !49 = !DISubroutineType(types: !48) +// CHECK:STDOUT: !65 = !{!"any pointer", !6, i64 0} +// CHECK:STDOUT: !66 = !{!"p1 _ZTS1A", !65, i64 0} +// CHECK:STDOUT: !67 = !{!66, !66, i64 0} +// CHECK:STDOUT: !68 = !{!"_ZTS1A", !7, i64 0, !7, i64 4} +// CHECK:STDOUT: !69 = !{!68, !7, i64 0} +// CHECK:STDOUT: !70 = !{!68, !7, i64 4} +// CHECK:STDOUT: !125 = !DIFile(filename: "generic_lib.carbon", directory: "") +// CHECK:STDOUT: !127 = !DIFile(filename: "no_cpp_imports.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: "CallGeneric", linkageName: "_CCallGeneric.Main", scope: null, file: !127, line: 4, type: !46, spFlags: DISPFlagDefinition, unit: !128) +// CHECK:STDOUT: !132 = !DILocation(line: 5, column: 10, scope: !129) +// CHECK:STDOUT: !133 = !{!44, !47} +// CHECK:STDOUT: !134 = !DISubroutineType(types: !133) +// CHECK:STDOUT: !135 = !DILocation(line: 5, column: 3, scope: !129) +// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "MakeA", linkageName: "_CMakeA.Main.084a2801e0f5d754", scope: null, file: !125, line: 4, type: !134, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !146) +// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !47) +// CHECK:STDOUT: !141 = !DILocation(line: 5, column: 3, scope: !136) +// CHECK:STDOUT: !142 = !DILocation(line: 5, column: 18, scope: !136) +// CHECK:STDOUT: !144 = !DILocation(line: 6, column: 10, scope: !136) +// CHECK:STDOUT: !145 = !DILocation(line: 6, column: 3, scope: !136) +// CHECK:STDOUT: !146 = !{!137} +// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e885b4b34ded440e", scope: null, file: !34, line: 32, type: !49, spFlags: DISPFlagDefinition, unit: !128, retainedNodes: !153) +// CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !47) +// CHECK:STDOUT: !152 = !DILocation(line: 32, column: 1, scope: !147) +// CHECK:STDOUT: !153 = !{!148} // 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 92b2ada4179c..e9c42f1526fa 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 @@ -86,84 +86,59 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: declare void @_CWithinLifetime.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitDirectly.Main() #0 !dbg !16 { +// CHECK:STDOUT: define void @_CInitDirectly.Main() #0 !dbg !14 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !17 -// CHECK:STDOUT: %.loc13_50.3.temp = alloca [3 x i32], align 4, !dbg !18 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !17 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_50.3.temp), !dbg !18 -// CHECK:STDOUT: %.loc13_50.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 0, !dbg !18 -// CHECK:STDOUT: %.loc13_50.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 1, !dbg !18 -// CHECK:STDOUT: %.loc13_50.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 2, !dbg !18 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !17 -// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !17 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !17 -// CHECK:STDOUT: store ptr getelementptr inbounds (i8, ptr @array.loc13_50.15, i64 12), ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !17 -// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !20 -// CHECK:STDOUT: call void @"_CSelfDestruct.95c1f38708147abd:core.Destroy.Core"(ptr @array), !dbg !18 -// CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %_.var), !dbg !17 -// CHECK:STDOUT: ret void, !dbg !21 +// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !15 +// CHECK:STDOUT: %.loc13_50.3.temp = alloca [3 x i32], align 4, !dbg !16 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !15 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_50.3.temp), !dbg !16 +// CHECK:STDOUT: %.loc13_50.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 0, !dbg !16 +// CHECK:STDOUT: %.loc13_50.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 1, !dbg !16 +// CHECK:STDOUT: %.loc13_50.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 2, !dbg !16 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !15 +// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !15 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !15 +// CHECK:STDOUT: store ptr getelementptr inbounds (i8, ptr @array.loc13_50.15, i64 12), ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !15 +// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !18 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c1f9a57dcd9034c0(ptr @array), !dbg !16 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8fadf2a6223921e7(ptr %_.var), !dbg !15 +// CHECK:STDOUT: ret void, !dbg !19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %self) #0 !dbg !23 { +// CHECK:STDOUT: define weak_odr void @"_COp.95c1f38708147abd:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !20 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !25 +// CHECK:STDOUT: %.loc13_50.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !22 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc13_50.1.array.index), !dbg !22 +// CHECK:STDOUT: %.loc13_50.4.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !22 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc13_50.4.array.index), !dbg !22 +// CHECK:STDOUT: %.loc13_50.7.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !22 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc13_50.7.array.index), !dbg !22 +// CHECK:STDOUT: ret void, !dbg !22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !27 { +// CHECK:STDOUT: define void @_CInitVectorLike.Main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !29 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95c1f38708147abd:core.Destroy.Core"(ptr %self) #0 !dbg !31 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc13_50.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc13_50.1.array.index), !dbg !33 -// CHECK:STDOUT: %.loc13_50.2.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc13_50.2.array.index), !dbg !33 -// CHECK:STDOUT: %.loc13_50.3.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc13_50.3.array.index), !dbg !33 -// CHECK:STDOUT: ret void, !dbg !33 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95c1f38708147abd:core.Destroy.Core"(ptr %self) #0 !dbg !35 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95c1f38708147abd: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 @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %self) #0 !dbg !39 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !41 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitVectorLike.Main() #0 !dbg !43 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !44 -// CHECK:STDOUT: %.loc18_36.3.temp = alloca [16 x i8], align 8, !dbg !45 -// CHECK:STDOUT: %.loc18_36.5.temp = alloca [3 x i32], align 4, !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !44 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.3.temp), !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.5.temp), !dbg !45 -// CHECK:STDOUT: %.loc18_36.6.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 0, !dbg !45 -// CHECK:STDOUT: %.loc18_36.9.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 1, !dbg !45 -// CHECK:STDOUT: %.loc18_36.12.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 2, !dbg !45 -// 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 !45 -// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !45 -// 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 !45 -// CHECK:STDOUT: store ptr getelementptr inbounds (i8, ptr @array.loc13_50.15, i64 12), ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !45 -// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk._(ptr %.loc18_36.3.temp, ptr %_.var), !dbg !44 -// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %.loc18_36.3.temp), !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.95c1f38708147abd:core.Destroy.Core"(ptr @array), !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %_.var), !dbg !44 -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !27 +// CHECK:STDOUT: %.loc18_36.3.temp = alloca [16 x i8], align 8, !dbg !28 +// CHECK:STDOUT: %.loc18_36.5.temp = alloca [3 x i32], align 4, !dbg !28 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !27 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.3.temp), !dbg !28 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.5.temp), !dbg !28 +// CHECK:STDOUT: %.loc18_36.6.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 0, !dbg !28 +// CHECK:STDOUT: %.loc18_36.9.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 1, !dbg !28 +// CHECK:STDOUT: %.loc18_36.12.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 2, !dbg !28 +// 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 !28 +// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !28 +// 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 !28 +// CHECK:STDOUT: store ptr getelementptr inbounds (i8, ptr @array.loc13_50.15, i64 12), ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !28 +// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk._(ptr %.loc18_36.3.temp, ptr %_.var), !dbg !27 +// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !30 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8fadf2a6223921e7(ptr %.loc18_36.3.temp), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c1f9a57dcd9034c0(ptr @array), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d132f40e8df7d517(ptr %_.var), !dbg !27 +// CHECK:STDOUT: ret void, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -172,11 +147,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 !83 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !85 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !85 -// CHECK:STDOUT: %1 = load ptr, ptr %list.addr, align 8, !tbaa !83 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !90 +// CHECK:STDOUT: store ptr %list, ptr %list.addr, align 8, !tbaa !96 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !98 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !98 +// CHECK:STDOUT: %1 = load ptr, ptr %list.addr, align 8, !tbaa !96 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !103 // 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 @@ -189,54 +164,41 @@ 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 !85 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !98 // 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 !49 { +// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #0 !dbg !32 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %self), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !51 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #0 !dbg !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !54 -// CHECK:STDOUT: %.loc23_69.17.temp = alloca [3 x [1 x i8]], align 1, !dbg !55 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !54 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.17.temp), !dbg !55 -// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 0, !dbg !55 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.18.array.index), !dbg !55 -// CHECK:STDOUT: %.loc23_69.16.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 1, !dbg !55 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.16.array.index), !dbg !55 -// CHECK:STDOUT: %.loc23_69.15.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 2, !dbg !55 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.15.array.index), !dbg !55 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !54 -// CHECK:STDOUT: store ptr %.loc23_69.17.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !54 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !54 -// CHECK:STDOUT: %initializer_list.initializer_list.call.array.end = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 1, !dbg !54 -// CHECK:STDOUT: store ptr %initializer_list.initializer_list.call.array.end, ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !54 -// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !57 -// CHECK:STDOUT: call void @"_CSelfDestruct.9e21ffe3f520886e:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %_.var), !dbg !54 -// CHECK:STDOUT: ret void, !dbg !58 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core"(ptr %self) #0 !dbg !59 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !33 +// CHECK:STDOUT: %.loc23_69.19.temp = alloca [3 x [1 x i8]], align 1, !dbg !34 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !33 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.19.temp), !dbg !34 +// CHECK:STDOUT: %.loc23_69.20.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.19.temp, i32 0, i64 0, !dbg !34 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.20.array.index), !dbg !34 +// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.19.temp, i32 0, i64 1, !dbg !34 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.18.array.index), !dbg !34 +// CHECK:STDOUT: %.loc23_69.17.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.19.temp, i32 0, i64 2, !dbg !34 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.17.array.index), !dbg !34 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: store ptr %.loc23_69.19.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !33 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.end = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !33 +// CHECK:STDOUT: %initializer_list.initializer_list.call.array.end = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.19.temp, i32 1, !dbg !33 +// CHECK:STDOUT: store ptr %initializer_list.initializer_list.call.array.end, ptr %initializer_list.initializer_list.call.init_list.end, align 8, !dbg !33 +// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !36 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.1eeb6e704b5694d3(ptr %.loc23_69.19.temp), !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.aaec36b18655cbe5(ptr %_.var), !dbg !33 +// CHECK:STDOUT: ret void, !dbg !37 // 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 !92 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !92 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !105 +// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !105 // CHECK:STDOUT: call void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -245,46 +207,65 @@ 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 !92 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !105 // 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 !63 { +// CHECK:STDOUT: define weak_odr void @"_COp.9e21ffe3f520886e:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorD2Ev(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.9e21ffe3f520886e:core.Destroy.Core"(ptr %self) #0 !dbg !67 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc23_69.1.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 2, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %.loc23_69.1.array.index), !dbg !69 -// CHECK:STDOUT: %.loc23_69.2.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 1, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %.loc23_69.2.array.index), !dbg !69 -// CHECK:STDOUT: %.loc23_69.3.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 0, !dbg !69 -// CHECK:STDOUT: call void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %.loc23_69.3.array.index), !dbg !69 -// CHECK:STDOUT: ret void, !dbg !69 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9e21ffe3f520886e:core.Destroy.Core"(ptr %self) #0 !dbg !71 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.9e21ffe3f520886e: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.b204467699306999:core.Destroy.Core"(ptr %self) #0 !dbg !75 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: %.loc23_69.1.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 2, !dbg !40 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d494e56ab76fb5f0(ptr %.loc23_69.1.array.index), !dbg !40 +// CHECK:STDOUT: %.loc23_69.4.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 1, !dbg !40 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d494e56ab76fb5f0(ptr %.loc23_69.4.array.index), !dbg !40 +// CHECK:STDOUT: %.loc23_69.7.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 0, !dbg !40 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d494e56ab76fb5f0(ptr %.loc23_69.7.array.index), !dbg !40 +// CHECK:STDOUT: ret void, !dbg !40 // 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 void @_CSelfDestruct.Core.c1f9a57dcd9034c0(ptr %t) #0 !dbg !43 { +// CHECK:STDOUT: call void @"_COp.95c1f38708147abd:core.SubobjectDestroy.Core"(ptr %t), !dbg !47 +// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8fadf2a6223921e7(ptr %t) #0 !dbg !50 { +// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9a03059f269926ed(ptr %t) #0 !dbg !57 { +// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.d132f40e8df7d517(ptr %t) #0 !dbg !64 { +// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %t), !dbg !68 +// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.1eeb6e704b5694d3(ptr %t) #0 !dbg !71 { +// CHECK:STDOUT: call void @"_COp.9e21ffe3f520886e:core.SubobjectDestroy.Core"(ptr %t), !dbg !75 +// CHECK:STDOUT: ret void, !dbg !76 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.aaec36b18655cbe5(ptr %t) #0 !dbg !78 { +// CHECK:STDOUT: ret void, !dbg !83 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.d494e56ab76fb5f0(ptr %t) #0 !dbg !85 { +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorD2Ev(ptr %t), !dbg !89 +// CHECK:STDOUT: ret void, !dbg !90 +// 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) #3 // CHECK:STDOUT: @@ -297,7 +278,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 !85 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !98 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -306,7 +287,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 !92 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !105 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -314,6 +295,10 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple., { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.c1f9a57dcd9034c0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.8fadf2a6223921e7, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9a03059f269926ed, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.d494e56ab76fb5f0, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -321,8 +306,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 = !{!93, !94, !95, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!97} +// CHECK:STDOUT: !llvm.module.flags = !{!106, !107, !108, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!110} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -334,84 +319,80 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !10 = !{null, !9} // CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{null, !6} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !16 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !4, line: 12, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !17 = !DILocation(line: 13, column: 3, scope: !16) -// CHECK:STDOUT: !18 = !DILocation(line: 13, column: 42, scope: !16) -// CHECK:STDOUT: !20 = !DILocation(line: 14, column: 3, scope: !16) -// CHECK:STDOUT: !21 = !DILocation(line: 12, column: 1, scope: !16) -// CHECK:STDOUT: !22 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !22, line: 164, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !26) -// CHECK:STDOUT: !24 = !DILocalVariable(arg: 1, scope: !23, type: !9) -// CHECK:STDOUT: !25 = !DILocation(line: 164, column: 19, scope: !23) -// CHECK:STDOUT: !26 = !{!24} -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 13, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) -// 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.95c1f38708147abd:core.Destroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !34) -// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !9) -// CHECK:STDOUT: !33 = !DILocation(line: 13, column: 42, scope: !31) -// CHECK:STDOUT: !34 = !{!32} -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95c1f38708147abd: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: "SelfDestruct", linkageName: "_CSelfDestruct.9e47f6d7a7c1f630: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: 3, scope: !39) -// CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !4, line: 17, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !44 = !DILocation(line: 18, column: 3, scope: !43) -// CHECK:STDOUT: !45 = !DILocation(line: 18, column: 28, scope: !43) -// CHECK:STDOUT: !47 = !DILocation(line: 19, column: 3, scope: !43) -// CHECK:STDOUT: !48 = !DILocation(line: 17, column: 1, scope: !43) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core", scope: null, file: !4, line: 18, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !52) -// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !9) -// CHECK:STDOUT: !51 = !DILocation(line: 18, column: 3, scope: !49) -// CHECK:STDOUT: !52 = !{!50} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !4, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !54 = !DILocation(line: 23, column: 3, scope: !53) -// CHECK:STDOUT: !55 = !DILocation(line: 23, column: 58, scope: !53) -// CHECK:STDOUT: !57 = !DILocation(line: 24, column: 3, scope: !53) -// CHECK:STDOUT: !58 = !DILocation(line: 22, column: 1, scope: !53) -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core", scope: null, file: !22, line: 164, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !62) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !9) -// CHECK:STDOUT: !61 = !DILocation(line: 164, column: 19, scope: !59) -// CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !9) -// CHECK:STDOUT: !65 = !DILocation(line: 23, column: 58, scope: !63) -// CHECK:STDOUT: !66 = !{!64} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9e21ffe3f520886e: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: 23, column: 58, scope: !67) -// CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9e21ffe3f520886e:core.Destroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !4, line: 12, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !15 = !DILocation(line: 13, column: 3, scope: !14) +// CHECK:STDOUT: !16 = !DILocation(line: 13, column: 42, scope: !14) +// CHECK:STDOUT: !18 = !DILocation(line: 14, column: 3, scope: !14) +// CHECK:STDOUT: !19 = !DILocation(line: 12, column: 1, scope: !14) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95c1f38708147abd:core.SubobjectDestroy.Core", scope: null, file: !4, line: 13, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !20, type: !9) +// CHECK:STDOUT: !22 = !DILocation(line: 13, column: 42, scope: !20) +// CHECK:STDOUT: !23 = !{null, !6} +// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) +// CHECK:STDOUT: !25 = !{!21} +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !4, line: 17, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !27 = !DILocation(line: 18, column: 3, scope: !26) +// CHECK:STDOUT: !28 = !DILocation(line: 18, column: 28, scope: !26) +// CHECK:STDOUT: !30 = !DILocation(line: 19, column: 3, scope: !26) +// CHECK:STDOUT: !31 = !DILocation(line: 17, column: 1, scope: !26) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !4, line: 22, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !33 = !DILocation(line: 23, column: 3, scope: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 23, column: 58, scope: !32) +// CHECK:STDOUT: !36 = !DILocation(line: 24, column: 3, scope: !32) +// CHECK:STDOUT: !37 = !DILocation(line: 22, column: 1, scope: !32) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.9e21ffe3f520886e:core.SubobjectDestroy.Core", scope: null, file: !4, line: 23, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !9) +// CHECK:STDOUT: !40 = !DILocation(line: 23, column: 58, scope: !38) +// CHECK:STDOUT: !41 = !{!39} +// CHECK:STDOUT: !42 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.c1f9a57dcd9034c0", scope: null, file: !42, line: 36, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !49) +// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !9) +// CHECK:STDOUT: !47 = !DILocation(line: 38, column: 5, scope: !43) +// CHECK:STDOUT: !48 = !DILocation(line: 36, column: 1, scope: !43) +// CHECK:STDOUT: !49 = !{!44} +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8fadf2a6223921e7", scope: null, file: !42, line: 36, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !56) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !9) +// CHECK:STDOUT: !55 = !DILocation(line: 36, column: 1, scope: !50) +// CHECK:STDOUT: !56 = !{!51} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9a03059f269926ed", scope: null, file: !42, line: 36, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !6) +// CHECK:STDOUT: !62 = !DILocation(line: 36, column: 1, scope: !57) +// CHECK:STDOUT: !63 = !{!58} +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.d132f40e8df7d517", scope: null, file: !42, line: 36, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) +// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !9) +// CHECK:STDOUT: !68 = !DILocation(line: 38, column: 5, scope: !64) +// CHECK:STDOUT: !69 = !DILocation(line: 36, column: 1, scope: !64) +// CHECK:STDOUT: !70 = !{!65} +// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.1eeb6e704b5694d3", scope: null, file: !42, line: 36, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !77) // 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: "SelfDestruct", linkageName: "_CSelfDestruct.b204467699306999: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: 3, scope: !75) -// CHECK:STDOUT: !78 = !{!76} -// 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 _ZTSSt16initializer_listIiE", !81, i64 0} -// CHECK:STDOUT: !83 = !{!82, !82, i64 0} -// CHECK:STDOUT: !84 = !{!"p1 _ZTS11vector_like", !81, i64 0} -// CHECK:STDOUT: !85 = !{!84, !84, i64 0} -// CHECK:STDOUT: !86 = !{!"int", !80, i64 0} -// CHECK:STDOUT: !87 = !{!"p1 int", !81, i64 0} -// CHECK:STDOUT: !89 = !{!87, !87, i64 0} -// CHECK:STDOUT: !90 = !{i64 0, i64 8, !89, i64 8, i64 8, !89} -// CHECK:STDOUT: !91 = !{!"p1 _ZTS15nontrivial_dtor", !81, i64 0} -// CHECK:STDOUT: !92 = !{!91, !91, i64 0} -// CHECK:STDOUT: !93 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !94 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !95 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !96 = !{!"__libc_errno", !86, i64 0} -// CHECK:STDOUT: !97 = !{!96, !86, i64 0} +// CHECK:STDOUT: !75 = !DILocation(line: 38, column: 5, scope: !71) +// CHECK:STDOUT: !76 = !DILocation(line: 36, column: 1, scope: !71) +// CHECK:STDOUT: !77 = !{!72} +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.aaec36b18655cbe5", scope: null, file: !42, line: 36, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !9) +// CHECK:STDOUT: !83 = !DILocation(line: 36, column: 1, scope: !78) +// CHECK:STDOUT: !84 = !{!79} +// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.d494e56ab76fb5f0", scope: null, file: !42, line: 36, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !91) +// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !9) +// CHECK:STDOUT: !89 = !DILocation(line: 38, column: 5, scope: !85) +// CHECK:STDOUT: !90 = !DILocation(line: 36, column: 1, scope: !85) +// CHECK:STDOUT: !91 = !{!86} +// CHECK:STDOUT: !92 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !93 = !{!"omnipotent char", !92, i64 0} +// CHECK:STDOUT: !94 = !{!"any pointer", !93, i64 0} +// CHECK:STDOUT: !95 = !{!"p1 _ZTSSt16initializer_listIiE", !94, i64 0} +// CHECK:STDOUT: !96 = !{!95, !95, i64 0} +// CHECK:STDOUT: !97 = !{!"p1 _ZTS11vector_like", !94, i64 0} +// CHECK:STDOUT: !98 = !{!97, !97, i64 0} +// CHECK:STDOUT: !99 = !{!"int", !93, i64 0} +// CHECK:STDOUT: !100 = !{!"p1 int", !94, i64 0} +// CHECK:STDOUT: !102 = !{!100, !100, i64 0} +// CHECK:STDOUT: !103 = !{i64 0, i64 8, !102, i64 8, i64 8, !102} +// CHECK:STDOUT: !104 = !{!"p1 _ZTS15nontrivial_dtor", !94, i64 0} +// CHECK:STDOUT: !105 = !{!104, !104, i64 0} +// CHECK:STDOUT: !106 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !107 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !108 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !109 = !{!"__libc_errno", !99, i64 0} +// CHECK:STDOUT: !110 = !{!109, !99, 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 5f07966298dc..a42401ce5f4c 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 @@ -86,84 +86,59 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: declare void @_CWithinLifetime.Main() // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitDirectly.Main() #0 !dbg !17 { +// CHECK:STDOUT: define void @_CInitDirectly.Main() #0 !dbg !15 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !18 -// CHECK:STDOUT: %.loc13_50.3.temp = alloca [3 x i32], align 4, !dbg !19 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !18 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_50.3.temp), !dbg !19 -// CHECK:STDOUT: %.loc13_50.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 0, !dbg !19 -// CHECK:STDOUT: %.loc13_50.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 1, !dbg !19 -// CHECK:STDOUT: %.loc13_50.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 2, !dbg !19 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !18 -// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !18 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !18 -// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !18 -// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !21 -// CHECK:STDOUT: call void @"_CSelfDestruct.95c1f38708147abd:core.Destroy.Core"(ptr @array), !dbg !19 -// CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %_.var), !dbg !18 -// CHECK:STDOUT: ret void, !dbg !22 +// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !16 +// CHECK:STDOUT: %.loc13_50.3.temp = alloca [3 x i32], align 4, !dbg !17 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !16 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_50.3.temp), !dbg !17 +// CHECK:STDOUT: %.loc13_50.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 0, !dbg !17 +// CHECK:STDOUT: %.loc13_50.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 1, !dbg !17 +// CHECK:STDOUT: %.loc13_50.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc13_50.3.temp, i32 0, i64 2, !dbg !17 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !16 +// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !16 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !16 +// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !16 +// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !19 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c1f9a57dcd9034c0(ptr @array), !dbg !17 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8fadf2a6223921e7(ptr %_.var), !dbg !16 +// CHECK:STDOUT: ret void, !dbg !20 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %self) #0 !dbg !24 { +// CHECK:STDOUT: define weak_odr void @"_COp.95c1f38708147abd:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !21 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !26 +// CHECK:STDOUT: %.loc13_50.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !23 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc13_50.1.array.index), !dbg !23 +// CHECK:STDOUT: %.loc13_50.4.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !23 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc13_50.4.array.index), !dbg !23 +// CHECK:STDOUT: %.loc13_50.7.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !23 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc13_50.7.array.index), !dbg !23 +// CHECK:STDOUT: ret void, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !28 { +// CHECK:STDOUT: define void @_CInitVectorLike.Main() #0 !dbg !27 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !30 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.95c1f38708147abd:core.Destroy.Core"(ptr %self) #0 !dbg !32 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc13_50.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc13_50.1.array.index), !dbg !34 -// CHECK:STDOUT: %.loc13_50.2.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc13_50.2.array.index), !dbg !34 -// CHECK:STDOUT: %.loc13_50.3.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc13_50.3.array.index), !dbg !34 -// CHECK:STDOUT: ret void, !dbg !34 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.95c1f38708147abd:core.Destroy.Core"(ptr %self) #0 !dbg !36 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.95c1f38708147abd: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 @"_CSelfDestruct.9e47f6d7a7c1f630: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 void @_CInitVectorLike.Main() #0 !dbg !44 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !45 -// CHECK:STDOUT: %.loc18_36.3.temp = alloca [16 x i8], align 8, !dbg !46 -// CHECK:STDOUT: %.loc18_36.5.temp = alloca [3 x i32], align 4, !dbg !46 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.3.temp), !dbg !46 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.5.temp), !dbg !46 -// CHECK:STDOUT: %.loc18_36.6.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 0, !dbg !46 -// CHECK:STDOUT: %.loc18_36.9.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 1, !dbg !46 -// CHECK:STDOUT: %.loc18_36.12.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 2, !dbg !46 -// 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 !46 -// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !46 -// 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 !46 -// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !46 -// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk._(ptr %.loc18_36.3.temp, ptr %_.var), !dbg !45 -// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.9e47f6d7a7c1f630:core.Destroy.Core"(ptr %.loc18_36.3.temp), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.95c1f38708147abd:core.Destroy.Core"(ptr @array), !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core"(ptr %_.var), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: %_.var = alloca [1 x i8], align 1, !dbg !28 +// CHECK:STDOUT: %.loc18_36.3.temp = alloca [16 x i8], align 8, !dbg !29 +// CHECK:STDOUT: %.loc18_36.5.temp = alloca [3 x i32], align 4, !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !28 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.3.temp), !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_36.5.temp), !dbg !29 +// CHECK:STDOUT: %.loc18_36.6.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 0, !dbg !29 +// CHECK:STDOUT: %.loc18_36.9.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 1, !dbg !29 +// CHECK:STDOUT: %.loc18_36.12.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_36.5.temp, i32 0, i64 2, !dbg !29 +// 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 !29 +// CHECK:STDOUT: store ptr @array.loc13_50.15, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !29 +// 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 !29 +// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !29 +// CHECK:STDOUT: call void @_ZN11vector_likeC1ESt16initializer_listIiE.carbon_thunk._(ptr %.loc18_36.3.temp, ptr %_.var), !dbg !28 +// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !31 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8fadf2a6223921e7(ptr %.loc18_36.3.temp), !dbg !29 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c1f9a57dcd9034c0(ptr @array), !dbg !29 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d132f40e8df7d517(ptr %_.var), !dbg !28 +// CHECK:STDOUT: ret void, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -172,11 +147,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 !84 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !86 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !86 -// CHECK:STDOUT: %1 = load ptr, ptr %list.addr, align 8, !tbaa !84 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !93 +// CHECK:STDOUT: store ptr %list, ptr %list.addr, align 8, !tbaa !97 +// 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: %1 = load ptr, ptr %list.addr, align 8, !tbaa !97 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %agg.tmp, ptr align 8 %1, i64 16, i1 false), !tbaa.struct !106 // 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 @@ -189,53 +164,40 @@ 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 !86 +// 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.c4943df79074f7d2:core.Destroy.Core"(ptr %self) #0 !dbg !50 { +// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #0 !dbg !33 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %self), !dbg !52 -// CHECK:STDOUT: ret void, !dbg !52 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CInitNontrivialDtor.Main() #0 !dbg !54 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !55 -// CHECK:STDOUT: %.loc23_69.17.temp = alloca [3 x [1 x i8]], align 1, !dbg !56 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !55 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.17.temp), !dbg !56 -// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 0, !dbg !56 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.18.array.index), !dbg !56 -// CHECK:STDOUT: %.loc23_69.16.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 1, !dbg !56 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.16.array.index), !dbg !56 -// CHECK:STDOUT: %.loc23_69.15.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.17.temp, i32 0, i64 2, !dbg !56 -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.15.array.index), !dbg !56 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !55 -// CHECK:STDOUT: store ptr %.loc23_69.17.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !55 -// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !55 -// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !55 -// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.9e21ffe3f520886e:core.Destroy.Core"(ptr %.loc23_69.17.temp), !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.b204467699306999:core.Destroy.Core"(ptr %_.var), !dbg !55 -// CHECK:STDOUT: ret void, !dbg !59 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core"(ptr %self) #0 !dbg !60 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: %_.var = alloca [16 x i8], align 8, !dbg !34 +// CHECK:STDOUT: %.loc23_69.19.temp = alloca [3 x [1 x i8]], align 1, !dbg !35 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !34 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc23_69.19.temp), !dbg !35 +// CHECK:STDOUT: %.loc23_69.20.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.19.temp, i32 0, i64 0, !dbg !35 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.20.array.index), !dbg !35 +// CHECK:STDOUT: %.loc23_69.18.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.19.temp, i32 0, i64 1, !dbg !35 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.18.array.index), !dbg !35 +// CHECK:STDOUT: %.loc23_69.17.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %.loc23_69.19.temp, i32 0, i64 2, !dbg !35 +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple.(ptr %.loc23_69.17.array.index), !dbg !35 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.begin = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 0, !dbg !34 +// CHECK:STDOUT: store ptr %.loc23_69.19.temp, ptr %initializer_list.initializer_list.call.init_list.begin, align 8, !dbg !34 +// CHECK:STDOUT: %initializer_list.initializer_list.call.init_list.size = getelementptr inbounds nuw [16 x i8], ptr %_.var, i32 0, i32 8, !dbg !34 +// CHECK:STDOUT: store i64 3, ptr %initializer_list.initializer_list.call.init_list.size, align 8, !dbg !34 +// CHECK:STDOUT: call void @_CWithinLifetime.Main(), !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.1eeb6e704b5694d3(ptr %.loc23_69.19.temp), !dbg !35 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.aaec36b18655cbe5(ptr %_.var), !dbg !34 +// CHECK:STDOUT: ret void, !dbg !38 // 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 !95 -// CHECK:STDOUT: %0 = load ptr, ptr %return.addr, align 8, !tbaa !95 +// 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 void @_ZN15nontrivial_dtorC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %0) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -244,46 +206,65 @@ 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 !95 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !108 // 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 !64 { +// CHECK:STDOUT: define weak_odr void @"_COp.9e21ffe3f520886e:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN15nontrivial_dtorD2Ev(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 @"_CSubobjectDestroy.9e21ffe3f520886e:core.Destroy.Core"(ptr %self) #0 !dbg !68 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc23_69.1.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 2, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %.loc23_69.1.array.index), !dbg !70 -// CHECK:STDOUT: %.loc23_69.2.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 1, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %.loc23_69.2.array.index), !dbg !70 -// CHECK:STDOUT: %.loc23_69.3.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 0, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core"(ptr %.loc23_69.3.array.index), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !70 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.9e21ffe3f520886e:core.Destroy.Core"(ptr %self) #0 !dbg !72 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.9e21ffe3f520886e: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.b204467699306999:core.Destroy.Core"(ptr %self) #0 !dbg !76 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !78 +// CHECK:STDOUT: %.loc23_69.1.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 2, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d494e56ab76fb5f0(ptr %.loc23_69.1.array.index), !dbg !41 +// CHECK:STDOUT: %.loc23_69.4.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 1, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d494e56ab76fb5f0(ptr %.loc23_69.4.array.index), !dbg !41 +// CHECK:STDOUT: %.loc23_69.7.array.index = getelementptr inbounds [3 x [1 x i8]], ptr %self, i32 0, i64 0, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d494e56ab76fb5f0(ptr %.loc23_69.7.array.index), !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)) #3 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.c1f9a57dcd9034c0(ptr %t) #0 !dbg !44 { +// CHECK:STDOUT: call void @"_COp.95c1f38708147abd:core.SubobjectDestroy.Core"(ptr %t), !dbg !48 +// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8fadf2a6223921e7(ptr %t) #0 !dbg !51 { +// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9a03059f269926ed(ptr %t) #0 !dbg !58 { +// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.d132f40e8df7d517(ptr %t) #0 !dbg !65 { +// CHECK:STDOUT: call void @_ZN11vector_likeD2Ev(ptr %t), !dbg !69 +// CHECK:STDOUT: ret void, !dbg !70 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.1eeb6e704b5694d3(ptr %t) #0 !dbg !72 { +// CHECK:STDOUT: call void @"_COp.9e21ffe3f520886e:core.SubobjectDestroy.Core"(ptr %t), !dbg !76 +// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.aaec36b18655cbe5(ptr %t) #0 !dbg !79 { +// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.d494e56ab76fb5f0(ptr %t) #0 !dbg !86 { +// CHECK:STDOUT: call void @_ZN15nontrivial_dtorD2Ev(ptr %t), !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.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #3 // CHECK:STDOUT: @@ -296,7 +277,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 !86 +// 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: } @@ -305,7 +286,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 !95 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !108 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -313,6 +294,10 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_ZN15nontrivial_dtorC1Ev.carbon_thunk_tuple., { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 6, 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.c1f9a57dcd9034c0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.8fadf2a6223921e7, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9a03059f269926ed, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.d494e56ab76fb5f0, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -320,8 +305,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 = !{!96, !97, !98, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!100} +// CHECK:STDOUT: !llvm.module.flags = !{!109, !110, !111, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!113} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -333,86 +318,82 @@ fn InitNontrivialDtor() { // CHECK:STDOUT: !10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !11 = !{null, !10} // CHECK:STDOUT: !12 = !DISubroutineType(types: !11) -// CHECK:STDOUT: !13 = !{null, !6} -// CHECK:STDOUT: !14 = !DISubroutineType(types: !13) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !4, line: 12, type: !9, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !18 = !DILocation(line: 13, column: 3, scope: !17) -// CHECK:STDOUT: !19 = !DILocation(line: 13, column: 42, scope: !17) -// CHECK:STDOUT: !21 = !DILocation(line: 14, column: 3, scope: !17) -// CHECK:STDOUT: !22 = !DILocation(line: 12, column: 1, scope: !17) -// CHECK:STDOUT: !23 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !23, line: 164, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !27) -// CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !24, type: !10) -// CHECK:STDOUT: !26 = !DILocation(line: 164, column: 19, scope: !24) -// CHECK:STDOUT: !27 = !{!25} -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 13, type: !14, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) -// 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.95c1f38708147abd:core.Destroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) -// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !10) -// CHECK:STDOUT: !34 = !DILocation(line: 13, column: 42, scope: !32) -// CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.95c1f38708147abd: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: "SelfDestruct", linkageName: "_CSelfDestruct.9e47f6d7a7c1f630: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: 3, scope: !40) -// CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !4, line: 17, type: !9, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !45 = !DILocation(line: 18, column: 3, scope: !44) -// CHECK:STDOUT: !46 = !DILocation(line: 18, column: 28, scope: !44) -// CHECK:STDOUT: !48 = !DILocation(line: 19, column: 3, scope: !44) -// CHECK:STDOUT: !49 = !DILocation(line: 17, column: 1, scope: !44) -// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4943df79074f7d2:core.Destroy.Core", scope: null, file: !4, line: 18, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53) -// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !10) -// CHECK:STDOUT: !52 = !DILocation(line: 18, column: 3, scope: !50) -// CHECK:STDOUT: !53 = !{!51} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !4, line: 22, type: !9, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !55 = !DILocation(line: 23, column: 3, scope: !54) -// CHECK:STDOUT: !56 = !DILocation(line: 23, column: 58, scope: !54) -// CHECK:STDOUT: !58 = !DILocation(line: 24, column: 3, scope: !54) -// CHECK:STDOUT: !59 = !DILocation(line: 22, column: 1, scope: !54) -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3acda3b20248cb70:core.Destroy.Core", scope: null, file: !23, line: 164, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !10) -// CHECK:STDOUT: !62 = !DILocation(line: 164, column: 19, scope: !60) -// CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cbb50137a92c3ee4:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !67) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !10) -// CHECK:STDOUT: !66 = !DILocation(line: 23, column: 58, scope: !64) -// CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.9e21ffe3f520886e: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: 23, column: 58, scope: !68) -// CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.9e21ffe3f520886e:core.Destroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !75) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "InitDirectly", linkageName: "_CInitDirectly.Main", scope: null, file: !4, line: 12, type: !9, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !16 = !DILocation(line: 13, column: 3, scope: !15) +// CHECK:STDOUT: !17 = !DILocation(line: 13, column: 42, scope: !15) +// CHECK:STDOUT: !19 = !DILocation(line: 14, column: 3, scope: !15) +// CHECK:STDOUT: !20 = !DILocation(line: 12, column: 1, scope: !15) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95c1f38708147abd:core.SubobjectDestroy.Core", scope: null, file: !4, line: 13, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !26) +// CHECK:STDOUT: !22 = !DILocalVariable(arg: 1, scope: !21, type: !10) +// CHECK:STDOUT: !23 = !DILocation(line: 13, column: 42, scope: !21) +// CHECK:STDOUT: !24 = !{null, !6} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = !{!22} +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "InitVectorLike", linkageName: "_CInitVectorLike.Main", scope: null, file: !4, line: 17, type: !9, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !28 = !DILocation(line: 18, column: 3, scope: !27) +// CHECK:STDOUT: !29 = !DILocation(line: 18, column: 28, scope: !27) +// CHECK:STDOUT: !31 = !DILocation(line: 19, column: 3, scope: !27) +// CHECK:STDOUT: !32 = !DILocation(line: 17, column: 1, scope: !27) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "InitNontrivialDtor", linkageName: "_CInitNontrivialDtor.Main", scope: null, file: !4, line: 22, type: !9, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !34 = !DILocation(line: 23, column: 3, scope: !33) +// CHECK:STDOUT: !35 = !DILocation(line: 23, column: 58, scope: !33) +// CHECK:STDOUT: !37 = !DILocation(line: 24, column: 3, scope: !33) +// CHECK:STDOUT: !38 = !DILocation(line: 22, column: 1, scope: !33) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.9e21ffe3f520886e:core.SubobjectDestroy.Core", scope: null, file: !4, line: 23, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !10) +// CHECK:STDOUT: !41 = !DILocation(line: 23, column: 58, scope: !39) +// CHECK:STDOUT: !42 = !{!40} +// CHECK:STDOUT: !43 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.c1f9a57dcd9034c0", scope: null, file: !43, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !50) +// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !10) +// CHECK:STDOUT: !48 = !DILocation(line: 38, column: 5, scope: !44) +// CHECK:STDOUT: !49 = !DILocation(line: 36, column: 1, scope: !44) +// CHECK:STDOUT: !50 = !{!45} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8fadf2a6223921e7", scope: null, file: !43, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !57) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !10) +// CHECK:STDOUT: !56 = !DILocation(line: 36, column: 1, scope: !51) +// CHECK:STDOUT: !57 = !{!52} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9a03059f269926ed", scope: null, file: !43, line: 36, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !64) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !6) +// CHECK:STDOUT: !63 = !DILocation(line: 36, column: 1, scope: !58) +// CHECK:STDOUT: !64 = !{!59} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.d132f40e8df7d517", scope: null, file: !43, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !10) +// CHECK:STDOUT: !69 = !DILocation(line: 38, column: 5, scope: !65) +// CHECK:STDOUT: !70 = !DILocation(line: 36, column: 1, scope: !65) +// CHECK:STDOUT: !71 = !{!66} +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.1eeb6e704b5694d3", scope: null, file: !43, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !78) // 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: "SelfDestruct", linkageName: "_CSelfDestruct.b204467699306999: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: 3, scope: !76) -// CHECK:STDOUT: !79 = !{!77} -// CHECK:STDOUT: !80 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !81 = !{!"omnipotent char", !80, i64 0} -// CHECK:STDOUT: !82 = !{!"any pointer", !81, i64 0} -// CHECK:STDOUT: !83 = !{!"p1 _ZTSSt16initializer_listIiE", !82, i64 0} -// CHECK:STDOUT: !84 = !{!83, !83, i64 0} -// CHECK:STDOUT: !85 = !{!"p1 _ZTS11vector_like", !82, i64 0} -// CHECK:STDOUT: !86 = !{!85, !85, i64 0} -// CHECK:STDOUT: !87 = !{!"int", !81, i64 0} -// CHECK:STDOUT: !88 = !{!"p1 int", !82, i64 0} -// CHECK:STDOUT: !89 = !{!"long", !81, i64 0} -// CHECK:STDOUT: !91 = !{!88, !88, i64 0} -// CHECK:STDOUT: !92 = !{!89, !89, i64 0} -// CHECK:STDOUT: !93 = !{i64 0, i64 8, !91, i64 8, i64 8, !92} -// CHECK:STDOUT: !94 = !{!"p1 _ZTS15nontrivial_dtor", !82, i64 0} -// CHECK:STDOUT: !95 = !{!94, !94, i64 0} -// CHECK:STDOUT: !96 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !97 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !98 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !99 = !{!"__libc_errno", !87, i64 0} -// CHECK:STDOUT: !100 = !{!99, !87, i64 0} +// CHECK:STDOUT: !76 = !DILocation(line: 38, column: 5, scope: !72) +// CHECK:STDOUT: !77 = !DILocation(line: 36, column: 1, scope: !72) +// CHECK:STDOUT: !78 = !{!73} +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.aaec36b18655cbe5", scope: null, file: !43, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !85) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !10) +// CHECK:STDOUT: !84 = !DILocation(line: 36, column: 1, scope: !79) +// CHECK:STDOUT: !85 = !{!80} +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.d494e56ab76fb5f0", scope: null, file: !43, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !92) +// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !10) +// CHECK:STDOUT: !90 = !DILocation(line: 38, column: 5, scope: !86) +// CHECK:STDOUT: !91 = !DILocation(line: 36, column: 1, scope: !86) +// CHECK:STDOUT: !92 = !{!87} +// CHECK:STDOUT: !93 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !94 = !{!"omnipotent char", !93, i64 0} +// CHECK:STDOUT: !95 = !{!"any pointer", !94, i64 0} +// CHECK:STDOUT: !96 = !{!"p1 _ZTSSt16initializer_listIiE", !95, i64 0} +// CHECK:STDOUT: !97 = !{!96, !96, i64 0} +// CHECK:STDOUT: !98 = !{!"p1 _ZTS11vector_like", !95, i64 0} +// CHECK:STDOUT: !99 = !{!98, !98, i64 0} +// CHECK:STDOUT: !100 = !{!"int", !94, i64 0} +// CHECK:STDOUT: !101 = !{!"p1 int", !95, i64 0} +// CHECK:STDOUT: !102 = !{!"long", !94, i64 0} +// CHECK:STDOUT: !104 = !{!101, !101, i64 0} +// CHECK:STDOUT: !105 = !{!102, !102, i64 0} +// CHECK:STDOUT: !106 = !{i64 0, i64 8, !104, i64 8, i64 8, !105} +// CHECK:STDOUT: !107 = !{!"p1 _ZTS15nontrivial_dtor", !95, i64 0} +// CHECK:STDOUT: !108 = !{!107, !107, i64 0} +// CHECK:STDOUT: !109 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !110 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !111 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !112 = !{!"__libc_errno", !100, i64 0} +// CHECK:STDOUT: !113 = !{!112, !100, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/template.carbon b/toolchain/lower/testdata/interop/cpp/template.carbon index be26211f4827..3736abe779f9 100644 --- a/toolchain/lower/testdata/interop/cpp/template.carbon +++ b/toolchain/lower/testdata/interop/cpp/template.carbon @@ -280,7 +280,7 @@ fn Call3() { // CHECK:STDOUT: %.loc12_12.2.temp = alloca {}, align 1, !dbg !96 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_12.2.temp), !dbg !96 // CHECK:STDOUT: call void @_Z3fooIJEEv1XDpT_.carbon_thunk._(ptr @X.val.loc12_14.3), !dbg !97 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr @X.val), !dbg !96 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr @X.val), !dbg !96 // CHECK:STDOUT: ret void, !dbg !98 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -289,26 +289,20 @@ fn Call3() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %agg.tmp = alloca %class.X, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !112 -// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !112 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !115 +// CHECK:STDOUT: %1 = load ptr, ptr %.addr, align 8, !tbaa !115 // CHECK:STDOUT: call void @_Z3fooIJEEv1XDpT_() // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr %self) #0 !dbg !99 { +// CHECK:STDOUT: define void @_CCall2.Main() #0 !dbg !99 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !101 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCall2.Main() #0 !dbg !103 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_12.2.temp = alloca {}, align 1, !dbg !104 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_12.2.temp), !dbg !104 -// CHECK:STDOUT: call void @_Z3fooIJiEEv1XDpT_.carbon_thunk.__(ptr @X.val.loc12_14.3, i32 2), !dbg !105 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr @X.val), !dbg !104 -// CHECK:STDOUT: ret void, !dbg !106 +// CHECK:STDOUT: %.loc18_12.2.temp = alloca {}, align 1, !dbg !100 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_12.2.temp), !dbg !100 +// CHECK:STDOUT: call void @_Z3fooIJiEEv1XDpT_.carbon_thunk.__(ptr @X.val.loc12_14.3, i32 2), !dbg !101 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr @X.val), !dbg !100 +// CHECK:STDOUT: ret void, !dbg !102 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -317,22 +311,22 @@ fn Call3() { // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %.addr1 = alloca i32, align 4 // CHECK:STDOUT: %agg.tmp = alloca %class.X, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !112 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !115 // CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !58 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !112 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !115 // CHECK:STDOUT: %3 = load i32, ptr %.addr1, align 4, !tbaa !58 // CHECK:STDOUT: call void @_Z3fooIJiEEv1XDpT_(i32 noundef %3) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCall3.Main() #0 !dbg !107 { +// CHECK:STDOUT: define void @_CCall3.Main() #0 !dbg !103 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc24_12.2.temp = alloca {}, align 1, !dbg !108 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_12.2.temp), !dbg !108 -// CHECK:STDOUT: call void @_Z3fooIJiiEEv1XDpT_.carbon_thunk.___(ptr @X.val.loc12_14.3, i32 2, i32 3), !dbg !109 -// CHECK:STDOUT: call void @"_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core"(ptr @X.val), !dbg !108 -// CHECK:STDOUT: ret void, !dbg !110 +// CHECK:STDOUT: %.loc24_12.2.temp = alloca {}, align 1, !dbg !104 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc24_12.2.temp), !dbg !104 +// CHECK:STDOUT: call void @_Z3fooIJiiEEv1XDpT_.carbon_thunk.___(ptr @X.val.loc12_14.3, i32 2, i32 3), !dbg !105 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr @X.val), !dbg !104 +// CHECK:STDOUT: ret void, !dbg !106 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -342,10 +336,10 @@ fn Call3() { // CHECK:STDOUT: %.addr1 = alloca i32, align 4 // CHECK:STDOUT: %.addr2 = alloca i32, align 4 // CHECK:STDOUT: %agg.tmp = alloca %class.X, align 1 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !112 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !115 // CHECK:STDOUT: store i32 %1, ptr %.addr1, align 4, !tbaa !58 // CHECK:STDOUT: store i32 %2, ptr %.addr2, align 4, !tbaa !58 -// CHECK:STDOUT: %3 = load ptr, ptr %.addr, align 8, !tbaa !112 +// CHECK:STDOUT: %3 = load ptr, ptr %.addr, align 8, !tbaa !115 // CHECK:STDOUT: %4 = load i32, ptr %.addr1, align 4, !tbaa !58 // CHECK:STDOUT: %5 = load i32, ptr %.addr2, align 4, !tbaa !58 // CHECK:STDOUT: call void @_Z3fooIJiiEEv1XDpT_(i32 noundef %4, i32 noundef %5) @@ -355,6 +349,11 @@ fn Call3() { // 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 void @_CSelfDestruct.Core.2d682b12c0c20e08(ptr %t) #0 !dbg !107 { +// CHECK:STDOUT: ret void, !dbg !112 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z3fooIJEEv1XDpT_() #3 // CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z3fooIJiEEv1XDpT_(i32 noundef) #3 @@ -363,6 +362,7 @@ fn Call3() { // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.2d682b12c0c20e08, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // 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" } @@ -375,6 +375,7 @@ fn Call3() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !55 = !{!"Simple C++ TBAA"} // CHECK:STDOUT: !56 = !{!"omnipotent char", !55, i64 0} @@ -396,18 +397,18 @@ fn Call3() { // CHECK:STDOUT: !96 = !DILocation(line: 12, column: 11, scope: !95) // CHECK:STDOUT: !97 = !DILocation(line: 12, column: 3, scope: !95) // CHECK:STDOUT: !98 = !DILocation(line: 10, column: 1, scope: !95) -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3d7b8a41b4c67e71:core.Destroy.Core", scope: null, file: !87, line: 12, type: !90, spFlags: DISPFlagDefinition, unit: !88, retainedNodes: !102) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !23) -// CHECK:STDOUT: !101 = !DILocation(line: 12, column: 11, scope: !99) -// CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "Call2", linkageName: "_CCall2.Main", scope: null, file: !87, line: 16, type: !71, spFlags: DISPFlagDefinition, unit: !88) -// CHECK:STDOUT: !104 = !DILocation(line: 18, column: 11, scope: !103) -// CHECK:STDOUT: !105 = !DILocation(line: 18, column: 3, scope: !103) -// CHECK:STDOUT: !106 = !DILocation(line: 16, column: 1, scope: !103) -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "Call3", linkageName: "_CCall3.Main", scope: null, file: !87, line: 22, type: !71, spFlags: DISPFlagDefinition, unit: !88) -// CHECK:STDOUT: !108 = !DILocation(line: 24, column: 11, scope: !107) -// CHECK:STDOUT: !109 = !DILocation(line: 24, column: 3, scope: !107) -// CHECK:STDOUT: !110 = !DILocation(line: 22, column: 1, scope: !107) -// CHECK:STDOUT: !111 = !{!"p1 _ZTS1X", !59, i64 0} -// CHECK:STDOUT: !112 = !{!111, !111, i64 0} +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Call2", linkageName: "_CCall2.Main", scope: null, file: !87, line: 16, type: !71, spFlags: DISPFlagDefinition, unit: !88) +// CHECK:STDOUT: !100 = !DILocation(line: 18, column: 11, scope: !99) +// CHECK:STDOUT: !101 = !DILocation(line: 18, column: 3, scope: !99) +// CHECK:STDOUT: !102 = !DILocation(line: 16, column: 1, scope: !99) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "Call3", linkageName: "_CCall3.Main", scope: null, file: !87, line: 22, type: !71, spFlags: DISPFlagDefinition, unit: !88) +// CHECK:STDOUT: !104 = !DILocation(line: 24, column: 11, scope: !103) +// CHECK:STDOUT: !105 = !DILocation(line: 24, column: 3, scope: !103) +// CHECK:STDOUT: !106 = !DILocation(line: 22, column: 1, scope: !103) +// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2d682b12c0c20e08", scope: null, file: !10, line: 32, type: !90, spFlags: DISPFlagDefinition, unit: !88, retainedNodes: !113) +// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !23) +// CHECK:STDOUT: !112 = !DILocation(line: 32, column: 1, scope: !107) +// CHECK:STDOUT: !113 = !{!108} +// CHECK:STDOUT: !114 = !{!"p1 _ZTS1X", !59, i64 0} +// CHECK:STDOUT: !115 = !{!114, !114, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/thunks.carbon b/toolchain/lower/testdata/interop/cpp/thunks.carbon index 2ff6d9cee89c..368d6f9ddc10 100644 --- a/toolchain/lower/testdata/interop/cpp/thunks.carbon +++ b/toolchain/lower/testdata/interop/cpp/thunks.carbon @@ -111,7 +111,7 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n2.var), !dbg !46 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_34.1.temp), !dbg !47 // CHECK:STDOUT: call void @_ZN9NeedThunkC1ERKS_.carbon_thunk._(ptr %n, ptr %n2.var), !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.e015ef96e8aea788:core.Destroy.Core"(ptr %n2.var), !dbg !46 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a232ab5552c0c8a5(ptr %n2.var), !dbg !46 // CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -120,10 +120,10 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !68 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !68 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !68 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !68 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !71 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !71 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !71 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !71 // CHECK:STDOUT: call void @_ZN9NeedThunkC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -135,21 +135,21 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e015ef96e8aea788:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:SubobjectDestroy.6b4f1dd80a288d4e.Core:NeedThunk.Cpp"(ptr %self) #2 !dbg !56 { // CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy:thunk:Destroy.092ad14c7174f642.Core:NeedThunk.Cpp"(ptr %self) #2 !dbg !60 { -// CHECK:STDOUT: entry: -// 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)) #3 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.a232ab5552c0c8a5(ptr %t) #0 !dbg !60 { +// CHECK:STDOUT: call void @"_COp:thunk:SubobjectDestroy.6b4f1dd80a288d4e.Core:NeedThunk.Cpp"(ptr %t), !dbg !64 +// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZN9NeedThunkC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -162,11 +162,12 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // 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 = !{!35} -// CHECK:STDOUT: !llvm.module.flags = !{!70, !71, !72, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!75} +// CHECK:STDOUT: !llvm.module.flags = !{!73, !74, !75, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!78} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "multiple_thunks_in_one_class.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -185,25 +186,26 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !36) // CHECK:STDOUT: !54 = !DILocation(line: 4, column: 3, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e015ef96e8aea788:core.Destroy.Core", scope: null, file: !34, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !59) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:SubobjectDestroy.6b4f1dd80a288d4e.Core:NeedThunk.Cpp", scope: null, file: !51, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !59) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !36) -// CHECK:STDOUT: !58 = !DILocation(line: 9, column: 3, scope: !56) +// CHECK:STDOUT: !58 = !DILocation(line: 5, column: 3, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy:thunk:Destroy.092ad14c7174f642.Core:NeedThunk.Cpp", scope: null, file: !51, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !63) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.a232ab5552c0c8a5", scope: null, file: !26, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !66) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !36) -// CHECK:STDOUT: !62 = !DILocation(line: 5, column: 3, scope: !60) -// CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !65 = !{!"omnipotent char", !64, i64 0} -// CHECK:STDOUT: !66 = !{!"any pointer", !65, i64 0} -// CHECK:STDOUT: !67 = !{!"p1 _ZTS9NeedThunk", !66, i64 0} -// CHECK:STDOUT: !68 = !{!67, !67, i64 0} -// CHECK:STDOUT: !70 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !71 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !72 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !73 = !{!"int", !65, i64 0} -// CHECK:STDOUT: !74 = !{!"__libc_errno", !73, i64 0} -// CHECK:STDOUT: !75 = !{!74, !73, i64 0} +// CHECK:STDOUT: !64 = !DILocation(line: 34, column: 5, scope: !60) +// CHECK:STDOUT: !65 = !DILocation(line: 32, column: 1, scope: !60) +// CHECK:STDOUT: !66 = !{!61} +// CHECK:STDOUT: !67 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !68 = !{!"omnipotent char", !67, i64 0} +// CHECK:STDOUT: !69 = !{!"any pointer", !68, i64 0} +// CHECK:STDOUT: !70 = !{!"p1 _ZTS9NeedThunk", !69, i64 0} +// CHECK:STDOUT: !71 = !{!70, !70, i64 0} +// CHECK:STDOUT: !73 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !74 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !75 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !76 = !{!"int", !68, i64 0} +// CHECK:STDOUT: !77 = !{!"__libc_errno", !76, i64 0} +// CHECK:STDOUT: !78 = !{!77, !76, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'thunks_for_distinct_specializations.carbon' @@ -212,21 +214,21 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCall.Main(ptr %a, ptr %b) #0 !dbg !78 { +// CHECK:STDOUT: define void @_CCall.Main(ptr %a, ptr %b) #0 !dbg !81 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a2.var = alloca [1 x i8], align 1, !dbg !83 -// CHECK:STDOUT: %.loc12_35.1.temp = alloca [1 x i8], align 1, !dbg !84 -// CHECK:STDOUT: %b2.var = alloca [1 x i8], align 1, !dbg !86 -// CHECK:STDOUT: %.loc13_35.1.temp = alloca [1 x i8], align 1, !dbg !87 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a2.var), !dbg !83 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_35.1.temp), !dbg !84 -// CHECK:STDOUT: call void @_ZN3BoxI1AEC1ERKS1_.carbon_thunk._(ptr %a, ptr %a2.var), !dbg !84 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b2.var), !dbg !86 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_35.1.temp), !dbg !87 -// CHECK:STDOUT: call void @_ZN3BoxI1BEC1ERKS1_.carbon_thunk._(ptr %b, ptr %b2.var), !dbg !87 -// CHECK:STDOUT: call void @"_CSelfDestruct.c6bde88ac44221c1:core.Destroy.Core"(ptr %b2.var), !dbg !86 -// CHECK:STDOUT: call void @"_CSelfDestruct.35d03e94f0115619:core.Destroy.Core"(ptr %a2.var), !dbg !83 -// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: %a2.var = alloca [1 x i8], align 1, !dbg !86 +// CHECK:STDOUT: %.loc12_35.1.temp = alloca [1 x i8], align 1, !dbg !87 +// CHECK:STDOUT: %b2.var = alloca [1 x i8], align 1, !dbg !89 +// CHECK:STDOUT: %.loc13_35.1.temp = alloca [1 x i8], align 1, !dbg !90 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a2.var), !dbg !86 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_35.1.temp), !dbg !87 +// CHECK:STDOUT: call void @_ZN3BoxI1AEC1ERKS1_.carbon_thunk._(ptr %a, ptr %a2.var), !dbg !87 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b2.var), !dbg !89 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_35.1.temp), !dbg !90 +// CHECK:STDOUT: call void @_ZN3BoxI1BEC1ERKS1_.carbon_thunk._(ptr %b, ptr %b2.var), !dbg !90 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d1e44ef097900801(ptr %b2.var), !dbg !89 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5fbb58cefed751bc(ptr %a2.var), !dbg !86 +// CHECK:STDOUT: ret void, !dbg !92 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -234,19 +236,19 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !109 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !109 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !109 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !109 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !118 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !118 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !118 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !118 // CHECK:STDOUT: call void @_ZN3BoxI1AEC1ERKS1_(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.c0735c73762b4d1c.Core:Box.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !92 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.c0735c73762b4d1c.Core:Box.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !95 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN3BoxI1AEC1ERKS1_.carbon_thunk._(ptr %self, ptr %return), !dbg !94 -// CHECK:STDOUT: ret void, !dbg !94 +// CHECK:STDOUT: call void @_ZN3BoxI1AEC1ERKS1_.carbon_thunk._(ptr %self, ptr %return), !dbg !97 +// CHECK:STDOUT: ret void, !dbg !97 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -254,44 +256,42 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !113 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !113 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !113 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !113 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !122 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !122 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !122 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !122 // CHECK:STDOUT: call void @_ZN3BoxI1BEC1ERKS1_(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.2c1dd62357f2b914.Core:Box.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !96 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.2c1dd62357f2b914.Core:Box.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !99 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN3BoxI1BEC1ERKS1_.carbon_thunk._(ptr %self, ptr %return), !dbg !98 -// CHECK:STDOUT: ret void, !dbg !98 +// CHECK:STDOUT: call void @_ZN3BoxI1BEC1ERKS1_.carbon_thunk._(ptr %self, ptr %return), !dbg !101 +// CHECK:STDOUT: ret void, !dbg !101 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: declare void @_ZN3BoxI1BED1Ev(ptr noundef nonnull align 1 dead_on_return(1) dereferenceable(1)) unnamed_addr #3 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c6bde88ac44221c1:core.Destroy.Core"(ptr %self) #0 !dbg !100 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN3BoxI1BED1Ev(ptr %self), !dbg !102 -// CHECK:STDOUT: ret void, !dbg !102 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: declare void @_ZN3BoxI1AED1Ev(ptr noundef nonnull align 1 dead_on_return(1) dereferenceable(1)) unnamed_addr #3 // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35d03e94f0115619:core.Destroy.Core"(ptr %self) #0 !dbg !104 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN3BoxI1AED1Ev(ptr %self), !dbg !106 -// CHECK:STDOUT: ret void, !dbg !106 -// 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 @_CSelfDestruct.Core.d1e44ef097900801(ptr %t) #0 !dbg !103 { +// CHECK:STDOUT: call void @_ZN3BoxI1BED1Ev(ptr %t), !dbg !107 +// CHECK:STDOUT: ret void, !dbg !108 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.5fbb58cefed751bc(ptr %t) #0 !dbg !110 { +// CHECK:STDOUT: call void @_ZN3BoxI1AED1Ev(ptr %t), !dbg !114 +// CHECK:STDOUT: ret void, !dbg !115 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZN3BoxI1AEC1ERKS1_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 // CHECK:STDOUT: // CHECK:STDOUT: declare void @_ZN3BoxI1BEC1ERKS1_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 @@ -306,12 +306,13 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!77} -// CHECK:STDOUT: !llvm.module.flags = !{!70, !71, !72, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!75} +// CHECK:STDOUT: !llvm.dbg.cu = !{!80} +// CHECK:STDOUT: !llvm.module.flags = !{!73, !74, !75, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!78} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !37 = !{null, !36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) @@ -319,47 +320,49 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: !40 = !DISubroutineType(types: !39) // CHECK:STDOUT: !41 = !{!36, !36} // CHECK:STDOUT: !42 = !DISubroutineType(types: !41) -// CHECK:STDOUT: !64 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !65 = !{!"omnipotent char", !64, i64 0} -// CHECK:STDOUT: !66 = !{!"any pointer", !65, i64 0} -// CHECK:STDOUT: !70 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !71 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !72 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !73 = !{!"int", !65, i64 0} -// CHECK:STDOUT: !74 = !{!"__libc_errno", !73, i64 0} -// CHECK:STDOUT: !75 = !{!74, !73, i64 0} -// CHECK:STDOUT: !76 = !DIFile(filename: "thunks_for_distinct_specializations.carbon", directory: "") -// CHECK:STDOUT: !77 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !76, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !76, line: 11, type: !40, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !90) -// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !36) -// CHECK:STDOUT: !80 = !DILocalVariable(arg: 2, scope: !78, type: !36) -// CHECK:STDOUT: !83 = !DILocation(line: 12, column: 3, scope: !78) -// CHECK:STDOUT: !84 = !DILocation(line: 12, column: 35, scope: !78) -// CHECK:STDOUT: !86 = !DILocation(line: 13, column: 3, scope: !78) -// CHECK:STDOUT: !87 = !DILocation(line: 13, column: 35, scope: !78) -// CHECK:STDOUT: !89 = !DILocation(line: 11, column: 1, scope: !78) -// CHECK:STDOUT: !90 = !{!79, !80} -// CHECK:STDOUT: !91 = !DIFile(filename: "./box.h", directory: "") -// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.c0735c73762b4d1c.Core:Box.Cpp", scope: null, file: !91, line: 8, type: !42, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !95) -// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !36) -// CHECK:STDOUT: !94 = !DILocation(line: 8, column: 3, scope: !92) -// CHECK:STDOUT: !95 = !{!93} -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.2c1dd62357f2b914.Core:Box.Cpp", scope: null, file: !91, line: 8, type: !42, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !99) -// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !36) -// CHECK:STDOUT: !98 = !DILocation(line: 8, column: 3, scope: !96) -// CHECK:STDOUT: !99 = !{!97} -// CHECK:STDOUT: !100 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c6bde88ac44221c1:core.Destroy.Core", scope: null, file: !76, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !103) -// CHECK:STDOUT: !101 = !DILocalVariable(arg: 1, scope: !100, type: !36) -// CHECK:STDOUT: !102 = !DILocation(line: 13, column: 3, scope: !100) -// CHECK:STDOUT: !103 = !{!101} -// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35d03e94f0115619:core.Destroy.Core", scope: null, file: !76, line: 12, type: !38, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !107) -// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !36) -// CHECK:STDOUT: !106 = !DILocation(line: 12, column: 3, scope: !104) -// CHECK:STDOUT: !107 = !{!105} -// CHECK:STDOUT: !108 = !{!"p1 _ZTS3BoxI1AE", !66, i64 0} -// CHECK:STDOUT: !109 = !{!108, !108, i64 0} -// CHECK:STDOUT: !112 = !{!"p1 _ZTS3BoxI1BE", !66, i64 0} -// CHECK:STDOUT: !113 = !{!112, !112, i64 0} +// CHECK:STDOUT: !67 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !68 = !{!"omnipotent char", !67, i64 0} +// CHECK:STDOUT: !69 = !{!"any pointer", !68, i64 0} +// CHECK:STDOUT: !73 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !74 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !75 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !76 = !{!"int", !68, i64 0} +// CHECK:STDOUT: !77 = !{!"__libc_errno", !76, i64 0} +// CHECK:STDOUT: !78 = !{!77, !76, i64 0} +// CHECK:STDOUT: !79 = !DIFile(filename: "thunks_for_distinct_specializations.carbon", directory: "") +// CHECK:STDOUT: !80 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !79, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !79, line: 11, type: !40, spFlags: DISPFlagDefinition, unit: !80, retainedNodes: !93) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !36) +// CHECK:STDOUT: !83 = !DILocalVariable(arg: 2, scope: !81, type: !36) +// CHECK:STDOUT: !86 = !DILocation(line: 12, column: 3, scope: !81) +// CHECK:STDOUT: !87 = !DILocation(line: 12, column: 35, scope: !81) +// CHECK:STDOUT: !89 = !DILocation(line: 13, column: 3, scope: !81) +// CHECK:STDOUT: !90 = !DILocation(line: 13, column: 35, scope: !81) +// CHECK:STDOUT: !92 = !DILocation(line: 11, column: 1, scope: !81) +// CHECK:STDOUT: !93 = !{!82, !83} +// CHECK:STDOUT: !94 = !DIFile(filename: "./box.h", directory: "") +// CHECK:STDOUT: !95 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.c0735c73762b4d1c.Core:Box.Cpp", scope: null, file: !94, line: 8, type: !42, spFlags: DISPFlagDefinition, unit: !80, retainedNodes: !98) +// CHECK:STDOUT: !96 = !DILocalVariable(arg: 1, scope: !95, type: !36) +// CHECK:STDOUT: !97 = !DILocation(line: 8, column: 3, scope: !95) +// CHECK:STDOUT: !98 = !{!96} +// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.2c1dd62357f2b914.Core:Box.Cpp", scope: null, file: !94, line: 8, type: !42, spFlags: DISPFlagDefinition, unit: !80, retainedNodes: !102) +// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !36) +// CHECK:STDOUT: !101 = !DILocation(line: 8, column: 3, scope: !99) +// CHECK:STDOUT: !102 = !{!100} +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.d1e44ef097900801", scope: null, file: !26, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !80, retainedNodes: !109) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !36) +// CHECK:STDOUT: !107 = !DILocation(line: 34, column: 5, scope: !103) +// CHECK:STDOUT: !108 = !DILocation(line: 32, column: 1, scope: !103) +// CHECK:STDOUT: !109 = !{!104} +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5fbb58cefed751bc", scope: null, file: !26, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !80, retainedNodes: !116) +// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !36) +// CHECK:STDOUT: !114 = !DILocation(line: 34, column: 5, scope: !110) +// CHECK:STDOUT: !115 = !DILocation(line: 32, column: 1, scope: !110) +// CHECK:STDOUT: !116 = !{!111} +// CHECK:STDOUT: !117 = !{!"p1 _ZTS3BoxI1AE", !69, i64 0} +// CHECK:STDOUT: !118 = !{!117, !117, i64 0} +// CHECK:STDOUT: !121 = !{!"p1 _ZTS3BoxI1BE", !69, i64 0} +// CHECK:STDOUT: !122 = !{!121, !121, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'thunks_for_anonymous_namespace_collision.carbon' @@ -372,21 +375,21 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: $_ZN7CollideC2ERKS_ = comdat any // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCall.Main(ptr %a, ptr %b) #0 !dbg !118 { +// CHECK:STDOUT: define void @_CCall.Main(ptr %a, ptr %b) #0 !dbg !127 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a2.var = alloca [1 x i8], align 1, !dbg !123 -// CHECK:STDOUT: %.loc12_32.1.temp = alloca [1 x i8], align 1, !dbg !124 -// CHECK:STDOUT: %b2.var = alloca [1 x i8], align 1, !dbg !126 -// CHECK:STDOUT: %.loc13_36.1.temp = alloca [1 x i8], align 1, !dbg !127 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a2.var), !dbg !123 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_32.1.temp), !dbg !124 -// CHECK:STDOUT: call void @_ZN7CollideC1ERKS_.carbon_thunk._(ptr %a, ptr %a2.var), !dbg !124 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b2.var), !dbg !126 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_36.1.temp), !dbg !127 -// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideC1ERKS0_.carbon_thunk._(ptr %b, ptr %b2.var), !dbg !127 -// CHECK:STDOUT: call void @"_CSelfDestruct.c4db6b78eb7f0546:core.Destroy.Core"(ptr %b2.var), !dbg !126 -// CHECK:STDOUT: call void @"_CSelfDestruct.3cee6f1426a47a6f:core.Destroy.Core"(ptr %a2.var), !dbg !123 -// CHECK:STDOUT: ret void, !dbg !129 +// CHECK:STDOUT: %a2.var = alloca [1 x i8], align 1, !dbg !132 +// CHECK:STDOUT: %.loc12_32.1.temp = alloca [1 x i8], align 1, !dbg !133 +// CHECK:STDOUT: %b2.var = alloca [1 x i8], align 1, !dbg !135 +// CHECK:STDOUT: %.loc13_36.1.temp = alloca [1 x i8], align 1, !dbg !136 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a2.var), !dbg !132 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_32.1.temp), !dbg !133 +// CHECK:STDOUT: call void @_ZN7CollideC1ERKS_.carbon_thunk._(ptr %a, ptr %a2.var), !dbg !133 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b2.var), !dbg !135 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc13_36.1.temp), !dbg !136 +// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideC1ERKS0_.carbon_thunk._(ptr %b, ptr %b2.var), !dbg !136 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c89f00da2163eb95(ptr %b2.var), !dbg !135 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0b81af486af557dc(ptr %a2.var), !dbg !132 +// CHECK:STDOUT: ret void, !dbg !138 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -394,19 +397,19 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !149 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !149 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !149 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !149 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !164 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !164 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !164 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !164 // CHECK:STDOUT: call void @_ZN7CollideC2ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.9e522bb4dbf82e5c.Core:Collide.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !132 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.9e522bb4dbf82e5c.Core:Collide.Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !141 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN7CollideC1ERKS_.carbon_thunk._(ptr %self, ptr %return), !dbg !134 -// CHECK:STDOUT: ret void, !dbg !134 +// CHECK:STDOUT: call void @_ZN7CollideC1ERKS_.carbon_thunk._(ptr %self, ptr %return), !dbg !143 +// CHECK:STDOUT: ret void, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline mustprogress uwtable @@ -414,63 +417,61 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.addr = alloca ptr, align 8 // CHECK:STDOUT: %return.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !152 -// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !152 -// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !152 -// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !152 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !167 +// CHECK:STDOUT: store ptr %return, ptr %return.addr, align 8, !tbaa !167 +// CHECK:STDOUT: %1 = load ptr, ptr %return.addr, align 8, !tbaa !167 +// CHECK:STDOUT: %2 = load ptr, ptr %.addr, align 8, !tbaa !167 // CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideC2ERKS0_(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %2) // CHECK:STDOUT: ret void // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.d1fe27f3241437fa.Core:Collide..Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !136 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Copy.d1fe27f3241437fa.Core:Collide..Cpp"(ptr sret([1 x i8]) %return, ptr %self) #2 !dbg !145 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideC1ERKS0_.carbon_thunk._(ptr %self, ptr %return), !dbg !138 -// CHECK:STDOUT: ret void, !dbg !138 +// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideC1ERKS0_.carbon_thunk._(ptr %self, ptr %return), !dbg !147 +// CHECK:STDOUT: ret void, !dbg !147 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable // CHECK:STDOUT: define internal void @_ZN12_GLOBAL__N_17CollideD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %this) unnamed_addr #3 align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !152 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !167 // 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.c4db6b78eb7f0546:core.Destroy.Core"(ptr %self) #0 !dbg !140 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideD2Ev(ptr %self), !dbg !142 -// CHECK:STDOUT: ret void, !dbg !142 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN7CollideD2Ev(ptr noundef nonnull align 1 dereferenceable(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 !149 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !164 // 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.3cee6f1426a47a6f:core.Destroy.Core"(ptr %self) #0 !dbg !144 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_ZN7CollideD2Ev(ptr %self), !dbg !146 -// CHECK:STDOUT: ret void, !dbg !146 -// 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 @_CSelfDestruct.Core.c89f00da2163eb95(ptr %t) #0 !dbg !149 { +// CHECK:STDOUT: call void @_ZN12_GLOBAL__N_17CollideD2Ev(ptr %t), !dbg !153 +// CHECK:STDOUT: ret void, !dbg !154 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.0b81af486af557dc(ptr %t) #0 !dbg !156 { +// CHECK:STDOUT: call void @_ZN7CollideD2Ev(ptr %t), !dbg !160 +// CHECK:STDOUT: ret void, !dbg !161 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: mustprogress nounwind uwtable // CHECK:STDOUT: define linkonce_odr dso_local void @_ZN7CollideC2ERKS_(ptr noundef nonnull align 1 dereferenceable(1) %this, ptr noundef nonnull align 1 dereferenceable(1) %0) unnamed_addr #3 comdat align 2 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !149 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !149 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !164 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !164 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -480,8 +481,8 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %this.addr = alloca ptr, align 8 // CHECK:STDOUT: %.addr = alloca ptr, align 8 -// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !152 -// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !152 +// CHECK:STDOUT: store ptr %this, ptr %this.addr, align 8, !tbaa !167 +// CHECK:STDOUT: store ptr %0, ptr %.addr, align 8, !tbaa !167 // CHECK:STDOUT: %this1 = load ptr, ptr %this.addr, align 8 // CHECK:STDOUT: ret void // CHECK:STDOUT: } @@ -495,12 +496,13 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } // CHECK:STDOUT: attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!117} -// CHECK:STDOUT: !llvm.module.flags = !{!70, !71, !72, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!75} +// CHECK:STDOUT: !llvm.dbg.cu = !{!126} +// CHECK:STDOUT: !llvm.module.flags = !{!73, !74, !75, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!78} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !37 = !{null, !36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) @@ -508,45 +510,47 @@ fn Call(a: Cpp.Collide, b: Cpp.AnonCollide) { // CHECK:STDOUT: !40 = !DISubroutineType(types: !39) // CHECK:STDOUT: !41 = !{!36, !36} // CHECK:STDOUT: !42 = !DISubroutineType(types: !41) -// CHECK:STDOUT: !64 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !65 = !{!"omnipotent char", !64, i64 0} -// CHECK:STDOUT: !66 = !{!"any pointer", !65, i64 0} -// CHECK:STDOUT: !70 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !71 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !72 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !73 = !{!"int", !65, i64 0} -// CHECK:STDOUT: !74 = !{!"__libc_errno", !73, i64 0} -// CHECK:STDOUT: !75 = !{!74, !73, i64 0} -// CHECK:STDOUT: !116 = !DIFile(filename: "thunks_for_anonymous_namespace_collision.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: !118 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !116, line: 11, type: !40, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !130) -// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !36) -// CHECK:STDOUT: !120 = !DILocalVariable(arg: 2, scope: !118, type: !36) -// CHECK:STDOUT: !123 = !DILocation(line: 12, column: 3, scope: !118) -// CHECK:STDOUT: !124 = !DILocation(line: 12, column: 32, scope: !118) -// CHECK:STDOUT: !126 = !DILocation(line: 13, column: 3, scope: !118) -// CHECK:STDOUT: !127 = !DILocation(line: 13, column: 36, scope: !118) -// CHECK:STDOUT: !129 = !DILocation(line: 11, column: 1, scope: !118) -// CHECK:STDOUT: !130 = !{!119, !120} -// CHECK:STDOUT: !131 = !DIFile(filename: "./anonymous_namespace_collision.h", directory: "") -// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.9e522bb4dbf82e5c.Core:Collide.Cpp", scope: null, file: !131, line: 17, type: !42, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !135) -// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !36) -// CHECK:STDOUT: !134 = !DILocation(line: 17, column: 3, scope: !132) -// CHECK:STDOUT: !135 = !{!133} -// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.d1fe27f3241437fa.Core:Collide..Cpp", scope: null, file: !131, line: 8, type: !42, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !139) -// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !36) -// CHECK:STDOUT: !138 = !DILocation(line: 8, column: 3, scope: !136) -// CHECK:STDOUT: !139 = !{!137} -// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4db6b78eb7f0546:core.Destroy.Core", scope: null, file: !116, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !143) -// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !36) -// CHECK:STDOUT: !142 = !DILocation(line: 13, column: 3, scope: !140) -// CHECK:STDOUT: !143 = !{!141} -// CHECK:STDOUT: !144 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3cee6f1426a47a6f:core.Destroy.Core", scope: null, file: !116, line: 12, type: !38, spFlags: DISPFlagDefinition, unit: !117, retainedNodes: !147) -// CHECK:STDOUT: !145 = !DILocalVariable(arg: 1, scope: !144, type: !36) -// CHECK:STDOUT: !146 = !DILocation(line: 12, column: 3, scope: !144) -// CHECK:STDOUT: !147 = !{!145} -// CHECK:STDOUT: !148 = !{!"p1 _ZTS7Collide", !66, i64 0} -// CHECK:STDOUT: !149 = !{!148, !148, i64 0} -// CHECK:STDOUT: !151 = !{!"p1 _ZTSN12_GLOBAL__N_17CollideE", !66, i64 0} -// CHECK:STDOUT: !152 = !{!151, !151, i64 0} +// CHECK:STDOUT: !67 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !68 = !{!"omnipotent char", !67, i64 0} +// CHECK:STDOUT: !69 = !{!"any pointer", !68, i64 0} +// CHECK:STDOUT: !73 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !74 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !75 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !76 = !{!"int", !68, i64 0} +// CHECK:STDOUT: !77 = !{!"__libc_errno", !76, i64 0} +// CHECK:STDOUT: !78 = !{!77, !76, i64 0} +// CHECK:STDOUT: !125 = !DIFile(filename: "thunks_for_anonymous_namespace_collision.carbon", directory: "") +// CHECK:STDOUT: !126 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !125, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "Call", linkageName: "_CCall.Main", scope: null, file: !125, line: 11, type: !40, spFlags: DISPFlagDefinition, unit: !126, retainedNodes: !139) +// CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !127, type: !36) +// CHECK:STDOUT: !129 = !DILocalVariable(arg: 2, scope: !127, type: !36) +// CHECK:STDOUT: !132 = !DILocation(line: 12, column: 3, scope: !127) +// CHECK:STDOUT: !133 = !DILocation(line: 12, column: 32, scope: !127) +// CHECK:STDOUT: !135 = !DILocation(line: 13, column: 3, scope: !127) +// CHECK:STDOUT: !136 = !DILocation(line: 13, column: 36, scope: !127) +// CHECK:STDOUT: !138 = !DILocation(line: 11, column: 1, scope: !127) +// CHECK:STDOUT: !139 = !{!128, !129} +// CHECK:STDOUT: !140 = !DIFile(filename: "./anonymous_namespace_collision.h", directory: "") +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.9e522bb4dbf82e5c.Core:Collide.Cpp", scope: null, file: !140, line: 17, type: !42, spFlags: DISPFlagDefinition, unit: !126, retainedNodes: !144) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !36) +// CHECK:STDOUT: !143 = !DILocation(line: 17, column: 3, scope: !141) +// CHECK:STDOUT: !144 = !{!142} +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Copy.d1fe27f3241437fa.Core:Collide..Cpp", scope: null, file: !140, line: 8, type: !42, spFlags: DISPFlagDefinition, unit: !126, retainedNodes: !148) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !36) +// CHECK:STDOUT: !147 = !DILocation(line: 8, column: 3, scope: !145) +// CHECK:STDOUT: !148 = !{!146} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.c89f00da2163eb95", scope: null, file: !26, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !126, retainedNodes: !155) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !36) +// CHECK:STDOUT: !153 = !DILocation(line: 34, column: 5, scope: !149) +// CHECK:STDOUT: !154 = !DILocation(line: 32, column: 1, scope: !149) +// CHECK:STDOUT: !155 = !{!150} +// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.0b81af486af557dc", scope: null, file: !26, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !126, retainedNodes: !162) +// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !36) +// CHECK:STDOUT: !160 = !DILocation(line: 34, column: 5, scope: !156) +// CHECK:STDOUT: !161 = !DILocation(line: 32, column: 1, scope: !156) +// CHECK:STDOUT: !162 = !{!157} +// CHECK:STDOUT: !163 = !{!"p1 _ZTS7Collide", !69, i64 0} +// CHECK:STDOUT: !164 = !{!163, !163, i64 0} +// CHECK:STDOUT: !166 = !{!"p1 _ZTSN12_GLOBAL__N_17CollideE", !69, i64 0} +// CHECK:STDOUT: !167 = !{!166, !166, i64 0} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interop/cpp/void.carbon b/toolchain/lower/testdata/interop/cpp/void.carbon index 46f7e9a781a2..32ba0409d228 100644 --- a/toolchain/lower/testdata/interop/cpp/void.carbon +++ b/toolchain/lower/testdata/interop/cpp/void.carbon @@ -71,205 +71,177 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc7_21.2.temp, align 8, !dbg !13 // CHECK:STDOUT: %.loc7_21.4 = load ptr, ptr %.loc7_21.2.temp, align 8, !dbg !13 // CHECK:STDOUT: call void @_Z13take_void_ptrPv(ptr %.loc7_21.4), !dbg !16 -// CHECK:STDOUT: call void @"_CSelfDestruct.7de5d5d040815fb4:core.Destroy.Core"(ptr %.loc7_21.2.temp), !dbg !13 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.761f5b00f4a1dad7(ptr %.loc7_21.2.temp), !dbg !13 // CHECK:STDOUT: ret void, !dbg !17 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.00ac8ef5084ea134:core.Destroy.Core"(ptr %self) #0 !dbg !20 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !22 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: declare void @_Z13take_void_ptrPv(ptr noundef) #1 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a7d1b77eb1279818:core.Destroy.Core"(ptr %self) #0 !dbg !24 { +// CHECK:STDOUT: define void @_CPassIntPtr.Main(ptr %a) #0 !dbg !19 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !26 +// CHECK:STDOUT: %.loc11_21.2.temp = alloca ptr, align 8, !dbg !22 +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.c462f23fba5b8cbc"(ptr %a), !dbg !22 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.2.temp), !dbg !22 +// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc11_21.2.temp, align 8, !dbg !22 +// CHECK:STDOUT: %.loc11_21.4 = load ptr, ptr %.loc11_21.2.temp, align 8, !dbg !22 +// CHECK:STDOUT: call void @_Z13take_void_ptrPv(ptr %.loc11_21.4), !dbg !23 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.761f5b00f4a1dad7(ptr %.loc11_21.2.temp), !dbg !22 +// CHECK:STDOUT: ret void, !dbg !24 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2199970a74ea9b41:core.Destroy.Core"(ptr %self) #0 !dbg !28 { +// CHECK:STDOUT: define void @_CPassIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !30 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7de5d5d040815fb4: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 void @_CPassIntPtr.Main(ptr %a) #0 !dbg !36 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc11_21.2.temp = alloca ptr, align 8, !dbg !39 -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.437dc5ac559543b0"(ptr %a), !dbg !39 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc11_21.2.temp), !dbg !39 -// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc11_21.2.temp, align 8, !dbg !39 -// CHECK:STDOUT: %.loc11_21.4 = load ptr, ptr %.loc11_21.2.temp, align 8, !dbg !39 -// CHECK:STDOUT: call void @_Z13take_void_ptrPv(ptr %.loc11_21.4), !dbg !40 -// CHECK:STDOUT: call void @"_CSelfDestruct.7de5d5d040815fb4:core.Destroy.Core"(ptr %.loc11_21.2.temp), !dbg !39 -// CHECK:STDOUT: ret void, !dbg !41 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a17e1ddde5b22223: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 void @_CPassIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !47 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_27.2.temp = alloca ptr, align 8, !dbg !50 -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.ad55d9d16ddb9951"(ptr %a), !dbg !50 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc15_27.2.temp), !dbg !50 -// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc15_27.2.temp, align 8, !dbg !50 -// CHECK:STDOUT: %.loc15_27.4 = load ptr, ptr %.loc15_27.2.temp, align 8, !dbg !50 -// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc15_27.4), !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.dde235a3ebd31c71:core.Destroy.Core"(ptr %.loc15_27.2.temp), !dbg !50 -// CHECK:STDOUT: ret void, !dbg !52 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.e9afb99fe676df82:core.Destroy.Core"(ptr %self) #0 !dbg !54 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: %.loc15_27.2.temp = alloca ptr, align 8, !dbg !29 +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.f095c12fd9a5b125"(ptr %a), !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc15_27.2.temp), !dbg !29 +// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc15_27.2.temp, align 8, !dbg !29 +// CHECK:STDOUT: %.loc15_27.4 = load ptr, ptr %.loc15_27.2.temp, align 8, !dbg !29 +// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc15_27.4), !dbg !30 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.fe28508134f64114(ptr %.loc15_27.2.temp), !dbg !29 +// CHECK:STDOUT: ret void, !dbg !31 // 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 @"_CSelfDestruct.8d3ff16138365f48:core.Destroy.Core"(ptr %self) #0 !dbg !58 { +// CHECK:STDOUT: define void @_CPassConstIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !33 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: %.loc19_27.2.temp = alloca ptr, align 8, !dbg !36 +// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.f095c12fd9a5b125"(ptr %a), !dbg !36 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_27.2.temp), !dbg !36 +// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc19_27.2.temp, align 8, !dbg !36 +// CHECK:STDOUT: %.loc19_27.4 = load ptr, ptr %.loc19_27.2.temp, align 8, !dbg !36 +// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc19_27.4), !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.fe28508134f64114(ptr %.loc19_27.2.temp), !dbg !36 +// CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2e10620c70af84cd: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.dde235a3ebd31c71: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 void @_CPassConstIntPtrToConstVoidPtr.Main(ptr %a) #0 !dbg !70 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc19_27.2.temp = alloca ptr, align 8, !dbg !73 -// CHECK:STDOUT: %U.as_type.as.ImplicitAs.impl.Convert.call = call ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.ad55d9d16ddb9951"(ptr %a), !dbg !73 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_27.2.temp), !dbg !73 -// CHECK:STDOUT: store ptr %U.as_type.as.ImplicitAs.impl.Convert.call, ptr %.loc19_27.2.temp, align 8, !dbg !73 -// CHECK:STDOUT: %.loc19_27.4 = load ptr, ptr %.loc19_27.2.temp, align 8, !dbg !73 -// CHECK:STDOUT: call void @_Z19take_const_void_ptrPKv(ptr %.loc19_27.4), !dbg !74 -// CHECK:STDOUT: call void @"_CSelfDestruct.dde235a3ebd31c71:core.Destroy.Core"(ptr %.loc19_27.2.temp), !dbg !73 -// CHECK:STDOUT: ret void, !dbg !75 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.75b60310df0d275d: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 linkonce_odr ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.ecebba3ed00bdf07"(ptr %self) #0 !dbg !81 { -// CHECK:STDOUT: %1 = call ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.d733b2d6fcf89db9"(ptr %self), !dbg !86 -// CHECK:STDOUT: ret ptr %1, !dbg !87 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.ecebba3ed00bdf07"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: %1 = call ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.d733b2d6fcf89db9"(ptr %self), !dbg !46 +// CHECK:STDOUT: ret ptr %1, !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)) #2 // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.437dc5ac559543b0"(ptr %self) #0 !dbg !89 { -// CHECK:STDOUT: %1 = call ptr @"_CConvert.bf8402781e65ec12:OptionalAs.1dac4564233fecd1.Core.58954f771dc7807b"(ptr %self), !dbg !94 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.761f5b00f4a1dad7(ptr %t) #0 !dbg !50 { +// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.c462f23fba5b8cbc"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: %1 = call ptr @"_CConvert.56158d26cb64337a:OptionalAs.5cc57aaa5e35eede.Core.b78ba5413650c292"(ptr %self), !dbg !62 +// CHECK:STDOUT: ret ptr %1, !dbg !63 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.f095c12fd9a5b125"(ptr %self) #0 !dbg !65 { +// CHECK:STDOUT: %1 = call ptr @"_CConvert.56158d26cb64337a:OptionalAs.5cc57aaa5e35eede.Core.8ac16a46fbc024c1"(ptr %self), !dbg !70 +// CHECK:STDOUT: ret ptr %1, !dbg !71 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.fe28508134f64114(ptr %t) #0 !dbg !73 { +// CHECK:STDOUT: ret void, !dbg !78 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.d733b2d6fcf89db9"(ptr %self) #0 !dbg !88 { +// CHECK:STDOUT: %1 = call ptr @_CSome.Optional.Core.d733b2d6fcf89db9(ptr %self), !dbg !94 // CHECK:STDOUT: ret ptr %1, !dbg !95 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.ad55d9d16ddb9951"(ptr %self) #0 !dbg !97 { -// CHECK:STDOUT: %1 = call ptr @"_CConvert.bf8402781e65ec12:OptionalAs.1dac4564233fecd1.Core.a10a0415e4656228"(ptr %self), !dbg !102 -// CHECK:STDOUT: ret ptr %1, !dbg !103 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.56158d26cb64337a:OptionalAs.5cc57aaa5e35eede.Core.b78ba5413650c292"(ptr %self) #0 !dbg !97 { +// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !102 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !102 +// CHECK:STDOUT: store ptr %self, ptr %temp, align 8, !dbg !102 +// CHECK:STDOUT: %1 = load ptr, ptr %temp, align 8, !dbg !102 +// CHECK:STDOUT: %2 = call ptr @_CSome.Optional.Core.d733b2d6fcf89db9(ptr %1), !dbg !103 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f45dc3cf254dd925(ptr %temp), !dbg !102 +// CHECK:STDOUT: ret ptr %2, !dbg !104 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.d733b2d6fcf89db9"(ptr %self) #0 !dbg !113 { -// CHECK:STDOUT: %1 = call ptr @_CSome.Optional.Core.d733b2d6fcf89db9(ptr %self), !dbg !119 -// CHECK:STDOUT: ret ptr %1, !dbg !120 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.56158d26cb64337a:OptionalAs.5cc57aaa5e35eede.Core.8ac16a46fbc024c1"(ptr %self) #0 !dbg !106 { +// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !111 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !111 +// CHECK:STDOUT: %1 = call ptr @"_CConvert:thunk:ImplicitAs.8c382885c27c04bd.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.55456748a8a2eb70"(ptr %self), !dbg !111 +// CHECK:STDOUT: store ptr %1, ptr %temp, align 8, !dbg !111 +// CHECK:STDOUT: %2 = load ptr, ptr %temp, align 8, !dbg !111 +// CHECK:STDOUT: %3 = call ptr @_CSome.Optional.Core.2a2e44fc411aca14(ptr %2), !dbg !112 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9990b95724ee87af(ptr %temp), !dbg !111 +// CHECK:STDOUT: ret ptr %3, !dbg !113 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.bf8402781e65ec12:OptionalAs.1dac4564233fecd1.Core.58954f771dc7807b"(ptr %self) #0 !dbg !122 { -// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !127 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !127 -// CHECK:STDOUT: store ptr %self, ptr %temp, align 8, !dbg !127 -// CHECK:STDOUT: %1 = load ptr, ptr %temp, align 8, !dbg !127 -// CHECK:STDOUT: %2 = call ptr @_CSome.Optional.Core.d733b2d6fcf89db9(ptr %1), !dbg !128 -// CHECK:STDOUT: call void @"_CSelfDestruct.00ac8ef5084ea134:core.Destroy.Core"(ptr %temp), !dbg !127 -// CHECK:STDOUT: ret ptr %2, !dbg !129 +// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.d733b2d6fcf89db9(ptr %value) #0 !dbg !124 { +// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271"(ptr %value), !dbg !129 +// CHECK:STDOUT: ret ptr %1, !dbg !130 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert.bf8402781e65ec12:OptionalAs.1dac4564233fecd1.Core.a10a0415e4656228"(ptr %self) #0 !dbg !131 { -// CHECK:STDOUT: %temp = alloca ptr, align 8, !dbg !136 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !136 -// CHECK:STDOUT: %1 = call ptr @"_CConvert:thunk:ImplicitAs.8c382885c27c04bd.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.55456748a8a2eb70"(ptr %self), !dbg !136 -// CHECK:STDOUT: store ptr %1, ptr %temp, align 8, !dbg !136 -// CHECK:STDOUT: %2 = load ptr, ptr %temp, align 8, !dbg !136 -// CHECK:STDOUT: %3 = call ptr @_CSome.Optional.Core.2a2e44fc411aca14(ptr %2), !dbg !137 -// CHECK:STDOUT: call void @"_CSelfDestruct.e9afb99fe676df82:core.Destroy.Core"(ptr %temp), !dbg !136 -// CHECK:STDOUT: ret ptr %3, !dbg !138 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.d733b2d6fcf89db9(ptr %value) #0 !dbg !149 { -// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271"(ptr %value), !dbg !154 -// CHECK:STDOUT: ret ptr %1, !dbg !155 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f45dc3cf254dd925(ptr %t) #0 !dbg !132 { +// CHECK:STDOUT: ret void, !dbg !137 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert:thunk:ImplicitAs.8c382885c27c04bd.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.55456748a8a2eb70"(ptr %self) #3 !dbg !158 { -// CHECK:STDOUT: ret ptr %self, !dbg !161 +// CHECK:STDOUT: define linkonce_odr ptr @"_CConvert:thunk:ImplicitAs.8c382885c27c04bd.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.55456748a8a2eb70"(ptr %self) #3 !dbg !140 { +// CHECK:STDOUT: ret ptr %self, !dbg !143 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.2a2e44fc411aca14(ptr %value) #0 !dbg !163 { -// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137"(ptr %value), !dbg !168 -// CHECK:STDOUT: ret ptr %1, !dbg !169 +// CHECK:STDOUT: define linkonce_odr ptr @_CSome.Optional.Core.2a2e44fc411aca14(ptr %value) #0 !dbg !145 { +// CHECK:STDOUT: %1 = call ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137"(ptr %value), !dbg !150 +// CHECK:STDOUT: ret ptr %1, !dbg !151 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271"(ptr %self) #0 !dbg !176 { -// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !181 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !181 -// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !181 -// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !185 -// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !183 -// CHECK:STDOUT: call void @"_CSelfDestruct.2199970a74ea9b41:core.Destroy.Core"(ptr %1), !dbg !181 -// CHECK:STDOUT: ret ptr %2, !dbg !187 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9990b95724ee87af(ptr %t) #0 !dbg !153 { +// CHECK:STDOUT: ret void, !dbg !158 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137"(ptr %self) #0 !dbg !189 { -// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !194 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !194 -// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !194 -// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !198 -// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !196 -// CHECK:STDOUT: call void @"_CSelfDestruct.2e10620c70af84cd:core.Destroy.Core"(ptr %1), !dbg !194 -// CHECK:STDOUT: ret ptr %2, !dbg !200 +// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271"(ptr %self) #0 !dbg !165 { +// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !170 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !170 +// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !170 +// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !174 +// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !172 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.25d45deb924f0301(ptr %1), !dbg !170 +// CHECK:STDOUT: ret ptr %2, !dbg !176 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr ptr @"_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137"(ptr %self) #0 !dbg !178 { +// CHECK:STDOUT: %1 = alloca ptr, align 8, !dbg !183 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !183 +// CHECK:STDOUT: store ptr poison, ptr %1, align 8, !dbg !183 +// CHECK:STDOUT: store ptr %self, ptr %1, align 8, !dbg !187 +// CHECK:STDOUT: %2 = load ptr, ptr %1, align 8, !dbg !185 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b2d5ddedd40c515e(ptr %1), !dbg !183 +// CHECK:STDOUT: ret ptr %2, !dbg !189 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.25d45deb924f0301(ptr %t) #0 !dbg !191 { +// CHECK:STDOUT: ret void, !dbg !196 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.b2d5ddedd40c515e(ptr %t) #0 !dbg !198 { +// CHECK:STDOUT: ret void, !dbg !203 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 1, 2, 3, 7, 6, 5, 4 } -// CHECK:STDOUT: uselistorder ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.ad55d9d16ddb9951", { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.761f5b00f4a1dad7, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.f095c12fd9a5b125", { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.fe28508134f64114, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @_CSome.Optional.Core.d733b2d6fcf89db9, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } @@ -278,8 +250,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 = !{!202, !203, !204, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!209} +// CHECK:STDOUT: !llvm.module.flags = !{!205, !206, !207, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!212} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} @@ -296,134 +268,119 @@ fn ConvertFromConstVoidPtr(p: const Cpp.void*) -> const i32* { // CHECK:STDOUT: !16 = !DILocation(line: 7, column: 3, scope: !10) // CHECK:STDOUT: !17 = !DILocation(line: 6, column: 1, scope: !10) // CHECK:STDOUT: !18 = !{!11} -// CHECK:STDOUT: !19 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.00ac8ef5084ea134:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !23) -// CHECK:STDOUT: !21 = !DILocalVariable(arg: 1, scope: !20, type: !7) -// CHECK:STDOUT: !22 = !DILocation(line: 164, column: 19, scope: !20) -// CHECK:STDOUT: !23 = !{!21} -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a7d1b77eb1279818:core.Destroy.Core", scope: null, file: !4, line: 7, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !27) -// CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !24, type: !7) -// CHECK:STDOUT: !26 = !DILocation(line: 7, column: 21, scope: !24) -// CHECK:STDOUT: !27 = !{!25} -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2199970a74ea9b41:core.Destroy.Core", scope: null, file: !4, line: 7, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.7de5d5d040815fb4: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: "PassIntPtr", linkageName: "_CPassIntPtr.Main", scope: null, file: !4, line: 10, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) -// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !7) -// CHECK:STDOUT: !39 = !DILocation(line: 11, column: 21, scope: !36) -// CHECK:STDOUT: !40 = !DILocation(line: 11, column: 3, scope: !36) -// CHECK:STDOUT: !41 = !DILocation(line: 10, column: 1, scope: !36) -// CHECK:STDOUT: !42 = !{!37} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) -// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !7) -// CHECK:STDOUT: !45 = !DILocation(line: 164, column: 19, scope: !43) -// CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "PassIntPtrToConstVoidPtr", linkageName: "_CPassIntPtrToConstVoidPtr.Main", scope: null, file: !4, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !53) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !7) -// CHECK:STDOUT: !50 = !DILocation(line: 15, column: 27, scope: !47) -// CHECK:STDOUT: !51 = !DILocation(line: 15, column: 3, scope: !47) -// CHECK:STDOUT: !52 = !DILocation(line: 14, column: 1, scope: !47) -// CHECK:STDOUT: !53 = !{!48} -// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.e9afb99fe676df82:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !57) -// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !7) -// CHECK:STDOUT: !56 = !DILocation(line: 164, column: 19, scope: !54) -// CHECK:STDOUT: !57 = !{!55} -// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8d3ff16138365f48:core.Destroy.Core", scope: null, file: !4, line: 15, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !61) -// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !7) -// CHECK:STDOUT: !60 = !DILocation(line: 15, column: 27, scope: !58) -// CHECK:STDOUT: !61 = !{!59} -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2e10620c70af84cd: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.dde235a3ebd31c71: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: 15, column: 27, scope: !66) -// CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "PassConstIntPtrToConstVoidPtr", linkageName: "_CPassConstIntPtrToConstVoidPtr.Main", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) -// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !7) -// CHECK:STDOUT: !73 = !DILocation(line: 19, column: 27, scope: !70) -// CHECK:STDOUT: !74 = !DILocation(line: 19, column: 3, scope: !70) -// CHECK:STDOUT: !75 = !DILocation(line: 18, column: 1, scope: !70) -// CHECK:STDOUT: !76 = !{!71} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.75b60310df0d275d:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !80) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !7) -// CHECK:STDOUT: !79 = !DILocation(line: 164, column: 19, scope: !77) -// CHECK:STDOUT: !80 = !{!78} -// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.ecebba3ed00bdf07", scope: null, file: !19, line: 105, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !88) -// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !7) -// CHECK:STDOUT: !86 = !DILocation(line: 106, column: 12, scope: !81) -// CHECK:STDOUT: !87 = !DILocation(line: 106, column: 5, scope: !81) -// CHECK:STDOUT: !88 = !{!82} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.437dc5ac559543b0", 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.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.ad55d9d16ddb9951", scope: null, file: !19, line: 105, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !104) +// CHECK:STDOUT: !19 = distinct !DISubprogram(name: "PassIntPtr", linkageName: "_CPassIntPtr.Main", scope: null, file: !4, line: 10, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !20 = !DILocalVariable(arg: 1, scope: !19, type: !7) +// CHECK:STDOUT: !22 = !DILocation(line: 11, column: 21, scope: !19) +// CHECK:STDOUT: !23 = !DILocation(line: 11, column: 3, scope: !19) +// CHECK:STDOUT: !24 = !DILocation(line: 10, column: 1, scope: !19) +// CHECK:STDOUT: !25 = !{!20} +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "PassIntPtrToConstVoidPtr", linkageName: "_CPassIntPtrToConstVoidPtr.Main", scope: null, file: !4, line: 14, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !32) +// CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !7) +// CHECK:STDOUT: !29 = !DILocation(line: 15, column: 27, scope: !26) +// CHECK:STDOUT: !30 = !DILocation(line: 15, column: 3, scope: !26) +// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 1, scope: !26) +// CHECK:STDOUT: !32 = !{!27} +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "PassConstIntPtrToConstVoidPtr", linkageName: "_CPassConstIntPtrToConstVoidPtr.Main", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) +// CHECK:STDOUT: !34 = !DILocalVariable(arg: 1, scope: !33, type: !7) +// CHECK:STDOUT: !36 = !DILocation(line: 19, column: 27, scope: !33) +// CHECK:STDOUT: !37 = !DILocation(line: 19, column: 3, scope: !33) +// CHECK:STDOUT: !38 = !DILocation(line: 18, column: 1, scope: !33) +// CHECK:STDOUT: !39 = !{!34} +// CHECK:STDOUT: !40 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.ecebba3ed00bdf07", scope: null, file: !40, line: 105, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !48) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !7) +// CHECK:STDOUT: !46 = !DILocation(line: 106, column: 12, scope: !41) +// CHECK:STDOUT: !47 = !DILocation(line: 106, column: 5, scope: !41) +// CHECK:STDOUT: !48 = !{!42} +// CHECK:STDOUT: !49 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.761f5b00f4a1dad7", scope: null, file: !49, line: 36, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !56) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !7) +// CHECK:STDOUT: !55 = !DILocation(line: 36, column: 1, scope: !50) +// CHECK:STDOUT: !56 = !{!51} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.c462f23fba5b8cbc", scope: null, file: !40, line: 105, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !64) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !7) +// CHECK:STDOUT: !62 = !DILocation(line: 106, column: 12, scope: !57) +// CHECK:STDOUT: !63 = !DILocation(line: 106, column: 5, scope: !57) +// CHECK:STDOUT: !64 = !{!58} +// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.f095c12fd9a5b125", scope: null, file: !40, line: 105, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !72) +// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !7) +// CHECK:STDOUT: !70 = !DILocation(line: 106, column: 12, scope: !65) +// CHECK:STDOUT: !71 = !DILocation(line: 106, column: 5, scope: !65) +// CHECK:STDOUT: !72 = !{!66} +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.fe28508134f64114", scope: null, file: !49, line: 36, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !79) +// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !7) +// CHECK:STDOUT: !78 = !DILocation(line: 36, column: 1, scope: !73) +// CHECK:STDOUT: !79 = !{!74} +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.d733b2d6fcf89db9", scope: null, file: !40, line: 80, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !96) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !7) +// CHECK:STDOUT: !94 = !DILocation(line: 81, column: 12, scope: !88) +// CHECK:STDOUT: !95 = !DILocation(line: 81, column: 5, scope: !88) +// CHECK:STDOUT: !96 = !{!89} +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.56158d26cb64337a:OptionalAs.5cc57aaa5e35eede.Core.b78ba5413650c292", scope: null, file: !40, line: 87, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !105) // 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: !113 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.d733b2d6fcf89db9", scope: null, file: !19, line: 80, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !121) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !7) -// 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: "Convert", linkageName: "_CConvert.bf8402781e65ec12:OptionalAs.1dac4564233fecd1.Core.58954f771dc7807b", scope: null, file: !19, line: 87, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !130) -// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !7) -// CHECK:STDOUT: !127 = !DILocation(line: 88, column: 29, scope: !122) -// CHECK:STDOUT: !128 = !DILocation(line: 88, column: 12, scope: !122) -// CHECK:STDOUT: !129 = !DILocation(line: 88, column: 5, scope: !122) -// CHECK:STDOUT: !130 = !{!123} -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.bf8402781e65ec12:OptionalAs.1dac4564233fecd1.Core.a10a0415e4656228", scope: null, file: !19, line: 87, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139) -// CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !7) -// CHECK:STDOUT: !136 = !DILocation(line: 88, column: 29, scope: !131) -// CHECK:STDOUT: !137 = !DILocation(line: 88, column: 12, scope: !131) -// CHECK:STDOUT: !138 = !DILocation(line: 88, column: 5, scope: !131) -// CHECK:STDOUT: !139 = !{!132} -// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.d733b2d6fcf89db9", scope: null, file: !19, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !156) -// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !7) -// CHECK:STDOUT: !154 = !DILocation(line: 34, column: 12, scope: !149) -// CHECK:STDOUT: !155 = !DILocation(line: 34, column: 5, scope: !149) -// CHECK:STDOUT: !156 = !{!150} -// CHECK:STDOUT: !157 = !DIFile(filename: "{{.*}}/prelude/types/cpp/void.carbon", directory: "") -// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert:thunk:ImplicitAs.8c382885c27c04bd.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.55456748a8a2eb70", scope: null, file: !157, line: 40, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !162) -// CHECK:STDOUT: !159 = !DILocalVariable(arg: 1, scope: !158, type: !7) -// CHECK:STDOUT: !161 = !DILocation(line: 40, column: 3, scope: !158) -// CHECK:STDOUT: !162 = !{!159} -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.2a2e44fc411aca14", scope: null, file: !19, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !170) -// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !7) -// 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: !176 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271", scope: null, file: !19, line: 166, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !188) -// CHECK:STDOUT: !177 = !DILocalVariable(arg: 1, scope: !176, type: !7) -// CHECK:STDOUT: !181 = !DILocation(line: 167, column: 14, scope: !176) -// CHECK:STDOUT: !183 = !DILocation(line: 167, column: 18, scope: !176) -// CHECK:STDOUT: !185 = !DILocation(line: 169, column: 5, scope: !176) -// CHECK:STDOUT: !187 = !DILocation(line: 170, column: 5, scope: !176) -// CHECK:STDOUT: !188 = !{!177} -// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137", scope: null, file: !19, line: 166, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !201) -// CHECK:STDOUT: !190 = !DILocalVariable(arg: 1, scope: !189, type: !7) -// CHECK:STDOUT: !194 = !DILocation(line: 167, column: 14, scope: !189) -// CHECK:STDOUT: !196 = !DILocation(line: 167, column: 18, scope: !189) -// CHECK:STDOUT: !198 = !DILocation(line: 169, column: 5, scope: !189) -// CHECK:STDOUT: !200 = !DILocation(line: 170, column: 5, scope: !189) -// CHECK:STDOUT: !201 = !{!190} -// CHECK:STDOUT: !202 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !203 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !204 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !205 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !206 = !{!"omnipotent char", !205, i64 0} -// CHECK:STDOUT: !207 = !{!"int", !206, i64 0} -// CHECK:STDOUT: !208 = !{!"__libc_errno", !207, i64 0} -// CHECK:STDOUT: !209 = !{!208, !207, i64 0} +// CHECK:STDOUT: !102 = !DILocation(line: 88, column: 29, scope: !97) +// CHECK:STDOUT: !103 = !DILocation(line: 88, column: 12, scope: !97) +// CHECK:STDOUT: !104 = !DILocation(line: 88, column: 5, scope: !97) +// CHECK:STDOUT: !105 = !{!98} +// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.56158d26cb64337a:OptionalAs.5cc57aaa5e35eede.Core.8ac16a46fbc024c1", scope: null, file: !40, line: 87, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !114) +// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !7) +// CHECK:STDOUT: !111 = !DILocation(line: 88, column: 29, scope: !106) +// CHECK:STDOUT: !112 = !DILocation(line: 88, column: 12, scope: !106) +// CHECK:STDOUT: !113 = !DILocation(line: 88, column: 5, scope: !106) +// CHECK:STDOUT: !114 = !{!107} +// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.d733b2d6fcf89db9", scope: null, file: !40, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !131) +// CHECK:STDOUT: !125 = !DILocalVariable(arg: 1, scope: !124, type: !7) +// CHECK:STDOUT: !129 = !DILocation(line: 34, column: 12, scope: !124) +// CHECK:STDOUT: !130 = !DILocation(line: 34, column: 5, scope: !124) +// CHECK:STDOUT: !131 = !{!125} +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f45dc3cf254dd925", scope: null, file: !49, line: 36, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !138) +// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !7) +// CHECK:STDOUT: !137 = !DILocation(line: 36, column: 1, scope: !132) +// CHECK:STDOUT: !138 = !{!133} +// CHECK:STDOUT: !139 = !DIFile(filename: "{{.*}}/prelude/types/cpp/void.carbon", directory: "") +// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert:thunk:ImplicitAs.8c382885c27c04bd.Core:e8f8f92d3d08d149:ImplicitAs.01c4a560c986e7d1.Core.55456748a8a2eb70", scope: null, file: !139, line: 40, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !144) +// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !7) +// CHECK:STDOUT: !143 = !DILocation(line: 40, column: 3, scope: !140) +// CHECK:STDOUT: !144 = !{!141} +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.2a2e44fc411aca14", scope: null, file: !40, line: 33, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !152) +// CHECK:STDOUT: !146 = !DILocalVariable(arg: 1, scope: !145, type: !7) +// CHECK:STDOUT: !150 = !DILocation(line: 34, column: 12, scope: !145) +// CHECK:STDOUT: !151 = !DILocation(line: 34, column: 5, scope: !145) +// CHECK:STDOUT: !152 = !{!146} +// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9990b95724ee87af", scope: null, file: !49, line: 36, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !159) +// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !7) +// CHECK:STDOUT: !158 = !DILocation(line: 36, column: 1, scope: !153) +// CHECK:STDOUT: !159 = !{!154} +// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.7a595a06c724a271", scope: null, file: !40, line: 166, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !177) +// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !7) +// CHECK:STDOUT: !170 = !DILocation(line: 167, column: 14, scope: !165) +// CHECK:STDOUT: !172 = !DILocation(line: 167, column: 18, scope: !165) +// CHECK:STDOUT: !174 = !DILocation(line: 169, column: 5, scope: !165) +// CHECK:STDOUT: !176 = !DILocation(line: 170, column: 5, scope: !165) +// CHECK:STDOUT: !177 = !{!166} +// CHECK:STDOUT: !178 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.e8f8f92d3d08d149:OptionalStorage.Core.8f1054b47505c137", scope: null, file: !40, line: 166, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !190) +// CHECK:STDOUT: !179 = !DILocalVariable(arg: 1, scope: !178, type: !7) +// CHECK:STDOUT: !183 = !DILocation(line: 167, column: 14, scope: !178) +// CHECK:STDOUT: !185 = !DILocation(line: 167, column: 18, scope: !178) +// CHECK:STDOUT: !187 = !DILocation(line: 169, column: 5, scope: !178) +// CHECK:STDOUT: !189 = !DILocation(line: 170, column: 5, scope: !178) +// CHECK:STDOUT: !190 = !{!179} +// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.25d45deb924f0301", scope: null, file: !49, line: 36, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !197) +// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !7) +// CHECK:STDOUT: !196 = !DILocation(line: 36, column: 1, scope: !191) +// CHECK:STDOUT: !197 = !{!192} +// CHECK:STDOUT: !198 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b2d5ddedd40c515e", scope: null, file: !49, line: 36, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !204) +// CHECK:STDOUT: !199 = !DILocalVariable(arg: 1, scope: !198, type: !7) +// CHECK:STDOUT: !203 = !DILocation(line: 36, column: 1, scope: !198) +// CHECK:STDOUT: !204 = !{!199} +// CHECK:STDOUT: !205 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !206 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !207 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !208 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !209 = !{!"omnipotent char", !208, i64 0} +// CHECK:STDOUT: !210 = !{!"int", !209, i64 0} +// CHECK:STDOUT: !211 = !{!"__libc_errno", !210, i64 0} +// CHECK:STDOUT: !212 = !{!211, !210, i64 0} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'receive.carbon' @@ -432,72 +389,59 @@ 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 !214 { +// CHECK:STDOUT: define ptr @_CReceiveVoidPtr.Main() #0 !dbg !217 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !216 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CReceiveVoidPtr.Main() #0 !dbg !218 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %return_void_ptr.call = call ptr @_Z15return_void_ptrv(), !dbg !221 -// CHECK:STDOUT: ret ptr %return_void_ptr.call, !dbg !222 +// CHECK:STDOUT: %return_void_ptr.call = call ptr @_Z15return_void_ptrv(), !dbg !220 +// CHECK:STDOUT: ret ptr %return_void_ptr.call, !dbg !221 // 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 !223 { +// CHECK:STDOUT: define ptr @_CConvertFromVoidPtr.Main(ptr %p) #0 !dbg !222 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %p, !dbg !229 +// CHECK:STDOUT: ret ptr %p, !dbg !228 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CConvertFromConstVoidPtr.Main(ptr %p) #0 !dbg !231 { +// CHECK:STDOUT: define ptr @_CConvertFromConstVoidPtr.Main(ptr %p) #0 !dbg !230 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret ptr %p, !dbg !237 +// CHECK:STDOUT: ret ptr %p, !dbg !236 // 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 = !{!211} -// CHECK:STDOUT: !llvm.module.flags = !{!202, !203, !204, !2, !3} -// CHECK:STDOUT: !llvm.errno.tbaa = !{!209} +// CHECK:STDOUT: !llvm.dbg.cu = !{!214} +// CHECK:STDOUT: !llvm.module.flags = !{!205, !206, !207, !2, !3} +// CHECK:STDOUT: !llvm.errno.tbaa = !{!212} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !8 = !{null, !7} -// CHECK:STDOUT: !9 = !DISubroutineType(types: !8) // CHECK:STDOUT: !14 = !{!7, !7} // CHECK:STDOUT: !15 = !DISubroutineType(types: !14) -// CHECK:STDOUT: !19 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !202 = !{i32 8, !"PIC Level", i32 2} -// CHECK:STDOUT: !203 = !{i32 7, !"PIE Level", i32 2} -// CHECK:STDOUT: !204 = !{i32 7, !"uwtable", i32 2} -// CHECK:STDOUT: !205 = !{!"Simple C++ TBAA"} -// CHECK:STDOUT: !206 = !{!"omnipotent char", !205, i64 0} -// CHECK:STDOUT: !207 = !{!"int", !206, i64 0} -// CHECK:STDOUT: !208 = !{!"__libc_errno", !207, i64 0} -// CHECK:STDOUT: !209 = !{!208, !207, i64 0} -// CHECK:STDOUT: !210 = !DIFile(filename: "receive.carbon", directory: "") -// CHECK:STDOUT: !211 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !210, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !212 = !{!7} -// CHECK:STDOUT: !213 = !DISubroutineType(types: !212) -// CHECK:STDOUT: !214 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.00ac8ef5084ea134:core.Destroy.Core", scope: null, file: !19, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !217) -// CHECK:STDOUT: !215 = !DILocalVariable(arg: 1, scope: !214, type: !7) -// CHECK:STDOUT: !216 = !DILocation(line: 164, column: 19, scope: !214) -// CHECK:STDOUT: !217 = !{!215} -// CHECK:STDOUT: !218 = distinct !DISubprogram(name: "ReceiveVoidPtr", linkageName: "_CReceiveVoidPtr.Main", scope: null, file: !210, line: 6, type: !213, spFlags: DISPFlagDefinition, unit: !211) -// CHECK:STDOUT: !221 = !DILocation(line: 7, column: 10, scope: !218) -// CHECK:STDOUT: !222 = !DILocation(line: 7, column: 3, scope: !218) -// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "ConvertFromVoidPtr", linkageName: "_CConvertFromVoidPtr.Main", scope: null, file: !210, line: 10, type: !15, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !230) -// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !7) -// CHECK:STDOUT: !229 = !DILocation(line: 11, column: 3, scope: !223) -// CHECK:STDOUT: !230 = !{!224} -// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "ConvertFromConstVoidPtr", linkageName: "_CConvertFromConstVoidPtr.Main", scope: null, file: !210, line: 14, type: !15, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !238) -// CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !7) -// CHECK:STDOUT: !237 = !DILocation(line: 15, column: 3, scope: !231) -// CHECK:STDOUT: !238 = !{!232} +// CHECK:STDOUT: !205 = !{i32 8, !"PIC Level", i32 2} +// CHECK:STDOUT: !206 = !{i32 7, !"PIE Level", i32 2} +// CHECK:STDOUT: !207 = !{i32 7, !"uwtable", i32 2} +// CHECK:STDOUT: !208 = !{!"Simple C++ TBAA"} +// CHECK:STDOUT: !209 = !{!"omnipotent char", !208, i64 0} +// CHECK:STDOUT: !210 = !{!"int", !209, i64 0} +// CHECK:STDOUT: !211 = !{!"__libc_errno", !210, i64 0} +// CHECK:STDOUT: !212 = !{!211, !210, i64 0} +// CHECK:STDOUT: !213 = !DIFile(filename: "receive.carbon", directory: "") +// CHECK:STDOUT: !214 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !213, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !215 = !{!7} +// CHECK:STDOUT: !216 = !DISubroutineType(types: !215) +// CHECK:STDOUT: !217 = distinct !DISubprogram(name: "ReceiveVoidPtr", linkageName: "_CReceiveVoidPtr.Main", scope: null, file: !213, line: 6, type: !216, spFlags: DISPFlagDefinition, unit: !214) +// CHECK:STDOUT: !220 = !DILocation(line: 7, column: 10, scope: !217) +// CHECK:STDOUT: !221 = !DILocation(line: 7, column: 3, scope: !217) +// CHECK:STDOUT: !222 = distinct !DISubprogram(name: "ConvertFromVoidPtr", linkageName: "_CConvertFromVoidPtr.Main", scope: null, file: !213, line: 10, type: !15, spFlags: DISPFlagDefinition, unit: !214, retainedNodes: !229) +// CHECK:STDOUT: !223 = !DILocalVariable(arg: 1, scope: !222, type: !7) +// CHECK:STDOUT: !228 = !DILocation(line: 11, column: 3, scope: !222) +// CHECK:STDOUT: !229 = !{!223} +// CHECK:STDOUT: !230 = distinct !DISubprogram(name: "ConvertFromConstVoidPtr", linkageName: "_CConvertFromConstVoidPtr.Main", scope: null, file: !213, line: 14, type: !15, spFlags: DISPFlagDefinition, unit: !214, retainedNodes: !237) +// CHECK:STDOUT: !231 = !DILocalVariable(arg: 1, scope: !230, type: !7) +// CHECK:STDOUT: !236 = !DILocation(line: 15, column: 3, scope: !230) +// CHECK:STDOUT: !237 = !{!231} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/let/copy_value_rep.carbon b/toolchain/lower/testdata/let/copy_value_rep.carbon index 78521c7ec764..e7f03e5b5f59 100644 --- a/toolchain/lower/testdata/let/copy_value_rep.carbon +++ b/toolchain/lower/testdata/let/copy_value_rep.carbon @@ -26,65 +26,59 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'copy_value_rep.carbon' // CHECK:STDOUT: source_filename = "copy_value_rep.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @X.val.loc18_3 = internal constant { i32 } { i32 1 } +// CHECK:STDOUT: @X.val.loc18_3.1 = internal constant { i32 } { i32 1 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !28 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca { i32 }, align 4, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !31 -// CHECK:STDOUT: %.loc18_21.3.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !32 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @X.val.loc18_3, i64 4, i1 false), !dbg !31 -// CHECK:STDOUT: %.loc19_17.1.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !34 -// CHECK:STDOUT: %.loc19_17.2 = load i32, ptr %.loc19_17.1.a, align 4, !dbg !34 -// CHECK:STDOUT: %.loc20_4.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !37 -// CHECK:STDOUT: store i32 2, ptr %.loc20_4.a, align 4, !dbg !37 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %x.var), !dbg !31 -// CHECK:STDOUT: ret i32 %.loc19_17.2, !dbg !39 +// CHECK:STDOUT: %x.var = alloca { i32 }, align 4, !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !29 +// CHECK:STDOUT: %.loc18_21.3.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !30 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @X.val.loc18_3.1, i64 4, i1 false), !dbg !29 +// CHECK:STDOUT: %.loc19_17.1.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !32 +// CHECK:STDOUT: %.loc19_17.2 = load i32, ptr %.loc19_17.1.a, align 4, !dbg !32 +// CHECK:STDOUT: %.loc20_4.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !35 +// CHECK:STDOUT: store i32 2, ptr %.loc20_4.a, align 4, !dbg !35 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %x.var), !dbg !29 +// CHECK:STDOUT: ret i32 %.loc19_17.2, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define weak_odr void @"_COp.15e9ca085e5fab32:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !42 +// CHECK:STDOUT: %.loc18_3.1.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !40 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc18_3.1.a), !dbg !40 +// CHECK:STDOUT: ret void, !dbg !40 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.15e9ca085e5fab32:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_COp.8b0bf151036f045a:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !44 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18.a), !dbg !46 +// CHECK:STDOUT: %.loc18_3.1.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !46 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc18_3.1.a), !dbg !46 // CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.15e9ca085e5fab32:core.Destroy.Core"(ptr %self) #0 !dbg !48 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.15e9ca085e5fab32: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.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !52 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !54 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc18.a), !dbg !54 -// CHECK:STDOUT: ret void, !dbg !54 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !56 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8b0bf151036f045a: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.lifetime.start.p0(ptr captures(none)) #1 // 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 @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %t) #0 !dbg !48 { +// CHECK:STDOUT: call void @"_COp.8b0bf151036f045a:core.SubobjectDestroy.Core"(ptr %t), !dbg !52 +// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !55 { +// CHECK:STDOUT: ret void, !dbg !60 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -93,40 +87,38 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "copy_value_rep.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !26 = !{null, !25} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 18, column: 3, scope: !28) -// CHECK:STDOUT: !32 = !DILocation(line: 18, column: 14, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 19, column: 16, scope: !28) -// CHECK:STDOUT: !37 = !DILocation(line: 20, column: 3, scope: !28) -// CHECK:STDOUT: !39 = !DILocation(line: 22, column: 3, scope: !28) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 18, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) -// 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.15e9ca085e5fab32:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) -// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !25) +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{null, !23} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 17, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 18, column: 3, scope: !26) +// CHECK:STDOUT: !30 = !DILocation(line: 18, column: 14, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 19, column: 16, scope: !26) +// CHECK:STDOUT: !35 = !DILocation(line: 20, column: 3, scope: !26) +// CHECK:STDOUT: !37 = !DILocation(line: 22, column: 3, scope: !26) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Op", linkageName: "_COp.15e9ca085e5fab32:core.SubobjectDestroy.Core", scope: null, file: !18, line: 18, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) +// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !23) +// CHECK:STDOUT: !40 = !DILocation(line: 18, column: 3, scope: !38) +// CHECK:STDOUT: !41 = !{null, !20} +// CHECK:STDOUT: !42 = !DISubroutineType(types: !41) +// CHECK:STDOUT: !43 = !{!39} +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8b0bf151036f045a:core.SubobjectDestroy.Core", scope: null, file: !18, line: 18, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !23) // CHECK:STDOUT: !46 = !DILocation(line: 18, column: 3, scope: !44) // CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.15e9ca085e5fab32: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.8b0bf151036f045a: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.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: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2abb6e2621dcf00d", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !23) +// CHECK:STDOUT: !52 = !DILocation(line: 34, column: 5, scope: !48) +// CHECK:STDOUT: !53 = !DILocation(line: 32, column: 1, scope: !48) +// CHECK:STDOUT: !54 = !{!49} +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !42, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !61) +// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !20) +// CHECK:STDOUT: !60 = !DILocation(line: 32, column: 1, scope: !55) +// CHECK:STDOUT: !61 = !{!56} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/let/tuple.carbon b/toolchain/lower/testdata/let/tuple.carbon index 3ac437f28ec6..af3e2966baca 100644 --- a/toolchain/lower/testdata/let/tuple.carbon +++ b/toolchain/lower/testdata/let/tuple.carbon @@ -21,113 +21,111 @@ fn F() -> i32 { // CHECK:STDOUT: ; ModuleID = 'tuple.carbon' // CHECK:STDOUT: source_filename = "tuple.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @tuple.80e.loc14_3 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } -// CHECK:STDOUT: @tuple.a84.loc15_3 = internal constant { i32, i32 } { i32 4, i32 5 } +// CHECK:STDOUT: @tuple.80e.loc14_3.1 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } +// CHECK:STDOUT: @tuple.a84.loc15_3.1 = internal constant { i32, i32 } { i32 4, i32 5 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF.Main() #0 !dbg !28 { +// CHECK:STDOUT: define i32 @_CF.Main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 4, !dbg !31 -// CHECK:STDOUT: %b.var = alloca { i32, i32 }, align 4, !dbg !34 -// CHECK:STDOUT: %tuple.loc16_43 = alloca { i32, i32, i32 }, align 4, !dbg !37 -// CHECK:STDOUT: %tuple.loc16_46 = alloca { i32, i32 }, align 4, !dbg !38 -// CHECK:STDOUT: %tuple.loc16_47 = alloca { ptr, ptr }, align 8, !dbg !39 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !31 -// CHECK:STDOUT: %tuple.elem0.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !32 -// CHECK:STDOUT: %tuple.elem1.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !32 -// CHECK:STDOUT: %tuple.elem2.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !32 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.80e.loc14_3, i64 12, i1 false), !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !34 -// CHECK:STDOUT: %tuple.elem0.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !35 -// CHECK:STDOUT: %tuple.elem1.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !35 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %b.var, ptr align 4 @tuple.a84.loc15_3, i64 8, i1 false), !dbg !34 -// CHECK:STDOUT: %tuple.elem0.loc16_43.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !37 -// CHECK:STDOUT: %.loc16_43.1 = load i32, ptr %tuple.elem0.loc16_43.tuple.elem, align 4, !dbg !37 -// CHECK:STDOUT: %tuple.elem1.loc16_43.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !37 -// CHECK:STDOUT: %.loc16_43.2 = load i32, ptr %tuple.elem1.loc16_43.tuple.elem, align 4, !dbg !37 -// CHECK:STDOUT: %tuple.elem2.loc16.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !37 -// CHECK:STDOUT: %.loc16_43.3 = load i32, ptr %tuple.elem2.loc16.tuple.elem, align 4, !dbg !37 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc16_43), !dbg !37 -// CHECK:STDOUT: %tuple.loc16_431 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_43, i32 0, i32 0, !dbg !37 -// CHECK:STDOUT: store i32 %.loc16_43.1, ptr %tuple.loc16_431, align 4, !dbg !37 -// CHECK:STDOUT: %tuple.loc16_432 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_43, i32 0, i32 1, !dbg !37 -// CHECK:STDOUT: store i32 %.loc16_43.2, ptr %tuple.loc16_432, align 4, !dbg !37 -// CHECK:STDOUT: %tuple.loc16_433 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_43, i32 0, i32 2, !dbg !37 -// CHECK:STDOUT: store i32 %.loc16_43.3, ptr %tuple.loc16_433, align 4, !dbg !37 -// CHECK:STDOUT: %tuple.elem0.loc16_46.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !38 -// CHECK:STDOUT: %.loc16_46.1 = load i32, ptr %tuple.elem0.loc16_46.tuple.elem, align 4, !dbg !38 -// CHECK:STDOUT: %tuple.elem1.loc16_46.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !38 -// CHECK:STDOUT: %.loc16_46.2 = load i32, ptr %tuple.elem1.loc16_46.tuple.elem, align 4, !dbg !38 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc16_46), !dbg !38 -// CHECK:STDOUT: %tuple.loc16_464 = getelementptr inbounds nuw { i32, i32 }, ptr %tuple.loc16_46, i32 0, i32 0, !dbg !38 -// CHECK:STDOUT: store i32 %.loc16_46.1, ptr %tuple.loc16_464, align 4, !dbg !38 -// CHECK:STDOUT: %tuple.loc16_465 = getelementptr inbounds nuw { i32, i32 }, ptr %tuple.loc16_46, i32 0, i32 1, !dbg !38 -// CHECK:STDOUT: store i32 %.loc16_46.2, ptr %tuple.loc16_465, align 4, !dbg !38 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc16_47), !dbg !39 -// CHECK:STDOUT: %tuple.loc16_476 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc16_47, i32 0, i32 0, !dbg !39 -// CHECK:STDOUT: store ptr %tuple.loc16_43, ptr %tuple.loc16_476, align 8, !dbg !39 -// CHECK:STDOUT: %tuple.loc16_477 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc16_47, i32 0, i32 1, !dbg !39 -// CHECK:STDOUT: store ptr %tuple.loc16_46, ptr %tuple.loc16_477, align 8, !dbg !39 -// CHECK:STDOUT: %tuple.elem1.loc17_11.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc16_47, i32 0, i32 1, !dbg !42 -// CHECK:STDOUT: %tuple.elem1.loc17_11.tuple.elem.load = load ptr, ptr %tuple.elem1.loc17_11.tuple.elem, align 8, !dbg !42 -// CHECK:STDOUT: %tuple.elem1.loc17_13.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %tuple.elem1.loc17_11.tuple.elem.load, i32 0, i32 1, !dbg !42 -// CHECK:STDOUT: %tuple.elem1.loc17_13.tuple.elem.load = load i32, ptr %tuple.elem1.loc17_13.tuple.elem, align 4, !dbg !42 -// CHECK:STDOUT: call void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %b.var), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %a.var), !dbg !31 -// CHECK:STDOUT: ret i32 %tuple.elem1.loc17_13.tuple.elem.load, !dbg !43 +// CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 4, !dbg !29 +// CHECK:STDOUT: %b.var = alloca { i32, i32 }, align 4, !dbg !32 +// CHECK:STDOUT: %tuple.loc16_43 = alloca { i32, i32, i32 }, align 4, !dbg !35 +// CHECK:STDOUT: %tuple.loc16_46 = alloca { i32, i32 }, align 4, !dbg !36 +// CHECK:STDOUT: %tuple.loc16_47 = alloca { ptr, ptr }, align 8, !dbg !37 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !29 +// CHECK:STDOUT: %tuple.elem0.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !30 +// CHECK:STDOUT: %tuple.elem1.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !30 +// CHECK:STDOUT: %tuple.elem2.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !30 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.80e.loc14_3.1, i64 12, i1 false), !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !32 +// CHECK:STDOUT: %tuple.elem0.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: %tuple.elem1.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !33 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %b.var, ptr align 4 @tuple.a84.loc15_3.1, i64 8, i1 false), !dbg !32 +// CHECK:STDOUT: %tuple.elem0.loc16_43.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !35 +// CHECK:STDOUT: %.loc16_43.1 = load i32, ptr %tuple.elem0.loc16_43.tuple.elem, align 4, !dbg !35 +// CHECK:STDOUT: %tuple.elem1.loc16_43.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !35 +// CHECK:STDOUT: %.loc16_43.2 = load i32, ptr %tuple.elem1.loc16_43.tuple.elem, align 4, !dbg !35 +// CHECK:STDOUT: %tuple.elem2.loc16.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !35 +// CHECK:STDOUT: %.loc16_43.3 = load i32, ptr %tuple.elem2.loc16.tuple.elem, align 4, !dbg !35 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc16_43), !dbg !35 +// CHECK:STDOUT: %tuple.loc16_431 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_43, i32 0, i32 0, !dbg !35 +// CHECK:STDOUT: store i32 %.loc16_43.1, ptr %tuple.loc16_431, align 4, !dbg !35 +// CHECK:STDOUT: %tuple.loc16_432 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_43, i32 0, i32 1, !dbg !35 +// CHECK:STDOUT: store i32 %.loc16_43.2, ptr %tuple.loc16_432, align 4, !dbg !35 +// CHECK:STDOUT: %tuple.loc16_433 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc16_43, i32 0, i32 2, !dbg !35 +// CHECK:STDOUT: store i32 %.loc16_43.3, ptr %tuple.loc16_433, align 4, !dbg !35 +// CHECK:STDOUT: %tuple.elem0.loc16_46.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !36 +// CHECK:STDOUT: %.loc16_46.1 = load i32, ptr %tuple.elem0.loc16_46.tuple.elem, align 4, !dbg !36 +// CHECK:STDOUT: %tuple.elem1.loc16_46.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !36 +// CHECK:STDOUT: %.loc16_46.2 = load i32, ptr %tuple.elem1.loc16_46.tuple.elem, align 4, !dbg !36 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc16_46), !dbg !36 +// CHECK:STDOUT: %tuple.loc16_464 = getelementptr inbounds nuw { i32, i32 }, ptr %tuple.loc16_46, i32 0, i32 0, !dbg !36 +// CHECK:STDOUT: store i32 %.loc16_46.1, ptr %tuple.loc16_464, align 4, !dbg !36 +// CHECK:STDOUT: %tuple.loc16_465 = getelementptr inbounds nuw { i32, i32 }, ptr %tuple.loc16_46, i32 0, i32 1, !dbg !36 +// CHECK:STDOUT: store i32 %.loc16_46.2, ptr %tuple.loc16_465, align 4, !dbg !36 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc16_47), !dbg !37 +// CHECK:STDOUT: %tuple.loc16_476 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc16_47, i32 0, i32 0, !dbg !37 +// CHECK:STDOUT: store ptr %tuple.loc16_43, ptr %tuple.loc16_476, align 8, !dbg !37 +// CHECK:STDOUT: %tuple.loc16_477 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc16_47, i32 0, i32 1, !dbg !37 +// CHECK:STDOUT: store ptr %tuple.loc16_46, ptr %tuple.loc16_477, align 8, !dbg !37 +// CHECK:STDOUT: %tuple.elem1.loc17_11.tuple.elem = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc16_47, i32 0, i32 1, !dbg !40 +// CHECK:STDOUT: %tuple.elem1.loc17_11.tuple.elem.load = load ptr, ptr %tuple.elem1.loc17_11.tuple.elem, align 8, !dbg !40 +// CHECK:STDOUT: %tuple.elem1.loc17_13.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %tuple.elem1.loc17_11.tuple.elem.load, i32 0, i32 1, !dbg !40 +// CHECK:STDOUT: %tuple.elem1.loc17_13.tuple.elem.load = load i32, ptr %tuple.elem1.loc17_13.tuple.elem, align 4, !dbg !40 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %b.var), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %a.var), !dbg !29 +// CHECK:STDOUT: ret i32 %tuple.elem1.loc17_13.tuple.elem.load, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !44 { +// CHECK:STDOUT: define weak_odr void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !46 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !44 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !44 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !44 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !44 +// CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !48 { +// CHECK:STDOUT: define weak_odr void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !48 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !50 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !50 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !50 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !50 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !50 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem2.tuple.elem), !dbg !50 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !50 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !50 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !50 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !50 // CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !52 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.35f6012581c5aabb: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.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !56 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !58 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !58 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !58 -// CHECK:STDOUT: ret void, !dbg !58 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !60 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.abce894028f59bc0: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: // 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 @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %t) #0 !dbg !52 { +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %t), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %t) #0 !dbg !59 { +// CHECK:STDOUT: call void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %t), !dbg !63 +// CHECK:STDOUT: ret void, !dbg !64 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !66 { +// CHECK:STDOUT: ret void, !dbg !71 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 4, 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 4, 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -137,44 +135,47 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "tuple.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !26 = !{null, !25} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 3, scope: !28) -// CHECK:STDOUT: !32 = !DILocation(line: 14, column: 28, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 3, scope: !28) -// CHECK:STDOUT: !35 = !DILocation(line: 15, column: 23, scope: !28) -// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 43, scope: !28) -// CHECK:STDOUT: !38 = !DILocation(line: 16, column: 46, scope: !28) -// CHECK:STDOUT: !39 = !DILocation(line: 16, column: 42, scope: !28) -// CHECK:STDOUT: !42 = !DILocation(line: 17, column: 10, scope: !28) -// CHECK:STDOUT: !43 = !DILocation(line: 17, column: 3, scope: !28) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) -// 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.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !25) -// CHECK:STDOUT: !50 = !DILocation(line: 15, column: 3, scope: !48) +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{null, !23} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 14, column: 3, scope: !26) +// CHECK:STDOUT: !30 = !DILocation(line: 14, column: 28, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 15, column: 3, scope: !26) +// CHECK:STDOUT: !33 = !DILocation(line: 15, column: 23, scope: !26) +// CHECK:STDOUT: !35 = !DILocation(line: 16, column: 43, scope: !26) +// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 46, scope: !26) +// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 42, scope: !26) +// CHECK:STDOUT: !40 = !DILocation(line: 17, column: 10, scope: !26) +// CHECK:STDOUT: !41 = !DILocation(line: 17, column: 3, scope: !26) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Op", linkageName: "_COp.35f6012581c5aabb:core.SubobjectDestroy.Core", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !23) +// CHECK:STDOUT: !44 = !DILocation(line: 15, column: 3, scope: !42) +// CHECK:STDOUT: !45 = !{null, !20} +// CHECK:STDOUT: !46 = !DISubroutineType(types: !45) +// CHECK:STDOUT: !47 = !{!43} +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "Op", linkageName: "_COp.abce894028f59bc0:core.SubobjectDestroy.Core", scope: null, file: !18, line: 14, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !23) +// CHECK:STDOUT: !50 = !DILocation(line: 14, column: 3, scope: !48) // CHECK:STDOUT: !51 = !{!49} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35f6012581c5aabb: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.abce894028f59bc0: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: !25) -// CHECK:STDOUT: !58 = !DILocation(line: 14, column: 3, scope: !56) -// CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.abce894028f59bc0: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: 14, column: 3, scope: !60) -// CHECK:STDOUT: !63 = !{!61} +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ffbc82e0019b7bf2", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !23) +// CHECK:STDOUT: !56 = !DILocation(line: 34, column: 5, scope: !52) +// CHECK:STDOUT: !57 = !DILocation(line: 32, column: 1, scope: !52) +// CHECK:STDOUT: !58 = !{!53} +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6e65c86a129b7677", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !23) +// CHECK:STDOUT: !63 = !DILocation(line: 34, column: 5, scope: !59) +// CHECK:STDOUT: !64 = !DILocation(line: 32, column: 1, scope: !59) +// CHECK:STDOUT: !65 = !{!60} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !46, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !72) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !20) +// CHECK:STDOUT: !71 = !DILocation(line: 32, column: 1, scope: !66) +// CHECK:STDOUT: !72 = !{!67} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/operators/assignment.carbon b/toolchain/lower/testdata/operators/assignment.carbon index 3a36282494d7..157169b064af 100644 --- a/toolchain/lower/testdata/operators/assignment.carbon +++ b/toolchain/lower/testdata/operators/assignment.carbon @@ -29,68 +29,67 @@ fn G() -> (i32, i32) { // CHECK:STDOUT: @tuple.380.loc21_5 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF.Main() #0 !dbg !30 { +// CHECK:STDOUT: define i32 @_CF.Main() #0 !dbg !28 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !33 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !33 -// CHECK:STDOUT: store i32 12, ptr %a.var, align 4, !dbg !33 -// CHECK:STDOUT: store i32 9, ptr %a.var, align 4, !dbg !35 -// CHECK:STDOUT: %.loc16 = load i32, ptr %a.var, align 4, !dbg !36 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %a.var), !dbg !33 +// CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !31 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !31 +// CHECK:STDOUT: store i32 12, ptr %a.var, align 4, !dbg !31 +// CHECK:STDOUT: store i32 9, ptr %a.var, align 4, !dbg !33 +// CHECK:STDOUT: %.loc16 = load i32, ptr %a.var, align 4, !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %a.var), !dbg !31 // CHECK:STDOUT: ret i32 %.loc16, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !38 { +// CHECK:STDOUT: define void @_CG.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !38 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: %b.var = alloca { i32, i32 }, align 4, !dbg !41 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !41 +// CHECK:STDOUT: %tuple.elem0.loc21.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !44 +// CHECK:STDOUT: %tuple.elem1.loc21.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !44 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %b.var, ptr align 4 @tuple.380.loc21_5, i64 8, i1 false), !dbg !43 +// CHECK:STDOUT: %tuple.elem0.loc22_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !45 +// CHECK:STDOUT: %.loc22_10.1 = load i32, ptr %tuple.elem0.loc22_10.1.tuple.elem, align 4, !dbg !45 +// CHECK:STDOUT: %tuple.elem0.loc22_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !45 +// CHECK:STDOUT: store i32 %.loc22_10.1, ptr %tuple.elem0.loc22_10.2.tuple.elem, align 4, !dbg !45 +// CHECK:STDOUT: %tuple.elem1.loc22_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !45 +// CHECK:STDOUT: %.loc22_10.3 = load i32, ptr %tuple.elem1.loc22_10.1.tuple.elem, align 4, !dbg !45 +// CHECK:STDOUT: %tuple.elem1.loc22_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !45 +// CHECK:STDOUT: store i32 %.loc22_10.3, ptr %tuple.elem1.loc22_10.2.tuple.elem, align 4, !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %b.var), !dbg !41 +// CHECK:STDOUT: ret void, !dbg !46 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !42 { +// CHECK:STDOUT: define weak_odr void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !47 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %b.var = alloca { i32, i32 }, align 4, !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !45 -// CHECK:STDOUT: %tuple.elem0.loc21.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !48 -// CHECK:STDOUT: %tuple.elem1.loc21.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !48 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %b.var, ptr align 4 @tuple.380.loc21_5, i64 8, i1 false), !dbg !47 -// CHECK:STDOUT: %tuple.elem0.loc22_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !49 -// CHECK:STDOUT: %.loc22_10.1 = load i32, ptr %tuple.elem0.loc22_10.1.tuple.elem, align 4, !dbg !49 -// CHECK:STDOUT: %tuple.elem0.loc22_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !49 -// CHECK:STDOUT: store i32 %.loc22_10.1, ptr %tuple.elem0.loc22_10.2.tuple.elem, align 4, !dbg !49 -// CHECK:STDOUT: %tuple.elem1.loc22_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !49 -// CHECK:STDOUT: %.loc22_10.3 = load i32, ptr %tuple.elem1.loc22_10.1.tuple.elem, align 4, !dbg !49 -// CHECK:STDOUT: %tuple.elem1.loc22_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !49 -// CHECK:STDOUT: store i32 %.loc22_10.3, ptr %tuple.elem1.loc22_10.2.tuple.elem, align 4, !dbg !49 -// CHECK:STDOUT: call void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %b.var), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !50 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !53 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !53 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !55 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self), !dbg !57 -// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !49 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !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: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !51 { +// 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.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 @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %t) #0 !dbg !58 { +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %t), !dbg !62 +// CHECK:STDOUT: ret void, !dbg !63 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -100,39 +99,41 @@ fn G() -> (i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "assignment.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !26 = !{!25} +// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{!23} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = !{null, !23} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !25} -// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !33 = !DILocation(line: 14, column: 3, scope: !30) -// CHECK:STDOUT: !35 = !DILocation(line: 15, column: 3, scope: !30) -// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 10, scope: !30) -// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 3, scope: !30) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) -// 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: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 19, type: !27, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !45 = !DILocation(line: 20, column: 3, scope: !42) -// CHECK:STDOUT: !47 = !DILocation(line: 21, column: 3, scope: !42) -// CHECK:STDOUT: !48 = !DILocation(line: 21, column: 7, scope: !42) -// CHECK:STDOUT: !49 = !DILocation(line: 22, column: 10, scope: !42) -// CHECK:STDOUT: !50 = !DILocation(line: 22, column: 3, scope: !42) -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !18, line: 20, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !25) -// CHECK:STDOUT: !53 = !DILocation(line: 20, column: 3, scope: !51) -// CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35f6012581c5aabb: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: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 3, scope: !28) +// CHECK:STDOUT: !33 = !DILocation(line: 15, column: 3, scope: !28) +// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 10, scope: !28) +// CHECK:STDOUT: !35 = !{null, !20} +// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) +// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 3, scope: !28) +// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 19, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !41 = !DILocation(line: 20, column: 3, scope: !38) +// CHECK:STDOUT: !43 = !DILocation(line: 21, column: 3, scope: !38) +// CHECK:STDOUT: !44 = !DILocation(line: 21, column: 7, scope: !38) +// CHECK:STDOUT: !45 = !DILocation(line: 22, column: 10, scope: !38) +// CHECK:STDOUT: !46 = !DILocation(line: 22, column: 3, scope: !38) +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "Op", linkageName: "_COp.35f6012581c5aabb:core.SubobjectDestroy.Core", scope: null, file: !18, line: 20, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !50) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !23) +// CHECK:STDOUT: !49 = !DILocation(line: 20, column: 3, scope: !47) +// CHECK:STDOUT: !50 = !{!48} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !36, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !20) +// CHECK:STDOUT: !56 = !DILocation(line: 32, column: 1, scope: !51) +// CHECK:STDOUT: !57 = !{!52} +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ffbc82e0019b7bf2", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !64) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !23) +// CHECK:STDOUT: !62 = !DILocation(line: 34, column: 5, scope: !58) +// CHECK:STDOUT: !63 = !DILocation(line: 32, column: 1, scope: !58) +// CHECK:STDOUT: !64 = !{!59} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/operators/increment.carbon b/toolchain/lower/testdata/operators/increment.carbon index 7d21001b8e80..b5446c928b2e 100644 --- a/toolchain/lower/testdata/operators/increment.carbon +++ b/toolchain/lower/testdata/operators/increment.carbon @@ -24,49 +24,48 @@ fn IncrSigned() { // CHECK:STDOUT: source_filename = "increment.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CIncrSigned.Main() #0 !dbg !11 { +// CHECK:STDOUT: define void @_CIncrSigned.Main() #0 !dbg !9 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %from.var = alloca i32, align 4, !dbg !12 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %from.var), !dbg !12 -// CHECK:STDOUT: store i32 0, ptr %from.var, align 4, !dbg !12 -// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %from.var), !dbg !15 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %from.var), !dbg !12 +// CHECK:STDOUT: %from.var = alloca i32, align 4, !dbg !10 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %from.var), !dbg !10 +// CHECK:STDOUT: store i32 0, ptr %from.var, align 4, !dbg !10 +// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %from.var), !dbg !13 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %from.var), !dbg !10 // CHECK:STDOUT: ret void, !dbg !16 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !17 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !19 -// 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 !22 { -// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !25 -// CHECK:STDOUT: ret void, !dbg !28 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !18 { +// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !21 +// CHECK:STDOUT: ret void, !dbg !24 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !27 { +// 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.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #2 !dbg !30 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !34 -// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !34 -// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !34 -// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !34 -// CHECK:STDOUT: ret void, !dbg !34 +// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #2 !dbg !34 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !38 +// 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.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !38 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !43 -// CHECK:STDOUT: ret i32 %1, !dbg !45 +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(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 !47 { -// CHECK:STDOUT: ret i32 %self, !dbg !53 +// 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 } @@ -83,38 +82,39 @@ fn IncrSigned() { // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !{null} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !9 = !{null, !6} -// CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "IncrSigned", linkageName: "_CIncrSigned.Main", scope: null, file: !4, line: 4, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !12 = !DILocation(line: 5, column: 3, scope: !11) -// CHECK:STDOUT: !15 = !DILocation(line: 6, column: 3, scope: !11) -// CHECK:STDOUT: !16 = !DILocation(line: 4, column: 1, scope: !11) -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 5, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !20) -// 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 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !21, line: 396, type: !10, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !29) -// CHECK:STDOUT: !23 = !DILocalVariable(arg: 1, scope: !22, type: !6) -// CHECK:STDOUT: !25 = !DILocation(line: 398, column: 5, scope: !22) -// CHECK:STDOUT: !26 = !{null, !6, !6} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !DILocation(line: 396, column: 3, scope: !22) -// CHECK:STDOUT: !29 = !{!23} -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !21, line: 331, type: !27, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !37) -// CHECK:STDOUT: !31 = !DILocalVariable(arg: 1, scope: !30, type: !6) -// CHECK:STDOUT: !32 = !DILocalVariable(arg: 2, scope: !30, type: !6) -// CHECK:STDOUT: !34 = !DILocation(line: 331, column: 3, scope: !30) -// CHECK:STDOUT: !35 = !{!6, !6} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !{!31, !32} -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !21, line: 64, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !46) -// CHECK:STDOUT: !39 = !DILocalVariable(arg: 1, scope: !38, type: !6) -// CHECK:STDOUT: !43 = !DILocation(line: 66, column: 17, scope: !38) -// CHECK:STDOUT: !45 = !DILocation(line: 66, column: 5, scope: !38) -// CHECK:STDOUT: !46 = !{!39} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !21, line: 59, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !54) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !6) -// CHECK:STDOUT: !53 = !DILocation(line: 59, column: 28, scope: !47) -// CHECK:STDOUT: !54 = !{!48} +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "IncrSigned", linkageName: "_CIncrSigned.Main", scope: null, file: !4, line: 4, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !10 = !DILocation(line: 5, column: 3, scope: !9) +// CHECK:STDOUT: !13 = !DILocation(line: 6, column: 3, scope: !9) +// CHECK:STDOUT: !14 = !{null, !6} +// CHECK:STDOUT: !15 = !DISubroutineType(types: !14) +// CHECK:STDOUT: !16 = !DILocation(line: 4, column: 1, scope: !9) +// CHECK:STDOUT: !17 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !17, line: 396, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !25) +// CHECK:STDOUT: !19 = !DILocalVariable(arg: 1, scope: !18, type: !6) +// CHECK:STDOUT: !21 = !DILocation(line: 398, column: 5, scope: !18) +// CHECK:STDOUT: !22 = !{null, !6, !6} +// CHECK:STDOUT: !23 = !DISubroutineType(types: !22) +// CHECK:STDOUT: !24 = !DILocation(line: 396, column: 3, scope: !18) +// CHECK:STDOUT: !25 = !{!19} +// CHECK:STDOUT: !26 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 36, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !33) +// CHECK:STDOUT: !28 = !DILocalVariable(arg: 1, scope: !27, type: !6) +// CHECK:STDOUT: !32 = !DILocation(line: 36, column: 1, scope: !27) +// CHECK:STDOUT: !33 = !{!28} +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !17, line: 331, type: !23, 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: !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.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !17, 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: !17, 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/operators/overloaded.carbon b/toolchain/lower/testdata/operators/overloaded.carbon index a51ccce561d6..578bd795aed6 100644 --- a/toolchain/lower/testdata/operators/overloaded.carbon +++ b/toolchain/lower/testdata/operators/overloaded.carbon @@ -99,49 +99,43 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc30_10.1.temp), !dbg !48 // CHECK:STDOUT: call void @"_COp.Number.Main:Negate.Core"(ptr %.loc30_10.1.temp, ptr %a), !dbg !48 // CHECK:STDOUT: call void @"_COp.Number.Main:MulWith.124acaad20680602.Core"(ptr %return, ptr %.loc30_10.1.temp, ptr %b), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.3e6115156c640ef2:core.Destroy.Core"(ptr %.loc30_10.1.temp), !dbg !48 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7f8479fbb1a0ad0f(ptr %.loc30_10.1.temp), !dbg !48 // 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 @"_COp.4fdb30b3bf76b447:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !52 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc30_10.1.is_positive = getelementptr inbounds nuw { i1 }, ptr %self, i32 0, i32 0, !dbg !54 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %.loc30_10.1.is_positive), !dbg !54 // CHECK:STDOUT: ret void, !dbg !54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4fdb30b3bf76b447:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_COp.3e6115156c640ef2:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !56 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc30.is_positive = getelementptr inbounds nuw { i1 }, ptr %self, i32 0, i32 0, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc30.is_positive), !dbg !58 +// CHECK:STDOUT: %.loc30_10.1.is_positive = getelementptr inbounds nuw { i1 }, ptr %self, i32 0, i32 0, !dbg !58 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %.loc30_10.1.is_positive), !dbg !58 // CHECK:STDOUT: ret void, !dbg !58 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4fdb30b3bf76b447:core.Destroy.Core"(ptr %self) #0 !dbg !60 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4fdb30b3bf76b447: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.3e6115156c640ef2:core.Destroy.Core"(ptr %self) #0 !dbg !64 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc30.is_positive = getelementptr inbounds nuw { i1 }, ptr %self, i32 0, i32 0, !dbg !66 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc30.is_positive), !dbg !66 -// CHECK:STDOUT: ret void, !dbg !66 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3e6115156c640ef2:core.Destroy.Core"(ptr %self) #0 !dbg !68 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.3e6115156c640ef2: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 void @_CSelfDestruct.Core.7f8479fbb1a0ad0f(ptr %t) #0 !dbg !61 { +// CHECK:STDOUT: call void @"_COp.3e6115156c640ef2:core.SubobjectDestroy.Core"(ptr %t), !dbg !65 +// CHECK:STDOUT: ret void, !dbg !66 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %t) #0 !dbg !68 { +// CHECK:STDOUT: ret void, !dbg !73 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.29e6aa423646b61a, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -185,24 +179,22 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: !48 = !DILocation(line: 30, column: 10, scope: !40) // CHECK:STDOUT: !50 = !DILocation(line: 30, column: 3, scope: !40) // CHECK:STDOUT: !51 = !{!41, !42} -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 30, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4fdb30b3bf76b447:core.SubobjectDestroy.Core", scope: null, file: !4, line: 30, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !55) // CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !6) // CHECK:STDOUT: !54 = !DILocation(line: 30, column: 10, scope: !52) // CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4fdb30b3bf76b447:core.Destroy.Core", scope: null, file: !4, line: 30, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) +// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "Op", linkageName: "_COp.3e6115156c640ef2:core.SubobjectDestroy.Core", scope: null, file: !4, line: 30, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !59) // CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !6) // CHECK:STDOUT: !58 = !DILocation(line: 30, column: 10, scope: !56) // CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4fdb30b3bf76b447:core.Destroy.Core", scope: null, file: !4, line: 30, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) -// CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !6) -// CHECK:STDOUT: !62 = !DILocation(line: 30, column: 10, scope: !60) -// CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.3e6115156c640ef2:core.Destroy.Core", scope: null, file: !4, line: 30, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !67) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !6) -// CHECK:STDOUT: !66 = !DILocation(line: 30, column: 10, scope: !64) -// CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3e6115156c640ef2:core.Destroy.Core", scope: null, file: !4, line: 30, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !71) +// CHECK:STDOUT: !60 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.7f8479fbb1a0ad0f", scope: null, file: !60, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !67) +// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !6) +// CHECK:STDOUT: !65 = !DILocation(line: 38, column: 5, scope: !61) +// CHECK:STDOUT: !66 = !DILocation(line: 36, column: 1, scope: !61) +// CHECK:STDOUT: !67 = !{!62} +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.29e6aa423646b61a", scope: null, file: !60, line: 36, type: !12, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !74) // CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !6) -// CHECK:STDOUT: !70 = !DILocation(line: 30, column: 10, scope: !68) -// CHECK:STDOUT: !71 = !{!69} +// CHECK:STDOUT: !73 = !DILocation(line: 36, column: 1, scope: !68) +// CHECK:STDOUT: !74 = !{!69} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/packages/imported_type_completeness.carbon b/toolchain/lower/testdata/packages/imported_type_completeness.carbon index 3e891b0ce0af..325fe8b3052f 100644 --- a/toolchain/lower/testdata/packages/imported_type_completeness.carbon +++ b/toolchain/lower/testdata/packages/imported_type_completeness.carbon @@ -96,14 +96,6 @@ fn CallF() { // CHECK:STDOUT: ; ModuleID = 'require_completion_in_call.carbon' // CHECK:STDOUT: source_filename = "require_completion_in_call.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !25 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !27 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: attributes #0 = { nounwind } -// CHECK:STDOUT: // CHECK:STDOUT: !llvm.dbg.cu = !{!19} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: @@ -111,13 +103,6 @@ fn CallF() { // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !18 = !DIFile(filename: "require_completion_in_call.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// 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: !25 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !18, line: 19, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !28) -// CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !22) -// CHECK:STDOUT: !27 = !DILocation(line: 19, column: 4, scope: !25) -// CHECK:STDOUT: !28 = !{!26} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_without_completion_in_call.carbon' @@ -126,108 +111,99 @@ fn CallF() { // CHECK:STDOUT: @C.val.c84 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CI.Main() #0 !dbg !33 { +// CHECK:STDOUT: define void @_CI.Main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CG.Main.e43630e9a6c38c3f(), !dbg !34 -// CHECK:STDOUT: ret void, !dbg !35 +// CHECK:STDOUT: call void @_CG.Main.e43630e9a6c38c3f(), !dbg !27 +// CHECK:STDOUT: ret void, !dbg !28 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99: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.baa385d1167e01fa: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 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.baa385d1167e01fa:core.Destroy.Core"(ptr @C.val.c84), !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.baa385d1167e01fa:core.Destroy.Core"(ptr @C.val.c84), !dbg !50 -// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: define linkonce_odr void @_CG.Main.e43630e9a6c38c3f() #0 !dbg !29 { +// CHECK:STDOUT: %temp = alloca {}, align 1, !dbg !31 +// CHECK:STDOUT: %temp1 = alloca {}, align 1, !dbg !38 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !31 +// CHECK:STDOUT: %1 = call i123 @_CF.C.Main.e43630e9a6c38c3f(), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.00db393bc1a0014d(ptr @C.val.c84), !dbg !31 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp1), !dbg !38 +// CHECK:STDOUT: %2 = call i456 @_CG.C.Main.e43630e9a6c38c3f(), !dbg !40 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.00db393bc1a0014d(ptr @C.val.c84), !dbg !38 +// CHECK:STDOUT: ret void, !dbg !43 // 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 !56 { -// CHECK:STDOUT: ret i123 123, !dbg !59 +// CHECK:STDOUT: define linkonce_odr i123 @_CF.C.Main.e43630e9a6c38c3f() #0 !dbg !44 { +// CHECK:STDOUT: ret i123 123, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i456 @_CG.C.Main.e43630e9a6c38c3f() #0 !dbg !60 { -// CHECK:STDOUT: ret i456 456, !dbg !64 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.00db393bc1a0014d(ptr %t) #0 !dbg !48 { +// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i456 @_CG.C.Main.e43630e9a6c38c3f() #0 !dbg !55 { +// CHECK:STDOUT: ret i456 456, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.00db393bc1a0014d, { 1, 0 } // 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 = !{!30} +// CHECK:STDOUT: !llvm.dbg.cu = !{!23} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "require_completion_in_call.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 123, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIBasicType(name: "int", size: 456, encoding: DW_ATE_signed) -// 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: !29 = !DIFile(filename: "use_without_completion_in_call.carbon", directory: "") -// CHECK:STDOUT: !30 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !29, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !31 = !{null} -// CHECK:STDOUT: !32 = !DISubroutineType(types: !31) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "I", linkageName: "_CI.Main", scope: null, file: !29, line: 6, type: !32, spFlags: DISPFlagDefinition, unit: !30) -// CHECK:STDOUT: !34 = !DILocation(line: 9, column: 3, scope: !33) -// CHECK:STDOUT: !35 = !DILocation(line: 6, column: 1, scope: !33) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !18, line: 19, type: !24, spFlags: DISPFlagDefinition, unit: !30, retainedNodes: !39) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.baa385d1167e01fa: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: "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 = !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: !22 = !DIFile(filename: "use_without_completion_in_call.carbon", directory: "") +// CHECK:STDOUT: !23 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !22, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !24 = !{null} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "I", linkageName: "_CI.Main", scope: null, file: !22, line: 6, type: !25, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !27 = !DILocation(line: 9, column: 3, scope: !26) +// CHECK:STDOUT: !28 = !DILocation(line: 6, column: 1, scope: !26) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main.e43630e9a6c38c3f", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !31 = !DILocation(line: 19, column: 4, scope: !29) +// CHECK:STDOUT: !32 = !DILocation(line: 19, column: 3, scope: !29) +// CHECK:STDOUT: !33 = !{!20} +// CHECK:STDOUT: !34 = !DISubroutineType(types: !33) +// 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: !38 = !DILocation(line: 22, column: 4, scope: !29) +// CHECK:STDOUT: !40 = !DILocation(line: 22, column: 3, scope: !29) +// CHECK:STDOUT: !41 = !{!21} +// CHECK:STDOUT: !42 = !DISubroutineType(types: !41) +// CHECK:STDOUT: !43 = !DILocation(line: 16, column: 1, scope: !29) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.e43630e9a6c38c3f", scope: null, file: !18, line: 6, type: !34, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !47 = !DILocation(line: 7, column: 5, scope: !44) +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.00db393bc1a0014d", scope: null, file: !10, line: 32, type: !37, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !54) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !35) +// CHECK:STDOUT: !53 = !DILocation(line: 32, column: 1, scope: !48) +// CHECK:STDOUT: !54 = !{!49} +// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "G", linkageName: "_CG.C.Main.e43630e9a6c38c3f", scope: null, file: !18, line: 11, type: !42, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !59 = !DILocation(line: 12, column: 5, scope: !55) // 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 = !{!66} +// CHECK:STDOUT: !llvm.dbg.cu = !{!61} // 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: !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: !60 = !DIFile(filename: "require_completion_in_vtable.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: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_without_completion_in_vtable.carbon' @@ -239,10 +215,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 !71 { +// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !66 { // 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 !72 -// CHECK:STDOUT: ret void, !dbg !73 +// 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 !67 +// CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -251,68 +227,57 @@ 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 = !{!70} +// CHECK:STDOUT: !llvm.dbg.cu = !{!65} // 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: !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: !24 = !{null} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !64 = !DIFile(filename: "use_without_completion_in_vtable.carbon", directory: "") +// CHECK:STDOUT: !65 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !64, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !64, type: !25, spFlags: DISPFlagDefinition, unit: !65) +// CHECK:STDOUT: !67 = !DILocation(line: 9, column: 1, scope: !66) +// CHECK:STDOUT: !68 = !DILocation(line: 0, scope: !66) // 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 !76 { +// CHECK:STDOUT: define weak_odr void @"_COp.95528a86e1127e2d:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !71 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !78 +// CHECK:STDOUT: %.loc7_3.1.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !73 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %.loc7_3.1.vptr), !dbg !73 +// CHECK:STDOUT: ret void, !dbg !73 // 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: %.loc7.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !82 -// CHECK:STDOUT: call void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %.loc7.vptr), !dbg !82 -// CHECK:STDOUT: ret void, !dbg !82 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// 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: define linkonce_odr void @_CSelfDestruct.Core.96c9f45941b9e5e6(ptr %t) #0 !dbg !75 { +// CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!75} +// 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: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !23 = !{null, !22} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// 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: "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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") +// 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: !69 = !DIFile(filename: "require_completion_in_virtual_call.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: "Op", linkageName: "_COp.95528a86e1127e2d:core.SubobjectDestroy.Core", scope: null, file: !69, line: 7, type: !37, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !74) +// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !35) +// CHECK:STDOUT: !73 = !DILocation(line: 7, column: 3, scope: !71) +// CHECK:STDOUT: !74 = !{!72} +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.96c9f45941b9e5e6", scope: null, file: !10, line: 32, type: !37, spFlags: DISPFlagDefinition, unit: !70, retainedNodes: !81) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !35) +// CHECK:STDOUT: !80 = !DILocation(line: 32, column: 1, scope: !75) +// CHECK:STDOUT: !81 = !{!76} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_without_completion_in_virtual_call.carbon' @@ -324,94 +289,78 @@ fn CallF() { // CHECK:STDOUT: @C.val.99f.anon = internal constant { ptr } { ptr @"_CC.Main.$vtable.9522ff908e97e267" } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CCallF.Main() #0 !dbg !90 { +// CHECK:STDOUT: define void @_CCallF.Main() #0 !dbg !84 { // CHECK:STDOUT: entry: -// 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: %.loc9_9.2.temp = alloca {}, align 1, !dbg !85 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_9.2.temp), !dbg !85 +// CHECK:STDOUT: call void @_CF.Main.9522ff908e97e267(ptr @C.val.d1d.loc9_11.3), !dbg !86 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d2923b1341c6d18f(ptr @C.val.d1d), !dbg !85 +// CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !94 { +// CHECK:STDOUT: define weak_odr void @"_COp.95528a86e1127e2d:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !88 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !96 +// CHECK:STDOUT: %.1.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !90 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.65d3bc6845692cbc(ptr %.1.vptr), !dbg !90 +// CHECK:STDOUT: ret void, !dbg !90 // 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: define weak_odr void @"_COp.18d6342c4f35ccd3:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !92 { // 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.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 @"_CSubobjectDestroy.95528a86e1127e2d:core.Destroy.Core"(ptr %self) #0 !dbg !106 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.1.vptr = getelementptr inbounds nuw { ptr }, ptr %self, i32 0, i32 0, !dbg !108 -// CHECK:STDOUT: call void @"_CSelfDestruct.454fecbcedcd86e1:core.Destroy.Core"(ptr %.1.vptr), !dbg !108 -// CHECK:STDOUT: ret void, !dbg !108 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// 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.18d6342c4f35ccd3: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.18d6342c4f35ccd3:core.Destroy.Core"(ptr %self) #0 !dbg !118 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.18d6342c4f35ccd3:core.Destroy.Core"(ptr %self), !dbg !120 -// CHECK:STDOUT: ret void, !dbg !120 +// 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 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.99f.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.18d6342c4f35ccd3:core.Destroy.Core"(ptr %1), !dbg !125 -// CHECK:STDOUT: ret void, !dbg !135 +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.9522ff908e97e267(ptr %t) #0 !dbg !96 { +// CHECK:STDOUT: %1 = alloca { ptr }, align 8, !dbg !99 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %1), !dbg !99 +// CHECK:STDOUT: %vptr = getelementptr inbounds nuw { ptr }, ptr %1, i32 0, i32 0, !dbg !100 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %1, ptr align 8 @C.val.99f.anon, i64 8, i1 false), !dbg !99 +// CHECK:STDOUT: %vtable = load ptr, ptr %1, align 8, !dbg !102 +// CHECK:STDOUT: %2 = call ptr @llvm.load.relative.i32(ptr %vtable, i32 0), !dbg !102 +// CHECK:STDOUT: %3 = call i11 %2(ptr %1), !dbg !102 +// CHECK:STDOUT: %vtable1 = load ptr, ptr %1, align 8, !dbg !105 +// CHECK:STDOUT: %4 = call ptr @llvm.load.relative.i32(ptr %vtable1, i32 4), !dbg !105 +// CHECK:STDOUT: %5 = call i12 %4(ptr %1, ptr %t), !dbg !105 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f117b1909e2778d8(ptr %1), !dbg !99 +// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.d2923b1341c6d18f(ptr %t) #0 !dbg !111 { +// CHECK:STDOUT: ret void, !dbg !116 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.65d3bc6845692cbc(ptr %t) #0 !dbg !118 { +// CHECK:STDOUT: ret void, !dbg !123 // 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 !137 { -// CHECK:STDOUT: ret i11 11, !dbg !142 +// CHECK:STDOUT: define linkonce_odr i11 @_CF.C.Main.9522ff908e97e267(ptr %self) #0 !dbg !125 { +// CHECK:STDOUT: ret i11 11, !dbg !130 // 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 !144 { -// CHECK:STDOUT: ret i12 12, !dbg !151 +// CHECK:STDOUT: define linkonce_odr i12 @_CG.C.Main.9522ff908e97e267(ptr %self, ptr %t) #0 !dbg !132 { +// CHECK:STDOUT: ret i12 12, !dbg !139 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f117b1909e2778d8(ptr %t) #0 !dbg !141 { +// CHECK:STDOUT: call void @"_COp.18d6342c4f35ccd3:core.SubobjectDestroy.Core"(ptr %t), !dbg !145 +// CHECK:STDOUT: ret void, !dbg !146 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -421,73 +370,67 @@ 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 = !{!89} +// CHECK:STDOUT: !llvm.dbg.cu = !{!83} // 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: !22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !23 = !{null, !22} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !31 = !{null} -// CHECK:STDOUT: !32 = !DISubroutineType(types: !31) -// 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: "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: 7, column: 3, scope: !102) -// CHECK:STDOUT: !105 = !{!103} -// 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: 7, column: 3, scope: !106) -// CHECK:STDOUT: !109 = !{!107} -// 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.18d6342c4f35ccd3: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.18d6342c4f35ccd3: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: "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: !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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") +// CHECK:STDOUT: !24 = !{null} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// 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: !60 = !DIFile(filename: "require_completion_in_vtable.carbon", directory: "") +// CHECK:STDOUT: !62 = !DIBasicType(name: "int", size: 11, encoding: DW_ATE_signed) +// CHECK:STDOUT: !63 = !DIBasicType(name: "int", size: 12, encoding: DW_ATE_signed) +// CHECK:STDOUT: !69 = !DIFile(filename: "require_completion_in_virtual_call.carbon", directory: "") +// CHECK:STDOUT: !82 = !DIFile(filename: "use_without_completion_in_virtual_call.carbon", directory: "") +// CHECK:STDOUT: !83 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !82, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !84 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main", scope: null, file: !82, line: 8, type: !25, spFlags: DISPFlagDefinition, unit: !83) +// CHECK:STDOUT: !85 = !DILocation(line: 9, column: 8, scope: !84) +// CHECK:STDOUT: !86 = !DILocation(line: 9, column: 3, scope: !84) +// CHECK:STDOUT: !87 = !DILocation(line: 8, column: 1, scope: !84) +// CHECK:STDOUT: !88 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95528a86e1127e2d:core.SubobjectDestroy.Core", scope: null, file: !69, line: 7, type: !37, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !91) +// CHECK:STDOUT: !89 = !DILocalVariable(arg: 1, scope: !88, type: !35) +// CHECK:STDOUT: !90 = !DILocation(line: 7, column: 3, scope: !88) +// CHECK:STDOUT: !91 = !{!89} +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "Op", linkageName: "_COp.18d6342c4f35ccd3:core.SubobjectDestroy.Core", scope: null, file: !69, line: 7, type: !37, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !95) +// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !35) +// CHECK:STDOUT: !94 = !DILocation(line: 7, column: 3, scope: !92) +// CHECK:STDOUT: !95 = !{!93} +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.9522ff908e97e267", scope: null, file: !69, line: 6, type: !37, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !110) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !35) +// CHECK:STDOUT: !99 = !DILocation(line: 7, column: 3, scope: !96) +// CHECK:STDOUT: !100 = !DILocation(line: 7, column: 17, scope: !96) +// CHECK:STDOUT: !102 = !DILocation(line: 8, column: 3, scope: !96) +// CHECK:STDOUT: !103 = !{!62, !35} +// CHECK:STDOUT: !104 = !DISubroutineType(types: !103) +// CHECK:STDOUT: !105 = !DILocation(line: 9, column: 3, scope: !96) +// CHECK:STDOUT: !107 = !{!63, !35, !35} +// CHECK:STDOUT: !108 = !DISubroutineType(types: !107) +// CHECK:STDOUT: !109 = !DILocation(line: 6, column: 1, scope: !96) +// CHECK:STDOUT: !110 = !{!97} +// CHECK:STDOUT: !111 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.d2923b1341c6d18f", scope: null, file: !10, line: 32, type: !37, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !117) +// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !35) +// CHECK:STDOUT: !116 = !DILocation(line: 32, column: 1, scope: !111) +// CHECK:STDOUT: !117 = !{!112} +// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.65d3bc6845692cbc", scope: null, file: !10, line: 32, type: !37, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !124) +// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !35) +// CHECK:STDOUT: !123 = !DILocation(line: 32, column: 1, scope: !118) +// CHECK:STDOUT: !124 = !{!119} +// CHECK:STDOUT: !125 = distinct !DISubprogram(name: "F", linkageName: "_CF.C.Main.9522ff908e97e267", scope: null, file: !60, line: 6, type: !104, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !131) +// CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !35) +// CHECK:STDOUT: !130 = !DILocation(line: 6, column: 47, scope: !125) +// CHECK:STDOUT: !131 = !{!126} +// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "G", linkageName: "_CG.C.Main.9522ff908e97e267", scope: null, file: !60, line: 7, type: !108, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !140) +// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !35) +// CHECK:STDOUT: !134 = !DILocalVariable(arg: 2, scope: !132, type: !35) +// CHECK:STDOUT: !139 = !DILocation(line: 7, column: 60, scope: !132) +// CHECK:STDOUT: !140 = !{!133, !134} +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f117b1909e2778d8", scope: null, file: !10, line: 32, type: !37, spFlags: DISPFlagDefinition, unit: !83, retainedNodes: !147) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !35) +// CHECK:STDOUT: !145 = !DILocation(line: 34, column: 5, scope: !141) +// CHECK:STDOUT: !146 = !DILocation(line: 32, column: 1, scope: !141) +// CHECK:STDOUT: !147 = !{!142} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/packages/separate_compilation_witness.carbon b/toolchain/lower/testdata/packages/separate_compilation_witness.carbon index 0271a8a0cc03..9fa83deb2659 100644 --- a/toolchain/lower/testdata/packages/separate_compilation_witness.carbon +++ b/toolchain/lower/testdata/packages/separate_compilation_witness.carbon @@ -177,14 +177,14 @@ fn CallGeneric() { // CHECK:STDOUT: source_filename = "owner.impl.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CDirectInImplFile.OwningPackage(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !42 { +// CHECK:STDOUT: define void @_CDirectInImplFile.OwningPackage(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !40 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc5_18.1.temp = alloca { i32 }, align 4, !dbg !50 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc5_18.1.temp), !dbg !50 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %.loc5_18.1.temp, ptr %v2, i32 2), !dbg !50 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %.loc5_18.1.temp), !dbg !49 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc5_18.1.temp), !dbg !50 -// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: %.loc5_18.1.temp = alloca { i32 }, align 4, !dbg !48 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc5_18.1.temp), !dbg !48 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %.loc5_18.1.temp, ptr %v2, i32 2), !dbg !48 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %.loc5_18.1.temp), !dbg !47 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc5_18.1.temp), !dbg !48 +// CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr sret({ i32 }), ptr, i32) @@ -192,44 +192,38 @@ 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define weak_odr void @"_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !51 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: %.loc5_18.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !53 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc5_18.1.x), !dbg !53 +// CHECK:STDOUT: ret void, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define weak_odr void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc5.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !59 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc5.x), !dbg !59 +// CHECK:STDOUT: %.loc5_18.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !59 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc5_18.1.x), !dbg !59 // CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !61 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.991ec6fea7332ad5: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.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !65 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc5.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !67 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc5.x), !dbg !67 -// CHECK:STDOUT: ret void, !dbg !67 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !69 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7: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: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %t) #0 !dbg !62 { +// CHECK:STDOUT: call void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %t), !dbg !66 +// CHECK:STDOUT: ret void, !dbg !67 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !69 { +// CHECK:STDOUT: ret void, !dbg !74 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -244,51 +238,49 @@ fn CallGeneric() { // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) // CHECK:STDOUT: !36 = !DIFile(filename: "owner.impl.carbon", directory: "") // CHECK:STDOUT: !37 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !36, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !38 = !{null, !6} +// CHECK:STDOUT: !38 = !{null, !7} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !7} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "DirectInImplFile", linkageName: "_CDirectInImplFile.OwningPackage", scope: null, file: !36, line: 3, type: !9, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !52) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !7) -// CHECK:STDOUT: !44 = !DILocalVariable(arg: 2, scope: !42, type: !7) -// CHECK:STDOUT: !49 = !DILocation(line: 5, column: 10, scope: !42) -// CHECK:STDOUT: !50 = !DILocation(line: 5, column: 15, scope: !42) -// CHECK:STDOUT: !51 = !DILocation(line: 5, column: 3, scope: !42) -// CHECK:STDOUT: !52 = !{!43, !44} -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !36, line: 5, type: !39, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !56) -// 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.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !36, line: 5, type: !41, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !60) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "DirectInImplFile", linkageName: "_CDirectInImplFile.OwningPackage", scope: null, file: !36, line: 3, type: !9, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !50) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !7) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 2, scope: !40, type: !7) +// CHECK:STDOUT: !47 = !DILocation(line: 5, column: 10, scope: !40) +// CHECK:STDOUT: !48 = !DILocation(line: 5, column: 15, scope: !40) +// CHECK:STDOUT: !49 = !DILocation(line: 5, column: 3, scope: !40) +// CHECK:STDOUT: !50 = !{!41, !42} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Op", linkageName: "_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core", scope: null, file: !36, line: 5, type: !39, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !56) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !7) +// CHECK:STDOUT: !53 = !DILocation(line: 5, column: 15, scope: !51) +// CHECK:STDOUT: !54 = !{null, !6} +// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) +// CHECK:STDOUT: !56 = !{!52} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core", scope: null, file: !36, line: 5, type: !39, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !60) // CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !7) // CHECK:STDOUT: !59 = !DILocation(line: 5, column: 15, scope: !57) // CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.991ec6fea7332ad5: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.d9636b4f2fbd64a7: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.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: !61 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.7e1cc1683e7a3817", scope: null, file: !61, line: 36, type: !39, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !68) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !7) +// CHECK:STDOUT: !66 = !DILocation(line: 38, column: 5, scope: !62) +// CHECK:STDOUT: !67 = !DILocation(line: 36, column: 1, scope: !62) +// CHECK:STDOUT: !68 = !{!63} +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !61, line: 36, type: !55, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !75) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !6) +// CHECK:STDOUT: !74 = !DILocation(line: 36, column: 1, scope: !69) +// CHECK:STDOUT: !75 = !{!70} // 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 !75 { +// CHECK:STDOUT: define void @_CDirect.OwningPackage(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_18.1.temp = alloca { i32 }, align 4, !dbg !83 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_18.1.temp), !dbg !83 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %.loc7_18.1.temp, ptr %v2, i32 2), !dbg !83 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %.loc7_18.1.temp), !dbg !82 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_18.1.temp), !dbg !83 -// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: %.loc7_18.1.temp = alloca { i32 }, align 4, !dbg !86 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_18.1.temp), !dbg !86 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %.loc7_18.1.temp, ptr %v2, i32 2), !dbg !86 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %.loc7_18.1.temp), !dbg !85 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc7_18.1.temp), !dbg !86 +// CHECK:STDOUT: ret void, !dbg !87 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr sret({ i32 }), ptr, i32) @@ -296,48 +288,42 @@ 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !86 { +// CHECK:STDOUT: define weak_odr void @"_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !89 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !88 +// CHECK:STDOUT: %.loc7_18.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !91 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_18.1.x), !dbg !91 +// CHECK:STDOUT: ret void, !dbg !91 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !90 { +// CHECK:STDOUT: define weak_odr void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !93 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !92 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.x), !dbg !92 -// CHECK:STDOUT: ret void, !dbg !92 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !94 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.991ec6fea7332ad5: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 weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !98 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !100 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.x), !dbg !100 -// CHECK:STDOUT: ret void, !dbg !100 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !102 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !104 -// CHECK:STDOUT: ret void, !dbg !104 +// CHECK:STDOUT: %.loc7_18.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !95 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_18.1.x), !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.lifetime.start.p0(ptr captures(none)) #1 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %t) #0 !dbg !97 { +// CHECK:STDOUT: call void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %t), !dbg !101 +// CHECK:STDOUT: ret void, !dbg !102 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !104 { +// CHECK:STDOUT: ret void, !dbg !109 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// 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 = !{!74} +// CHECK:STDOUT: !llvm.dbg.cu = !{!77} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -346,39 +332,37 @@ fn CallGeneric() { // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !{!7, !7, !7} // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !38 = !{null, !6} +// CHECK:STDOUT: !38 = !{null, !7} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !7} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !73 = !DIFile(filename: "direct_same_package.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: "Direct", linkageName: "_CDirect.OwningPackage", scope: null, file: !73, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !74, retainedNodes: !85) -// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !7) -// CHECK:STDOUT: !77 = !DILocalVariable(arg: 2, scope: !75, type: !7) -// CHECK:STDOUT: !82 = !DILocation(line: 7, column: 10, scope: !75) -// CHECK:STDOUT: !83 = !DILocation(line: 7, column: 15, scope: !75) -// CHECK:STDOUT: !84 = !DILocation(line: 7, column: 3, scope: !75) -// CHECK:STDOUT: !85 = !{!76, !77} -// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !73, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !74, retainedNodes: !89) -// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !6) -// CHECK:STDOUT: !88 = !DILocation(line: 7, column: 15, scope: !86) -// CHECK:STDOUT: !89 = !{!87} -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !73, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !74, retainedNodes: !93) -// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !7) -// CHECK:STDOUT: !92 = !DILocation(line: 7, column: 15, scope: !90) -// CHECK:STDOUT: !93 = !{!91} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !73, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !74, retainedNodes: !97) -// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !7) -// CHECK:STDOUT: !96 = !DILocation(line: 7, column: 15, scope: !94) -// CHECK:STDOUT: !97 = !{!95} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !73, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !74, 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.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !73, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !74, 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: !54 = !{null, !6} +// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) +// CHECK:STDOUT: !61 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !76 = !DIFile(filename: "direct_same_package.carbon", directory: "") +// CHECK:STDOUT: !77 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !76, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "Direct", linkageName: "_CDirect.OwningPackage", scope: null, file: !76, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !88) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !7) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 2, scope: !78, type: !7) +// CHECK:STDOUT: !85 = !DILocation(line: 7, column: 10, scope: !78) +// CHECK:STDOUT: !86 = !DILocation(line: 7, column: 15, scope: !78) +// CHECK:STDOUT: !87 = !DILocation(line: 7, column: 3, scope: !78) +// CHECK:STDOUT: !88 = !{!79, !80} +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "Op", linkageName: "_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core", scope: null, file: !76, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !92) +// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !7) +// CHECK:STDOUT: !91 = !DILocation(line: 7, column: 15, scope: !89) +// CHECK:STDOUT: !92 = !{!90} +// CHECK:STDOUT: !93 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core", scope: null, file: !76, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !96) +// CHECK:STDOUT: !94 = !DILocalVariable(arg: 1, scope: !93, type: !7) +// CHECK:STDOUT: !95 = !DILocation(line: 7, column: 15, scope: !93) +// CHECK:STDOUT: !96 = !{!94} +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.7e1cc1683e7a3817", scope: null, file: !61, line: 36, type: !39, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !103) +// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !7) +// CHECK:STDOUT: !101 = !DILocation(line: 38, column: 5, scope: !97) +// CHECK:STDOUT: !102 = !DILocation(line: 36, column: 1, scope: !97) +// CHECK:STDOUT: !103 = !{!98} +// CHECK:STDOUT: !104 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !61, line: 36, type: !55, spFlags: DISPFlagDefinition, unit: !77, retainedNodes: !110) +// CHECK:STDOUT: !105 = !DILocalVariable(arg: 1, scope: !104, type: !6) +// CHECK:STDOUT: !109 = !DILocation(line: 36, column: 1, scope: !104) +// CHECK:STDOUT: !110 = !{!105} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_same_package.carbon' @@ -389,78 +373,59 @@ 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !110 { +// CHECK:STDOUT: define weak_odr void @"_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !115 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !112 +// CHECK:STDOUT: %.loc6_18.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !117 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_18.1.x), !dbg !117 +// CHECK:STDOUT: ret void, !dbg !117 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !114 { +// CHECK:STDOUT: define weak_odr void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !119 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !116 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc6.x), !dbg !116 -// CHECK:STDOUT: ret void, !dbg !116 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !118 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.991ec6fea7332ad5: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.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !122 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !124 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc6.x), !dbg !124 -// CHECK:STDOUT: ret void, !dbg !124 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !126 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !128 -// CHECK:STDOUT: ret void, !dbg !128 +// CHECK:STDOUT: %.loc6_18.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !121 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_18.1.x), !dbg !121 +// CHECK:STDOUT: ret void, !dbg !121 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMake.OwningPackage(ptr sret({ i32 })) // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !123 { +// CHECK:STDOUT: ret void, !dbg !128 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!107} +// CHECK:STDOUT: !llvm.dbg.cu = !{!112} // 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: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{null, !6} +// CHECK:STDOUT: !38 = !{null, !7} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !7} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !106 = !DIFile(filename: "generic_same_package.carbon", directory: "") -// CHECK:STDOUT: !107 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !106, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !106, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !107, retainedNodes: !113) -// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !6) -// CHECK:STDOUT: !112 = !DILocation(line: 6, column: 15, scope: !110) -// CHECK:STDOUT: !113 = !{!111} -// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !106, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !107, retainedNodes: !117) -// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !7) -// CHECK:STDOUT: !116 = !DILocation(line: 6, column: 15, scope: !114) -// CHECK:STDOUT: !117 = !{!115} -// CHECK:STDOUT: !118 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !106, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !107, retainedNodes: !121) -// CHECK:STDOUT: !119 = !DILocalVariable(arg: 1, scope: !118, type: !7) -// CHECK:STDOUT: !120 = !DILocation(line: 6, column: 15, scope: !118) -// CHECK:STDOUT: !121 = !{!119} -// CHECK:STDOUT: !122 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !106, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !107, retainedNodes: !125) -// CHECK:STDOUT: !123 = !DILocalVariable(arg: 1, scope: !122, type: !7) -// CHECK:STDOUT: !124 = !DILocation(line: 6, column: 15, scope: !122) -// CHECK:STDOUT: !125 = !{!123} -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !106, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !107, 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: !54 = !{null, !6} +// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) +// CHECK:STDOUT: !61 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !111 = !DIFile(filename: "generic_same_package.carbon", directory: "") +// CHECK:STDOUT: !112 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !111, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "Op", linkageName: "_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core", scope: null, file: !111, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !118) +// CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !7) +// CHECK:STDOUT: !117 = !DILocation(line: 6, column: 15, scope: !115) +// CHECK:STDOUT: !118 = !{!116} +// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core", scope: null, file: !111, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !122) +// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !7) +// CHECK:STDOUT: !121 = !DILocation(line: 6, column: 15, scope: !119) +// CHECK:STDOUT: !122 = !{!120} +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !61, line: 36, type: !55, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !129) +// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !6) +// CHECK:STDOUT: !128 = !DILocation(line: 36, column: 1, scope: !123) +// CHECK:STDOUT: !129 = !{!124} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'indirect_same_package.carbon' @@ -478,61 +443,52 @@ fn CallGeneric() { // CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_28.1.temp), !dbg !136 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_29.2.temp), !dbg !137 // CHECK:STDOUT: call void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr %.loc7_29.2.temp, ptr %.loc7_20.1.temp, ptr %.loc7_28.1.temp), !dbg !137 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_29.2.temp), !dbg !137 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_28.1.temp), !dbg !136 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_20.1.temp), !dbg !135 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc7_29.2.temp), !dbg !137 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc7_28.1.temp), !dbg !136 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc7_20.1.temp), !dbg !135 // CHECK:STDOUT: ret void, !dbg !138 // 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !139 { +// CHECK:STDOUT: define weak_odr void @"_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !139 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc7_29.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !141 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_29.1.x), !dbg !141 // CHECK:STDOUT: ret void, !dbg !141 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !143 { +// CHECK:STDOUT: define weak_odr void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !143 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !145 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.x), !dbg !145 +// CHECK:STDOUT: %.loc7_29.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !145 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_29.1.x), !dbg !145 // CHECK:STDOUT: ret void, !dbg !145 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !147 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.991ec6fea7332ad5: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 @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !151 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !153 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.x), !dbg !153 -// CHECK:STDOUT: ret void, !dbg !153 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !155 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !157 -// 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)) #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 !159 { -// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !167 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !167 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %temp, ptr %v2, i32 2), !dbg !167 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !166 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %temp), !dbg !167 -// CHECK:STDOUT: ret void, !dbg !168 +// CHECK:STDOUT: define linkonce_odr void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !147 { +// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !155 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !155 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %temp, ptr %v2, i32 2), !dbg !155 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !154 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %temp), !dbg !155 +// CHECK:STDOUT: ret void, !dbg !156 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %t) #0 !dbg !158 { +// CHECK:STDOUT: call void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %t), !dbg !162 +// CHECK:STDOUT: ret void, !dbg !163 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !165 { +// CHECK:STDOUT: ret void, !dbg !170 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr sret({ i32 }), ptr, i32) @@ -541,8 +497,9 @@ fn CallGeneric() { // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_CMake.OwningPackage, { 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", { 0, 3, 2, 1 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 3, 2, 1 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.7e1cc1683e7a3817, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -556,11 +513,12 @@ fn CallGeneric() { // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !{!7, !7, !7} // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !38 = !{null, !6} +// CHECK:STDOUT: !38 = !{null, !7} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !7} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !106 = !DIFile(filename: "generic_same_package.carbon", directory: "") +// CHECK:STDOUT: !54 = !{null, !6} +// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) +// CHECK:STDOUT: !61 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !111 = !DIFile(filename: "generic_same_package.carbon", directory: "") // CHECK:STDOUT: !130 = !DIFile(filename: "indirect_same_package.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 = !{null} @@ -570,47 +528,44 @@ fn CallGeneric() { // CHECK:STDOUT: !136 = !DILocation(line: 7, column: 23, scope: !134) // CHECK:STDOUT: !137 = !DILocation(line: 7, column: 3, scope: !134) // CHECK:STDOUT: !138 = !DILocation(line: 5, column: 1, scope: !134) -// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !130, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !142) -// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !6) +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "Op", linkageName: "_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core", scope: null, file: !130, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !142) +// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !7) // CHECK:STDOUT: !141 = !DILocation(line: 7, column: 3, scope: !139) // CHECK:STDOUT: !142 = !{!140} -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !130, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !146) +// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core", scope: null, file: !130, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !146) // CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !7) // CHECK:STDOUT: !145 = !DILocation(line: 7, column: 3, scope: !143) // CHECK:STDOUT: !146 = !{!144} -// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !130, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !150) +// CHECK:STDOUT: !147 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !111, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !157) // CHECK:STDOUT: !148 = !DILocalVariable(arg: 1, scope: !147, type: !7) -// CHECK:STDOUT: !149 = !DILocation(line: 7, column: 3, scope: !147) -// CHECK:STDOUT: !150 = !{!148} -// CHECK:STDOUT: !151 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !130, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !154) -// CHECK:STDOUT: !152 = !DILocalVariable(arg: 1, scope: !151, type: !7) -// CHECK:STDOUT: !153 = !DILocation(line: 7, column: 3, scope: !151) -// CHECK:STDOUT: !154 = !{!152} -// CHECK:STDOUT: !155 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !130, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !158) -// CHECK:STDOUT: !156 = !DILocalVariable(arg: 1, scope: !155, type: !7) -// CHECK:STDOUT: !157 = !DILocation(line: 7, column: 3, scope: !155) -// CHECK:STDOUT: !158 = !{!156} -// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !106, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !169) -// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !7) -// CHECK:STDOUT: !161 = !DILocalVariable(arg: 2, scope: !159, type: !7) -// CHECK:STDOUT: !166 = !DILocation(line: 6, column: 10, scope: !159) -// CHECK:STDOUT: !167 = !DILocation(line: 6, column: 15, scope: !159) -// CHECK:STDOUT: !168 = !DILocation(line: 6, column: 3, scope: !159) -// CHECK:STDOUT: !169 = !{!160, !161} +// CHECK:STDOUT: !149 = !DILocalVariable(arg: 2, scope: !147, type: !7) +// CHECK:STDOUT: !154 = !DILocation(line: 6, column: 10, scope: !147) +// CHECK:STDOUT: !155 = !DILocation(line: 6, column: 15, scope: !147) +// CHECK:STDOUT: !156 = !DILocation(line: 6, column: 3, scope: !147) +// CHECK:STDOUT: !157 = !{!148, !149} +// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.7e1cc1683e7a3817", scope: null, file: !61, line: 36, type: !39, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !164) +// CHECK:STDOUT: !159 = !DILocalVariable(arg: 1, scope: !158, type: !7) +// CHECK:STDOUT: !162 = !DILocation(line: 38, column: 5, scope: !158) +// CHECK:STDOUT: !163 = !DILocation(line: 36, column: 1, scope: !158) +// CHECK:STDOUT: !164 = !{!159} +// CHECK:STDOUT: !165 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !61, line: 36, type: !55, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !171) +// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !6) +// CHECK:STDOUT: !170 = !DILocation(line: 36, column: 1, scope: !165) +// CHECK:STDOUT: !171 = !{!166} // 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 !172 { +// CHECK:STDOUT: define void @_CDirect.OtherPackage(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !174 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_18.1.temp = alloca { i32 }, align 4, !dbg !180 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_18.1.temp), !dbg !180 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %.loc7_18.1.temp, ptr %v2, i32 2), !dbg !180 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %.loc7_18.1.temp), !dbg !179 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_18.1.temp), !dbg !180 -// CHECK:STDOUT: ret void, !dbg !181 +// CHECK:STDOUT: %.loc7_18.1.temp = alloca { i32 }, align 4, !dbg !182 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_18.1.temp), !dbg !182 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %.loc7_18.1.temp, ptr %v2, i32 2), !dbg !182 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %.loc7_18.1.temp), !dbg !181 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc7_18.1.temp), !dbg !182 +// CHECK:STDOUT: ret void, !dbg !183 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr sret({ i32 }), ptr, i32) @@ -618,48 +573,42 @@ 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !183 { +// CHECK:STDOUT: define weak_odr void @"_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !185 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !185 +// CHECK:STDOUT: %.loc7_18.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !187 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_18.1.x), !dbg !187 +// CHECK:STDOUT: ret void, !dbg !187 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !187 { +// CHECK:STDOUT: define weak_odr void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !189 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !189 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.x), !dbg !189 -// CHECK:STDOUT: ret void, !dbg !189 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !191 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core"(ptr %self), !dbg !193 -// CHECK:STDOUT: ret void, !dbg !193 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !195 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !197 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.x), !dbg !197 -// CHECK:STDOUT: ret void, !dbg !197 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !199 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !201 -// CHECK:STDOUT: ret void, !dbg !201 +// CHECK:STDOUT: %.loc7_18.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !191 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_18.1.x), !dbg !191 +// CHECK:STDOUT: ret void, !dbg !191 // 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 @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %t) #0 !dbg !193 { +// CHECK:STDOUT: call void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %t), !dbg !197 +// CHECK:STDOUT: ret void, !dbg !198 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !200 { +// CHECK:STDOUT: ret void, !dbg !205 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// 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 = !{!171} +// CHECK:STDOUT: !llvm.dbg.cu = !{!173} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -668,111 +617,100 @@ fn CallGeneric() { // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !{!7, !7, !7} // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !38 = !{null, !6} +// CHECK:STDOUT: !38 = !{null, !7} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !7} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !170 = !DIFile(filename: "direct_different_package.carbon", directory: "") -// CHECK:STDOUT: !171 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !170, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "Direct", linkageName: "_CDirect.OtherPackage", scope: null, file: !170, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !171, retainedNodes: !182) -// CHECK:STDOUT: !173 = !DILocalVariable(arg: 1, scope: !172, type: !7) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 2, scope: !172, type: !7) -// CHECK:STDOUT: !179 = !DILocation(line: 7, column: 10, scope: !172) -// CHECK:STDOUT: !180 = !DILocation(line: 7, column: 15, scope: !172) -// CHECK:STDOUT: !181 = !DILocation(line: 7, column: 3, scope: !172) -// CHECK:STDOUT: !182 = !{!173, !174} -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !170, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !171, retainedNodes: !186) -// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !6) -// CHECK:STDOUT: !185 = !DILocation(line: 7, column: 15, scope: !183) -// CHECK:STDOUT: !186 = !{!184} -// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !170, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !171, retainedNodes: !190) -// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !7) -// CHECK:STDOUT: !189 = !DILocation(line: 7, column: 15, scope: !187) -// CHECK:STDOUT: !190 = !{!188} -// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !170, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !171, retainedNodes: !194) -// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !7) -// CHECK:STDOUT: !193 = !DILocation(line: 7, column: 15, scope: !191) -// CHECK:STDOUT: !194 = !{!192} -// CHECK:STDOUT: !195 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !170, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !171, retainedNodes: !198) -// CHECK:STDOUT: !196 = !DILocalVariable(arg: 1, scope: !195, type: !7) -// CHECK:STDOUT: !197 = !DILocation(line: 7, column: 15, scope: !195) -// CHECK:STDOUT: !198 = !{!196} -// CHECK:STDOUT: !199 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !170, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !171, retainedNodes: !202) -// CHECK:STDOUT: !200 = !DILocalVariable(arg: 1, scope: !199, type: !7) -// CHECK:STDOUT: !201 = !DILocation(line: 7, column: 15, scope: !199) -// CHECK:STDOUT: !202 = !{!200} +// CHECK:STDOUT: !54 = !{null, !6} +// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) +// CHECK:STDOUT: !61 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !172 = !DIFile(filename: "direct_different_package.carbon", directory: "") +// CHECK:STDOUT: !173 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !172, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !174 = distinct !DISubprogram(name: "Direct", linkageName: "_CDirect.OtherPackage", scope: null, file: !172, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !173, retainedNodes: !184) +// CHECK:STDOUT: !175 = !DILocalVariable(arg: 1, scope: !174, type: !7) +// CHECK:STDOUT: !176 = !DILocalVariable(arg: 2, scope: !174, type: !7) +// CHECK:STDOUT: !181 = !DILocation(line: 7, column: 10, scope: !174) +// CHECK:STDOUT: !182 = !DILocation(line: 7, column: 15, scope: !174) +// CHECK:STDOUT: !183 = !DILocation(line: 7, column: 3, scope: !174) +// CHECK:STDOUT: !184 = !{!175, !176} +// CHECK:STDOUT: !185 = distinct !DISubprogram(name: "Op", linkageName: "_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core", scope: null, file: !172, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !173, retainedNodes: !188) +// CHECK:STDOUT: !186 = !DILocalVariable(arg: 1, scope: !185, type: !7) +// CHECK:STDOUT: !187 = !DILocation(line: 7, column: 15, scope: !185) +// CHECK:STDOUT: !188 = !{!186} +// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core", scope: null, file: !172, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !173, retainedNodes: !192) +// CHECK:STDOUT: !190 = !DILocalVariable(arg: 1, scope: !189, type: !7) +// CHECK:STDOUT: !191 = !DILocation(line: 7, column: 15, scope: !189) +// CHECK:STDOUT: !192 = !{!190} +// CHECK:STDOUT: !193 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.7e1cc1683e7a3817", scope: null, file: !61, line: 36, type: !39, spFlags: DISPFlagDefinition, unit: !173, retainedNodes: !199) +// CHECK:STDOUT: !194 = !DILocalVariable(arg: 1, scope: !193, type: !7) +// CHECK:STDOUT: !197 = !DILocation(line: 38, column: 5, scope: !193) +// CHECK:STDOUT: !198 = !DILocation(line: 36, column: 1, scope: !193) +// CHECK:STDOUT: !199 = !{!194} +// CHECK:STDOUT: !200 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !61, line: 36, type: !55, spFlags: DISPFlagDefinition, unit: !173, retainedNodes: !206) +// CHECK:STDOUT: !201 = !DILocalVariable(arg: 1, scope: !200, type: !6) +// CHECK:STDOUT: !205 = !DILocation(line: 36, column: 1, scope: !200) +// CHECK:STDOUT: !206 = !{!201} // 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 !205 { +// CHECK:STDOUT: define void @_CCallGenericInOwningPackage.OtherPackage() #0 !dbg !209 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_48.1.temp = alloca { i32 }, align 4, !dbg !206 -// CHECK:STDOUT: %.loc7_70.1.temp = alloca { i32 }, align 4, !dbg !207 -// CHECK:STDOUT: %.loc7_71.2.temp = alloca { i32 }, align 4, !dbg !208 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_48.1.temp), !dbg !206 -// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_48.1.temp), !dbg !206 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_70.1.temp), !dbg !207 -// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_70.1.temp), !dbg !207 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_71.2.temp), !dbg !208 -// CHECK:STDOUT: call void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr %.loc7_71.2.temp, ptr %.loc7_48.1.temp, ptr %.loc7_70.1.temp), !dbg !208 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_71.2.temp), !dbg !208 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_70.1.temp), !dbg !207 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_48.1.temp), !dbg !206 -// CHECK:STDOUT: ret void, !dbg !209 +// CHECK:STDOUT: %.loc7_48.1.temp = alloca { i32 }, align 4, !dbg !210 +// CHECK:STDOUT: %.loc7_70.1.temp = alloca { i32 }, align 4, !dbg !211 +// CHECK:STDOUT: %.loc7_71.2.temp = alloca { i32 }, align 4, !dbg !212 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_48.1.temp), !dbg !210 +// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_48.1.temp), !dbg !210 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_70.1.temp), !dbg !211 +// CHECK:STDOUT: call void @_CMake.OwningPackage(ptr %.loc7_70.1.temp), !dbg !211 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_71.2.temp), !dbg !212 +// CHECK:STDOUT: call void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr %.loc7_71.2.temp, ptr %.loc7_48.1.temp, ptr %.loc7_70.1.temp), !dbg !212 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc7_71.2.temp), !dbg !212 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc7_70.1.temp), !dbg !211 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc7_48.1.temp), !dbg !210 +// CHECK:STDOUT: ret void, !dbg !213 // 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !210 { +// CHECK:STDOUT: define weak_odr void @"_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !214 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !212 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !214 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !216 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.x), !dbg !216 +// CHECK:STDOUT: %.loc7_71.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !216 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_71.1.x), !dbg !216 // CHECK:STDOUT: ret void, !dbg !216 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !218 { +// CHECK:STDOUT: define weak_odr void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !218 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core"(ptr %self), !dbg !220 +// CHECK:STDOUT: %.loc7_71.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !220 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_71.1.x), !dbg !220 // CHECK:STDOUT: ret void, !dbg !220 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !222 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !224 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.x), !dbg !224 -// CHECK:STDOUT: ret void, !dbg !224 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !226 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !228 -// CHECK:STDOUT: ret void, !dbg !228 -// 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 !230 { -// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !238 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !238 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %temp, ptr %v2, i32 2), !dbg !238 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !237 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %temp), !dbg !238 -// CHECK:STDOUT: ret void, !dbg !239 +// CHECK:STDOUT: define linkonce_odr void @_CGeneric.OwningPackage.e43630e9a6c38c3f(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !222 { +// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !230 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !230 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %temp, ptr %v2, i32 2), !dbg !230 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !229 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %temp), !dbg !230 +// CHECK:STDOUT: ret void, !dbg !231 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %t) #0 !dbg !233 { +// CHECK:STDOUT: call void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %t), !dbg !237 +// CHECK:STDOUT: ret void, !dbg !238 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !240 { +// CHECK:STDOUT: ret void, !dbg !245 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr sret({ i32 }), ptr, i32) @@ -781,13 +719,14 @@ fn CallGeneric() { // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_CMake.OwningPackage, { 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", { 0, 3, 2, 1 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 3, 2, 1 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.7e1cc1683e7a3817, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // 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 = !{!204} +// CHECK:STDOUT: !llvm.dbg.cu = !{!208} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -796,47 +735,45 @@ fn CallGeneric() { // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !{!7, !7, !7} // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !38 = !{null, !6} +// CHECK:STDOUT: !38 = !{null, !7} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !7} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !106 = !DIFile(filename: "generic_same_package.carbon", directory: "") +// CHECK:STDOUT: !54 = !{null, !6} +// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) +// CHECK:STDOUT: !61 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !111 = !DIFile(filename: "generic_same_package.carbon", directory: "") // CHECK:STDOUT: !132 = !{null} // CHECK:STDOUT: !133 = !DISubroutineType(types: !132) -// CHECK:STDOUT: !203 = !DIFile(filename: "indirect_different_package_via_generic_in_same_package.carbon", directory: "") -// CHECK:STDOUT: !204 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !203, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "CallGenericInOwningPackage", linkageName: "_CCallGenericInOwningPackage.OtherPackage", scope: null, file: !203, line: 5, type: !133, spFlags: DISPFlagDefinition, unit: !204) -// CHECK:STDOUT: !206 = !DILocation(line: 7, column: 29, scope: !205) -// CHECK:STDOUT: !207 = !DILocation(line: 7, column: 51, scope: !205) -// CHECK:STDOUT: !208 = !DILocation(line: 7, column: 3, scope: !205) -// CHECK:STDOUT: !209 = !DILocation(line: 5, column: 1, scope: !205) -// CHECK:STDOUT: !210 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !203, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !204, retainedNodes: !213) -// CHECK:STDOUT: !211 = !DILocalVariable(arg: 1, scope: !210, type: !6) -// CHECK:STDOUT: !212 = !DILocation(line: 7, column: 3, scope: !210) -// CHECK:STDOUT: !213 = !{!211} -// CHECK:STDOUT: !214 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !203, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !204, retainedNodes: !217) +// CHECK:STDOUT: !207 = !DIFile(filename: "indirect_different_package_via_generic_in_same_package.carbon", directory: "") +// CHECK:STDOUT: !208 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !207, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !209 = distinct !DISubprogram(name: "CallGenericInOwningPackage", linkageName: "_CCallGenericInOwningPackage.OtherPackage", scope: null, file: !207, line: 5, type: !133, spFlags: DISPFlagDefinition, unit: !208) +// CHECK:STDOUT: !210 = !DILocation(line: 7, column: 29, scope: !209) +// CHECK:STDOUT: !211 = !DILocation(line: 7, column: 51, scope: !209) +// CHECK:STDOUT: !212 = !DILocation(line: 7, column: 3, scope: !209) +// CHECK:STDOUT: !213 = !DILocation(line: 5, column: 1, scope: !209) +// CHECK:STDOUT: !214 = distinct !DISubprogram(name: "Op", linkageName: "_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core", scope: null, file: !207, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !208, retainedNodes: !217) // CHECK:STDOUT: !215 = !DILocalVariable(arg: 1, scope: !214, type: !7) // CHECK:STDOUT: !216 = !DILocation(line: 7, column: 3, scope: !214) // CHECK:STDOUT: !217 = !{!215} -// CHECK:STDOUT: !218 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !203, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !204, retainedNodes: !221) +// CHECK:STDOUT: !218 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core", scope: null, file: !207, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !208, retainedNodes: !221) // CHECK:STDOUT: !219 = !DILocalVariable(arg: 1, scope: !218, type: !7) // CHECK:STDOUT: !220 = !DILocation(line: 7, column: 3, scope: !218) // CHECK:STDOUT: !221 = !{!219} -// CHECK:STDOUT: !222 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !203, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !204, retainedNodes: !225) +// CHECK:STDOUT: !222 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !111, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !208, retainedNodes: !232) // CHECK:STDOUT: !223 = !DILocalVariable(arg: 1, scope: !222, type: !7) -// CHECK:STDOUT: !224 = !DILocation(line: 7, column: 3, scope: !222) -// CHECK:STDOUT: !225 = !{!223} -// CHECK:STDOUT: !226 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !203, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !204, retainedNodes: !229) -// CHECK:STDOUT: !227 = !DILocalVariable(arg: 1, scope: !226, type: !7) -// CHECK:STDOUT: !228 = !DILocation(line: 7, column: 3, scope: !226) -// CHECK:STDOUT: !229 = !{!227} -// CHECK:STDOUT: !230 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OwningPackage.e43630e9a6c38c3f", scope: null, file: !106, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !204, retainedNodes: !240) -// CHECK:STDOUT: !231 = !DILocalVariable(arg: 1, scope: !230, type: !7) -// CHECK:STDOUT: !232 = !DILocalVariable(arg: 2, scope: !230, type: !7) -// CHECK:STDOUT: !237 = !DILocation(line: 6, column: 10, scope: !230) -// CHECK:STDOUT: !238 = !DILocation(line: 6, column: 15, scope: !230) -// CHECK:STDOUT: !239 = !DILocation(line: 6, column: 3, scope: !230) -// CHECK:STDOUT: !240 = !{!231, !232} +// CHECK:STDOUT: !224 = !DILocalVariable(arg: 2, scope: !222, type: !7) +// CHECK:STDOUT: !229 = !DILocation(line: 6, column: 10, scope: !222) +// CHECK:STDOUT: !230 = !DILocation(line: 6, column: 15, scope: !222) +// CHECK:STDOUT: !231 = !DILocation(line: 6, column: 3, scope: !222) +// CHECK:STDOUT: !232 = !{!223, !224} +// CHECK:STDOUT: !233 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.7e1cc1683e7a3817", scope: null, file: !61, line: 36, type: !39, spFlags: DISPFlagDefinition, unit: !208, retainedNodes: !239) +// CHECK:STDOUT: !234 = !DILocalVariable(arg: 1, scope: !233, type: !7) +// CHECK:STDOUT: !237 = !DILocation(line: 38, column: 5, scope: !233) +// CHECK:STDOUT: !238 = !DILocation(line: 36, column: 1, scope: !233) +// CHECK:STDOUT: !239 = !{!234} +// CHECK:STDOUT: !240 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !61, line: 36, type: !55, spFlags: DISPFlagDefinition, unit: !208, retainedNodes: !246) +// CHECK:STDOUT: !241 = !DILocalVariable(arg: 1, scope: !240, type: !6) +// CHECK:STDOUT: !245 = !DILocation(line: 36, column: 1, scope: !240) +// CHECK:STDOUT: !246 = !{!241} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'generic_different_package.carbon' @@ -847,150 +784,122 @@ 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !243 { +// CHECK:STDOUT: define weak_odr void @"_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !249 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !245 +// CHECK:STDOUT: %.loc6_18.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !251 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_18.1.x), !dbg !251 +// CHECK:STDOUT: ret void, !dbg !251 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !247 { +// CHECK:STDOUT: define weak_odr void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !253 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !249 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc6.x), !dbg !249 -// CHECK:STDOUT: ret void, !dbg !249 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !251 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.991ec6fea7332ad5: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.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !255 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc6.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !257 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc6.x), !dbg !257 -// CHECK:STDOUT: ret void, !dbg !257 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !259 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !261 -// CHECK:STDOUT: ret void, !dbg !261 +// CHECK:STDOUT: %.loc6_18.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !255 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc6_18.1.x), !dbg !255 +// CHECK:STDOUT: ret void, !dbg !255 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMake.OtherPackage(ptr sret({ i32 })) // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !257 { +// CHECK:STDOUT: ret void, !dbg !262 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!242} +// CHECK:STDOUT: !llvm.dbg.cu = !{!248} // 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: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !38 = !{null, !6} +// CHECK:STDOUT: !38 = !{null, !7} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !7} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !241 = !DIFile(filename: "generic_different_package.carbon", directory: "") -// CHECK:STDOUT: !242 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !241, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !241, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !242, retainedNodes: !246) -// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !6) -// CHECK:STDOUT: !245 = !DILocation(line: 6, column: 15, scope: !243) -// CHECK:STDOUT: !246 = !{!244} -// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !241, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !242, retainedNodes: !250) -// CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !7) -// CHECK:STDOUT: !249 = !DILocation(line: 6, column: 15, scope: !247) -// CHECK:STDOUT: !250 = !{!248} -// CHECK:STDOUT: !251 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !241, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !242, retainedNodes: !254) -// CHECK:STDOUT: !252 = !DILocalVariable(arg: 1, scope: !251, type: !7) -// CHECK:STDOUT: !253 = !DILocation(line: 6, column: 15, scope: !251) -// CHECK:STDOUT: !254 = !{!252} -// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !241, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !242, retainedNodes: !258) -// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !7) -// CHECK:STDOUT: !257 = !DILocation(line: 6, column: 15, scope: !255) -// CHECK:STDOUT: !258 = !{!256} -// CHECK:STDOUT: !259 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !241, line: 6, type: !41, spFlags: DISPFlagDefinition, unit: !242, retainedNodes: !262) -// CHECK:STDOUT: !260 = !DILocalVariable(arg: 1, scope: !259, type: !7) -// CHECK:STDOUT: !261 = !DILocation(line: 6, column: 15, scope: !259) -// CHECK:STDOUT: !262 = !{!260} +// CHECK:STDOUT: !54 = !{null, !6} +// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) +// CHECK:STDOUT: !61 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !247 = !DIFile(filename: "generic_different_package.carbon", directory: "") +// CHECK:STDOUT: !248 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !247, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !249 = distinct !DISubprogram(name: "Op", linkageName: "_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core", scope: null, file: !247, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !248, retainedNodes: !252) +// CHECK:STDOUT: !250 = !DILocalVariable(arg: 1, scope: !249, type: !7) +// CHECK:STDOUT: !251 = !DILocation(line: 6, column: 15, scope: !249) +// CHECK:STDOUT: !252 = !{!250} +// CHECK:STDOUT: !253 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core", scope: null, file: !247, line: 6, type: !39, spFlags: DISPFlagDefinition, unit: !248, retainedNodes: !256) +// CHECK:STDOUT: !254 = !DILocalVariable(arg: 1, scope: !253, type: !7) +// CHECK:STDOUT: !255 = !DILocation(line: 6, column: 15, scope: !253) +// CHECK:STDOUT: !256 = !{!254} +// CHECK:STDOUT: !257 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !61, line: 36, type: !55, spFlags: DISPFlagDefinition, unit: !248, retainedNodes: !263) +// CHECK:STDOUT: !258 = !DILocalVariable(arg: 1, scope: !257, type: !6) +// CHECK:STDOUT: !262 = !DILocation(line: 36, column: 1, scope: !257) +// CHECK:STDOUT: !263 = !{!258} // 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 !265 { +// CHECK:STDOUT: define void @_CCallGeneric.OtherPackage() #0 !dbg !266 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_20.1.temp = alloca { i32 }, align 4, !dbg !266 -// CHECK:STDOUT: %.loc7_28.1.temp = alloca { i32 }, align 4, !dbg !267 -// CHECK:STDOUT: %.loc7_29.2.temp = alloca { i32 }, align 4, !dbg !268 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.1.temp), !dbg !266 -// CHECK:STDOUT: call void @_CMake.OtherPackage(ptr %.loc7_20.1.temp), !dbg !266 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_28.1.temp), !dbg !267 -// CHECK:STDOUT: call void @_CMake.OtherPackage(ptr %.loc7_28.1.temp), !dbg !267 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_29.2.temp), !dbg !268 -// CHECK:STDOUT: call void @_CGeneric.OtherPackage.e43630e9a6c38c3f(ptr %.loc7_29.2.temp, ptr %.loc7_20.1.temp, ptr %.loc7_28.1.temp), !dbg !268 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_29.2.temp), !dbg !268 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_28.1.temp), !dbg !267 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %.loc7_20.1.temp), !dbg !266 -// CHECK:STDOUT: ret void, !dbg !269 +// CHECK:STDOUT: %.loc7_20.1.temp = alloca { i32 }, align 4, !dbg !267 +// CHECK:STDOUT: %.loc7_28.1.temp = alloca { i32 }, align 4, !dbg !268 +// CHECK:STDOUT: %.loc7_29.2.temp = alloca { i32 }, align 4, !dbg !269 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_20.1.temp), !dbg !267 +// CHECK:STDOUT: call void @_CMake.OtherPackage(ptr %.loc7_20.1.temp), !dbg !267 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_28.1.temp), !dbg !268 +// CHECK:STDOUT: call void @_CMake.OtherPackage(ptr %.loc7_28.1.temp), !dbg !268 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_29.2.temp), !dbg !269 +// CHECK:STDOUT: call void @_CGeneric.OtherPackage.e43630e9a6c38c3f(ptr %.loc7_29.2.temp, ptr %.loc7_20.1.temp, ptr %.loc7_28.1.temp), !dbg !269 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc7_29.2.temp), !dbg !269 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc7_28.1.temp), !dbg !268 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %.loc7_20.1.temp), !dbg !267 +// CHECK:STDOUT: ret void, !dbg !270 // 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !270 { +// CHECK:STDOUT: define weak_odr void @"_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !271 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !272 +// CHECK:STDOUT: %.loc7_29.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !273 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_29.1.x), !dbg !273 +// CHECK:STDOUT: ret void, !dbg !273 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !274 { +// CHECK:STDOUT: define weak_odr void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !275 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !276 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.x), !dbg !276 -// CHECK:STDOUT: ret void, !dbg !276 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core"(ptr %self) #0 !dbg !278 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core"(ptr %self), !dbg !280 -// CHECK:STDOUT: ret void, !dbg !280 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !282 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !284 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7.x), !dbg !284 -// CHECK:STDOUT: ret void, !dbg !284 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self) #0 !dbg !286 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %self), !dbg !288 -// CHECK:STDOUT: ret void, !dbg !288 +// CHECK:STDOUT: %.loc7_29.1.x = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !277 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_29.1.x), !dbg !277 +// CHECK:STDOUT: ret void, !dbg !277 // 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 !290 { -// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !298 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !298 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %temp, ptr %v2, i32 2), !dbg !298 -// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !297 -// CHECK:STDOUT: call void @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core"(ptr %temp), !dbg !298 -// CHECK:STDOUT: ret void, !dbg !299 +// CHECK:STDOUT: define linkonce_odr void @_CGeneric.OtherPackage.e43630e9a6c38c3f(ptr sret({ i32 }) %return, ptr %v1, ptr %v2) #0 !dbg !279 { +// CHECK:STDOUT: %temp = alloca { i32 }, align 4, !dbg !287 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !287 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr %temp, ptr %v2, i32 2), !dbg !287 +// CHECK:STDOUT: call void @"_COp.Vector.OwningPackage:AddWith.f941828044620367.Core"(ptr %return, ptr %v1, ptr %temp), !dbg !286 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %temp), !dbg !287 +// CHECK:STDOUT: ret void, !dbg !288 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.7e1cc1683e7a3817(ptr %t) #0 !dbg !290 { +// CHECK:STDOUT: call void @"_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core"(ptr %t), !dbg !294 +// CHECK:STDOUT: ret void, !dbg !295 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !297 { +// CHECK:STDOUT: ret void, !dbg !302 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: declare void @"_COp.Vector.OwningPackage:MulWith.55456748a8a2eb70.Core"(ptr sret({ i32 }), ptr, i32) @@ -999,13 +908,14 @@ fn CallGeneric() { // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_CMake.OtherPackage, { 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", { 0, 3, 2, 1 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 3, 2, 1 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.7e1cc1683e7a3817, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // 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 = !{!264} +// CHECK:STDOUT: !llvm.dbg.cu = !{!265} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -1014,45 +924,43 @@ fn CallGeneric() { // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !8 = !{!7, !7, !7} // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !38 = !{null, !6} +// CHECK:STDOUT: !38 = !{null, !7} // CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !{null, !7} -// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !54 = !{null, !6} +// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) +// CHECK:STDOUT: !61 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") // CHECK:STDOUT: !132 = !{null} // CHECK:STDOUT: !133 = !DISubroutineType(types: !132) -// CHECK:STDOUT: !241 = !DIFile(filename: "generic_different_package.carbon", directory: "") -// CHECK:STDOUT: !263 = !DIFile(filename: "indirect_different_package_via_generic_in_different_package.carbon", directory: "") -// CHECK:STDOUT: !264 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !263, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !265 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.OtherPackage", scope: null, file: !263, line: 5, type: !133, spFlags: DISPFlagDefinition, unit: !264) -// CHECK:STDOUT: !266 = !DILocation(line: 7, column: 15, scope: !265) -// CHECK:STDOUT: !267 = !DILocation(line: 7, column: 23, scope: !265) -// CHECK:STDOUT: !268 = !DILocation(line: 7, column: 3, scope: !265) -// CHECK:STDOUT: !269 = !DILocation(line: 5, column: 1, scope: !265) -// CHECK:STDOUT: !270 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !263, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !264, retainedNodes: !273) -// CHECK:STDOUT: !271 = !DILocalVariable(arg: 1, scope: !270, type: !6) -// CHECK:STDOUT: !272 = !DILocation(line: 7, column: 3, scope: !270) -// CHECK:STDOUT: !273 = !{!271} -// CHECK:STDOUT: !274 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !263, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !264, 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: "SelfDestruct", linkageName: "_CSelfDestruct.991ec6fea7332ad5:core.Destroy.Core", scope: null, file: !263, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !264, retainedNodes: !281) -// CHECK:STDOUT: !279 = !DILocalVariable(arg: 1, scope: !278, type: !7) -// CHECK:STDOUT: !280 = !DILocation(line: 7, column: 3, scope: !278) -// CHECK:STDOUT: !281 = !{!279} -// CHECK:STDOUT: !282 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !263, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !264, retainedNodes: !285) -// CHECK:STDOUT: !283 = !DILocalVariable(arg: 1, scope: !282, type: !7) -// CHECK:STDOUT: !284 = !DILocation(line: 7, column: 3, scope: !282) -// CHECK:STDOUT: !285 = !{!283} -// CHECK:STDOUT: !286 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d9636b4f2fbd64a7:core.Destroy.Core", scope: null, file: !263, line: 7, type: !41, spFlags: DISPFlagDefinition, unit: !264, retainedNodes: !289) -// CHECK:STDOUT: !287 = !DILocalVariable(arg: 1, scope: !286, type: !7) -// CHECK:STDOUT: !288 = !DILocation(line: 7, column: 3, scope: !286) -// CHECK:STDOUT: !289 = !{!287} -// CHECK:STDOUT: !290 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OtherPackage.e43630e9a6c38c3f", scope: null, file: !241, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !264, retainedNodes: !300) +// CHECK:STDOUT: !247 = !DIFile(filename: "generic_different_package.carbon", directory: "") +// CHECK:STDOUT: !264 = !DIFile(filename: "indirect_different_package_via_generic_in_different_package.carbon", directory: "") +// CHECK:STDOUT: !265 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !264, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !266 = distinct !DISubprogram(name: "CallGeneric", linkageName: "_CCallGeneric.OtherPackage", scope: null, file: !264, line: 5, type: !133, spFlags: DISPFlagDefinition, unit: !265) +// CHECK:STDOUT: !267 = !DILocation(line: 7, column: 15, scope: !266) +// CHECK:STDOUT: !268 = !DILocation(line: 7, column: 23, scope: !266) +// CHECK:STDOUT: !269 = !DILocation(line: 7, column: 3, scope: !266) +// CHECK:STDOUT: !270 = !DILocation(line: 5, column: 1, scope: !266) +// CHECK:STDOUT: !271 = distinct !DISubprogram(name: "Op", linkageName: "_COp.991ec6fea7332ad5:core.SubobjectDestroy.Core", scope: null, file: !264, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !265, retainedNodes: !274) +// CHECK:STDOUT: !272 = !DILocalVariable(arg: 1, scope: !271, type: !7) +// CHECK:STDOUT: !273 = !DILocation(line: 7, column: 3, scope: !271) +// CHECK:STDOUT: !274 = !{!272} +// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "Op", linkageName: "_COp.d9636b4f2fbd64a7:core.SubobjectDestroy.Core", scope: null, file: !264, line: 7, type: !39, spFlags: DISPFlagDefinition, unit: !265, retainedNodes: !278) +// CHECK:STDOUT: !276 = !DILocalVariable(arg: 1, scope: !275, type: !7) +// CHECK:STDOUT: !277 = !DILocation(line: 7, column: 3, scope: !275) +// CHECK:STDOUT: !278 = !{!276} +// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "Generic", linkageName: "_CGeneric.OtherPackage.e43630e9a6c38c3f", scope: null, file: !247, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !265, retainedNodes: !289) +// CHECK:STDOUT: !280 = !DILocalVariable(arg: 1, scope: !279, type: !7) +// CHECK:STDOUT: !281 = !DILocalVariable(arg: 2, scope: !279, type: !7) +// CHECK:STDOUT: !286 = !DILocation(line: 6, column: 10, scope: !279) +// CHECK:STDOUT: !287 = !DILocation(line: 6, column: 15, scope: !279) +// CHECK:STDOUT: !288 = !DILocation(line: 6, column: 3, scope: !279) +// CHECK:STDOUT: !289 = !{!280, !281} +// CHECK:STDOUT: !290 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.7e1cc1683e7a3817", scope: null, file: !61, line: 36, type: !39, spFlags: DISPFlagDefinition, unit: !265, retainedNodes: !296) // CHECK:STDOUT: !291 = !DILocalVariable(arg: 1, scope: !290, type: !7) -// CHECK:STDOUT: !292 = !DILocalVariable(arg: 2, scope: !290, type: !7) -// CHECK:STDOUT: !297 = !DILocation(line: 6, column: 10, scope: !290) -// CHECK:STDOUT: !298 = !DILocation(line: 6, column: 15, scope: !290) -// CHECK:STDOUT: !299 = !DILocation(line: 6, column: 3, scope: !290) -// CHECK:STDOUT: !300 = !{!291, !292} +// CHECK:STDOUT: !294 = !DILocation(line: 38, column: 5, scope: !290) +// CHECK:STDOUT: !295 = !DILocation(line: 36, column: 1, scope: !290) +// CHECK:STDOUT: !296 = !{!291} +// CHECK:STDOUT: !297 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !61, line: 36, type: !55, spFlags: DISPFlagDefinition, unit: !265, retainedNodes: !303) +// CHECK:STDOUT: !298 = !DILocalVariable(arg: 1, scope: !297, type: !6) +// CHECK:STDOUT: !302 = !DILocation(line: 36, column: 1, scope: !297) +// CHECK:STDOUT: !303 = !{!298} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/pointer/address_of_field.carbon b/toolchain/lower/testdata/pointer/address_of_field.carbon index 92e074ad3f11..198c147d05de 100644 --- a/toolchain/lower/testdata/pointer/address_of_field.carbon +++ b/toolchain/lower/testdata/pointer/address_of_field.carbon @@ -21,45 +21,32 @@ fn F() { // CHECK:STDOUT: ; ModuleID = 'address_of_field.carbon' // CHECK:STDOUT: source_filename = "address_of_field.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.940.loc16_3 = internal constant { i32, i32 } { i32 1, i32 2 } +// CHECK:STDOUT: @struct.940.loc16_3.1 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !28 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %s.var = alloca { i32, i32 }, align 4, !dbg !29 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %s.var), !dbg !29 -// CHECK:STDOUT: %.loc16_46.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 0, !dbg !30 -// CHECK:STDOUT: %.loc16_46.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 1, !dbg !30 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %s.var, ptr align 4 @struct.940.loc16_3, i64 8, i1 false), !dbg !29 -// CHECK:STDOUT: %.loc17.b = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 1, !dbg !32 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc17.b), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core"(ptr %s.var), !dbg !29 -// CHECK:STDOUT: ret void, !dbg !35 +// CHECK:STDOUT: %s.var = alloca { i32, i32 }, align 4, !dbg !27 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %s.var), !dbg !27 +// CHECK:STDOUT: %.loc16_46.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 0, !dbg !28 +// CHECK:STDOUT: %.loc16_46.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 1, !dbg !28 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %s.var, ptr align 4 @struct.940.loc16_3.1, i64 8, i1 false), !dbg !27 +// CHECK:STDOUT: %.loc17.b = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 1, !dbg !30 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc17.b), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ad01ed096e1f14e2(ptr %s.var), !dbg !27 +// CHECK:STDOUT: ret void, !dbg !33 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !36 { +// CHECK:STDOUT: define weak_odr void @"_COp.2508ed710019eba8:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !34 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !38 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !40 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !42 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_3.1.b), !dbg !42 -// CHECK:STDOUT: %.loc16_3.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !42 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_3.2.a), !dbg !42 -// CHECK:STDOUT: ret void, !dbg !42 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !44 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core"(ptr %self), !dbg !46 -// CHECK:STDOUT: ret void, !dbg !46 +// CHECK:STDOUT: %.loc16_3.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !36 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_3.1.b), !dbg !36 +// CHECK:STDOUT: %.loc16_3.4.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !36 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_3.4.a), !dbg !36 +// CHECK:STDOUT: ret void, !dbg !36 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -68,6 +55,20 @@ fn F() { // 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 @_CSelfDestruct.Core.ad01ed096e1f14e2(ptr %t) #0 !dbg !40 { +// CHECK:STDOUT: call void @"_COp.2508ed710019eba8:core.SubobjectDestroy.Core"(ptr %t), !dbg !44 +// CHECK:STDOUT: ret void, !dbg !45 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !47 { +// CHECK:STDOUT: ret void, !dbg !52 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -76,6 +77,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "address_of_field.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -84,24 +86,25 @@ fn F() { // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !29 = !DILocation(line: 16, column: 3, scope: !28) -// CHECK:STDOUT: !30 = !DILocation(line: 16, column: 31, scope: !28) -// CHECK:STDOUT: !32 = !DILocation(line: 17, column: 6, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 17, column: 3, scope: !28) -// CHECK:STDOUT: !35 = !DILocation(line: 15, column: 1, scope: !28) -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) -// 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.2508ed710019eba8:core.Destroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !27 = !DILocation(line: 16, column: 3, scope: !26) +// CHECK:STDOUT: !28 = !DILocation(line: 16, column: 31, scope: !26) +// CHECK:STDOUT: !30 = !DILocation(line: 17, column: 6, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 17, column: 3, scope: !26) +// CHECK:STDOUT: !33 = !DILocation(line: 15, column: 1, scope: !26) +// CHECK:STDOUT: !34 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2508ed710019eba8:core.SubobjectDestroy.Core", scope: null, file: !18, line: 16, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !39) +// CHECK:STDOUT: !35 = !DILocalVariable(arg: 1, scope: !34, type: !21) +// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 3, scope: !34) +// CHECK:STDOUT: !37 = !{null, !20} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !{!35} +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ad01ed096e1f14e2", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !46) // CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !21) -// CHECK:STDOUT: !42 = !DILocation(line: 16, column: 3, scope: !40) -// CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2508ed710019eba8: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: !44 = !DILocation(line: 34, column: 5, scope: !40) +// CHECK:STDOUT: !45 = !DILocation(line: 32, column: 1, scope: !40) +// CHECK:STDOUT: !46 = !{!41} +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) +// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !20) +// CHECK:STDOUT: !52 = !DILocation(line: 32, column: 1, scope: !47) +// CHECK:STDOUT: !53 = !{!48} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/pointer/address_of_unused.carbon b/toolchain/lower/testdata/pointer/address_of_unused.carbon index bfcb12fda2f0..83226bfb11e2 100644 --- a/toolchain/lower/testdata/pointer/address_of_unused.carbon +++ b/toolchain/lower/testdata/pointer/address_of_unused.carbon @@ -20,24 +20,23 @@ fn F() { // CHECK:STDOUT: source_filename = "address_of_unused.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !25 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !26 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !26 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !26 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !26 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !24 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !24 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !24 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !24 // CHECK:STDOUT: ret void, !dbg !30 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !31 { +// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -46,18 +45,19 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "address_of_unused.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{null} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !26 = !DILocation(line: 14, column: 3, scope: !25) -// CHECK:STDOUT: !30 = !DILocation(line: 13, column: 1, scope: !25) -// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !34) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !24 = !DILocation(line: 14, column: 3, scope: !23) +// CHECK:STDOUT: !28 = !{null, !20} +// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) +// CHECK:STDOUT: !30 = !DILocation(line: 13, column: 1, scope: !23) +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !37) // 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: !36 = !DILocation(line: 32, column: 1, scope: !31) +// CHECK:STDOUT: !37 = !{!32} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/pointer/basic.carbon b/toolchain/lower/testdata/pointer/basic.carbon index ae081244f2cb..835d5b2d5adf 100644 --- a/toolchain/lower/testdata/pointer/basic.carbon +++ b/toolchain/lower/testdata/pointer/basic.carbon @@ -24,32 +24,31 @@ fn F() -> i32 { // CHECK:STDOUT: source_filename = "basic.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CG.Main(ptr %p) #0 !dbg !28 { +// CHECK:STDOUT: define i32 @_CG.Main(ptr %p) #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14_10.2 = load i32, ptr %p, align 4, !dbg !34 -// CHECK:STDOUT: ret i32 %.loc14_10.2, !dbg !35 +// CHECK:STDOUT: %.loc14_10.2 = load i32, ptr %p, align 4, !dbg !32 +// CHECK:STDOUT: ret i32 %.loc14_10.2, !dbg !33 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF.Main() #0 !dbg !37 { +// CHECK:STDOUT: define i32 @_CF.Main() #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !40 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !40 -// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !40 -// CHECK:STDOUT: %G.call = call i32 @_CG.Main(ptr %n.var), !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !40 +// CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !38 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %n.var), !dbg !38 +// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !38 +// CHECK:STDOUT: %G.call = call i32 @_CG.Main(ptr %n.var), !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %n.var), !dbg !38 // CHECK:STDOUT: ret i32 %G.call, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !46 { +// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -58,6 +57,7 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "basic.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -66,19 +66,19 @@ fn F() -> i32 { // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{!20} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !36) -// CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !21) -// CHECK:STDOUT: !34 = !DILocation(line: 14, column: 10, scope: !28) -// CHECK:STDOUT: !35 = !DILocation(line: 14, column: 3, scope: !28) -// CHECK:STDOUT: !36 = !{!29} -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 17, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !40 = !DILocation(line: 18, column: 3, scope: !37) -// CHECK:STDOUT: !44 = !DILocation(line: 19, column: 10, scope: !37) -// CHECK:STDOUT: !45 = !DILocation(line: 19, column: 3, scope: !37) -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 18, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !49) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !34) +// CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !21) +// CHECK:STDOUT: !32 = !DILocation(line: 14, column: 10, scope: !26) +// CHECK:STDOUT: !33 = !DILocation(line: 14, column: 3, scope: !26) +// CHECK:STDOUT: !34 = !{!27} +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 17, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !38 = !DILocation(line: 18, column: 3, scope: !35) +// CHECK:STDOUT: !42 = !DILocation(line: 19, column: 10, scope: !35) +// CHECK:STDOUT: !43 = !{null, !20} +// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) +// CHECK:STDOUT: !45 = !DILocation(line: 19, column: 3, scope: !35) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !44, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !52) // 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: !51 = !DILocation(line: 32, column: 1, scope: !46) +// CHECK:STDOUT: !52 = !{!47} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon b/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon index 4e87bcd1d2ef..78a5ff8fa666 100644 --- a/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon +++ b/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon @@ -22,45 +22,43 @@ fn F(p: i32**) -> i32 { // CHECK:STDOUT: source_filename = "pointer_to_pointer.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CF.Main(ptr %p) #0 !dbg !26 { +// CHECK:STDOUT: define i32 @_CF.Main(ptr %p) #0 !dbg !24 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca ptr, align 8, !dbg !31 -// CHECK:STDOUT: %b.var = alloca ptr, align 8, !dbg !34 -// CHECK:STDOUT: %c.var = alloca ptr, align 8, !dbg !38 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !31 -// CHECK:STDOUT: store ptr %p, ptr %_.var, align 8, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !34 -// CHECK:STDOUT: %.loc15_17.2 = load ptr, ptr %p, align 8, !dbg !36 -// CHECK:STDOUT: store ptr %.loc15_17.2, ptr %b.var, align 8, !dbg !34 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !38 -// CHECK:STDOUT: store ptr %b.var, ptr %c.var, align 8, !dbg !38 -// CHECK:STDOUT: %.loc17_12 = load ptr, ptr %c.var, align 8, !dbg !42 -// CHECK:STDOUT: %.loc17_11.2 = load ptr, ptr %.loc17_12, align 8, !dbg !43 -// CHECK:STDOUT: %.loc17_10.2 = load i32, ptr %.loc17_11.2, align 4, !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.8609a36981aa979c:core.Destroy.Core"(ptr %c.var), !dbg !38 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %b.var), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.8609a36981aa979c:core.Destroy.Core"(ptr %_.var), !dbg !31 +// CHECK:STDOUT: %_.var = alloca ptr, align 8, !dbg !29 +// CHECK:STDOUT: %b.var = alloca ptr, align 8, !dbg !32 +// CHECK:STDOUT: %c.var = alloca ptr, align 8, !dbg !36 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !29 +// CHECK:STDOUT: store ptr %p, ptr %_.var, align 8, !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !32 +// CHECK:STDOUT: %.loc15_17.2 = load ptr, ptr %p, align 8, !dbg !34 +// CHECK:STDOUT: store ptr %.loc15_17.2, ptr %b.var, align 8, !dbg !32 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !36 +// CHECK:STDOUT: store ptr %b.var, ptr %c.var, align 8, !dbg !36 +// CHECK:STDOUT: %.loc17_12 = load ptr, ptr %c.var, align 8, !dbg !40 +// CHECK:STDOUT: %.loc17_11.2 = load ptr, ptr %.loc17_12, align 8, !dbg !41 +// CHECK:STDOUT: %.loc17_10.2 = load i32, ptr %.loc17_11.2, align 4, !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.fe9506775ab787b4(ptr %c.var), !dbg !36 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %b.var), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.fe9506775ab787b4(ptr %_.var), !dbg !29 // CHECK:STDOUT: ret i32 %.loc17_10.2, !dbg !45 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8609a36981aa979c: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.a17e1ddde5b22223: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: 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 @_CSelfDestruct.Core.fe9506775ab787b4(ptr %t) #0 !dbg !47 { +// CHECK:STDOUT: ret void, !dbg !52 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !54 { +// CHECK:STDOUT: ret void, !dbg !59 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.8609a36981aa979c:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.fe9506775ab787b4, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -70,31 +68,32 @@ fn F(p: i32**) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "pointer_to_pointer.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{!20, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) -// CHECK:STDOUT: !24 = !{null, !21} -// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !46) -// CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !21) -// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 3, scope: !26) -// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 3, scope: !26) -// CHECK:STDOUT: !36 = !DILocation(line: 15, column: 17, scope: !26) -// CHECK:STDOUT: !38 = !DILocation(line: 16, column: 3, scope: !26) -// CHECK:STDOUT: !42 = !DILocation(line: 17, column: 12, scope: !26) -// CHECK:STDOUT: !43 = !DILocation(line: 17, column: 11, scope: !26) -// CHECK:STDOUT: !44 = !DILocation(line: 17, column: 10, scope: !26) -// CHECK:STDOUT: !45 = !DILocation(line: 17, column: 3, scope: !26) -// CHECK:STDOUT: !46 = !{!27} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8609a36981aa979c:core.Destroy.Core", scope: null, file: !18, line: 16, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !50) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !46) +// CHECK:STDOUT: !25 = !DILocalVariable(arg: 1, scope: !24, type: !21) +// CHECK:STDOUT: !29 = !DILocation(line: 14, column: 3, scope: !24) +// CHECK:STDOUT: !32 = !DILocation(line: 15, column: 3, scope: !24) +// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 17, scope: !24) +// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 3, scope: !24) +// CHECK:STDOUT: !40 = !DILocation(line: 17, column: 12, scope: !24) +// CHECK:STDOUT: !41 = !DILocation(line: 17, column: 11, scope: !24) +// CHECK:STDOUT: !42 = !DILocation(line: 17, column: 10, scope: !24) +// CHECK:STDOUT: !43 = !{null, !21} +// CHECK:STDOUT: !44 = !DISubroutineType(types: !43) +// CHECK:STDOUT: !45 = !DILocation(line: 17, column: 3, scope: !24) +// CHECK:STDOUT: !46 = !{!25} +// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.fe9506775ab787b4", scope: null, file: !10, line: 32, type: !44, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !53) // CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !21) -// CHECK:STDOUT: !49 = !DILocation(line: 16, column: 3, scope: !47) -// CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !21) -// CHECK:STDOUT: !53 = !DILocation(line: 15, column: 3, scope: !51) -// CHECK:STDOUT: !54 = !{!52} +// CHECK:STDOUT: !52 = !DILocation(line: 32, column: 1, scope: !47) +// CHECK:STDOUT: !53 = !{!48} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !10, line: 32, type: !44, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !60) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !21) +// CHECK:STDOUT: !59 = !DILocation(line: 32, column: 1, scope: !54) +// CHECK:STDOUT: !60 = !{!55} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/primitives/numeric_literals.carbon b/toolchain/lower/testdata/primitives/numeric_literals.carbon index ee79d25ed53a..e1b8534fc6cf 100644 --- a/toolchain/lower/testdata/primitives/numeric_literals.carbon +++ b/toolchain/lower/testdata/primitives/numeric_literals.carbon @@ -33,89 +33,63 @@ fn F() { // CHECK:STDOUT: ; ModuleID = 'numeric_literals.carbon' // CHECK:STDOUT: source_filename = "numeric_literals.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @array.e93.loc16_3 = internal constant [4 x i32] [i32 8, i32 9, i32 8, i32 8] -// CHECK:STDOUT: @array.33a.loc22_3 = internal constant [6 x double] [double 9.000000e-01, double 8.000000e+00, double 8.000000e+01, double 1.000000e+07, double 1.000000e+08, double 1.000000e-08] +// CHECK:STDOUT: @array.e93.loc16_3.1 = internal constant [4 x i32] [i32 8, i32 9, i32 8, i32 8] +// CHECK:STDOUT: @array.33a.loc22_3.1 = internal constant [6 x double] [double 9.000000e-01, double 8.000000e+00, double 8.000000e+01, double 1.000000e+07, double 1.000000e+08, double 1.000000e-08] // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !44 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var.loc16 = alloca [4 x i32], align 4, !dbg !45 -// CHECK:STDOUT: %_.var.loc22 = alloca [6 x double], align 8, !dbg !48 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !45 -// CHECK:STDOUT: %.loc21_3.3.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 0, !dbg !46 -// CHECK:STDOUT: %.loc21_3.6.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 1, !dbg !46 -// CHECK:STDOUT: %.loc21_3.9.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 2, !dbg !46 -// CHECK:STDOUT: %.loc21_3.12.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 3, !dbg !46 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %_.var.loc16, ptr align 4 @array.e93.loc16_3, i64 16, i1 false), !dbg !45 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc22), !dbg !48 -// CHECK:STDOUT: %.loc29_3.3.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 0, !dbg !49 -// CHECK:STDOUT: %.loc29_3.6.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 1, !dbg !49 -// CHECK:STDOUT: %.loc29_3.9.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 2, !dbg !49 -// CHECK:STDOUT: %.loc29_3.12.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 3, !dbg !49 -// CHECK:STDOUT: %.loc29_3.15.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 4, !dbg !49 -// CHECK:STDOUT: %.loc29_3.18.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 5, !dbg !49 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc22, ptr align 8 @array.33a.loc22_3, i64 48, i1 false), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.b72c73ceef325bf3:core.Destroy.Core"(ptr %_.var.loc22), !dbg !48 -// CHECK:STDOUT: call void @"_CSelfDestruct.f09a8402c9d45995:core.Destroy.Core"(ptr %_.var.loc16), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: %_.var.loc16 = alloca [4 x i32], align 4, !dbg !43 +// CHECK:STDOUT: %_.var.loc22 = alloca [6 x double], align 8, !dbg !46 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !43 +// CHECK:STDOUT: %.loc21_3.3.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 0, !dbg !44 +// CHECK:STDOUT: %.loc21_3.6.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 1, !dbg !44 +// CHECK:STDOUT: %.loc21_3.9.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 2, !dbg !44 +// CHECK:STDOUT: %.loc21_3.12.array.index = getelementptr inbounds [4 x i32], ptr %_.var.loc16, i32 0, i64 3, !dbg !44 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %_.var.loc16, ptr align 4 @array.e93.loc16_3.1, i64 16, i1 false), !dbg !43 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc22), !dbg !46 +// CHECK:STDOUT: %.loc29_3.3.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 0, !dbg !47 +// CHECK:STDOUT: %.loc29_3.6.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 1, !dbg !47 +// CHECK:STDOUT: %.loc29_3.9.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 2, !dbg !47 +// CHECK:STDOUT: %.loc29_3.12.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 3, !dbg !47 +// CHECK:STDOUT: %.loc29_3.15.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 4, !dbg !47 +// CHECK:STDOUT: %.loc29_3.18.array.index = getelementptr inbounds [6 x double], ptr %_.var.loc22, i32 0, i64 5, !dbg !47 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %_.var.loc22, ptr align 8 @array.33a.loc22_3.1, i64 48, i1 false), !dbg !46 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.b5f30f9c486f7750(ptr %_.var.loc22), !dbg !46 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8a58b7b15e68238e(ptr %_.var.loc16), !dbg !43 +// CHECK:STDOUT: ret void, !dbg !49 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %self) #0 !dbg !52 { +// CHECK:STDOUT: define weak_odr void @"_COp.b72c73ceef325bf3:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !50 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: %.loc22_3.1.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 5, !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc22_3.1.array.index), !dbg !52 +// CHECK:STDOUT: %.loc22_3.4.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 4, !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc22_3.4.array.index), !dbg !52 +// CHECK:STDOUT: %.loc22_3.7.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 3, !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc22_3.7.array.index), !dbg !52 +// CHECK:STDOUT: %.loc22_3.10.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 2, !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc22_3.10.array.index), !dbg !52 +// CHECK:STDOUT: %.loc22_3.13.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 1, !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc22_3.13.array.index), !dbg !52 +// CHECK:STDOUT: %.loc22_3.16.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 0, !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc22_3.16.array.index), !dbg !52 +// CHECK:STDOUT: ret void, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.b72c73ceef325bf3:core.Destroy.Core"(ptr %self) #0 !dbg !56 { +// CHECK:STDOUT: define weak_odr void @"_COp.f09a8402c9d45995:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !54 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22_3.1.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 5, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc22_3.1.array.index), !dbg !58 -// CHECK:STDOUT: %.loc22_3.2.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 4, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc22_3.2.array.index), !dbg !58 -// CHECK:STDOUT: %.loc22_3.3.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 3, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc22_3.3.array.index), !dbg !58 -// CHECK:STDOUT: %.loc22_3.4.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 2, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc22_3.4.array.index), !dbg !58 -// CHECK:STDOUT: %.loc22_3.5.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 1, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc22_3.5.array.index), !dbg !58 -// CHECK:STDOUT: %.loc22_3.6.array.index = getelementptr inbounds [6 x double], ptr %self, i32 0, i64 0, !dbg !58 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc22_3.6.array.index), !dbg !58 -// CHECK:STDOUT: ret void, !dbg !58 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b72c73ceef325bf3:core.Destroy.Core"(ptr %self) #0 !dbg !60 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b72c73ceef325bf3: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.72395be3dbbe8946: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.f09a8402c9d45995:core.Destroy.Core"(ptr %self) #0 !dbg !68 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 3, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_3.1.array.index), !dbg !70 -// CHECK:STDOUT: %.loc16_3.2.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 2, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_3.2.array.index), !dbg !70 -// CHECK:STDOUT: %.loc16_3.3.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 1, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_3.3.array.index), !dbg !70 -// CHECK:STDOUT: %.loc16_3.4.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 0, !dbg !70 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc16_3.4.array.index), !dbg !70 -// CHECK:STDOUT: ret void, !dbg !70 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f09a8402c9d45995:core.Destroy.Core"(ptr %self) #0 !dbg !72 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f09a8402c9d45995:core.Destroy.Core"(ptr %self), !dbg !74 -// CHECK:STDOUT: ret void, !dbg !74 +// CHECK:STDOUT: %.loc16_3.1.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 3, !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_3.1.array.index), !dbg !56 +// CHECK:STDOUT: %.loc16_3.4.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 2, !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_3.4.array.index), !dbg !56 +// CHECK:STDOUT: %.loc16_3.7.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 1, !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_3.7.array.index), !dbg !56 +// CHECK:STDOUT: %.loc16_3.10.array.index = getelementptr inbounds [4 x i32], ptr %self, i32 0, i64 0, !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc16_3.10.array.index), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -124,9 +98,33 @@ fn F() { // 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 @_CSelfDestruct.Core.b5f30f9c486f7750(ptr %t) #0 !dbg !60 { +// CHECK:STDOUT: call void @"_COp.b72c73ceef325bf3:core.SubobjectDestroy.Core"(ptr %t), !dbg !64 +// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8a58b7b15e68238e(ptr %t) #0 !dbg !67 { +// CHECK:STDOUT: call void @"_COp.f09a8402c9d45995:core.SubobjectDestroy.Core"(ptr %t), !dbg !71 +// CHECK:STDOUT: ret void, !dbg !72 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !74 { +// CHECK:STDOUT: ret void, !dbg !79 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !81 { +// CHECK:STDOUT: ret void, !dbg !86 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.2b38c2ca9f7f1a94, { 5, 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -136,6 +134,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "numeric_literals.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -144,36 +143,38 @@ fn F() { // CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !40 = !{null, !39} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !42 = !{null, !36} -// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !34, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !45 = !DILocation(line: 16, column: 3, scope: !44) -// CHECK:STDOUT: !46 = !DILocation(line: 16, column: 26, scope: !44) -// CHECK:STDOUT: !48 = !DILocation(line: 22, column: 3, scope: !44) -// CHECK:STDOUT: !49 = !DILocation(line: 22, column: 26, scope: !44) -// CHECK:STDOUT: !51 = !DILocation(line: 13, column: 1, scope: !44) -// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !34, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !55) -// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !39) -// CHECK:STDOUT: !54 = !DILocation(line: 22, column: 3, scope: !52) -// CHECK:STDOUT: !55 = !{!53} -// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.b72c73ceef325bf3:core.Destroy.Core", scope: null, file: !34, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !59) -// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !56, type: !39) -// CHECK:STDOUT: !58 = !DILocation(line: 22, column: 3, scope: !56) -// CHECK:STDOUT: !59 = !{!57} -// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b72c73ceef325bf3:core.Destroy.Core", scope: null, file: !34, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !63) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !34, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !43 = !DILocation(line: 16, column: 3, scope: !42) +// CHECK:STDOUT: !44 = !DILocation(line: 16, column: 26, scope: !42) +// CHECK:STDOUT: !46 = !DILocation(line: 22, column: 3, scope: !42) +// CHECK:STDOUT: !47 = !DILocation(line: 22, column: 26, scope: !42) +// CHECK:STDOUT: !49 = !DILocation(line: 13, column: 1, scope: !42) +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b72c73ceef325bf3:core.SubobjectDestroy.Core", scope: null, file: !34, line: 22, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !53) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !39) +// CHECK:STDOUT: !52 = !DILocation(line: 22, column: 3, scope: !50) +// CHECK:STDOUT: !53 = !{!51} +// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f09a8402c9d45995:core.SubobjectDestroy.Core", scope: null, file: !34, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !59) +// CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !54, type: !39) +// CHECK:STDOUT: !56 = !DILocation(line: 16, column: 3, scope: !54) +// CHECK:STDOUT: !57 = !{null, !36} +// CHECK:STDOUT: !58 = !DISubroutineType(types: !57) +// CHECK:STDOUT: !59 = !{!55} +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.b5f30f9c486f7750", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !66) // CHECK:STDOUT: !61 = !DILocalVariable(arg: 1, scope: !60, type: !39) -// CHECK:STDOUT: !62 = !DILocation(line: 22, column: 3, scope: !60) -// CHECK:STDOUT: !63 = !{!61} -// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !34, line: 16, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !67) -// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !36) -// CHECK:STDOUT: !66 = !DILocation(line: 16, column: 3, scope: !64) -// CHECK:STDOUT: !67 = !{!65} -// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f09a8402c9d45995:core.Destroy.Core", scope: null, file: !34, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !71) -// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !39) -// CHECK:STDOUT: !70 = !DILocation(line: 16, column: 3, scope: !68) -// CHECK:STDOUT: !71 = !{!69} -// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f09a8402c9d45995:core.Destroy.Core", scope: null, file: !34, line: 16, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !75) -// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !39) -// CHECK:STDOUT: !74 = !DILocation(line: 16, column: 3, scope: !72) -// CHECK:STDOUT: !75 = !{!73} +// CHECK:STDOUT: !64 = !DILocation(line: 34, column: 5, scope: !60) +// CHECK:STDOUT: !65 = !DILocation(line: 32, column: 1, scope: !60) +// CHECK:STDOUT: !66 = !{!61} +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8a58b7b15e68238e", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !73) +// CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !39) +// CHECK:STDOUT: !71 = !DILocation(line: 34, column: 5, scope: !67) +// CHECK:STDOUT: !72 = !DILocation(line: 32, column: 1, scope: !67) +// CHECK:STDOUT: !73 = !{!68} +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !80) +// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !39) +// CHECK:STDOUT: !79 = !DILocation(line: 32, column: 1, scope: !74) +// CHECK:STDOUT: !80 = !{!75} +// CHECK:STDOUT: !81 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 32, type: !58, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !87) +// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !36) +// CHECK:STDOUT: !86 = !DILocation(line: 32, column: 1, scope: !81) +// CHECK:STDOUT: !87 = !{!82} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/primitives/optional.carbon b/toolchain/lower/testdata/primitives/optional.carbon index 32a18d6ccb6f..3cd333f924c7 100644 --- a/toolchain/lower/testdata/primitives/optional.carbon +++ b/toolchain/lower/testdata/primitives/optional.carbon @@ -62,401 +62,342 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: source_filename = "convert.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %self) #0 !dbg !17 { +// CHECK:STDOUT: define void @_CConvert.Main(ptr sret(<{ i32, i1 }>) %return, ptr %o) #0 !dbg !14 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !19 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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 void @_CConvert.Main(ptr sret(<{ i32, i1 }>) %return, ptr %o) #0 !dbg !25 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.2313f7f09b1ddaea(ptr %o), !dbg !30 -// CHECK:STDOUT: br i1 %Optional.HasValue.call, label %if.then, label %if.else, !dbg !31 +// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.2313f7f09b1ddaea(ptr %o), !dbg !19 +// CHECK:STDOUT: br i1 %Optional.HasValue.call, label %if.then, label %if.else, !dbg !20 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: %Optional.Get.call = call ptr @_CGet.Optional.Core.2313f7f09b1ddaea(ptr %o), !dbg !32 -// CHECK:STDOUT: %.loc5_12.2 = load i32, ptr %Optional.Get.call, align 4, !dbg !33 -// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.92c426649770bebd"(ptr %return, i32 %.loc5_12.2), !dbg !34 -// CHECK:STDOUT: ret void, !dbg !34 +// CHECK:STDOUT: %Optional.Get.call = call ptr @_CGet.Optional.Core.2313f7f09b1ddaea(ptr %o), !dbg !21 +// CHECK:STDOUT: %.loc5_12.2 = load i32, ptr %Optional.Get.call, align 4, !dbg !22 +// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.74c31136f84330b1"(ptr %return, i32 %.loc5_12.2), !dbg !23 +// CHECK:STDOUT: ret void, !dbg !23 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: call void @_CNone.Optional.Core.7a89a067095e6ec2(ptr %return), !dbg !37 -// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: call void @_CNone.Optional.Core.787b67b8b3ba12b7(ptr %return), !dbg !26 +// CHECK:STDOUT: ret void, !dbg !29 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CAddOrRemoveConst.Main(i32 %a, i32 %b) #0 !dbg !42 { +// CHECK:STDOUT: define void @_CAddOrRemoveConst.Main(i32 %a, i32 %b) #0 !dbg !31 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var.loc11 = alloca <{ i32, i1 }>, align 4, !dbg !47 -// CHECK:STDOUT: %_.var.loc12 = alloca <{ i32, i1 }>, align 4, !dbg !50 -// CHECK:STDOUT: %_.var.loc13 = alloca <{ i32, i1 }>, align 4, !dbg !53 -// CHECK:STDOUT: %_.var.loc14 = alloca <{ i32, i1 }>, align 4, !dbg !56 -// CHECK:STDOUT: %_.var.loc15 = alloca <{ i32, i1 }>, align 4, !dbg !59 -// CHECK:STDOUT: %_.var.loc16 = alloca <{ i32, i1 }>, align 4, !dbg !62 -// CHECK:STDOUT: %_.var.loc17 = alloca <{ i32, i1 }>, align 4, !dbg !65 -// CHECK:STDOUT: %_.var.loc18 = alloca <{ i32, i1 }>, align 4, !dbg !68 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc11), !dbg !47 -// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.92c426649770bebd"(ptr %_.var.loc11, i32 %a), !dbg !47 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc12), !dbg !50 -// CHECK:STDOUT: call void @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.248615d81fc08054"(ptr %_.var.loc12, i32 %a), !dbg !50 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc13), !dbg !53 -// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.d6e700eea5cb3a8a"(ptr %_.var.loc13, i32 %a), !dbg !53 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc14), !dbg !56 -// CHECK:STDOUT: call void @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.ec9aaf5d097f6733"(ptr %_.var.loc14, i32 %a), !dbg !56 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !59 -// CHECK:STDOUT: call void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.248615d81fc08054"(ptr %_.var.loc15, i32 %b), !dbg !59 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !62 -// CHECK:STDOUT: call void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.9bb1d77ced8f2f6a"(ptr %_.var.loc16, i32 %b), !dbg !62 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc17), !dbg !65 -// CHECK:STDOUT: call void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.ec9aaf5d097f6733"(ptr %_.var.loc17, i32 %b), !dbg !65 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18), !dbg !68 -// CHECK:STDOUT: call void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.29795936b1d307ab"(ptr %_.var.loc18, i32 %b), !dbg !68 -// CHECK:STDOUT: call void @"_CSelfDestruct.eac799a35c2defc6:core.Destroy.Core"(ptr %_.var.loc18), !dbg !68 -// CHECK:STDOUT: call void @"_CSelfDestruct.b31b882ee89b561f:core.Destroy.Core"(ptr %_.var.loc17), !dbg !65 -// CHECK:STDOUT: call void @"_CSelfDestruct.9fb526f88602cc0d:core.Destroy.Core"(ptr %_.var.loc16), !dbg !62 -// CHECK:STDOUT: call void @"_CSelfDestruct.aff56ab67b39141f:core.Destroy.Core"(ptr %_.var.loc15), !dbg !59 -// CHECK:STDOUT: call void @"_CSelfDestruct.eac799a35c2defc6:core.Destroy.Core"(ptr %_.var.loc14), !dbg !56 -// CHECK:STDOUT: call void @"_CSelfDestruct.b31b882ee89b561f:core.Destroy.Core"(ptr %_.var.loc13), !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.9fb526f88602cc0d:core.Destroy.Core"(ptr %_.var.loc12), !dbg !50 -// CHECK:STDOUT: call void @"_CSelfDestruct.aff56ab67b39141f:core.Destroy.Core"(ptr %_.var.loc11), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !71 +// CHECK:STDOUT: %_.var.loc11 = alloca <{ i32, i1 }>, align 4, !dbg !36 +// CHECK:STDOUT: %_.var.loc12 = alloca <{ i32, i1 }>, align 4, !dbg !39 +// CHECK:STDOUT: %_.var.loc13 = alloca <{ i32, i1 }>, align 4, !dbg !42 +// CHECK:STDOUT: %_.var.loc14 = alloca <{ i32, i1 }>, align 4, !dbg !45 +// CHECK:STDOUT: %_.var.loc15 = alloca <{ i32, i1 }>, align 4, !dbg !48 +// CHECK:STDOUT: %_.var.loc16 = alloca <{ i32, i1 }>, align 4, !dbg !51 +// CHECK:STDOUT: %_.var.loc17 = alloca <{ i32, i1 }>, align 4, !dbg !54 +// CHECK:STDOUT: %_.var.loc18 = alloca <{ i32, i1 }>, align 4, !dbg !57 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc11), !dbg !36 +// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.74c31136f84330b1"(ptr %_.var.loc11, i32 %a), !dbg !36 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc12), !dbg !39 +// CHECK:STDOUT: call void @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.bd87f884f714419a"(ptr %_.var.loc12, i32 %a), !dbg !39 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc13), !dbg !42 +// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.65d0ac77bdf469d0"(ptr %_.var.loc13, i32 %a), !dbg !42 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc14), !dbg !45 +// CHECK:STDOUT: call void @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.9bf3cfed350cc00b"(ptr %_.var.loc14, i32 %a), !dbg !45 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !48 +// CHECK:STDOUT: call void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.bd87f884f714419a"(ptr %_.var.loc15, i32 %b), !dbg !48 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !51 +// CHECK:STDOUT: call void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.c0697012bd57e06d"(ptr %_.var.loc16, i32 %b), !dbg !51 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc17), !dbg !54 +// CHECK:STDOUT: call void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.9bf3cfed350cc00b"(ptr %_.var.loc17, i32 %b), !dbg !54 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18), !dbg !57 +// CHECK:STDOUT: call void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.3d5265f4c4ec9eb6"(ptr %_.var.loc18, i32 %b), !dbg !57 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.210689ed411503f3(ptr %_.var.loc18), !dbg !57 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.32ee0da637ab0071(ptr %_.var.loc17), !dbg !54 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9458de9f4c4a772d(ptr %_.var.loc16), !dbg !51 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.53c35e954ca62889(ptr %_.var.loc15), !dbg !48 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.210689ed411503f3(ptr %_.var.loc14), !dbg !45 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.32ee0da637ab0071(ptr %_.var.loc13), !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9458de9f4c4a772d(ptr %_.var.loc12), !dbg !39 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.53c35e954ca62889(ptr %_.var.loc11), !dbg !36 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.00376942ebc5eb13:core.Destroy.Core"(ptr %self) #0 !dbg !73 { +// CHECK:STDOUT: define weak_odr void @"_COp.00376942ebc5eb13:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !62 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !75 +// CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.00376942ebc5eb13:core.Destroy.Core"(ptr %self) #0 !dbg !77 { +// CHECK:STDOUT: define weak_odr void @"_COp.6bcc43acb0485959:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.00376942ebc5eb13:core.Destroy.Core"(ptr %self), !dbg !79 -// CHECK:STDOUT: ret void, !dbg !79 +// CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.6bcc43acb0485959:core.Destroy.Core"(ptr %self) #0 !dbg !81 { +// CHECK:STDOUT: define weak_odr void @"_COp.8a1de9c974566080:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !70 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !83 +// CHECK:STDOUT: %.loc18_3.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !72 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc18_3.1.has_value), !dbg !72 +// CHECK:STDOUT: %.loc18_3.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !72 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.422f36c0425d22b8(ptr %.loc18_3.4.value), !dbg !72 +// CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.6bcc43acb0485959:core.Destroy.Core"(ptr %self) #0 !dbg !85 { +// CHECK:STDOUT: define weak_odr void @"_COp.6b3f634b94e7fb94:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !74 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.6bcc43acb0485959:core.Destroy.Core"(ptr %self), !dbg !87 -// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: %.loc18_3.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !76 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc18_3.1.has_value), !dbg !76 +// CHECK:STDOUT: %.loc18_3.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !76 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.422f36c0425d22b8(ptr %.loc18_3.4.value), !dbg !76 +// CHECK:STDOUT: ret void, !dbg !76 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.856588b5d1353dcd:core.Destroy.Core"(ptr %self) #0 !dbg !89 { +// CHECK:STDOUT: define weak_odr void @"_COp.6201e84caab74866:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !78 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !91 +// CHECK:STDOUT: ret void, !dbg !80 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %self) #0 !dbg !93 { +// CHECK:STDOUT: define weak_odr void @"_COp.b3126fe3b97d1b85:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !82 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !95 +// CHECK:STDOUT: ret void, !dbg !84 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.356614d4c5810505:core.Destroy.Core"(ptr %self) #0 !dbg !97 { +// CHECK:STDOUT: define weak_odr void @"_COp.6f1424a1f3fc4182:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !86 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_3.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !99 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc18_3.1.has_value), !dbg !99 -// CHECK:STDOUT: %.loc18_3.2.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !99 -// CHECK:STDOUT: call void @"_CSelfDestruct.856588b5d1353dcd:core.Destroy.Core"(ptr %.loc18_3.2.value), !dbg !99 -// CHECK:STDOUT: ret void, !dbg !99 +// CHECK:STDOUT: %.loc16_3.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !88 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc16_3.1.has_value), !dbg !88 +// CHECK:STDOUT: %.loc16_3.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !88 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.38552a897eb918eb(ptr %.loc16_3.4.value), !dbg !88 +// CHECK:STDOUT: ret void, !dbg !88 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.356614d4c5810505:core.Destroy.Core"(ptr %self) #0 !dbg !101 { +// CHECK:STDOUT: define weak_odr void @"_COp.af28a2b9e8fe42a8:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !92 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.356614d4c5810505:core.Destroy.Core"(ptr %self), !dbg !103 -// CHECK:STDOUT: ret void, !dbg !103 +// CHECK:STDOUT: %.loc16_3.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !94 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc16_3.1.has_value), !dbg !94 +// CHECK:STDOUT: %.loc16_3.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !94 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.38552a897eb918eb(ptr %.loc16_3.4.value), !dbg !94 +// CHECK:STDOUT: ret void, !dbg !94 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.06d808b39c7c8915:core.Destroy.Core"(ptr %self) #0 !dbg !105 { +// CHECK:STDOUT: define weak_odr void @"_COp.749cb82e745a8200:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !96 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc18_3.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !107 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc18_3.1.has_value), !dbg !107 -// CHECK:STDOUT: %.loc18_3.2.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !107 -// CHECK:STDOUT: call void @"_CSelfDestruct.856588b5d1353dcd:core.Destroy.Core"(ptr %.loc18_3.2.value), !dbg !107 -// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: ret void, !dbg !98 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.06d808b39c7c8915:core.Destroy.Core"(ptr %self) #0 !dbg !109 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.06d808b39c7c8915:core.Destroy.Core"(ptr %self), !dbg !111 -// CHECK:STDOUT: ret void, !dbg !111 +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.2313f7f09b1ddaea(ptr %self) #0 !dbg !101 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70"(ptr %self), !dbg !107 +// CHECK:STDOUT: ret i1 %1, !dbg !108 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b31b882ee89b561f:core.Destroy.Core"(ptr %self) #0 !dbg !113 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !115 +// CHECK:STDOUT: define linkonce_odr ptr @_CGet.Optional.Core.2313f7f09b1ddaea(ptr %self) #0 !dbg !110 { +// CHECK:STDOUT: %1 = call ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70"(ptr %self), !dbg !116 +// CHECK:STDOUT: ret ptr %1, !dbg !117 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.eac799a35c2defc6:core.Destroy.Core"(ptr %self) #0 !dbg !117 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !119 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.74c31136f84330b1"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !119 { +// CHECK:STDOUT: call void @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.787b67b8b3ba12b7"(ptr %return, i32 %self), !dbg !124 +// CHECK:STDOUT: ret void, !dbg !125 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.eac799a35c2defc6:core.Destroy.Core"(ptr %self) #0 !dbg !121 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.eac799a35c2defc6: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.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self) #0 !dbg !125 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !127 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self) #0 !dbg !129 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.b3126fe3b97d1b85:core.Destroy.Core"(ptr %self), !dbg !131 +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.787b67b8b3ba12b7(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !127 { +// CHECK:STDOUT: call void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.de74407914bccca6"(ptr %return), !dbg !130 // CHECK:STDOUT: ret void, !dbg !131 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %self) #0 !dbg !133 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !135 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.2e0c223a4e2f3d14:core.Destroy.Core"(ptr %self) #0 !dbg !137 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !139 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc16_3.1.has_value), !dbg !139 -// CHECK:STDOUT: %.loc16_3.2.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !139 -// CHECK:STDOUT: call void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %.loc16_3.2.value), !dbg !139 -// CHECK:STDOUT: ret void, !dbg !139 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2e0c223a4e2f3d14:core.Destroy.Core"(ptr %self) #0 !dbg !141 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2e0c223a4e2f3d14:core.Destroy.Core"(ptr %self), !dbg !143 -// CHECK:STDOUT: ret void, !dbg !143 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.091f5ee9610db5f4:core.Destroy.Core"(ptr %self) #0 !dbg !145 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !147 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %.loc16_3.1.has_value), !dbg !147 -// CHECK:STDOUT: %.loc16_3.2.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !147 -// CHECK:STDOUT: call void @"_CSelfDestruct.993995cdb1dad067:core.Destroy.Core"(ptr %.loc16_3.2.value), !dbg !147 -// CHECK:STDOUT: ret void, !dbg !147 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.091f5ee9610db5f4:core.Destroy.Core"(ptr %self) #0 !dbg !149 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.091f5ee9610db5f4:core.Destroy.Core"(ptr %self), !dbg !151 -// CHECK:STDOUT: ret void, !dbg !151 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.aff56ab67b39141f:core.Destroy.Core"(ptr %self) #0 !dbg !153 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !155 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.9fb526f88602cc0d: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.9fb526f88602cc0d:core.Destroy.Core"(ptr %self) #0 !dbg !161 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.9fb526f88602cc0d: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 linkonce_odr i1 @_CHasValue.Optional.Core.2313f7f09b1ddaea(ptr %self) #0 !dbg !165 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70"(ptr %self), !dbg !171 -// CHECK:STDOUT: ret i1 %1, !dbg !172 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @_CGet.Optional.Core.2313f7f09b1ddaea(ptr %self) #0 !dbg !174 { -// CHECK:STDOUT: %1 = call ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70"(ptr %self), !dbg !180 -// CHECK:STDOUT: ret ptr %1, !dbg !181 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.92c426649770bebd"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !183 { -// CHECK:STDOUT: call void @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.7a89a067095e6ec2"(ptr %return, i32 %self), !dbg !188 -// CHECK:STDOUT: ret void, !dbg !189 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.7a89a067095e6ec2(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !191 { -// CHECK:STDOUT: call void @"_CNone.74becf39533834ee:OptionalStorage.Core.8e967a953f499830"(ptr %return), !dbg !194 -// CHECK:STDOUT: ret void, !dbg !195 -// 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.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.248615d81fc08054"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !197 { -// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.92c426649770bebd"(ptr %return, i32 %self), !dbg !202 -// CHECK:STDOUT: ret void, !dbg !203 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.bd87f884f714419a"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !133 { +// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.74c31136f84330b1"(ptr %return, i32 %self), !dbg !138 +// CHECK:STDOUT: ret void, !dbg !139 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.d6e700eea5cb3a8a"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !205 { -// CHECK:STDOUT: call void @"_CConvert.bf8402781e65ec12:OptionalAs.1dac4564233fecd1.Core.73d8f19de03f3260"(ptr %return, i32 %self), !dbg !210 -// CHECK:STDOUT: ret void, !dbg !211 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.65d0ac77bdf469d0"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !141 { +// CHECK:STDOUT: call void @"_CConvert.56158d26cb64337a:OptionalAs.5cc57aaa5e35eede.Core.98b8f93c1b92fd53"(ptr %return, i32 %self), !dbg !146 +// CHECK:STDOUT: ret void, !dbg !147 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.ec9aaf5d097f6733"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !213 { -// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.d6e700eea5cb3a8a"(ptr %return, i32 %self), !dbg !218 -// CHECK:STDOUT: ret void, !dbg !219 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.9bf3cfed350cc00b"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !149 { +// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.65d0ac77bdf469d0"(ptr %return, i32 %self), !dbg !154 +// CHECK:STDOUT: ret void, !dbg !155 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.248615d81fc08054"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !221 { -// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.92c426649770bebd"(ptr %return, i32 %self), !dbg !227 -// CHECK:STDOUT: ret void, !dbg !228 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.bd87f884f714419a"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !157 { +// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.74c31136f84330b1"(ptr %return, i32 %self), !dbg !163 +// CHECK:STDOUT: ret void, !dbg !164 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.9bb1d77ced8f2f6a"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !230 { -// CHECK:STDOUT: call void @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.248615d81fc08054"(ptr %return, i32 %self), !dbg !236 -// CHECK:STDOUT: ret void, !dbg !237 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.c0697012bd57e06d"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !166 { +// CHECK:STDOUT: call void @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.bd87f884f714419a"(ptr %return, i32 %self), !dbg !172 +// CHECK:STDOUT: ret void, !dbg !173 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.ec9aaf5d097f6733"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !239 { -// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.d6e700eea5cb3a8a"(ptr %return, i32 %self), !dbg !245 -// CHECK:STDOUT: ret void, !dbg !246 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.9bf3cfed350cc00b"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !175 { +// CHECK:STDOUT: call void @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.65d0ac77bdf469d0"(ptr %return, i32 %self), !dbg !181 +// CHECK:STDOUT: ret void, !dbg !182 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.29795936b1d307ab"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !248 { -// CHECK:STDOUT: call void @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.ec9aaf5d097f6733"(ptr %return, i32 %self), !dbg !254 -// CHECK:STDOUT: ret void, !dbg !255 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.3d5265f4c4ec9eb6"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !184 { +// CHECK:STDOUT: call void @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.9bf3cfed350cc00b"(ptr %return, i32 %self), !dbg !190 +// CHECK:STDOUT: ret void, !dbg !191 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70"(ptr %value) #0 !dbg !257 { -// CHECK:STDOUT: %1 = icmp eq ptr %value, null, !dbg !263 -// CHECK:STDOUT: %2 = xor i1 %1, true, !dbg !264 -// CHECK:STDOUT: ret i1 %2, !dbg !265 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.210689ed411503f3(ptr %t) #0 !dbg !194 { +// CHECK:STDOUT: call void @"_COp.6201e84caab74866:core.SubobjectDestroy.Core"(ptr %t), !dbg !198 +// CHECK:STDOUT: ret void, !dbg !199 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70"(ptr %value) #0 !dbg !267 { -// CHECK:STDOUT: ret ptr %value, !dbg !273 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.32ee0da637ab0071(ptr %t) #0 !dbg !201 { +// CHECK:STDOUT: ret void, !dbg !206 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.7a89a067095e6ec2"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !275 { -// CHECK:STDOUT: call void @_CSome.Optional.Core.7a89a067095e6ec2(ptr %return, i32 %self), !dbg !281 -// CHECK:STDOUT: ret void, !dbg !282 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9458de9f4c4a772d(ptr %t) #0 !dbg !208 { +// CHECK:STDOUT: call void @"_COp.749cb82e745a8200:core.SubobjectDestroy.Core"(ptr %t), !dbg !212 +// CHECK:STDOUT: ret void, !dbg !213 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CNone.74becf39533834ee:OptionalStorage.Core.8e967a953f499830"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !284 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !291 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !291 -// CHECK:STDOUT: ret void, !dbg !292 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.53c35e954ca62889(ptr %t) #0 !dbg !215 { +// CHECK:STDOUT: ret void, !dbg !220 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CConvert.bf8402781e65ec12:OptionalAs.1dac4564233fecd1.Core.73d8f19de03f3260"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !293 { -// CHECK:STDOUT: %temp = alloca i32, align 4, !dbg !298 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !298 -// CHECK:STDOUT: %1 = call i32 @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.1f633674d24603c2"(i32 %self), !dbg !298 -// CHECK:STDOUT: store i32 %1, ptr %temp, align 4, !dbg !298 -// CHECK:STDOUT: %2 = load i32, ptr %temp, align 4, !dbg !298 -// CHECK:STDOUT: call void @_CSome.Optional.Core.ee868d3fa7ca7f00(ptr %return, i32 %2), !dbg !299 -// CHECK:STDOUT: call void @"_CSelfDestruct.00376942ebc5eb13:core.Destroy.Core"(ptr %temp), !dbg !298 -// CHECK:STDOUT: ret void, !dbg !300 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %t) #0 !dbg !222 { +// CHECK:STDOUT: ret void, !dbg !227 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.7a89a067095e6ec2(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !302 { -// CHECK:STDOUT: call void @"_CSome.74becf39533834ee:OptionalStorage.Core.8e967a953f499830"(ptr %return, i32 %value), !dbg !307 -// CHECK:STDOUT: ret void, !dbg !308 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.422f36c0425d22b8(ptr %t) #0 !dbg !229 { +// CHECK:STDOUT: ret void, !dbg !234 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.1f633674d24603c2"(i32 %self) #0 !dbg !310 { -// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self), !dbg !315 -// CHECK:STDOUT: ret i32 %1, !dbg !318 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.38552a897eb918eb(ptr %t) #0 !dbg !236 { +// CHECK:STDOUT: ret void, !dbg !241 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.ee868d3fa7ca7f00(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !320 { -// CHECK:STDOUT: call void @"_CSome.74becf39533834ee:OptionalStorage.Core.8e085bdd1d912ef2"(ptr %return, i32 %value), !dbg !325 -// CHECK:STDOUT: ret void, !dbg !326 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70"(ptr %value) #0 !dbg !243 { +// CHECK:STDOUT: %1 = icmp eq ptr %value, null, !dbg !249 +// CHECK:STDOUT: %2 = xor i1 %1, true, !dbg !250 +// CHECK:STDOUT: ret i1 %2, !dbg !251 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CSome.74becf39533834ee:OptionalStorage.Core.8e967a953f499830"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !328 { -// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !337 -// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !337 -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !339 -// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !339 -// CHECK:STDOUT: ret void, !dbg !340 +// CHECK:STDOUT: define linkonce_odr ptr @"_CGet.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70"(ptr %value) #0 !dbg !253 { +// CHECK:STDOUT: ret ptr %value, !dbg !259 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !343 { -// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !348 -// CHECK:STDOUT: ret i32 %1, !dbg !350 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.787b67b8b3ba12b7"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !261 { +// CHECK:STDOUT: call void @_CSome.Optional.Core.787b67b8b3ba12b7(ptr %return, i32 %self), !dbg !267 +// CHECK:STDOUT: ret void, !dbg !268 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_CSome.74becf39533834ee:OptionalStorage.Core.8e085bdd1d912ef2"(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: %1 = call i32 @"_COp.a7c16f707f533a23:Copy.Core.2fad9574e050607e"(i32 %self), !dbg !362 -// CHECK:STDOUT: store i32 %1, 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 @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.de74407914bccca6"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !270 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !277 +// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !277 +// CHECK:STDOUT: ret void, !dbg !278 // 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 !366 { -// CHECK:STDOUT: ret i32 %self, !dbg !372 +// CHECK:STDOUT: define linkonce_odr void @"_CConvert.56158d26cb64337a:OptionalAs.5cc57aaa5e35eede.Core.98b8f93c1b92fd53"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !279 { +// CHECK:STDOUT: %temp = alloca i32, align 4, !dbg !284 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %temp), !dbg !284 +// CHECK:STDOUT: %1 = call i32 @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.1f633674d24603c2"(i32 %self), !dbg !284 +// CHECK:STDOUT: store i32 %1, ptr %temp, align 4, !dbg !284 +// CHECK:STDOUT: %2 = load i32, ptr %temp, align 4, !dbg !284 +// CHECK:STDOUT: call void @_CSome.Optional.Core.45dd3cdcb0ab47d7(ptr %return, i32 %2), !dbg !285 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e7e31ffa4cd36781(ptr %temp), !dbg !284 +// CHECK:STDOUT: ret void, !dbg !286 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @"_COp.a7c16f707f533a23:Copy.Core.2fad9574e050607e"(i32 %self) #0 !dbg !375 { -// CHECK:STDOUT: ret i32 %self, !dbg !382 +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.787b67b8b3ba12b7(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !288 { +// CHECK:STDOUT: call void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.de74407914bccca6"(ptr %return, i32 %value), !dbg !293 +// CHECK:STDOUT: ret void, !dbg !294 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.1f633674d24603c2"(i32 %self) #0 !dbg !296 { +// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self), !dbg !301 +// CHECK:STDOUT: ret i32 %1, !dbg !304 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.45dd3cdcb0ab47d7(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !306 { +// CHECK:STDOUT: call void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.823a8f9f91058c72"(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 void @_CSelfDestruct.Core.e7e31ffa4cd36781(ptr %t) #0 !dbg !314 { +// CHECK:STDOUT: call void @"_COp.00376942ebc5eb13:core.SubobjectDestroy.Core"(ptr %t), !dbg !318 +// CHECK:STDOUT: ret void, !dbg !319 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.de74407914bccca6"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !321 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !330 +// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !330 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !332 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !332 +// CHECK:STDOUT: ret void, !dbg !333 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !336 { +// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !341 +// CHECK:STDOUT: ret i32 %1, !dbg !343 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.823a8f9f91058c72"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !345 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !354 +// CHECK:STDOUT: %1 = call i32 @"_COp.a7c16f707f533a23:Copy.Core.2fad9574e050607e"(i32 %self), !dbg !355 +// CHECK:STDOUT: store i32 %1, ptr %value, align 4, !dbg !354 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !356 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !356 +// CHECK:STDOUT: ret void, !dbg !357 +// 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 !359 { +// CHECK:STDOUT: ret i32 %self, !dbg !365 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr i32 @"_COp.a7c16f707f533a23:Copy.Core.2fad9574e050607e"(i32 %self) #0 !dbg !368 { +// CHECK:STDOUT: ret i32 %self, !dbg !375 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.b31b882ee89b561f:core.Destroy.Core", { 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.eac799a35c2defc6:core.Destroy.Core", { 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.aff56ab67b39141f:core.Destroy.Core", { 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.9fb526f88602cc0d:core.Destroy.Core", { 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.92c426649770bebd", { 0, 1, 3, 2 } +// CHECK:STDOUT: uselistorder ptr @"_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.74c31136f84330b1", { 0, 1, 3, 2 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 0, 8, 7, 6, 5, 4, 3, 2, 1 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.210689ed411503f3, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.32ee0da637ab0071, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9458de9f4c4a772d, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.53c35e954ca62889, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.8242e48f93ef210e, { 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.422f36c0425d22b8, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.38552a897eb918eb, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -470,265 +411,237 @@ fn F(c: Core.Optional(C*)) -> Core.Optional(C*) { // CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !4, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !8 = !{null, !7} +// CHECK:STDOUT: !8 = !{!7, !7} // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !10 = !{null, !6} +// CHECK:STDOUT: !10 = !{null, !6, !6} // CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{!7, !7} +// CHECK:STDOUT: !12 = !{null, !7} // CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = !{null, !6, !6} -// CHECK:STDOUT: !15 = !DISubroutineType(types: !14) -// CHECK:STDOUT: !16 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !16, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !20) -// CHECK:STDOUT: !18 = !DILocalVariable(arg: 1, scope: !17, type: !7) -// CHECK:STDOUT: !19 = !DILocation(line: 164, column: 19, scope: !17) -// CHECK:STDOUT: !20 = !{!18} -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 3, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !24) -// 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: "Convert", linkageName: "_CConvert.Main", scope: null, file: !4, line: 3, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !41) -// CHECK:STDOUT: !26 = !DILocalVariable(arg: 1, scope: !25, type: !7) -// CHECK:STDOUT: !30 = !DILocation(line: 4, column: 7, scope: !25) -// CHECK:STDOUT: !31 = !DILocation(line: 4, column: 6, scope: !25) -// CHECK:STDOUT: !32 = !DILocation(line: 5, column: 13, scope: !25) -// CHECK:STDOUT: !33 = !DILocation(line: 5, column: 12, scope: !25) -// CHECK:STDOUT: !34 = !DILocation(line: 5, column: 5, scope: !25) -// CHECK:STDOUT: !35 = !{!7, !6} -// CHECK:STDOUT: !36 = !DISubroutineType(types: !35) -// CHECK:STDOUT: !37 = !DILocation(line: 7, column: 10, scope: !25) -// CHECK:STDOUT: !38 = !{!7} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !40 = !DILocation(line: 7, column: 3, scope: !25) -// CHECK:STDOUT: !41 = !{!26} -// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "AddOrRemoveConst", linkageName: "_CAddOrRemoveConst.Main", scope: null, file: !4, line: 10, type: !15, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !72) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !6) -// CHECK:STDOUT: !44 = !DILocalVariable(arg: 2, scope: !42, type: !6) -// CHECK:STDOUT: !47 = !DILocation(line: 11, column: 3, scope: !42) -// CHECK:STDOUT: !50 = !DILocation(line: 12, column: 3, scope: !42) -// CHECK:STDOUT: !53 = !DILocation(line: 13, column: 3, scope: !42) -// CHECK:STDOUT: !56 = !DILocation(line: 14, column: 3, scope: !42) -// CHECK:STDOUT: !59 = !DILocation(line: 15, column: 3, scope: !42) -// CHECK:STDOUT: !62 = !DILocation(line: 16, column: 3, scope: !42) -// CHECK:STDOUT: !65 = !DILocation(line: 17, column: 3, scope: !42) -// CHECK:STDOUT: !68 = !DILocation(line: 18, column: 3, scope: !42) -// CHECK:STDOUT: !71 = !DILocation(line: 10, column: 1, scope: !42) -// CHECK:STDOUT: !72 = !{!43, !44} -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.00376942ebc5eb13:core.Destroy.Core", scope: null, file: !4, line: 13, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !76) -// CHECK:STDOUT: !74 = !DILocalVariable(arg: 1, scope: !73, type: !7) -// CHECK:STDOUT: !75 = !DILocation(line: 13, column: 10, scope: !73) -// CHECK:STDOUT: !76 = !{!74} -// CHECK:STDOUT: !77 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.00376942ebc5eb13: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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.6bcc43acb0485959:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !84) -// CHECK:STDOUT: !82 = !DILocalVariable(arg: 1, scope: !81, type: !7) -// CHECK:STDOUT: !83 = !DILocation(line: 18, column: 3, scope: !81) -// CHECK:STDOUT: !84 = !{!82} -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6bcc43acb0485959: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: 18, column: 3, scope: !85) -// CHECK:STDOUT: !88 = !{!86} -// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.856588b5d1353dcd: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.48e0adf639fe7af4: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.356614d4c5810505: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.356614d4c5810505:core.Destroy.Core", scope: null, file: !4, line: 18, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !104) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.Main", scope: null, file: !4, line: 3, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !30) +// CHECK:STDOUT: !15 = !DILocalVariable(arg: 1, scope: !14, type: !7) +// CHECK:STDOUT: !19 = !DILocation(line: 4, column: 7, scope: !14) +// CHECK:STDOUT: !20 = !DILocation(line: 4, column: 6, scope: !14) +// CHECK:STDOUT: !21 = !DILocation(line: 5, column: 13, scope: !14) +// CHECK:STDOUT: !22 = !DILocation(line: 5, column: 12, scope: !14) +// CHECK:STDOUT: !23 = !DILocation(line: 5, column: 5, scope: !14) +// CHECK:STDOUT: !24 = !{!7, !6} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = !DILocation(line: 7, column: 10, scope: !14) +// CHECK:STDOUT: !27 = !{!7} +// CHECK:STDOUT: !28 = !DISubroutineType(types: !27) +// CHECK:STDOUT: !29 = !DILocation(line: 7, column: 3, scope: !14) +// CHECK:STDOUT: !30 = !{!15} +// CHECK:STDOUT: !31 = distinct !DISubprogram(name: "AddOrRemoveConst", linkageName: "_CAddOrRemoveConst.Main", scope: null, file: !4, line: 10, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !61) +// CHECK:STDOUT: !32 = !DILocalVariable(arg: 1, scope: !31, type: !6) +// CHECK:STDOUT: !33 = !DILocalVariable(arg: 2, scope: !31, type: !6) +// CHECK:STDOUT: !36 = !DILocation(line: 11, column: 3, scope: !31) +// CHECK:STDOUT: !39 = !DILocation(line: 12, column: 3, scope: !31) +// CHECK:STDOUT: !42 = !DILocation(line: 13, column: 3, scope: !31) +// CHECK:STDOUT: !45 = !DILocation(line: 14, column: 3, scope: !31) +// CHECK:STDOUT: !48 = !DILocation(line: 15, column: 3, scope: !31) +// CHECK:STDOUT: !51 = !DILocation(line: 16, column: 3, scope: !31) +// CHECK:STDOUT: !54 = !DILocation(line: 17, column: 3, scope: !31) +// CHECK:STDOUT: !57 = !DILocation(line: 18, column: 3, scope: !31) +// CHECK:STDOUT: !60 = !DILocation(line: 10, column: 1, scope: !31) +// CHECK:STDOUT: !61 = !{!32, !33} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Op", linkageName: "_COp.00376942ebc5eb13:core.SubobjectDestroy.Core", scope: null, file: !4, line: 13, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !65) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !7) +// CHECK:STDOUT: !64 = !DILocation(line: 13, column: 10, scope: !62) +// CHECK:STDOUT: !65 = !{!63} +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6bcc43acb0485959:core.SubobjectDestroy.Core", scope: null, file: !4, line: 18, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !69) +// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !7) +// CHECK:STDOUT: !68 = !DILocation(line: 18, column: 3, scope: !66) +// CHECK:STDOUT: !69 = !{!67} +// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8a1de9c974566080:core.SubobjectDestroy.Core", scope: null, file: !4, line: 18, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !73) +// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !7) +// CHECK:STDOUT: !72 = !DILocation(line: 18, column: 3, scope: !70) +// CHECK:STDOUT: !73 = !{!71} +// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6b3f634b94e7fb94:core.SubobjectDestroy.Core", scope: null, file: !4, line: 18, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !77) +// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !7) +// CHECK:STDOUT: !76 = !DILocation(line: 18, column: 3, scope: !74) +// CHECK:STDOUT: !77 = !{!75} +// CHECK:STDOUT: !78 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6201e84caab74866:core.SubobjectDestroy.Core", scope: null, file: !4, line: 18, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !81) +// CHECK:STDOUT: !79 = !DILocalVariable(arg: 1, scope: !78, type: !7) +// CHECK:STDOUT: !80 = !DILocation(line: 18, column: 3, scope: !78) +// CHECK:STDOUT: !81 = !{!79} +// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b3126fe3b97d1b85:core.SubobjectDestroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !85) +// CHECK:STDOUT: !83 = !DILocalVariable(arg: 1, scope: !82, type: !7) +// CHECK:STDOUT: !84 = !DILocation(line: 16, column: 3, scope: !82) +// CHECK:STDOUT: !85 = !{!83} +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6f1424a1f3fc4182:core.SubobjectDestroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !91) +// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !7) +// CHECK:STDOUT: !88 = !DILocation(line: 16, column: 3, scope: !86) +// CHECK:STDOUT: !89 = !{null, !6} +// CHECK:STDOUT: !90 = !DISubroutineType(types: !89) +// CHECK:STDOUT: !91 = !{!87} +// CHECK:STDOUT: !92 = distinct !DISubprogram(name: "Op", linkageName: "_COp.af28a2b9e8fe42a8:core.SubobjectDestroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !95) +// CHECK:STDOUT: !93 = !DILocalVariable(arg: 1, scope: !92, type: !7) +// CHECK:STDOUT: !94 = !DILocation(line: 16, column: 3, scope: !92) +// CHECK:STDOUT: !95 = !{!93} +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "Op", linkageName: "_COp.749cb82e745a8200:core.SubobjectDestroy.Core", scope: null, file: !4, line: 16, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !99) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !7) +// CHECK:STDOUT: !98 = !DILocation(line: 16, column: 3, scope: !96) +// CHECK:STDOUT: !99 = !{!97} +// CHECK:STDOUT: !100 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !101 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.2313f7f09b1ddaea", scope: null, file: !100, line: 36, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !109) // 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.06d808b39c7c8915: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: "SelfDestruct", linkageName: "_CSelfDestruct.06d808b39c7c8915: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.b31b882ee89b561f: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.eac799a35c2defc6: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.eac799a35c2defc6: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.b3126fe3b97d1b85:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !128) -// CHECK:STDOUT: !126 = !DILocalVariable(arg: 1, scope: !125, type: !7) -// CHECK:STDOUT: !127 = !DILocation(line: 16, column: 3, scope: !125) -// CHECK:STDOUT: !128 = !{!126} -// CHECK:STDOUT: !129 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.b3126fe3b97d1b85: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: 16, column: 3, scope: !129) -// CHECK:STDOUT: !132 = !{!130} -// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.993995cdb1dad067:core.Destroy.Core", scope: null, file: !4, line: 16, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !136) +// CHECK:STDOUT: !107 = !DILocation(line: 37, column: 12, scope: !101) +// CHECK:STDOUT: !108 = !DILocation(line: 37, column: 5, scope: !101) +// CHECK:STDOUT: !109 = !{!102} +// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.2313f7f09b1ddaea", scope: null, file: !100, line: 39, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !118) +// CHECK:STDOUT: !111 = !DILocalVariable(arg: 1, scope: !110, type: !7) +// CHECK:STDOUT: !116 = !DILocation(line: 40, column: 12, scope: !110) +// CHECK:STDOUT: !117 = !DILocation(line: 40, column: 5, scope: !110) +// CHECK:STDOUT: !118 = !{!111} +// CHECK:STDOUT: !119 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.74c31136f84330b1", scope: null, file: !100, line: 105, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !126) +// CHECK:STDOUT: !120 = !DILocalVariable(arg: 1, scope: !119, type: !6) +// CHECK:STDOUT: !124 = !DILocation(line: 106, column: 12, scope: !119) +// CHECK:STDOUT: !125 = !DILocation(line: 106, column: 5, scope: !119) +// CHECK:STDOUT: !126 = !{!120} +// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.787b67b8b3ba12b7", scope: null, file: !100, line: 30, type: !28, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !130 = !DILocation(line: 31, column: 12, scope: !127) +// CHECK:STDOUT: !131 = !DILocation(line: 31, column: 5, scope: !127) +// CHECK:STDOUT: !132 = !DIFile(filename: "{{.*}}/prelude/operators/as.carbon", directory: "") +// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.bd87f884f714419a", scope: null, file: !132, line: 43, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !140) // CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !6) -// CHECK:STDOUT: !135 = !DILocation(line: 16, column: 3, scope: !133) -// CHECK:STDOUT: !136 = !{!134} -// CHECK:STDOUT: !137 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2e0c223a4e2f3d14:core.Destroy.Core", scope: null, file: !4, line: 16, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !140) -// CHECK:STDOUT: !138 = !DILocalVariable(arg: 1, scope: !137, type: !7) -// CHECK:STDOUT: !139 = !DILocation(line: 16, column: 3, scope: !137) -// CHECK:STDOUT: !140 = !{!138} -// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2e0c223a4e2f3d14: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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.091f5ee9610db5f4: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: "SelfDestruct", linkageName: "_CSelfDestruct.091f5ee9610db5f4: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.aff56ab67b39141f: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.9fb526f88602cc0d: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.9fb526f88602cc0d: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: "HasValue", linkageName: "_CHasValue.Optional.Core.2313f7f09b1ddaea", scope: null, file: !16, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !173) -// CHECK:STDOUT: !166 = !DILocalVariable(arg: 1, scope: !165, type: !7) -// CHECK:STDOUT: !171 = !DILocation(line: 37, column: 12, scope: !165) -// CHECK:STDOUT: !172 = !DILocation(line: 37, column: 5, scope: !165) -// CHECK:STDOUT: !173 = !{!166} -// CHECK:STDOUT: !174 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.2313f7f09b1ddaea", scope: null, file: !16, line: 39, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !182) -// CHECK:STDOUT: !175 = !DILocalVariable(arg: 1, scope: !174, type: !7) -// CHECK:STDOUT: !180 = !DILocation(line: 40, column: 12, scope: !174) -// CHECK:STDOUT: !181 = !DILocation(line: 40, column: 5, scope: !174) -// CHECK:STDOUT: !182 = !{!175} -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.92c426649770bebd", scope: null, file: !16, line: 105, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !190) -// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !6) -// CHECK:STDOUT: !188 = !DILocation(line: 106, column: 12, scope: !183) -// CHECK:STDOUT: !189 = !DILocation(line: 106, column: 5, scope: !183) -// CHECK:STDOUT: !190 = !{!184} -// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.7a89a067095e6ec2", scope: null, file: !16, line: 30, type: !39, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !194 = !DILocation(line: 31, column: 12, scope: !191) -// CHECK:STDOUT: !195 = !DILocation(line: 31, column: 5, scope: !191) -// CHECK:STDOUT: !196 = !DIFile(filename: "{{.*}}/prelude/operators/as.carbon", directory: "") -// CHECK:STDOUT: !197 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.248615d81fc08054", scope: null, file: !196, line: 43, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !204) -// CHECK:STDOUT: !198 = !DILocalVariable(arg: 1, scope: !197, type: !6) -// CHECK:STDOUT: !202 = !DILocation(line: 43, column: 40, scope: !197) -// CHECK:STDOUT: !203 = !DILocation(line: 43, column: 33, scope: !197) -// CHECK:STDOUT: !204 = !{!198} -// CHECK:STDOUT: !205 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.d6e700eea5cb3a8a", scope: null, file: !16, line: 105, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !212) -// CHECK:STDOUT: !206 = !DILocalVariable(arg: 1, scope: !205, type: !6) -// CHECK:STDOUT: !210 = !DILocation(line: 106, column: 12, scope: !205) -// CHECK:STDOUT: !211 = !DILocation(line: 106, column: 5, scope: !205) -// CHECK:STDOUT: !212 = !{!206} -// CHECK:STDOUT: !213 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.ec9aaf5d097f6733", scope: null, file: !196, line: 43, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !220) -// CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !213, type: !6) -// CHECK:STDOUT: !218 = !DILocation(line: 43, column: 40, scope: !213) -// CHECK:STDOUT: !219 = !DILocation(line: 43, column: 33, scope: !213) -// CHECK:STDOUT: !220 = !{!214} -// CHECK:STDOUT: !221 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.248615d81fc08054", scope: null, file: !196, line: 47, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !229) -// CHECK:STDOUT: !222 = !DILocalVariable(arg: 1, scope: !221, type: !6) -// CHECK:STDOUT: !227 = !DILocation(line: 47, column: 34, scope: !221) -// CHECK:STDOUT: !228 = !DILocation(line: 47, column: 27, scope: !221) -// CHECK:STDOUT: !229 = !{!222} -// CHECK:STDOUT: !230 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.9bb1d77ced8f2f6a", scope: null, file: !196, line: 47, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !238) -// CHECK:STDOUT: !231 = !DILocalVariable(arg: 1, scope: !230, type: !6) -// CHECK:STDOUT: !236 = !DILocation(line: 47, column: 34, scope: !230) -// CHECK:STDOUT: !237 = !DILocation(line: 47, column: 27, scope: !230) -// CHECK:STDOUT: !238 = !{!231} -// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.ec9aaf5d097f6733", scope: null, file: !196, line: 47, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !247) -// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !6) -// CHECK:STDOUT: !245 = !DILocation(line: 47, column: 34, scope: !239) -// CHECK:STDOUT: !246 = !DILocation(line: 47, column: 27, scope: !239) -// CHECK:STDOUT: !247 = !{!240} -// CHECK:STDOUT: !248 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.29795936b1d307ab", scope: null, file: !196, line: 47, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !256) -// CHECK:STDOUT: !249 = !DILocalVariable(arg: 1, scope: !248, type: !6) -// CHECK:STDOUT: !254 = !DILocation(line: 47, column: 34, scope: !248) -// CHECK:STDOUT: !255 = !DILocation(line: 47, column: 27, scope: !248) -// CHECK:STDOUT: !256 = !{!249} -// CHECK:STDOUT: !257 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70", scope: null, file: !16, line: 172, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !266) -// CHECK:STDOUT: !258 = !DILocalVariable(arg: 1, scope: !257, type: !7) -// CHECK:STDOUT: !263 = !DILocation(line: 173, column: 16, scope: !257) -// CHECK:STDOUT: !264 = !DILocation(line: 173, column: 12, scope: !257) -// CHECK:STDOUT: !265 = !DILocation(line: 173, column: 5, scope: !257) -// CHECK:STDOUT: !266 = !{!258} -// CHECK:STDOUT: !267 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70", scope: null, file: !16, line: 175, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !274) -// CHECK:STDOUT: !268 = !DILocalVariable(arg: 1, scope: !267, type: !7) -// CHECK:STDOUT: !273 = !DILocation(line: 176, column: 5, scope: !267) -// CHECK:STDOUT: !274 = !{!268} -// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.7a89a067095e6ec2", scope: null, file: !16, line: 80, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !283) -// CHECK:STDOUT: !276 = !DILocalVariable(arg: 1, scope: !275, type: !6) -// CHECK:STDOUT: !281 = !DILocation(line: 81, column: 12, scope: !275) -// CHECK:STDOUT: !282 = !DILocation(line: 81, column: 5, scope: !275) -// CHECK:STDOUT: !283 = !{!276} -// CHECK:STDOUT: !284 = distinct !DISubprogram(name: "None", linkageName: "_CNone.74becf39533834ee:OptionalStorage.Core.8e967a953f499830", scope: null, file: !16, line: 125, type: !39, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !291 = !DILocation(line: 128, column: 5, scope: !284) -// CHECK:STDOUT: !292 = !DILocation(line: 129, column: 5, scope: !284) -// CHECK:STDOUT: !293 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.bf8402781e65ec12:OptionalAs.1dac4564233fecd1.Core.73d8f19de03f3260", scope: null, file: !16, line: 87, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !301) -// CHECK:STDOUT: !294 = !DILocalVariable(arg: 1, scope: !293, type: !6) -// CHECK:STDOUT: !298 = !DILocation(line: 88, column: 29, scope: !293) -// CHECK:STDOUT: !299 = !DILocation(line: 88, column: 12, scope: !293) -// CHECK:STDOUT: !300 = !DILocation(line: 88, column: 5, scope: !293) -// CHECK:STDOUT: !301 = !{!294} -// CHECK:STDOUT: !302 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.7a89a067095e6ec2", scope: null, file: !16, line: 33, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !309) -// CHECK:STDOUT: !303 = !DILocalVariable(arg: 1, scope: !302, type: !6) -// CHECK:STDOUT: !307 = !DILocation(line: 34, column: 12, scope: !302) -// CHECK:STDOUT: !308 = !DILocation(line: 34, column: 5, scope: !302) -// CHECK:STDOUT: !309 = !{!303} -// CHECK:STDOUT: !310 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.1f633674d24603c2", scope: null, file: !196, line: 43, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !319) -// CHECK:STDOUT: !311 = !DILocalVariable(arg: 1, scope: !310, type: !6) -// CHECK:STDOUT: !315 = !DILocation(line: 43, column: 40, scope: !310) -// CHECK:STDOUT: !316 = !{!6, !6} -// CHECK:STDOUT: !317 = !DISubroutineType(types: !316) -// CHECK:STDOUT: !318 = !DILocation(line: 43, column: 33, scope: !310) -// CHECK:STDOUT: !319 = !{!311} -// CHECK:STDOUT: !320 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.ee868d3fa7ca7f00", scope: null, file: !16, line: 33, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !327) -// CHECK:STDOUT: !321 = !DILocalVariable(arg: 1, scope: !320, type: !6) -// CHECK:STDOUT: !325 = !DILocation(line: 34, column: 12, scope: !320) -// CHECK:STDOUT: !326 = !DILocation(line: 34, column: 5, scope: !320) -// CHECK:STDOUT: !327 = !{!321} -// CHECK:STDOUT: !328 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.74becf39533834ee:OptionalStorage.Core.8e967a953f499830", scope: null, file: !16, line: 131, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !341) -// CHECK:STDOUT: !329 = !DILocalVariable(arg: 1, scope: !328, type: !6) -// CHECK:STDOUT: !337 = !DILocation(line: 137, column: 5, scope: !328) -// CHECK:STDOUT: !339 = !DILocation(line: 138, column: 5, scope: !328) -// CHECK:STDOUT: !340 = !DILocation(line: 139, column: 5, scope: !328) -// CHECK:STDOUT: !341 = !{!329} -// CHECK:STDOUT: !342 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") -// CHECK:STDOUT: !343 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !342, line: 64, type: !317, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !351) -// CHECK:STDOUT: !344 = !DILocalVariable(arg: 1, scope: !343, type: !6) -// CHECK:STDOUT: !348 = !DILocation(line: 66, column: 17, scope: !343) -// CHECK:STDOUT: !350 = !DILocation(line: 66, column: 5, scope: !343) -// CHECK:STDOUT: !351 = !{!344} -// CHECK:STDOUT: !352 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.74becf39533834ee:OptionalStorage.Core.8e085bdd1d912ef2", scope: null, file: !16, line: 131, type: !36, 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: !362 = !DILocation(line: 137, column: 28, 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 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !342, line: 59, type: !317, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !373) -// CHECK:STDOUT: !367 = !DILocalVariable(arg: 1, scope: !366, type: !6) -// CHECK:STDOUT: !372 = !DILocation(line: 59, column: 28, scope: !366) -// CHECK:STDOUT: !373 = !{!367} -// CHECK:STDOUT: !374 = !DIFile(filename: "{{.*}}/prelude/copy.carbon", directory: "") -// CHECK:STDOUT: !375 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a7c16f707f533a23:Copy.Core.2fad9574e050607e", scope: null, file: !374, line: 23, type: !36, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !383) -// CHECK:STDOUT: !376 = !DILocalVariable(arg: 1, scope: !375, type: !6) -// CHECK:STDOUT: !382 = !DILocation(line: 23, column: 25, scope: !375) -// CHECK:STDOUT: !383 = !{!376} +// CHECK:STDOUT: !138 = !DILocation(line: 43, column: 40, scope: !133) +// CHECK:STDOUT: !139 = !DILocation(line: 43, column: 33, scope: !133) +// CHECK:STDOUT: !140 = !{!134} +// CHECK:STDOUT: !141 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ea416314509b9f57:ImplicitAs.1863e1559591c4e5.Core.65d0ac77bdf469d0", scope: null, file: !100, line: 105, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !148) +// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !6) +// CHECK:STDOUT: !146 = !DILocation(line: 106, column: 12, scope: !141) +// CHECK:STDOUT: !147 = !DILocation(line: 106, column: 5, scope: !141) +// CHECK:STDOUT: !148 = !{!142} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.9bf3cfed350cc00b", scope: null, file: !132, line: 43, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !156) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !6) +// CHECK:STDOUT: !154 = !DILocation(line: 43, column: 40, scope: !149) +// CHECK:STDOUT: !155 = !DILocation(line: 43, column: 33, scope: !149) +// CHECK:STDOUT: !156 = !{!150} +// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.bd87f884f714419a", scope: null, file: !132, line: 47, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !165) +// CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !6) +// CHECK:STDOUT: !163 = !DILocation(line: 47, column: 34, scope: !157) +// CHECK:STDOUT: !164 = !DILocation(line: 47, column: 27, scope: !157) +// CHECK:STDOUT: !165 = !{!158} +// CHECK:STDOUT: !166 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.c0697012bd57e06d", scope: null, file: !132, line: 47, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !174) +// CHECK:STDOUT: !167 = !DILocalVariable(arg: 1, scope: !166, type: !6) +// CHECK:STDOUT: !172 = !DILocation(line: 47, column: 34, scope: !166) +// CHECK:STDOUT: !173 = !DILocation(line: 47, column: 27, scope: !166) +// CHECK:STDOUT: !174 = !{!167} +// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.9bf3cfed350cc00b", scope: null, file: !132, line: 47, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !183) +// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !6) +// CHECK:STDOUT: !181 = !DILocation(line: 47, column: 34, scope: !175) +// CHECK:STDOUT: !182 = !DILocation(line: 47, column: 27, scope: !175) +// CHECK:STDOUT: !183 = !{!176} +// CHECK:STDOUT: !184 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.aa801aecfd35fc2d:ImplicitAs.eb057aa32837c84e.Core.3d5265f4c4ec9eb6", scope: null, file: !132, line: 47, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !192) +// CHECK:STDOUT: !185 = !DILocalVariable(arg: 1, scope: !184, type: !6) +// CHECK:STDOUT: !190 = !DILocation(line: 47, column: 34, scope: !184) +// CHECK:STDOUT: !191 = !DILocation(line: 47, column: 27, scope: !184) +// CHECK:STDOUT: !192 = !{!185} +// CHECK:STDOUT: !193 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !194 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.210689ed411503f3", scope: null, file: !193, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !200) +// CHECK:STDOUT: !195 = !DILocalVariable(arg: 1, scope: !194, type: !7) +// CHECK:STDOUT: !198 = !DILocation(line: 38, column: 5, scope: !194) +// CHECK:STDOUT: !199 = !DILocation(line: 36, column: 1, scope: !194) +// CHECK:STDOUT: !200 = !{!195} +// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.32ee0da637ab0071", scope: null, file: !193, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !207) +// CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !201, type: !7) +// CHECK:STDOUT: !206 = !DILocation(line: 36, column: 1, scope: !201) +// CHECK:STDOUT: !207 = !{!202} +// CHECK:STDOUT: !208 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9458de9f4c4a772d", scope: null, file: !193, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !214) +// CHECK:STDOUT: !209 = !DILocalVariable(arg: 1, scope: !208, type: !7) +// CHECK:STDOUT: !212 = !DILocation(line: 38, column: 5, scope: !208) +// CHECK:STDOUT: !213 = !DILocation(line: 36, column: 1, scope: !208) +// CHECK:STDOUT: !214 = !{!209} +// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.53c35e954ca62889", scope: null, file: !193, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !221) +// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !7) +// CHECK:STDOUT: !220 = !DILocation(line: 36, column: 1, scope: !215) +// CHECK:STDOUT: !221 = !{!216} +// CHECK:STDOUT: !222 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8242e48f93ef210e", scope: null, file: !193, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !228) +// CHECK:STDOUT: !223 = !DILocalVariable(arg: 1, scope: !222, type: !7) +// CHECK:STDOUT: !227 = !DILocation(line: 36, column: 1, scope: !222) +// CHECK:STDOUT: !228 = !{!223} +// CHECK:STDOUT: !229 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.422f36c0425d22b8", scope: null, file: !193, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !235) +// CHECK:STDOUT: !230 = !DILocalVariable(arg: 1, scope: !229, type: !7) +// CHECK:STDOUT: !234 = !DILocation(line: 36, column: 1, scope: !229) +// CHECK:STDOUT: !235 = !{!230} +// CHECK:STDOUT: !236 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.38552a897eb918eb", scope: null, file: !193, line: 36, type: !90, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !242) +// CHECK:STDOUT: !237 = !DILocalVariable(arg: 1, scope: !236, type: !6) +// CHECK:STDOUT: !241 = !DILocation(line: 36, column: 1, scope: !236) +// CHECK:STDOUT: !242 = !{!237} +// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70", scope: null, file: !100, line: 172, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !252) +// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !7) +// CHECK:STDOUT: !249 = !DILocation(line: 173, column: 16, scope: !243) +// CHECK:STDOUT: !250 = !DILocation(line: 173, column: 12, scope: !243) +// CHECK:STDOUT: !251 = !DILocation(line: 173, column: 5, scope: !243) +// CHECK:STDOUT: !252 = !{!244} +// CHECK:STDOUT: !253 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.e8f8f92d3d08d149:OptionalStorage.Core.55456748a8a2eb70", scope: null, file: !100, line: 175, type: !9, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !260) +// CHECK:STDOUT: !254 = !DILocalVariable(arg: 1, scope: !253, type: !7) +// CHECK:STDOUT: !259 = !DILocation(line: 176, column: 5, scope: !253) +// CHECK:STDOUT: !260 = !{!254} +// CHECK:STDOUT: !261 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.9fdaf39d07a1dc4e:OptionalAs.24b7347a93330e68.Core.787b67b8b3ba12b7", scope: null, file: !100, line: 80, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !269) +// CHECK:STDOUT: !262 = !DILocalVariable(arg: 1, scope: !261, type: !6) +// CHECK:STDOUT: !267 = !DILocation(line: 81, column: 12, scope: !261) +// CHECK:STDOUT: !268 = !DILocation(line: 81, column: 5, scope: !261) +// CHECK:STDOUT: !269 = !{!262} +// CHECK:STDOUT: !270 = distinct !DISubprogram(name: "None", linkageName: "_CNone.c1cc3e41344c17ec:OptionalStorage.Core.de74407914bccca6", scope: null, file: !100, line: 125, type: !28, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !277 = !DILocation(line: 128, column: 5, scope: !270) +// CHECK:STDOUT: !278 = !DILocation(line: 129, column: 5, scope: !270) +// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.56158d26cb64337a:OptionalAs.5cc57aaa5e35eede.Core.98b8f93c1b92fd53", scope: null, file: !100, line: 87, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !287) +// CHECK:STDOUT: !280 = !DILocalVariable(arg: 1, scope: !279, type: !6) +// CHECK:STDOUT: !284 = !DILocation(line: 88, column: 29, scope: !279) +// CHECK:STDOUT: !285 = !DILocation(line: 88, column: 12, scope: !279) +// CHECK:STDOUT: !286 = !DILocation(line: 88, column: 5, scope: !279) +// CHECK:STDOUT: !287 = !{!280} +// CHECK:STDOUT: !288 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.787b67b8b3ba12b7", scope: null, file: !100, line: 33, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !295) +// CHECK:STDOUT: !289 = !DILocalVariable(arg: 1, scope: !288, type: !6) +// CHECK:STDOUT: !293 = !DILocation(line: 34, column: 12, scope: !288) +// CHECK:STDOUT: !294 = !DILocation(line: 34, column: 5, scope: !288) +// CHECK:STDOUT: !295 = !{!289} +// CHECK:STDOUT: !296 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.ef4ef968855d2979:ImplicitAs.ad22d1bbc0605210.Core.1f633674d24603c2", scope: null, file: !132, line: 43, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !305) +// CHECK:STDOUT: !297 = !DILocalVariable(arg: 1, scope: !296, type: !6) +// CHECK:STDOUT: !301 = !DILocation(line: 43, column: 40, scope: !296) +// CHECK:STDOUT: !302 = !{!6, !6} +// CHECK:STDOUT: !303 = !DISubroutineType(types: !302) +// CHECK:STDOUT: !304 = !DILocation(line: 43, column: 33, scope: !296) +// CHECK:STDOUT: !305 = !{!297} +// CHECK:STDOUT: !306 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.45dd3cdcb0ab47d7", scope: null, file: !100, line: 33, type: !25, 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: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e7e31ffa4cd36781", scope: null, file: !193, line: 36, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !320) +// CHECK:STDOUT: !315 = !DILocalVariable(arg: 1, scope: !314, type: !7) +// CHECK:STDOUT: !318 = !DILocation(line: 38, column: 5, scope: !314) +// CHECK:STDOUT: !319 = !DILocation(line: 36, column: 1, scope: !314) +// CHECK:STDOUT: !320 = !{!315} +// CHECK:STDOUT: !321 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.c1cc3e41344c17ec:OptionalStorage.Core.de74407914bccca6", scope: null, file: !100, line: 131, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !334) +// CHECK:STDOUT: !322 = !DILocalVariable(arg: 1, scope: !321, type: !6) +// CHECK:STDOUT: !330 = !DILocation(line: 137, column: 5, scope: !321) +// CHECK:STDOUT: !332 = !DILocation(line: 138, column: 5, scope: !321) +// CHECK:STDOUT: !333 = !DILocation(line: 139, column: 5, scope: !321) +// CHECK:STDOUT: !334 = !{!322} +// CHECK:STDOUT: !335 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "") +// CHECK:STDOUT: !336 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !335, line: 64, type: !303, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !344) +// CHECK:STDOUT: !337 = !DILocalVariable(arg: 1, scope: !336, type: !6) +// CHECK:STDOUT: !341 = !DILocation(line: 66, column: 17, scope: !336) +// CHECK:STDOUT: !343 = !DILocation(line: 66, column: 5, scope: !336) +// CHECK:STDOUT: !344 = !{!337} +// CHECK:STDOUT: !345 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.c1cc3e41344c17ec:OptionalStorage.Core.823a8f9f91058c72", scope: null, file: !100, line: 131, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !358) +// CHECK:STDOUT: !346 = !DILocalVariable(arg: 1, scope: !345, type: !6) +// CHECK:STDOUT: !354 = !DILocation(line: 137, column: 5, scope: !345) +// CHECK:STDOUT: !355 = !DILocation(line: 137, column: 28, scope: !345) +// CHECK:STDOUT: !356 = !DILocation(line: 138, column: 5, scope: !345) +// CHECK:STDOUT: !357 = !DILocation(line: 139, column: 5, scope: !345) +// CHECK:STDOUT: !358 = !{!346} +// CHECK:STDOUT: !359 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !335, line: 59, type: !303, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !366) +// CHECK:STDOUT: !360 = !DILocalVariable(arg: 1, scope: !359, type: !6) +// CHECK:STDOUT: !365 = !DILocation(line: 59, column: 28, scope: !359) +// CHECK:STDOUT: !366 = !{!360} +// CHECK:STDOUT: !367 = !DIFile(filename: "{{.*}}/prelude/copy.carbon", directory: "") +// CHECK:STDOUT: !368 = distinct !DISubprogram(name: "Op", linkageName: "_COp.a7c16f707f533a23:Copy.Core.2fad9574e050607e", scope: null, file: !367, line: 23, type: !25, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !376) +// CHECK:STDOUT: !369 = !DILocalVariable(arg: 1, scope: !368, type: !6) +// CHECK:STDOUT: !375 = !DILocation(line: 23, column: 25, scope: !368) +// CHECK:STDOUT: !376 = !{!369} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'copy.carbon' @@ -737,178 +650,144 @@ 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 !386 { +// CHECK:STDOUT: define void @_CF.Main(ptr sret({ {}, i1 }) %return, ptr %c) #0 !dbg !379 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !388 +// CHECK:STDOUT: call void @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.60b535298816170e"(ptr %return, ptr %c), !dbg !384 +// CHECK:STDOUT: ret void, !dbg !385 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb3dd30fa3a4aa62:core.Destroy.Core"(ptr %self) #0 !dbg !390 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !392 +// CHECK:STDOUT: define linkonce_odr void @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.60b535298816170e"(ptr sret({ {}, i1 }) %return, ptr %self) #0 !dbg !387 { +// CHECK:STDOUT: call void @"_CCopy.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28"(ptr %return, ptr %self), !dbg !393 +// CHECK:STDOUT: ret void, !dbg !394 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main(ptr sret({ {}, i1 }) %return, ptr %c) #0 !dbg !394 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.4f9dc5edfdc7d2ec"(ptr %return, ptr %c), !dbg !399 -// CHECK:STDOUT: ret void, !dbg !400 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.4f9dc5edfdc7d2ec"(ptr sret({ {}, i1 }) %return, ptr %self) #0 !dbg !402 { -// CHECK:STDOUT: call void @"_CCopy.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %return, ptr %self), !dbg !408 -// CHECK:STDOUT: ret void, !dbg !409 -// 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 !411 { -// CHECK:STDOUT: %1 = call i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %value), !dbg !417 -// CHECK:STDOUT: br i1 %1, label %2, label %3, !dbg !418 +// CHECK:STDOUT: define linkonce_odr void @"_CCopy.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28"(ptr sret({ {}, i1 }) %return, ptr %value) #0 !dbg !396 { +// CHECK:STDOUT: %1 = call i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28"(ptr %value), !dbg !402 +// CHECK:STDOUT: br i1 %1, label %2, label %3, !dbg !403 // CHECK:STDOUT: // CHECK:STDOUT: 2: ; preds = %0 -// CHECK:STDOUT: %value1 = getelementptr inbounds nuw { {}, i1 }, ptr %value, i32 0, i32 0, !dbg !419 -// CHECK:STDOUT: call void @"_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %return, ptr %value1), !dbg !420 -// CHECK:STDOUT: ret void, !dbg !421 +// CHECK:STDOUT: %value1 = getelementptr inbounds nuw { {}, i1 }, ptr %value, i32 0, i32 0, !dbg !404 +// CHECK:STDOUT: call void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28"(ptr %return, ptr %value1), !dbg !405 +// CHECK:STDOUT: ret void, !dbg !406 // CHECK:STDOUT: // CHECK:STDOUT: 3: ; preds = %0 -// CHECK:STDOUT: call void @"_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %return), !dbg !422 -// CHECK:STDOUT: ret void, !dbg !423 +// CHECK:STDOUT: call void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28"(ptr %return), !dbg !407 +// CHECK:STDOUT: ret void, !dbg !408 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c"(ptr %value) #0 !dbg !425 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %value, i32 0, i32 1, !dbg !430 -// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !430 -// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !430 -// CHECK:STDOUT: ret i1 %2, !dbg !431 +// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28"(ptr %value) #0 !dbg !410 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %value, i32 0, i32 1, !dbg !415 +// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !415 +// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !415 +// CHECK:STDOUT: ret i1 %2, !dbg !416 // 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 !433 { -// CHECK:STDOUT: %value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 0, !dbg !442 -// CHECK:STDOUT: call void @"_COp.Copyable.Main:Copy.Core"(ptr %value, ptr %self), !dbg !443 -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 1, !dbg !444 -// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !444 -// CHECK:STDOUT: ret void, !dbg !445 +// CHECK:STDOUT: define linkonce_odr void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28"(ptr sret({ {}, i1 }) %return, ptr %self) #0 !dbg !418 { +// CHECK:STDOUT: %value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 0, !dbg !427 +// CHECK:STDOUT: call void @"_COp.Copyable.Main:Copy.Core"(ptr %value, ptr %self), !dbg !428 +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 1, !dbg !429 +// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !429 +// CHECK:STDOUT: ret void, !dbg !430 // 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 !447 { -// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 1, !dbg !454 -// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !454 -// CHECK:STDOUT: ret void, !dbg !455 +// CHECK:STDOUT: define linkonce_odr void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28"(ptr sret({ {}, i1 }) %return) #0 !dbg !432 { +// CHECK:STDOUT: %has_value = getelementptr inbounds nuw { {}, i1 }, ptr %return, i32 0, i32 1, !dbg !439 +// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !439 +// CHECK:STDOUT: ret void, !dbg !440 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!385} +// CHECK:STDOUT: !llvm.dbg.cu = !{!378} // 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: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !8 = !{null, !7} +// CHECK:STDOUT: !8 = !{!7, !7} // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !12 = !{!7, !7} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !16 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !38 = !{!7} -// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) -// CHECK:STDOUT: !384 = !DIFile(filename: "copy.carbon", directory: "") -// CHECK:STDOUT: !385 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !384, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !386 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !384, line: 9, type: !9, spFlags: DISPFlagDefinition, unit: !385, retainedNodes: !389) -// CHECK:STDOUT: !387 = !DILocalVariable(arg: 1, scope: !386, type: !7) -// CHECK:STDOUT: !388 = !DILocation(line: 9, column: 9, scope: !386) -// CHECK:STDOUT: !389 = !{!387} -// CHECK:STDOUT: !390 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb3dd30fa3a4aa62:core.Destroy.Core", scope: null, file: !384, line: 9, type: !9, spFlags: DISPFlagDefinition, unit: !385, 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: "F", linkageName: "_CF.Main", scope: null, file: !384, line: 9, type: !13, spFlags: DISPFlagDefinition, unit: !385, retainedNodes: !401) -// CHECK:STDOUT: !395 = !DILocalVariable(arg: 1, scope: !394, type: !7) -// CHECK:STDOUT: !399 = !DILocation(line: 11, column: 10, scope: !394) -// CHECK:STDOUT: !400 = !DILocation(line: 11, column: 3, scope: !394) -// CHECK:STDOUT: !401 = !{!395} -// CHECK:STDOUT: !402 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.4f9dc5edfdc7d2ec", scope: null, file: !16, line: 50, type: !13, spFlags: DISPFlagDefinition, unit: !385, retainedNodes: !410) -// CHECK:STDOUT: !403 = !DILocalVariable(arg: 1, scope: !402, type: !7) -// CHECK:STDOUT: !408 = !DILocation(line: 51, column: 12, scope: !402) -// CHECK:STDOUT: !409 = !DILocation(line: 51, column: 5, scope: !402) -// CHECK:STDOUT: !410 = !{!403} -// CHECK:STDOUT: !411 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 147, type: !13, spFlags: DISPFlagDefinition, unit: !385, retainedNodes: !424) -// CHECK:STDOUT: !412 = !DILocalVariable(arg: 1, scope: !411, type: !7) -// CHECK:STDOUT: !417 = !DILocation(line: 148, column: 9, scope: !411) -// CHECK:STDOUT: !418 = !DILocation(line: 148, column: 8, scope: !411) -// CHECK:STDOUT: !419 = !DILocation(line: 149, column: 15, scope: !411) -// CHECK:STDOUT: !420 = !DILocation(line: 149, column: 14, scope: !411) -// CHECK:STDOUT: !421 = !DILocation(line: 149, column: 7, scope: !411) -// CHECK:STDOUT: !422 = !DILocation(line: 151, column: 14, scope: !411) -// CHECK:STDOUT: !423 = !DILocation(line: 151, column: 7, scope: !411) -// CHECK:STDOUT: !424 = !{!412} -// CHECK:STDOUT: !425 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 141, type: !13, spFlags: DISPFlagDefinition, unit: !385, retainedNodes: !432) -// CHECK:STDOUT: !426 = !DILocalVariable(arg: 1, scope: !425, type: !7) -// CHECK:STDOUT: !430 = !DILocation(line: 142, column: 12, scope: !425) -// CHECK:STDOUT: !431 = !DILocation(line: 142, column: 5, scope: !425) -// CHECK:STDOUT: !432 = !{!426} -// CHECK:STDOUT: !433 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 131, type: !13, spFlags: DISPFlagDefinition, unit: !385, retainedNodes: !446) -// CHECK:STDOUT: !434 = !DILocalVariable(arg: 1, scope: !433, type: !7) -// CHECK:STDOUT: !442 = !DILocation(line: 137, column: 5, scope: !433) -// CHECK:STDOUT: !443 = !DILocation(line: 137, column: 28, scope: !433) -// CHECK:STDOUT: !444 = !DILocation(line: 138, column: 5, scope: !433) -// CHECK:STDOUT: !445 = !DILocation(line: 139, column: 5, scope: !433) -// CHECK:STDOUT: !446 = !{!434} -// CHECK:STDOUT: !447 = distinct !DISubprogram(name: "None", linkageName: "_CNone.5d6f3f3a4b44a8f1:OptionalStorage.Core.d34df0287397e90c", scope: null, file: !16, line: 125, type: !39, spFlags: DISPFlagDefinition, unit: !385) -// CHECK:STDOUT: !454 = !DILocation(line: 128, column: 5, scope: !447) -// CHECK:STDOUT: !455 = !DILocation(line: 129, column: 5, scope: !447) +// CHECK:STDOUT: !27 = !{!7} +// CHECK:STDOUT: !28 = !DISubroutineType(types: !27) +// CHECK:STDOUT: !100 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !377 = !DIFile(filename: "copy.carbon", directory: "") +// CHECK:STDOUT: !378 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !377, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !379 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !377, line: 9, type: !9, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !386) +// CHECK:STDOUT: !380 = !DILocalVariable(arg: 1, scope: !379, type: !7) +// CHECK:STDOUT: !384 = !DILocation(line: 11, column: 10, scope: !379) +// CHECK:STDOUT: !385 = !DILocation(line: 11, column: 3, scope: !379) +// CHECK:STDOUT: !386 = !{!380} +// CHECK:STDOUT: !387 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.60b535298816170e", scope: null, file: !100, line: 50, type: !9, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !395) +// CHECK:STDOUT: !388 = !DILocalVariable(arg: 1, scope: !387, type: !7) +// CHECK:STDOUT: !393 = !DILocation(line: 51, column: 12, scope: !387) +// CHECK:STDOUT: !394 = !DILocation(line: 51, column: 5, scope: !387) +// CHECK:STDOUT: !395 = !{!388} +// CHECK:STDOUT: !396 = distinct !DISubprogram(name: "Copy", linkageName: "_CCopy.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28", scope: null, file: !100, line: 147, type: !9, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !409) +// CHECK:STDOUT: !397 = !DILocalVariable(arg: 1, scope: !396, type: !7) +// CHECK:STDOUT: !402 = !DILocation(line: 148, column: 9, scope: !396) +// CHECK:STDOUT: !403 = !DILocation(line: 148, column: 8, scope: !396) +// CHECK:STDOUT: !404 = !DILocation(line: 149, column: 15, scope: !396) +// CHECK:STDOUT: !405 = !DILocation(line: 149, column: 14, scope: !396) +// CHECK:STDOUT: !406 = !DILocation(line: 149, column: 7, scope: !396) +// CHECK:STDOUT: !407 = !DILocation(line: 151, column: 14, scope: !396) +// CHECK:STDOUT: !408 = !DILocation(line: 151, column: 7, scope: !396) +// CHECK:STDOUT: !409 = !{!397} +// CHECK:STDOUT: !410 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28", scope: null, file: !100, line: 141, type: !9, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !417) +// CHECK:STDOUT: !411 = !DILocalVariable(arg: 1, scope: !410, type: !7) +// CHECK:STDOUT: !415 = !DILocation(line: 142, column: 12, scope: !410) +// CHECK:STDOUT: !416 = !DILocation(line: 142, column: 5, scope: !410) +// CHECK:STDOUT: !417 = !{!411} +// CHECK:STDOUT: !418 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28", scope: null, file: !100, line: 131, type: !9, spFlags: DISPFlagDefinition, unit: !378, retainedNodes: !431) +// CHECK:STDOUT: !419 = !DILocalVariable(arg: 1, scope: !418, type: !7) +// CHECK:STDOUT: !427 = !DILocation(line: 137, column: 5, scope: !418) +// CHECK:STDOUT: !428 = !DILocation(line: 137, column: 28, scope: !418) +// CHECK:STDOUT: !429 = !DILocation(line: 138, column: 5, scope: !418) +// CHECK:STDOUT: !430 = !DILocation(line: 139, column: 5, scope: !418) +// CHECK:STDOUT: !431 = !{!419} +// CHECK:STDOUT: !432 = distinct !DISubprogram(name: "None", linkageName: "_CNone.c1cc3e41344c17ec:OptionalStorage.Core.0cee3c1ed1876f28", scope: null, file: !100, line: 125, type: !28, spFlags: DISPFlagDefinition, unit: !378) +// CHECK:STDOUT: !439 = !DILocation(line: 128, column: 5, scope: !432) +// CHECK:STDOUT: !440 = !DILocation(line: 129, column: 5, scope: !432) // 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 !458 { +// CHECK:STDOUT: define ptr @_CF.Main(ptr %c) #0 !dbg !443 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !460 +// CHECK:STDOUT: %Optional.as.Copy.impl.Op.call = call ptr @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.c0462262ee80e8d8"(ptr %c), !dbg !448 +// CHECK:STDOUT: ret ptr %Optional.as.Copy.impl.Op.call, !dbg !449 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define ptr @_CF.Main(ptr %c) #0 !dbg !462 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %Optional.as.Copy.impl.Op.call = call ptr @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.c0462262ee80e8d8"(ptr %c), !dbg !467 -// CHECK:STDOUT: ret ptr %Optional.as.Copy.impl.Op.call, !dbg !468 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr ptr @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.c0462262ee80e8d8"(ptr %self) #0 !dbg !470 { -// CHECK:STDOUT: ret ptr %self, !dbg !477 +// CHECK:STDOUT: define linkonce_odr ptr @"_COp.Optional.24b7347a93330e68.Core:Copy.Core.c0462262ee80e8d8"(ptr %self) #0 !dbg !451 { +// CHECK:STDOUT: ret ptr %self, !dbg !458 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!457} +// CHECK:STDOUT: !llvm.dbg.cu = !{!442} // 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: !7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !8 = !{null, !7} +// CHECK:STDOUT: !8 = !{!7, !7} // CHECK:STDOUT: !9 = !DISubroutineType(types: !8) -// CHECK:STDOUT: !12 = !{!7, !7} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !16 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") -// CHECK:STDOUT: !456 = !DIFile(filename: "copy_pointer.carbon", directory: "") -// CHECK:STDOUT: !457 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !456, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !458 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.6b633cf020343e69:core.Destroy.Core", scope: null, file: !16, line: 164, type: !9, spFlags: DISPFlagDefinition, unit: !457, retainedNodes: !461) -// CHECK:STDOUT: !459 = !DILocalVariable(arg: 1, scope: !458, type: !7) -// CHECK:STDOUT: !460 = !DILocation(line: 164, column: 19, scope: !458) -// CHECK:STDOUT: !461 = !{!459} -// CHECK:STDOUT: !462 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !456, line: 5, type: !13, spFlags: DISPFlagDefinition, unit: !457, retainedNodes: !469) -// CHECK:STDOUT: !463 = !DILocalVariable(arg: 1, scope: !462, type: !7) -// CHECK:STDOUT: !467 = !DILocation(line: 6, column: 10, scope: !462) -// CHECK:STDOUT: !468 = !DILocation(line: 6, column: 3, scope: !462) -// CHECK:STDOUT: !469 = !{!463} -// CHECK:STDOUT: !470 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.c0462262ee80e8d8", scope: null, file: !16, line: 50, type: !13, spFlags: DISPFlagDefinition, unit: !457, retainedNodes: !478) -// CHECK:STDOUT: !471 = !DILocalVariable(arg: 1, scope: !470, type: !7) -// CHECK:STDOUT: !477 = !DILocation(line: 51, column: 5, scope: !470) -// CHECK:STDOUT: !478 = !{!471} +// CHECK:STDOUT: !100 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") +// CHECK:STDOUT: !441 = !DIFile(filename: "copy_pointer.carbon", directory: "") +// CHECK:STDOUT: !442 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !441, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !443 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !441, line: 5, type: !9, spFlags: DISPFlagDefinition, unit: !442, retainedNodes: !450) +// CHECK:STDOUT: !444 = !DILocalVariable(arg: 1, scope: !443, type: !7) +// CHECK:STDOUT: !448 = !DILocation(line: 6, column: 10, scope: !443) +// CHECK:STDOUT: !449 = !DILocation(line: 6, column: 3, scope: !443) +// CHECK:STDOUT: !450 = !{!444} +// CHECK:STDOUT: !451 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Optional.24b7347a93330e68.Core:Copy.Core.c0462262ee80e8d8", scope: null, file: !100, line: 50, type: !9, spFlags: DISPFlagDefinition, unit: !442, retainedNodes: !459) +// CHECK:STDOUT: !452 = !DILocalVariable(arg: 1, scope: !451, type: !7) +// CHECK:STDOUT: !458 = !DILocation(line: 51, column: 5, scope: !451) +// CHECK:STDOUT: !459 = !{!452} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/return/return_var_byval.carbon b/toolchain/lower/testdata/return/return_var_byval.carbon index f2ff8f20ba93..14ccfa15d81d 100644 --- a/toolchain/lower/testdata/return/return_var_byval.carbon +++ b/toolchain/lower/testdata/return/return_var_byval.carbon @@ -20,25 +20,24 @@ fn Main() -> i32 { // CHECK:STDOUT: source_filename = "return_var_byval.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CMain.Main() #0 !dbg !25 { +// CHECK:STDOUT: define i32 @_CMain.Main() #0 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !28 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !28 -// CHECK:STDOUT: store i32 0, ptr %x.var, align 4, !dbg !28 -// CHECK:STDOUT: %.loc14_17 = load i32, ptr %x.var, align 4, !dbg !29 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %x.var), !dbg !28 +// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !26 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !26 +// CHECK:STDOUT: store i32 0, ptr %x.var, align 4, !dbg !26 +// CHECK:STDOUT: %.loc14_17 = load i32, ptr %x.var, align 4, !dbg !27 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %x.var), !dbg !26 // CHECK:STDOUT: ret i32 %.loc14_17, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !32 { +// CHECK:STDOUT: ret void, !dbg !37 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -47,19 +46,20 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "return_var_byval.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !28 = !DILocation(line: 14, column: 12, scope: !25) -// CHECK:STDOUT: !29 = !DILocation(line: 14, column: 16, scope: !25) -// CHECK:STDOUT: !31 = !DILocation(line: 15, column: 3, scope: !25) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !35) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !26 = !DILocation(line: 14, column: 12, scope: !23) +// CHECK:STDOUT: !27 = !DILocation(line: 14, column: 16, scope: !23) +// CHECK:STDOUT: !29 = !{null, !20} +// CHECK:STDOUT: !30 = !DISubroutineType(types: !29) +// CHECK:STDOUT: !31 = !DILocation(line: 15, column: 3, scope: !23) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !30, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !38) // 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: !37 = !DILocation(line: 32, column: 1, scope: !32) +// CHECK:STDOUT: !38 = !{!33} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/return/var.carbon b/toolchain/lower/testdata/return/var.carbon index e7726ea43b7d..e8356535522e 100644 --- a/toolchain/lower/testdata/return/var.carbon +++ b/toolchain/lower/testdata/return/var.carbon @@ -20,25 +20,24 @@ fn Main() -> i32 { // CHECK:STDOUT: source_filename = "var.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @_CMain.Main() #0 !dbg !25 { +// CHECK:STDOUT: define i32 @_CMain.Main() #0 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !28 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !28 -// CHECK:STDOUT: store i32 0, ptr %x.var, align 4, !dbg !28 -// CHECK:STDOUT: %.loc15 = load i32, ptr %x.var, align 4, !dbg !30 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %x.var), !dbg !28 +// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !26 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !26 +// CHECK:STDOUT: store i32 0, ptr %x.var, align 4, !dbg !26 +// CHECK:STDOUT: %.loc15 = load i32, ptr %x.var, align 4, !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %x.var), !dbg !26 // CHECK:STDOUT: ret i32 %.loc15, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !32 { +// CHECK:STDOUT: ret void, !dbg !37 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -47,19 +46,20 @@ fn Main() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "var.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !28 = !DILocation(line: 14, column: 3, scope: !25) -// CHECK:STDOUT: !30 = !DILocation(line: 15, column: 10, scope: !25) -// CHECK:STDOUT: !31 = !DILocation(line: 15, column: 3, scope: !25) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 14, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !35) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Main", linkageName: "_CMain.Main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !26 = !DILocation(line: 14, column: 3, scope: !23) +// CHECK:STDOUT: !28 = !DILocation(line: 15, column: 10, scope: !23) +// CHECK:STDOUT: !29 = !{null, !20} +// CHECK:STDOUT: !30 = !DISubroutineType(types: !29) +// CHECK:STDOUT: !31 = !DILocation(line: 15, column: 3, scope: !23) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !30, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !38) // 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: !37 = !DILocation(line: 32, column: 1, scope: !32) +// CHECK:STDOUT: !38 = !{!33} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/empty.carbon b/toolchain/lower/testdata/struct/empty.carbon index adc4b4493716..9847d936e762 100644 --- a/toolchain/lower/testdata/struct/empty.carbon +++ b/toolchain/lower/testdata/struct/empty.carbon @@ -21,29 +21,28 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "empty.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !26 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca {}, align 1, !dbg !29 -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !29 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !31 -// CHECK:STDOUT: call void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %_.var), !dbg !31 -// CHECK:STDOUT: call void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %x.var), !dbg !29 +// CHECK:STDOUT: %x.var = alloca {}, align 1, !dbg !26 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !28 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !26 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.61b5bb2079973306(ptr %_.var), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.61b5bb2079973306(ptr %x.var), !dbg !26 // CHECK:STDOUT: ret i32 0, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99: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: 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 @_CSelfDestruct.Core.61b5bb2079973306(ptr %t) #0 !dbg !35 { +// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.61b5bb2079973306, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -53,20 +52,21 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "empty.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !24 = !{null, !23} -// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !29 = !DILocation(line: 14, column: 3, scope: !26) -// CHECK:STDOUT: !31 = !DILocation(line: 15, column: 3, scope: !26) -// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 3, scope: !26) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !38) -// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !23) -// CHECK:STDOUT: !37 = !DILocation(line: 15, column: 3, scope: !35) -// CHECK:STDOUT: !38 = !{!36} +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !26 = !DILocation(line: 14, column: 3, scope: !23) +// CHECK:STDOUT: !28 = !DILocation(line: 15, column: 3, scope: !23) +// CHECK:STDOUT: !31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !32 = !{null, !31} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 3, scope: !23) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.61b5bb2079973306", scope: null, file: !10, line: 32, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !31) +// CHECK:STDOUT: !40 = !DILocation(line: 32, column: 1, scope: !35) +// CHECK:STDOUT: !41 = !{!36} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/layout.carbon b/toolchain/lower/testdata/struct/layout.carbon index c735b8b59a26..b69639e8a25a 100644 --- a/toolchain/lower/testdata/struct/layout.carbon +++ b/toolchain/lower/testdata/struct/layout.carbon @@ -80,48 +80,49 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !28 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %no_padding.var = alloca { i32, i32, i32 }, align 4, !dbg !29 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %no_padding.var), !dbg !29 -// CHECK:STDOUT: %.loc8.x = getelementptr inbounds nuw { i32, i32, i32 }, ptr %no_padding.var, i32 0, i32 0, !dbg !31 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc8.x), !dbg !33 -// CHECK:STDOUT: %.loc9.y = getelementptr inbounds nuw { i32, i32, i32 }, ptr %no_padding.var, i32 0, i32 1, !dbg !34 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc9.y), !dbg !36 -// CHECK:STDOUT: %.loc10.z = getelementptr inbounds nuw { i32, i32, i32 }, ptr %no_padding.var, i32 0, i32 2, !dbg !37 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.z), !dbg !39 -// CHECK:STDOUT: call void @"_CSelfDestruct.5dc248c5ee366a00:core.Destroy.Core"(ptr %no_padding.var), !dbg !29 -// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: %no_padding.var = alloca { i32, i32, i32 }, align 4, !dbg !27 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %no_padding.var), !dbg !27 +// CHECK:STDOUT: %.loc8.x = getelementptr inbounds nuw { i32, i32, i32 }, ptr %no_padding.var, i32 0, i32 0, !dbg !29 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc8.x), !dbg !31 +// CHECK:STDOUT: %.loc9.y = getelementptr inbounds nuw { i32, i32, i32 }, ptr %no_padding.var, i32 0, i32 1, !dbg !32 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc9.y), !dbg !34 +// CHECK:STDOUT: %.loc10.z = getelementptr inbounds nuw { i32, i32, i32 }, ptr %no_padding.var, i32 0, i32 2, !dbg !35 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.z), !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.45b2634a1e0e517e(ptr %no_padding.var), !dbg !27 +// CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_COp.5dc248c5ee366a00:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !43 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5dc248c5ee366a00:core.Destroy.Core"(ptr %self) #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_3.1.z = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7_3.1.z), !dbg !47 -// CHECK:STDOUT: %.loc7_3.2.y = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7_3.2.y), !dbg !47 -// CHECK:STDOUT: %.loc7_3.3.x = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7_3.3.x), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !47 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5dc248c5ee366a00:core.Destroy.Core"(ptr %self) #0 !dbg !49 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5dc248c5ee366a00:core.Destroy.Core"(ptr %self), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !51 +// CHECK:STDOUT: %.loc7_3.1.z = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_3.1.z), !dbg !41 +// CHECK:STDOUT: %.loc7_3.4.y = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_3.4.y), !dbg !41 +// CHECK:STDOUT: %.loc7_3.7.x = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_3.7.x), !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: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.45b2634a1e0e517e(ptr %t) #0 !dbg !45 { +// CHECK:STDOUT: call void @"_COp.5dc248c5ee366a00:core.SubobjectDestroy.Core"(ptr %t), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !52 { +// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -130,6 +131,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "no_padding.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -138,29 +140,30 @@ fn F() { // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !29 = !DILocation(line: 7, column: 3, scope: !28) -// CHECK:STDOUT: !31 = !DILocation(line: 8, column: 6, scope: !28) -// CHECK:STDOUT: !33 = !DILocation(line: 8, column: 3, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 9, column: 6, scope: !28) -// CHECK:STDOUT: !36 = !DILocation(line: 9, column: 3, scope: !28) -// CHECK:STDOUT: !37 = !DILocation(line: 10, column: 6, scope: !28) -// CHECK:STDOUT: !39 = !DILocation(line: 10, column: 3, scope: !28) -// CHECK:STDOUT: !40 = !DILocation(line: 5, column: 1, scope: !28) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) -// 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.5dc248c5ee366a00:core.Destroy.Core", scope: null, file: !18, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !27 = !DILocation(line: 7, column: 3, scope: !26) +// CHECK:STDOUT: !29 = !DILocation(line: 8, column: 6, scope: !26) +// CHECK:STDOUT: !31 = !DILocation(line: 8, column: 3, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 9, column: 6, scope: !26) +// CHECK:STDOUT: !34 = !DILocation(line: 9, column: 3, scope: !26) +// CHECK:STDOUT: !35 = !DILocation(line: 10, column: 6, scope: !26) +// CHECK:STDOUT: !37 = !DILocation(line: 10, column: 3, scope: !26) +// CHECK:STDOUT: !38 = !DILocation(line: 5, column: 1, scope: !26) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5dc248c5ee366a00:core.SubobjectDestroy.Core", scope: null, file: !18, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) +// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !21) +// CHECK:STDOUT: !41 = !DILocation(line: 7, column: 3, scope: !39) +// CHECK:STDOUT: !42 = !{null, !20} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = !{!40} +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.45b2634a1e0e517e", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !21) -// CHECK:STDOUT: !47 = !DILocation(line: 7, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5dc248c5ee366a00: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: !49 = !DILocation(line: 34, column: 5, scope: !45) +// CHECK:STDOUT: !50 = !DILocation(line: 32, column: 1, scope: !45) +// CHECK:STDOUT: !51 = !{!46} +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !20) +// CHECK:STDOUT: !57 = !DILocation(line: 32, column: 1, scope: !52) +// CHECK:STDOUT: !58 = !{!53} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'avoid_tail_padding.carbon' @@ -169,87 +172,86 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !55 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !61 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %avoid_tail_padding.var = alloca <{ ptr, i32 }>, align 8, !dbg !56 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %avoid_tail_padding.var), !dbg !56 -// CHECK:STDOUT: %.loc8.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %avoid_tail_padding.var, i32 0, i32 1, !dbg !58 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc8.y), !dbg !60 -// CHECK:STDOUT: call void @"_CSelfDestruct.774d7de7af68f6c1:core.Destroy.Core"(ptr %avoid_tail_padding.var), !dbg !56 -// CHECK:STDOUT: ret void, !dbg !61 +// CHECK:STDOUT: %avoid_tail_padding.var = alloca <{ ptr, i32 }>, align 8, !dbg !62 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %avoid_tail_padding.var), !dbg !62 +// CHECK:STDOUT: %.loc8.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %avoid_tail_padding.var, i32 0, i32 1, !dbg !64 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc8.y), !dbg !66 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.599d5fcb55f0df44(ptr %avoid_tail_padding.var), !dbg !62 +// CHECK:STDOUT: ret void, !dbg !67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !62 { +// CHECK:STDOUT: define weak_odr void @"_COp.774d7de7af68f6c1:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !68 { // 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.72395be3dbbe8946: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 @"_CSubobjectDestroy.774d7de7af68f6c1:core.Destroy.Core"(ptr %self) #0 !dbg !70 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc7_3.1.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !72 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc7_3.1.y), !dbg !72 -// CHECK:STDOUT: %.loc7_3.2.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !72 -// CHECK:STDOUT: call void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %.loc7_3.2.x), !dbg !72 -// CHECK:STDOUT: ret void, !dbg !72 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.774d7de7af68f6c1:core.Destroy.Core"(ptr %self) #0 !dbg !74 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.774d7de7af68f6c1:core.Destroy.Core"(ptr %self), !dbg !76 -// CHECK:STDOUT: ret void, !dbg !76 +// CHECK:STDOUT: %.loc7_3.1.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !70 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc7_3.1.y), !dbg !70 +// CHECK:STDOUT: %.loc7_3.4.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !70 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5ae382a48d083172(ptr %.loc7_3.4.x), !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 void @_CSelfDestruct.Core.599d5fcb55f0df44(ptr %t) #0 !dbg !72 { +// CHECK:STDOUT: call void @"_COp.774d7de7af68f6c1:core.SubobjectDestroy.Core"(ptr %t), !dbg !76 +// CHECK:STDOUT: ret void, !dbg !77 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !79 { +// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.5ae382a48d083172(ptr %t) #0 !dbg !86 { +// CHECK:STDOUT: ret void, !dbg !91 +// 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 = !{!54} +// 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{null, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !53 = !DIFile(filename: "avoid_tail_padding.carbon", directory: "") -// CHECK:STDOUT: !54 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !53, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !53, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !54) -// CHECK:STDOUT: !56 = !DILocation(line: 7, column: 3, scope: !55) -// CHECK:STDOUT: !58 = !DILocation(line: 8, column: 6, scope: !55) -// CHECK:STDOUT: !60 = !DILocation(line: 8, column: 3, scope: !55) -// CHECK:STDOUT: !61 = !DILocation(line: 5, column: 1, scope: !55) -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !53, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !54, retainedNodes: !65) -// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !21) -// CHECK:STDOUT: !64 = !DILocation(line: 7, column: 3, scope: !62) -// CHECK:STDOUT: !65 = !{!63} -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !53, line: 7, type: !27, spFlags: DISPFlagDefinition, unit: !54, retainedNodes: !69) -// CHECK:STDOUT: !67 = !DILocalVariable(arg: 1, scope: !66, type: !20) -// CHECK:STDOUT: !68 = !DILocation(line: 7, column: 3, scope: !66) -// CHECK:STDOUT: !69 = !{!67} -// CHECK:STDOUT: !70 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.774d7de7af68f6c1:core.Destroy.Core", scope: null, file: !53, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !54, retainedNodes: !73) -// CHECK:STDOUT: !71 = !DILocalVariable(arg: 1, scope: !70, type: !21) -// CHECK:STDOUT: !72 = !DILocation(line: 7, column: 3, scope: !70) -// CHECK:STDOUT: !73 = !{!71} -// CHECK:STDOUT: !74 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.774d7de7af68f6c1:core.Destroy.Core", scope: null, file: !53, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !54, retainedNodes: !77) -// CHECK:STDOUT: !75 = !DILocalVariable(arg: 1, scope: !74, type: !21) -// CHECK:STDOUT: !76 = !DILocation(line: 7, column: 3, scope: !74) -// CHECK:STDOUT: !77 = !{!75} +// CHECK:STDOUT: !42 = !{null, !20} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !59 = !DIFile(filename: "avoid_tail_padding.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: !61 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !59, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !60) +// CHECK:STDOUT: !62 = !DILocation(line: 7, column: 3, scope: !61) +// CHECK:STDOUT: !64 = !DILocation(line: 8, column: 6, scope: !61) +// CHECK:STDOUT: !66 = !DILocation(line: 8, column: 3, scope: !61) +// CHECK:STDOUT: !67 = !DILocation(line: 5, column: 1, scope: !61) +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "Op", linkageName: "_COp.774d7de7af68f6c1:core.SubobjectDestroy.Core", scope: null, file: !59, line: 7, type: !23, spFlags: DISPFlagDefinition, unit: !60, retainedNodes: !71) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !21) +// CHECK:STDOUT: !70 = !DILocation(line: 7, column: 3, scope: !68) +// CHECK:STDOUT: !71 = !{!69} +// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.599d5fcb55f0df44", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !60, retainedNodes: !78) +// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !21) +// CHECK:STDOUT: !76 = !DILocation(line: 34, column: 5, scope: !72) +// CHECK:STDOUT: !77 = !DILocation(line: 32, column: 1, scope: !72) +// CHECK:STDOUT: !78 = !{!73} +// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !60, retainedNodes: !85) +// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !20) +// CHECK:STDOUT: !84 = !DILocation(line: 32, column: 1, scope: !79) +// CHECK:STDOUT: !85 = !{!80} +// CHECK:STDOUT: !86 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5ae382a48d083172", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !60, retainedNodes: !92) +// CHECK:STDOUT: !87 = !DILocalVariable(arg: 1, scope: !86, type: !21) +// CHECK:STDOUT: !91 = !DILocation(line: 32, column: 1, scope: !86) +// CHECK:STDOUT: !92 = !{!87} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'use_tail_padding.carbon' @@ -258,117 +260,119 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !80 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !95 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %use_tail_padding.var = alloca { <{ ptr, i32 }>, i32 }, align 8, !dbg !81 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %use_tail_padding.var), !dbg !81 -// CHECK:STDOUT: %.loc9_22.a = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %use_tail_padding.var, i32 0, i32 0, !dbg !83 -// CHECK:STDOUT: %.loc9_24.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc9_22.a, i32 0, i32 1, !dbg !83 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc9_24.y), !dbg !85 -// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %use_tail_padding.var, i32 0, i32 1, !dbg !86 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !88 -// CHECK:STDOUT: call void @"_CSelfDestruct.7f1c6b303f8f3e0f:core.Destroy.Core"(ptr %use_tail_padding.var), !dbg !81 -// CHECK:STDOUT: ret void, !dbg !89 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543: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.72395be3dbbe8946: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.774d7de7af68f6c1:core.Destroy.Core"(ptr %self) #0 !dbg !98 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8_3.1.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !100 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc8_3.1.y), !dbg !100 -// CHECK:STDOUT: %.loc8_3.2.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !100 -// CHECK:STDOUT: call void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %.loc8_3.2.x), !dbg !100 -// CHECK:STDOUT: ret void, !dbg !100 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.774d7de7af68f6c1:core.Destroy.Core"(ptr %self) #0 !dbg !102 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.774d7de7af68f6c1:core.Destroy.Core"(ptr %self), !dbg !104 +// CHECK:STDOUT: %use_tail_padding.var = alloca { <{ ptr, i32 }>, i32 }, align 8, !dbg !96 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %use_tail_padding.var), !dbg !96 +// CHECK:STDOUT: %.loc9_22.a = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %use_tail_padding.var, i32 0, i32 0, !dbg !98 +// CHECK:STDOUT: %.loc9_24.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc9_22.a, i32 0, i32 1, !dbg !98 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc9_24.y), !dbg !100 +// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %use_tail_padding.var, i32 0, i32 1, !dbg !101 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !103 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.20a1f5eea11f2fca(ptr %use_tail_padding.var), !dbg !96 // CHECK:STDOUT: ret void, !dbg !104 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.7f1c6b303f8f3e0f:core.Destroy.Core"(ptr %self) #0 !dbg !106 { +// CHECK:STDOUT: define weak_odr void @"_COp.774d7de7af68f6c1:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !105 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8_3.1.b = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 1, !dbg !108 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc8_3.1.b), !dbg !108 -// CHECK:STDOUT: %.loc8_3.2.a = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 0, !dbg !108 -// CHECK:STDOUT: call void @"_CSelfDestruct.774d7de7af68f6c1:core.Destroy.Core"(ptr %.loc8_3.2.a), !dbg !108 -// CHECK:STDOUT: ret void, !dbg !108 +// CHECK:STDOUT: %.loc8_3.1.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !107 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc8_3.1.y), !dbg !107 +// CHECK:STDOUT: %.loc8_3.4.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !107 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5ae382a48d083172(ptr %.loc8_3.4.x), !dbg !107 +// CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7f1c6b303f8f3e0f:core.Destroy.Core"(ptr %self) #0 !dbg !110 { +// CHECK:STDOUT: define weak_odr void @"_COp.7f1c6b303f8f3e0f:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !109 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.7f1c6b303f8f3e0f:core.Destroy.Core"(ptr %self), !dbg !112 -// CHECK:STDOUT: ret void, !dbg !112 +// CHECK:STDOUT: %.loc8_3.1.b = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 1, !dbg !111 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc8_3.1.b), !dbg !111 +// CHECK:STDOUT: %.loc8_3.4.a = getelementptr inbounds nuw { <{ ptr, i32 }>, i32 }, ptr %self, i32 0, i32 0, !dbg !111 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.599d5fcb55f0df44(ptr %.loc8_3.4.a), !dbg !111 +// CHECK:STDOUT: ret void, !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)) #1 // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.20a1f5eea11f2fca(ptr %t) #0 !dbg !113 { +// CHECK:STDOUT: call void @"_COp.7f1c6b303f8f3e0f:core.SubobjectDestroy.Core"(ptr %t), !dbg !117 +// CHECK:STDOUT: ret void, !dbg !118 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !120 { +// CHECK:STDOUT: ret void, !dbg !125 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.5ae382a48d083172(ptr %t) #0 !dbg !127 { +// CHECK:STDOUT: ret void, !dbg !132 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.599d5fcb55f0df44(ptr %t) #0 !dbg !134 { +// CHECK:STDOUT: call void @"_COp.774d7de7af68f6c1:core.SubobjectDestroy.Core"(ptr %t), !dbg !138 +// CHECK:STDOUT: ret void, !dbg !139 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } +// 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 = !{!79} +// CHECK:STDOUT: !llvm.dbg.cu = !{!94} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{null, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !78 = !DIFile(filename: "use_tail_padding.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: "F", linkageName: "_CF.Main", scope: null, file: !78, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !79) -// CHECK:STDOUT: !81 = !DILocation(line: 8, column: 3, scope: !80) -// CHECK:STDOUT: !83 = !DILocation(line: 9, column: 6, scope: !80) -// CHECK:STDOUT: !85 = !DILocation(line: 9, column: 3, scope: !80) -// CHECK:STDOUT: !86 = !DILocation(line: 10, column: 6, scope: !80) -// CHECK:STDOUT: !88 = !DILocation(line: 10, column: 3, scope: !80) -// CHECK:STDOUT: !89 = !DILocation(line: 5, column: 1, scope: !80) -// CHECK:STDOUT: !90 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !78, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !79, retainedNodes: !93) -// CHECK:STDOUT: !91 = !DILocalVariable(arg: 1, scope: !90, type: !21) -// CHECK:STDOUT: !92 = !DILocation(line: 8, column: 3, scope: !90) -// CHECK:STDOUT: !93 = !{!91} -// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !78, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !79, retainedNodes: !97) -// CHECK:STDOUT: !95 = !DILocalVariable(arg: 1, scope: !94, type: !20) -// CHECK:STDOUT: !96 = !DILocation(line: 8, column: 3, scope: !94) -// CHECK:STDOUT: !97 = !{!95} -// CHECK:STDOUT: !98 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.774d7de7af68f6c1:core.Destroy.Core", scope: null, file: !78, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !79, 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.774d7de7af68f6c1:core.Destroy.Core", scope: null, file: !78, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !79, retainedNodes: !105) -// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !21) -// CHECK:STDOUT: !104 = !DILocation(line: 8, column: 3, scope: !102) -// CHECK:STDOUT: !105 = !{!103} -// CHECK:STDOUT: !106 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.7f1c6b303f8f3e0f:core.Destroy.Core", scope: null, file: !78, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !79, retainedNodes: !109) -// CHECK:STDOUT: !107 = !DILocalVariable(arg: 1, scope: !106, type: !21) -// CHECK:STDOUT: !108 = !DILocation(line: 8, column: 3, scope: !106) -// CHECK:STDOUT: !109 = !{!107} -// CHECK:STDOUT: !110 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7f1c6b303f8f3e0f:core.Destroy.Core", scope: null, file: !78, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !79, 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: !42 = !{null, !20} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !93 = !DIFile(filename: "use_tail_padding.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 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !93, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !94) +// CHECK:STDOUT: !96 = !DILocation(line: 8, column: 3, scope: !95) +// CHECK:STDOUT: !98 = !DILocation(line: 9, column: 6, scope: !95) +// CHECK:STDOUT: !100 = !DILocation(line: 9, column: 3, scope: !95) +// CHECK:STDOUT: !101 = !DILocation(line: 10, column: 6, scope: !95) +// CHECK:STDOUT: !103 = !DILocation(line: 10, column: 3, scope: !95) +// CHECK:STDOUT: !104 = !DILocation(line: 5, column: 1, scope: !95) +// CHECK:STDOUT: !105 = distinct !DISubprogram(name: "Op", linkageName: "_COp.774d7de7af68f6c1:core.SubobjectDestroy.Core", scope: null, file: !93, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !108) +// CHECK:STDOUT: !106 = !DILocalVariable(arg: 1, scope: !105, type: !21) +// CHECK:STDOUT: !107 = !DILocation(line: 8, column: 3, scope: !105) +// CHECK:STDOUT: !108 = !{!106} +// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7f1c6b303f8f3e0f:core.SubobjectDestroy.Core", scope: null, file: !93, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !112) +// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !21) +// CHECK:STDOUT: !111 = !DILocation(line: 8, column: 3, scope: !109) +// CHECK:STDOUT: !112 = !{!110} +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.20a1f5eea11f2fca", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !119) +// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !21) +// CHECK:STDOUT: !117 = !DILocation(line: 34, column: 5, scope: !113) +// CHECK:STDOUT: !118 = !DILocation(line: 32, column: 1, scope: !113) +// CHECK:STDOUT: !119 = !{!114} +// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !126) +// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !20) +// CHECK:STDOUT: !125 = !DILocation(line: 32, column: 1, scope: !120) +// CHECK:STDOUT: !126 = !{!121} +// CHECK:STDOUT: !127 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5ae382a48d083172", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !133) +// CHECK:STDOUT: !128 = !DILocalVariable(arg: 1, scope: !127, type: !21) +// CHECK:STDOUT: !132 = !DILocation(line: 32, column: 1, scope: !127) +// CHECK:STDOUT: !133 = !{!128} +// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.599d5fcb55f0df44", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !94, retainedNodes: !140) +// CHECK:STDOUT: !135 = !DILocalVariable(arg: 1, scope: !134, type: !21) +// CHECK:STDOUT: !138 = !DILocation(line: 34, column: 5, scope: !134) +// CHECK:STDOUT: !139 = !DILocation(line: 32, column: 1, scope: !134) +// CHECK:STDOUT: !140 = !{!135} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'implicit_padding.carbon' @@ -377,117 +381,119 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !116 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !143 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %implicit_padding.var = alloca { <{ ptr, i32 }>, ptr }, align 8, !dbg !117 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %implicit_padding.var), !dbg !117 -// CHECK:STDOUT: %.loc9_22.a = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %implicit_padding.var, i32 0, i32 0, !dbg !119 -// CHECK:STDOUT: %.loc9_24.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc9_22.a, i32 0, i32 0, !dbg !119 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc9_24.x), !dbg !121 -// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %implicit_padding.var, i32 0, i32 1, !dbg !122 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !124 -// CHECK:STDOUT: call void @"_CSelfDestruct.c4d39b37cd54a4ef:core.Destroy.Core"(ptr %implicit_padding.var), !dbg !117 -// CHECK:STDOUT: ret void, !dbg !125 +// CHECK:STDOUT: %implicit_padding.var = alloca { <{ ptr, i32 }>, ptr }, align 8, !dbg !144 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %implicit_padding.var), !dbg !144 +// CHECK:STDOUT: %.loc9_22.a = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %implicit_padding.var, i32 0, i32 0, !dbg !146 +// CHECK:STDOUT: %.loc9_24.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %.loc9_22.a, i32 0, i32 0, !dbg !146 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc9_24.x), !dbg !148 +// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %implicit_padding.var, i32 0, i32 1, !dbg !149 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !151 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a0711477393c4dd4(ptr %implicit_padding.var), !dbg !144 +// CHECK:STDOUT: ret void, !dbg !152 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %self) #0 !dbg !126 { +// CHECK:STDOUT: define weak_odr void @"_COp.774d7de7af68f6c1:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !153 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !128 +// CHECK:STDOUT: %.loc8_3.1.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !155 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc8_3.1.y), !dbg !155 +// CHECK:STDOUT: %.loc8_3.4.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !155 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5ae382a48d083172(ptr %.loc8_3.4.x), !dbg !155 +// CHECK:STDOUT: ret void, !dbg !155 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !130 { +// CHECK:STDOUT: define weak_odr void @"_COp.c4d39b37cd54a4ef:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !157 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !132 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.774d7de7af68f6c1:core.Destroy.Core"(ptr %self) #0 !dbg !134 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8_3.1.y = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !136 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc8_3.1.y), !dbg !136 -// CHECK:STDOUT: %.loc8_3.2.x = getelementptr inbounds nuw <{ ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !136 -// CHECK:STDOUT: call void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %.loc8_3.2.x), !dbg !136 -// CHECK:STDOUT: ret void, !dbg !136 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.774d7de7af68f6c1:core.Destroy.Core"(ptr %self) #0 !dbg !138 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.774d7de7af68f6c1: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 @"_CSubobjectDestroy.c4d39b37cd54a4ef:core.Destroy.Core"(ptr %self) #0 !dbg !142 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8_3.1.b = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %self, i32 0, i32 1, !dbg !144 -// CHECK:STDOUT: call void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %.loc8_3.1.b), !dbg !144 -// CHECK:STDOUT: %.loc8_3.2.a = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %self, i32 0, i32 0, !dbg !144 -// CHECK:STDOUT: call void @"_CSelfDestruct.774d7de7af68f6c1:core.Destroy.Core"(ptr %.loc8_3.2.a), !dbg !144 -// CHECK:STDOUT: ret void, !dbg !144 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c4d39b37cd54a4ef:core.Destroy.Core"(ptr %self) #0 !dbg !146 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c4d39b37cd54a4ef:core.Destroy.Core"(ptr %self), !dbg !148 -// CHECK:STDOUT: ret void, !dbg !148 +// CHECK:STDOUT: %.loc8_3.1.b = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %self, i32 0, i32 1, !dbg !159 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5ae382a48d083172(ptr %.loc8_3.1.b), !dbg !159 +// CHECK:STDOUT: %.loc8_3.4.a = getelementptr inbounds nuw { <{ ptr, i32 }>, ptr }, ptr %self, i32 0, i32 0, !dbg !159 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.599d5fcb55f0df44(ptr %.loc8_3.4.a), !dbg !159 +// CHECK:STDOUT: ret void, !dbg !159 // 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 @_CSelfDestruct.Core.a0711477393c4dd4(ptr %t) #0 !dbg !161 { +// CHECK:STDOUT: call void @"_COp.c4d39b37cd54a4ef:core.SubobjectDestroy.Core"(ptr %t), !dbg !165 +// CHECK:STDOUT: ret void, !dbg !166 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !168 { +// CHECK:STDOUT: ret void, !dbg !173 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.5ae382a48d083172(ptr %t) #0 !dbg !175 { +// CHECK:STDOUT: ret void, !dbg !180 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.599d5fcb55f0df44(ptr %t) #0 !dbg !182 { +// CHECK:STDOUT: call void @"_COp.774d7de7af68f6c1:core.SubobjectDestroy.Core"(ptr %t), !dbg !186 +// CHECK:STDOUT: ret void, !dbg !187 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.5ae382a48d083172, { 1, 0 } +// 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 = !{!115} +// CHECK:STDOUT: !llvm.dbg.cu = !{!142} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{null, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !114 = !DIFile(filename: "implicit_padding.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: !116 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !114, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !115) -// CHECK:STDOUT: !117 = !DILocation(line: 8, column: 3, scope: !116) -// CHECK:STDOUT: !119 = !DILocation(line: 9, column: 6, scope: !116) -// CHECK:STDOUT: !121 = !DILocation(line: 9, column: 3, scope: !116) -// CHECK:STDOUT: !122 = !DILocation(line: 10, column: 6, scope: !116) -// CHECK:STDOUT: !124 = !DILocation(line: 10, column: 3, scope: !116) -// CHECK:STDOUT: !125 = !DILocation(line: 5, column: 1, scope: !116) -// CHECK:STDOUT: !126 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !114, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !115, 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: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !114, line: 8, type: !27, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !133) -// CHECK:STDOUT: !131 = !DILocalVariable(arg: 1, scope: !130, type: !20) -// CHECK:STDOUT: !132 = !DILocation(line: 8, column: 3, scope: !130) -// CHECK:STDOUT: !133 = !{!131} -// CHECK:STDOUT: !134 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.774d7de7af68f6c1:core.Destroy.Core", scope: null, file: !114, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !115, 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: !138 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.774d7de7af68f6c1:core.Destroy.Core", scope: null, file: !114, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !115, 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: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c4d39b37cd54a4ef:core.Destroy.Core", scope: null, file: !114, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !145) -// CHECK:STDOUT: !143 = !DILocalVariable(arg: 1, scope: !142, type: !21) -// CHECK:STDOUT: !144 = !DILocation(line: 8, column: 3, scope: !142) -// CHECK:STDOUT: !145 = !{!143} -// CHECK:STDOUT: !146 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c4d39b37cd54a4ef:core.Destroy.Core", scope: null, file: !114, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !115, retainedNodes: !149) -// CHECK:STDOUT: !147 = !DILocalVariable(arg: 1, scope: !146, type: !21) -// CHECK:STDOUT: !148 = !DILocation(line: 8, column: 3, scope: !146) -// CHECK:STDOUT: !149 = !{!147} +// CHECK:STDOUT: !42 = !{null, !20} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !141 = !DIFile(filename: "implicit_padding.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 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !141, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !142) +// CHECK:STDOUT: !144 = !DILocation(line: 8, column: 3, scope: !143) +// CHECK:STDOUT: !146 = !DILocation(line: 9, column: 6, scope: !143) +// CHECK:STDOUT: !148 = !DILocation(line: 9, column: 3, scope: !143) +// CHECK:STDOUT: !149 = !DILocation(line: 10, column: 6, scope: !143) +// CHECK:STDOUT: !151 = !DILocation(line: 10, column: 3, scope: !143) +// CHECK:STDOUT: !152 = !DILocation(line: 5, column: 1, scope: !143) +// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "Op", linkageName: "_COp.774d7de7af68f6c1:core.SubobjectDestroy.Core", scope: null, file: !141, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !156) +// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !21) +// CHECK:STDOUT: !155 = !DILocation(line: 8, column: 3, scope: !153) +// CHECK:STDOUT: !156 = !{!154} +// CHECK:STDOUT: !157 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c4d39b37cd54a4ef:core.SubobjectDestroy.Core", scope: null, file: !141, line: 8, type: !23, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !160) +// CHECK:STDOUT: !158 = !DILocalVariable(arg: 1, scope: !157, type: !21) +// CHECK:STDOUT: !159 = !DILocation(line: 8, column: 3, scope: !157) +// CHECK:STDOUT: !160 = !{!158} +// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.a0711477393c4dd4", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !167) +// CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !21) +// CHECK:STDOUT: !165 = !DILocation(line: 34, column: 5, scope: !161) +// CHECK:STDOUT: !166 = !DILocation(line: 32, column: 1, scope: !161) +// CHECK:STDOUT: !167 = !{!162} +// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !174) +// CHECK:STDOUT: !169 = !DILocalVariable(arg: 1, scope: !168, type: !20) +// CHECK:STDOUT: !173 = !DILocation(line: 32, column: 1, scope: !168) +// CHECK:STDOUT: !174 = !{!169} +// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5ae382a48d083172", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !181) +// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !21) +// CHECK:STDOUT: !180 = !DILocation(line: 32, column: 1, scope: !175) +// CHECK:STDOUT: !181 = !{!176} +// CHECK:STDOUT: !182 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.599d5fcb55f0df44", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !142, retainedNodes: !188) +// CHECK:STDOUT: !183 = !DILocalVariable(arg: 1, scope: !182, type: !21) +// CHECK:STDOUT: !186 = !DILocation(line: 34, column: 5, scope: !182) +// CHECK:STDOUT: !187 = !DILocation(line: 32, column: 1, scope: !182) +// CHECK:STDOUT: !188 = !{!183} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'insert_padding.carbon' @@ -496,114 +502,116 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !152 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !191 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %insert_padding.var = alloca <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, align 8, !dbg !153 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %insert_padding.var), !dbg !153 -// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, ptr %insert_padding.var, i32 0, i32 1, !dbg !155 -// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !157 -// CHECK:STDOUT: call void @"_CSelfDestruct.c8d3397a249d1a4e:core.Destroy.Core"(ptr %insert_padding.var), !dbg !153 -// CHECK:STDOUT: ret void, !dbg !158 +// CHECK:STDOUT: %insert_padding.var = alloca <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, align 8, !dbg !192 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %insert_padding.var), !dbg !192 +// CHECK:STDOUT: %.loc10.b = getelementptr inbounds nuw <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, ptr %insert_padding.var, i32 0, i32 1, !dbg !194 +// CHECK:STDOUT: call void @_CG.Main(ptr %.loc10.b), !dbg !196 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e01da6383196b847(ptr %insert_padding.var), !dbg !192 +// CHECK:STDOUT: ret void, !dbg !197 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !159 { +// CHECK:STDOUT: define weak_odr void @"_COp.5dc248c5ee366a00:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !198 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !161 +// CHECK:STDOUT: %.loc9_3.1.z = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !200 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc9_3.1.z), !dbg !200 +// CHECK:STDOUT: %.loc9_3.4.y = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !200 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc9_3.4.y), !dbg !200 +// CHECK:STDOUT: %.loc9_3.7.x = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !200 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc9_3.7.x), !dbg !200 +// CHECK:STDOUT: ret void, !dbg !200 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.5dc248c5ee366a00:core.Destroy.Core"(ptr %self) #0 !dbg !163 { +// CHECK:STDOUT: define weak_odr void @"_COp.c8d3397a249d1a4e:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !202 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.z = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !165 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc9_3.1.z), !dbg !165 -// CHECK:STDOUT: %.loc9_3.2.y = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !165 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc9_3.2.y), !dbg !165 -// CHECK:STDOUT: %.loc9_3.3.x = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !165 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc9_3.3.x), !dbg !165 -// CHECK:STDOUT: ret void, !dbg !165 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5dc248c5ee366a00:core.Destroy.Core"(ptr %self) #0 !dbg !167 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5dc248c5ee366a00: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 @"_CSelfDestruct.8436f795915f0543: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.c8d3397a249d1a4e:core.Destroy.Core"(ptr %self) #0 !dbg !175 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.c = getelementptr inbounds nuw <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, ptr %self, i32 0, i32 2, !dbg !177 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc9_3.1.c), !dbg !177 -// CHECK:STDOUT: %.loc9_3.2.b = getelementptr inbounds nuw <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !177 -// CHECK:STDOUT: call void @"_CSelfDestruct.8436f795915f0543:core.Destroy.Core"(ptr %.loc9_3.2.b), !dbg !177 -// CHECK:STDOUT: %.loc9_3.3.a = getelementptr inbounds nuw <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !177 -// CHECK:STDOUT: call void @"_CSelfDestruct.5dc248c5ee366a00:core.Destroy.Core"(ptr %.loc9_3.3.a), !dbg !177 -// CHECK:STDOUT: ret void, !dbg !177 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c8d3397a249d1a4e:core.Destroy.Core"(ptr %self) #0 !dbg !179 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.c8d3397a249d1a4e:core.Destroy.Core"(ptr %self), !dbg !181 -// CHECK:STDOUT: ret void, !dbg !181 +// CHECK:STDOUT: %.loc9_3.1.c = getelementptr inbounds nuw <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, ptr %self, i32 0, i32 2, !dbg !204 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc9_3.1.c), !dbg !204 +// CHECK:STDOUT: %.loc9_3.4.b = getelementptr inbounds nuw <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, ptr %self, i32 0, i32 1, !dbg !204 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5ae382a48d083172(ptr %.loc9_3.4.b), !dbg !204 +// CHECK:STDOUT: %.loc9_3.7.a = getelementptr inbounds nuw <{ <{ { i32, i32, i32 }, [4 x i8] }>, ptr, i32 }>, ptr %self, i32 0, i32 0, !dbg !204 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.45b2634a1e0e517e(ptr %.loc9_3.7.a), !dbg !204 +// CHECK:STDOUT: ret void, !dbg !204 // 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 @_CSelfDestruct.Core.e01da6383196b847(ptr %t) #0 !dbg !206 { +// CHECK:STDOUT: call void @"_COp.c8d3397a249d1a4e:core.SubobjectDestroy.Core"(ptr %t), !dbg !210 +// CHECK:STDOUT: ret void, !dbg !211 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !213 { +// CHECK:STDOUT: ret void, !dbg !218 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.5ae382a48d083172(ptr %t) #0 !dbg !220 { +// CHECK:STDOUT: ret void, !dbg !225 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.45b2634a1e0e517e(ptr %t) #0 !dbg !227 { +// CHECK:STDOUT: call void @"_COp.5dc248c5ee366a00:core.SubobjectDestroy.Core"(ptr %t), !dbg !231 +// CHECK:STDOUT: ret void, !dbg !232 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 3, 2, 1, 0 } +// 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 = !{!151} +// CHECK:STDOUT: !llvm.dbg.cu = !{!190} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !22 = !{null, !21} // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !150 = !DIFile(filename: "insert_padding.carbon", directory: "") -// CHECK:STDOUT: !151 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !150, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !150, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !151) -// CHECK:STDOUT: !153 = !DILocation(line: 9, column: 3, scope: !152) -// CHECK:STDOUT: !155 = !DILocation(line: 10, column: 6, scope: !152) -// CHECK:STDOUT: !157 = !DILocation(line: 10, column: 3, scope: !152) -// CHECK:STDOUT: !158 = !DILocation(line: 5, column: 1, scope: !152) -// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !150, line: 9, type: !27, spFlags: DISPFlagDefinition, unit: !151, retainedNodes: !162) -// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !20) -// CHECK:STDOUT: !161 = !DILocation(line: 9, column: 3, scope: !159) -// CHECK:STDOUT: !162 = !{!160} -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5dc248c5ee366a00:core.Destroy.Core", scope: null, file: !150, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !151, 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.5dc248c5ee366a00:core.Destroy.Core", scope: null, file: !150, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !151, 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: !171 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8436f795915f0543:core.Destroy.Core", scope: null, file: !150, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !151, retainedNodes: !174) -// CHECK:STDOUT: !172 = !DILocalVariable(arg: 1, scope: !171, type: !21) -// CHECK:STDOUT: !173 = !DILocation(line: 9, column: 3, scope: !171) -// CHECK:STDOUT: !174 = !{!172} -// CHECK:STDOUT: !175 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.c8d3397a249d1a4e:core.Destroy.Core", scope: null, file: !150, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !151, retainedNodes: !178) -// CHECK:STDOUT: !176 = !DILocalVariable(arg: 1, scope: !175, type: !21) -// CHECK:STDOUT: !177 = !DILocation(line: 9, column: 3, scope: !175) -// CHECK:STDOUT: !178 = !{!176} -// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c8d3397a249d1a4e:core.Destroy.Core", scope: null, file: !150, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !151, retainedNodes: !182) -// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !21) -// CHECK:STDOUT: !181 = !DILocation(line: 9, column: 3, scope: !179) -// CHECK:STDOUT: !182 = !{!180} +// CHECK:STDOUT: !42 = !{null, !20} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !189 = !DIFile(filename: "insert_padding.carbon", directory: "") +// CHECK:STDOUT: !190 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !189, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !189, line: 5, type: !25, spFlags: DISPFlagDefinition, unit: !190) +// CHECK:STDOUT: !192 = !DILocation(line: 9, column: 3, scope: !191) +// CHECK:STDOUT: !194 = !DILocation(line: 10, column: 6, scope: !191) +// CHECK:STDOUT: !196 = !DILocation(line: 10, column: 3, scope: !191) +// CHECK:STDOUT: !197 = !DILocation(line: 5, column: 1, scope: !191) +// CHECK:STDOUT: !198 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5dc248c5ee366a00:core.SubobjectDestroy.Core", scope: null, file: !189, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !190, retainedNodes: !201) +// CHECK:STDOUT: !199 = !DILocalVariable(arg: 1, scope: !198, type: !21) +// CHECK:STDOUT: !200 = !DILocation(line: 9, column: 3, scope: !198) +// CHECK:STDOUT: !201 = !{!199} +// CHECK:STDOUT: !202 = distinct !DISubprogram(name: "Op", linkageName: "_COp.c8d3397a249d1a4e:core.SubobjectDestroy.Core", scope: null, file: !189, line: 9, type: !23, spFlags: DISPFlagDefinition, unit: !190, retainedNodes: !205) +// CHECK:STDOUT: !203 = !DILocalVariable(arg: 1, scope: !202, type: !21) +// CHECK:STDOUT: !204 = !DILocation(line: 9, column: 3, scope: !202) +// CHECK:STDOUT: !205 = !{!203} +// CHECK:STDOUT: !206 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e01da6383196b847", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !190, retainedNodes: !212) +// CHECK:STDOUT: !207 = !DILocalVariable(arg: 1, scope: !206, type: !21) +// CHECK:STDOUT: !210 = !DILocation(line: 34, column: 5, scope: !206) +// CHECK:STDOUT: !211 = !DILocation(line: 32, column: 1, scope: !206) +// CHECK:STDOUT: !212 = !{!207} +// CHECK:STDOUT: !213 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !190, retainedNodes: !219) +// CHECK:STDOUT: !214 = !DILocalVariable(arg: 1, scope: !213, type: !20) +// CHECK:STDOUT: !218 = !DILocation(line: 32, column: 1, scope: !213) +// CHECK:STDOUT: !219 = !{!214} +// CHECK:STDOUT: !220 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5ae382a48d083172", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !190, retainedNodes: !226) +// CHECK:STDOUT: !221 = !DILocalVariable(arg: 1, scope: !220, type: !21) +// CHECK:STDOUT: !225 = !DILocation(line: 32, column: 1, scope: !220) +// CHECK:STDOUT: !226 = !{!221} +// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.45b2634a1e0e517e", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !190, retainedNodes: !233) +// CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !21) +// CHECK:STDOUT: !231 = !DILocation(line: 34, column: 5, scope: !227) +// CHECK:STDOUT: !232 = !DILocation(line: 32, column: 1, scope: !227) +// CHECK:STDOUT: !233 = !{!228} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/member_access.carbon b/toolchain/lower/testdata/struct/member_access.carbon index d44dadd99234..b2f7b1b6f9d8 100644 --- a/toolchain/lower/testdata/struct/member_access.carbon +++ b/toolchain/lower/testdata/struct/member_access.carbon @@ -21,69 +21,66 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'member_access.carbon' // CHECK:STDOUT: source_filename = "member_access.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.242.loc14_3 = internal constant <{ double, i32 }> <{ double 0.000000e+00, i32 1 }> +// CHECK:STDOUT: @struct.242.loc14_3.1 = internal constant <{ double, i32 }> <{ double 0.000000e+00, i32 1 }> // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !44 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !42 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca <{ double, i32 }>, align 8, !dbg !47 -// CHECK:STDOUT: %y.var = alloca i32, align 4, !dbg !50 -// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !53 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !47 -// CHECK:STDOUT: %.loc14_48.3.a = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 0, !dbg !48 -// CHECK:STDOUT: %.loc14_48.6.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 1, !dbg !48 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %x.var, ptr align 8 @struct.242.loc14_3, i64 12, i1 false), !dbg !47 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !50 -// CHECK:STDOUT: %.loc15_17.1.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 1, !dbg !51 -// CHECK:STDOUT: %.loc15_17.2 = load i32, ptr %.loc15_17.1.b, align 4, !dbg !51 -// CHECK:STDOUT: store i32 %.loc15_17.2, ptr %y.var, align 4, !dbg !50 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !53 -// CHECK:STDOUT: %.loc16 = load i32, ptr %y.var, align 4, !dbg !54 -// CHECK:STDOUT: store i32 %.loc16, ptr %_.var, align 4, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var), !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %y.var), !dbg !50 -// CHECK:STDOUT: call void @"_CSelfDestruct.09efc035ec10d921:core.Destroy.Core"(ptr %x.var), !dbg !47 +// CHECK:STDOUT: %x.var = alloca <{ double, i32 }>, align 8, !dbg !45 +// CHECK:STDOUT: %y.var = alloca i32, align 4, !dbg !48 +// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !51 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !45 +// CHECK:STDOUT: %.loc14_48.3.a = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 0, !dbg !46 +// CHECK:STDOUT: %.loc14_48.6.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 1, !dbg !46 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %x.var, ptr align 8 @struct.242.loc14_3.1, i64 12, i1 false), !dbg !45 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %y.var), !dbg !48 +// CHECK:STDOUT: %.loc15_17.1.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %x.var, i32 0, i32 1, !dbg !49 +// CHECK:STDOUT: %.loc15_17.2 = load i32, ptr %.loc15_17.1.b, align 4, !dbg !49 +// CHECK:STDOUT: store i32 %.loc15_17.2, ptr %y.var, align 4, !dbg !48 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !51 +// CHECK:STDOUT: %.loc16_16 = load i32, ptr %y.var, align 4, !dbg !52 +// CHECK:STDOUT: store i32 %.loc16_16, ptr %_.var, align 4, !dbg !51 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var), !dbg !51 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %y.var), !dbg !48 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.c6179d2a8b6c8a3e(ptr %x.var), !dbg !45 // CHECK:STDOUT: ret i32 0, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !57 { +// CHECK:STDOUT: define weak_odr void @"_COp.09efc035ec10d921:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !57 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc14_3.1.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %self, i32 0, i32 1, !dbg !59 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc14_3.1.b), !dbg !59 +// CHECK:STDOUT: %.loc14_3.4.a = getelementptr inbounds nuw <{ double, i32 }>, ptr %self, i32 0, i32 0, !dbg !59 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %.loc14_3.4.a), !dbg !59 // CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7619ac942aa9029a: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 @"_CSubobjectDestroy.09efc035ec10d921:core.Destroy.Core"(ptr %self) #0 !dbg !65 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc14_3.1.b = getelementptr inbounds nuw <{ double, i32 }>, ptr %self, i32 0, i32 1, !dbg !67 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc14_3.1.b), !dbg !67 -// CHECK:STDOUT: %.loc14_3.2.a = getelementptr inbounds nuw <{ double, i32 }>, ptr %self, i32 0, i32 0, !dbg !67 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %.loc14_3.2.a), !dbg !67 -// CHECK:STDOUT: ret void, !dbg !67 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.09efc035ec10d921:core.Destroy.Core"(ptr %self) #0 !dbg !69 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.09efc035ec10d921: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: // 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !61 { +// CHECK:STDOUT: ret void, !dbg !66 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.c6179d2a8b6c8a3e(ptr %t) #0 !dbg !68 { +// CHECK:STDOUT: call void @"_COp.09efc035ec10d921:core.SubobjectDestroy.Core"(ptr %t), !dbg !72 +// CHECK:STDOUT: ret void, !dbg !73 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !75 { +// CHECK:STDOUT: ret void, !dbg !80 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", { 0, 2, 1 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -93,38 +90,40 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !34 = !DIFile(filename: "member_access.carbon", directory: "") // CHECK:STDOUT: !35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !34, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !37 = !{!36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = !{null, !36} -// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !42 = !{null, !41} -// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !34, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !35) -// CHECK:STDOUT: !47 = !DILocation(line: 14, column: 3, scope: !44) -// CHECK:STDOUT: !48 = !DILocation(line: 14, column: 31, scope: !44) -// CHECK:STDOUT: !50 = !DILocation(line: 15, column: 3, scope: !44) -// CHECK:STDOUT: !51 = !DILocation(line: 15, column: 16, scope: !44) -// CHECK:STDOUT: !53 = !DILocation(line: 16, column: 3, scope: !44) -// CHECK:STDOUT: !54 = !DILocation(line: 16, column: 16, scope: !44) -// CHECK:STDOUT: !56 = !DILocation(line: 17, column: 3, scope: !44) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !34, line: 16, type: !40, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !60) -// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !36) -// CHECK:STDOUT: !59 = !DILocation(line: 16, column: 3, scope: !57) +// CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !40 = !{null, !39} +// CHECK:STDOUT: !41 = !DISubroutineType(types: !40) +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !34, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !35) +// CHECK:STDOUT: !45 = !DILocation(line: 14, column: 3, scope: !42) +// CHECK:STDOUT: !46 = !DILocation(line: 14, column: 31, scope: !42) +// CHECK:STDOUT: !48 = !DILocation(line: 15, column: 3, scope: !42) +// CHECK:STDOUT: !49 = !DILocation(line: 15, column: 16, scope: !42) +// CHECK:STDOUT: !51 = !DILocation(line: 16, column: 3, scope: !42) +// CHECK:STDOUT: !52 = !DILocation(line: 16, column: 16, scope: !42) +// CHECK:STDOUT: !54 = !{null, !36} +// CHECK:STDOUT: !55 = !DISubroutineType(types: !54) +// CHECK:STDOUT: !56 = !DILocation(line: 17, column: 3, scope: !42) +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "Op", linkageName: "_COp.09efc035ec10d921:core.SubobjectDestroy.Core", scope: null, file: !34, line: 14, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !60) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !39) +// CHECK:STDOUT: !59 = !DILocation(line: 14, column: 3, scope: !57) // CHECK:STDOUT: !60 = !{!58} -// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !34, line: 14, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !64) -// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !41) -// CHECK:STDOUT: !63 = !DILocation(line: 14, column: 3, scope: !61) -// CHECK:STDOUT: !64 = !{!62} -// CHECK:STDOUT: !65 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.09efc035ec10d921:core.Destroy.Core", scope: null, file: !34, line: 14, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !68) -// CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !65, type: !41) -// CHECK:STDOUT: !67 = !DILocation(line: 14, column: 3, scope: !65) -// CHECK:STDOUT: !68 = !{!66} -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.09efc035ec10d921:core.Destroy.Core", scope: null, file: !34, line: 14, type: !43, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !72) -// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !41) -// CHECK:STDOUT: !71 = !DILocation(line: 14, column: 3, scope: !69) -// CHECK:STDOUT: !72 = !{!70} +// CHECK:STDOUT: !61 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 32, type: !55, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !67) +// CHECK:STDOUT: !62 = !DILocalVariable(arg: 1, scope: !61, type: !36) +// CHECK:STDOUT: !66 = !DILocation(line: 32, column: 1, scope: !61) +// CHECK:STDOUT: !67 = !{!62} +// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.c6179d2a8b6c8a3e", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !74) +// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !39) +// CHECK:STDOUT: !72 = !DILocation(line: 34, column: 5, scope: !68) +// CHECK:STDOUT: !73 = !DILocation(line: 32, column: 1, scope: !68) +// CHECK:STDOUT: !74 = !{!69} +// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !26, line: 32, type: !41, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !81) +// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !39) +// CHECK:STDOUT: !80 = !DILocation(line: 32, column: 1, scope: !75) +// CHECK:STDOUT: !81 = !{!76} // 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 6659bfe28c84..f5ab1a8f96f3 100644 --- a/toolchain/lower/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/lower/testdata/struct/nested_struct_in_place.carbon @@ -23,63 +23,64 @@ fn G() { // CHECK:STDOUT: declare void @_CF.Main(ptr sret({ i32, i32, i32 })) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !30 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !28 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { { i32, i32, i32 }, { i32, i32, i32 } }, align 4, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !31 -// CHECK:STDOUT: %.loc16_74.1.a = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %_.var, i32 0, i32 0, !dbg !32 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_74.1.a), !dbg !33 -// CHECK:STDOUT: %.loc16_74.2.b = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %_.var, i32 0, i32 1, !dbg !32 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_74.2.b), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.1ac24e94d99a741b:core.Destroy.Core"(ptr %_.var), !dbg !31 -// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: %_.var = alloca { { i32, i32, i32 }, { i32, i32, i32 } }, align 4, !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !29 +// CHECK:STDOUT: %.loc16_74.1.a = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %_.var, i32 0, i32 0, !dbg !30 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_74.1.a), !dbg !31 +// CHECK:STDOUT: %.loc16_74.2.b = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %_.var, i32 0, i32 1, !dbg !30 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_74.2.b), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4cb6cde41f3c3d24(ptr %_.var), !dbg !29 +// CHECK:STDOUT: ret void, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !37 { +// CHECK:STDOUT: define weak_odr void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !39 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem2.tuple.elem), !dbg !37 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !37 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !37 +// CHECK:STDOUT: ret void, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_COp.1ac24e94d99a741b:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !43 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !43 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !43 +// CHECK:STDOUT: %.loc16_3.1.b = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %.loc16_3.1.b), !dbg !43 +// CHECK:STDOUT: %.loc16_3.4.a = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %.loc16_3.4.a), !dbg !43 // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.abce894028f59bc0: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.1ac24e94d99a741b:core.Destroy.Core"(ptr %self) #0 !dbg !49 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_3.1.b = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %.loc16_3.1.b), !dbg !51 -// CHECK:STDOUT: %.loc16_3.2.a = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %.loc16_3.2.a), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !51 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1ac24e94d99a741b:core.Destroy.Core"(ptr %self) #0 !dbg !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.1ac24e94d99a741b: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 @_CSelfDestruct.Core.4cb6cde41f3c3d24(ptr %t) #0 !dbg !45 { +// CHECK:STDOUT: call void @"_COp.1ac24e94d99a741b:core.SubobjectDestroy.Core"(ptr %t), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !52 { +// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %t) #0 !dbg !59 { +// CHECK:STDOUT: call void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %t), !dbg !63 +// CHECK:STDOUT: ret void, !dbg !64 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6e65c86a129b7677, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -88,40 +89,43 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "nested_struct_in_place.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !26 = !{null, !21} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !21} -// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 3, scope: !30) -// CHECK:STDOUT: !32 = !DILocation(line: 16, column: 55, scope: !30) -// CHECK:STDOUT: !33 = !DILocation(line: 16, column: 61, scope: !30) -// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 71, scope: !30) -// CHECK:STDOUT: !36 = !DILocation(line: 15, column: 1, scope: !30) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) -// 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.abce894028f59bc0:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 16, column: 3, scope: !28) +// CHECK:STDOUT: !30 = !DILocation(line: 16, column: 55, scope: !28) +// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 61, scope: !28) +// CHECK:STDOUT: !32 = !DILocation(line: 16, column: 71, scope: !28) +// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 1, scope: !28) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.abce894028f59bc0:core.SubobjectDestroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !21) +// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 3, scope: !35) +// CHECK:STDOUT: !38 = !{null, !20} +// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) +// CHECK:STDOUT: !40 = !{!36} +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.1ac24e94d99a741b:core.SubobjectDestroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !21) // CHECK:STDOUT: !43 = !DILocation(line: 16, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.abce894028f59bc0:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4cb6cde41f3c3d24", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) // 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.1ac24e94d99a741b: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.1ac24e94d99a741b: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: !49 = !DILocation(line: 34, column: 5, scope: !45) +// CHECK:STDOUT: !50 = !DILocation(line: 32, column: 1, scope: !45) +// CHECK:STDOUT: !51 = !{!46} +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !39, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !20) +// CHECK:STDOUT: !57 = !DILocation(line: 32, column: 1, scope: !52) +// CHECK:STDOUT: !58 = !{!53} +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6e65c86a129b7677", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !21) +// CHECK:STDOUT: !63 = !DILocation(line: 34, column: 5, scope: !59) +// CHECK:STDOUT: !64 = !DILocation(line: 32, column: 1, scope: !59) +// CHECK:STDOUT: !65 = !{!60} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/one_entry.carbon b/toolchain/lower/testdata/struct/one_entry.carbon index f030607164a2..df8119279f9b 100644 --- a/toolchain/lower/testdata/struct/one_entry.carbon +++ b/toolchain/lower/testdata/struct/one_entry.carbon @@ -21,49 +21,47 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "one_entry.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !28 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca { i32 }, align 4, !dbg !31 -// CHECK:STDOUT: %_.var = alloca { i32 }, align 4, !dbg !33 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !31 -// CHECK:STDOUT: store { i32 } { i32 4 }, ptr %x.var, align 4, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !33 -// CHECK:STDOUT: %.loc15_22.1.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !34 -// CHECK:STDOUT: %.loc15_22.2 = load i32, ptr %.loc15_22.1.a, align 4, !dbg !34 -// CHECK:STDOUT: %.loc15_22.3.struct.init = insertvalue { i32 } poison, i32 %.loc15_22.2, 0, !dbg !34 -// CHECK:STDOUT: store { i32 } %.loc15_22.3.struct.init, ptr %_.var, align 4, !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.15e9ca085e5fab32:core.Destroy.Core"(ptr %_.var), !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.15e9ca085e5fab32:core.Destroy.Core"(ptr %x.var), !dbg !31 -// CHECK:STDOUT: ret i32 0, !dbg !36 +// CHECK:STDOUT: %x.var = alloca { i32 }, align 4, !dbg !29 +// CHECK:STDOUT: %_.var = alloca { i32 }, align 4, !dbg !31 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !29 +// CHECK:STDOUT: store { i32 } { i32 4 }, ptr %x.var, align 4, !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !31 +// CHECK:STDOUT: %.loc15_22.1.a = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !32 +// CHECK:STDOUT: %.loc15_22.2 = load i32, ptr %.loc15_22.1.a, align 4, !dbg !32 +// CHECK:STDOUT: %.loc15_22.3.struct.init = insertvalue { i32 } poison, i32 %.loc15_22.2, 0, !dbg !32 +// CHECK:STDOUT: store { i32 } %.loc15_22.3.struct.init, ptr %_.var, align 4, !dbg !31 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0ab8a5403fe67e42(ptr %_.var), !dbg !31 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0ab8a5403fe67e42(ptr %x.var), !dbg !29 +// CHECK:STDOUT: ret i32 0, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !37 { +// CHECK:STDOUT: define weak_odr void @"_COp.15e9ca085e5fab32:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !35 { // 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.15e9ca085e5fab32:core.Destroy.Core"(ptr %self) #0 !dbg !41 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc15.a), !dbg !43 -// CHECK:STDOUT: ret void, !dbg !43 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.15e9ca085e5fab32:core.Destroy.Core"(ptr %self) #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.15e9ca085e5fab32:core.Destroy.Core"(ptr %self), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: %.loc15_3.1.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc15_3.1.a), !dbg !37 +// CHECK:STDOUT: ret void, !dbg !37 // 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 @_CSelfDestruct.Core.0ab8a5403fe67e42(ptr %t) #0 !dbg !41 { +// CHECK:STDOUT: call void @"_COp.15e9ca085e5fab32:core.SubobjectDestroy.Core"(ptr %t), !dbg !45 +// CHECK:STDOUT: ret void, !dbg !46 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !48 { +// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.15e9ca085e5fab32:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.0ab8a5403fe67e42, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -73,31 +71,33 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "one_entry.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !26 = !{null, !25} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 3, scope: !28) -// CHECK:STDOUT: !33 = !DILocation(line: 15, column: 3, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 22, scope: !28) -// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 3, scope: !28) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) -// 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.15e9ca085e5fab32:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) -// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !25) -// CHECK:STDOUT: !43 = !DILocation(line: 15, column: 3, scope: !41) -// CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.15e9ca085e5fab32: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: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{null, !23} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 14, column: 3, scope: !26) +// CHECK:STDOUT: !31 = !DILocation(line: 15, column: 3, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 15, column: 22, scope: !26) +// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 3, scope: !26) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.15e9ca085e5fab32:core.SubobjectDestroy.Core", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !23) +// CHECK:STDOUT: !37 = !DILocation(line: 15, column: 3, scope: !35) +// CHECK:STDOUT: !38 = !{null, !20} +// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) +// CHECK:STDOUT: !40 = !{!36} +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.0ab8a5403fe67e42", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !23) +// CHECK:STDOUT: !45 = !DILocation(line: 34, column: 5, scope: !41) +// CHECK:STDOUT: !46 = !DILocation(line: 32, column: 1, scope: !41) +// CHECK:STDOUT: !47 = !{!42} +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !39, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !20) +// CHECK:STDOUT: !53 = !DILocation(line: 32, column: 1, scope: !48) +// CHECK:STDOUT: !54 = !{!49} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/two_entries.carbon b/toolchain/lower/testdata/struct/two_entries.carbon index cc9795089bd1..cace4d1cb0bc 100644 --- a/toolchain/lower/testdata/struct/two_entries.carbon +++ b/toolchain/lower/testdata/struct/two_entries.carbon @@ -20,52 +20,39 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'two_entries.carbon' // CHECK:STDOUT: source_filename = "two_entries.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @struct.940.loc14_3 = internal constant { i32, i32 } { i32 1, i32 2 } +// CHECK:STDOUT: @struct.940.loc14_3.1 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !28 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca { i32, i32 }, align 4, !dbg !31 -// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !34 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !31 -// CHECK:STDOUT: %.loc14_46.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !32 -// CHECK:STDOUT: %.loc14_46.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !32 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @struct.940.loc14_3, i64 8, i1 false), !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !34 -// CHECK:STDOUT: %.loc15_31.1.a = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !35 -// CHECK:STDOUT: %.loc15_31.2 = load i32, ptr %.loc15_31.1.a, align 4, !dbg !35 -// CHECK:STDOUT: %.loc15_31.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %_.var, i32 0, i32 0, !dbg !35 -// CHECK:STDOUT: store i32 %.loc15_31.2, ptr %.loc15_31.3.a, align 4, !dbg !35 -// CHECK:STDOUT: %.loc15_31.5.b = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !35 -// CHECK:STDOUT: %.loc15_31.6 = load i32, ptr %.loc15_31.5.b, align 4, !dbg !35 -// CHECK:STDOUT: %.loc15_31.7.b = getelementptr inbounds nuw { i32, i32 }, ptr %_.var, i32 0, i32 1, !dbg !35 -// CHECK:STDOUT: store i32 %.loc15_31.6, ptr %.loc15_31.7.b, align 4, !dbg !35 -// CHECK:STDOUT: call void @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core"(ptr %_.var), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core"(ptr %x.var), !dbg !31 -// CHECK:STDOUT: ret i32 0, !dbg !37 +// CHECK:STDOUT: %x.var = alloca { i32, i32 }, align 4, !dbg !29 +// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !32 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !29 +// CHECK:STDOUT: %.loc14_46.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !30 +// CHECK:STDOUT: %.loc14_46.6.b = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !30 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @struct.940.loc14_3.1, i64 8, i1 false), !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !32 +// CHECK:STDOUT: %.loc15_31.1.a = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: %.loc15_31.2 = load i32, ptr %.loc15_31.1.a, align 4, !dbg !33 +// CHECK:STDOUT: %.loc15_31.3.a = getelementptr inbounds nuw { i32, i32 }, ptr %_.var, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: store i32 %.loc15_31.2, ptr %.loc15_31.3.a, align 4, !dbg !33 +// CHECK:STDOUT: %.loc15_31.5.b = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !33 +// CHECK:STDOUT: %.loc15_31.6 = load i32, ptr %.loc15_31.5.b, align 4, !dbg !33 +// CHECK:STDOUT: %.loc15_31.7.b = getelementptr inbounds nuw { i32, i32 }, ptr %_.var, i32 0, i32 1, !dbg !33 +// CHECK:STDOUT: store i32 %.loc15_31.6, ptr %.loc15_31.7.b, align 4, !dbg !33 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ad01ed096e1f14e2(ptr %_.var), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ad01ed096e1f14e2(ptr %x.var), !dbg !29 +// CHECK:STDOUT: ret i32 0, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !38 { +// CHECK:STDOUT: define weak_odr void @"_COp.2508ed710019eba8:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !36 { // 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.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !42 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_3.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc15_3.1.b), !dbg !44 -// CHECK:STDOUT: %.loc15_3.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %.loc15_3.2.a), !dbg !44 -// CHECK:STDOUT: ret void, !dbg !44 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core"(ptr %self) #0 !dbg !46 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2508ed710019eba8:core.Destroy.Core"(ptr %self), !dbg !48 -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: %.loc15_3.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc15_3.1.b), !dbg !38 +// CHECK:STDOUT: %.loc15_3.4.a = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %.loc15_3.4.a), !dbg !38 +// CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -74,9 +61,21 @@ fn Run() -> i32 { // 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 @_CSelfDestruct.Core.ad01ed096e1f14e2(ptr %t) #0 !dbg !42 { +// CHECK:STDOUT: call void @"_COp.2508ed710019eba8:core.SubobjectDestroy.Core"(ptr %t), !dbg !46 +// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !49 { +// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.2508ed710019eba8:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.ad01ed096e1f14e2, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -86,32 +85,34 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "two_entries.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !26 = !{null, !25} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 3, scope: !28) -// CHECK:STDOUT: !32 = !DILocation(line: 14, column: 31, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 3, scope: !28) -// CHECK:STDOUT: !35 = !DILocation(line: 15, column: 31, scope: !28) -// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 3, scope: !28) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) -// 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.2508ed710019eba8:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !25) -// CHECK:STDOUT: !44 = !DILocation(line: 15, column: 3, scope: !42) -// CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2508ed710019eba8: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: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{null, !23} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 14, column: 3, scope: !26) +// CHECK:STDOUT: !30 = !DILocation(line: 14, column: 31, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 15, column: 3, scope: !26) +// CHECK:STDOUT: !33 = !DILocation(line: 15, column: 31, scope: !26) +// CHECK:STDOUT: !35 = !DILocation(line: 16, column: 3, scope: !26) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2508ed710019eba8:core.SubobjectDestroy.Core", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) +// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !23) +// CHECK:STDOUT: !38 = !DILocation(line: 15, column: 3, scope: !36) +// CHECK:STDOUT: !39 = !{null, !20} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !{!37} +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ad01ed096e1f14e2", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !23) +// CHECK:STDOUT: !46 = !DILocation(line: 34, column: 5, scope: !42) +// CHECK:STDOUT: !47 = !DILocation(line: 32, column: 1, scope: !42) +// CHECK:STDOUT: !48 = !{!43} +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !40, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) +// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !20) +// CHECK:STDOUT: !54 = !DILocation(line: 32, column: 1, scope: !49) +// CHECK:STDOUT: !55 = !{!50} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/template/class.carbon b/toolchain/lower/testdata/template/class.carbon index f52fea125b42..3b913047c7de 100644 --- a/toolchain/lower/testdata/template/class.carbon +++ b/toolchain/lower/testdata/template/class.carbon @@ -57,53 +57,27 @@ fn Run() { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_15.1.temp), !dbg !32 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc22_14.2.temp), !dbg !33 // CHECK:STDOUT: call void @_CMake.A.Main.a6a60dfee2d7d273(ptr %.loc22_15.1.temp, ptr @B.val.loc6_16), !dbg !32 -// CHECK:STDOUT: call void @"_CSelfDestruct.7d2f7eb7cbdbe84e:core.Destroy.Core"(ptr %.loc22_15.1.temp), !dbg !32 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr @B.val), !dbg !33 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.a2f48eddae22d125(ptr %.loc22_15.1.temp), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr @B.val), !dbg !33 // CHECK:STDOUT: ret i32 0, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !35 { +// CHECK:STDOUT: define weak_odr void @"_COp.8fbe0c6a865381a4:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc22_15.1.field = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc22_15.1.field), !dbg !37 // CHECK:STDOUT: ret void, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !39 { +// CHECK:STDOUT: define weak_odr void @"_COp.7d2f7eb7cbdbe84e:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !39 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %.loc22_15.1.field = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !41 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc22_15.1.field), !dbg !41 // CHECK:STDOUT: ret void, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8fbe0c6a865381a4:core.Destroy.Core"(ptr %self) #0 !dbg !43 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22.field = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !45 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc22.field), !dbg !45 -// CHECK:STDOUT: ret void, !dbg !45 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8fbe0c6a865381a4:core.Destroy.Core"(ptr %self) #0 !dbg !47 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8fbe0c6a865381a4: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.7d2f7eb7cbdbe84e:core.Destroy.Core"(ptr %self) #0 !dbg !51 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc22.field = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc22.field), !dbg !53 -// CHECK:STDOUT: ret void, !dbg !53 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.7d2f7eb7cbdbe84e:core.Destroy.Core"(ptr %self) #0 !dbg !55 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.7d2f7eb7cbdbe84e:core.Destroy.Core"(ptr %self), !dbg !57 -// CHECK:STDOUT: ret void, !dbg !57 -// 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: @@ -111,15 +85,27 @@ fn Run() { // 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 @_CMake.A.Main.a6a60dfee2d7d273(ptr sret({ {} }) %return, ptr %v) #0 !dbg !59 { +// CHECK:STDOUT: define linkonce_odr void @_CMake.A.Main.a6a60dfee2d7d273(ptr sret({ {} }) %return, ptr %v) #0 !dbg !43 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.549.field = getelementptr inbounds nuw { {} }, ptr %return, i32 0, i32 0, !dbg !65 -// CHECK:STDOUT: call void @"_COp.B.Main:Copy.Core"(ptr %.549.field, ptr %v), !dbg !64 -// CHECK:STDOUT: ret void, !dbg !66 +// CHECK:STDOUT: %.549.field = getelementptr inbounds nuw { {} }, ptr %return, i32 0, i32 0, !dbg !49 +// CHECK:STDOUT: call void @"_COp.B.Main:Copy.Core"(ptr %.549.field, ptr %v), !dbg !48 +// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.a2f48eddae22d125(ptr %t) #0 !dbg !52 { +// CHECK:STDOUT: call void @"_COp.7d2f7eb7cbdbe84e:core.SubobjectDestroy.Core"(ptr %t), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %t) #0 !dbg !59 { +// CHECK:STDOUT: ret void, !dbg !64 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6579a5013ba3dcd2, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -129,6 +115,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !6 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !14 = !DIFile(filename: "init_class.carbon", directory: "") // CHECK:STDOUT: !15 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !14, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) @@ -147,34 +134,27 @@ fn Run() { // CHECK:STDOUT: !32 = !DILocation(line: 22, column: 3, scope: !31) // CHECK:STDOUT: !33 = !DILocation(line: 22, column: 13, scope: !31) // CHECK:STDOUT: !34 = !DILocation(line: 21, column: 1, scope: !31) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !14, line: 22, type: !23, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !38) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8fbe0c6a865381a4:core.SubobjectDestroy.Core", scope: null, file: !14, line: 22, type: !23, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !38) // CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !16) // CHECK:STDOUT: !37 = !DILocation(line: 22, column: 3, scope: !35) // CHECK:STDOUT: !38 = !{!36} -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !14, line: 22, type: !23, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !42) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp.7d2f7eb7cbdbe84e:core.SubobjectDestroy.Core", scope: null, file: !14, line: 22, type: !23, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !42) // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !16) // CHECK:STDOUT: !41 = !DILocation(line: 22, column: 3, scope: !39) // CHECK:STDOUT: !42 = !{!40} -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8fbe0c6a865381a4:core.Destroy.Core", scope: null, file: !14, line: 22, type: !23, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !46) +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.A.Main.a6a60dfee2d7d273", scope: null, file: !14, line: 12, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !51) // CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !16) -// CHECK:STDOUT: !45 = !DILocation(line: 22, column: 3, scope: !43) -// CHECK:STDOUT: !46 = !{!44} -// CHECK:STDOUT: !47 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8fbe0c6a865381a4:core.Destroy.Core", scope: null, file: !14, line: 22, type: !23, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !50) -// CHECK:STDOUT: !48 = !DILocalVariable(arg: 1, scope: !47, type: !16) -// CHECK:STDOUT: !49 = !DILocation(line: 22, column: 3, scope: !47) -// CHECK:STDOUT: !50 = !{!48} -// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.7d2f7eb7cbdbe84e:core.Destroy.Core", scope: null, file: !14, line: 22, type: !23, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !54) -// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !16) -// CHECK:STDOUT: !53 = !DILocation(line: 22, column: 3, scope: !51) -// CHECK:STDOUT: !54 = !{!52} -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7d2f7eb7cbdbe84e:core.Destroy.Core", scope: null, file: !14, line: 22, type: !23, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !16) -// CHECK:STDOUT: !57 = !DILocation(line: 22, column: 3, scope: !55) -// CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "Make", linkageName: "_CMake.A.Main.a6a60dfee2d7d273", scope: null, file: !14, line: 12, type: !18, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !67) +// CHECK:STDOUT: !48 = !DILocation(line: 14, column: 16, scope: !43) +// CHECK:STDOUT: !49 = !DILocation(line: 13, column: 12, scope: !43) +// CHECK:STDOUT: !50 = !DILocation(line: 13, column: 5, scope: !43) +// CHECK:STDOUT: !51 = !{!44} +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.a2f48eddae22d125", scope: null, file: !6, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !58) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !16) +// CHECK:STDOUT: !56 = !DILocation(line: 34, column: 5, scope: !52) +// CHECK:STDOUT: !57 = !DILocation(line: 32, column: 1, scope: !52) +// CHECK:STDOUT: !58 = !{!53} +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6579a5013ba3dcd2", scope: null, file: !6, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !65) // CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !16) -// CHECK:STDOUT: !64 = !DILocation(line: 14, column: 16, scope: !59) -// CHECK:STDOUT: !65 = !DILocation(line: 13, column: 12, scope: !59) -// CHECK:STDOUT: !66 = !DILocation(line: 13, column: 5, scope: !59) -// CHECK:STDOUT: !67 = !{!60} +// CHECK:STDOUT: !64 = !DILocation(line: 32, column: 1, scope: !59) +// CHECK:STDOUT: !65 = !{!60} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/template/convert.carbon b/toolchain/lower/testdata/template/convert.carbon index 2ae958b8c46f..56233bc6c157 100644 --- a/toolchain/lower/testdata/template/convert.carbon +++ b/toolchain/lower/testdata/template/convert.carbon @@ -269,31 +269,30 @@ fn Run() { // CHECK:STDOUT: source_filename = "initialize_dependent_target_from_literal.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !96 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !94 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(), !dbg !97 -// CHECK:STDOUT: ret void, !dbg !98 +// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(), !dbg !95 +// CHECK:STDOUT: ret void, !dbg !96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !99 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.55456748a8a2eb70() #0 !dbg !97 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !101 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.55456748a8a2eb70() #0 !dbg !103 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca i32, align 4, !dbg !104 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !104 -// CHECK:STDOUT: store i32 0, ptr %w.var, align 4, !dbg !104 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %w.var), !dbg !104 -// CHECK:STDOUT: ret void, !dbg !106 +// CHECK:STDOUT: %w.var = alloca i32, align 4, !dbg !98 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !98 +// CHECK:STDOUT: store i32 0, ptr %w.var, align 4, !dbg !98 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %w.var), !dbg !98 +// CHECK:STDOUT: ret void, !dbg !102 // 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !103 { +// CHECK:STDOUT: ret void, !dbg !108 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -302,81 +301,82 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !90 = !DIFile(filename: "initialize_dependent_target_from_literal.carbon", directory: "") // CHECK:STDOUT: !91 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !90, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !92 = !{null} // CHECK:STDOUT: !93 = !DISubroutineType(types: !92) -// CHECK:STDOUT: !94 = !{null, !36} -// CHECK:STDOUT: !95 = !DISubroutineType(types: !94) -// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !90, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !91) -// CHECK:STDOUT: !97 = !DILocation(line: 9, column: 3, scope: !96) -// CHECK:STDOUT: !98 = !DILocation(line: 8, column: 1, scope: !96) -// CHECK:STDOUT: !99 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !90, line: 5, type: !95, spFlags: DISPFlagDefinition, unit: !91, retainedNodes: !102) -// CHECK:STDOUT: !100 = !DILocalVariable(arg: 1, scope: !99, type: !36) -// CHECK:STDOUT: !101 = !DILocation(line: 5, column: 3, scope: !99) -// CHECK:STDOUT: !102 = !{!100} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.55456748a8a2eb70", scope: null, file: !90, line: 4, type: !93, spFlags: DISPFlagDefinition, unit: !91) -// CHECK:STDOUT: !104 = !DILocation(line: 5, column: 3, scope: !103) -// CHECK:STDOUT: !106 = !DILocation(line: 4, column: 1, scope: !103) +// CHECK:STDOUT: !94 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !90, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !91) +// CHECK:STDOUT: !95 = !DILocation(line: 9, column: 3, scope: !94) +// CHECK:STDOUT: !96 = !DILocation(line: 8, column: 1, scope: !94) +// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.55456748a8a2eb70", scope: null, file: !90, line: 4, type: !93, spFlags: DISPFlagDefinition, unit: !91) +// CHECK:STDOUT: !98 = !DILocation(line: 5, column: 3, scope: !97) +// CHECK:STDOUT: !100 = !{null, !36} +// CHECK:STDOUT: !101 = !DISubroutineType(types: !100) +// CHECK:STDOUT: !102 = !DILocation(line: 4, column: 1, scope: !97) +// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 32, type: !101, spFlags: DISPFlagDefinition, unit: !91, retainedNodes: !109) +// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !36) +// CHECK:STDOUT: !108 = !DILocation(line: 32, column: 1, scope: !103) +// CHECK:STDOUT: !109 = !{!104} // 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.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !109 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !112 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !111 +// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(i32 0), !dbg !113 +// CHECK:STDOUT: ret void, !dbg !114 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !113 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.55456748a8a2eb70(i32 %x) #0 !dbg !115 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.55456748a8a2eb70(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.55456748a8a2eb70(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.72395be3dbbe8946:core.Destroy.Core"(ptr %w.var), !dbg !119 -// CHECK:STDOUT: ret void, !dbg !122 +// CHECK:STDOUT: %w.var = alloca i32, align 4, !dbg !118 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !118 +// CHECK:STDOUT: store i32 %x, ptr %w.var, align 4, !dbg !118 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %w.var), !dbg !118 +// CHECK:STDOUT: ret void, !dbg !121 // 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !123 { +// CHECK:STDOUT: ret void, !dbg !128 +// 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 = !{!108} +// CHECK:STDOUT: !llvm.dbg.cu = !{!111} // 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: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !92 = !{null} // CHECK:STDOUT: !93 = !DISubroutineType(types: !92) -// CHECK:STDOUT: !94 = !{null, !36} -// CHECK:STDOUT: !95 = !DISubroutineType(types: !94) -// CHECK:STDOUT: !107 = !DIFile(filename: "initialize_primitive.carbon", directory: "") -// CHECK:STDOUT: !108 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !107, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !109 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !107, line: 5, type: !95, spFlags: DISPFlagDefinition, unit: !108, retainedNodes: !112) -// CHECK:STDOUT: !110 = !DILocalVariable(arg: 1, scope: !109, type: !36) -// 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: !107, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !108) -// 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.55456748a8a2eb70", scope: null, file: !107, line: 4, type: !95, spFlags: DISPFlagDefinition, unit: !108, retainedNodes: !123) -// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !36) -// 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: !100 = !{null, !36} +// CHECK:STDOUT: !101 = !DISubroutineType(types: !100) +// CHECK:STDOUT: !110 = !DIFile(filename: "initialize_primitive.carbon", directory: "") +// CHECK:STDOUT: !111 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !110, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !110, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !111) +// CHECK:STDOUT: !113 = !DILocation(line: 9, column: 3, scope: !112) +// CHECK:STDOUT: !114 = !DILocation(line: 8, column: 1, scope: !112) +// CHECK:STDOUT: !115 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.55456748a8a2eb70", scope: null, file: !110, line: 4, type: !101, spFlags: DISPFlagDefinition, unit: !111, retainedNodes: !122) +// CHECK:STDOUT: !116 = !DILocalVariable(arg: 1, scope: !115, type: !36) +// CHECK:STDOUT: !118 = !DILocation(line: 5, column: 3, scope: !115) +// CHECK:STDOUT: !121 = !DILocation(line: 4, column: 1, scope: !115) +// CHECK:STDOUT: !122 = !{!116} +// CHECK:STDOUT: !123 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !26, line: 32, type: !101, spFlags: DISPFlagDefinition, unit: !111, retainedNodes: !129) +// CHECK:STDOUT: !124 = !DILocalVariable(arg: 1, scope: !123, type: !36) +// CHECK:STDOUT: !128 = !DILocation(line: 32, column: 1, scope: !123) +// CHECK:STDOUT: !129 = !{!124} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'initialize_from_tuple.carbon' @@ -387,218 +387,208 @@ fn Run() { // 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 !138 { // 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: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !139 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.fb3d597a6b1c4ee1(), !dbg !140 -// CHECK:STDOUT: call void @_CF.Main.689d8af583927bab(), !dbg !141 -// CHECK:STDOUT: call void @_CF.Main.be297cc7300419fe(), !dbg !142 +// 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 !143 // CHECK:STDOUT: ret void, !dbg !143 // 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 void @_CG.Main() #0 !dbg !145 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !146 +// CHECK:STDOUT: call void @_CF.Main.fb3d597a6b1c4ee1(), !dbg !146 +// CHECK:STDOUT: call void @_CF.Main.689d8af583927bab(), !dbg !147 +// CHECK:STDOUT: call void @_CF.Main.be297cc7300419fe(), !dbg !148 +// CHECK:STDOUT: ret void, !dbg !149 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !148 { +// CHECK:STDOUT: define weak_odr void @"_COp.92e03c783d6af646:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !150 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !150 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 2, !dbg !152 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %tuple.elem2.tuple.elem), !dbg !152 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 1, !dbg !152 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %tuple.elem1.tuple.elem), !dbg !152 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 0, !dbg !152 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %tuple.elem0.tuple.elem), !dbg !152 +// CHECK:STDOUT: ret void, !dbg !152 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core"(ptr %self) #0 !dbg !152 { +// CHECK:STDOUT: define weak_odr void @"_COp.2ee5d57da69a520f:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !154 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 2, !dbg !154 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !154 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 1, !dbg !154 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !154 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %self, i32 0, i32 0, !dbg !154 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !154 -// CHECK:STDOUT: ret void, !dbg !154 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.92e03c783d6af646:core.Destroy.Core"(ptr %self) #0 !dbg !156 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.92e03c783d6af646: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 @"_CSubobjectDestroy.2ee5d57da69a520f:core.Destroy.Core"(ptr %self) #0 !dbg !160 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc8_3.1.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 2, !dbg !162 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc8_3.1.array.index), !dbg !162 -// CHECK:STDOUT: %.loc8_3.2.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 1, !dbg !162 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc8_3.2.array.index), !dbg !162 -// CHECK:STDOUT: %.loc8_3.3.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 0, !dbg !162 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc8_3.3.array.index), !dbg !162 -// CHECK:STDOUT: ret void, !dbg !162 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2ee5d57da69a520f:core.Destroy.Core"(ptr %self) #0 !dbg !164 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2ee5d57da69a520f:core.Destroy.Core"(ptr %self), !dbg !166 -// CHECK:STDOUT: ret void, !dbg !166 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !168 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !170 +// CHECK:STDOUT: %.loc8_3.1.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 2, !dbg !156 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %.loc8_3.1.array.index), !dbg !156 +// CHECK:STDOUT: %.loc8_3.4.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 1, !dbg !156 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %.loc8_3.4.array.index), !dbg !156 +// CHECK:STDOUT: %.loc8_3.7.array.index = getelementptr inbounds [3 x {}], ptr %self, i32 0, i64 0, !dbg !156 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %.loc8_3.7.array.index), !dbg !156 +// CHECK:STDOUT: ret void, !dbg !156 // 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 !172 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.fb3d597a6b1c4ee1() #0 !dbg !158 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { {}, {}, {} }, align 1, !dbg !173 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !173 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 0, !dbg !174 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem0.tuple.elem), !dbg !175 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 1, !dbg !174 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.tuple.elem), !dbg !176 -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 2, !dbg !174 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem2.tuple.elem), !dbg !177 -// CHECK:STDOUT: call void @"_CSelfDestruct.92e03c783d6af646:core.Destroy.Core"(ptr %w.var), !dbg !173 -// CHECK:STDOUT: ret void, !dbg !179 +// CHECK:STDOUT: %w.var = alloca { {}, {}, {} }, align 1, !dbg !159 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !159 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 0, !dbg !160 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem0.tuple.elem), !dbg !161 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 1, !dbg !160 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.tuple.elem), !dbg !162 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { {}, {}, {} }, ptr %w.var, i32 0, i32 2, !dbg !160 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem2.tuple.elem), !dbg !163 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.59df9a16f8c795fe(ptr %w.var), !dbg !159 +// CHECK:STDOUT: ret void, !dbg !165 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.689d8af583927bab() #0 !dbg !180 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.689d8af583927bab() #0 !dbg !166 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca [3 x {}], align 1, !dbg !181 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !181 -// CHECK:STDOUT: %.b44.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 0, !dbg !182 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.b44.array.index), !dbg !183 -// CHECK:STDOUT: %.5b6.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 1, !dbg !182 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.5b6.array.index), !dbg !184 -// CHECK:STDOUT: %.97d.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 2, !dbg !182 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.97d.array.index), !dbg !185 -// CHECK:STDOUT: call void @"_CSelfDestruct.2ee5d57da69a520f:core.Destroy.Core"(ptr %w.var), !dbg !181 +// CHECK:STDOUT: %w.var = alloca [3 x {}], align 1, !dbg !167 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !167 +// CHECK:STDOUT: %.b44.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 0, !dbg !168 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.b44.array.index), !dbg !169 +// CHECK:STDOUT: %.5b6.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 1, !dbg !168 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.5b6.array.index), !dbg !170 +// CHECK:STDOUT: %.97d.array.index = getelementptr inbounds [3 x {}], ptr %w.var, i32 0, i64 2, !dbg !168 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.97d.array.index), !dbg !171 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f85fac887b9592cc(ptr %w.var), !dbg !167 +// CHECK:STDOUT: ret void, !dbg !173 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.be297cc7300419fe() #0 !dbg !174 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %w.var = alloca {}, align 1, !dbg !175 +// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !175 +// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !175 +// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !175 +// CHECK:STDOUT: %tuple.9aa = alloca { ptr, ptr, ptr }, align 8, !dbg !179 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !175 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !175 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !176 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !175 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !177 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !175 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !178 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.9aa), !dbg !179 +// CHECK:STDOUT: %tuple.9aa1 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 0, !dbg !179 +// CHECK:STDOUT: store ptr %.7a56fd.1.temp, ptr %tuple.9aa1, align 8, !dbg !179 +// CHECK:STDOUT: %tuple.9aa2 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 1, !dbg !179 +// CHECK:STDOUT: store ptr %.7a56fd.2.temp, ptr %tuple.9aa2, align 8, !dbg !179 +// CHECK:STDOUT: %tuple.9aa3 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 2, !dbg !179 +// CHECK:STDOUT: store ptr %.7a56fd.3.temp, ptr %tuple.9aa3, align 8, !dbg !179 +// CHECK:STDOUT: call void @"_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core"(ptr %w.var, ptr %tuple.9aa), !dbg !175 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.994e0b2182a91858(ptr %w.var), !dbg !175 +// CHECK:STDOUT: ret void, !dbg !181 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %t) #0 !dbg !182 { // CHECK:STDOUT: ret void, !dbg !187 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.be297cc7300419fe() #0 !dbg !188 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca {}, align 1, !dbg !189 -// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !189 -// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !189 -// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !189 -// CHECK:STDOUT: %tuple.9aa = alloca { ptr, ptr, ptr }, align 8, !dbg !193 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !189 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !189 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !190 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !189 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !191 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !189 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !192 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.9aa), !dbg !193 -// CHECK:STDOUT: %tuple.9aa1 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 0, !dbg !193 -// CHECK:STDOUT: store ptr %.7a56fd.1.temp, ptr %tuple.9aa1, align 8, !dbg !193 -// CHECK:STDOUT: %tuple.9aa2 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 1, !dbg !193 -// CHECK:STDOUT: store ptr %.7a56fd.2.temp, ptr %tuple.9aa2, align 8, !dbg !193 -// CHECK:STDOUT: %tuple.9aa3 = getelementptr inbounds nuw { ptr, ptr, ptr }, ptr %tuple.9aa, i32 0, i32 2, !dbg !193 -// CHECK:STDOUT: store ptr %.7a56fd.3.temp, ptr %tuple.9aa3, align 8, !dbg !193 -// CHECK:STDOUT: call void @"_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core"(ptr %w.var, ptr %tuple.9aa), !dbg !189 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %w.var), !dbg !189 -// CHECK:STDOUT: ret void, !dbg !195 -// 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 @_CSelfDestruct.Core.59df9a16f8c795fe(ptr %t) #0 !dbg !189 { +// CHECK:STDOUT: call void @"_COp.92e03c783d6af646:core.SubobjectDestroy.Core"(ptr %t), !dbg !193 +// CHECK:STDOUT: ret void, !dbg !194 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f85fac887b9592cc(ptr %t) #0 !dbg !196 { +// CHECK:STDOUT: call void @"_COp.2ee5d57da69a520f:core.SubobjectDestroy.Core"(ptr %t), !dbg !200 +// CHECK:STDOUT: ret void, !dbg !201 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.994e0b2182a91858(ptr %t) #0 !dbg !203 { +// CHECK:STDOUT: ret void, !dbg !208 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.2abb6e2621dcf00d, { 5, 4, 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 6, 5, 4, 3, 2, 1, 0 } // 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 = !{!125} +// CHECK:STDOUT: !llvm.dbg.cu = !{!131} // 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: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !92 = !{null} // CHECK:STDOUT: !93 = !DISubroutineType(types: !92) -// 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 = !{!39, !39} -// CHECK:STDOUT: !129 = !DISubroutineType(types: !128) -// CHECK:STDOUT: !130 = !{null, !39} -// 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: !39) -// 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: !93, 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: !145 = !DILocalVariable(arg: 1, scope: !144, type: !39) -// CHECK:STDOUT: !146 = !DILocation(line: 8, column: 3, scope: !144) -// CHECK:STDOUT: !147 = !{!145} -// CHECK:STDOUT: !148 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !151) -// CHECK:STDOUT: !149 = !DILocalVariable(arg: 1, scope: !148, type: !39) -// CHECK:STDOUT: !150 = !DILocation(line: 8, column: 3, scope: !148) -// CHECK:STDOUT: !151 = !{!149} -// CHECK:STDOUT: !152 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.92e03c783d6af646:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !155) -// CHECK:STDOUT: !153 = !DILocalVariable(arg: 1, scope: !152, type: !39) -// CHECK:STDOUT: !154 = !DILocation(line: 8, column: 3, scope: !152) -// CHECK:STDOUT: !155 = !{!153} -// CHECK:STDOUT: !156 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.92e03c783d6af646:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !159) -// CHECK:STDOUT: !157 = !DILocalVariable(arg: 1, scope: !156, type: !39) -// CHECK:STDOUT: !158 = !DILocation(line: 8, column: 3, scope: !156) -// CHECK:STDOUT: !159 = !{!157} -// CHECK:STDOUT: !160 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2ee5d57da69a520f:core.Destroy.Core", scope: null, file: !124, line: 8, type: !131, spFlags: DISPFlagDefinition, unit: !125, retainedNodes: !163) -// CHECK:STDOUT: !161 = !DILocalVariable(arg: 1, scope: !160, type: !39) -// CHECK:STDOUT: !162 = !DILocation(line: 8, column: 3, scope: !160) -// CHECK:STDOUT: !163 = !{!161} -// CHECK:STDOUT: !164 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2ee5d57da69a520f: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: !39) -// CHECK:STDOUT: !166 = !DILocation(line: 8, column: 3, scope: !164) -// CHECK:STDOUT: !167 = !{!165} -// CHECK:STDOUT: !168 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.12212b84320f2fd6: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: !39) -// CHECK:STDOUT: !170 = !DILocation(line: 8, column: 3, scope: !168) -// CHECK:STDOUT: !171 = !{!169} -// CHECK:STDOUT: !172 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.fb3d597a6b1c4ee1", scope: null, file: !124, line: 7, type: !93, spFlags: DISPFlagDefinition, unit: !125) -// 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.689d8af583927bab", scope: null, file: !124, line: 7, type: !93, spFlags: DISPFlagDefinition, unit: !125) -// 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: !187 = !DILocation(line: 7, column: 1, scope: !180) -// CHECK:STDOUT: !188 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.be297cc7300419fe", scope: null, file: !124, line: 7, type: !93, spFlags: DISPFlagDefinition, unit: !125) -// CHECK:STDOUT: !189 = !DILocation(line: 8, column: 3, scope: !188) -// CHECK:STDOUT: !190 = !DILocation(line: 8, column: 22, scope: !188) -// CHECK:STDOUT: !191 = !DILocation(line: 8, column: 30, scope: !188) -// CHECK:STDOUT: !192 = !DILocation(line: 8, column: 38, scope: !188) -// CHECK:STDOUT: !193 = !DILocation(line: 8, column: 21, scope: !188) -// CHECK:STDOUT: !195 = !DILocation(line: 7, column: 1, scope: !188) +// CHECK:STDOUT: !130 = !DIFile(filename: "initialize_from_tuple.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: !134 = !{!39, !39} +// CHECK:STDOUT: !135 = !DISubroutineType(types: !134) +// CHECK:STDOUT: !136 = !{null, !39} +// CHECK:STDOUT: !137 = !DISubroutineType(types: !136) +// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.92e03c783d6af646:ImplicitAs.be297cc7300419fe.Core", scope: null, file: !130, line: 14, type: !135, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !144) +// CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !138, type: !39) +// CHECK:STDOUT: !143 = !DILocation(line: 14, column: 45, scope: !138) +// CHECK:STDOUT: !144 = !{!139} +// CHECK:STDOUT: !145 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !130, line: 17, type: !93, spFlags: DISPFlagDefinition, unit: !131) +// CHECK:STDOUT: !146 = !DILocation(line: 18, column: 3, scope: !145) +// CHECK:STDOUT: !147 = !DILocation(line: 20, column: 3, scope: !145) +// CHECK:STDOUT: !148 = !DILocation(line: 22, column: 3, scope: !145) +// CHECK:STDOUT: !149 = !DILocation(line: 17, column: 1, scope: !145) +// CHECK:STDOUT: !150 = distinct !DISubprogram(name: "Op", linkageName: "_COp.92e03c783d6af646:core.SubobjectDestroy.Core", scope: null, file: !130, line: 8, type: !137, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !153) +// CHECK:STDOUT: !151 = !DILocalVariable(arg: 1, scope: !150, type: !39) +// CHECK:STDOUT: !152 = !DILocation(line: 8, column: 3, scope: !150) +// CHECK:STDOUT: !153 = !{!151} +// CHECK:STDOUT: !154 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2ee5d57da69a520f:core.SubobjectDestroy.Core", scope: null, file: !130, line: 8, type: !137, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !157) +// CHECK:STDOUT: !155 = !DILocalVariable(arg: 1, scope: !154, type: !39) +// CHECK:STDOUT: !156 = !DILocation(line: 8, column: 3, scope: !154) +// CHECK:STDOUT: !157 = !{!155} +// CHECK:STDOUT: !158 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.fb3d597a6b1c4ee1", scope: null, file: !130, line: 7, type: !93, spFlags: DISPFlagDefinition, unit: !131) +// CHECK:STDOUT: !159 = !DILocation(line: 8, column: 3, scope: !158) +// CHECK:STDOUT: !160 = !DILocation(line: 8, column: 21, scope: !158) +// CHECK:STDOUT: !161 = !DILocation(line: 8, column: 22, scope: !158) +// CHECK:STDOUT: !162 = !DILocation(line: 8, column: 30, scope: !158) +// CHECK:STDOUT: !163 = !DILocation(line: 8, column: 38, scope: !158) +// CHECK:STDOUT: !165 = !DILocation(line: 7, column: 1, scope: !158) +// CHECK:STDOUT: !166 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.689d8af583927bab", scope: null, file: !130, line: 7, type: !93, spFlags: DISPFlagDefinition, unit: !131) +// CHECK:STDOUT: !167 = !DILocation(line: 8, column: 3, scope: !166) +// CHECK:STDOUT: !168 = !DILocation(line: 8, column: 21, scope: !166) +// CHECK:STDOUT: !169 = !DILocation(line: 8, column: 22, scope: !166) +// CHECK:STDOUT: !170 = !DILocation(line: 8, column: 30, scope: !166) +// CHECK:STDOUT: !171 = !DILocation(line: 8, column: 38, scope: !166) +// CHECK:STDOUT: !173 = !DILocation(line: 7, column: 1, scope: !166) +// CHECK:STDOUT: !174 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.be297cc7300419fe", scope: null, file: !130, line: 7, type: !93, spFlags: DISPFlagDefinition, unit: !131) +// CHECK:STDOUT: !175 = !DILocation(line: 8, column: 3, scope: !174) +// CHECK:STDOUT: !176 = !DILocation(line: 8, column: 22, scope: !174) +// CHECK:STDOUT: !177 = !DILocation(line: 8, column: 30, scope: !174) +// CHECK:STDOUT: !178 = !DILocation(line: 8, column: 38, scope: !174) +// CHECK:STDOUT: !179 = !DILocation(line: 8, column: 21, scope: !174) +// CHECK:STDOUT: !181 = !DILocation(line: 7, column: 1, scope: !174) +// CHECK:STDOUT: !182 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2abb6e2621dcf00d", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !188) +// CHECK:STDOUT: !183 = !DILocalVariable(arg: 1, scope: !182, type: !39) +// CHECK:STDOUT: !187 = !DILocation(line: 32, column: 1, scope: !182) +// CHECK:STDOUT: !188 = !{!183} +// CHECK:STDOUT: !189 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.59df9a16f8c795fe", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !195) +// CHECK:STDOUT: !190 = !DILocalVariable(arg: 1, scope: !189, type: !39) +// CHECK:STDOUT: !193 = !DILocation(line: 34, column: 5, scope: !189) +// CHECK:STDOUT: !194 = !DILocation(line: 32, column: 1, scope: !189) +// CHECK:STDOUT: !195 = !{!190} +// CHECK:STDOUT: !196 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f85fac887b9592cc", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !202) +// CHECK:STDOUT: !197 = !DILocalVariable(arg: 1, scope: !196, type: !39) +// CHECK:STDOUT: !200 = !DILocation(line: 34, column: 5, scope: !196) +// CHECK:STDOUT: !201 = !DILocation(line: 32, column: 1, scope: !196) +// CHECK:STDOUT: !202 = !{!197} +// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.994e0b2182a91858", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !131, retainedNodes: !209) +// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !39) +// CHECK:STDOUT: !208 = !DILocation(line: 32, column: 1, scope: !203) +// CHECK:STDOUT: !209 = !{!204} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'initialize_from_nested_literal.carbon' @@ -609,375 +599,355 @@ fn Run() { // 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 !198 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !212 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main.75a9ebb2041c173b(), !dbg !199 -// CHECK:STDOUT: call void @_CF.Main.f5d9b693014ce43e(), !dbg !200 -// CHECK:STDOUT: call void @_CF.Main.84270bb113cb754b(), !dbg !201 -// CHECK:STDOUT: ret void, !dbg !202 +// CHECK:STDOUT: call void @_CF.Main.75a9ebb2041c173b(), !dbg !213 +// CHECK:STDOUT: call void @_CF.Main.f5d9b693014ce43e(), !dbg !214 +// CHECK:STDOUT: call void @_CF.Main.84270bb113cb754b(), !dbg !215 +// CHECK:STDOUT: ret void, !dbg !216 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !203 { +// CHECK:STDOUT: define weak_odr void @"_COp.f38e1c3ccdfe019b:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !217 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !205 +// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !219 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %.loc9_3.1.b), !dbg !219 +// CHECK:STDOUT: %.loc9_3.4.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !219 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %.loc9_3.4.a), !dbg !219 +// CHECK:STDOUT: ret void, !dbg !219 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %self) #0 !dbg !207 { +// CHECK:STDOUT: define weak_odr void @"_COp.4c2c335412ec52fa:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !221 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !209 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !223 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %tuple.elem1.tuple.elem), !dbg !223 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !223 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4feb82675f0be8c5(ptr %tuple.elem0.tuple.elem), !dbg !223 +// CHECK:STDOUT: ret void, !dbg !223 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self) #0 !dbg !211 { +// CHECK:STDOUT: define weak_odr void @"_COp.0950f8aecfaebf0b:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !225 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !213 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !213 -// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !213 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !213 -// CHECK:STDOUT: ret void, !dbg !213 +// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !227 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.994e0b2182a91858(ptr %.loc9_3.1.b), !dbg !227 +// CHECK:STDOUT: %.loc9_3.4.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !227 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.994e0b2182a91858(ptr %.loc9_3.4.a), !dbg !227 +// CHECK:STDOUT: ret void, !dbg !227 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self) #0 !dbg !215 { +// CHECK:STDOUT: define weak_odr void @"_COp.2f43e328c637647f:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !229 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %self), !dbg !217 -// CHECK:STDOUT: ret void, !dbg !217 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !231 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.994e0b2182a91858(ptr %tuple.elem1.tuple.elem), !dbg !231 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !231 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.efd8b9ca9849b087(ptr %tuple.elem0.tuple.elem), !dbg !231 +// CHECK:STDOUT: ret void, !dbg !231 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core"(ptr %self) #0 !dbg !219 { +// CHECK:STDOUT: define weak_odr void @"_COp.2970be6ba4c2615c:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !233 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !221 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !221 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !221 -// CHECK:STDOUT: call void @"_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !221 -// CHECK:STDOUT: ret void, !dbg !221 +// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !235 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.994e0b2182a91858(ptr %.loc9_3.1.b), !dbg !235 +// CHECK:STDOUT: %.loc9_3.4.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !235 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %.loc9_3.4.a), !dbg !235 +// CHECK:STDOUT: ret void, !dbg !235 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core"(ptr %self) #0 !dbg !223 { +// CHECK:STDOUT: define weak_odr void @"_COp.680f7fa3ef86df7a:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !237 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core"(ptr %self), !dbg !225 -// CHECK:STDOUT: ret void, !dbg !225 +// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !239 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.994e0b2182a91858(ptr %.loc9_3.1.b), !dbg !239 +// CHECK:STDOUT: %.loc9_3.4.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !239 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %.loc9_3.4.a), !dbg !239 +// CHECK:STDOUT: ret void, !dbg !239 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %self) #0 !dbg !227 { +// CHECK:STDOUT: define weak_odr void @"_COp.bb4067704e9a198c:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !241 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !229 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !243 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.994e0b2182a91858(ptr %tuple.elem1.tuple.elem), !dbg !243 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !243 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ff24853a526ad6af(ptr %tuple.elem0.tuple.elem), !dbg !243 +// CHECK:STDOUT: ret void, !dbg !243 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self) #0 !dbg !231 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.75a9ebb2041c173b() #0 !dbg !245 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !233 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !233 -// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !233 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !233 -// CHECK:STDOUT: ret void, !dbg !233 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core"(ptr %self) #0 !dbg !235 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.0950f8aecfaebf0b: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.2f43e328c637647f:core.Destroy.Core"(ptr %self) #0 !dbg !239 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !241 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !241 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !241 -// CHECK:STDOUT: call void @"_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !241 -// CHECK:STDOUT: ret void, !dbg !241 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2f43e328c637647f:core.Destroy.Core"(ptr %self) #0 !dbg !243 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2f43e328c637647f: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.2970be6ba4c2615c:core.Destroy.Core"(ptr %self) #0 !dbg !247 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !249 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !249 -// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !249 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !249 -// CHECK:STDOUT: ret void, !dbg !249 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2970be6ba4c2615c:core.Destroy.Core"(ptr %self) #0 !dbg !251 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core"(ptr %self), !dbg !253 +// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !246 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !246 +// CHECK:STDOUT: %tuple.elem0.16b.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !248 +// CHECK:STDOUT: %.ae2.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.16b.tuple.elem, i32 0, i32 0, !dbg !247 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.ae2.a), !dbg !249 +// CHECK:STDOUT: %.ffd.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.16b.tuple.elem, i32 0, i32 1, !dbg !247 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.ffd.b), !dbg !250 +// CHECK:STDOUT: %tuple.elem1.b82.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !248 +// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.b82.tuple.elem), !dbg !251 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.e1b668d14ae6f638(ptr %w.var), !dbg !246 // CHECK:STDOUT: ret void, !dbg !253 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #0 !dbg !255 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.f5d9b693014ce43e() #0 !dbg !254 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc9_3.1.b = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 1, !dbg !257 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %.loc9_3.1.b), !dbg !257 -// CHECK:STDOUT: %.loc9_3.2.a = getelementptr inbounds nuw { {}, {} }, ptr %self, i32 0, i32 0, !dbg !257 -// CHECK:STDOUT: call void @"_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core"(ptr %.loc9_3.2.a), !dbg !257 -// CHECK:STDOUT: ret void, !dbg !257 +// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !255 +// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !255 +// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !255 +// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !255 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !255 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !255 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !256 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !255 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !257 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !255 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !259 +// CHECK:STDOUT: %tuple.elem0.c3c.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !260 +// CHECK:STDOUT: %.ce4.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.c3c.tuple.elem, i32 0, i32 0, !dbg !258 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.ce4.a, ptr %.7a56fd.1.temp), !dbg !258 +// CHECK:STDOUT: %.0ae.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.c3c.tuple.elem, i32 0, i32 1, !dbg !258 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.0ae.b, ptr %.7a56fd.2.temp), !dbg !258 +// CHECK:STDOUT: %tuple.elem1.1e9.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !260 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.1e9.tuple.elem, ptr %.7a56fd.3.temp), !dbg !260 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.d998f017deb6d2c0(ptr %w.var), !dbg !255 +// CHECK:STDOUT: ret void, !dbg !262 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self) #0 !dbg !259 { +// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84270bb113cb754b() #0 !dbg !263 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core"(ptr %self), !dbg !261 -// CHECK:STDOUT: ret void, !dbg !261 +// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !264 +// CHECK:STDOUT: %.7a56fd.4.temp = alloca {}, align 1, !dbg !264 +// CHECK:STDOUT: %.7a56fd.5.temp = alloca {}, align 1, !dbg !264 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !264 +// CHECK:STDOUT: %tuple.elem0.297.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !266 +// CHECK:STDOUT: %.014.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.297.tuple.elem, i32 0, i32 0, !dbg !265 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.014.a), !dbg !267 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.4.temp), !dbg !264 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.4.temp), !dbg !268 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.5.temp), !dbg !264 +// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.5.temp), !dbg !269 +// CHECK:STDOUT: %.94f.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.297.tuple.elem, i32 0, i32 1, !dbg !265 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.94f.b, ptr %.7a56fd.4.temp), !dbg !265 +// CHECK:STDOUT: %tuple.elem1.76f.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !266 +// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.76f.tuple.elem, ptr %.7a56fd.5.temp), !dbg !266 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6458632b8fd80962(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 @"_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core"(ptr %self) #0 !dbg !263 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 1, !dbg !265 -// CHECK:STDOUT: call void @"_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !265 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %self, i32 0, i32 0, !dbg !265 -// CHECK:STDOUT: call void @"_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !265 -// CHECK:STDOUT: ret void, !dbg !265 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2abb6e2621dcf00d(ptr %t) #0 !dbg !272 { +// CHECK:STDOUT: ret void, !dbg !277 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core"(ptr %self) #0 !dbg !267 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core"(ptr %self), !dbg !269 -// CHECK:STDOUT: ret void, !dbg !269 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.4feb82675f0be8c5(ptr %t) #0 !dbg !279 { +// CHECK:STDOUT: call void @"_COp.f38e1c3ccdfe019b:core.SubobjectDestroy.Core"(ptr %t), !dbg !283 +// CHECK:STDOUT: ret void, !dbg !284 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.75a9ebb2041c173b() #0 !dbg !271 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !272 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !272 -// CHECK:STDOUT: %tuple.elem0.16b.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !274 -// CHECK:STDOUT: %.ae2.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.16b.tuple.elem, i32 0, i32 0, !dbg !273 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.ae2.a), !dbg !275 -// CHECK:STDOUT: %.ffd.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.16b.tuple.elem, i32 0, i32 1, !dbg !273 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.ffd.b), !dbg !276 -// CHECK:STDOUT: %tuple.elem1.b82.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !274 -// CHECK:STDOUT: call void @_CMake.Main(ptr %tuple.elem1.b82.tuple.elem), !dbg !277 -// CHECK:STDOUT: call void @"_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core"(ptr %w.var), !dbg !272 -// CHECK:STDOUT: ret void, !dbg !279 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.994e0b2182a91858(ptr %t) #0 !dbg !286 { +// CHECK:STDOUT: ret void, !dbg !291 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.f5d9b693014ce43e() #0 !dbg !280 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !281 -// CHECK:STDOUT: %.7a56fd.1.temp = alloca {}, align 1, !dbg !281 -// CHECK:STDOUT: %.7a56fd.2.temp = alloca {}, align 1, !dbg !281 -// CHECK:STDOUT: %.7a56fd.3.temp = alloca {}, align 1, !dbg !281 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !281 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.1.temp), !dbg !281 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.1.temp), !dbg !282 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.2.temp), !dbg !281 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.2.temp), !dbg !283 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.3.temp), !dbg !281 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.3.temp), !dbg !285 -// CHECK:STDOUT: %tuple.elem0.c3c.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !286 -// CHECK:STDOUT: %.ce4.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.c3c.tuple.elem, i32 0, i32 0, !dbg !284 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.ce4.a, ptr %.7a56fd.1.temp), !dbg !284 -// CHECK:STDOUT: %.0ae.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.c3c.tuple.elem, i32 0, i32 1, !dbg !284 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.0ae.b, ptr %.7a56fd.2.temp), !dbg !284 -// CHECK:STDOUT: %tuple.elem1.1e9.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !286 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.1e9.tuple.elem, ptr %.7a56fd.3.temp), !dbg !286 -// CHECK:STDOUT: call void @"_CSelfDestruct.2f43e328c637647f:core.Destroy.Core"(ptr %w.var), !dbg !281 -// CHECK:STDOUT: ret void, !dbg !288 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.efd8b9ca9849b087(ptr %t) #0 !dbg !293 { +// CHECK:STDOUT: call void @"_COp.0950f8aecfaebf0b:core.SubobjectDestroy.Core"(ptr %t), !dbg !297 +// CHECK:STDOUT: ret void, !dbg !298 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CF.Main.84270bb113cb754b() #0 !dbg !289 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %w.var = alloca { { {}, {} }, {} }, align 1, !dbg !290 -// CHECK:STDOUT: %.7a56fd.4.temp = alloca {}, align 1, !dbg !290 -// CHECK:STDOUT: %.7a56fd.5.temp = alloca {}, align 1, !dbg !290 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %w.var), !dbg !290 -// CHECK:STDOUT: %tuple.elem0.297.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 0, !dbg !292 -// CHECK:STDOUT: %.014.a = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.297.tuple.elem, i32 0, i32 0, !dbg !291 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.014.a), !dbg !293 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.4.temp), !dbg !290 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.4.temp), !dbg !294 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.7a56fd.5.temp), !dbg !290 -// CHECK:STDOUT: call void @_CMake.Main(ptr %.7a56fd.5.temp), !dbg !295 -// CHECK:STDOUT: %.94f.b = getelementptr inbounds nuw { {}, {} }, ptr %tuple.elem0.297.tuple.elem, i32 0, i32 1, !dbg !291 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %.94f.b, ptr %.7a56fd.4.temp), !dbg !291 -// CHECK:STDOUT: %tuple.elem1.76f.tuple.elem = getelementptr inbounds nuw { { {}, {} }, {} }, ptr %w.var, i32 0, i32 1, !dbg !292 -// CHECK:STDOUT: call void @"_CConvert.X.Main:ImplicitAs.be297cc7300419fe.Core"(ptr %tuple.elem1.76f.tuple.elem, ptr %.7a56fd.5.temp), !dbg !292 -// CHECK:STDOUT: call void @"_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core"(ptr %w.var), !dbg !290 -// CHECK:STDOUT: ret void, !dbg !297 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.ff24853a526ad6af(ptr %t) #0 !dbg !300 { +// CHECK:STDOUT: call void @"_COp.680f7fa3ef86df7a:core.SubobjectDestroy.Core"(ptr %t), !dbg !304 +// CHECK:STDOUT: ret void, !dbg !305 // 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 @_CSelfDestruct.Core.e1b668d14ae6f638(ptr %t) #0 !dbg !307 { +// CHECK:STDOUT: call void @"_COp.4c2c335412ec52fa:core.SubobjectDestroy.Core"(ptr %t), !dbg !311 +// CHECK:STDOUT: ret void, !dbg !312 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.d998f017deb6d2c0(ptr %t) #0 !dbg !314 { +// CHECK:STDOUT: call void @"_COp.2f43e328c637647f:core.SubobjectDestroy.Core"(ptr %t), !dbg !318 +// CHECK:STDOUT: ret void, !dbg !319 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6458632b8fd80962(ptr %t) #0 !dbg !321 { +// CHECK:STDOUT: call void @"_COp.bb4067704e9a198c:core.SubobjectDestroy.Core"(ptr %t), !dbg !325 +// CHECK:STDOUT: ret void, !dbg !326 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.2abb6e2621dcf00d, { 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.994e0b2182a91858, { 5, 4, 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 7, 6, 5, 4, 3, 2, 1, 0 } // 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 = !{!197} +// CHECK:STDOUT: !llvm.dbg.cu = !{!211} // 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: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !92 = !{null} // CHECK:STDOUT: !93 = !DISubroutineType(types: !92) -// CHECK:STDOUT: !130 = !{null, !39} -// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) -// CHECK:STDOUT: !196 = !DIFile(filename: "initialize_from_nested_literal.carbon", directory: "") -// CHECK:STDOUT: !197 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !196, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !198 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !196, line: 24, type: !93, spFlags: DISPFlagDefinition, unit: !197) -// CHECK:STDOUT: !199 = !DILocation(line: 25, column: 3, scope: !198) -// CHECK:STDOUT: !200 = !DILocation(line: 27, column: 3, scope: !198) -// CHECK:STDOUT: !201 = !DILocation(line: 29, column: 3, scope: !198) -// CHECK:STDOUT: !202 = !DILocation(line: 24, column: 1, scope: !198) -// CHECK:STDOUT: !203 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !206) -// CHECK:STDOUT: !204 = !DILocalVariable(arg: 1, scope: !203, type: !39) -// CHECK:STDOUT: !205 = !DILocation(line: 9, column: 3, scope: !203) -// CHECK:STDOUT: !206 = !{!204} -// CHECK:STDOUT: !207 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8b0bf151036f045a:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !210) -// CHECK:STDOUT: !208 = !DILocalVariable(arg: 1, scope: !207, type: !39) -// CHECK:STDOUT: !209 = !DILocation(line: 9, column: 3, scope: !207) -// CHECK:STDOUT: !210 = !{!208} -// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.f38e1c3ccdfe019b:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !214) -// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !39) -// CHECK:STDOUT: !213 = !DILocation(line: 9, column: 3, scope: !211) -// CHECK:STDOUT: !214 = !{!212} -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f38e1c3ccdfe019b:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !218) -// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !39) -// CHECK:STDOUT: !217 = !DILocation(line: 9, column: 3, scope: !215) -// CHECK:STDOUT: !218 = !{!216} -// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.4c2c335412ec52fa:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !222) -// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !39) -// CHECK:STDOUT: !221 = !DILocation(line: 9, column: 3, scope: !219) -// CHECK:STDOUT: !222 = !{!220} -// CHECK:STDOUT: !223 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.4c2c335412ec52fa:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !226) -// CHECK:STDOUT: !224 = !DILocalVariable(arg: 1, scope: !223, type: !39) -// CHECK:STDOUT: !225 = !DILocation(line: 9, column: 3, scope: !223) -// CHECK:STDOUT: !226 = !{!224} -// CHECK:STDOUT: !227 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.12212b84320f2fd6:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !230) -// CHECK:STDOUT: !228 = !DILocalVariable(arg: 1, scope: !227, type: !39) -// CHECK:STDOUT: !229 = !DILocation(line: 9, column: 3, scope: !227) -// CHECK:STDOUT: !230 = !{!228} -// CHECK:STDOUT: !231 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.0950f8aecfaebf0b:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !234) -// CHECK:STDOUT: !232 = !DILocalVariable(arg: 1, scope: !231, type: !39) -// CHECK:STDOUT: !233 = !DILocation(line: 9, column: 3, scope: !231) -// CHECK:STDOUT: !234 = !{!232} -// CHECK:STDOUT: !235 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0950f8aecfaebf0b:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !238) -// CHECK:STDOUT: !236 = !DILocalVariable(arg: 1, scope: !235, type: !39) -// CHECK:STDOUT: !237 = !DILocation(line: 9, column: 3, scope: !235) -// CHECK:STDOUT: !238 = !{!236} -// CHECK:STDOUT: !239 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2f43e328c637647f:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !242) -// CHECK:STDOUT: !240 = !DILocalVariable(arg: 1, scope: !239, type: !39) -// CHECK:STDOUT: !241 = !DILocation(line: 9, column: 3, scope: !239) -// CHECK:STDOUT: !242 = !{!240} -// CHECK:STDOUT: !243 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2f43e328c637647f:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !246) -// CHECK:STDOUT: !244 = !DILocalVariable(arg: 1, scope: !243, type: !39) -// CHECK:STDOUT: !245 = !DILocation(line: 9, column: 3, scope: !243) -// CHECK:STDOUT: !246 = !{!244} -// CHECK:STDOUT: !247 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.2970be6ba4c2615c:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !250) -// CHECK:STDOUT: !248 = !DILocalVariable(arg: 1, scope: !247, type: !39) -// CHECK:STDOUT: !249 = !DILocation(line: 9, column: 3, scope: !247) -// CHECK:STDOUT: !250 = !{!248} -// CHECK:STDOUT: !251 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2970be6ba4c2615c:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !254) -// CHECK:STDOUT: !252 = !DILocalVariable(arg: 1, scope: !251, type: !39) -// CHECK:STDOUT: !253 = !DILocation(line: 9, column: 3, scope: !251) -// CHECK:STDOUT: !254 = !{!252} -// CHECK:STDOUT: !255 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !258) -// CHECK:STDOUT: !256 = !DILocalVariable(arg: 1, scope: !255, type: !39) -// CHECK:STDOUT: !257 = !DILocation(line: 9, column: 3, scope: !255) -// CHECK:STDOUT: !258 = !{!256} -// CHECK:STDOUT: !259 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.680f7fa3ef86df7a:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !262) -// CHECK:STDOUT: !260 = !DILocalVariable(arg: 1, scope: !259, type: !39) -// CHECK:STDOUT: !261 = !DILocation(line: 9, column: 3, scope: !259) -// CHECK:STDOUT: !262 = !{!260} -// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.bb4067704e9a198c:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !266) -// CHECK:STDOUT: !264 = !DILocalVariable(arg: 1, scope: !263, type: !39) -// CHECK:STDOUT: !265 = !DILocation(line: 9, column: 3, scope: !263) -// CHECK:STDOUT: !266 = !{!264} -// CHECK:STDOUT: !267 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.bb4067704e9a198c:core.Destroy.Core", scope: null, file: !196, line: 9, type: !131, spFlags: DISPFlagDefinition, unit: !197, retainedNodes: !270) -// CHECK:STDOUT: !268 = !DILocalVariable(arg: 1, scope: !267, type: !39) -// CHECK:STDOUT: !269 = !DILocation(line: 9, column: 3, scope: !267) -// CHECK:STDOUT: !270 = !{!268} -// CHECK:STDOUT: !271 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.75a9ebb2041c173b", scope: null, file: !196, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !197) -// CHECK:STDOUT: !272 = !DILocation(line: 9, column: 3, scope: !271) -// CHECK:STDOUT: !273 = !DILocation(line: 9, column: 22, scope: !271) -// CHECK:STDOUT: !274 = !DILocation(line: 9, column: 21, scope: !271) -// CHECK:STDOUT: !275 = !DILocation(line: 9, column: 28, scope: !271) -// CHECK:STDOUT: !276 = !DILocation(line: 9, column: 41, scope: !271) -// CHECK:STDOUT: !277 = !DILocation(line: 9, column: 50, scope: !271) -// CHECK:STDOUT: !279 = !DILocation(line: 8, column: 1, scope: !271) -// CHECK:STDOUT: !280 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f5d9b693014ce43e", scope: null, file: !196, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !197) -// CHECK:STDOUT: !281 = !DILocation(line: 9, column: 3, scope: !280) -// CHECK:STDOUT: !282 = !DILocation(line: 9, column: 28, scope: !280) -// CHECK:STDOUT: !283 = !DILocation(line: 9, column: 41, scope: !280) -// CHECK:STDOUT: !284 = !DILocation(line: 9, column: 22, scope: !280) -// CHECK:STDOUT: !285 = !DILocation(line: 9, column: 50, scope: !280) -// CHECK:STDOUT: !286 = !DILocation(line: 9, column: 21, scope: !280) -// CHECK:STDOUT: !288 = !DILocation(line: 8, column: 1, scope: !280) -// CHECK:STDOUT: !289 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84270bb113cb754b", scope: null, file: !196, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !197) -// CHECK:STDOUT: !290 = !DILocation(line: 9, column: 3, scope: !289) -// CHECK:STDOUT: !291 = !DILocation(line: 9, column: 22, scope: !289) -// CHECK:STDOUT: !292 = !DILocation(line: 9, column: 21, scope: !289) -// CHECK:STDOUT: !293 = !DILocation(line: 9, column: 28, scope: !289) -// CHECK:STDOUT: !294 = !DILocation(line: 9, column: 41, scope: !289) -// CHECK:STDOUT: !295 = !DILocation(line: 9, column: 50, scope: !289) -// CHECK:STDOUT: !297 = !DILocation(line: 8, column: 1, scope: !289) +// CHECK:STDOUT: !136 = !{null, !39} +// CHECK:STDOUT: !137 = !DISubroutineType(types: !136) +// CHECK:STDOUT: !210 = !DIFile(filename: "initialize_from_nested_literal.carbon", directory: "") +// CHECK:STDOUT: !211 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !210, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !212 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !210, line: 24, type: !93, spFlags: DISPFlagDefinition, unit: !211) +// CHECK:STDOUT: !213 = !DILocation(line: 25, column: 3, scope: !212) +// CHECK:STDOUT: !214 = !DILocation(line: 27, column: 3, scope: !212) +// CHECK:STDOUT: !215 = !DILocation(line: 29, column: 3, scope: !212) +// CHECK:STDOUT: !216 = !DILocation(line: 24, column: 1, scope: !212) +// CHECK:STDOUT: !217 = distinct !DISubprogram(name: "Op", linkageName: "_COp.f38e1c3ccdfe019b:core.SubobjectDestroy.Core", scope: null, file: !210, line: 9, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !220) +// CHECK:STDOUT: !218 = !DILocalVariable(arg: 1, scope: !217, type: !39) +// CHECK:STDOUT: !219 = !DILocation(line: 9, column: 3, scope: !217) +// CHECK:STDOUT: !220 = !{!218} +// CHECK:STDOUT: !221 = distinct !DISubprogram(name: "Op", linkageName: "_COp.4c2c335412ec52fa:core.SubobjectDestroy.Core", scope: null, file: !210, line: 9, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !224) +// CHECK:STDOUT: !222 = !DILocalVariable(arg: 1, scope: !221, type: !39) +// CHECK:STDOUT: !223 = !DILocation(line: 9, column: 3, scope: !221) +// CHECK:STDOUT: !224 = !{!222} +// CHECK:STDOUT: !225 = distinct !DISubprogram(name: "Op", linkageName: "_COp.0950f8aecfaebf0b:core.SubobjectDestroy.Core", scope: null, file: !210, line: 9, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !228) +// CHECK:STDOUT: !226 = !DILocalVariable(arg: 1, scope: !225, type: !39) +// CHECK:STDOUT: !227 = !DILocation(line: 9, column: 3, scope: !225) +// CHECK:STDOUT: !228 = !{!226} +// CHECK:STDOUT: !229 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2f43e328c637647f:core.SubobjectDestroy.Core", scope: null, file: !210, line: 9, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !232) +// CHECK:STDOUT: !230 = !DILocalVariable(arg: 1, scope: !229, type: !39) +// CHECK:STDOUT: !231 = !DILocation(line: 9, column: 3, scope: !229) +// CHECK:STDOUT: !232 = !{!230} +// CHECK:STDOUT: !233 = distinct !DISubprogram(name: "Op", linkageName: "_COp.2970be6ba4c2615c:core.SubobjectDestroy.Core", scope: null, file: !210, line: 9, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !236) +// CHECK:STDOUT: !234 = !DILocalVariable(arg: 1, scope: !233, type: !39) +// CHECK:STDOUT: !235 = !DILocation(line: 9, column: 3, scope: !233) +// CHECK:STDOUT: !236 = !{!234} +// CHECK:STDOUT: !237 = distinct !DISubprogram(name: "Op", linkageName: "_COp.680f7fa3ef86df7a:core.SubobjectDestroy.Core", scope: null, file: !210, line: 9, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !240) +// CHECK:STDOUT: !238 = !DILocalVariable(arg: 1, scope: !237, type: !39) +// CHECK:STDOUT: !239 = !DILocation(line: 9, column: 3, scope: !237) +// CHECK:STDOUT: !240 = !{!238} +// CHECK:STDOUT: !241 = distinct !DISubprogram(name: "Op", linkageName: "_COp.bb4067704e9a198c:core.SubobjectDestroy.Core", scope: null, file: !210, line: 9, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !244) +// CHECK:STDOUT: !242 = !DILocalVariable(arg: 1, scope: !241, type: !39) +// CHECK:STDOUT: !243 = !DILocation(line: 9, column: 3, scope: !241) +// CHECK:STDOUT: !244 = !{!242} +// CHECK:STDOUT: !245 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.75a9ebb2041c173b", scope: null, file: !210, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !211) +// CHECK:STDOUT: !246 = !DILocation(line: 9, column: 3, scope: !245) +// CHECK:STDOUT: !247 = !DILocation(line: 9, column: 22, scope: !245) +// CHECK:STDOUT: !248 = !DILocation(line: 9, column: 21, scope: !245) +// CHECK:STDOUT: !249 = !DILocation(line: 9, column: 28, scope: !245) +// CHECK:STDOUT: !250 = !DILocation(line: 9, column: 41, scope: !245) +// CHECK:STDOUT: !251 = !DILocation(line: 9, column: 50, scope: !245) +// CHECK:STDOUT: !253 = !DILocation(line: 8, column: 1, scope: !245) +// CHECK:STDOUT: !254 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.f5d9b693014ce43e", scope: null, file: !210, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !211) +// CHECK:STDOUT: !255 = !DILocation(line: 9, column: 3, scope: !254) +// CHECK:STDOUT: !256 = !DILocation(line: 9, column: 28, scope: !254) +// CHECK:STDOUT: !257 = !DILocation(line: 9, column: 41, scope: !254) +// CHECK:STDOUT: !258 = !DILocation(line: 9, column: 22, scope: !254) +// CHECK:STDOUT: !259 = !DILocation(line: 9, column: 50, scope: !254) +// CHECK:STDOUT: !260 = !DILocation(line: 9, column: 21, scope: !254) +// CHECK:STDOUT: !262 = !DILocation(line: 8, column: 1, scope: !254) +// CHECK:STDOUT: !263 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.84270bb113cb754b", scope: null, file: !210, line: 8, type: !93, spFlags: DISPFlagDefinition, unit: !211) +// 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: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2abb6e2621dcf00d", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !278) +// CHECK:STDOUT: !273 = !DILocalVariable(arg: 1, scope: !272, type: !39) +// CHECK:STDOUT: !277 = !DILocation(line: 32, column: 1, scope: !272) +// CHECK:STDOUT: !278 = !{!273} +// CHECK:STDOUT: !279 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4feb82675f0be8c5", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !285) +// CHECK:STDOUT: !280 = !DILocalVariable(arg: 1, scope: !279, type: !39) +// CHECK:STDOUT: !283 = !DILocation(line: 34, column: 5, scope: !279) +// CHECK:STDOUT: !284 = !DILocation(line: 32, column: 1, scope: !279) +// CHECK:STDOUT: !285 = !{!280} +// CHECK:STDOUT: !286 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.994e0b2182a91858", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !292) +// CHECK:STDOUT: !287 = !DILocalVariable(arg: 1, scope: !286, type: !39) +// CHECK:STDOUT: !291 = !DILocation(line: 32, column: 1, scope: !286) +// CHECK:STDOUT: !292 = !{!287} +// CHECK:STDOUT: !293 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.efd8b9ca9849b087", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !299) +// CHECK:STDOUT: !294 = !DILocalVariable(arg: 1, scope: !293, type: !39) +// CHECK:STDOUT: !297 = !DILocation(line: 34, column: 5, scope: !293) +// CHECK:STDOUT: !298 = !DILocation(line: 32, column: 1, scope: !293) +// CHECK:STDOUT: !299 = !{!294} +// CHECK:STDOUT: !300 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ff24853a526ad6af", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !306) +// CHECK:STDOUT: !301 = !DILocalVariable(arg: 1, scope: !300, type: !39) +// CHECK:STDOUT: !304 = !DILocation(line: 34, column: 5, scope: !300) +// CHECK:STDOUT: !305 = !DILocation(line: 32, column: 1, scope: !300) +// CHECK:STDOUT: !306 = !{!301} +// CHECK:STDOUT: !307 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.e1b668d14ae6f638", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !313) +// CHECK:STDOUT: !308 = !DILocalVariable(arg: 1, scope: !307, type: !39) +// CHECK:STDOUT: !311 = !DILocation(line: 34, column: 5, scope: !307) +// CHECK:STDOUT: !312 = !DILocation(line: 32, column: 1, scope: !307) +// CHECK:STDOUT: !313 = !{!308} +// CHECK:STDOUT: !314 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.d998f017deb6d2c0", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !320) +// CHECK:STDOUT: !315 = !DILocalVariable(arg: 1, scope: !314, type: !39) +// CHECK:STDOUT: !318 = !DILocation(line: 34, column: 5, scope: !314) +// CHECK:STDOUT: !319 = !DILocation(line: 32, column: 1, scope: !314) +// CHECK:STDOUT: !320 = !{!315} +// CHECK:STDOUT: !321 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6458632b8fd80962", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !211, retainedNodes: !327) +// CHECK:STDOUT: !322 = !DILocalVariable(arg: 1, scope: !321, type: !39) +// CHECK:STDOUT: !325 = !DILocation(line: 34, column: 5, scope: !321) +// CHECK:STDOUT: !326 = !DILocation(line: 32, column: 1, scope: !321) +// CHECK:STDOUT: !327 = !{!322} // 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 !300 { +// CHECK:STDOUT: define void @_CTest1.Main(i32 %n) #0 !dbg !330 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.55456748a8a2eb70(i32 %n), !dbg !304 -// CHECK:STDOUT: ret void, !dbg !307 +// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.55456748a8a2eb70(i32 %n), !dbg !334 +// CHECK:STDOUT: ret void, !dbg !337 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.55456748a8a2eb70.Core"(ptr %self) #0 !dbg !309 { +// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.55456748a8a2eb70.Core"(ptr %self) #0 !dbg !339 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !314 -// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !314 -// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !315 +// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !344 +// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !344 +// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !345 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !317 { +// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !347 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.9522ff908e97e267(ptr %c), !dbg !321 -// CHECK:STDOUT: ret void, !dbg !324 +// CHECK:STDOUT: %AsI32.call = call i32 @_CAsI32.Main.9522ff908e97e267(ptr %c), !dbg !351 +// CHECK:STDOUT: ret void, !dbg !354 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.55456748a8a2eb70(i32 %x) #0 !dbg !326 { +// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.55456748a8a2eb70(i32 %x) #0 !dbg !356 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret i32 %x, !dbg !332 +// CHECK:STDOUT: ret i32 %x, !dbg !362 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.9522ff908e97e267(ptr %x) #0 !dbg !334 { +// CHECK:STDOUT: define linkonce_odr i32 @_CAsI32.Main.9522ff908e97e267(ptr %x) #0 !dbg !364 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.55456748a8a2eb70.Core"(ptr %x), !dbg !339 -// CHECK:STDOUT: ret i32 %C.as.As.impl.Convert.call, !dbg !340 +// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.55456748a8a2eb70.Core"(ptr %x), !dbg !369 +// CHECK:STDOUT: ret i32 %C.as.As.impl.Convert.call, !dbg !370 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!299} +// CHECK:STDOUT: !llvm.dbg.cu = !{!329} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -988,79 +958,79 @@ fn Run() { // CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !40 = !{!36, !39} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !94 = !{null, !36} -// CHECK:STDOUT: !95 = !DISubroutineType(types: !94) -// CHECK:STDOUT: !130 = !{null, !39} -// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) -// CHECK:STDOUT: !298 = !DIFile(filename: "as.carbon", directory: "") -// CHECK:STDOUT: !299 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !298, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !300 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !298, line: 8, type: !95, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !308) -// CHECK:STDOUT: !301 = !DILocalVariable(arg: 1, scope: !300, type: !36) -// CHECK:STDOUT: !304 = !DILocation(line: 9, column: 16, scope: !300) -// CHECK:STDOUT: !307 = !DILocation(line: 8, column: 1, scope: !300) -// CHECK:STDOUT: !308 = !{!301} -// CHECK:STDOUT: !309 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.55456748a8a2eb70.Core", scope: null, file: !298, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !316) -// CHECK:STDOUT: !310 = !DILocalVariable(arg: 1, scope: !309, type: !39) -// CHECK:STDOUT: !314 = !DILocation(line: 15, column: 38, scope: !309) -// CHECK:STDOUT: !315 = !DILocation(line: 15, column: 31, scope: !309) -// CHECK:STDOUT: !316 = !{!310} -// CHECK:STDOUT: !317 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !298, line: 19, type: !131, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !325) -// CHECK:STDOUT: !318 = !DILocalVariable(arg: 1, scope: !317, type: !39) -// CHECK:STDOUT: !321 = !DILocation(line: 20, column: 16, scope: !317) -// CHECK:STDOUT: !324 = !DILocation(line: 19, column: 1, scope: !317) -// CHECK:STDOUT: !325 = !{!318} -// CHECK:STDOUT: !326 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.55456748a8a2eb70", scope: null, file: !298, line: 4, type: !38, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !333) -// CHECK:STDOUT: !327 = !DILocalVariable(arg: 1, scope: !326, type: !36) -// CHECK:STDOUT: !332 = !DILocation(line: 5, column: 3, scope: !326) -// CHECK:STDOUT: !333 = !{!327} -// CHECK:STDOUT: !334 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.9522ff908e97e267", scope: null, file: !298, line: 4, type: !41, spFlags: DISPFlagDefinition, unit: !299, retainedNodes: !341) -// CHECK:STDOUT: !335 = !DILocalVariable(arg: 1, scope: !334, type: !39) -// CHECK:STDOUT: !339 = !DILocation(line: 5, column: 10, scope: !334) -// CHECK:STDOUT: !340 = !DILocation(line: 5, column: 3, scope: !334) -// CHECK:STDOUT: !341 = !{!335} +// CHECK:STDOUT: !100 = !{null, !36} +// CHECK:STDOUT: !101 = !DISubroutineType(types: !100) +// CHECK:STDOUT: !136 = !{null, !39} +// CHECK:STDOUT: !137 = !DISubroutineType(types: !136) +// CHECK:STDOUT: !328 = !DIFile(filename: "as.carbon", directory: "") +// CHECK:STDOUT: !329 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !328, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !330 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !328, line: 8, type: !101, spFlags: DISPFlagDefinition, unit: !329, retainedNodes: !338) +// CHECK:STDOUT: !331 = !DILocalVariable(arg: 1, scope: !330, type: !36) +// CHECK:STDOUT: !334 = !DILocation(line: 9, column: 16, scope: !330) +// CHECK:STDOUT: !337 = !DILocation(line: 8, column: 1, scope: !330) +// CHECK:STDOUT: !338 = !{!331} +// CHECK:STDOUT: !339 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.55456748a8a2eb70.Core", scope: null, file: !328, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !329, retainedNodes: !346) +// CHECK:STDOUT: !340 = !DILocalVariable(arg: 1, scope: !339, type: !39) +// CHECK:STDOUT: !344 = !DILocation(line: 15, column: 38, scope: !339) +// CHECK:STDOUT: !345 = !DILocation(line: 15, column: 31, scope: !339) +// CHECK:STDOUT: !346 = !{!340} +// CHECK:STDOUT: !347 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !328, line: 19, type: !137, spFlags: DISPFlagDefinition, unit: !329, retainedNodes: !355) +// CHECK:STDOUT: !348 = !DILocalVariable(arg: 1, scope: !347, type: !39) +// CHECK:STDOUT: !351 = !DILocation(line: 20, column: 16, scope: !347) +// CHECK:STDOUT: !354 = !DILocation(line: 19, column: 1, scope: !347) +// CHECK:STDOUT: !355 = !{!348} +// CHECK:STDOUT: !356 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.55456748a8a2eb70", scope: null, file: !328, line: 4, type: !38, spFlags: DISPFlagDefinition, unit: !329, retainedNodes: !363) +// CHECK:STDOUT: !357 = !DILocalVariable(arg: 1, scope: !356, type: !36) +// CHECK:STDOUT: !362 = !DILocation(line: 5, column: 3, scope: !356) +// CHECK:STDOUT: !363 = !{!357} +// CHECK:STDOUT: !364 = distinct !DISubprogram(name: "AsI32", linkageName: "_CAsI32.Main.9522ff908e97e267", scope: null, file: !328, line: 4, type: !41, spFlags: DISPFlagDefinition, unit: !329, retainedNodes: !371) +// CHECK:STDOUT: !365 = !DILocalVariable(arg: 1, scope: !364, type: !39) +// CHECK:STDOUT: !369 = !DILocation(line: 5, column: 10, scope: !364) +// CHECK:STDOUT: !370 = !DILocation(line: 5, column: 3, scope: !364) +// CHECK:STDOUT: !371 = !{!365} // 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 !344 { +// CHECK:STDOUT: define void @_CTest1.Main(i32 %n) #0 !dbg !374 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CAsType.Main.0f3e15a21cc8e963(i32 %n), !dbg !348 -// CHECK:STDOUT: ret void, !dbg !349 +// CHECK:STDOUT: call void @_CAsType.Main.0f3e15a21cc8e963(i32 %n), !dbg !378 +// CHECK:STDOUT: ret void, !dbg !379 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.55456748a8a2eb70.Core"(ptr %self) #0 !dbg !351 { +// CHECK:STDOUT: define i32 @"_CConvert.C.Main:As.55456748a8a2eb70.Core"(ptr %self) #0 !dbg !381 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !356 -// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !356 -// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !357 +// CHECK:STDOUT: %.loc15_42.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !386 +// CHECK:STDOUT: %.loc15_42.2 = load i32, ptr %.loc15_42.1.n, align 4, !dbg !386 +// CHECK:STDOUT: ret i32 %.loc15_42.2, !dbg !387 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !359 { +// CHECK:STDOUT: define void @_CTest2.Main(ptr %c) #0 !dbg !389 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CAsType.Main.9f9f842f4c8e7f62(ptr %c), !dbg !363 -// CHECK:STDOUT: ret void, !dbg !364 +// CHECK:STDOUT: call void @_CAsType.Main.9f9f842f4c8e7f62(ptr %c), !dbg !393 +// CHECK:STDOUT: ret void, !dbg !394 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.0f3e15a21cc8e963(i32 %x) #0 !dbg !366 { +// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.0f3e15a21cc8e963(i32 %x) #0 !dbg !396 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !372 +// CHECK:STDOUT: ret void, !dbg !402 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.9f9f842f4c8e7f62(ptr %x) #0 !dbg !374 { +// CHECK:STDOUT: define linkonce_odr void @_CAsType.Main.9f9f842f4c8e7f62(ptr %x) #0 !dbg !404 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.55456748a8a2eb70.Core"(ptr %x), !dbg !377 -// CHECK:STDOUT: ret void, !dbg !380 +// CHECK:STDOUT: %C.as.As.impl.Convert.call = call i32 @"_CConvert.C.Main:As.55456748a8a2eb70.Core"(ptr %x), !dbg !407 +// CHECK:STDOUT: ret void, !dbg !410 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: -// CHECK:STDOUT: !llvm.dbg.cu = !{!343} +// CHECK:STDOUT: !llvm.dbg.cu = !{!373} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -1069,36 +1039,36 @@ fn Run() { // CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !40 = !{!36, !39} // CHECK:STDOUT: !41 = !DISubroutineType(types: !40) -// CHECK:STDOUT: !94 = !{null, !36} -// CHECK:STDOUT: !95 = !DISubroutineType(types: !94) -// CHECK:STDOUT: !130 = !{null, !39} -// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) -// CHECK:STDOUT: !342 = !DIFile(filename: "as_type.carbon", directory: "") -// CHECK:STDOUT: !343 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !342, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !344 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !342, line: 8, type: !95, spFlags: DISPFlagDefinition, unit: !343, retainedNodes: !350) -// CHECK:STDOUT: !345 = !DILocalVariable(arg: 1, scope: !344, type: !36) -// CHECK:STDOUT: !348 = !DILocation(line: 9, column: 3, scope: !344) -// CHECK:STDOUT: !349 = !DILocation(line: 8, column: 1, scope: !344) -// CHECK:STDOUT: !350 = !{!345} -// CHECK:STDOUT: !351 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.55456748a8a2eb70.Core", scope: null, file: !342, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !343, retainedNodes: !358) -// CHECK:STDOUT: !352 = !DILocalVariable(arg: 1, scope: !351, type: !39) -// CHECK:STDOUT: !356 = !DILocation(line: 15, column: 38, scope: !351) -// CHECK:STDOUT: !357 = !DILocation(line: 15, column: 31, scope: !351) -// CHECK:STDOUT: !358 = !{!352} -// CHECK:STDOUT: !359 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !342, line: 19, type: !131, spFlags: DISPFlagDefinition, unit: !343, retainedNodes: !365) -// CHECK:STDOUT: !360 = !DILocalVariable(arg: 1, scope: !359, type: !39) -// CHECK:STDOUT: !363 = !DILocation(line: 20, column: 3, scope: !359) -// CHECK:STDOUT: !364 = !DILocation(line: 19, column: 1, scope: !359) -// CHECK:STDOUT: !365 = !{!360} -// CHECK:STDOUT: !366 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.0f3e15a21cc8e963", scope: null, file: !342, line: 4, type: !95, spFlags: DISPFlagDefinition, unit: !343, retainedNodes: !373) -// CHECK:STDOUT: !367 = !DILocalVariable(arg: 1, scope: !366, type: !36) -// CHECK:STDOUT: !372 = !DILocation(line: 4, column: 1, scope: !366) -// CHECK:STDOUT: !373 = !{!367} -// CHECK:STDOUT: !374 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.9f9f842f4c8e7f62", scope: null, file: !342, line: 4, type: !131, spFlags: DISPFlagDefinition, unit: !343, retainedNodes: !381) -// CHECK:STDOUT: !375 = !DILocalVariable(arg: 1, scope: !374, type: !39) -// CHECK:STDOUT: !377 = !DILocation(line: 5, column: 14, scope: !374) -// CHECK:STDOUT: !380 = !DILocation(line: 4, column: 1, scope: !374) -// CHECK:STDOUT: !381 = !{!375} +// CHECK:STDOUT: !100 = !{null, !36} +// CHECK:STDOUT: !101 = !DISubroutineType(types: !100) +// CHECK:STDOUT: !136 = !{null, !39} +// CHECK:STDOUT: !137 = !DISubroutineType(types: !136) +// CHECK:STDOUT: !372 = !DIFile(filename: "as_type.carbon", directory: "") +// CHECK:STDOUT: !373 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !372, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !374 = distinct !DISubprogram(name: "Test1", linkageName: "_CTest1.Main", scope: null, file: !372, line: 8, type: !101, spFlags: DISPFlagDefinition, unit: !373, retainedNodes: !380) +// CHECK:STDOUT: !375 = !DILocalVariable(arg: 1, scope: !374, type: !36) +// CHECK:STDOUT: !378 = !DILocation(line: 9, column: 3, scope: !374) +// CHECK:STDOUT: !379 = !DILocation(line: 8, column: 1, scope: !374) +// CHECK:STDOUT: !380 = !{!375} +// CHECK:STDOUT: !381 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.C.Main:As.55456748a8a2eb70.Core", scope: null, file: !372, line: 15, type: !41, spFlags: DISPFlagDefinition, unit: !373, retainedNodes: !388) +// CHECK:STDOUT: !382 = !DILocalVariable(arg: 1, scope: !381, type: !39) +// CHECK:STDOUT: !386 = !DILocation(line: 15, column: 38, scope: !381) +// CHECK:STDOUT: !387 = !DILocation(line: 15, column: 31, scope: !381) +// CHECK:STDOUT: !388 = !{!382} +// CHECK:STDOUT: !389 = distinct !DISubprogram(name: "Test2", linkageName: "_CTest2.Main", scope: null, file: !372, line: 19, type: !137, spFlags: DISPFlagDefinition, unit: !373, retainedNodes: !395) +// CHECK:STDOUT: !390 = !DILocalVariable(arg: 1, scope: !389, type: !39) +// CHECK:STDOUT: !393 = !DILocation(line: 20, column: 3, scope: !389) +// CHECK:STDOUT: !394 = !DILocation(line: 19, column: 1, scope: !389) +// CHECK:STDOUT: !395 = !{!390} +// CHECK:STDOUT: !396 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.0f3e15a21cc8e963", scope: null, file: !372, line: 4, type: !101, spFlags: DISPFlagDefinition, unit: !373, retainedNodes: !403) +// CHECK:STDOUT: !397 = !DILocalVariable(arg: 1, scope: !396, type: !36) +// CHECK:STDOUT: !402 = !DILocation(line: 4, column: 1, scope: !396) +// CHECK:STDOUT: !403 = !{!397} +// CHECK:STDOUT: !404 = distinct !DISubprogram(name: "AsType", linkageName: "_CAsType.Main.9f9f842f4c8e7f62", scope: null, file: !372, line: 4, type: !137, spFlags: DISPFlagDefinition, unit: !373, retainedNodes: !411) +// CHECK:STDOUT: !405 = !DILocalVariable(arg: 1, scope: !404, type: !39) +// CHECK:STDOUT: !407 = !DILocation(line: 5, column: 14, scope: !404) +// CHECK:STDOUT: !410 = !DILocation(line: 4, column: 1, scope: !404) +// CHECK:STDOUT: !411 = !{!405} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'initialize_from_template_method_call.carbon' @@ -1107,62 +1077,36 @@ fn Run() { // CHECK:STDOUT: @B.val.loc6_14 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CMakeB.B.Main(ptr sret({}) %return) #0 !dbg !386 { +// CHECK:STDOUT: define void @_CMakeB.B.Main(ptr sret({}) %return) #0 !dbg !416 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @B.val.loc6_14, i64 0, i1 false), !dbg !389 -// CHECK:STDOUT: ret void, !dbg !389 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @B.val.loc6_14, i64 0, i1 false), !dbg !419 +// CHECK:STDOUT: ret void, !dbg !419 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !390 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !420 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc21_10.1.temp = alloca { {} }, align 1, !dbg !391 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc21_10.1.temp), !dbg !391 -// CHECK:STDOUT: call void @_CMakeA.Main.a6a60dfee2d7d273(ptr %.loc21_10.1.temp), !dbg !391 -// CHECK:STDOUT: call void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %.loc21_10.1.temp), !dbg !391 -// CHECK:STDOUT: ret i32 0, !dbg !392 +// CHECK:STDOUT: %.loc21_10.1.temp = alloca { {} }, align 1, !dbg !421 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc21_10.1.temp), !dbg !421 +// CHECK:STDOUT: call void @_CMakeA.Main.a6a60dfee2d7d273(ptr %.loc21_10.1.temp), !dbg !421 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %.loc21_10.1.temp), !dbg !421 +// CHECK:STDOUT: ret i32 0, !dbg !422 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !393 { +// CHECK:STDOUT: define weak_odr void @"_COp.8fbe0c6a865381a4:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !423 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !395 +// CHECK:STDOUT: %.loc21_10.1.field = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !425 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc21_10.1.field), !dbg !425 +// CHECK:STDOUT: ret void, !dbg !425 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %self) #0 !dbg !397 { +// CHECK:STDOUT: define weak_odr void @"_COp.5a23cc09585c55d2:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !427 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !399 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.8fbe0c6a865381a4:core.Destroy.Core"(ptr %self) #0 !dbg !401 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc21.field = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !403 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc21.field), !dbg !403 -// CHECK:STDOUT: ret void, !dbg !403 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8fbe0c6a865381a4:core.Destroy.Core"(ptr %self) #0 !dbg !405 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8fbe0c6a865381a4: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.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #0 !dbg !409 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc21.field = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !411 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr %.loc21.field), !dbg !411 -// CHECK:STDOUT: ret void, !dbg !411 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core"(ptr %self) #0 !dbg !413 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core"(ptr %self), !dbg !415 -// CHECK:STDOUT: ret void, !dbg !415 +// CHECK:STDOUT: %.loc21_10.1.field = getelementptr inbounds nuw { {} }, ptr %self, i32 0, i32 0, !dbg !429 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %.loc21_10.1.field), !dbg !429 +// CHECK:STDOUT: ret void, !dbg !429 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -1172,62 +1116,70 @@ fn Run() { // 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 @_CMakeA.Main.a6a60dfee2d7d273(ptr sret({ {} }) %return) #0 !dbg !417 { +// CHECK:STDOUT: define linkonce_odr void @_CMakeA.Main.a6a60dfee2d7d273(ptr sret({ {} }) %return) #0 !dbg !431 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.f4aa6f.1.field = getelementptr inbounds nuw { {} }, ptr %return, i32 0, i32 0, !dbg !421 -// CHECK:STDOUT: call void @_CMakeB.B.Main(ptr %.f4aa6f.1.field), !dbg !420 -// CHECK:STDOUT: ret void, !dbg !422 +// CHECK:STDOUT: %.f4aa6f.1.field = getelementptr inbounds nuw { {} }, ptr %return, i32 0, i32 0, !dbg !435 +// CHECK:STDOUT: call void @_CMakeB.B.Main(ptr %.f4aa6f.1.field), !dbg !434 +// CHECK:STDOUT: ret void, !dbg !436 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6b8b385dcf82cc70(ptr %t) #0 !dbg !437 { +// CHECK:STDOUT: call void @"_COp.5a23cc09585c55d2:core.SubobjectDestroy.Core"(ptr %t), !dbg !441 +// CHECK:STDOUT: ret void, !dbg !442 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %t) #0 !dbg !444 { +// CHECK:STDOUT: ret void, !dbg !449 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6579a5013ba3dcd2, { 1, 0 } +// 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 = !{!383} +// CHECK:STDOUT: !llvm.dbg.cu = !{!413} // 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: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !36 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !126 = !{!39} -// CHECK:STDOUT: !127 = !DISubroutineType(types: !126) -// CHECK:STDOUT: !130 = !{null, !39} -// CHECK:STDOUT: !131 = !DISubroutineType(types: !130) -// CHECK:STDOUT: !382 = !DIFile(filename: "initialize_from_template_method_call.carbon", directory: "") -// CHECK:STDOUT: !383 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !382, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !384 = !{!36} -// CHECK:STDOUT: !385 = !DISubroutineType(types: !384) -// CHECK:STDOUT: !386 = distinct !DISubprogram(name: "MakeB", linkageName: "_CMakeB.B.Main", scope: null, file: !382, line: 5, type: !127, spFlags: DISPFlagDefinition, unit: !383) -// CHECK:STDOUT: !389 = !DILocation(line: 6, column: 5, scope: !386) -// CHECK:STDOUT: !390 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !382, line: 20, type: !385, spFlags: DISPFlagDefinition, unit: !383) -// CHECK:STDOUT: !391 = !DILocation(line: 21, column: 3, scope: !390) -// CHECK:STDOUT: !392 = !DILocation(line: 20, column: 1, scope: !390) -// CHECK:STDOUT: !393 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !382, line: 21, type: !131, spFlags: DISPFlagDefinition, unit: !383, retainedNodes: !396) -// CHECK:STDOUT: !394 = !DILocalVariable(arg: 1, scope: !393, type: !39) -// CHECK:STDOUT: !395 = !DILocation(line: 21, column: 3, scope: !393) -// CHECK:STDOUT: !396 = !{!394} -// CHECK:STDOUT: !397 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core", scope: null, file: !382, line: 21, type: !131, spFlags: DISPFlagDefinition, unit: !383, retainedNodes: !400) -// CHECK:STDOUT: !398 = !DILocalVariable(arg: 1, scope: !397, type: !39) -// CHECK:STDOUT: !399 = !DILocation(line: 21, column: 3, scope: !397) -// CHECK:STDOUT: !400 = !{!398} -// CHECK:STDOUT: !401 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.8fbe0c6a865381a4:core.Destroy.Core", scope: null, file: !382, line: 21, type: !131, spFlags: DISPFlagDefinition, unit: !383, retainedNodes: !404) -// CHECK:STDOUT: !402 = !DILocalVariable(arg: 1, scope: !401, type: !39) -// CHECK:STDOUT: !403 = !DILocation(line: 21, column: 3, scope: !401) -// CHECK:STDOUT: !404 = !{!402} -// CHECK:STDOUT: !405 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8fbe0c6a865381a4:core.Destroy.Core", scope: null, file: !382, line: 21, type: !131, spFlags: DISPFlagDefinition, unit: !383, retainedNodes: !408) -// CHECK:STDOUT: !406 = !DILocalVariable(arg: 1, scope: !405, type: !39) -// CHECK:STDOUT: !407 = !DILocation(line: 21, column: 3, scope: !405) -// CHECK:STDOUT: !408 = !{!406} -// CHECK:STDOUT: !409 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !382, line: 21, type: !131, spFlags: DISPFlagDefinition, unit: !383, retainedNodes: !412) -// CHECK:STDOUT: !410 = !DILocalVariable(arg: 1, scope: !409, type: !39) -// CHECK:STDOUT: !411 = !DILocation(line: 21, column: 3, scope: !409) -// CHECK:STDOUT: !412 = !{!410} -// CHECK:STDOUT: !413 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.5a23cc09585c55d2:core.Destroy.Core", scope: null, file: !382, line: 21, type: !131, spFlags: DISPFlagDefinition, unit: !383, retainedNodes: !416) -// CHECK:STDOUT: !414 = !DILocalVariable(arg: 1, scope: !413, type: !39) -// CHECK:STDOUT: !415 = !DILocation(line: 21, column: 3, scope: !413) -// CHECK:STDOUT: !416 = !{!414} -// CHECK:STDOUT: !417 = distinct !DISubprogram(name: "MakeA", linkageName: "_CMakeA.Main.a6a60dfee2d7d273", scope: null, file: !382, line: 14, type: !127, spFlags: DISPFlagDefinition, unit: !383) -// CHECK:STDOUT: !420 = !DILocation(line: 16, column: 15, scope: !417) -// CHECK:STDOUT: !421 = !DILocation(line: 15, column: 11, scope: !417) -// CHECK:STDOUT: !422 = !DILocation(line: 15, column: 4, scope: !417) +// CHECK:STDOUT: !132 = !{!39} +// CHECK:STDOUT: !133 = !DISubroutineType(types: !132) +// CHECK:STDOUT: !136 = !{null, !39} +// CHECK:STDOUT: !137 = !DISubroutineType(types: !136) +// CHECK:STDOUT: !412 = !DIFile(filename: "initialize_from_template_method_call.carbon", directory: "") +// CHECK:STDOUT: !413 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !412, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !414 = !{!36} +// CHECK:STDOUT: !415 = !DISubroutineType(types: !414) +// CHECK:STDOUT: !416 = distinct !DISubprogram(name: "MakeB", linkageName: "_CMakeB.B.Main", scope: null, file: !412, line: 5, type: !133, spFlags: DISPFlagDefinition, unit: !413) +// CHECK:STDOUT: !419 = !DILocation(line: 6, column: 5, scope: !416) +// CHECK:STDOUT: !420 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !412, line: 20, type: !415, spFlags: DISPFlagDefinition, unit: !413) +// CHECK:STDOUT: !421 = !DILocation(line: 21, column: 3, scope: !420) +// CHECK:STDOUT: !422 = !DILocation(line: 20, column: 1, scope: !420) +// CHECK:STDOUT: !423 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8fbe0c6a865381a4:core.SubobjectDestroy.Core", scope: null, file: !412, line: 21, type: !137, spFlags: DISPFlagDefinition, unit: !413, retainedNodes: !426) +// CHECK:STDOUT: !424 = !DILocalVariable(arg: 1, scope: !423, type: !39) +// CHECK:STDOUT: !425 = !DILocation(line: 21, column: 3, scope: !423) +// CHECK:STDOUT: !426 = !{!424} +// CHECK:STDOUT: !427 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5a23cc09585c55d2:core.SubobjectDestroy.Core", scope: null, file: !412, line: 21, type: !137, spFlags: DISPFlagDefinition, unit: !413, retainedNodes: !430) +// CHECK:STDOUT: !428 = !DILocalVariable(arg: 1, scope: !427, type: !39) +// CHECK:STDOUT: !429 = !DILocation(line: 21, column: 3, scope: !427) +// CHECK:STDOUT: !430 = !{!428} +// CHECK:STDOUT: !431 = distinct !DISubprogram(name: "MakeA", linkageName: "_CMakeA.Main.a6a60dfee2d7d273", scope: null, file: !412, line: 14, type: !133, spFlags: DISPFlagDefinition, unit: !413) +// CHECK:STDOUT: !434 = !DILocation(line: 16, column: 15, scope: !431) +// CHECK:STDOUT: !435 = !DILocation(line: 15, column: 11, scope: !431) +// CHECK:STDOUT: !436 = !DILocation(line: 15, column: 4, scope: !431) +// CHECK:STDOUT: !437 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6b8b385dcf82cc70", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !413, retainedNodes: !443) +// CHECK:STDOUT: !438 = !DILocalVariable(arg: 1, scope: !437, type: !39) +// CHECK:STDOUT: !441 = !DILocation(line: 34, column: 5, scope: !437) +// CHECK:STDOUT: !442 = !DILocation(line: 32, column: 1, scope: !437) +// CHECK:STDOUT: !443 = !{!438} +// CHECK:STDOUT: !444 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6579a5013ba3dcd2", scope: null, file: !26, line: 32, type: !137, spFlags: DISPFlagDefinition, unit: !413, retainedNodes: !450) +// CHECK:STDOUT: !445 = !DILocalVariable(arg: 1, scope: !444, type: !39) +// CHECK:STDOUT: !449 = !DILocation(line: 32, column: 1, scope: !444) +// CHECK:STDOUT: !450 = !{!445} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/template/merging.carbon b/toolchain/lower/testdata/template/merging.carbon index 4a4b59fa6b54..83800406b576 100644 --- a/toolchain/lower/testdata/template/merging.carbon +++ b/toolchain/lower/testdata/template/merging.carbon @@ -200,105 +200,96 @@ fn CallCallF(a: A, b: B) { // CHECK:STDOUT: %.loc34_11.2.temp = alloca {}, align 1, !dbg !54 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc32_11.2.temp), !dbg !50 // CHECK:STDOUT: call void @_CCallBF.Main.a6a60dfee2d7d273(ptr @B.val.loc8_45), !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.8c4b83ecd900f1ea:core.Destroy.Core"(ptr @B.val), !dbg !50 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr @B.val), !dbg !50 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc33_11.2.temp), !dbg !52 // CHECK:STDOUT: call void @_CCallBF.Main.9522ff908e97e267(ptr @C.val.loc33_13.3), !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr @C.val), !dbg !52 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.356af3b6aef18564(ptr @C.val), !dbg !52 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_11.2.temp), !dbg !54 // CHECK:STDOUT: call void @_CCallBF.Main.931317eeae6ffe17(ptr @D.val.loc34_13.3), !dbg !55 -// CHECK:STDOUT: call void @"_CSelfDestruct.a50fd899f969e609:core.Destroy.Core"(ptr @D.val), !dbg !54 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.0ee92c77788c7639(ptr @D.val), !dbg !54 // CHECK:STDOUT: ret void, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99: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.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.08d9e38b928ba575: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.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: 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 !73 { +// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.bd4fb75a414fe858() #0 !dbg !57 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.A.Main(ptr @A.val.A.val), !dbg !74 -// CHECK:STDOUT: ret void, !dbg !75 +// CHECK:STDOUT: call void @_CF.A.Main(ptr @A.val.A.val), !dbg !58 +// CHECK:STDOUT: ret void, !dbg !59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.a6a60dfee2d7d273() #0 !dbg !76 { +// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.a6a60dfee2d7d273() #0 !dbg !60 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.B.Main(ptr @B.val.loc8_45), !dbg !77 -// CHECK:STDOUT: ret void, !dbg !78 +// CHECK:STDOUT: call void @_CF.B.Main(ptr @B.val.loc8_45), !dbg !61 +// CHECK:STDOUT: ret void, !dbg !62 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.9522ff908e97e267() #0 !dbg !79 { +// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.9522ff908e97e267() #0 !dbg !63 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.2a64a1.4.temp = alloca {}, align 1, !dbg !80 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.4.temp), !dbg !80 -// CHECK:STDOUT: call void @"_CConvert.C.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.4.temp, ptr @C.val.loc33_13.3), !dbg !80 -// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.4.temp), !dbg !80 -// CHECK:STDOUT: ret void, !dbg !81 +// CHECK:STDOUT: %.2a64a1.4.temp = alloca {}, align 1, !dbg !64 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.4.temp), !dbg !64 +// CHECK:STDOUT: call void @"_CConvert.C.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.4.temp, ptr @C.val.loc33_13.3), !dbg !64 +// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.4.temp), !dbg !64 +// CHECK:STDOUT: ret void, !dbg !65 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.931317eeae6ffe17() #0 !dbg !82 { +// CHECK:STDOUT: define linkonce_odr void @_CInitAndCallF.Main.931317eeae6ffe17() #0 !dbg !66 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.2a64a1.3.temp = alloca {}, align 1, !dbg !83 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.3.temp), !dbg !83 -// CHECK:STDOUT: call void @"_CConvert.D.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.3.temp, ptr @D.val.loc34_13.3), !dbg !83 -// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.3.temp), !dbg !83 -// CHECK:STDOUT: ret void, !dbg !84 +// CHECK:STDOUT: %.2a64a1.3.temp = alloca {}, align 1, !dbg !67 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.3.temp), !dbg !67 +// CHECK:STDOUT: call void @"_CConvert.D.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.3.temp, ptr @D.val.loc34_13.3), !dbg !67 +// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.3.temp), !dbg !67 +// 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: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.a6a60dfee2d7d273(ptr %x) #0 !dbg !85 { +// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.a6a60dfee2d7d273(ptr %x) #0 !dbg !69 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.B.Main(ptr %x), !dbg !88 -// CHECK:STDOUT: ret void, !dbg !89 +// CHECK:STDOUT: call void @_CF.B.Main(ptr %x), !dbg !72 +// CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.9522ff908e97e267(ptr %x) #0 !dbg !91 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %.2a64a1.2.temp = alloca {}, align 1, !dbg !94 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.2.temp), !dbg !94 -// CHECK:STDOUT: call void @"_CConvert.C.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.2.temp, ptr %x), !dbg !94 -// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.2.temp), !dbg !94 -// CHECK:STDOUT: ret void, !dbg !95 +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6579a5013ba3dcd2(ptr %t) #0 !dbg !76 { +// CHECK:STDOUT: ret void, !dbg !81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.931317eeae6ffe17(ptr %x) #0 !dbg !97 { +// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.9522ff908e97e267(ptr %x) #0 !dbg !83 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.2a64a1.1.temp = alloca {}, align 1, !dbg !100 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.1.temp), !dbg !100 -// CHECK:STDOUT: call void @"_CConvert.D.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.1.temp, ptr %x), !dbg !100 -// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.1.temp), !dbg !100 -// CHECK:STDOUT: ret void, !dbg !101 +// CHECK:STDOUT: %.2a64a1.2.temp = alloca {}, align 1, !dbg !86 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.2.temp), !dbg !86 +// CHECK:STDOUT: call void @"_CConvert.C.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.2.temp, ptr %x), !dbg !86 +// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.2.temp), !dbg !86 +// CHECK:STDOUT: ret void, !dbg !87 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.356af3b6aef18564(ptr %t) #0 !dbg !89 { +// CHECK:STDOUT: ret void, !dbg !94 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CCallBF.Main.931317eeae6ffe17(ptr %x) #0 !dbg !96 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %.2a64a1.1.temp = alloca {}, align 1, !dbg !99 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.2a64a1.1.temp), !dbg !99 +// CHECK:STDOUT: call void @"_CConvert.D.Main:ImplicitAs.a6a60dfee2d7d273.Core"(ptr %.2a64a1.1.temp, ptr %x), !dbg !99 +// CHECK:STDOUT: call void @_CF.B.Main(ptr %.2a64a1.1.temp), !dbg !99 +// CHECK:STDOUT: ret void, !dbg !100 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.0ee92c77788c7639(ptr %t) #0 !dbg !102 { +// CHECK:STDOUT: ret void, !dbg !107 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives @@ -344,49 +335,46 @@ fn CallCallF(a: A, b: B) { // CHECK:STDOUT: !54 = !DILocation(line: 34, column: 10, scope: !49) // CHECK:STDOUT: !55 = !DILocation(line: 34, column: 3, scope: !49) // CHECK:STDOUT: !56 = !DILocation(line: 31, column: 1, scope: !49) -// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !22, line: 32, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !60) -// 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: "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.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: 33, column: 10, scope: !65) -// CHECK:STDOUT: !68 = !{!66} -// 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: !57 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.bd4fb75a414fe858", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !58 = !DILocation(line: 18, column: 37, scope: !57) +// CHECK:STDOUT: !59 = !DILocation(line: 18, column: 1, scope: !57) +// CHECK:STDOUT: !60 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.a6a60dfee2d7d273", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !61 = !DILocation(line: 18, column: 37, scope: !60) +// CHECK:STDOUT: !62 = !DILocation(line: 18, column: 1, scope: !60) +// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.9522ff908e97e267", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !64 = !DILocation(line: 18, column: 37, scope: !63) +// CHECK:STDOUT: !65 = !DILocation(line: 18, column: 1, scope: !63) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.931317eeae6ffe17", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) +// CHECK:STDOUT: !67 = !DILocation(line: 18, column: 37, scope: !66) +// CHECK:STDOUT: !68 = !DILocation(line: 18, column: 1, scope: !66) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.a6a60dfee2d7d273", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !74) // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !24) -// CHECK:STDOUT: !71 = !DILocation(line: 34, column: 10, scope: !69) -// CHECK:STDOUT: !72 = !{!70} -// 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: 18, column: 1, scope: !79) -// CHECK:STDOUT: !82 = distinct !DISubprogram(name: "InitAndCallF", linkageName: "_CInitAndCallF.Main.931317eeae6ffe17", scope: null, file: !22, line: 18, type: !7, spFlags: DISPFlagDefinition, unit: !23) -// CHECK:STDOUT: !83 = !DILocation(line: 18, column: 37, scope: !82) -// CHECK:STDOUT: !84 = !DILocation(line: 18, column: 1, scope: !82) -// CHECK:STDOUT: !85 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.a6a60dfee2d7d273", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !90) -// CHECK:STDOUT: !86 = !DILocalVariable(arg: 1, scope: !85, type: !24) -// CHECK:STDOUT: !88 = !DILocation(line: 28, column: 3, scope: !85) -// CHECK:STDOUT: !89 = !DILocation(line: 27, column: 1, scope: !85) -// CHECK:STDOUT: !90 = !{!86} -// CHECK:STDOUT: !91 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.9522ff908e97e267", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !96) -// CHECK:STDOUT: !92 = !DILocalVariable(arg: 1, scope: !91, type: !24) -// CHECK:STDOUT: !94 = !DILocation(line: 28, column: 3, scope: !91) -// CHECK:STDOUT: !95 = !DILocation(line: 27, column: 1, scope: !91) -// CHECK:STDOUT: !96 = !{!92} -// CHECK:STDOUT: !97 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.931317eeae6ffe17", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !102) -// CHECK:STDOUT: !98 = !DILocalVariable(arg: 1, scope: !97, type: !24) -// CHECK:STDOUT: !100 = !DILocation(line: 28, column: 3, scope: !97) -// CHECK:STDOUT: !101 = !DILocation(line: 27, column: 1, scope: !97) -// CHECK:STDOUT: !102 = !{!98} +// CHECK:STDOUT: !72 = !DILocation(line: 28, column: 3, scope: !69) +// CHECK:STDOUT: !73 = !DILocation(line: 27, column: 1, scope: !69) +// CHECK:STDOUT: !74 = !{!70} +// CHECK:STDOUT: !75 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !76 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6579a5013ba3dcd2", scope: null, file: !75, line: 36, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !82) +// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !24) +// CHECK:STDOUT: !81 = !DILocation(line: 36, column: 1, scope: !76) +// CHECK:STDOUT: !82 = !{!77} +// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.9522ff908e97e267", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !88) +// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !24) +// CHECK:STDOUT: !86 = !DILocation(line: 28, column: 3, scope: !83) +// CHECK:STDOUT: !87 = !DILocation(line: 27, column: 1, scope: !83) +// CHECK:STDOUT: !88 = !{!84} +// CHECK:STDOUT: !89 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.356af3b6aef18564", scope: null, file: !75, line: 36, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !95) +// CHECK:STDOUT: !90 = !DILocalVariable(arg: 1, scope: !89, type: !24) +// CHECK:STDOUT: !94 = !DILocation(line: 36, column: 1, scope: !89) +// CHECK:STDOUT: !95 = !{!90} +// CHECK:STDOUT: !96 = distinct !DISubprogram(name: "CallBF", linkageName: "_CCallBF.Main.931317eeae6ffe17", scope: null, file: !22, line: 27, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !101) +// CHECK:STDOUT: !97 = !DILocalVariable(arg: 1, scope: !96, type: !24) +// CHECK:STDOUT: !99 = !DILocation(line: 28, column: 3, scope: !96) +// CHECK:STDOUT: !100 = !DILocation(line: 27, column: 1, scope: !96) +// CHECK:STDOUT: !101 = !{!97} +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.0ee92c77788c7639", scope: null, file: !75, line: 36, type: !26, spFlags: DISPFlagDefinition, unit: !23, retainedNodes: !108) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !24) +// CHECK:STDOUT: !107 = !DILocation(line: 36, column: 1, scope: !102) +// CHECK:STDOUT: !108 = !{!103} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'no_merge_convert_one_arg.carbon' @@ -395,65 +383,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 !107 { +// CHECK:STDOUT: define void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr sret({}) %return, ptr %self) #0 !dbg !113 { // 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 !112 -// CHECK:STDOUT: ret void, !dbg !112 +// 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 !118 +// CHECK:STDOUT: ret void, !dbg !118 // 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 !114 { +// CHECK:STDOUT: define void @_CCallCallF.Main(ptr %a, ptr %b) #0 !dbg !120 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CCallF.Main.2877a42045e01a3b(ptr %a, ptr %a), !dbg !121 -// CHECK:STDOUT: call void @_CCallF.Main.d01354a0ad5f3687(ptr %a, ptr %b), !dbg !124 -// CHECK:STDOUT: call void @_CCallF.Main.37b67b83fe9ed3dd(ptr %b, ptr %a), !dbg !127 -// CHECK:STDOUT: call void @_CCallF.Main.7096323a0fb88cc3(ptr %b, ptr %b), !dbg !130 -// CHECK:STDOUT: ret void, !dbg !131 +// CHECK:STDOUT: call void @_CCallF.Main.2877a42045e01a3b(ptr %a, ptr %a), !dbg !127 +// CHECK:STDOUT: call void @_CCallF.Main.d01354a0ad5f3687(ptr %a, ptr %b), !dbg !130 +// CHECK:STDOUT: call void @_CCallF.Main.37b67b83fe9ed3dd(ptr %b, ptr %a), !dbg !133 +// CHECK:STDOUT: call void @_CCallF.Main.7096323a0fb88cc3(ptr %b, ptr %b), !dbg !136 +// CHECK:STDOUT: ret void, !dbg !137 // 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 !133 { +// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.2877a42045e01a3b(ptr %x, ptr %y) #0 !dbg !139 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @_CF.Main(ptr %x, ptr %y), !dbg !140 -// CHECK:STDOUT: ret void, !dbg !141 +// CHECK:STDOUT: call void @_CF.Main(ptr %x, ptr %y), !dbg !146 +// CHECK:STDOUT: ret void, !dbg !147 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.d01354a0ad5f3687(ptr %x, ptr %y) #0 !dbg !143 { +// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.d01354a0ad5f3687(ptr %x, ptr %y) #0 !dbg !149 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.9745c1.4.temp = alloca {}, align 1, !dbg !149 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.4.temp), !dbg !149 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.4.temp, ptr %y), !dbg !149 -// CHECK:STDOUT: call void @_CF.Main(ptr %x, ptr %.9745c1.4.temp), !dbg !150 -// CHECK:STDOUT: ret void, !dbg !151 +// CHECK:STDOUT: %.9745c1.4.temp = alloca {}, align 1, !dbg !155 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.4.temp), !dbg !155 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.4.temp, ptr %y), !dbg !155 +// CHECK:STDOUT: call void @_CF.Main(ptr %x, ptr %.9745c1.4.temp), !dbg !156 +// CHECK:STDOUT: ret void, !dbg !157 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.37b67b83fe9ed3dd(ptr %x, ptr %y) #0 !dbg !153 { +// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.37b67b83fe9ed3dd(ptr %x, ptr %y) #0 !dbg !159 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.9745c1.3.temp = alloca {}, align 1, !dbg !158 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.3.temp), !dbg !158 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.3.temp, ptr %x), !dbg !158 -// CHECK:STDOUT: call void @_CF.Main(ptr %.9745c1.3.temp, ptr %y), !dbg !160 -// CHECK:STDOUT: ret void, !dbg !161 +// CHECK:STDOUT: %.9745c1.3.temp = alloca {}, align 1, !dbg !164 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.3.temp), !dbg !164 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.3.temp, ptr %x), !dbg !164 +// CHECK:STDOUT: call void @_CF.Main(ptr %.9745c1.3.temp, ptr %y), !dbg !166 +// CHECK:STDOUT: ret void, !dbg !167 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.7096323a0fb88cc3(ptr %x, ptr %y) #0 !dbg !163 { +// CHECK:STDOUT: define linkonce_odr void @_CCallF.Main.7096323a0fb88cc3(ptr %x, ptr %y) #0 !dbg !169 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.9745c1.1.temp = alloca {}, align 1, !dbg !168 -// CHECK:STDOUT: %.9745c1.2.temp = alloca {}, align 1, !dbg !169 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.1.temp), !dbg !168 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.1.temp, ptr %x), !dbg !168 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.2.temp), !dbg !169 -// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.2.temp, ptr %y), !dbg !169 -// CHECK:STDOUT: call void @_CF.Main(ptr %.9745c1.1.temp, ptr %.9745c1.2.temp), !dbg !170 -// CHECK:STDOUT: ret void, !dbg !171 +// CHECK:STDOUT: %.9745c1.1.temp = alloca {}, align 1, !dbg !174 +// CHECK:STDOUT: %.9745c1.2.temp = alloca {}, align 1, !dbg !175 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.1.temp), !dbg !174 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.1.temp, ptr %x), !dbg !174 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.9745c1.2.temp), !dbg !175 +// CHECK:STDOUT: call void @"_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core"(ptr %.9745c1.2.temp, ptr %y), !dbg !175 +// CHECK:STDOUT: call void @_CF.Main(ptr %.9745c1.1.temp, ptr %.9745c1.2.temp), !dbg !176 +// CHECK:STDOUT: ret void, !dbg !177 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -465,7 +453,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 = !{!104} +// CHECK:STDOUT: !llvm.dbg.cu = !{!110} // CHECK:STDOUT: !llvm.module.flags = !{!2, !3} // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} @@ -473,49 +461,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: !103 = !DIFile(filename: "no_merge_convert_one_arg.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: !105 = !{null, !24, !24} -// CHECK:STDOUT: !106 = !DISubroutineType(types: !105) -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core", scope: null, file: !103, line: 6, type: !28, spFlags: DISPFlagDefinition, unit: !104, retainedNodes: !113) -// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !24) -// CHECK:STDOUT: !112 = !DILocation(line: 6, column: 36, scope: !107) -// CHECK:STDOUT: !113 = !{!108} -// CHECK:STDOUT: !114 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !103, line: 16, type: !106, spFlags: DISPFlagDefinition, unit: !104, retainedNodes: !132) -// CHECK:STDOUT: !115 = !DILocalVariable(arg: 1, scope: !114, type: !24) -// CHECK:STDOUT: !116 = !DILocalVariable(arg: 2, scope: !114, type: !24) -// CHECK:STDOUT: !121 = !DILocation(line: 17, column: 3, scope: !114) -// CHECK:STDOUT: !124 = !DILocation(line: 18, column: 3, scope: !114) -// CHECK:STDOUT: !127 = !DILocation(line: 19, column: 3, scope: !114) -// CHECK:STDOUT: !130 = !DILocation(line: 20, column: 3, scope: !114) -// CHECK:STDOUT: !131 = !DILocation(line: 16, column: 1, scope: !114) -// CHECK:STDOUT: !132 = !{!115, !116} -// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.2877a42045e01a3b", scope: null, file: !103, line: 12, type: !106, spFlags: DISPFlagDefinition, unit: !104, retainedNodes: !142) -// CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !24) -// CHECK:STDOUT: !135 = !DILocalVariable(arg: 2, scope: !133, type: !24) -// CHECK:STDOUT: !140 = !DILocation(line: 13, column: 3, scope: !133) -// CHECK:STDOUT: !141 = !DILocation(line: 12, column: 1, scope: !133) -// CHECK:STDOUT: !142 = !{!134, !135} -// CHECK:STDOUT: !143 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.d01354a0ad5f3687", scope: null, file: !103, line: 12, type: !106, spFlags: DISPFlagDefinition, unit: !104, retainedNodes: !152) -// CHECK:STDOUT: !144 = !DILocalVariable(arg: 1, scope: !143, type: !24) -// CHECK:STDOUT: !145 = !DILocalVariable(arg: 2, scope: !143, type: !24) -// CHECK:STDOUT: !149 = !DILocation(line: 13, column: 8, scope: !143) -// CHECK:STDOUT: !150 = !DILocation(line: 13, column: 3, scope: !143) -// CHECK:STDOUT: !151 = !DILocation(line: 12, column: 1, scope: !143) -// CHECK:STDOUT: !152 = !{!144, !145} -// CHECK:STDOUT: !153 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.37b67b83fe9ed3dd", scope: null, file: !103, line: 12, type: !106, spFlags: DISPFlagDefinition, unit: !104, retainedNodes: !162) -// CHECK:STDOUT: !154 = !DILocalVariable(arg: 1, scope: !153, type: !24) -// CHECK:STDOUT: !155 = !DILocalVariable(arg: 2, scope: !153, type: !24) -// CHECK:STDOUT: !158 = !DILocation(line: 13, column: 5, scope: !153) -// CHECK:STDOUT: !160 = !DILocation(line: 13, column: 3, scope: !153) -// CHECK:STDOUT: !161 = !DILocation(line: 12, column: 1, scope: !153) -// CHECK:STDOUT: !162 = !{!154, !155} -// CHECK:STDOUT: !163 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.7096323a0fb88cc3", scope: null, file: !103, line: 12, type: !106, spFlags: DISPFlagDefinition, unit: !104, retainedNodes: !172) -// CHECK:STDOUT: !164 = !DILocalVariable(arg: 1, scope: !163, type: !24) -// CHECK:STDOUT: !165 = !DILocalVariable(arg: 2, scope: !163, type: !24) -// CHECK:STDOUT: !168 = !DILocation(line: 13, column: 5, scope: !163) -// CHECK:STDOUT: !169 = !DILocation(line: 13, column: 8, scope: !163) -// CHECK:STDOUT: !170 = !DILocation(line: 13, column: 3, scope: !163) -// CHECK:STDOUT: !171 = !DILocation(line: 12, column: 1, scope: !163) -// CHECK:STDOUT: !172 = !{!164, !165} +// CHECK:STDOUT: !109 = !DIFile(filename: "no_merge_convert_one_arg.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 = !{null, !24, !24} +// CHECK:STDOUT: !112 = !DISubroutineType(types: !111) +// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.B.Main:ImplicitAs.bd4fb75a414fe858.Core", scope: null, file: !109, line: 6, type: !28, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !119) +// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !24) +// CHECK:STDOUT: !118 = !DILocation(line: 6, column: 36, scope: !113) +// CHECK:STDOUT: !119 = !{!114} +// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "CallCallF", linkageName: "_CCallCallF.Main", scope: null, file: !109, line: 16, type: !112, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !138) +// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !24) +// CHECK:STDOUT: !122 = !DILocalVariable(arg: 2, scope: !120, type: !24) +// CHECK:STDOUT: !127 = !DILocation(line: 17, column: 3, scope: !120) +// CHECK:STDOUT: !130 = !DILocation(line: 18, column: 3, scope: !120) +// CHECK:STDOUT: !133 = !DILocation(line: 19, column: 3, scope: !120) +// CHECK:STDOUT: !136 = !DILocation(line: 20, column: 3, scope: !120) +// CHECK:STDOUT: !137 = !DILocation(line: 16, column: 1, scope: !120) +// CHECK:STDOUT: !138 = !{!121, !122} +// CHECK:STDOUT: !139 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.2877a42045e01a3b", scope: null, file: !109, line: 12, type: !112, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !148) +// CHECK:STDOUT: !140 = !DILocalVariable(arg: 1, scope: !139, type: !24) +// CHECK:STDOUT: !141 = !DILocalVariable(arg: 2, scope: !139, type: !24) +// CHECK:STDOUT: !146 = !DILocation(line: 13, column: 3, scope: !139) +// CHECK:STDOUT: !147 = !DILocation(line: 12, column: 1, scope: !139) +// CHECK:STDOUT: !148 = !{!140, !141} +// CHECK:STDOUT: !149 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.d01354a0ad5f3687", scope: null, file: !109, line: 12, type: !112, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !158) +// CHECK:STDOUT: !150 = !DILocalVariable(arg: 1, scope: !149, type: !24) +// CHECK:STDOUT: !151 = !DILocalVariable(arg: 2, scope: !149, type: !24) +// CHECK:STDOUT: !155 = !DILocation(line: 13, column: 8, scope: !149) +// CHECK:STDOUT: !156 = !DILocation(line: 13, column: 3, scope: !149) +// CHECK:STDOUT: !157 = !DILocation(line: 12, column: 1, scope: !149) +// CHECK:STDOUT: !158 = !{!150, !151} +// CHECK:STDOUT: !159 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.37b67b83fe9ed3dd", scope: null, file: !109, line: 12, type: !112, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !168) +// CHECK:STDOUT: !160 = !DILocalVariable(arg: 1, scope: !159, type: !24) +// CHECK:STDOUT: !161 = !DILocalVariable(arg: 2, scope: !159, type: !24) +// CHECK:STDOUT: !164 = !DILocation(line: 13, column: 5, scope: !159) +// CHECK:STDOUT: !166 = !DILocation(line: 13, column: 3, scope: !159) +// CHECK:STDOUT: !167 = !DILocation(line: 12, column: 1, scope: !159) +// CHECK:STDOUT: !168 = !{!160, !161} +// CHECK:STDOUT: !169 = distinct !DISubprogram(name: "CallF", linkageName: "_CCallF.Main.7096323a0fb88cc3", scope: null, file: !109, line: 12, type: !112, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !178) +// CHECK:STDOUT: !170 = !DILocalVariable(arg: 1, scope: !169, type: !24) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 2, scope: !169, type: !24) +// CHECK:STDOUT: !174 = !DILocation(line: 13, column: 5, scope: !169) +// CHECK:STDOUT: !175 = !DILocation(line: 13, column: 8, scope: !169) +// CHECK:STDOUT: !176 = !DILocation(line: 13, column: 3, scope: !169) +// CHECK:STDOUT: !177 = !DILocation(line: 12, column: 1, scope: !169) +// CHECK:STDOUT: !178 = !{!170, !171} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/access/element_access.carbon b/toolchain/lower/testdata/tuple/access/element_access.carbon index df030123ba58..2c506d508dfd 100644 --- a/toolchain/lower/testdata/tuple/access/element_access.carbon +++ b/toolchain/lower/testdata/tuple/access/element_access.carbon @@ -21,67 +21,65 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'element_access.carbon' // CHECK:STDOUT: source_filename = "element_access.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @tuple.016.loc14_3 = internal constant { i32, i32, i32 } { i32 0, i32 1, i32 2 } +// CHECK:STDOUT: @tuple.016.loc14_3.1 = internal constant { i32, i32, i32 } { i32 0, i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !28 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 4, !dbg !31 -// CHECK:STDOUT: %_.var.loc15 = alloca i32, align 4, !dbg !34 -// CHECK:STDOUT: %_.var.loc16 = alloca i32, align 4, !dbg !37 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !31 -// CHECK:STDOUT: %tuple.elem0.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !32 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !32 -// CHECK:STDOUT: %tuple.elem2.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !32 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.016.loc14_3, i64 12, i1 false), !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !34 -// CHECK:STDOUT: %tuple.elem0.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !35 -// CHECK:STDOUT: %.loc15 = load i32, ptr %tuple.elem0.loc15.tuple.elem, align 4, !dbg !35 -// CHECK:STDOUT: store i32 %.loc15, ptr %_.var.loc15, align 4, !dbg !34 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !37 -// CHECK:STDOUT: %tuple.elem2.loc16.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !38 -// CHECK:STDOUT: %.loc16 = load i32, ptr %tuple.elem2.loc16.tuple.elem, align 4, !dbg !38 -// CHECK:STDOUT: store i32 %.loc16, ptr %_.var.loc16, align 4, !dbg !37 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var.loc16), !dbg !37 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var.loc15), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %a.var), !dbg !31 +// CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 4, !dbg !29 +// CHECK:STDOUT: %_.var.loc15 = alloca i32, align 4, !dbg !32 +// CHECK:STDOUT: %_.var.loc16 = alloca i32, align 4, !dbg !35 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !29 +// CHECK:STDOUT: %tuple.elem0.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !30 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !30 +// CHECK:STDOUT: %tuple.elem2.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !30 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.016.loc14_3.1, i64 12, i1 false), !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !32 +// CHECK:STDOUT: %tuple.elem0.loc15.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: %.loc15_17 = load i32, ptr %tuple.elem0.loc15.tuple.elem, align 4, !dbg !33 +// CHECK:STDOUT: store i32 %.loc15_17, ptr %_.var.loc15, align 4, !dbg !32 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !35 +// CHECK:STDOUT: %tuple.elem2.loc16.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !36 +// CHECK:STDOUT: %.loc16_17 = load i32, ptr %tuple.elem2.loc16.tuple.elem, align 4, !dbg !36 +// CHECK:STDOUT: store i32 %.loc16_17, ptr %_.var.loc16, align 4, !dbg !35 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var.loc16), !dbg !35 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var.loc15), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %a.var), !dbg !29 // CHECK:STDOUT: ret i32 0, !dbg !40 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem2.tuple.elem), !dbg !43 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !43 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !43 // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !47 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !47 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !47 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !47 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !49 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.abce894028f59bc0: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !45 { +// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %t) #0 !dbg !52 { +// CHECK:STDOUT: call void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %t), !dbg !56 +// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", { 0, 1, 2, 4, 3 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 4, 3, 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -91,34 +89,36 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "element_access.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !26 = !{null, !25} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 3, scope: !28) -// CHECK:STDOUT: !32 = !DILocation(line: 14, column: 28, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 3, scope: !28) -// CHECK:STDOUT: !35 = !DILocation(line: 15, column: 16, scope: !28) -// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 3, scope: !28) -// CHECK:STDOUT: !38 = !DILocation(line: 16, column: 16, scope: !28) -// CHECK:STDOUT: !40 = !DILocation(line: 17, column: 3, scope: !28) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 16, type: !24, 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: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{null, !23} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 14, column: 3, scope: !26) +// CHECK:STDOUT: !30 = !DILocation(line: 14, column: 28, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 15, column: 3, scope: !26) +// CHECK:STDOUT: !33 = !DILocation(line: 15, column: 16, scope: !26) +// CHECK:STDOUT: !35 = !DILocation(line: 16, column: 3, scope: !26) +// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 16, scope: !26) +// CHECK:STDOUT: !38 = !{null, !20} +// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) +// CHECK:STDOUT: !40 = !DILocation(line: 17, column: 3, scope: !26) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.abce894028f59bc0:core.SubobjectDestroy.Core", scope: null, file: !18, line: 14, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !23) +// CHECK:STDOUT: !43 = !DILocation(line: 14, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core", scope: null, file: !18, line: 14, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) -// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !25) -// CHECK:STDOUT: !47 = !DILocation(line: 14, column: 3, scope: !45) -// CHECK:STDOUT: !48 = !{!46} -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.abce894028f59bc0: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: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !39, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) +// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !20) +// CHECK:STDOUT: !50 = !DILocation(line: 32, column: 1, scope: !45) +// CHECK:STDOUT: !51 = !{!46} +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6e65c86a129b7677", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !23) +// CHECK:STDOUT: !56 = !DILocation(line: 34, column: 5, scope: !52) +// CHECK:STDOUT: !57 = !DILocation(line: 32, column: 1, scope: !52) +// CHECK:STDOUT: !58 = !{!53} // 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 194442f0ea1c..2cdcb3a3dbb4 100644 --- a/toolchain/lower/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/lower/testdata/tuple/access/return_value_access.carbon @@ -23,61 +23,60 @@ fn Run() { // CHECK:STDOUT: @tuple.311.loc13_39 = internal constant { i32, i32 } { i32 12, i32 24 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !30 { +// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32 }) %return) #0 !dbg !28 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !33 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !33 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.311.loc13_39, i64 8, i1 false), !dbg !34 -// CHECK:STDOUT: ret void, !dbg !34 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !31 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !31 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.311.loc13_39, i64 8, i1 false), !dbg !32 +// CHECK:STDOUT: ret void, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !35 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !33 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !36 -// CHECK:STDOUT: %.loc16_18.1.temp = alloca { i32, i32 }, align 4, !dbg !37 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !36 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc16_18.1.temp), !dbg !37 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_18.1.temp), !dbg !37 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc16_18.1.temp, i32 0, i32 1, !dbg !37 -// CHECK:STDOUT: %.loc16_19 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !37 -// CHECK:STDOUT: store i32 %.loc16_19, ptr %_.var, align 4, !dbg !36 -// CHECK:STDOUT: call void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %.loc16_18.1.temp), !dbg !37 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %_.var), !dbg !36 +// CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !34 +// CHECK:STDOUT: %.loc16_18.1.temp = alloca { i32, i32 }, align 4, !dbg !35 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !34 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc16_18.1.temp), !dbg !35 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_18.1.temp), !dbg !35 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc16_18.1.temp, i32 0, i32 1, !dbg !35 +// CHECK:STDOUT: %.loc16_19 = load i32, ptr %tuple.elem1.tuple.elem, align 4, !dbg !35 +// CHECK:STDOUT: store i32 %.loc16_19, ptr %_.var, align 4, !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %.loc16_18.1.temp), !dbg !35 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %_.var), !dbg !34 // CHECK:STDOUT: ret i32 0, !dbg !39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !40 { +// CHECK:STDOUT: define weak_odr void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !40 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !42 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !42 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !42 // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !44 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !46 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !46 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !46 -// CHECK:STDOUT: ret void, !dbg !46 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !48 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.35f6012581c5aabb: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.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1 // 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 @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %t) #0 !dbg !44 { +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %t), !dbg !48 +// CHECK:STDOUT: ret void, !dbg !49 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !51 { +// CHECK:STDOUT: ret void, !dbg !56 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -87,6 +86,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "return_value_access.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -95,27 +95,28 @@ fn Run() { // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{!20} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !26 = !{null, !21} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !21} -// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !33 = !DILocation(line: 13, column: 31, scope: !30) -// CHECK:STDOUT: !34 = !DILocation(line: 13, column: 24, scope: !30) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 3, scope: !35) -// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 16, scope: !35) -// CHECK:STDOUT: !39 = !DILocation(line: 15, column: 1, scope: !35) -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946: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: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 13, type: !23, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !31 = !DILocation(line: 13, column: 31, scope: !28) +// CHECK:STDOUT: !32 = !DILocation(line: 13, column: 24, scope: !28) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 3, scope: !33) +// CHECK:STDOUT: !35 = !DILocation(line: 16, column: 16, scope: !33) +// CHECK:STDOUT: !37 = !{null, !20} +// CHECK:STDOUT: !38 = !DISubroutineType(types: !37) +// CHECK:STDOUT: !39 = !DILocation(line: 15, column: 1, scope: !33) +// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "Op", linkageName: "_COp.35f6012581c5aabb:core.SubobjectDestroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !43) +// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !21) // CHECK:STDOUT: !42 = !DILocation(line: 16, column: 16, scope: !40) // CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ffbc82e0019b7bf2", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !50) // CHECK:STDOUT: !45 = !DILocalVariable(arg: 1, scope: !44, type: !21) -// CHECK:STDOUT: !46 = !DILocation(line: 16, column: 16, scope: !44) -// CHECK:STDOUT: !47 = !{!45} -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35f6012581c5aabb: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: !48 = !DILocation(line: 34, column: 5, scope: !44) +// CHECK:STDOUT: !49 = !DILocation(line: 32, column: 1, scope: !44) +// CHECK:STDOUT: !50 = !{!45} +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !57) +// CHECK:STDOUT: !52 = !DILocalVariable(arg: 1, scope: !51, type: !20) +// CHECK:STDOUT: !56 = !DILocation(line: 32, column: 1, scope: !51) +// CHECK:STDOUT: !57 = !{!52} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/empty.carbon b/toolchain/lower/testdata/tuple/empty.carbon index e96e4083a561..da2a4f97dae3 100644 --- a/toolchain/lower/testdata/tuple/empty.carbon +++ b/toolchain/lower/testdata/tuple/empty.carbon @@ -21,29 +21,28 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "empty.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !26 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca {}, align 1, !dbg !29 -// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !29 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !31 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %_.var), !dbg !31 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %x.var), !dbg !29 +// CHECK:STDOUT: %x.var = alloca {}, align 1, !dbg !26 +// CHECK:STDOUT: %_.var = alloca {}, align 1, !dbg !28 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !26 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %_.var), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %x.var), !dbg !26 // CHECK:STDOUT: ret i32 0, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.61ea2aba74ab3bf1: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: 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 @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %t) #0 !dbg !35 { +// CHECK:STDOUT: ret void, !dbg !40 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9045abb8230cbcdf, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -53,20 +52,21 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "empty.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !24 = !{null, !23} -// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !29 = !DILocation(line: 14, column: 3, scope: !26) -// CHECK:STDOUT: !31 = !DILocation(line: 15, column: 3, scope: !26) -// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 3, scope: !26) -// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !38) -// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !23) -// CHECK:STDOUT: !37 = !DILocation(line: 15, column: 3, scope: !35) -// CHECK:STDOUT: !38 = !{!36} +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !26 = !DILocation(line: 14, column: 3, scope: !23) +// CHECK:STDOUT: !28 = !DILocation(line: 15, column: 3, scope: !23) +// CHECK:STDOUT: !31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !32 = !{null, !31} +// CHECK:STDOUT: !33 = !DISubroutineType(types: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 3, scope: !23) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9045abb8230cbcdf", scope: null, file: !10, line: 32, type: !33, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !31) +// CHECK:STDOUT: !40 = !DILocation(line: 32, column: 1, scope: !35) +// CHECK:STDOUT: !41 = !{!36} // 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 231d2f363021..4c2b67ce3144 100644 --- a/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon @@ -23,63 +23,64 @@ fn G() { // CHECK:STDOUT: declare void @_CF.Main(ptr sret({ i32, i32, i32 })) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !30 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !28 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %_.var = alloca { { i32, i32, i32 }, { i32, i32, i32 } }, align 4, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !31 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %_.var, i32 0, i32 0, !dbg !32 -// CHECK:STDOUT: call void @_CF.Main(ptr %tuple.elem0.tuple.elem), !dbg !33 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %_.var, i32 0, i32 1, !dbg !32 -// CHECK:STDOUT: call void @_CF.Main(ptr %tuple.elem1.tuple.elem), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.8605a76b45534435:core.Destroy.Core"(ptr %_.var), !dbg !31 -// CHECK:STDOUT: ret void, !dbg !36 +// CHECK:STDOUT: %_.var = alloca { { i32, i32, i32 }, { i32, i32, i32 } }, align 4, !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !29 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %_.var, i32 0, i32 0, !dbg !30 +// CHECK:STDOUT: call void @_CF.Main(ptr %tuple.elem0.tuple.elem), !dbg !31 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %_.var, i32 0, i32 1, !dbg !30 +// CHECK:STDOUT: call void @_CF.Main(ptr %tuple.elem1.tuple.elem), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.590cf19eebb77c38(ptr %_.var), !dbg !29 +// CHECK:STDOUT: ret void, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !37 { +// CHECK:STDOUT: define weak_odr void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !35 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !39 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem2.tuple.elem), !dbg !37 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !37 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !37 +// CHECK:STDOUT: ret void, !dbg !37 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define weak_odr void @"_COp.8605a76b45534435:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !43 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !43 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !43 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %tuple.elem1.tuple.elem), !dbg !43 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !43 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %tuple.elem0.tuple.elem), !dbg !43 // CHECK:STDOUT: ret void, !dbg !43 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.abce894028f59bc0: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.8605a76b45534435:core.Destroy.Core"(ptr %self) #0 !dbg !49 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %self, i32 0, i32 1, !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !51 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %self, i32 0, i32 0, !dbg !51 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !51 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8605a76b45534435:core.Destroy.Core"(ptr %self) #0 !dbg !53 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.8605a76b45534435: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 @_CSelfDestruct.Core.590cf19eebb77c38(ptr %t) #0 !dbg !45 { +// CHECK:STDOUT: call void @"_COp.8605a76b45534435:core.SubobjectDestroy.Core"(ptr %t), !dbg !49 +// CHECK:STDOUT: ret void, !dbg !50 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !52 { +// CHECK:STDOUT: ret void, !dbg !57 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %t) #0 !dbg !59 { +// CHECK:STDOUT: call void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %t), !dbg !63 +// CHECK:STDOUT: ret void, !dbg !64 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; uselistorder directives +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6e65c86a129b7677, { 1, 0 } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -88,40 +89,43 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "nested_tuple_in_place.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} +// CHECK:STDOUT: !26 = !{null, !21} // CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = !{null, !21} -// CHECK:STDOUT: !29 = !DISubroutineType(types: !28) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 3, scope: !30) -// CHECK:STDOUT: !32 = !DILocation(line: 16, column: 47, scope: !30) -// CHECK:STDOUT: !33 = !DILocation(line: 16, column: 48, scope: !30) -// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 53, scope: !30) -// CHECK:STDOUT: !36 = !DILocation(line: 15, column: 1, scope: !30) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) -// 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.abce894028f59bc0:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) +// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 16, column: 3, scope: !28) +// CHECK:STDOUT: !30 = !DILocation(line: 16, column: 47, scope: !28) +// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 48, scope: !28) +// CHECK:STDOUT: !32 = !DILocation(line: 16, column: 53, scope: !28) +// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 1, scope: !28) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.abce894028f59bc0:core.SubobjectDestroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !21) +// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 3, scope: !35) +// CHECK:STDOUT: !38 = !{null, !20} +// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) +// CHECK:STDOUT: !40 = !{!36} +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "Op", linkageName: "_COp.8605a76b45534435:core.SubobjectDestroy.Core", scope: null, file: !18, line: 16, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) // CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !21) // CHECK:STDOUT: !43 = !DILocation(line: 16, column: 3, scope: !41) // CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.abce894028f59bc0:core.Destroy.Core", scope: null, file: !18, line: 16, type: !29, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.590cf19eebb77c38", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !51) // 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.8605a76b45534435: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.8605a76b45534435: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: !49 = !DILocation(line: 34, column: 5, scope: !45) +// CHECK:STDOUT: !50 = !DILocation(line: 32, column: 1, scope: !45) +// CHECK:STDOUT: !51 = !{!46} +// CHECK:STDOUT: !52 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !39, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !58) +// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !52, type: !20) +// CHECK:STDOUT: !57 = !DILocation(line: 32, column: 1, scope: !52) +// CHECK:STDOUT: !58 = !{!53} +// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6e65c86a129b7677", scope: null, file: !10, line: 32, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !65) +// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !21) +// CHECK:STDOUT: !63 = !DILocation(line: 34, column: 5, scope: !59) +// CHECK:STDOUT: !64 = !DILocation(line: 32, column: 1, scope: !59) +// CHECK:STDOUT: !65 = !{!60} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/one_entry.carbon b/toolchain/lower/testdata/tuple/one_entry.carbon index 22b6205fa7d0..585ce172f85e 100644 --- a/toolchain/lower/testdata/tuple/one_entry.carbon +++ b/toolchain/lower/testdata/tuple/one_entry.carbon @@ -21,49 +21,47 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "one_entry.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !28 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca { i32 }, align 4, !dbg !31 -// CHECK:STDOUT: %_.var = alloca { i32 }, align 4, !dbg !33 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !31 -// CHECK:STDOUT: store { i32 } { i32 1 }, ptr %x.var, align 4, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !33 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !34 -// CHECK:STDOUT: %.loc15_20.1 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !34 -// CHECK:STDOUT: %.loc15_20.2.tuple.init = insertvalue { i32 } poison, i32 %.loc15_20.1, 0, !dbg !34 -// CHECK:STDOUT: store { i32 } %.loc15_20.2.tuple.init, ptr %_.var, align 4, !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.294984b7f996c3ff:core.Destroy.Core"(ptr %_.var), !dbg !33 -// CHECK:STDOUT: call void @"_CSelfDestruct.294984b7f996c3ff:core.Destroy.Core"(ptr %x.var), !dbg !31 -// CHECK:STDOUT: ret i32 0, !dbg !36 +// CHECK:STDOUT: %x.var = alloca { i32 }, align 4, !dbg !29 +// CHECK:STDOUT: %_.var = alloca { i32 }, align 4, !dbg !31 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !29 +// CHECK:STDOUT: store { i32 } { i32 1 }, ptr %x.var, align 4, !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !31 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32 }, ptr %x.var, i32 0, i32 0, !dbg !32 +// CHECK:STDOUT: %.loc15_20.1 = load i32, ptr %tuple.elem0.tuple.elem, align 4, !dbg !32 +// CHECK:STDOUT: %.loc15_20.2.tuple.init = insertvalue { i32 } poison, i32 %.loc15_20.1, 0, !dbg !32 +// CHECK:STDOUT: store { i32 } %.loc15_20.2.tuple.init, ptr %_.var, align 4, !dbg !31 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4635d7e6af44e91a(ptr %_.var), !dbg !31 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4635d7e6af44e91a(ptr %x.var), !dbg !29 +// CHECK:STDOUT: ret i32 0, !dbg !34 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !37 { +// CHECK:STDOUT: define weak_odr void @"_COp.294984b7f996c3ff:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !35 { // 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.294984b7f996c3ff:core.Destroy.Core"(ptr %self) #0 !dbg !41 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !43 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !43 -// CHECK:STDOUT: ret void, !dbg !43 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.294984b7f996c3ff:core.Destroy.Core"(ptr %self) #0 !dbg !45 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.294984b7f996c3ff:core.Destroy.Core"(ptr %self), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !37 +// CHECK:STDOUT: ret void, !dbg !37 // 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 @_CSelfDestruct.Core.4635d7e6af44e91a(ptr %t) #0 !dbg !41 { +// CHECK:STDOUT: call void @"_COp.294984b7f996c3ff:core.SubobjectDestroy.Core"(ptr %t), !dbg !45 +// CHECK:STDOUT: ret void, !dbg !46 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !48 { +// CHECK:STDOUT: ret void, !dbg !53 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.294984b7f996c3ff:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.4635d7e6af44e91a, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -73,31 +71,33 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "one_entry.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !26 = !{null, !25} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 3, scope: !28) -// CHECK:STDOUT: !33 = !DILocation(line: 15, column: 3, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 20, scope: !28) -// CHECK:STDOUT: !36 = !DILocation(line: 16, column: 3, scope: !28) -// CHECK:STDOUT: !37 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) -// 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.294984b7f996c3ff:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !44) -// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !25) -// CHECK:STDOUT: !43 = !DILocation(line: 15, column: 3, scope: !41) -// CHECK:STDOUT: !44 = !{!42} -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.294984b7f996c3ff: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: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{null, !23} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 14, column: 3, scope: !26) +// CHECK:STDOUT: !31 = !DILocation(line: 15, column: 3, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 15, column: 20, scope: !26) +// CHECK:STDOUT: !34 = !DILocation(line: 16, column: 3, scope: !26) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "Op", linkageName: "_COp.294984b7f996c3ff:core.SubobjectDestroy.Core", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !40) +// CHECK:STDOUT: !36 = !DILocalVariable(arg: 1, scope: !35, type: !23) +// CHECK:STDOUT: !37 = !DILocation(line: 15, column: 3, scope: !35) +// CHECK:STDOUT: !38 = !{null, !20} +// CHECK:STDOUT: !39 = !DISubroutineType(types: !38) +// CHECK:STDOUT: !40 = !{!36} +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4635d7e6af44e91a", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !47) +// CHECK:STDOUT: !42 = !DILocalVariable(arg: 1, scope: !41, type: !23) +// CHECK:STDOUT: !45 = !DILocation(line: 34, column: 5, scope: !41) +// CHECK:STDOUT: !46 = !DILocation(line: 32, column: 1, scope: !41) +// CHECK:STDOUT: !47 = !{!42} +// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !39, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !54) +// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !20) +// CHECK:STDOUT: !53 = !DILocation(line: 32, column: 1, scope: !48) +// CHECK:STDOUT: !54 = !{!49} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/two_entries.carbon b/toolchain/lower/testdata/tuple/two_entries.carbon index b50fb89aa017..8f652146c92f 100644 --- a/toolchain/lower/testdata/tuple/two_entries.carbon +++ b/toolchain/lower/testdata/tuple/two_entries.carbon @@ -20,52 +20,39 @@ fn Run() -> i32 { // CHECK:STDOUT: ; ModuleID = 'two_entries.carbon' // CHECK:STDOUT: source_filename = "two_entries.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @tuple.fbf.loc14_3 = internal constant { i32, i32 } { i32 12, i32 7 } +// CHECK:STDOUT: @tuple.fbf.loc14_3.1 = internal constant { i32, i32 } { i32 12, i32 7 } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !28 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca { i32, i32 }, align 4, !dbg !31 -// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !34 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !31 -// CHECK:STDOUT: %tuple.elem0.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !32 -// CHECK:STDOUT: %tuple.elem1.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !32 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @tuple.fbf.loc14_3, i64 8, i1 false), !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !34 -// CHECK:STDOUT: %tuple.elem0.loc15_23.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !35 -// CHECK:STDOUT: %.loc15_23.1 = load i32, ptr %tuple.elem0.loc15_23.1.tuple.elem, align 4, !dbg !35 -// CHECK:STDOUT: %tuple.elem0.loc15_23.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %_.var, i32 0, i32 0, !dbg !35 -// CHECK:STDOUT: store i32 %.loc15_23.1, ptr %tuple.elem0.loc15_23.2.tuple.elem, align 4, !dbg !35 -// CHECK:STDOUT: %tuple.elem1.loc15_23.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !35 -// CHECK:STDOUT: %.loc15_23.3 = load i32, ptr %tuple.elem1.loc15_23.1.tuple.elem, align 4, !dbg !35 -// CHECK:STDOUT: %tuple.elem1.loc15_23.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %_.var, i32 0, i32 1, !dbg !35 -// CHECK:STDOUT: store i32 %.loc15_23.3, ptr %tuple.elem1.loc15_23.2.tuple.elem, align 4, !dbg !35 -// CHECK:STDOUT: call void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %_.var), !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %x.var), !dbg !31 -// CHECK:STDOUT: ret i32 0, !dbg !37 +// CHECK:STDOUT: %x.var = alloca { i32, i32 }, align 4, !dbg !29 +// CHECK:STDOUT: %_.var = alloca { i32, i32 }, align 4, !dbg !32 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !29 +// CHECK:STDOUT: %tuple.elem0.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !30 +// CHECK:STDOUT: %tuple.elem1.loc14.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !30 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %x.var, ptr align 4 @tuple.fbf.loc14_3.1, i64 8, i1 false), !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !32 +// CHECK:STDOUT: %tuple.elem0.loc15_23.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: %.loc15_23.1 = load i32, ptr %tuple.elem0.loc15_23.1.tuple.elem, align 4, !dbg !33 +// CHECK:STDOUT: %tuple.elem0.loc15_23.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %_.var, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: store i32 %.loc15_23.1, ptr %tuple.elem0.loc15_23.2.tuple.elem, align 4, !dbg !33 +// CHECK:STDOUT: %tuple.elem1.loc15_23.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !33 +// CHECK:STDOUT: %.loc15_23.3 = load i32, ptr %tuple.elem1.loc15_23.1.tuple.elem, align 4, !dbg !33 +// CHECK:STDOUT: %tuple.elem1.loc15_23.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %_.var, i32 0, i32 1, !dbg !33 +// CHECK:STDOUT: store i32 %.loc15_23.3, ptr %tuple.elem1.loc15_23.2.tuple.elem, align 4, !dbg !33 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %_.var), !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %x.var), !dbg !29 +// CHECK:STDOUT: ret i32 0, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !38 { +// CHECK:STDOUT: define weak_odr void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !36 { // 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.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !42 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !44 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !44 -// CHECK:STDOUT: ret void, !dbg !44 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core"(ptr %self) #0 !dbg !46 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.35f6012581c5aabb:core.Destroy.Core"(ptr %self), !dbg !48 -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !38 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 0, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !38 +// CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -74,9 +61,21 @@ fn Run() -> i32 { // 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 @_CSelfDestruct.Core.ffbc82e0019b7bf2(ptr %t) #0 !dbg !42 { +// CHECK:STDOUT: call void @"_COp.35f6012581c5aabb:core.SubobjectDestroy.Core"(ptr %t), !dbg !46 +// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !49 { +// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.35f6012581c5aabb:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.ffbc82e0019b7bf2, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -86,32 +85,34 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "two_entries.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !26 = !{null, !25} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !31 = !DILocation(line: 14, column: 3, scope: !28) -// CHECK:STDOUT: !32 = !DILocation(line: 14, column: 23, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 15, column: 3, scope: !28) -// CHECK:STDOUT: !35 = !DILocation(line: 15, column: 23, scope: !28) -// CHECK:STDOUT: !37 = !DILocation(line: 16, column: 3, scope: !28) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 15, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) -// 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.35f6012581c5aabb:core.Destroy.Core", scope: null, file: !18, line: 15, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) -// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !25) -// CHECK:STDOUT: !44 = !DILocation(line: 15, column: 3, scope: !42) -// CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.35f6012581c5aabb: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: !23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !24 = !{null, !23} +// CHECK:STDOUT: !25 = !DISubroutineType(types: !24) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !29 = !DILocation(line: 14, column: 3, scope: !26) +// CHECK:STDOUT: !30 = !DILocation(line: 14, column: 23, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 15, column: 3, scope: !26) +// CHECK:STDOUT: !33 = !DILocation(line: 15, column: 23, scope: !26) +// CHECK:STDOUT: !35 = !DILocation(line: 16, column: 3, scope: !26) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.35f6012581c5aabb:core.SubobjectDestroy.Core", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) +// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !23) +// CHECK:STDOUT: !38 = !DILocation(line: 15, column: 3, scope: !36) +// CHECK:STDOUT: !39 = !{null, !20} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !{!37} +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.ffbc82e0019b7bf2", scope: null, file: !10, line: 32, type: !25, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) +// CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !23) +// CHECK:STDOUT: !46 = !DILocation(line: 34, column: 5, scope: !42) +// CHECK:STDOUT: !47 = !DILocation(line: 32, column: 1, scope: !42) +// CHECK:STDOUT: !48 = !{!43} +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !40, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) +// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !20) +// CHECK:STDOUT: !54 = !DILocation(line: 32, column: 1, scope: !49) +// CHECK:STDOUT: !55 = !{!50} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/value_formation.carbon b/toolchain/lower/testdata/tuple/value_formation.carbon index 5d8821459539..94bf1f8384b9 100644 --- a/toolchain/lower/testdata/tuple/value_formation.carbon +++ b/toolchain/lower/testdata/tuple/value_formation.carbon @@ -25,83 +25,82 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !28 { +// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !26 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 4, !dbg !29 -// CHECK:STDOUT: %b.var = alloca { i32, i32, i32 }, align 4, !dbg !31 -// CHECK:STDOUT: %tuple.loc18_6 = alloca { i32, i32, i32 }, align 4, !dbg !33 -// CHECK:STDOUT: %tuple.loc18_9 = alloca { i32, i32, i32 }, align 4, !dbg !34 -// CHECK:STDOUT: %tuple.loc18_10 = alloca { ptr, ptr }, align 8, !dbg !35 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !29 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !31 -// CHECK:STDOUT: %tuple.elem0.loc18_6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !33 -// CHECK:STDOUT: %.loc18_6.1 = load i32, ptr %tuple.elem0.loc18_6.tuple.elem, align 4, !dbg !33 -// CHECK:STDOUT: %tuple.elem1.loc18_6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !33 -// CHECK:STDOUT: %.loc18_6.2 = load i32, ptr %tuple.elem1.loc18_6.tuple.elem, align 4, !dbg !33 -// CHECK:STDOUT: %tuple.elem2.loc18_6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !33 -// CHECK:STDOUT: %.loc18_6.3 = load i32, ptr %tuple.elem2.loc18_6.tuple.elem, align 4, !dbg !33 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc18_6), !dbg !33 -// CHECK:STDOUT: %tuple.loc18_61 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_6, i32 0, i32 0, !dbg !33 -// CHECK:STDOUT: store i32 %.loc18_6.1, ptr %tuple.loc18_61, align 4, !dbg !33 -// CHECK:STDOUT: %tuple.loc18_62 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_6, i32 0, i32 1, !dbg !33 -// CHECK:STDOUT: store i32 %.loc18_6.2, ptr %tuple.loc18_62, align 4, !dbg !33 -// CHECK:STDOUT: %tuple.loc18_63 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_6, i32 0, i32 2, !dbg !33 -// CHECK:STDOUT: store i32 %.loc18_6.3, ptr %tuple.loc18_63, align 4, !dbg !33 -// CHECK:STDOUT: %tuple.elem0.loc18_9.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !34 -// CHECK:STDOUT: %.loc18_9.1 = load i32, ptr %tuple.elem0.loc18_9.tuple.elem, align 4, !dbg !34 -// CHECK:STDOUT: %tuple.elem1.loc18_9.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !34 -// CHECK:STDOUT: %.loc18_9.2 = load i32, ptr %tuple.elem1.loc18_9.tuple.elem, align 4, !dbg !34 -// CHECK:STDOUT: %tuple.elem2.loc18_9.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 2, !dbg !34 -// CHECK:STDOUT: %.loc18_9.3 = load i32, ptr %tuple.elem2.loc18_9.tuple.elem, align 4, !dbg !34 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc18_9), !dbg !34 -// CHECK:STDOUT: %tuple.loc18_94 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_9, i32 0, i32 0, !dbg !34 -// CHECK:STDOUT: store i32 %.loc18_9.1, ptr %tuple.loc18_94, align 4, !dbg !34 -// CHECK:STDOUT: %tuple.loc18_95 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_9, i32 0, i32 1, !dbg !34 -// CHECK:STDOUT: store i32 %.loc18_9.2, ptr %tuple.loc18_95, align 4, !dbg !34 -// CHECK:STDOUT: %tuple.loc18_96 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_9, i32 0, i32 2, !dbg !34 -// CHECK:STDOUT: store i32 %.loc18_9.3, ptr %tuple.loc18_96, align 4, !dbg !34 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc18_10), !dbg !35 -// CHECK:STDOUT: %tuple.loc18_107 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc18_10, i32 0, i32 0, !dbg !35 -// CHECK:STDOUT: store ptr %tuple.loc18_6, ptr %tuple.loc18_107, align 8, !dbg !35 -// CHECK:STDOUT: %tuple.loc18_108 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc18_10, i32 0, i32 1, !dbg !35 -// CHECK:STDOUT: store ptr %tuple.loc18_9, ptr %tuple.loc18_108, align 8, !dbg !35 -// CHECK:STDOUT: call void @_CG.Main(ptr %tuple.loc18_10), !dbg !36 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %b.var), !dbg !31 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %a.var), !dbg !29 -// CHECK:STDOUT: ret void, !dbg !37 +// CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 4, !dbg !27 +// CHECK:STDOUT: %b.var = alloca { i32, i32, i32 }, align 4, !dbg !29 +// CHECK:STDOUT: %tuple.loc18_6 = alloca { i32, i32, i32 }, align 4, !dbg !31 +// CHECK:STDOUT: %tuple.loc18_9 = alloca { i32, i32, i32 }, align 4, !dbg !32 +// CHECK:STDOUT: %tuple.loc18_10 = alloca { ptr, ptr }, align 8, !dbg !33 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !27 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !29 +// CHECK:STDOUT: %tuple.elem0.loc18_6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !31 +// CHECK:STDOUT: %.loc18_6.1 = load i32, ptr %tuple.elem0.loc18_6.tuple.elem, align 4, !dbg !31 +// CHECK:STDOUT: %tuple.elem1.loc18_6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !31 +// CHECK:STDOUT: %.loc18_6.2 = load i32, ptr %tuple.elem1.loc18_6.tuple.elem, align 4, !dbg !31 +// CHECK:STDOUT: %tuple.elem2.loc18_6.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !31 +// CHECK:STDOUT: %.loc18_6.3 = load i32, ptr %tuple.elem2.loc18_6.tuple.elem, align 4, !dbg !31 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc18_6), !dbg !31 +// CHECK:STDOUT: %tuple.loc18_61 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_6, i32 0, i32 0, !dbg !31 +// CHECK:STDOUT: store i32 %.loc18_6.1, ptr %tuple.loc18_61, align 4, !dbg !31 +// CHECK:STDOUT: %tuple.loc18_62 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_6, i32 0, i32 1, !dbg !31 +// CHECK:STDOUT: store i32 %.loc18_6.2, ptr %tuple.loc18_62, align 4, !dbg !31 +// CHECK:STDOUT: %tuple.loc18_63 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_6, i32 0, i32 2, !dbg !31 +// CHECK:STDOUT: store i32 %.loc18_6.3, ptr %tuple.loc18_63, align 4, !dbg !31 +// CHECK:STDOUT: %tuple.elem0.loc18_9.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 0, !dbg !32 +// CHECK:STDOUT: %.loc18_9.1 = load i32, ptr %tuple.elem0.loc18_9.tuple.elem, align 4, !dbg !32 +// CHECK:STDOUT: %tuple.elem1.loc18_9.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 1, !dbg !32 +// CHECK:STDOUT: %.loc18_9.2 = load i32, ptr %tuple.elem1.loc18_9.tuple.elem, align 4, !dbg !32 +// CHECK:STDOUT: %tuple.elem2.loc18_9.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %b.var, i32 0, i32 2, !dbg !32 +// CHECK:STDOUT: %.loc18_9.3 = load i32, ptr %tuple.elem2.loc18_9.tuple.elem, align 4, !dbg !32 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc18_9), !dbg !32 +// CHECK:STDOUT: %tuple.loc18_94 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_9, i32 0, i32 0, !dbg !32 +// CHECK:STDOUT: store i32 %.loc18_9.1, ptr %tuple.loc18_94, align 4, !dbg !32 +// CHECK:STDOUT: %tuple.loc18_95 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_9, i32 0, i32 1, !dbg !32 +// CHECK:STDOUT: store i32 %.loc18_9.2, ptr %tuple.loc18_95, align 4, !dbg !32 +// CHECK:STDOUT: %tuple.loc18_96 = getelementptr inbounds nuw { i32, i32, i32 }, ptr %tuple.loc18_9, i32 0, i32 2, !dbg !32 +// CHECK:STDOUT: store i32 %.loc18_9.3, ptr %tuple.loc18_96, align 4, !dbg !32 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %tuple.loc18_10), !dbg !33 +// CHECK:STDOUT: %tuple.loc18_107 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc18_10, i32 0, i32 0, !dbg !33 +// CHECK:STDOUT: store ptr %tuple.loc18_6, ptr %tuple.loc18_107, align 8, !dbg !33 +// CHECK:STDOUT: %tuple.loc18_108 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple.loc18_10, i32 0, i32 1, !dbg !33 +// CHECK:STDOUT: store ptr %tuple.loc18_9, ptr %tuple.loc18_108, align 8, !dbg !33 +// CHECK:STDOUT: call void @_CG.Main(ptr %tuple.loc18_10), !dbg !34 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %b.var), !dbg !29 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %a.var), !dbg !27 +// CHECK:STDOUT: ret void, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !38 { +// CHECK:STDOUT: define weak_odr void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !36 { // 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.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !42 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !44 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !44 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !44 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !44 -// CHECK:STDOUT: ret void, !dbg !44 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !46 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self), !dbg !48 -// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem2.tuple.elem), !dbg !38 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !38 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !38 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !38 +// CHECK:STDOUT: ret void, !dbg !38 // 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 @_CSelfDestruct.Core.6e65c86a129b7677(ptr %t) #0 !dbg !42 { +// CHECK:STDOUT: call void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %t), !dbg !46 +// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !49 { +// CHECK:STDOUT: ret void, !dbg !54 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 4, 3, 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.6e65c86a129b7677, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -111,6 +110,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "value_formation.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) @@ -119,26 +119,27 @@ fn F() { // CHECK:STDOUT: !23 = !DISubroutineType(types: !22) // CHECK:STDOUT: !24 = !{null} // CHECK:STDOUT: !25 = !DISubroutineType(types: !24) -// CHECK:STDOUT: !26 = !{null, !20} -// CHECK:STDOUT: !27 = !DISubroutineType(types: !26) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !29 = !DILocation(line: 16, column: 3, scope: !28) -// CHECK:STDOUT: !31 = !DILocation(line: 17, column: 3, scope: !28) -// CHECK:STDOUT: !33 = !DILocation(line: 18, column: 6, scope: !28) -// CHECK:STDOUT: !34 = !DILocation(line: 18, column: 9, scope: !28) -// CHECK:STDOUT: !35 = !DILocation(line: 18, column: 5, scope: !28) -// CHECK:STDOUT: !36 = !DILocation(line: 18, column: 3, scope: !28) -// CHECK:STDOUT: !37 = !DILocation(line: 15, column: 1, scope: !28) -// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 17, type: !27, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) -// 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.abce894028f59bc0:core.Destroy.Core", scope: null, file: !18, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !18, line: 15, type: !25, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !27 = !DILocation(line: 16, column: 3, scope: !26) +// CHECK:STDOUT: !29 = !DILocation(line: 17, column: 3, scope: !26) +// CHECK:STDOUT: !31 = !DILocation(line: 18, column: 6, scope: !26) +// CHECK:STDOUT: !32 = !DILocation(line: 18, column: 9, scope: !26) +// CHECK:STDOUT: !33 = !DILocation(line: 18, column: 5, scope: !26) +// CHECK:STDOUT: !34 = !DILocation(line: 18, column: 3, scope: !26) +// CHECK:STDOUT: !35 = !DILocation(line: 15, column: 1, scope: !26) +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "Op", linkageName: "_COp.abce894028f59bc0:core.SubobjectDestroy.Core", scope: null, file: !18, line: 17, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !41) +// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !21) +// CHECK:STDOUT: !38 = !DILocation(line: 17, column: 3, scope: !36) +// CHECK:STDOUT: !39 = !{null, !20} +// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) +// CHECK:STDOUT: !41 = !{!37} +// CHECK:STDOUT: !42 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6e65c86a129b7677", scope: null, file: !10, line: 32, type: !23, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !48) // CHECK:STDOUT: !43 = !DILocalVariable(arg: 1, scope: !42, type: !21) -// CHECK:STDOUT: !44 = !DILocation(line: 17, column: 3, scope: !42) -// CHECK:STDOUT: !45 = !{!43} -// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.abce894028f59bc0: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: !46 = !DILocation(line: 34, column: 5, scope: !42) +// CHECK:STDOUT: !47 = !DILocation(line: 32, column: 1, scope: !42) +// CHECK:STDOUT: !48 = !{!43} +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !40, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !55) +// CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !49, type: !20) +// CHECK:STDOUT: !54 = !DILocation(line: 32, column: 1, scope: !49) +// CHECK:STDOUT: !55 = !{!50} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/var/destroy_control_flow.carbon b/toolchain/lower/testdata/var/destroy_control_flow.carbon index 051c6a7f6162..2caa69ba394e 100644 --- a/toolchain/lower/testdata/var/destroy_control_flow.carbon +++ b/toolchain/lower/testdata/var/destroy_control_flow.carbon @@ -15,8 +15,7 @@ library "[[@TEST_NAME]]"; class Destructible { - // TODO: Implement Core.Destructor instead. - impl as Core.Destroy { + impl as Core.DestroyImpl { fn Op(self); } }; @@ -117,12 +116,12 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: ; ModuleID = 'destructible.carbon' // CHECK:STDOUT: source_filename = "destructible.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_COp.Destructible.Main:Destroy.Core"(ptr) +// CHECK:STDOUT: declare void @"_COp.Destructible.Main:DestroyImpl.Core"(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind -// CHECK:STDOUT: define weak_odr void @"_COp:thunk:Destroy.3fda586d04e243ea.Core:Destructible.Main:Destroy.Core"(ptr %self) #0 !dbg !39 { +// CHECK:STDOUT: define weak_odr void @"_COp:thunk:DestroyImpl.1421ed8cb8ddfaad.Core:Destructible.Main:DestroyImpl.Core"(ptr %self) #0 !dbg !39 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_COp.Destructible.Main:Destroy.Core"(ptr %self), !dbg !42 +// CHECK:STDOUT: call void @"_COp.Destructible.Main:DestroyImpl.Core"(ptr %self), !dbg !42 // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -140,16 +139,16 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !37 = !{null, !36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:Destroy.3fda586d04e243ea.Core:Destructible.Main:Destroy.Core", scope: null, file: !34, line: 7, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !43) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:DestroyImpl.1421ed8cb8ddfaad.Core:Destructible.Main:DestroyImpl.Core", scope: null, file: !34, line: 6, type: !38, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !43) // CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !36) -// CHECK:STDOUT: !42 = !DILocation(line: 7, column: 5, scope: !39) +// CHECK:STDOUT: !42 = !DILocation(line: 6, column: 5, scope: !39) // CHECK:STDOUT: !43 = !{!40} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'if_then.carbon' // CHECK:STDOUT: source_filename = "if_then.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer +// CHECK:STDOUT: @Destructible.val.loc6_3.1 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define void @_CIfThen.Main(i1 %cond) #0 !dbg !46 { @@ -157,36 +156,26 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !49 // CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !56 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !49 -// 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 !49 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3.1, i64 0, i1 false), !dbg !49 // CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !53 // CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !55 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !56 -// 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 !56 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3.1, i64 0, i1 false), !dbg !56 // CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !60 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %b.var), !dbg !56 // CHECK:STDOUT: br label %if.else, !dbg !61 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %if.then, %entry // CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !64 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !49 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %a.var), !dbg !49 // CHECK:STDOUT: ret void, !dbg !65 // 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 !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.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !71 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !73 -// CHECK:STDOUT: } +// CHECK:STDOUT: declare void @"_COp:thunk:DestroyImpl.4a8993846ac47976.Core:Destructible.Main:DestroyImpl.Core"(ptr) // 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 @@ -194,11 +183,17 @@ fn WhileContinue(cond: bool) { // 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 @_CSelfDestruct.Core.19e832a74bd4c748(ptr %t) #0 !dbg !67 { +// CHECK:STDOUT: call void @"_COp:thunk:DestroyImpl.4a8993846ac47976.Core:Destructible.Main:DestroyImpl.Core"(ptr %t), !dbg !70 +// CHECK:STDOUT: ret void, !dbg !72 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_CUse.Main, { 2, 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.19e832a74bd4c748, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -208,6 +203,7 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !37 = !{null, !36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) @@ -224,65 +220,52 @@ fn WhileContinue(cond: bool) { // CHECK:STDOUT: !64 = !DILocation(line: 12, column: 3, scope: !46) // CHECK:STDOUT: !65 = !DILocation(line: 5, column: 1, scope: !46) // CHECK:STDOUT: !66 = !{!47} -// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !44, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !70) +// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.19e832a74bd4c748", scope: null, file: !26, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !73) // CHECK:STDOUT: !68 = !DILocalVariable(arg: 1, scope: !67, type: !36) -// CHECK:STDOUT: !69 = !DILocation(line: 9, column: 5, scope: !67) -// CHECK:STDOUT: !70 = !{!68} -// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !44, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !45, retainedNodes: !74) -// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !36) -// CHECK:STDOUT: !73 = !DILocation(line: 9, column: 5, scope: !71) -// CHECK:STDOUT: !74 = !{!72} +// CHECK:STDOUT: !70 = !DILocation(line: 33, column: 5, scope: !67) +// CHECK:STDOUT: !72 = !DILocation(line: 32, column: 1, scope: !67) +// CHECK:STDOUT: !73 = !{!68} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'if_else.carbon' // CHECK:STDOUT: source_filename = "if_else.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer +// CHECK:STDOUT: @Destructible.val.loc6_3.1 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CIfElse.Main(i1 %cond) #0 !dbg !77 { +// CHECK:STDOUT: define void @_CIfElse.Main(i1 %cond) #0 !dbg !76 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !80 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !87 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !93 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !80 -// 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 !80 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !84 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !86 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !79 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !86 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !92 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !79 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3.1, i64 0, i1 false), !dbg !79 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !83 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !85 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !87 -// 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 !87 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !91 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !87 -// CHECK:STDOUT: br label %if.done, !dbg !92 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !86 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3.1, i64 0, i1 false), !dbg !86 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !90 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %b.var), !dbg !86 +// CHECK:STDOUT: br label %if.done, !dbg !91 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %entry -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !93 -// 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 !93 -// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !97 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !93 -// CHECK:STDOUT: br label %if.done, !dbg !92 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !92 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3.1, i64 0, i1 false), !dbg !92 +// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !96 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %c.var), !dbg !92 +// CHECK:STDOUT: br label %if.done, !dbg !91 // CHECK:STDOUT: // CHECK:STDOUT: if.done: ; preds = %if.else, %if.then -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !100 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !80 -// CHECK:STDOUT: ret void, !dbg !101 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !99 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %a.var), !dbg !79 +// CHECK:STDOUT: ret void, !dbg !100 // 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 !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.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !107 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !109 -// CHECK:STDOUT: } +// CHECK:STDOUT: declare void @"_COp:thunk:DestroyImpl.4a8993846ac47976.Core:Destructible.Main:DestroyImpl.Core"(ptr) // 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 @@ -290,89 +273,83 @@ fn WhileContinue(cond: bool) { // 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 @_CSelfDestruct.Core.19e832a74bd4c748(ptr %t) #0 !dbg !102 { +// CHECK:STDOUT: call void @"_COp:thunk:DestroyImpl.4a8993846ac47976.Core:Destructible.Main:DestroyImpl.Core"(ptr %t), !dbg !105 +// CHECK:STDOUT: ret void, !dbg !107 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_CUse.Main, { 3, 2, 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.19e832a74bd4c748, { 2, 1, 0 } // 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 = !{!76} +// 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: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !37 = !{null, !36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !75 = !DIFile(filename: "if_else.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: "IfElse", linkageName: "_CIfElse.Main", scope: null, file: !75, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !102) -// CHECK:STDOUT: !78 = !DILocalVariable(arg: 1, scope: !77, type: !36) -// CHECK:STDOUT: !80 = !DILocation(line: 6, column: 3, scope: !77) -// CHECK:STDOUT: !84 = !DILocation(line: 7, column: 3, scope: !77) -// CHECK:STDOUT: !86 = !DILocation(line: 8, column: 6, scope: !77) -// CHECK:STDOUT: !87 = !DILocation(line: 9, column: 5, scope: !77) -// CHECK:STDOUT: !91 = !DILocation(line: 10, column: 5, scope: !77) -// CHECK:STDOUT: !92 = !DILocation(line: 8, column: 3, scope: !77) -// CHECK:STDOUT: !93 = !DILocation(line: 12, column: 5, scope: !77) -// CHECK:STDOUT: !97 = !DILocation(line: 13, column: 5, scope: !77) -// CHECK:STDOUT: !100 = !DILocation(line: 15, column: 3, scope: !77) -// CHECK:STDOUT: !101 = !DILocation(line: 5, column: 1, scope: !77) -// CHECK:STDOUT: !102 = !{!78} -// CHECK:STDOUT: !103 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !75, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !106) -// CHECK:STDOUT: !104 = !DILocalVariable(arg: 1, scope: !103, type: !36) -// CHECK:STDOUT: !105 = !DILocation(line: 9, column: 5, scope: !103) -// CHECK:STDOUT: !106 = !{!104} -// CHECK:STDOUT: !107 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !75, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !76, retainedNodes: !110) -// CHECK:STDOUT: !108 = !DILocalVariable(arg: 1, scope: !107, type: !36) -// CHECK:STDOUT: !109 = !DILocation(line: 9, column: 5, scope: !107) -// CHECK:STDOUT: !110 = !{!108} +// CHECK:STDOUT: !74 = !DIFile(filename: "if_else.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: "IfElse", linkageName: "_CIfElse.Main", scope: null, file: !74, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !101) +// CHECK:STDOUT: !77 = !DILocalVariable(arg: 1, scope: !76, type: !36) +// CHECK:STDOUT: !79 = !DILocation(line: 6, column: 3, scope: !76) +// CHECK:STDOUT: !83 = !DILocation(line: 7, column: 3, scope: !76) +// CHECK:STDOUT: !85 = !DILocation(line: 8, column: 6, scope: !76) +// CHECK:STDOUT: !86 = !DILocation(line: 9, column: 5, scope: !76) +// CHECK:STDOUT: !90 = !DILocation(line: 10, column: 5, scope: !76) +// CHECK:STDOUT: !91 = !DILocation(line: 8, column: 3, scope: !76) +// CHECK:STDOUT: !92 = !DILocation(line: 12, column: 5, scope: !76) +// CHECK:STDOUT: !96 = !DILocation(line: 13, column: 5, scope: !76) +// CHECK:STDOUT: !99 = !DILocation(line: 15, column: 3, scope: !76) +// CHECK:STDOUT: !100 = !DILocation(line: 5, column: 1, scope: !76) +// CHECK:STDOUT: !101 = !{!77} +// CHECK:STDOUT: !102 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.19e832a74bd4c748", scope: null, file: !26, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !75, retainedNodes: !108) +// CHECK:STDOUT: !103 = !DILocalVariable(arg: 1, scope: !102, type: !36) +// CHECK:STDOUT: !105 = !DILocation(line: 33, column: 5, scope: !102) +// CHECK:STDOUT: !107 = !DILocation(line: 32, column: 1, scope: !102) +// CHECK:STDOUT: !108 = !{!103} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'if_return.carbon' // CHECK:STDOUT: source_filename = "if_return.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer +// CHECK:STDOUT: @Destructible.val.loc6_3.1 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CIfReturn.Main(i1 %cond) #0 !dbg !113 { +// CHECK:STDOUT: define void @_CIfReturn.Main(i1 %cond) #0 !dbg !111 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !116 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !123 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !116 -// 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 !116 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !120 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !122 +// 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.1, 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 !123 -// 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 !123 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !127 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !123 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !116 -// CHECK:STDOUT: ret void, !dbg !128 +// 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.1, i64 0, i1 false), !dbg !121 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !125 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %b.var), !dbg !121 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(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 !116 -// CHECK:STDOUT: ret void, !dbg !129 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(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 !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.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !135 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !137 -// CHECK:STDOUT: } +// CHECK:STDOUT: declare void @"_COp:thunk:DestroyImpl.4a8993846ac47976.Core:Destructible.Main:DestroyImpl.Core"(ptr) // 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 @@ -380,102 +357,96 @@ fn WhileContinue(cond: bool) { // 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 @_CSelfDestruct.Core.19e832a74bd4c748(ptr %t) #0 !dbg !129 { +// CHECK:STDOUT: call void @"_COp:thunk:DestroyImpl.4a8993846ac47976.Core:Destructible.Main:DestroyImpl.Core"(ptr %t), !dbg !132 +// CHECK:STDOUT: ret void, !dbg !134 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_CUse.Main, { 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.19e832a74bd4c748, { 2, 1, 0 } // 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 = !{!112} +// CHECK:STDOUT: !llvm.dbg.cu = !{!110} // 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: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !37 = !{null, !36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !111 = !DIFile(filename: "if_return.carbon", directory: "") -// CHECK:STDOUT: !112 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !111, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !113 = distinct !DISubprogram(name: "IfReturn", linkageName: "_CIfReturn.Main", scope: null, file: !111, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !130) -// CHECK:STDOUT: !114 = !DILocalVariable(arg: 1, scope: !113, type: !36) -// CHECK:STDOUT: !116 = !DILocation(line: 6, column: 3, scope: !113) -// CHECK:STDOUT: !120 = !DILocation(line: 7, column: 3, scope: !113) -// CHECK:STDOUT: !122 = !DILocation(line: 8, column: 6, scope: !113) -// CHECK:STDOUT: !123 = !DILocation(line: 9, column: 5, scope: !113) -// CHECK:STDOUT: !127 = !DILocation(line: 10, column: 5, scope: !113) -// CHECK:STDOUT: !128 = !DILocation(line: 11, column: 5, scope: !113) -// CHECK:STDOUT: !129 = !DILocation(line: 5, column: 1, scope: !113) -// CHECK:STDOUT: !130 = !{!114} -// CHECK:STDOUT: !131 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !111, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !134) -// CHECK:STDOUT: !132 = !DILocalVariable(arg: 1, scope: !131, type: !36) -// CHECK:STDOUT: !133 = !DILocation(line: 9, column: 5, scope: !131) -// CHECK:STDOUT: !134 = !{!132} -// CHECK:STDOUT: !135 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !111, line: 9, type: !38, spFlags: DISPFlagDefinition, unit: !112, retainedNodes: !138) -// CHECK:STDOUT: !136 = !DILocalVariable(arg: 1, scope: !135, type: !36) -// CHECK:STDOUT: !137 = !DILocation(line: 9, column: 5, scope: !135) -// CHECK:STDOUT: !138 = !{!136} +// 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: !38, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !128) +// CHECK:STDOUT: !112 = !DILocalVariable(arg: 1, scope: !111, type: !36) +// 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.Core.19e832a74bd4c748", scope: null, file: !26, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !110, retainedNodes: !135) +// CHECK:STDOUT: !130 = !DILocalVariable(arg: 1, scope: !129, type: !36) +// CHECK:STDOUT: !132 = !DILocation(line: 33, column: 5, scope: !129) +// CHECK:STDOUT: !134 = !DILocation(line: 32, column: 1, scope: !129) +// CHECK:STDOUT: !135 = !{!130} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'while_break.carbon' // CHECK:STDOUT: source_filename = "while_break.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer +// CHECK:STDOUT: @Destructible.val.loc6_3.1 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CWhileBreak.Main(i1 %cond) #0 !dbg !141 { +// CHECK:STDOUT: define void @_CWhileBreak.Main(i1 %cond) #0 !dbg !138 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !144 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !154 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !161 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !144 -// 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 !144 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !148 -// CHECK:STDOUT: br label %while.cond, !dbg !149 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !141 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !151 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !158 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !141 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3.1, i64 0, i1 false), !dbg !141 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !145 +// CHECK:STDOUT: br label %while.cond, !dbg !146 // CHECK:STDOUT: // CHECK:STDOUT: while.cond: ; preds = %if.else, %entry -// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !149 +// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !146 // CHECK:STDOUT: // CHECK:STDOUT: while.body: ; preds = %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !153 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !154 -// 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 !154 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !158 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !160 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !150 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !151 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3.1, i64 0, i1 false), !dbg !151 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !155 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !157 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %while.body -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !161 -// 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 !161 -// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !165 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !161 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !154 -// CHECK:STDOUT: br label %while.done, !dbg !166 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !158 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3.1, i64 0, i1 false), !dbg !158 +// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !162 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %c.var), !dbg !158 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %b.var), !dbg !151 +// CHECK:STDOUT: br label %while.done, !dbg !163 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %while.body -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !154 -// CHECK:STDOUT: br label %while.cond, !dbg !167 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %b.var), !dbg !151 +// CHECK:STDOUT: br label %while.cond, !dbg !164 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %if.then, %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !170 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !144 -// CHECK:STDOUT: ret void, !dbg !171 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !167 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %a.var), !dbg !141 +// CHECK:STDOUT: ret void, !dbg !168 // 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 !173 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !175 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !177 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !179 -// CHECK:STDOUT: } +// CHECK:STDOUT: declare void @"_COp:thunk:DestroyImpl.4a8993846ac47976.Core:Destructible.Main:DestroyImpl.Core"(ptr) // 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 @@ -483,108 +454,102 @@ fn WhileContinue(cond: bool) { // 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 @_CSelfDestruct.Core.19e832a74bd4c748(ptr %t) #0 !dbg !170 { +// CHECK:STDOUT: call void @"_COp:thunk:DestroyImpl.4a8993846ac47976.Core:Destructible.Main:DestroyImpl.Core"(ptr %t), !dbg !173 +// CHECK:STDOUT: ret void, !dbg !175 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_CUse.Main, { 4, 3, 2, 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", { 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.19e832a74bd4c748, { 3, 2, 1, 0 } // 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 = !{!140} +// CHECK:STDOUT: !llvm.dbg.cu = !{!137} // 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: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !37 = !{null, !36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !139 = !DIFile(filename: "while_break.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 = distinct !DISubprogram(name: "WhileBreak", linkageName: "_CWhileBreak.Main", scope: null, file: !139, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !172) -// CHECK:STDOUT: !142 = !DILocalVariable(arg: 1, scope: !141, type: !36) -// CHECK:STDOUT: !144 = !DILocation(line: 6, column: 3, scope: !141) -// CHECK:STDOUT: !148 = !DILocation(line: 7, column: 3, scope: !141) -// CHECK:STDOUT: !149 = !DILocation(line: 8, column: 9, scope: !141) -// CHECK:STDOUT: !153 = !DILocation(line: 9, column: 5, scope: !141) -// CHECK:STDOUT: !154 = !DILocation(line: 10, column: 5, scope: !141) -// CHECK:STDOUT: !158 = !DILocation(line: 11, column: 5, scope: !141) -// CHECK:STDOUT: !160 = !DILocation(line: 12, column: 8, scope: !141) -// CHECK:STDOUT: !161 = !DILocation(line: 13, column: 7, scope: !141) -// CHECK:STDOUT: !165 = !DILocation(line: 14, column: 7, scope: !141) -// CHECK:STDOUT: !166 = !DILocation(line: 15, column: 7, scope: !141) -// CHECK:STDOUT: !167 = !DILocation(line: 8, column: 3, scope: !141) -// CHECK:STDOUT: !170 = !DILocation(line: 18, column: 3, scope: !141) -// CHECK:STDOUT: !171 = !DILocation(line: 5, column: 1, scope: !141) -// CHECK:STDOUT: !172 = !{!142} -// CHECK:STDOUT: !173 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !139, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !176) -// CHECK:STDOUT: !174 = !DILocalVariable(arg: 1, scope: !173, type: !36) -// CHECK:STDOUT: !175 = !DILocation(line: 13, column: 7, scope: !173) -// CHECK:STDOUT: !176 = !{!174} -// CHECK:STDOUT: !177 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !139, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !140, retainedNodes: !180) -// CHECK:STDOUT: !178 = !DILocalVariable(arg: 1, scope: !177, type: !36) -// CHECK:STDOUT: !179 = !DILocation(line: 13, column: 7, scope: !177) -// CHECK:STDOUT: !180 = !{!178} +// CHECK:STDOUT: !136 = !DIFile(filename: "while_break.carbon", directory: "") +// CHECK:STDOUT: !137 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !136, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !138 = distinct !DISubprogram(name: "WhileBreak", linkageName: "_CWhileBreak.Main", scope: null, file: !136, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !137, retainedNodes: !169) +// CHECK:STDOUT: !139 = !DILocalVariable(arg: 1, scope: !138, type: !36) +// CHECK:STDOUT: !141 = !DILocation(line: 6, column: 3, scope: !138) +// CHECK:STDOUT: !145 = !DILocation(line: 7, column: 3, scope: !138) +// CHECK:STDOUT: !146 = !DILocation(line: 8, column: 9, scope: !138) +// CHECK:STDOUT: !150 = !DILocation(line: 9, column: 5, scope: !138) +// CHECK:STDOUT: !151 = !DILocation(line: 10, column: 5, scope: !138) +// CHECK:STDOUT: !155 = !DILocation(line: 11, column: 5, scope: !138) +// CHECK:STDOUT: !157 = !DILocation(line: 12, column: 8, scope: !138) +// CHECK:STDOUT: !158 = !DILocation(line: 13, column: 7, scope: !138) +// CHECK:STDOUT: !162 = !DILocation(line: 14, column: 7, scope: !138) +// CHECK:STDOUT: !163 = !DILocation(line: 15, column: 7, scope: !138) +// CHECK:STDOUT: !164 = !DILocation(line: 8, column: 3, scope: !138) +// CHECK:STDOUT: !167 = !DILocation(line: 18, column: 3, scope: !138) +// CHECK:STDOUT: !168 = !DILocation(line: 5, column: 1, scope: !138) +// CHECK:STDOUT: !169 = !{!139} +// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.19e832a74bd4c748", scope: null, file: !26, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !137, retainedNodes: !176) +// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !36) +// CHECK:STDOUT: !173 = !DILocation(line: 33, column: 5, scope: !170) +// CHECK:STDOUT: !175 = !DILocation(line: 32, column: 1, scope: !170) +// CHECK:STDOUT: !176 = !{!171} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'while_continue.carbon' // CHECK:STDOUT: source_filename = "while_continue.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @Destructible.val.loc6_3 = internal constant {} zeroinitializer +// CHECK:STDOUT: @Destructible.val.loc6_3.1 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CWhileContinue.Main(i1 %cond) #0 !dbg !183 { +// CHECK:STDOUT: define void @_CWhileContinue.Main(i1 %cond) #0 !dbg !179 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !186 -// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !196 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !203 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !186 -// 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 !186 -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !190 -// CHECK:STDOUT: br label %while.cond, !dbg !191 +// CHECK:STDOUT: %a.var = alloca {}, align 1, !dbg !182 +// CHECK:STDOUT: %b.var = alloca {}, align 1, !dbg !192 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !199 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !182 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.var, ptr align 1 @Destructible.val.loc6_3.1, i64 0, i1 false), !dbg !182 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !186 +// CHECK:STDOUT: br label %while.cond, !dbg !187 // CHECK:STDOUT: // CHECK:STDOUT: while.cond: ; preds = %if.else, %if.then, %entry -// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !191 +// CHECK:STDOUT: br i1 %cond, label %while.body, label %while.done, !dbg !187 // CHECK:STDOUT: // CHECK:STDOUT: while.body: ; preds = %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !195 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !196 -// 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 !196 -// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !200 -// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !202 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !191 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !192 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %b.var, ptr align 1 @Destructible.val.loc6_3.1, i64 0, i1 false), !dbg !192 +// CHECK:STDOUT: call void @_CUse.Main(ptr %b.var), !dbg !196 +// CHECK:STDOUT: br i1 %cond, label %if.then, label %if.else, !dbg !198 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %while.body -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !203 -// 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 !203 -// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !207 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %c.var), !dbg !203 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !196 -// CHECK:STDOUT: br label %while.cond, !dbg !208 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !199 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @Destructible.val.loc6_3.1, i64 0, i1 false), !dbg !199 +// CHECK:STDOUT: call void @_CUse.Main(ptr %c.var), !dbg !203 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %c.var), !dbg !199 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %b.var), !dbg !192 +// CHECK:STDOUT: br label %while.cond, !dbg !204 // CHECK:STDOUT: // CHECK:STDOUT: if.else: ; preds = %while.body -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %b.var), !dbg !196 -// CHECK:STDOUT: br label %while.cond, !dbg !209 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %b.var), !dbg !192 +// CHECK:STDOUT: br label %while.cond, !dbg !205 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %while.cond -// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !212 -// CHECK:STDOUT: call void @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %a.var), !dbg !186 -// CHECK:STDOUT: ret void, !dbg !213 +// CHECK:STDOUT: call void @_CUse.Main(ptr %a.var), !dbg !208 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.19e832a74bd4c748(ptr %a.var), !dbg !182 +// CHECK:STDOUT: ret void, !dbg !209 // 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 !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.c3fcb3d93f31df0e:core.Destroy.Core"(ptr %self) #0 !dbg !219 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !221 -// CHECK:STDOUT: } +// CHECK:STDOUT: declare void @"_COp:thunk:DestroyImpl.4a8993846ac47976.Core:Destructible.Main:DestroyImpl.Core"(ptr) // 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 @@ -592,47 +557,51 @@ fn WhileContinue(cond: bool) { // 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 @_CSelfDestruct.Core.19e832a74bd4c748(ptr %t) #0 !dbg !211 { +// CHECK:STDOUT: call void @"_COp:thunk:DestroyImpl.4a8993846ac47976.Core:Destructible.Main:DestroyImpl.Core"(ptr %t), !dbg !214 +// CHECK:STDOUT: ret void, !dbg !216 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @_CUse.Main, { 4, 3, 2, 1, 0 } -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", { 3, 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 2, 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.19e832a74bd4c748, { 3, 2, 1, 0 } // 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 = !{!182} +// CHECK:STDOUT: !llvm.dbg.cu = !{!178} // 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: !26 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) // CHECK:STDOUT: !37 = !{null, !36} // CHECK:STDOUT: !38 = !DISubroutineType(types: !37) -// CHECK:STDOUT: !181 = !DIFile(filename: "while_continue.carbon", directory: "") -// CHECK:STDOUT: !182 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !181, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "WhileContinue", linkageName: "_CWhileContinue.Main", scope: null, file: !181, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !182, retainedNodes: !214) -// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !36) -// CHECK:STDOUT: !186 = !DILocation(line: 6, column: 3, scope: !183) -// CHECK:STDOUT: !190 = !DILocation(line: 7, column: 3, scope: !183) -// CHECK:STDOUT: !191 = !DILocation(line: 8, column: 9, scope: !183) -// CHECK:STDOUT: !195 = !DILocation(line: 9, column: 5, scope: !183) -// CHECK:STDOUT: !196 = !DILocation(line: 10, column: 5, scope: !183) -// CHECK:STDOUT: !200 = !DILocation(line: 11, column: 5, scope: !183) -// CHECK:STDOUT: !202 = !DILocation(line: 12, column: 8, scope: !183) -// CHECK:STDOUT: !203 = !DILocation(line: 13, column: 7, scope: !183) -// CHECK:STDOUT: !207 = !DILocation(line: 14, column: 7, scope: !183) -// CHECK:STDOUT: !208 = !DILocation(line: 15, column: 7, scope: !183) -// CHECK:STDOUT: !209 = !DILocation(line: 8, column: 3, scope: !183) -// CHECK:STDOUT: !212 = !DILocation(line: 18, column: 3, scope: !183) -// CHECK:STDOUT: !213 = !DILocation(line: 5, column: 1, scope: !183) -// CHECK:STDOUT: !214 = !{!184} -// CHECK:STDOUT: !215 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !181, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !182, retainedNodes: !218) -// CHECK:STDOUT: !216 = !DILocalVariable(arg: 1, scope: !215, type: !36) -// CHECK:STDOUT: !217 = !DILocation(line: 13, column: 7, scope: !215) -// CHECK:STDOUT: !218 = !{!216} -// CHECK:STDOUT: !219 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.c3fcb3d93f31df0e:core.Destroy.Core", scope: null, file: !181, line: 13, type: !38, spFlags: DISPFlagDefinition, unit: !182, retainedNodes: !222) -// CHECK:STDOUT: !220 = !DILocalVariable(arg: 1, scope: !219, type: !36) -// CHECK:STDOUT: !221 = !DILocation(line: 13, column: 7, scope: !219) -// CHECK:STDOUT: !222 = !{!220} +// CHECK:STDOUT: !177 = !DIFile(filename: "while_continue.carbon", directory: "") +// CHECK:STDOUT: !178 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !177, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "WhileContinue", linkageName: "_CWhileContinue.Main", scope: null, file: !177, line: 5, type: !38, spFlags: DISPFlagDefinition, unit: !178, retainedNodes: !210) +// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !36) +// CHECK:STDOUT: !182 = !DILocation(line: 6, column: 3, scope: !179) +// CHECK:STDOUT: !186 = !DILocation(line: 7, column: 3, scope: !179) +// CHECK:STDOUT: !187 = !DILocation(line: 8, column: 9, scope: !179) +// CHECK:STDOUT: !191 = !DILocation(line: 9, column: 5, scope: !179) +// CHECK:STDOUT: !192 = !DILocation(line: 10, column: 5, scope: !179) +// CHECK:STDOUT: !196 = !DILocation(line: 11, column: 5, scope: !179) +// CHECK:STDOUT: !198 = !DILocation(line: 12, column: 8, scope: !179) +// CHECK:STDOUT: !199 = !DILocation(line: 13, column: 7, scope: !179) +// CHECK:STDOUT: !203 = !DILocation(line: 14, column: 7, scope: !179) +// CHECK:STDOUT: !204 = !DILocation(line: 15, column: 7, scope: !179) +// CHECK:STDOUT: !205 = !DILocation(line: 8, column: 3, scope: !179) +// CHECK:STDOUT: !208 = !DILocation(line: 18, column: 3, scope: !179) +// CHECK:STDOUT: !209 = !DILocation(line: 5, column: 1, scope: !179) +// CHECK:STDOUT: !210 = !{!180} +// CHECK:STDOUT: !211 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.19e832a74bd4c748", scope: null, file: !26, line: 32, type: !38, spFlags: DISPFlagDefinition, unit: !178, retainedNodes: !217) +// CHECK:STDOUT: !212 = !DILocalVariable(arg: 1, scope: !211, type: !36) +// CHECK:STDOUT: !214 = !DILocation(line: 33, column: 5, scope: !211) +// CHECK:STDOUT: !216 = !DILocation(line: 32, column: 1, scope: !211) +// CHECK:STDOUT: !217 = !{!212} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/var/local.carbon b/toolchain/lower/testdata/var/local.carbon index efdbd5393a1d..7f0921ab3697 100644 --- a/toolchain/lower/testdata/var/local.carbon +++ b/toolchain/lower/testdata/var/local.carbon @@ -35,25 +35,24 @@ fn G() -> (i32, i32, i32) { // CHECK:STDOUT: source_filename = "simple.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !25 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !28 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !28 -// CHECK:STDOUT: store i32 1, ptr %x.var, align 4, !dbg !28 -// CHECK:STDOUT: %.loc6 = load i32, ptr %x.var, align 4, !dbg !30 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %x.var), !dbg !28 +// CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !26 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !26 +// CHECK:STDOUT: store i32 1, ptr %x.var, align 4, !dbg !26 +// CHECK:STDOUT: %.loc6 = load i32, ptr %x.var, align 4, !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %x.var), !dbg !26 // CHECK:STDOUT: ret i32 %.loc6, !dbg !31 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946: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: 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 @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !32 { +// CHECK:STDOUT: ret void, !dbg !37 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } // CHECK:STDOUT: @@ -62,21 +61,22 @@ fn G() -> (i32, i32, i32) { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "simple.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 4, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !28 = !DILocation(line: 5, column: 3, scope: !25) -// CHECK:STDOUT: !30 = !DILocation(line: 6, column: 10, scope: !25) -// CHECK:STDOUT: !31 = !DILocation(line: 6, column: 3, scope: !25) -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 5, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !35) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 4, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !26 = !DILocation(line: 5, column: 3, scope: !23) +// CHECK:STDOUT: !28 = !DILocation(line: 6, column: 10, scope: !23) +// CHECK:STDOUT: !29 = !{null, !20} +// CHECK:STDOUT: !30 = !DISubroutineType(types: !29) +// CHECK:STDOUT: !31 = !DILocation(line: 6, column: 3, scope: !23) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !30, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !38) // 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: !37 = !DILocation(line: 32, column: 1, scope: !32) +// CHECK:STDOUT: !38 = !{!33} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'eval_init_in_place.carbon' @@ -85,60 +85,47 @@ fn G() -> (i32, i32, i32) { // CHECK:STDOUT: @tuple.80e.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 !43 { +// CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !46 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !46 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !46 -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !46 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.80e.loc4_50, i64 12, i1 false), !dbg !47 -// CHECK:STDOUT: ret void, !dbg !47 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !49 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !49 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !49 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.80e.loc4_50, i64 12, i1 false), !dbg !50 +// CHECK:STDOUT: ret void, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !48 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 4, !dbg !51 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !51 -// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.80e.loc4_50, i64 12, i1 false), !dbg !51 -// CHECK:STDOUT: %tuple.elem0.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: %.loc8_10.1 = load i32, ptr %tuple.elem0.loc8_10.1.tuple.elem, align 4, !dbg !53 -// CHECK:STDOUT: %tuple.elem0.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !53 -// CHECK:STDOUT: store i32 %.loc8_10.1, ptr %tuple.elem0.loc8_10.2.tuple.elem, align 4, !dbg !53 -// CHECK:STDOUT: %tuple.elem1.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !53 -// CHECK:STDOUT: %.loc8_10.3 = load i32, ptr %tuple.elem1.loc8_10.1.tuple.elem, align 4, !dbg !53 -// CHECK:STDOUT: %tuple.elem1.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !53 -// CHECK:STDOUT: store i32 %.loc8_10.3, ptr %tuple.elem1.loc8_10.2.tuple.elem, align 4, !dbg !53 -// CHECK:STDOUT: %tuple.elem2.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !53 -// CHECK:STDOUT: %.loc8_10.5 = load i32, ptr %tuple.elem2.loc8_10.1.tuple.elem, align 4, !dbg !53 -// CHECK:STDOUT: %tuple.elem2.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !53 -// CHECK:STDOUT: store i32 %.loc8_10.5, ptr %tuple.elem2.loc8_10.2.tuple.elem, align 4, !dbg !53 -// CHECK:STDOUT: call void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %a.var), !dbg !51 -// CHECK:STDOUT: ret void, !dbg !54 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !55 { +// CHECK:STDOUT: define void @_CG.Main(ptr sret({ i32, i32, i32 }) %return) #0 !dbg !51 { // CHECK:STDOUT: entry: +// CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 4, !dbg !54 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !54 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @tuple.80e.loc4_50, i64 12, i1 false), !dbg !54 +// CHECK:STDOUT: %tuple.elem0.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !56 +// CHECK:STDOUT: %.loc8_10.1 = load i32, ptr %tuple.elem0.loc8_10.1.tuple.elem, align 4, !dbg !56 +// CHECK:STDOUT: %tuple.elem0.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 0, !dbg !56 +// CHECK:STDOUT: store i32 %.loc8_10.1, ptr %tuple.elem0.loc8_10.2.tuple.elem, align 4, !dbg !56 +// CHECK:STDOUT: %tuple.elem1.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !56 +// CHECK:STDOUT: %.loc8_10.3 = load i32, ptr %tuple.elem1.loc8_10.1.tuple.elem, align 4, !dbg !56 +// CHECK:STDOUT: %tuple.elem1.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 1, !dbg !56 +// CHECK:STDOUT: store i32 %.loc8_10.3, ptr %tuple.elem1.loc8_10.2.tuple.elem, align 4, !dbg !56 +// CHECK:STDOUT: %tuple.elem2.loc8_10.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 2, !dbg !56 +// CHECK:STDOUT: %.loc8_10.5 = load i32, ptr %tuple.elem2.loc8_10.1.tuple.elem, align 4, !dbg !56 +// CHECK:STDOUT: %tuple.elem2.loc8_10.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %return, i32 0, i32 2, !dbg !56 +// CHECK:STDOUT: store i32 %.loc8_10.5, ptr %tuple.elem2.loc8_10.2.tuple.elem, align 4, !dbg !56 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.6e65c86a129b7677(ptr %a.var), !dbg !54 // CHECK:STDOUT: ret void, !dbg !57 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !59 { +// CHECK:STDOUT: define weak_odr void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !58 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem2.tuple.elem), !dbg !61 -// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem1.tuple.elem), !dbg !61 -// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !61 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %tuple.elem0.tuple.elem), !dbg !61 -// CHECK:STDOUT: ret void, !dbg !61 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.abce894028f59bc0:core.Destroy.Core"(ptr %self) #0 !dbg !63 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: call void @"_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core"(ptr %self), !dbg !65 -// CHECK:STDOUT: ret void, !dbg !65 +// CHECK:STDOUT: %tuple.elem2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 2, !dbg !60 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem2.tuple.elem), !dbg !60 +// CHECK:STDOUT: %tuple.elem1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 1, !dbg !60 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem1.tuple.elem), !dbg !60 +// CHECK:STDOUT: %tuple.elem0.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %self, i32 0, i32 0, !dbg !60 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %tuple.elem0.tuple.elem), !dbg !60 +// CHECK:STDOUT: ret void, !dbg !60 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -147,44 +134,58 @@ fn G() -> (i32, i32, i32) { // 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 @_CSelfDestruct.Core.6e65c86a129b7677(ptr %t) #0 !dbg !62 { +// CHECK:STDOUT: call void @"_COp.abce894028f59bc0:core.SubobjectDestroy.Core"(ptr %t), !dbg !66 +// CHECK:STDOUT: ret void, !dbg !67 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !69 { +// CHECK:STDOUT: ret void, !dbg !74 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 2, 1, 0 } // 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 = !{!37} +// CHECK:STDOUT: !llvm.dbg.cu = !{!40} // 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: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // 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: !36 = !DIFile(filename: "eval_init_in_place.carbon", directory: "") -// CHECK:STDOUT: !37 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !36, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !39 = !{!38} -// CHECK:STDOUT: !40 = !DISubroutineType(types: !39) -// CHECK:STDOUT: !41 = !{null, !38} -// CHECK:STDOUT: !42 = !DISubroutineType(types: !41) -// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !36, line: 4, type: !40, spFlags: DISPFlagDefinition, unit: !37) -// CHECK:STDOUT: !46 = !DILocation(line: 4, column: 41, scope: !43) -// CHECK:STDOUT: !47 = !DILocation(line: 4, column: 34, scope: !43) -// CHECK:STDOUT: !48 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !36, line: 6, type: !40, spFlags: DISPFlagDefinition, unit: !37) -// CHECK:STDOUT: !51 = !DILocation(line: 7, column: 3, scope: !48) -// CHECK:STDOUT: !53 = !DILocation(line: 8, column: 10, scope: !48) -// CHECK:STDOUT: !54 = !DILocation(line: 8, column: 3, scope: !48) -// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !36, line: 7, type: !24, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !58) -// CHECK:STDOUT: !56 = !DILocalVariable(arg: 1, scope: !55, type: !20) -// CHECK:STDOUT: !57 = !DILocation(line: 7, column: 3, scope: !55) -// CHECK:STDOUT: !58 = !{!56} -// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "SubobjectDestroy", linkageName: "_CSubobjectDestroy.abce894028f59bc0:core.Destroy.Core", scope: null, file: !36, line: 7, type: !42, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !62) -// CHECK:STDOUT: !60 = !DILocalVariable(arg: 1, scope: !59, type: !38) -// CHECK:STDOUT: !61 = !DILocation(line: 7, column: 3, scope: !59) -// CHECK:STDOUT: !62 = !{!60} -// CHECK:STDOUT: !63 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.abce894028f59bc0:core.Destroy.Core", scope: null, file: !36, line: 7, type: !42, spFlags: DISPFlagDefinition, unit: !37, retainedNodes: !66) -// CHECK:STDOUT: !64 = !DILocalVariable(arg: 1, scope: !63, type: !38) -// CHECK:STDOUT: !65 = !DILocation(line: 7, column: 3, scope: !63) -// CHECK:STDOUT: !66 = !{!64} +// CHECK:STDOUT: !29 = !{null, !20} +// CHECK:STDOUT: !30 = !DISubroutineType(types: !29) +// CHECK:STDOUT: !39 = !DIFile(filename: "eval_init_in_place.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 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !42 = !{!41} +// CHECK:STDOUT: !43 = !DISubroutineType(types: !42) +// CHECK:STDOUT: !44 = !{null, !41} +// CHECK:STDOUT: !45 = !DISubroutineType(types: !44) +// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !39, line: 4, type: !43, spFlags: DISPFlagDefinition, unit: !40) +// CHECK:STDOUT: !49 = !DILocation(line: 4, column: 41, scope: !46) +// CHECK:STDOUT: !50 = !DILocation(line: 4, column: 34, scope: !46) +// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !39, line: 6, type: !43, spFlags: DISPFlagDefinition, unit: !40) +// CHECK:STDOUT: !54 = !DILocation(line: 7, column: 3, scope: !51) +// CHECK:STDOUT: !56 = !DILocation(line: 8, column: 10, scope: !51) +// CHECK:STDOUT: !57 = !DILocation(line: 8, column: 3, scope: !51) +// CHECK:STDOUT: !58 = distinct !DISubprogram(name: "Op", linkageName: "_COp.abce894028f59bc0:core.SubobjectDestroy.Core", scope: null, file: !39, line: 7, type: !45, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !61) +// CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !58, type: !41) +// CHECK:STDOUT: !60 = !DILocation(line: 7, column: 3, scope: !58) +// CHECK:STDOUT: !61 = !{!59} +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.6e65c86a129b7677", scope: null, file: !10, line: 32, type: !45, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !68) +// CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !62, type: !41) +// CHECK:STDOUT: !66 = !DILocation(line: 34, column: 5, scope: !62) +// CHECK:STDOUT: !67 = !DILocation(line: 32, column: 1, scope: !62) +// CHECK:STDOUT: !68 = !{!63} +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !30, spFlags: DISPFlagDefinition, unit: !40, retainedNodes: !75) +// CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !69, type: !20) +// CHECK:STDOUT: !74 = !DILocation(line: 32, column: 1, scope: !69) +// CHECK:STDOUT: !75 = !{!70} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/var/nested.carbon b/toolchain/lower/testdata/var/nested.carbon index a25a551d0c09..66047ee1c4ac 100644 --- a/toolchain/lower/testdata/var/nested.carbon +++ b/toolchain/lower/testdata/var/nested.carbon @@ -24,44 +24,43 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "nested.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !25 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !23 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !28 -// CHECK:STDOUT: %b.var = alloca i32, align 4, !dbg !31 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !28 -// CHECK:STDOUT: store i32 1, ptr %a.var, align 4, !dbg !28 -// CHECK:STDOUT: br label %while.cond, !dbg !30 +// CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !26 +// CHECK:STDOUT: %b.var = alloca i32, align 4, !dbg !29 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !26 +// CHECK:STDOUT: store i32 1, ptr %a.var, align 4, !dbg !26 +// CHECK:STDOUT: br label %while.cond, !dbg !28 // CHECK:STDOUT: // CHECK:STDOUT: while.cond: ; preds = %while.body, %entry -// CHECK:STDOUT: br i1 true, label %while.body, label %while.done, !dbg !30 +// CHECK:STDOUT: br i1 true, label %while.body, label %while.done, !dbg !28 // CHECK:STDOUT: // CHECK:STDOUT: while.body: ; preds = %while.cond -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !31 -// CHECK:STDOUT: %.loc16 = load i32, ptr %a.var, align 4, !dbg !32 -// CHECK:STDOUT: store i32 %.loc16, ptr %b.var, align 4, !dbg !31 -// CHECK:STDOUT: %.loc17 = load i32, ptr %b.var, align 4, !dbg !35 -// CHECK:STDOUT: store i32 %.loc17, ptr %a.var, align 4, !dbg !34 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %b.var), !dbg !31 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !29 +// CHECK:STDOUT: %.loc16_18 = load i32, ptr %a.var, align 4, !dbg !30 +// CHECK:STDOUT: store i32 %.loc16_18, ptr %b.var, align 4, !dbg !29 +// CHECK:STDOUT: %.loc17 = load i32, ptr %b.var, align 4, !dbg !33 +// CHECK:STDOUT: store i32 %.loc17, ptr %a.var, align 4, !dbg !32 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %b.var), !dbg !29 // CHECK:STDOUT: br label %while.cond, !dbg !36 // CHECK:STDOUT: // CHECK:STDOUT: while.done: ; preds = %while.cond // CHECK:STDOUT: %.loc19 = load i32, ptr %a.var, align 4, !dbg !37 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %a.var), !dbg !28 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %a.var), !dbg !26 // CHECK:STDOUT: ret i32 %.loc19, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !39 { -// CHECK:STDOUT: entry: -// 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: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !39 { +// CHECK:STDOUT: ret void, !dbg !44 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives -// CHECK:STDOUT: uselistorder ptr @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", { 1, 0 } // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } +// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.f127f30143696d51, { 1, 0 } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } // CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } @@ -71,25 +70,26 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5} // CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !10 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") // CHECK:STDOUT: !18 = !DIFile(filename: "nested.carbon", directory: "") // CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !21 = !{!20} // CHECK:STDOUT: !22 = !DISubroutineType(types: !21) -// CHECK:STDOUT: !23 = !{null, !20} -// CHECK:STDOUT: !24 = !DISubroutineType(types: !23) -// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) -// CHECK:STDOUT: !28 = !DILocation(line: 14, column: 3, scope: !25) -// CHECK:STDOUT: !30 = !DILocation(line: 15, column: 9, scope: !25) -// CHECK:STDOUT: !31 = !DILocation(line: 16, column: 5, scope: !25) -// CHECK:STDOUT: !32 = !DILocation(line: 16, column: 18, scope: !25) -// CHECK:STDOUT: !34 = !DILocation(line: 17, column: 5, scope: !25) -// CHECK:STDOUT: !35 = !DILocation(line: 17, column: 9, scope: !25) -// CHECK:STDOUT: !36 = !DILocation(line: 15, column: 3, scope: !25) -// CHECK:STDOUT: !37 = !DILocation(line: 19, column: 10, scope: !25) -// CHECK:STDOUT: !38 = !DILocation(line: 19, column: 3, scope: !25) -// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !18, line: 16, type: !24, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !42) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !18, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !19) +// CHECK:STDOUT: !26 = !DILocation(line: 14, column: 3, scope: !23) +// CHECK:STDOUT: !28 = !DILocation(line: 15, column: 9, scope: !23) +// CHECK:STDOUT: !29 = !DILocation(line: 16, column: 5, scope: !23) +// CHECK:STDOUT: !30 = !DILocation(line: 16, column: 18, scope: !23) +// CHECK:STDOUT: !32 = !DILocation(line: 17, column: 5, scope: !23) +// CHECK:STDOUT: !33 = !DILocation(line: 17, column: 9, scope: !23) +// CHECK:STDOUT: !34 = !{null, !20} +// CHECK:STDOUT: !35 = !DISubroutineType(types: !34) +// CHECK:STDOUT: !36 = !DILocation(line: 15, column: 3, scope: !23) +// CHECK:STDOUT: !37 = !DILocation(line: 19, column: 10, scope: !23) +// CHECK:STDOUT: !38 = !DILocation(line: 19, column: 3, scope: !23) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !10, line: 32, type: !35, spFlags: DISPFlagDefinition, unit: !19, retainedNodes: !45) // 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: !44 = !DILocation(line: 32, column: 1, scope: !39) +// CHECK:STDOUT: !45 = !{!40} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/var/param.carbon b/toolchain/lower/testdata/var/param.carbon index 7578a325c52e..fbd8e4643e42 100644 --- a/toolchain/lower/testdata/var/param.carbon +++ b/toolchain/lower/testdata/var/param.carbon @@ -15,8 +15,7 @@ library "[[@TEST_NAME]]"; class C { - // TODO: Change to Core.Destructor when possible. - impl as Core.Destroy { + impl as Core.DestroyImpl { fn Op(ref self); } @@ -35,7 +34,7 @@ library "[[@TEST_NAME]]"; class C { // TODO: Change to Core.Destructor when possible. - impl as Core.Destroy { + impl as Core.DestroyImpl { fn Op(ref self); } } @@ -50,98 +49,78 @@ fn G() { // CHECK:STDOUT: ; ModuleID = 'with_cleanup.carbon' // CHECK:STDOUT: source_filename = "with_cleanup.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_COp.C.Main:Destroy.Core"(ptr) +// CHECK:STDOUT: declare void @"_COp.C.Main:DestroyImpl.Core"(ptr) // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CMake.C.Main(ptr sret({})) // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CF.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !15 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !21 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !16 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !16 -// CHECK:STDOUT: call void @_CMake.C.Main(ptr %c.var), !dbg !17 -// CHECK:STDOUT: call void @_CF.Main(ptr %c.var), !dbg !18 -// CHECK:STDOUT: call void @"_CSelfDestruct.08d9e38b928ba575:core.Destroy.Core"(ptr %c.var), !dbg !16 -// CHECK:STDOUT: ret void, !dbg !19 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %self) #0 !dbg !20 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !22 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// 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: %c.var = alloca {}, align 1, !dbg !22 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !22 +// CHECK:STDOUT: call void @_CMake.C.Main(ptr %c.var), !dbg !23 +// CHECK:STDOUT: call void @_CF.Main(ptr %c.var), !dbg !24 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5d59e052b8dad42e(ptr %c.var), !dbg !22 +// CHECK:STDOUT: ret void, !dbg !25 // 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 @_CSelfDestruct.Core.5d59e052b8dad42e(ptr %t) #0 !dbg !26 { +// CHECK:STDOUT: call void @"_COp.C.Main:DestroyImpl.Core"(ptr %t), !dbg !29 +// CHECK:STDOUT: ret void, !dbg !31 +// 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 = !{!7} +// CHECK:STDOUT: !llvm.dbg.cu = !{!13} // 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: !6 = !DIFile(filename: "with_cleanup.carbon", directory: "") -// CHECK:STDOUT: !7 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !6, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) -// CHECK:STDOUT: !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !9 = !{null, !8} -// CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !13 = !{null} -// CHECK:STDOUT: !14 = !DISubroutineType(types: !13) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !6, line: 15, type: !14, spFlags: DISPFlagDefinition, unit: !7) -// CHECK:STDOUT: !16 = !DILocation(line: 13, column: 6, scope: !15) -// CHECK:STDOUT: !17 = !DILocation(line: 16, column: 5, scope: !15) -// CHECK:STDOUT: !18 = !DILocation(line: 16, column: 3, scope: !15) -// CHECK:STDOUT: !19 = !DILocation(line: 15, column: 1, scope: !15) -// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !6, line: 13, type: !10, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !23) -// 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: "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: !4 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") +// CHECK:STDOUT: !12 = !DIFile(filename: "with_cleanup.carbon", directory: "") +// CHECK:STDOUT: !13 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !12, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !15 = !{null, !14} +// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) +// CHECK:STDOUT: !19 = !{null} +// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !12, line: 14, type: !20, spFlags: DISPFlagDefinition, unit: !13) +// CHECK:STDOUT: !22 = !DILocation(line: 12, column: 6, scope: !21) +// CHECK:STDOUT: !23 = !DILocation(line: 15, column: 5, scope: !21) +// CHECK:STDOUT: !24 = !DILocation(line: 15, column: 3, scope: !21) +// CHECK:STDOUT: !25 = !DILocation(line: 14, column: 1, scope: !21) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5d59e052b8dad42e", scope: null, file: !4, line: 32, type: !16, spFlags: DISPFlagDefinition, unit: !13, retainedNodes: !32) +// CHECK:STDOUT: !27 = !DILocalVariable(arg: 1, scope: !26, type: !14) +// CHECK:STDOUT: !29 = !DILocation(line: 33, column: 5, scope: !26) +// CHECK:STDOUT: !31 = !DILocation(line: 32, column: 1, scope: !26) +// CHECK:STDOUT: !32 = !{!27} // CHECK:STDOUT: // CHECK:STDOUT: ; --- // CHECK:STDOUT: ; ModuleID = 'struct_literal_cleanup.carbon' // CHECK:STDOUT: source_filename = "struct_literal_cleanup.carbon" // CHECK:STDOUT: -// CHECK:STDOUT: @C.val.loc11 = internal constant {} zeroinitializer +// CHECK:STDOUT: @C.val.loc11_6.1 = internal constant {} zeroinitializer // CHECK:STDOUT: -// CHECK:STDOUT: declare void @"_COp.C.Main:Destroy.Core"(ptr) +// CHECK:STDOUT: declare void @"_COp.C.Main:DestroyImpl.Core"(ptr) // CHECK:STDOUT: // CHECK:STDOUT: declare void @_CF.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !30 { +// CHECK:STDOUT: define void @_CG.Main() #0 !dbg !35 { // CHECK:STDOUT: entry: -// 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 !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: %c.var = alloca {}, align 1, !dbg !36 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !36 +// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @C.val.loc11_6.1, i64 0, i1 false), !dbg !36 +// CHECK:STDOUT: call void @_CF.Main(ptr %c.var), !dbg !37 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.5d59e052b8dad42e(ptr %c.var), !dbg !36 +// CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) @@ -150,31 +129,35 @@ fn G() { // 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 @_CSelfDestruct.Core.5d59e052b8dad42e(ptr %t) #0 !dbg !39 { +// CHECK:STDOUT: call void @"_COp.C.Main:DestroyImpl.Core"(ptr %t), !dbg !42 +// CHECK:STDOUT: ret void, !dbg !44 +// 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 = !{!29} +// CHECK:STDOUT: !llvm.dbg.cu = !{!34} // 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: !8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !9 = !{null, !8} -// CHECK:STDOUT: !10 = !DISubroutineType(types: !9) -// CHECK:STDOUT: !13 = !{null} -// CHECK:STDOUT: !14 = !DISubroutineType(types: !13) -// 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: !4 = !DIFile(filename: "min_prelude/parts/destroy.carbon", directory: "") +// CHECK:STDOUT: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +// CHECK:STDOUT: !15 = !{null, !14} +// CHECK:STDOUT: !16 = !DISubroutineType(types: !15) +// CHECK:STDOUT: !19 = !{null} +// CHECK:STDOUT: !20 = !DISubroutineType(types: !19) +// CHECK:STDOUT: !33 = !DIFile(filename: "struct_literal_cleanup.carbon", directory: "") +// CHECK:STDOUT: !34 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !33, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "G", linkageName: "_CG.Main", scope: null, file: !33, line: 13, type: !20, spFlags: DISPFlagDefinition, unit: !34) +// CHECK:STDOUT: !36 = !DILocation(line: 11, column: 6, scope: !35) +// CHECK:STDOUT: !37 = !DILocation(line: 14, column: 3, scope: !35) +// CHECK:STDOUT: !38 = !DILocation(line: 13, column: 1, scope: !35) +// CHECK:STDOUT: !39 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.5d59e052b8dad42e", scope: null, file: !4, line: 32, type: !16, spFlags: DISPFlagDefinition, unit: !34, retainedNodes: !45) +// CHECK:STDOUT: !40 = !DILocalVariable(arg: 1, scope: !39, type: !14) +// CHECK:STDOUT: !42 = !DILocation(line: 33, column: 5, scope: !39) +// CHECK:STDOUT: !44 = !DILocation(line: 32, column: 1, scope: !39) +// CHECK:STDOUT: !45 = !{!40} // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/var/uninitialized.carbon b/toolchain/lower/testdata/var/uninitialized.carbon index 242318f1dfd1..5ef9efdb612c 100644 --- a/toolchain/lower/testdata/var/uninitialized.carbon +++ b/toolchain/lower/testdata/var/uninitialized.carbon @@ -24,72 +24,66 @@ fn Run() { // CHECK:STDOUT: source_filename = "uninitialized.carbon" // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define i32 @main() #0 !dbg !14 { +// CHECK:STDOUT: define i32 @main() #0 !dbg !9 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !15 -// CHECK:STDOUT: %b.var = alloca double, align 8, !dbg !17 -// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !19 -// CHECK:STDOUT: %d.var = alloca {}, align 1, !dbg !21 -// CHECK:STDOUT: %e.var = alloca i1, align 1, !dbg !23 -// CHECK:STDOUT: %f.var = alloca ptr, align 8, !dbg !25 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !15 -// CHECK:STDOUT: store i32 poison, ptr %a.var, align 4, !dbg !15 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !17 -// CHECK:STDOUT: store double poison, ptr %b.var, align 8, !dbg !17 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !19 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !21 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %e.var), !dbg !23 -// CHECK:STDOUT: store i8 poison, ptr %e.var, align 1, !dbg !23 -// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %f.var), !dbg !25 -// CHECK:STDOUT: store ptr poison, ptr %f.var, align 8, !dbg !25 -// CHECK:STDOUT: call void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %f.var), !dbg !25 -// CHECK:STDOUT: call void @"_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core"(ptr %e.var), !dbg !23 -// CHECK:STDOUT: call void @"_CSelfDestruct.cb8adced19392b99:core.Destroy.Core"(ptr %d.var), !dbg !21 -// CHECK:STDOUT: call void @"_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core"(ptr %c.var), !dbg !19 -// CHECK:STDOUT: call void @"_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core"(ptr %b.var), !dbg !17 -// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %a.var), !dbg !15 +// CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !10 +// CHECK:STDOUT: %b.var = alloca double, align 8, !dbg !12 +// CHECK:STDOUT: %c.var = alloca {}, align 1, !dbg !14 +// CHECK:STDOUT: %d.var = alloca {}, align 1, !dbg !16 +// CHECK:STDOUT: %e.var = alloca i1, align 1, !dbg !18 +// CHECK:STDOUT: %f.var = alloca ptr, align 8, !dbg !20 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !10 +// CHECK:STDOUT: store i32 poison, ptr %a.var, align 4, !dbg !10 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %b.var), !dbg !12 +// CHECK:STDOUT: store double poison, ptr %b.var, align 8, !dbg !12 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %c.var), !dbg !14 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %d.var), !dbg !16 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %e.var), !dbg !18 +// CHECK:STDOUT: store i8 poison, ptr %e.var, align 1, !dbg !18 +// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %f.var), !dbg !20 +// CHECK:STDOUT: store ptr poison, ptr %f.var, align 8, !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %f.var), !dbg !20 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %e.var), !dbg !18 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.61b5bb2079973306(ptr %d.var), !dbg !16 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %c.var), !dbg !14 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %b.var), !dbg !12 +// CHECK:STDOUT: call void @_CSelfDestruct.Core.f127f30143696d51(ptr %a.var), !dbg !10 // CHECK:STDOUT: ret i32 0, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core"(ptr %self) #0 !dbg !28 { -// CHECK:STDOUT: entry: -// CHECK:STDOUT: ret void, !dbg !30 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.48e0adf639fe7af4: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.cb8adced19392b99: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.61ea2aba74ab3bf1: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.7619ac942aa9029a: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.72395be3dbbe8946: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: 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 @_CSelfDestruct.Core.4f29d15a20894e9b(ptr %t) #0 !dbg !29 { +// CHECK:STDOUT: ret void, !dbg !34 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.29e6aa423646b61a(ptr %t) #0 !dbg !36 { +// CHECK:STDOUT: ret void, !dbg !41 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.61b5bb2079973306(ptr %t) #0 !dbg !43 { +// CHECK:STDOUT: ret void, !dbg !48 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9045abb8230cbcdf(ptr %t) #0 !dbg !50 { +// CHECK:STDOUT: ret void, !dbg !55 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.2b38c2ca9f7f1a94(ptr %t) #0 !dbg !57 { +// CHECK:STDOUT: ret void, !dbg !62 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: ; Function Attrs: nounwind +// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.f127f30143696d51(ptr %t) #0 !dbg !64 { +// CHECK:STDOUT: ret void, !dbg !69 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 5, 4, 3, 2, 1, 0 } // CHECK:STDOUT: @@ -106,41 +100,42 @@ fn Run() { // CHECK:STDOUT: !6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) // CHECK:STDOUT: !7 = !{!6} // CHECK:STDOUT: !8 = !DISubroutineType(types: !7) -// CHECK:STDOUT: !9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -// CHECK:STDOUT: !10 = !{null, !9} -// CHECK:STDOUT: !11 = !DISubroutineType(types: !10) -// CHECK:STDOUT: !12 = !{null, !6} -// CHECK:STDOUT: !13 = !DISubroutineType(types: !12) -// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !4, line: 13, type: !8, spFlags: DISPFlagDefinition, unit: !5) -// CHECK:STDOUT: !15 = !DILocation(line: 14, column: 3, scope: !14) -// CHECK:STDOUT: !17 = !DILocation(line: 15, column: 3, scope: !14) -// CHECK:STDOUT: !19 = !DILocation(line: 16, column: 3, scope: !14) -// CHECK:STDOUT: !21 = !DILocation(line: 17, column: 3, scope: !14) -// CHECK:STDOUT: !23 = !DILocation(line: 18, column: 3, scope: !14) -// CHECK:STDOUT: !25 = !DILocation(line: 19, column: 3, scope: !14) -// CHECK:STDOUT: !27 = !DILocation(line: 13, column: 1, scope: !14) -// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.a17e1ddde5b22223:core.Destroy.Core", scope: null, file: !4, line: 19, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !31) -// CHECK:STDOUT: !29 = !DILocalVariable(arg: 1, scope: !28, type: !9) -// CHECK:STDOUT: !30 = !DILocation(line: 19, column: 3, scope: !28) -// CHECK:STDOUT: !31 = !{!29} -// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.48e0adf639fe7af4:core.Destroy.Core", scope: null, file: !4, line: 18, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) -// CHECK:STDOUT: !33 = !DILocalVariable(arg: 1, scope: !32, type: !9) -// CHECK:STDOUT: !34 = !DILocation(line: 18, column: 3, scope: !32) -// CHECK:STDOUT: !35 = !{!33} -// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.cb8adced19392b99:core.Destroy.Core", scope: null, file: !4, line: 17, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !39) -// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !9) -// CHECK:STDOUT: !38 = !DILocation(line: 17, column: 3, scope: !36) -// CHECK:STDOUT: !39 = !{!37} -// CHECK:STDOUT: !40 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.61ea2aba74ab3bf1:core.Destroy.Core", scope: null, file: !4, line: 16, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !43) -// CHECK:STDOUT: !41 = !DILocalVariable(arg: 1, scope: !40, type: !9) -// CHECK:STDOUT: !42 = !DILocation(line: 16, column: 3, scope: !40) -// CHECK:STDOUT: !43 = !{!41} -// CHECK:STDOUT: !44 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.7619ac942aa9029a:core.Destroy.Core", scope: null, file: !4, line: 15, type: !11, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !47) -// 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: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 14, type: !13, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !51) -// CHECK:STDOUT: !49 = !DILocalVariable(arg: 1, scope: !48, type: !6) -// CHECK:STDOUT: !50 = !DILocation(line: 14, column: 3, scope: !48) -// CHECK:STDOUT: !51 = !{!49} +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "Run", linkageName: "main", scope: null, file: !4, line: 13, type: !8, spFlags: DISPFlagDefinition, unit: !5) +// CHECK:STDOUT: !10 = !DILocation(line: 14, column: 3, scope: !9) +// CHECK:STDOUT: !12 = !DILocation(line: 15, column: 3, scope: !9) +// CHECK:STDOUT: !14 = !DILocation(line: 16, column: 3, scope: !9) +// CHECK:STDOUT: !16 = !DILocation(line: 17, column: 3, scope: !9) +// CHECK:STDOUT: !18 = !DILocation(line: 18, column: 3, scope: !9) +// CHECK:STDOUT: !20 = !DILocation(line: 19, column: 3, scope: !9) +// 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: !25 = !{null, !6} +// CHECK:STDOUT: !26 = !DISubroutineType(types: !25) +// CHECK:STDOUT: !27 = !DILocation(line: 13, column: 1, scope: !9) +// CHECK:STDOUT: !28 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "") +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.4f29d15a20894e9b", scope: null, file: !28, line: 36, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !35) +// CHECK:STDOUT: !30 = !DILocalVariable(arg: 1, scope: !29, type: !22) +// CHECK:STDOUT: !34 = !DILocation(line: 36, column: 1, scope: !29) +// CHECK:STDOUT: !35 = !{!30} +// CHECK:STDOUT: !36 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.29e6aa423646b61a", scope: null, file: !28, line: 36, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !42) +// CHECK:STDOUT: !37 = !DILocalVariable(arg: 1, scope: !36, type: !22) +// CHECK:STDOUT: !41 = !DILocation(line: 36, column: 1, scope: !36) +// CHECK:STDOUT: !42 = !{!37} +// CHECK:STDOUT: !43 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.61b5bb2079973306", scope: null, file: !28, line: 36, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !49) +// CHECK:STDOUT: !44 = !DILocalVariable(arg: 1, scope: !43, type: !22) +// CHECK:STDOUT: !48 = !DILocation(line: 36, column: 1, scope: !43) +// CHECK:STDOUT: !49 = !{!44} +// CHECK:STDOUT: !50 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9045abb8230cbcdf", scope: null, file: !28, line: 36, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !56) +// CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !50, type: !22) +// CHECK:STDOUT: !55 = !DILocation(line: 36, column: 1, scope: !50) +// CHECK:STDOUT: !56 = !{!51} +// CHECK:STDOUT: !57 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.2b38c2ca9f7f1a94", scope: null, file: !28, line: 36, type: !24, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !63) +// CHECK:STDOUT: !58 = !DILocalVariable(arg: 1, scope: !57, type: !22) +// CHECK:STDOUT: !62 = !DILocation(line: 36, column: 1, scope: !57) +// CHECK:STDOUT: !63 = !{!58} +// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.f127f30143696d51", scope: null, file: !28, line: 36, type: !26, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !70) +// CHECK:STDOUT: !65 = !DILocalVariable(arg: 1, scope: !64, type: !6) +// CHECK:STDOUT: !69 = !DILocation(line: 36, column: 1, scope: !64) +// CHECK:STDOUT: !70 = !{!65} // CHECK:STDOUT: diff --git a/toolchain/sem_ir/core_interface_kind.def b/toolchain/sem_ir/core_interface_kind.def index 71d91898e610..1db0f5cc8b3a 100644 --- a/toolchain/sem_ir/core_interface_kind.def +++ b/toolchain/sem_ir/core_interface_kind.def @@ -23,7 +23,6 @@ CARBON_SEM_IR_CORE_INTERFACE_KIND(CppRangeForIterate) CARBON_SEM_IR_CORE_INTERFACE_KIND(CppUnsafeDeref) CARBON_SEM_IR_CORE_INTERFACE_KIND(Dec) CARBON_SEM_IR_CORE_INTERFACE_KIND(Default) -CARBON_SEM_IR_CORE_INTERFACE_KIND(Destroy) CARBON_SEM_IR_CORE_INTERFACE_KIND(FloatFitsIn) CARBON_SEM_IR_CORE_INTERFACE_KIND(DivAssignWith) CARBON_SEM_IR_CORE_INTERFACE_KIND(DivWith) @@ -38,6 +37,7 @@ CARBON_SEM_IR_CORE_INTERFACE_KIND(Negate) CARBON_SEM_IR_CORE_INTERFACE_KIND(OrderedWith) CARBON_SEM_IR_CORE_INTERFACE_KIND(SubAssignWith) CARBON_SEM_IR_CORE_INTERFACE_KIND(SubWith) +CARBON_SEM_IR_CORE_INTERFACE_KIND(SubobjectDestroy) #ifndef CARBON_SEM_IR_CORE_INTERFACE_EXCLUDE_UNKNOWN CARBON_SEM_IR_CORE_INTERFACE_KIND(Unknown) diff --git a/toolchain/testing/testdata/min_prelude/bool.carbon b/toolchain/testing/testdata/min_prelude/bool.carbon index c626517713c1..d76197161504 100644 --- a/toolchain/testing/testdata/min_prelude/bool.carbon +++ b/toolchain/testing/testdata/min_prelude/bool.carbon @@ -2,8 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/bool.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/destroy.carbon // EXTRA-ARGS: --custom-core --exclude-dump-file-prefix=min_prelude/ // --- min_prelude/bool.carbon @@ -11,5 +11,5 @@ // A minimal prelude for testing conversion between types. package Core library "prelude"; -export import library "prelude/parts/as"; export import library "prelude/parts/bool"; +export import library "prelude/parts/destroy"; diff --git a/toolchain/testing/testdata/min_prelude/convert.carbon b/toolchain/testing/testdata/min_prelude/convert.carbon index b302251db1a8..ae41ea042809 100644 --- a/toolchain/testing/testdata/min_prelude/convert.carbon +++ b/toolchain/testing/testdata/min_prelude/convert.carbon @@ -2,8 +2,10 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/default.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/destroy.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/copy.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/form.carbon // EXTRA-ARGS: --custom-core --exclude-dump-file-prefix=min_prelude/ // --- min_prelude/convert.carbon @@ -11,5 +13,7 @@ // A minimal prelude for testing conversion between types. package Core library "prelude"; -export import library "prelude/parts/as"; +export import library "prelude/parts/default"; +export import library "prelude/parts/destroy"; export import library "prelude/parts/copy"; +export import library "prelude/parts/form"; diff --git a/toolchain/testing/testdata/min_prelude/for.carbon b/toolchain/testing/testdata/min_prelude/for.carbon index 2a31f892fc34..19551f18f841 100644 --- a/toolchain/testing/testdata/min_prelude/for.carbon +++ b/toolchain/testing/testdata/min_prelude/for.carbon @@ -3,9 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // EXTRA-ARGS: --custom-core --exclude-dump-file-prefix=min_prelude/ -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/bool.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/copy.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/destroy.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/iterate.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/optional.carbon @@ -14,8 +14,8 @@ // A minimal prelude for testing `for` loops. package Core library "prelude"; -export import library "prelude/parts/as"; export import library "prelude/parts/bool"; export import library "prelude/parts/copy"; +export import library "prelude/parts/destroy"; export import library "prelude/parts/iterate"; export import library "prelude/parts/optional"; diff --git a/toolchain/testing/testdata/min_prelude/int.carbon b/toolchain/testing/testdata/min_prelude/int.carbon index 7373017f2e36..d441e4811d7b 100644 --- a/toolchain/testing/testdata/min_prelude/int.carbon +++ b/toolchain/testing/testdata/min_prelude/int.carbon @@ -2,6 +2,7 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/default.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int.carbon // EXTRA-ARGS: --custom-core --exclude-dump-file-prefix=min_prelude/ @@ -10,4 +11,5 @@ // A minimal prelude for testing `Int` or `i32`. package Core library "prelude"; +export import library "prelude/parts/default"; export import library "prelude/parts/int"; diff --git a/toolchain/testing/testdata/min_prelude/parts/array.carbon b/toolchain/testing/testdata/min_prelude/parts/array.carbon index c1a950023e31..f2ecd70ba688 100644 --- a/toolchain/testing/testdata/min_prelude/parts/array.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/array.carbon @@ -2,12 +2,14 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/default.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon // --- min_prelude/parts/array.carbon package Core library "prelude/parts/array"; +export import library "prelude/parts/default"; export import library "prelude/parts/int_literal"; // Arrays. diff --git a/toolchain/testing/testdata/min_prelude/parts/as.carbon b/toolchain/testing/testdata/min_prelude/parts/as.carbon index 9e6902f58e05..39c31f9f713c 100644 --- a/toolchain/testing/testdata/min_prelude/parts/as.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/as.carbon @@ -3,17 +3,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/default.carbon -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/destroy.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/form.carbon // --- min_prelude/parts/as.carbon package Core library "prelude/parts/as"; -export import library "prelude/parts/default"; -export import library "prelude/parts/destroy"; -export import library "prelude/parts/form"; - interface UnsafeAs(Dest: type) { fn Convert(self) -> Dest; } diff --git a/toolchain/testing/testdata/min_prelude/parts/destroy.carbon b/toolchain/testing/testdata/min_prelude/parts/destroy.carbon index 8ebd26463e29..9bf86b4a7945 100644 --- a/toolchain/testing/testdata/min_prelude/parts/destroy.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/destroy.carbon @@ -1,38 +1,42 @@ // Part of the Carbon Language project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon // --- min_prelude/parts/destroy.carbon package Core library "prelude/parts/destroy"; -// TODO: uncomment when `require impls` adds a witness table entry. -// interface SubobjectDestroy { -// final fn Op(ref self) = "subobject.destroy"; -// } +export import library "prelude/parts/as"; -interface Destroy { +interface SubobjectDestroy { + fn Op(ref self); +} + +// TODO: rename to `Destroy` when `require impls` adds a witness table entry. +interface DestroyImpl { // TODO: uncomment when `require impls` adds a witness table entry. // require impls SubobjectDestroy; // TODO: change `Self` to `partial Self`. fn Op(ref self); +} - // TODO: remove when `require impls` adds a witness table entry. - final fn SubobjectDestroy(unused ref self) { - // This function body is ignored by the toolchain. We can't use - // a built-in because the compiler treats it as an error. We - // should address this at some point, but it's not a high - // priority right now. - } +impl forall [T: SubobjectDestroy] T as DestroyImpl { + fn Op(ref self) = "no_op"; +} - final fn SelfDestruct(ref self) { - self.Op(); - self.SubobjectDestroy(); - } +constraint Destroy { + extend require impls SubobjectDestroy & DestroyImpl; } // TODO: uncomment when `require impls` adds a witness table entry. // impl forall [T: SubobjectDestroy] partial T as Destroy { // alias Op = T.Op; // } + +fn SelfDestruct[T: Destroy](ref t: T) { + t.(DestroyImpl.Op)(); + t.(SubobjectDestroy.Op)(); +} diff --git a/toolchain/testing/testdata/min_prelude/parts/float.carbon b/toolchain/testing/testdata/min_prelude/parts/float.carbon index 286e16a9d3ae..f8e6e2f32d9d 100644 --- a/toolchain/testing/testdata/min_prelude/parts/float.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/float.carbon @@ -2,8 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/copy.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/destroy.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/float_literal.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon @@ -11,8 +11,8 @@ package Core library "prelude/parts/float"; -export import library "prelude/parts/as"; export import library "prelude/parts/copy"; +export import library "prelude/parts/destroy"; export import library "prelude/parts/float_literal"; export import library "prelude/parts/int_literal"; diff --git a/toolchain/testing/testdata/min_prelude/parts/int.carbon b/toolchain/testing/testdata/min_prelude/parts/int.carbon index c03160c3bc43..9ac818007360 100644 --- a/toolchain/testing/testdata/min_prelude/parts/int.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/int.carbon @@ -2,16 +2,16 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/copy.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/destroy.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon // --- min_prelude/parts/int.carbon package Core library "prelude/parts/int"; -export import library "prelude/parts/as"; export import library "prelude/parts/copy"; +export import library "prelude/parts/destroy"; export import library "prelude/parts/int_literal"; private fn MakeInt(size: IntLiteral) -> type = "int.make_type_signed"; diff --git a/toolchain/testing/testdata/min_prelude/parts/uint.carbon b/toolchain/testing/testdata/min_prelude/parts/uint.carbon index bee066724126..7159ca40495e 100644 --- a/toolchain/testing/testdata/min_prelude/parts/uint.carbon +++ b/toolchain/testing/testdata/min_prelude/parts/uint.carbon @@ -2,16 +2,16 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/copy.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/destroy.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/int_literal.carbon // --- min_prelude/parts/uint.carbon package Core library "prelude/parts/uint"; -export import library "prelude/parts/as"; export import library "prelude/parts/copy"; +export import library "prelude/parts/destroy"; export import library "prelude/parts/int_literal"; private fn MakeUInt(size: IntLiteral) -> type = "int.make_type_unsigned"; diff --git a/toolchain/testing/testdata/min_prelude/unformed.carbon b/toolchain/testing/testdata/min_prelude/unformed.carbon index f2fff175705e..ddec357a57b3 100644 --- a/toolchain/testing/testdata/min_prelude/unformed.carbon +++ b/toolchain/testing/testdata/min_prelude/unformed.carbon @@ -2,7 +2,9 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // -// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/as.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/default.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/destroy.carbon +// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/form.carbon // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/parts/maybe_unformed.carbon // EXTRA-ARGS: --custom-core --exclude-dump-file-prefix=min_prelude/ @@ -11,5 +13,7 @@ // A minimal prelude for test involving `Core.MaybeUnformed(T)`. package Core library "prelude"; -export import library "prelude/parts/as"; +export import library "prelude/parts/default"; +export import library "prelude/parts/destroy"; +export import library "prelude/parts/form"; export import library "prelude/parts/maybe_unformed";